@font-face {
  font-family: "BrownFTV";
  src: url("font/BrownFtv-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "BrownFTV";
  src: url("font/BrownFtv-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "BrownFTV";
  src: url("font/BrownFtv-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "BrownFTV", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-alt: #f4f7fc;
  --fg: #0a1024;
  --muted: #5b6576;
  --accent: #0064f5;
  --accent-dark: #0050c7;
  --border: #e2e8f2;
  --rec: #e63946; /* indicateur d'enregistrement (convention) */
  --shadow: 0 10px 30px rgba(10, 30, 80, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  overflow: hidden;
}

/* Chaque ecran occupe tout le viewport ; un seul visible a la fois. */
.screen {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 180px 4vw 150px; /* place pour le bandeau haut (logo bloc) et la legende bas */
}
.screen.active { display: flex; animation: screenIn .35s ease; }

/* Petite transition d'entree entre les ecrans */
@keyframes screenIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* Bandeau permanent en haut, centre (masque sur l'accueil) */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.4rem 0.6rem; /* marge de securite en haut pour le logo */
}
.topbar.hidden { display: none; }
/* Logo bloc-marque (plus haut : "Dites-le" au-dessus de "ici") */
.topbar-logo { height: 72px; width: auto; }

/* Legende des boutons Streamdeck (bas, centre) */
.deck-legend {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1rem;
}
.deck-legend.hidden { display: none; }
.deck-hint { margin: 0; color: var(--muted); font-size: 2rem; }
.deck-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 4rem; }
.legend-item { display: flex; align-items: center; gap: .7rem; font-size: 2rem; color: var(--fg); font-weight: 600;}

/* Legende integree au bloc d'accueil (en flux, plus fixee en bas) */
.deck-legend.docked { position: static; margin-top: 3.5rem; padding-bottom: 0; }

/* Legende agrandie (ecran d'accueil) */
.deck-legend.big { gap: 1rem; padding-bottom: 1.8rem; }
.deck-legend.big .deck-hint { font-size: 2.47rem; }
.deck-legend.big .legend-item { font-size: 2.47rem; gap: .8rem; }
.deck-legend.big .legend-icon { width: 54px; height: 54px; font-size: 2rem; }
.legend-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px 10px 10px 0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}
.legend-icon.green { background: #1a8f4c; }
.legend-icon.orange { background: #e8850c; }
.legend-icon.red { background: var(--rec); }
.legend-icon.up, .legend-icon.down { background: var(--accent); }
.legend-svg { width: 40px; height: 40px; display: block; }
.deck-legend.big .legend-svg { width: 54px; height: 54px; }

h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h2 { font-size: clamp(1.2rem, 3vw, 2rem); margin: 0 0 .5rem; font-weight: 700; }

.center { text-align: center; max-width: min(1400px, 92vw); }
.center h1 { color: var(--accent); }

/* Logo bloc-marque "Dites-le ICI" sur l'accueil (grand, centre) */
.welcome-logo {
  display: block;
  margin: 0 auto 1.5rem;
  height: clamp(170px, 36vh, 340px);
  width: auto;
  padding-bottom: 80px;
}
.lead { font-size: clamp(1.4rem, 3.2vw, 2.6rem); color: var(--muted); line-height: 1.4; }
/* Accueil : texte 110% plus grand que le .lead standard. */
#screen-welcome .lead { font-size: clamp(1.54rem, 3.52vw, 2.86rem); }
.subtitle { color: var(--muted); margin-top: -.5rem; }

/* Ecran recontact : question en bleu (comme avant) au-dessus du formulaire "Vos coordonnees" */
.recontact-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
  width: 100%;
  max-width: 96vw;
}
.recontact-title { color: var(--accent); text-align: center;   margin-bottom: 4rem; }

/* Panneaux (setup, formulaire, conditions) */
.panel {
  width: min(860px, 92vw);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px 20px 20px 0; /* coin bas-gauche carre */
  padding: 2.6rem 3rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  box-shadow: var(--shadow);
}
.panel h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.panel-wide { width: min(960px, 94vw); }

label {
  font-size: .95rem;
  color: var(--muted);
  margin-top: .8rem;
  font-weight: 600;
}

input, select, button, textarea {
  font-family: var(--font); /* les controles de formulaire n'heritent pas de la police */
}
input, select {
  font-size: 1.1rem;
  padding: .75rem .95rem;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--fg);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 100, 245, 0.14);
}

.btn {
  margin-top: 1.4rem;
  font-size: 1.1rem;
  padding: .85rem 1.3rem;
  border: 1.5px solid transparent;
  border-radius: 12px 12px 12px 0; /* coin bas-gauche carre */
  cursor: pointer;
  font-weight: 700;
  transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
/* Bouton desactive : grise, non cliquable, sans effet de survol. */
.btn:disabled {
  background: #e2e8f2;
  color: #9aa6b8;
  border-color: transparent;
  cursor: not-allowed;
  transform: none;
}
.btn:disabled:hover { background: #e2e8f2; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: #fff; color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: rgba(0, 100, 245, 0.06); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-ghost:hover { color: var(--rec); border-color: var(--rec); }
.btn-danger { background: var(--rec); color: #fff; }
.btn-danger:hover { filter: brightness(.92); }

/* Modale operateur (Echap depuis l'accueil) - pilotable a la souris */
.op-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}
.op-modal-box {
  background: #fff;
  border-radius: 16px 16px 16px 0;
  padding: 2.2rem 2.4rem;
  max-width: 560px;
  width: 90vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  text-align: left;
}
.op-modal-box h2 { margin: 0 0 .8rem; font-size: 1.8rem; }
.op-modal-box p { margin: 0; color: var(--muted); font-size: 1.15rem; }
.op-modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.8rem;
}
.op-modal-actions .btn { margin-top: 0; }

/* --- Formulaire guide (navigation Streamdeck) --- */
.form-panel { width: min(1040px, 92vw); gap: 1rem; padding: 2.6rem 3rem; }
/* Formulaire d'infos (5 champs) : 95% de la taille actuelle. */
#screen-form .form-panel { transform: scale(0.95); transform-origin: center; }
.field {
  padding: .8rem 1.2rem;
  margin-bottom: 1.6rem; /* espace entre les champs (bien detacher les titres) */
  border-radius: 12px 12px 12px 0;
  opacity: .5;
  transition: opacity .2s, background .2s, transform .2s;
}
.field:last-of-type { margin-bottom: 0; }
/* Titre du champ bien detache de son controle */
.field label { display: block; margin: 0 0 .6rem; font-size: 1.2rem; }
/* Champ en cours : plus grand et legerement bleu */
.field.active {
  opacity: 1;
  background: rgba(0, 100, 245, 0.07);
  transform: scale(1.04);
}
.field.active label { color: var(--accent); }

/* Champs texte : memes reperes visuels que les listes (soulignement, meme taille) */
.field input {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--border);
  border-radius: 0;
  background: transparent;
  padding: .4rem 0;
  font-size: 1.6rem;
  font-weight: 700;
}
.field input:focus { box-shadow: none; border-bottom-color: var(--accent); }
.field.active input { font-size: 2rem; border-bottom-color: var(--accent); color: var(--accent); }

/* Genre : 3 boutons */
.genre-buttons { display: flex; gap: .8rem; }
.genre-btn {
  flex: 1 1 auto;
  padding: .9rem .5rem;
  font-size: 1.3rem;
  font-weight: 700;
  border: 1.5px solid var(--border);
  border-radius: 10px 10px 10px 0;
  background: #fff;
  color: var(--fg);
  cursor: pointer;
}
.genre-btn.selected { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Picker liste : element precedent / courant / suivant, avec fondu haut/bas */
.picker {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .2rem;
  height: 6em;
  justify-content: center;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 32%, #000 68%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 32%, #000 68%, transparent 100%);
}
.picker-opt {
  line-height: 1.3;
  transition: all .15s;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.picker-opt.prev, .picker-opt.next { color: var(--muted); font-size: 1.1rem; }
.picker-opt.current { color: var(--fg); font-weight: 700; font-size: 1.35rem; }
.field.active .picker-opt.current { color: var(--accent); font-size: 1.7rem; }

/* Effet de defilement : les options glissent selon le sens de navigation */
@keyframes pickFromBelow { from { transform: translateY(14px); opacity: .15; } to { transform: none; opacity: 1; } }
@keyframes pickFromAbove { from { transform: translateY(-14px); opacity: .15; } to { transform: none; opacity: 1; } }
.picker[data-dir="down"] .picker-opt { animation: pickFromBelow .18s ease; }
.picker[data-dir="up"] .picker-opt { animation: pickFromAbove .18s ease; }

/* Boutons de consentement (ecran conditions) */
.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.6rem;
}
.consent-actions .btn { margin-top: 0; flex: 1 1 auto; }

/* Barre de progression (ecran de refus) */
.progress {
  width: min(520px, 80vw);
  height: 12px;
  margin: 2rem auto 0;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  width: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.reuse {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  margin-bottom: .5rem;
}
.reuse-info { color: var(--accent); font-weight: 600; }
.reuse-details { margin: .1rem 0; color: #303a4d; font-size: .9rem; }
.reuse-date { margin: .1rem 0 .3rem; color: var(--muted); font-size: .85rem; }

/* Ecran de configuration : modale + questions cote a cote (utilise la largeur,
   pour que tout soit visible sans scroll). Repli en colonne si trop etroit. */
.setup-wrap {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 2.5vw;
  width: 100%;
  max-width: 98vw;
  max-height: 100%;
  overflow-y: auto; /* repli si l'ecran est vraiment trop petit */
}
/* Setup : les deux colonnes occupent plus de largeur (moins de marges laterales). */
#screen-setup .panel { width: min(1040px, 58vw); }
.separator {
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  margin-top: 1rem;
}

.hint { color: var(--muted); font-size: 1.5rem; margin-top: 1rem; }

/* Autocompletion code postal / commune (champ unique) */
.postal-field { position: relative; }
.postal-field input { width: 100%; }
#screen-form .field[data-field="codePostal"] { position: relative; }
.postal-suggest {
  list-style: none;
  margin: .35rem 0 0;
  padding: .3rem;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 40;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px 12px 12px 0;
  box-shadow: var(--shadow);
  max-height: 46vh;
  overflow-y: auto;
  text-align: left;
}
.postal-suggest.hidden { display: none; }
.postal-opt {
  padding: .55rem .8rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.postal-opt.active, .postal-opt:hover { background: rgba(0, 100, 245, .12); color: var(--accent); }

/* Recap des questions : colonne a cote de la modale, discret et plus petit */
.questions-info {
  width: 100%;
  color: var(--muted);
  font-size: .9rem;
  text-align: left;
}
.questions-version { font-weight: 700; color: var(--accent); margin: 0 0 .5rem; font-size: 1rem; }
.questions-list { margin: 0; padding-left: 1.2rem; }
.questions-list li { margin-bottom: .5rem; line-height: 1.4; }

/* Colonne de droite du setup : verification technique + questions + version.
   Tout doit tenir sur un ecran (pas de scroll). */
.setup-side {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: min(560px, 36vw);
  align-self: center;
  min-height: 0;
}

/* Verification technique (setup) : apercu webcam + courbe audio */
.setup-check { width: 100%; text-align: center; }
.setup-check-title { font-weight: 700; color: var(--accent); margin: 0 0 .8rem; }
.setup-preview-wrap {
  width: min(100%, 300px); /* apercu volontairement compact pour tout garder visible */
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px 12px 12px 0;
  overflow: hidden;
}
.setup-preview-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* effet miroir (vue selfie) */
}
.setup-meter { display: block; width: min(100%, 300px); height: 48px; margin: .5rem auto 0; }
.setup-check-hint { color: var(--muted); font-size: .85rem; margin-top: .4rem; }

/* Numero de version de la borne (discret, bas de colonne) */
.borne-version { color: var(--muted); font-size: .8rem; text-align: center; margin: 0; }

/* Bloc d'envoi des temoignages (colonne de droite du setup) */
.send-block {
  width: 100%;
  text-align: center;
  padding: 1.2rem;
  border: 1.5px solid var(--border);
  border-radius: 12px 12px 12px 0;
}
.send-count { margin: 0 0 .8rem; font-weight: 700; font-size: 1.1rem; }
.send-block .btn { margin-top: 0; width: 100%; }
.send-status { margin: 1rem 0 0; font-weight: 600; }
.send-status.online { color: #1a8a3a; }
.send-status.offline { color: var(--rec); }

/* Bandeau "BORNE DE TEST" (mode test via Konami, ecran de configuration) */
.test-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--rec);
  color: #fff;
  text-align: center;
  font-weight: 700;
  letter-spacing: .15em;
  padding: .5rem 1rem;
  font-size: 1.2rem;
}

/* Affichage des identifiants S3 dans la modale (temporaire) */
.s3-info { margin: 1.2rem 0 0; display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; }
.s3-info dt { color: var(--muted); font-weight: 600; }
.s3-info dd { margin: 0; word-break: break-all; }
.s3-info dd.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
#s3-mode { font-weight: 700; color: var(--accent); }

.error { color: var(--rec); margin-top: .8rem; font-weight: 600; }

.hidden { display: none !important; }

/* Conditions d'utilisation : deux blocs cote a cote, tout visible (aucun scroll) */
.panel-terms { width: 96vw; padding: 1.4rem 1.8rem; }
.panel-terms h1 { margin: 0 0 .8rem; font-size: clamp(1.4rem, 3vw, 2rem); }
.terms-cols {
  display: flex;
  gap: 2rem;
  align-items: stretch;
}
.terms-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.terms-title {
  font-size: .95rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .02em;
  margin: 0 0 .5rem;
}
.terms-text {
  line-height: 1.35;
  font-size: .8rem; /* ajuste dynamiquement par fitTerms() pour tenir sans scroll */
  color: #303a4d;
}
.terms-text p { margin: 0 0 .5rem; }
.terms-text p:last-child { margin-bottom: 0; }
@media (max-width: 820px) {
  .terms-cols { flex-direction: column; gap: 1rem; }
}

/* Ecran d'enregistrement */
.record-layout {
  width: min(1000px, 96vw);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}
.question-index {
  color: var(--accent);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 2.8vw, 2.4rem);
  font-weight: 700;
}
/* Avec l'apercu camera : "Question X / N" 2x plus petit. */
.question-index.small { font-size: clamp(.75rem, 1.4vw, 1.2rem); }
/* Grand numero de question, colle au bord gauche : seule la moitie droite du chiffre
   est visible, tres gros et tres transparent (decoratif). */
.question-bignum {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translate(-30%, -50%); /* 25% du chiffre depasse a gauche -> 75% visible */
  font-size: 80vh;
  line-height: 1;
  font-weight: 700;
  color: var(--accent);
  opacity: .05;
  pointer-events: none;
  z-index: 0;
}
.record-layout { position: relative; z-index: 1; }
/* Taille et largeur CONSTANTES : seule l'echelle change -> aucun reflux de ligne,
   l'animation reste parfaitement fluide (les retours a la ligne ne bougent pas). */
.question-text {
  font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  margin: 3rem 0;   /* beaucoup d'air autour de la question en plein ecran */
  max-width: 900px;
  font-weight: 700;
  transform: scale(1.4); /* tres grand en plein ecran (question seule) */
  transform-origin: center center;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1);
}
/* Avec l'apercu camera : reste grande (l'aide a disparu, on a la place) */
.question-text.small { transform: scale(1.05); margin: .8rem 0; }
/* Message sous la question : grand (question seule) puis petit (camera affichee) */
.record-hint {
  font-size: clamp(.95rem, 2.1vw, 1.45rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 820px;
  margin: 0 0 1.2rem;
  transition: font-size .4s ease;
}
.record-hint.small {
  font-size: clamp(.8rem, 1.5vw, 1.05rem);
  line-height: 1.4;
  margin: 0 0 .8rem;
}
.video-wrap {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  background: #0a1024;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: var(--shadow);
  animation: fadeInUp .5s ease; /* apparition de la camera apres la question seule */
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
#preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* effet miroir naturel de l'apercu */
}

/* Ecran "Merci" affiche apres l'enregistrement (a la place du replay) */
.record-thanks { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
/* Legende deplacee au centre (dans l'ecran Merci de relecture) au lieu du bas.
   Boutons empiles : le vert sur sa propre ligne, 1.5x plus gros que l'orange dessous. */
.deck-legend.inline { position: static; }
.deck-legend.inline .deck-buttons { flex-direction: column; gap: 1.1rem; align-items: center; }
.deck-legend.inline .legend-item { font-size: 2.08rem; gap: .8rem; justify-content: center; text-align: center; }
.deck-legend.inline .legend-item .legend-svg { width: 46px; height: 46px; }
.deck-legend.inline .legend-green { font-size: 3.12rem; } /* 1.5x de l'orange (2.08rem) */
.deck-legend.inline .legend-green .legend-svg { width: 70px; height: 70px; }

/* Filtre bleu + pause tant que l'enregistrement n'a pas demarre */
.pause-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 100, 245, 0.38);
}
/* Deux barres blanches fines, directement sur le voile bleu */
.pause-icon {
  width: 40px;
  height: 56px;
  position: relative;
}
.pause-icon::before, .pause-icon::after {
  content: "";
  position: absolute;
  top: 0;
  height: 100%;
  width: 8px;
  background: #fff;
  border-radius: 4px;
}
.pause-icon::before { left: 7px; }
.pause-icon::after { right: 7px; }
.timer {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  padding: .2rem .8rem;
  border-radius: 10px;
}
.rec-badge {
  position: absolute;
  top: 16px;
  left: 18px;
  font-weight: 700;
  color: #fff;
  background: var(--rec);
  padding: .3rem .8rem;
  border-radius: 8px;
  animation: blink 1.2s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: .35; } }

/* Barre de progression du temps d'enregistrement (se vide sur la duree max) */
.rec-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12px;
  background: rgba(255, 255, 255, 0.25);
}
.rec-progress-bar {
  height: 100%;
  width: 100%;
  background: var(--rec);
}

/* Consentement sans video : ecran #E0ECFE avec le logo ICI au centre */
.video-wrap.masked {
  background: #E0ECFE url("logo/ici.svg") no-repeat center;
  background-size: min(40%, 240px);
}
.video-wrap.masked #preview { display: none; }
.video-wrap.masked .pause-overlay { background: rgba(0, 100, 245, 0.20); }
/* Quand la waveform audio est active, on affiche le canvas (via #preview) sans miroir */
.video-wrap.masked.viz { background: none; }
.video-wrap.masked.viz #preview { display: block; transform: none; }

/* Mini barre pendant la phase "question seule" (avant la camera) */
.solo-progress {
  width: min(320px, 60vw);
  height: 6px;
  margin: 0 auto 1rem;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.solo-bar {
  width: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

/* Compte a rebours avant enregistrement (5..1) superpose a la camera */
.precount {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 100, 245, 0.55);
  color: #fff;
  font-size: clamp(5rem, 22vw, 14rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.precount span { animation: pop .5s ease; display: inline-block; }
@keyframes pop {
  from { opacity: 0; transform: scale(1.6); }
  to { opacity: 1; transform: scale(1); }
}

/* Slide "Vous etes pret" */
.ready-points {
  list-style: none;
  padding: 0;
  margin: 2.4rem auto 0;
  max-width: min(1000px, 90vw);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}
.ready-points li {
  position: relative;
  padding-left: 2.6rem;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  color: #303a4d;
}
.ready-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .35em;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--accent);
}
