/* Micro du chatbot + page noire de dictée (forme vocale SiriWave au centre) */
.voice-button {
  display: flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  margin: 0 6px 0 auto;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #f8fafc;
  background: rgb(255 255 255 / 0.1);
  cursor: pointer;
  transition: all 150ms ease;
}

.voice-button:hover { background: rgb(255 255 255 / 0.18); }
.voice-button:focus-visible { outline: 2px solid rgb(255 255 255 / 0.6); outline-offset: 2px; }
.voice-button svg { width: 17px; height: 17px; }
.voice-button + .send-button { margin-left: 0; }

body.voice-open { overflow: hidden; }

.voice-overlay {
  position: fixed;
  z-index: 5000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #f5f6fa;
  background: #000;
  opacity: 0;
  transition: opacity 240ms ease;
}

.voice-overlay[hidden] { display: none; }
.voice-overlay.is-open { opacity: 1; }

.voice-stage {
  display: flex;
  width: min(420px, 100%);
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.voice-wave { display: block; border-radius: 20px; background: #000; }

.voice-status {
  min-height: 1.4em;
  margin: 8px 0 0;
  color: rgb(245 246 250 / 0.86);
  font: 400 15px / 1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.voice-timer {
  min-height: 1.2em;
  margin: 0;
  color: rgb(245 246 250 / 0.5);
  font: 500 13px / 1 ui-sans-serif, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.voice-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }

.voice-action {
  min-width: 120px;
  padding: 11px 20px;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 999px;
  color: #f5f6fa;
  background: transparent;
  font: 500 14px / 1 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}

.voice-action.is-primary { border-color: #f5f6fa; color: #000; background: #f5f6fa; }
.voice-action:hover { filter: brightness(1.12); }
.voice-action:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.voice-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: rgb(245 246 250 / 0.8);
  background: rgb(255 255 255 / 0.08);
  cursor: pointer;
}

.voice-close:hover { background: rgb(255 255 255 / 0.16); }
.voice-close svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  .voice-overlay { transition: none; }
}

/* Discover Me — panneau de questions et Preference DNA sur la page noire */
.dna-panel { display: none; width: 100%; flex-direction: column; align-items: center; gap: 12px; }
.voice-overlay.is-dna .dna-panel { display: flex; }
.voice-overlay.is-dna .voice-stage { width: min(640px, 100%); max-height: 100%; overflow-y: auto; }
.voice-overlay.is-dna .voice-wave { width: 150px !important; height: 150px !important; }

.dna-progress { min-height: 1em; margin: 0; color: rgb(245 246 250 / 0.45); font: 500 11px / 1 ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; }
.dna-question { margin: 0; color: #f5f6fa; font: 500 clamp(20px, 3.4vw, 28px) / 1.25 "Fraunces", Georgia, serif; letter-spacing: -0.01em; text-wrap: balance; }
.dna-question:empty, .dna-progress:empty, .dna-understood:empty { display: none; }

.dna-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.dna-chip {
  padding: 8px 14px;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 999px;
  color: rgb(245 246 250 / 0.88);
  background: transparent;
  font: 400 13px / 1 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.dna-chip:hover { background: rgb(255 255 255 / 0.08); }
.dna-chip[aria-pressed="true"] { border-color: #f5f6fa; color: #000; background: #f5f6fa; }
.dna-chip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.dna-understood { margin: 2px 0 0; color: #a9ead4; font: 400 14px / 1.5 ui-sans-serif, system-ui, sans-serif; }

.dna-card { width: 100%; padding: 6px 18px; border: 1px solid rgb(255 255 255 / 0.14); border-radius: 14px; background: rgb(255 255 255 / 0.04); text-align: left; }
.dna-card dl { margin: 0; }
.dna-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgb(255 255 255 / 0.08); }
.dna-row:last-child { border-bottom: 0; }
.dna-row dt { color: rgb(245 246 250 / 0.5); font: 500 11px / 1.6 ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; }
.dna-row dd { margin: 0; color: #f5f6fa; font: 400 14px / 1.5 ui-sans-serif, system-ui, sans-serif; }

.dna-adjust { display: flex; width: 100%; gap: 8px; }
.dna-adjust[hidden] { display: none; }
.dna-adjust input {
  min-width: 0; flex: 1; padding: 11px 16px;
  border: 1px solid rgb(255 255 255 / 0.2); border-radius: 999px; outline: none;
  color: #f5f6fa; background: rgb(255 255 255 / 0.06); font: 400 14px / 1 ui-sans-serif, system-ui, sans-serif;
}
.dna-adjust input:focus { border-color: rgb(255 255 255 / 0.5); }
.dna-adjust input::placeholder { color: rgb(245 246 250 / 0.4); }
.dna-adjust button { padding: 0 18px; border: 0; border-radius: 999px; color: #000; background: #f5f6fa; font: 500 13px / 1 ui-sans-serif, system-ui, sans-serif; cursor: pointer; }

@media (max-width: 560px) {
  .dna-row { grid-template-columns: 1fr; gap: 2px; }
}

/* Entretien conseiller (CGP à la voix) */
.cgp-panel { display: none; width: 100%; flex-direction: column; align-items: center; gap: 12px; }
.voice-overlay.is-cgp .cgp-panel { display: flex; }
.voice-overlay.is-cgp .voice-stage { width: min(680px, 100%); max-height: 100%; overflow-y: auto; }
.voice-overlay.is-cgp .voice-wave { width: 200px !important; height: 200px !important; transition: transform 300ms ease, opacity 300ms ease; opacity: 0.75; }
.voice-overlay.is-cgp.is-speaking .voice-wave { transform: scale(1.12); opacity: 1; }

.cgp-notes { width: 100%; text-align: left; color: rgb(245 246 250 / 0.8); font: 400 13px / 1.5 ui-sans-serif, system-ui, sans-serif; }
.cgp-notes[hidden] { display: none; }
.cgp-notes summary { cursor: pointer; color: rgb(245 246 250 / 0.55); letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; }
.cgp-notes ol { margin: 10px 0 0; padding: 0; list-style: none; max-height: 220px; overflow-y: auto; }
.cgp-notes li { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgb(255 255 255 / 0.07); }
.cgp-notes li strong { color: rgb(245 246 250 / 0.5); font-weight: 500; }
@media (max-width: 560px) { .cgp-notes li { grid-template-columns: 1fr; gap: 0; } }
.cgp-source { margin: 0; max-width: 560px; color: rgb(245 246 250 / 0.42); font: 400 11.5px / 1.5 ui-sans-serif, system-ui, sans-serif; }
.cgp-source:empty { display: none; }
.voice-overlay.is-cgp .dna-understood { max-width: 600px; color: rgb(245 246 250 / 0.82); }

/* ------------------------------------------------------------------------------------------------
   Style fintech de la home page, en mode nuit (2026-09-25) : SF Pro, graisse 500, lettrage serré,
   étiquettes en capitales espacées, pastilles zinc / ciel / émeraude, boutons en pilule, encre #0a1217.
   ------------------------------------------------------------------------------------------------ */
.voice-overlay {
  --night-bg: #0a1217;
  --night-surface: rgb(255 255 255 / 0.04);
  --night-line: rgb(255 255 255 / 0.08);
  --night-ink: #f8fafc;
  --night-muted: #94a3b8;
  --night-faint: rgb(248 250 252 / 0.42);
  --night-sky: #7dd3fc;
  --night-sky-bg: rgb(14 165 233 / 0.14);
  --night-emerald: #6ee7b7;
  --night-emerald-bg: rgb(16 185 129 / 0.14);
  --night-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, Helvetica, Arial, sans-serif;
  color: var(--night-ink);
  background: radial-gradient(120% 80% at 50% 0%, #111c23 0%, var(--night-bg) 55%);
  font-family: var(--night-font);
}
.voice-wave { background: transparent; mix-blend-mode: screen; }   /* le noir du shader se fond dans l'encre */

.voice-stage { gap: 16px; }
.voice-overlay.is-cgp .voice-stage, .voice-overlay.is-dna .voice-stage { width: min(640px, 100%); gap: 16px; }
.voice-overlay.is-cgp .voice-wave { width: 168px !important; height: 168px !important; }

/* Étape : pastille ciel, comme les chips de la home */
.dna-progress {
  display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 4px 11px;
  border-radius: 999px; color: var(--night-sky); background: var(--night-sky-bg);
  font: 600 10px / 1 var(--night-font); letter-spacing: 0.08em; text-transform: uppercase;
}
.dna-progress::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.voice-overlay.is-speaking .dna-progress::before { animation: night-pulse 1s ease-in-out infinite; }
@keyframes night-pulse { 50% { opacity: 0.3; } }

/* Phrase de l'assistant : titre SF Pro Display, lettrage serré */
.dna-question {
  max-width: 600px; color: var(--night-ink);
  font: 500 clamp(21px, 3.2vw, 28px) / 1.2 var(--night-font); letter-spacing: -0.03em;
}
.dna-understood, .voice-overlay.is-cgp .dna-understood {
  max-width: 560px; color: var(--night-muted); font: 400 14px / 1.55 var(--night-font); letter-spacing: -0.005em;
}
.cgp-source { color: var(--night-faint); font: 500 10.5px / 1.5 var(--night-font); letter-spacing: 0.01em; }
.voice-status { color: var(--night-muted); font: 400 14px / 1.5 var(--night-font); letter-spacing: -0.005em; max-width: 520px; }
.voice-timer { color: var(--night-faint); font: 500 12px / 1 var(--night-font); }

/* Boutons en pilule : primaire blanc (bouton d'envoi du chat), secondaires discrets */
.voice-actions { gap: 8px; margin-top: 4px; }
.voice-action {
  min-width: 0; min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px;
  color: var(--night-ink); background: rgb(255 255 255 / 0.08);
  font: 500 13px / 1 var(--night-font); letter-spacing: -0.01em;
  transition: background 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}
.voice-action:hover { filter: none; background: rgb(255 255 255 / 0.14); }
.voice-action.is-primary { color: #0a1217; background: #f8fafc; }
.voice-action.is-primary:hover { background: #fff; box-shadow: 0 8px 18px rgb(0 0 0 / 0.35); }
.voice-close { background: rgb(255 255 255 / 0.06); color: var(--night-muted); }
.voice-close:hover { color: var(--night-ink); background: rgb(255 255 255 / 0.12); }

/* Chips (Discover Me) : zinc, sélection émeraude */
.dna-chip {
  padding: 7px 13px; border: 0; color: #d4d4d8; background: rgb(255 255 255 / 0.07);
  font: 500 12.5px / 1 var(--night-font); letter-spacing: -0.005em;
}
.dna-chip:hover { background: rgb(255 255 255 / 0.12); }
.dna-chip[aria-pressed="true"] { color: var(--night-emerald); background: var(--night-emerald-bg); border: 0; }

/* Fiche Atlas : carte fintech */
.dna-card { padding: 4px 20px; border: 1px solid var(--night-line); border-radius: 18px; background: var(--night-surface); }
.dna-row { grid-template-columns: 132px 1fr; padding: 11px 0; border-bottom: 1px solid var(--night-line); }
.dna-row dt { color: var(--night-faint); font: 600 10px / 1.7 var(--night-font); letter-spacing: 0.08em; }
.dna-row dd { color: var(--night-ink); font: 500 14px / 1.45 var(--night-font); letter-spacing: -0.015em; }
.dna-adjust input { border-color: var(--night-line); background: var(--night-surface); font-family: var(--night-font); }
.dna-adjust button { color: #0a1217; background: #f8fafc; font-family: var(--night-font); }

/* Notes de l'échange */
.cgp-notes { color: #cbd5e1; font: 400 13px / 1.5 var(--night-font); }
.cgp-notes summary { color: var(--night-faint); font: 600 10px / 1 var(--night-font); letter-spacing: 0.08em; }
.cgp-notes li { border-bottom-color: var(--night-line); }
.cgp-notes li strong { color: var(--night-sky); font: 600 10px / 1.9 var(--night-font); letter-spacing: 0.08em; text-transform: uppercase; }

@media (max-width: 560px) {
  .dna-question { font-size: 20px; }
  .voice-action { min-height: 34px; padding: 0 14px; }
}
