/* ============================================================
   Keeratin — Agent Diagnostic Capillaire (diag.css) v1.0
   Design system : noir #0a0a0a, or #C5A55A (hover #d4b668),
   titres Bebas Neue (.kr-heading), corps Inter, boutons carres (radius 0).
   ============================================================ */

/* ── Boutons ── */
.lc-diag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 1px solid #0a0a0a;
  background: #0a0a0a;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
  border-radius: 0;
}
.lc-diag-btn:hover { background: #C5A55A; border-color: #C5A55A; color: #0a0a0a; }
.lc-diag-btn--primary { background: #C5A55A; border-color: #C5A55A; color: #0a0a0a; }
.lc-diag-btn--primary:hover { background: #d4b668; border-color: #d4b668; }
.lc-diag-btn--ghost { background: transparent; color: #0a0a0a; }
.lc-diag-btn--ghost:hover { background: #0a0a0a; border-color: #0a0a0a; color: #fff; }

/* ── Launcher (categorie + home) ── */
.lc-diag-launcher {
  margin: 0 0 28px;
  background: #0a0a0a;
  background-image: radial-gradient(120% 140% at 80% 0%, rgba(197,165,90,0.22) 0%, rgba(197,165,90,0) 55%);
  color: #fff;
  border: 1px solid #1c1c1c;
}
.lc-diag-launcher__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  flex-wrap: wrap;
}
.lc-diag-launcher__eyebrow {
  display: block;
  font-family: Inter, sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #C5A55A;
  margin-bottom: 8px;
}
.lc-diag-launcher__title { font-size: 30px; line-height: 1.05; margin: 0 0 8px; color: #fff; }
.lc-diag-launcher__sub { font-family: Inter, sans-serif; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.72); margin: 0; max-width: 560px; }
.lc-diag-launcher .lc-diag-launch {
  background: #C5A55A; border-color: #C5A55A; color: #0a0a0a; white-space: nowrap;
}
.lc-diag-launcher .lc-diag-launch:hover { background: #d4b668; border-color: #d4b668; }

/* ── Overlay ── */
.lc-diag-overlay { position: fixed; inset: 0; z-index: 999996; display: none; }
.lc-diag-overlay--open { display: block; }
.lc-diag-overlay__backdrop { position: absolute; inset: 0; background: rgba(10,10,10,0.78); backdrop-filter: blur(3px); }
.lc-diag-panel {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 460px;
  max-width: calc(100vw - 32px);
  height: 640px;
  max-height: calc(100vh - 48px);
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.lc-diag-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; background: #0a0a0a; color: #fff; flex: 0 0 auto;
}
.lc-diag-panel__eyebrow { display: block; font-family: Inter, sans-serif; font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: #C5A55A; margin-bottom: 3px; }
.lc-diag-panel__title strong { font-size: 22px; line-height: 1; color: #fff; }
.lc-diag-panel__close { background: none; border: none; color: rgba(255,255,255,0.7); font-size: 28px; line-height: 1; cursor: pointer; padding: 0 4px; }
.lc-diag-panel__close:hover { color: #C5A55A; }
.lc-diag-panel .lc-diag-widget { flex: 1 1 auto; min-height: 0; }

/* ── Widget (commun overlay + inline) ── */
.lc-diag-widget {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #FAFAFA;
  font-family: Inter, -apple-system, sans-serif;
}
.lc-diag-thread {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Bulles ── */
.lc-diag-row { display: flex; }
.lc-diag-row--user { justify-content: flex-end; }
.lc-diag-row--assistant { justify-content: flex-start; }
.lc-diag-bubble {
  max-width: 82%;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 14px;
}
.lc-diag-bubble--assistant { background: #fff; color: #1a1a1a; border: 1px solid #ececec; border-top-left-radius: 4px; }
.lc-diag-bubble--user { background: #0a0a0a; color: #fff; border-top-right-radius: 4px; }

/* ── Indicateur "ecrit..." ── */
.lc-diag-typing { display: inline-flex; gap: 5px; align-items: center; }
.lc-diag-typing span {
  width: 7px; height: 7px; border-radius: 50%; background: #C5A55A;
  display: inline-block; opacity: .35; animation: lcDiagBlink 1.1s infinite ease-in-out;
}
.lc-diag-typing span:nth-child(2) { animation-delay: .2s; }
.lc-diag-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes lcDiagBlink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ── Chips (reponses rapides) ── */
.lc-diag-options { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px; }
.lc-diag-options:empty { padding: 0; }
.lc-diag-chip {
  font-family: Inter, sans-serif;
  font-size: 13px;
  padding: 9px 15px;
  background: #fff;
  color: #0a0a0a;
  border: 1px solid #C5A55A;
  cursor: pointer;
  transition: background .15s, color .15s;
  border-radius: 0;
}
.lc-diag-chip:hover { background: #C5A55A; color: #0a0a0a; }

/* ── Barre d'envoi ── */
.lc-diag-inputbar {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 16px 22px;
  border-top: 1px solid #ececec;
  background: #fff;
}
.lc-diag-input {
  flex: 1 1 auto;
  height: 46px;
  padding: 0 14px;
  font-family: Inter, sans-serif;
  font-size: 14px;
  border: 1px solid #e0e0e0;
  background: #FAFAFA;
  color: #1a1a1a;
  border-radius: 0;
  outline: none;
}
.lc-diag-input:focus { border-color: #C5A55A; box-shadow: 0 0 0 3px rgba(197,165,90,0.10); }
.lc-diag-input:disabled { opacity: .6; }
.lc-diag-send {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #0a0a0a; color: #fff; border: none; cursor: pointer;
  transition: background .2s, color .2s; border-radius: 0;
}
.lc-diag-send:hover { background: #C5A55A; color: #0a0a0a; }
.lc-diag-send:disabled { opacity: .5; cursor: default; }

/* ── Carte de recommandation ── */
.lc-diag-reco {
  width: 100%;
  background: #fff;
  border: 1px solid #C5A55A;
  padding: 20px;
}
.lc-diag-reco__eyebrow { display: block; font-family: Inter, sans-serif; font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: #C5A55A; margin-bottom: 6px; }
.lc-diag-reco__name { font-size: 26px; line-height: 1.05; margin: 0; color: #0a0a0a; }
.lc-diag-reco__price { font-size: 18px; font-weight: 700; color: #C5A55A; margin-top: 4px; }
.lc-diag-reco__specs { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.lc-diag-reco__spec {
  flex: 1 1 auto; min-width: 120px;
  background: #FAFAFA; border: 1px solid #f0f0f0; padding: 10px 12px;
}
.lc-diag-reco__spec span { display: block; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: #6b6b6b; margin-bottom: 3px; }
.lc-diag-reco__spec strong { font-size: 14px; color: #1a1a1a; }
.lc-diag-reco__reasons { list-style: none; margin: 0 0 14px; padding: 0; }
.lc-diag-reco__reasons li { position: relative; padding-left: 22px; font-size: 13px; line-height: 1.5; color: #333; margin-bottom: 7px; }
.lc-diag-reco__reasons li::before { content: ""; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; background: #C5A55A; }
.lc-diag-reco__alt { font-size: 13px; color: #6b6b6b; margin-bottom: 16px; }
.lc-diag-reco__alt strong { color: #1a1a1a; }
.lc-diag-reco__cta { display: flex; gap: 10px; flex-wrap: wrap; }
.lc-diag-reco__cta .lc-diag-btn { flex: 1 1 auto; }

/* ── Page pleine /diagnostic ── */
.lc-diag-page { background: #fff; }
.lc-diag-page__hero {
  background: #0a0a0a;
  background-image: radial-gradient(120% 160% at 50% 0%, rgba(197,165,90,0.22) 0%, rgba(197,165,90,0) 55%);
  color: #fff;
  text-align: center;
  padding: 70px 24px 92px;
}
.lc-diag-page__eyebrow { display: block; font-family: Inter, sans-serif; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: #C5A55A; margin-bottom: 14px; }
.lc-diag-page__title { font-size: 48px; line-height: 1.02; margin: 0 0 16px; color: #fff; }
.lc-diag-page__lead { font-family: Inter, sans-serif; font-size: 16px; line-height: 1.6; color: rgba(255,255,255,0.75); max-width: 620px; margin: 0 auto; }
.lc-diag-page__card {
  max-width: 620px;
  margin: -56px auto 64px;
  background: #fff;
  border: 1px solid #e8e8e8;
  box-shadow: 0 24px 60px rgba(0,0,0,0.12);
}
.lc-diag-page__card .lc-diag-widget { height: 600px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .lc-diag-launcher__inner { padding: 22px; }
  .lc-diag-launcher__title { font-size: 26px; }
  .lc-diag-launcher .lc-diag-launch { width: 100%; }
  .lc-diag-panel { width: 100%; height: 100%; max-width: 100vw; max-height: 100vh; top: 0; left: 0; transform: none; }
  .lc-diag-page__title { font-size: 34px; }
  .lc-diag-page__hero { padding: 52px 20px 80px; }
  .lc-diag-page__card { margin: -48px 12px 40px; }
  .lc-diag-page__card .lc-diag-widget { height: 540px; }
  .lc-diag-reco__cta .lc-diag-btn { width: 100%; flex: 1 1 100%; }
}
