/* Vote en direct Anesthéa : bleu nuit et or de la marque, A corail, B turquoise, C violet, comme un jeu télévisé. */

:root {
  --nuit: #0F2138;
  --nuit-2: #162D46;
  --nuit-3: #1F3B5C;
  --or: #A5822A;
  --or-vif: #D8B04E;
  --or-pale: #F5E6BA;
  --a: #FF5D5D;
  --a-fonce: #D33A48;
  --b: #18B4AE;
  --b-fonce: #0C8784;
  --c: #9479F2;
  --c-fonce: #6650C8;
  --texte: #F6F8FC;
  --texte-2: #B9C6D8;
  --ligne: rgba(255, 255, 255, 0.12);
  --carte: rgba(255, 255, 255, 0.06);
  --rayon: 22px;
  --titre: "Fredoka", "Baloo 2", ui-rounded, "Arial Rounded MT Bold", sans-serif;
  --corps: "Nunito Sans", ui-rounded, "Helvetica Neue", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--corps);
  color: var(--texte);
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(216, 176, 78, 0.18), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(24, 180, 174, 0.16), transparent 60%),
    linear-gradient(160deg, var(--nuit) 0%, var(--nuit-2) 55%, #10253D 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* Fond : croix médicales discrètes et tracé d'ECG qui défile. */
.fond { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.fond::before {
  content: ""; position: absolute; inset: 0; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpath d='M29 22h6v7h7v6h-7v7h-6v-7h-7v-6h7z' fill='%23ffffff'/%3E%3C/svg%3E");
}
.ecg { position: absolute; left: 0; width: 200%; height: 120px; opacity: 0.16; animation: defiler 9s linear infinite; }
.ecg path { fill: none; stroke: var(--or-vif); stroke-width: 3; stroke-linejoin: round; }
@keyframes defiler { to { transform: translateX(-50%); } }

.marque { display: flex; align-items: center; gap: 12px; }
.marque img { width: 46px; height: 46px; padding: 5px; background: #fff; border-radius: 14px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3); }
.marque strong { font-family: var(--titre); font-weight: 600; letter-spacing: 0.02em; font-size: 1.05rem; }
.marque span { display: block; color: var(--texte-2); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }

.bouton {
  border: none; border-radius: 16px; padding: 16px 26px; font-family: var(--titre); font-weight: 600; font-size: 1.15rem;
  background: linear-gradient(180deg, var(--or-vif), var(--or)); color: #1A1406;
  box-shadow: 0 6px 0 #6E5618, 0 12px 26px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.2s;
}
.bouton:active { transform: translateY(4px); box-shadow: 0 2px 0 #6E5618, 0 6px 12px rgba(0, 0, 0, 0.3); }
.bouton:disabled { filter: grayscale(0.8) brightness(0.7); cursor: not-allowed; }
.bouton.secondaire { background: var(--carte); color: var(--texte); box-shadow: inset 0 0 0 1.5px var(--ligne); }

.lettre {
  display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 0.45em;
  font-family: var(--titre); font-weight: 700; color: #fff;
}
.lettre.A { background: var(--a); box-shadow: 0 0.12em 0 var(--a-fonce); }
.lettre.B { background: var(--b); box-shadow: 0 0.12em 0 var(--b-fonce); border-radius: 50%; }
/* Chaque lettre a sa forme (carré, rond, feuille) : on les distingue aussi sans les couleurs. */
.lettre.C { background: var(--c); box-shadow: 0 0.12em 0 var(--c-fonce); border-radius: 0.8em 0.22em; }

@keyframes apparaitre { 0% { transform: scale(0) rotate(-12deg); opacity: 0; } 65% { transform: scale(1.14) rotate(4deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@keyframes flotter { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes sauter { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-16px); } 60% { transform: translateY(-16px) rotate(-4deg); } }
@keyframes battre { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(1); } 45% { transform: scale(1.1); } }

/* ===================== Téléphone du participant ===================== */

.participant main { position: relative; z-index: 1; min-height: 100dvh; display: flex; flex-direction: column; }
.participant .ecran {
  flex: 1; display: flex; flex-direction: column; gap: 18px; padding: max(18px, env(safe-area-inset-top)) 18px
    max(22px, env(safe-area-inset-bottom)); max-width: 560px; width: 100%; margin: 0 auto;
}
.participant h1 { font-family: var(--titre); font-weight: 700; font-size: clamp(1.9rem, 8vw, 2.6rem); line-height: 1.05; margin: 6px 0 0; }
.participant h1 em { font-style: normal; color: var(--or-vif); }
.participant .aide { color: var(--texte-2); margin: 0; line-height: 1.45; }

.champ { display: flex; flex-direction: column; gap: 8px; }
.champ label { font-weight: 800; font-size: 0.95rem; }
.champ input {
  border: 2px solid var(--ligne); background: rgba(5, 14, 26, 0.45); border-radius: 16px; padding: 16px 18px;
  font-size: 1.25rem; font-family: var(--titre); outline: none; transition: border-color 0.2s;
}
.champ input:focus { border-color: var(--or-vif); }

.groupe-avatars h2 { font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--texte-2); margin: 6px 0 8px; }
.grille-avatars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choix-avatar {
  border: 2px solid transparent; background: var(--carte); border-radius: 18px; padding: 8px 4px 2px;
  display: grid; place-items: center; transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.choix-avatar svg { width: 100%; max-width: 92px; height: auto; }
.choix-avatar:active { transform: scale(0.95); }
.choix-avatar[aria-pressed="true"] { border-color: var(--or-vif); background: rgba(216, 176, 78, 0.16); transform: translateY(-2px); }

.bas-de-page { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.mention { color: var(--texte-2); font-size: 0.78rem; text-align: center; margin: 0; }
.erreur { color: #FFB3B3; font-weight: 700; min-height: 1.2em; margin: 0; }

.accueil-joueur { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.accueil-joueur .avatar-geant svg { width: min(52vw, 230px); height: auto; animation: flotter 3s ease-in-out infinite; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.35)); }
.badge-prenom { font-family: var(--titre); font-size: 1.5rem; font-weight: 600; background: var(--carte); padding: 8px 18px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--ligne); }
.lien { background: none; border: none; color: var(--texte-2); text-decoration: underline; font-size: 0.95rem; }

.chrono-tel { display: flex; align-items: center; gap: 12px; }
.chrono-tel .secondes { font-family: var(--titre); font-weight: 700; font-size: 2.6rem; min-width: 2ch; text-align: right; font-variant-numeric: tabular-nums; }
.chrono-tel .barre { flex: 1; height: 14px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.chrono-tel .barre i { display: block; height: 100%; background: linear-gradient(90deg, var(--or), var(--or-vif)); border-radius: 99px; transform-origin: left; }
.chrono-tel.urgent .secondes { color: #FF8A8A; animation: battre 1s infinite; }
.chrono-tel.urgent .barre i { background: linear-gradient(90deg, var(--a-fonce), var(--a)); }

.question-tel { margin: 0; font-family: var(--titre); font-weight: 600; font-size: clamp(1.1rem, 4.6vw, 1.4rem); line-height: 1.2; text-align: center; text-wrap: balance; }
.choix-vote { flex: 1; display: grid; grid-template-rows: 1fr 1fr; gap: 14px; }
.bouton-vote {
  border: none; border-radius: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--titre); color: #fff; position: relative; overflow: hidden; transition: transform 0.12s, filter 0.25s, opacity 0.25s;
}
.bouton-vote .grande-lettre { font-size: clamp(5rem, 28vw, 8rem); font-weight: 700; line-height: 1; text-shadow: 0 6px 0 rgba(0, 0, 0, 0.18); }
.bouton-vote .etiquette { font-size: 1.15rem; font-weight: 600; padding: 0 16px; text-align: center; }
.bouton-vote.A { background: radial-gradient(circle at 30% 20%, #FF8A7F, var(--a) 55%, var(--a-fonce)); box-shadow: 0 8px 0 #9E2633; }
.bouton-vote.B { background: radial-gradient(circle at 30% 20%, #5FE0D7, var(--b) 55%, var(--b-fonce)); box-shadow: 0 8px 0 #07605E; }
.bouton-vote.C { background: radial-gradient(circle at 30% 20%, #B9A8FF, var(--c) 55%, var(--c-fonce)); box-shadow: 0 8px 0 #44338F; }
.bouton-vote:active { transform: translateY(5px); }
.bouton-vote.choisi::after {
  content: "✓"; position: absolute; top: 14px; right: 18px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--nuit); font-size: 1.6rem; font-weight: 700;
}
.choix-vote.a-vote .bouton-vote:not(.choisi) { opacity: 0.38; filter: saturate(0.5); }
/* Un seul bouton dans le jeu : un seul grand bouton. Trois réponses : la lettre à gauche et la réponse à droite, pour
   que les réponses longues restent lisibles. */
.choix-vote.une { grid-template-rows: 1fr; }
.choix-vote.trois { grid-template-rows: repeat(3, 1fr); gap: 12px; }
.choix-vote.trois .bouton-vote { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 10px 18px; border-radius: 24px; }
.choix-vote.trois .grande-lettre { flex: none; font-size: clamp(3rem, 15vw, 4.4rem); }
.choix-vote.trois .etiquette { padding: 0; text-align: left; font-size: 1.05rem; line-height: 1.25; }
.choix-vote.trois .bouton-vote.choisi { padding-right: 66px; }
.choix-vote.trois .bouton-vote.choisi::after { top: calc(50% - 22px); right: 14px; }
.statut-vote { text-align: center; margin: 0; font-weight: 700; color: var(--texte-2); min-height: 1.3em; }

.resultat-tel { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.resultat-tel .lettre { font-size: 4.2rem; animation: apparaitre 0.6s cubic-bezier(.2, .9, .3, 1.3) both; }
.resultat-tel h2 { font-family: var(--titre); font-size: 1.9rem; margin: 0; }
.resultat-tel p { margin: 0; color: var(--texte-2); font-size: 1.05rem; line-height: 1.45; max-width: 26ch; }
.resultat-tel .avatar-geant svg { width: 150px; height: auto; animation: sauter 1.2s ease-in-out 2; }
.resultat-tel #resultat-choix { font-weight: 800; color: var(--texte); }
.verdict-tel { font-family: var(--titre); font-weight: 700; font-size: 1.5rem; padding: 8px 20px; border-radius: 999px; animation: apparaitre 0.5s cubic-bezier(.2, .9, .3, 1.3) both; }
.verdict-tel.juste { background: #39D98A; color: #06301B; }
.verdict-tel.pas-cette-fois { background: rgba(255, 255, 255, 0.12); color: var(--texte); box-shadow: inset 0 0 0 1.5px var(--ligne); }
.rang { line-height: 0; animation: apparaitre 0.6s cubic-bezier(.2, .9, .3, 1.3) both; }
.rang svg { width: 96px; height: auto; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35)); }

/* ===================== Écran de l'animateur ===================== */

.animateur { min-height: 100vh; }
.animateur .scene { position: relative; z-index: 1; height: 100vh; display: flex; flex-direction: column; padding: 22px 30px; gap: 18px; overflow: hidden; }
.entete { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.compteurs { display: flex; gap: 10px; flex-wrap: wrap; }
.pastille {
  display: inline-flex; align-items: center; gap: 8px; background: var(--carte); box-shadow: inset 0 0 0 1.5px var(--ligne);
  padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: 1rem;
}
.pastille b { font-family: var(--titre); font-size: 1.25rem; color: var(--or-vif); }

/* Accueil : QR code et équipe qui arrive. */
.accueil { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(320px, 0.9fr) 1.4fr; gap: 34px; align-items: stretch; }
.invitation { display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.invitation h1 { font-family: var(--titre); font-weight: 700; font-size: clamp(2.4rem, 4.4vw, 4.4rem); line-height: 1; margin: 0; }
.invitation h1 em { font-style: normal; color: var(--or-vif); }
.etapes { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: clamp(1rem, 1.5vw, 1.35rem); }
.etapes li { display: flex; gap: 12px; align-items: center; }
.etapes li b { font-family: var(--titre); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--or); color: #1A1406; flex: none; }
.carte-qr {
  background: #fff; color: var(--nuit); border-radius: 26px; padding: 18px 18px 14px; display: flex; flex-direction: column; align-items: center;
  gap: 6px; width: min(100%, 380px, 46vh); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35), 0 0 0 6px rgba(216, 176, 78, 0.35);
}
.carte-qr .qr svg, .carte-qr .qr img { width: 100%; height: auto; display: block; }
.carte-qr .qr { width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.carte-qr .adresse { font-family: var(--titre); font-weight: 700; font-size: clamp(1rem, 1.8vw, 1.6rem); letter-spacing: 0.01em; text-align: center; overflow-wrap: anywhere; }

.equipe { background: rgba(5, 14, 26, 0.35); border-radius: 28px; box-shadow: inset 0 0 0 1.5px var(--ligne); padding: 22px; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.equipe h2 { font-family: var(--titre); font-weight: 600; margin: 0; font-size: 1.5rem; display: flex; justify-content: space-between; align-items: baseline; }
.equipe h2 small { font-family: var(--corps); font-size: 1rem; color: var(--texte-2); font-weight: 600; }
.equipe .foule { flex: 1; }
.foule { display: flex; flex-wrap: wrap; gap: 8px 4px; align-content: flex-start; justify-content: center; overflow: hidden; min-height: 0; }
.personnage { width: var(--taille, 108px); display: flex; flex-direction: column; align-items: center; gap: 2px; animation: apparaitre 0.55s cubic-bezier(.2, .9, .3, 1.3) both; background: none; border: none; padding: 0; color: inherit; }
.personnage svg { width: 100%; height: auto; animation: flotter 3.4s ease-in-out infinite; animation-delay: var(--decalage, 0s); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.3)); }
.personnage .nom {
  font-weight: 800; font-size: calc(var(--taille, 108px) * 0.14); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: rgba(255, 255, 255, 0.92); color: var(--nuit); padding: 2px 9px; border-radius: 999px; margin-top: -10px; position: relative;
}
.personnage.hors-ligne { opacity: 0.4; }
.vide { margin: auto; text-align: center; color: var(--texte-2); font-size: 1.2rem; }
.vide .points span { animation: battre 1.4s infinite; display: inline-block; }
.vide .points span:nth-child(2) { animation-delay: 0.2s; }
.vide .points span:nth-child(3) { animation-delay: 0.4s; }

/* Vote : chrono-cœur et deux arènes qui se remplissent de personnages. */
.vote { flex: 1; display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.vote-tete { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.vote-tete .question { font-family: var(--titre); font-weight: 600; font-size: clamp(1.4rem, 2.6vw, 2.4rem); line-height: 1.1; }
.vote-tete .question.longue { font-size: clamp(1.15rem, 1.9vw, 1.8rem); line-height: 1.15; }
.vote-tete .question small { display: block; font-family: var(--corps); font-size: 0.55em; color: var(--texte-2); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
.vote-tete .participation { justify-self: end; text-align: right; }
.vote-tete .participation b { font-family: var(--titre); font-size: clamp(2.2rem, 4vw, 3.6rem); color: var(--or-vif); display: block; line-height: 1; }
.vote-tete .participation span { color: var(--texte-2); font-weight: 700; }

.chrono { position: relative; width: clamp(130px, 13vw, 190px); aspect-ratio: 1; }
.chrono svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.chrono .piste { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 10; }
.chrono .arc { fill: none; stroke: var(--or-vif); stroke-width: 10; stroke-linecap: round; transition: stroke 0.3s; }
.chrono .coeur { position: absolute; inset: 0; display: grid; place-items: center; }
.chrono .coeur div { display: grid; place-items: center; }
.chrono .coeur svg { width: 72%; transform: none; position: absolute; opacity: 0.9; }
.chrono .coeur b { position: relative; font-family: var(--titre); font-weight: 700; font-size: clamp(2.6rem, 4.6vw, 4.2rem); text-shadow: 0 3px 0 rgba(0, 0, 0, 0.25); font-variant-numeric: tabular-nums; }
.chrono.bat .coeur svg { animation: battre 1s infinite; }
.chrono.urgent .arc { stroke: var(--a); }
.chrono.fini .coeur b { font-size: clamp(1.2rem, 2vw, 1.8rem); }

.arenes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.arene {
  border-radius: 30px; padding: 18px 20px 20px; display: grid; gap: 12px; position: relative; overflow: hidden;
  transition: transform 0.5s cubic-bezier(.2, .9, .3, 1.2), opacity 0.4s, box-shadow 0.4s, filter 0.4s;
}
.arene.A { background: linear-gradient(170deg, rgba(255, 93, 93, 0.3), rgba(255, 93, 93, 0.08) 45%, rgba(10, 20, 36, 0.4)); box-shadow: inset 0 0 0 2px rgba(255, 93, 93, 0.55); }
.arene.B { background: linear-gradient(170deg, rgba(24, 180, 174, 0.32), rgba(24, 180, 174, 0.08) 45%, rgba(10, 20, 36, 0.4)); box-shadow: inset 0 0 0 2px rgba(24, 180, 174, 0.6); }
.arene.C { background: linear-gradient(170deg, rgba(148, 121, 242, 0.32), rgba(148, 121, 242, 0.08) 45%, rgba(10, 20, 36, 0.4)); box-shadow: inset 0 0 0 2px rgba(148, 121, 242, 0.6); }
/* Une seule réponse : une arène au centre. Trois réponses : la lettre et le score en haut, la réponse dessous. */
.arenes.une { grid-template-columns: minmax(0, 760px); justify-content: center; }
.arenes.trois { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.arenes.trois .arene .haut { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px; }
.arenes.trois .arene .haut .etiquette { grid-column: 1 / -1; grid-row: 2; font-size: clamp(1rem, 1.45vw, 1.4rem); }
.arene .haut { display: flex; align-items: center; gap: 14px; }
.arene .haut .lettre { font-size: clamp(2rem, 3.4vw, 3rem); }
.arene .haut .etiquette { font-family: var(--titre); font-weight: 600; font-size: clamp(1.1rem, 1.9vw, 1.7rem); flex: 1; line-height: 1.1; }
.arene .haut .score { text-align: right; font-family: var(--titre); }
.arene .haut .score b { font-size: clamp(2rem, 3.6vw, 3.4rem); display: block; line-height: 1; }
.arene .haut .score span { color: var(--texte-2); font-family: var(--corps); font-weight: 800; }
.jauge { height: 14px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.jauge i { display: block; height: 100%; width: 0; border-radius: 99px; transition: width 0.6s cubic-bezier(.2, .9, .3, 1); }
.arene.A .jauge i { background: linear-gradient(90deg, var(--a-fonce), var(--a)); }
.arene.B .jauge i { background: linear-gradient(90deg, var(--b-fonce), var(--b)); }
.arene.C .jauge i { background: linear-gradient(90deg, var(--c-fonce), var(--c)); }
/* Répartition cachée pendant le vote : un point d'interrogation qui respire. */
.arene.mystere .score b { animation: battre 1.6s ease-in-out infinite; color: var(--texte-2); }
.arene.mystere .jauge i { width: 100% !important; opacity: 0.18; background: repeating-linear-gradient(90deg, #fff 0 12px, transparent 12px 24px); animation: defiler-jauge 1.2s linear infinite; }
@keyframes defiler-jauge { to { background-position: 24px 0; } }
.arene.gagne { transform: scale(1.02); box-shadow: inset 0 0 0 4px var(--or-vif), 0 0 60px rgba(216, 176, 78, 0.45); }
.arene.juste { box-shadow: inset 0 0 0 4px #39D98A, 0 0 50px rgba(57, 217, 138, 0.35); }
.verdict {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: #39D98A; color: #06301B; font-family: var(--titre); font-weight: 700; font-size: clamp(1rem, 1.6vw, 1.35rem);
  animation: apparaitre 0.5s cubic-bezier(.2, .9, .3, 1.3) both;
}
.verdict::before { content: "✓"; }

/* Bonne réponse : l'animateur l'indique après la décision de la salle. */
.correction {
  align-self: center; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 20px;
  background: rgba(5, 14, 26, 0.55); box-shadow: inset 0 0 0 1.5px var(--ligne); font-weight: 800; font-size: 1.1rem;
}
.correction button { border: none; background: none; padding: 0; }
.correction .lettre { font-size: 2rem; transition: transform 0.15s; }
.correction button:hover .lettre { transform: translateY(-3px) scale(1.05); }
.correction .aucune { padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); font-weight: 700; }
.correction .reveler {
  padding: 12px 22px; border-radius: 14px; background: linear-gradient(180deg, #5BE6A0, #2FBF78); color: #06301B;
  font-family: var(--titre); font-weight: 700; font-size: clamp(1.1rem, 1.8vw, 1.5rem); box-shadow: 0 6px 0 #1B7A4B;
}
.correction .reveler .touche { font-family: var(--corps); font-size: 0.7em; opacity: 0.7; margin-left: 10px; }
.correction .reveler:active { transform: translateY(4px); box-shadow: 0 2px 0 #1B7A4B; }
.trouve { align-self: center; font-family: var(--titre); font-weight: 600; font-size: clamp(1.2rem, 2.2vw, 1.9rem); color: #7FF0B5; margin: 0; animation: apparaitre 0.5s cubic-bezier(.2, .9, .3, 1.3) both; }

/* L'équipe pendant le vote : une coche quand on a voté, jamais pour quoi. */
.votants { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; background: rgba(5, 14, 26, 0.3); border-radius: 26px; padding: 12px 16px; box-shadow: inset 0 0 0 1.5px var(--ligne); }
.votants-titre { font-family: var(--titre); font-weight: 600; color: var(--texte-2); font-size: 1.1rem; }
.votants .foule { flex: 1; }
.personnage { position: relative; }
.personnage.a-vote::after {
  content: "✓"; position: absolute; top: 2%; right: 8%; width: 32%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: var(--or-vif); color: #1A1406; font-weight: 900; font-size: calc(var(--taille, 100px) * 0.2); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  animation: apparaitre 0.4s cubic-bezier(.2, .9, .3, 1.3) both;
}
.personnage.vient-de-voter svg { animation: sauter 0.7s ease-out 1; }
.personnage:not(.a-vote) svg { filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.3)) saturate(0.7); }

/* Classement : podium des trois meilleurs, puis la suite. */
.classement { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.classement-tete { text-align: center; }
.classement-tete h1 { font-family: var(--titre); font-weight: 700; font-size: clamp(2.4rem, 4.6vw, 4.4rem); margin: 0; line-height: 1; }
.classement-tete p { margin: 6px 0 0; color: var(--texte-2); font-weight: 700; font-size: clamp(1rem, 1.5vw, 1.25rem); }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: clamp(12px, 2vw, 28px); flex: 1; min-height: 0; }
.marche {
  display: flex; flex-direction: column; align-items: center; gap: 2px; width: clamp(140px, 17vw, 240px);
  animation: monter 0.9s cubic-bezier(.2, .9, .3, 1.2) both;
}
@keyframes monter { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.marche .medaille { line-height: 0; animation: balancer 2.6s ease-in-out infinite; transform-origin: 50% 0; }
.marche .medaille svg { width: clamp(40px, 7.5vh, 76px); height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); }
@keyframes balancer { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.marche svg { width: min(64%, 17vh); height: auto; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.4)); }
.marche.place-1 svg { width: min(76%, 21vh); animation: sauter 1.4s ease-in-out infinite 2.4s; }
.marche .nom { font-family: var(--titre); font-weight: 700; font-size: clamp(1.2rem, 2vw, 1.8rem); background: #fff; color: var(--nuit); padding: 2px 14px; border-radius: 999px; margin-top: -14px; position: relative; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marche .socle {
  width: 100%; margin-top: 8px !important; display: grid; place-items: center; font-family: var(--titre); font-weight: 700; font-size: clamp(2.4rem, 4vw, 3.6rem);
  color: rgba(255, 255, 255, 0.85); border-radius: 18px 18px 6px 6px; margin-top: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)); box-shadow: inset 0 0 0 2px var(--ligne);
}
.marche.place-1 .socle { height: clamp(64px, 13vh, 150px); background: linear-gradient(180deg, var(--or-vif), var(--or)); color: #1A1406; box-shadow: 0 0 50px rgba(216, 176, 78, 0.45); }
.marche.place-2 .socle { height: clamp(46px, 9vh, 110px); background: linear-gradient(180deg, #E3E7EE, #A8B2C1); color: #1C2533; }
.marche.place-3 .socle { height: clamp(32px, 6vh, 80px); background: linear-gradient(180deg, #E2A36A, #B0703C); color: #2A160A; }
.bravo { margin: 0 0 10px; font-family: var(--titre); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2.4rem); color: var(--or-vif); }

.bandeau-resultat {
  justify-self: center; display: flex; align-items: center; gap: 16px; padding: 14px 30px; border-radius: 999px;
  background: linear-gradient(180deg, var(--or-vif), var(--or)); color: #1A1406; font-family: var(--titre); font-weight: 700;
  font-size: clamp(1.4rem, 2.8vw, 2.4rem); box-shadow: 0 8px 0 #6E5618, 0 20px 40px rgba(0, 0, 0, 0.4);
  animation: apparaitre 0.6s cubic-bezier(.2, .9, .3, 1.3) both;
}
.bandeau-resultat .lettre { font-size: 0.9em; }
.consigne-animateur { align-self: center; color: var(--texte-2); font-weight: 700; margin: 0; }

.historique { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--texte-2); font-weight: 700; }
.historique .puce { display: inline-flex; gap: 6px; align-items: center; background: var(--carte); border-radius: 999px; padding: 4px 10px 4px 4px; box-shadow: inset 0 0 0 1px var(--ligne); }
.historique .puce .lettre { font-size: 0.8rem; }

/* Commandes de l'animateur, en bas : discrètes à l'écran projeté. */
.commandes {
  position: fixed; right: 14px; bottom: 14px; z-index: 5; display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; justify-content: flex-end; max-width: calc(100vw - 28px);
  background: rgba(8, 18, 32, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 8px 10px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 0 0 1px var(--ligne);
  transition: opacity 0.4s, transform 0.4s;
}
.commandes.cachees { opacity: 0; transform: translateY(20px); pointer-events: none; }
.commandes button, .commandes select, .commandes input { border: none; border-radius: 12px; padding: 10px 14px; background: rgba(255, 255, 255, 0.08); font-weight: 700; font-size: 0.95rem; }
.commandes input:not([type="checkbox"]) { width: 100%; background: rgba(255, 255, 255, 0.1); }
.menu-plus .liste .etiquettes { display: grid; gap: 6px; padding: 6px 12px 10px; }
.menu-plus .liste .etiquettes span { font-size: 0.8rem; color: var(--texte-2); font-weight: 700; }
.commandes input::placeholder { color: var(--texte-2); }
.commandes .principal { background: linear-gradient(180deg, var(--or-vif), var(--or)); color: #1A1406; font-family: var(--titre); font-size: 1.05rem; }
.commandes .touche { font-size: 0.75rem; opacity: 0.7; margin-left: 4px; }
.commandes select { appearance: none; padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.commandes .separateur { width: 1px; height: 26px; background: var(--ligne); }
.commandes #question-suivante { max-width: min(340px, 40vw); text-overflow: ellipsis; }
.menu-plus { position: relative; }
.menu-plus .liste {
  position: absolute; bottom: calc(100% + 10px); right: 0; background: #0B1A2D; border-radius: 16px; padding: 8px; min-width: 270px;
  display: flex; flex-direction: column; gap: 4px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 0 0 1px var(--ligne);
  /* Fenêtre basse : le menu défile au lieu de dépasser en haut de l'écran. */
  max-height: calc(100vh - 200px); overflow-y: auto; overscroll-behavior: contain;
}
.menu-plus .liste button, .menu-plus .liste label { text-align: left; background: none; padding: 10px 12px; border-radius: 10px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.menu-plus .liste button:hover, .menu-plus .liste label:hover { background: rgba(255, 255, 255, 0.07); }
.menu-plus .liste .danger { color: #FFB3B3; }
/* Second clic attendu pour confirmer (voir confirmTwice). */
.commandes button.a-confirmer, .tc-grille button.a-confirmer { background: var(--a-fonce); color: #fff; }

.porte { position: relative; z-index: 2; min-height: 100vh; display: grid; place-items: center; }
.porte form { background: var(--carte); padding: 28px; border-radius: 24px; display: flex; flex-direction: column; gap: 14px; width: min(92vw, 380px); box-shadow: inset 0 0 0 1.5px var(--ligne); }

.bulle-retirer {
  position: fixed; z-index: 8; background: #0B1A2D; border-radius: 14px; padding: 10px; display: flex; gap: 8px; align-items: center;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5), inset 0 0 0 1px var(--ligne); font-weight: 700;
}
.bulle-retirer button { border: none; border-radius: 10px; padding: 8px 12px; background: var(--a-fonce); color: #fff; font-weight: 800; }
.bulle-retirer button.non { background: rgba(255, 255, 255, 0.1); }

canvas.confettis { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; }

/* Fenêtre étroite (posée à côté du jeu) : tout s'empile. */
@media (max-width: 820px) {
  .animateur .scene { padding: 14px 14px 120px; gap: 12px; }
  .accueil { grid-template-columns: 1fr; gap: 16px; }
  .invitation { align-items: center; text-align: center; }
  .invitation .etapes { display: none; }
  .carte-qr { width: min(100%, 300px); }
  .vote-tete { grid-template-columns: auto 1fr; }
  .vote-tete .question { grid-column: 1 / -1; order: -1; }
  .arenes { gap: 10px; }
  .arene { padding: 12px 14px; border-radius: 22px; }
  .arene .haut .etiquette { font-size: 1rem; }
  .correction { flex-wrap: wrap; justify-content: center; }
  .podium { gap: 8px; }
  .marche { width: 31%; }

  .carte-qr { width: min(100%, 300px, 34vh); }
  .marque span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .ecg { display: none; }
}

/* ===================== Vote sans chrono ===================== */

/* Le cœur bat et son anneau se remplit à mesure que la salle vote. */
.chrono.libre .coeur b { font-size: clamp(1.2rem, 2vw, 1.8rem); }
.chrono.libre .arc { stroke: #39D98A; transition: stroke-dashoffset 0.5s ease; }

/* ===================== Massage en rythme (écran projeté) ===================== */

.massage { flex: 1; display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.metronome { justify-self: center; display: grid; justify-items: center; gap: 4px; }
.metronome svg { width: clamp(84px, 9vw, 130px); fill: var(--a); filter: drop-shadow(0 0 22px rgba(255, 93, 93, 0.55)); animation: pulsation 0.545s ease-out infinite; }
.metronome span { font-weight: 800; color: var(--texte-2); }
/* Un battement franc puis un repos : 110 par minute (0,545 s). */
@keyframes pulsation { 0% { transform: scale(1.14); } 30% { transform: scale(0.94); } 100% { transform: scale(0.94); } }

.cadran {
  display: grid; justify-items: center; gap: 14px; padding: 18px 28px 22px; border-radius: 30px;
  background: rgba(5, 14, 26, 0.35); box-shadow: inset 0 0 0 1.5px var(--ligne);
}
.cadran-valeur { display: flex; align-items: baseline; gap: 14px; }
.cadran-valeur b { font-family: var(--titre); font-weight: 700; font-size: clamp(4rem, 9vw, 8rem); line-height: 1; font-variant-numeric: tabular-nums; transition: color 0.3s; }
.cadran-valeur span { color: var(--texte-2); font-weight: 800; font-size: clamp(1rem, 1.6vw, 1.4rem); }
.cadran-piste {
  position: relative; width: min(100%, 980px); height: 30px; border-radius: 99px;
  background: linear-gradient(90deg, rgba(216, 176, 78, 0.4), rgba(255, 255, 255, 0.08) 40%, rgba(255, 255, 255, 0.08) 60%, rgba(216, 176, 78, 0.4));
  box-shadow: inset 0 0 0 1.5px var(--ligne);
}
.zone-verte { position: absolute; left: 40%; width: 20%; top: -6px; bottom: -6px; border-radius: 12px; background: rgba(57, 217, 138, 0.3); box-shadow: inset 0 0 0 2px #39D98A; }
.cadran-piste .repere { position: absolute; top: calc(100% + 10px); transform: translateX(-50%); font-weight: 800; color: var(--texte-2); }
.cadran-piste .curseur {
  position: absolute; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 0 6px rgba(255, 255, 255, 0.16); transition: left 0.45s cubic-bezier(.2, .9, .3, 1), background 0.3s, opacity 0.3s;
}
.cadran[data-zone="juste"] .curseur { background: #39D98A; }
.cadran[data-zone="lent"] .curseur, .cadran[data-zone="rapide"] .curseur { background: var(--or-vif); }
.cadran[data-zone="attente"] .curseur { opacity: 0.35; }
.cadran[data-zone="juste"] .cadran-valeur b, .cadran[data-zone="juste"] .cadran-conseil { color: #7FF0B5; }
.cadran-conseil { margin: 22px 0 0; font-family: var(--titre); font-weight: 600; font-size: clamp(1.3rem, 2.4vw, 2.1rem); text-align: center; }

.bilan-massage { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 10px; animation: apparaitre 0.6s cubic-bezier(.2, .9, .3, 1.3) both; }
.bilan-massage h2 { font-family: var(--titre); font-weight: 700; font-size: clamp(2rem, 4vw, 3.4rem); margin: 0; color: var(--or-vif); }
.bilan-chiffres { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.bilan-chiffres div { display: grid; justify-items: center; min-width: 170px; padding: 14px 20px; border-radius: 22px; background: var(--carte); box-shadow: inset 0 0 0 1.5px var(--ligne); }
.bilan-chiffres b { font-family: var(--titre); font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; }
.bilan-chiffres span { color: var(--texte-2); font-weight: 700; }
.bilan-massage p { margin: 0; font-size: clamp(1.1rem, 1.8vw, 1.5rem); font-weight: 700; }

/* Qui masse en ce moment : un petit cœur qui bat, jamais son rythme. */
.personnage.masse::after {
  content: "♥"; position: absolute; top: 2%; right: 8%; width: 32%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: var(--a); color: #fff; font-size: calc(var(--taille, 100px) * 0.18); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  animation: pulsation 0.545s ease-out infinite;
}
.personnage.masse svg { filter: drop-shadow(0 0 14px rgba(255, 93, 93, 0.5)); }

/* ===================== Massage en rythme (téléphone) ===================== */

.massage-tel-tete { display: grid; gap: 8px; justify-items: center; text-align: center; }
.pastille-massage { font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; color: #1A1406; background: var(--or-vif); padding: 4px 12px; border-radius: 999px; }
.massage-tel-tete p { margin: 0; font-family: var(--titre); font-weight: 600; font-size: clamp(1.2rem, 5vw, 1.5rem); text-wrap: balance; }
.pave-massage {
  flex: 1; min-height: 220px; border: none; border-radius: 36px; display: grid; place-items: center; align-content: center; gap: 10px;
  background: radial-gradient(circle at 50% 40%, #FF8A7F, var(--a) 55%, var(--a-fonce)); box-shadow: 0 10px 0 #9E2633, 0 20px 40px rgba(0, 0, 0, 0.35);
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
.pave-massage svg { width: min(46vw, 200px); fill: #fff; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.15)); pointer-events: none; }
.pave-massage span { font-family: var(--titre); font-weight: 600; font-size: 1.2rem; color: #fff; pointer-events: none; }
.pave-massage.appui { animation: comprimer 0.18s ease-out; }
@keyframes comprimer { 35% { transform: translateY(8px) scale(0.96); box-shadow: 0 2px 0 #9E2633, 0 8px 16px rgba(0, 0, 0, 0.3); } }
.mon-rythme { display: grid; gap: 10px; justify-items: center; text-align: center; }
.mon-rythme .valeur { display: flex; align-items: baseline; gap: 8px; }
.mon-rythme .valeur b { font-family: var(--titre); font-size: 3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.mon-rythme .valeur span { color: var(--texte-2); font-weight: 800; }
.piste-rythme { position: relative; width: 100%; height: 16px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); }
.piste-rythme .zone-verte { top: -4px; bottom: -4px; border-radius: 8px; }
.piste-rythme i { position: absolute; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); transition: left 0.25s ease, background 0.2s, opacity 0.2s; }
.mon-rythme[data-zone="juste"] .piste-rythme i { background: #39D98A; }
.mon-rythme[data-zone="juste"] .valeur b, .mon-rythme[data-zone="juste"] p { color: #7FF0B5; }
.mon-rythme[data-zone="lent"] .piste-rythme i, .mon-rythme[data-zone="rapide"] .piste-rythme i { background: var(--or-vif); }
.mon-rythme[data-zone="attente"] .piste-rythme i { opacity: 0.35; }
.mon-rythme p { margin: 0; font-weight: 800; font-size: 1.1rem; min-height: 1.4em; }
.bilan-tel { flex: 1; display: grid; place-content: center; text-align: center; gap: 10px; animation: apparaitre 0.6s cubic-bezier(.2, .9, .3, 1.3) both; }
.bilan-tel h2 { font-family: var(--titre); font-size: 2rem; margin: 0; color: var(--or-vif); }
.bilan-tel p { margin: 0; color: var(--texte-2); font-size: 1.1rem; line-height: 1.45; }

/* ===================== QR code de la télécommande (écran projeté, sur demande) ===================== */

.voile { position: fixed; inset: 0; z-index: 9; display: grid; place-items: center; padding: 20px; background: rgba(5, 12, 22, 0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.fenetre-telecommande {
  width: min(440px, 100%); background: #0B1A2D; border-radius: 26px; padding: 24px; display: grid; gap: 14px; justify-items: center; text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 0 0 1px var(--ligne);
}
.fenetre-telecommande h2 { font-family: var(--titre); margin: 0; font-size: 1.5rem; }
.fenetre-telecommande p { margin: 0; color: var(--texte-2); line-height: 1.4; }
.fenetre-telecommande .alerte { color: #FFD48A; font-weight: 800; }
.carte-qr.petite { width: min(100%, 260px); }

/* ===================== Télécommande (téléphone de l'animateur) ===================== */

.telecommande .tc {
  position: relative; z-index: 1; min-height: 100dvh; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px;
  padding: max(16px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}
.tc-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tc-tete .marque span { text-transform: none; letter-spacing: 0; font-size: 0.9rem; }
.tc-liaison { font-weight: 800; font-size: 0.85rem; padding: 6px 12px; border-radius: 999px; background: rgba(57, 217, 138, 0.16); color: #7FF0B5; white-space: nowrap; }
.tc-liaison.perdue { background: rgba(255, 93, 93, 0.18); color: #FFB3B3; }
.tc-etat {
  flex: 1; min-height: 220px; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 20px;
  border-radius: 28px; background: rgba(5, 14, 26, 0.4); box-shadow: inset 0 0 0 1.5px var(--ligne);
}
.tc-phase { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--or-vif); }
.tc-etat h1 { margin: 0; font-family: var(--titre); font-weight: 600; font-size: clamp(1.4rem, 6vw, 2rem); line-height: 1.15; }
.tc-etat h1:empty { display: none; }
.tc-etat p { margin: 0; color: var(--texte-2); font-weight: 700; font-size: 1.05rem; }
.tc-etat p:empty { display: none; }
.tc-etat[data-zone="juste"] h1 { color: #7FF0B5; }
.tc-etat[data-zone="lent"] h1, .tc-etat[data-zone="rapide"] h1 { color: var(--or-vif); }
.tc-decision { display: flex; align-items: center; gap: 16px; }
.tc-decision .lettre { font-size: 3.4rem; flex: none; }
.tc-decision .lettre.egalite { background: rgba(255, 255, 255, 0.14); }
.tc-decision b { display: block; font-family: var(--titre); font-size: 1.6rem; line-height: 1.1; }
.tc-decision span { color: var(--texte-2); font-weight: 700; }
/* Après le vote, la consigne pour le jeu passe en premier. */
.tc-etat .tc-phase { order: -2; }
.tc-etat .tc-decision { order: -1; }
.tc-reponses { display: grid; gap: 10px; }
.tc-reponse { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: rgba(255, 255, 255, 0.05); transition: box-shadow 0.3s; }
.tc-reponse .lettre { font-size: 1.6rem; }
.tc-reponse .tc-texte { display: block; font-weight: 700; line-height: 1.2; margin-bottom: 6px; }
.tc-barre { display: block; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.tc-barre i { display: block; height: 100%; width: 0; border-radius: 99px; transition: width 0.4s ease; }
#tc-reponse-A .tc-barre i { background: var(--a); }
#tc-reponse-B .tc-barre i { background: var(--b); }
#tc-reponse-C .tc-barre i { background: var(--c); }
/* ⇅ entre deux lignes : le jeu tire l'ordre des réponses au hasard, on aligne A sur la réponse du haut. */
.tc-echanger {
  justify-self: center; margin: -4px 0; border: none; border-radius: 999px; padding: 6px 14px;
  background: rgba(255, 255, 255, 0.1); color: var(--texte); font-weight: 800; font-size: 0.9rem;
}
.tc-reponse b { font-family: var(--titre); font-size: 1.15rem; white-space: nowrap; }
.tc-reponse.gagne { box-shadow: inset 0 0 0 2px var(--or-vif); }
.tc-reponse.juste { box-shadow: inset 0 0 0 2px #39D98A; }
.tc-bonne { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 800; }
.tc-bonne button { border: none; background: none; padding: 0; }
.tc-bonne .lettre { font-size: 2.2rem; }
.tc-bonne .aucune { padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.1); font-weight: 800; }
.tc-principal, .tc-second { border: none; border-radius: 22px; font-family: var(--titre); font-weight: 700; transition: transform 0.1s; }
.tc-principal {
  min-height: 96px; padding: 16px; font-size: 1.6rem; color: #1A1406;
  background: linear-gradient(180deg, var(--or-vif), var(--or)); box-shadow: 0 8px 0 #6E5618, 0 16px 30px rgba(0, 0, 0, 0.35);
}
.tc-principal[data-ton="vert"] { background: linear-gradient(180deg, #5BE6A0, #2FBF78); color: #06301B; box-shadow: 0 8px 0 #1B7A4B, 0 16px 30px rgba(0, 0, 0, 0.35); }
.tc-principal[data-ton="corail"] { background: linear-gradient(180deg, #FF8A7F, var(--a-fonce)); color: #fff; box-shadow: 0 8px 0 #9E2633, 0 16px 30px rgba(0, 0, 0, 0.35); }
.tc-principal[data-ton="neutre"] { background: linear-gradient(180deg, #E8EEF6, #B9C6D8); color: var(--nuit); box-shadow: 0 8px 0 #6F7A88, 0 16px 30px rgba(0, 0, 0, 0.35); }
.tc-principal:active, .tc-second:active { transform: translateY(5px); }
.tc-second { min-height: 60px; font-size: 1.15rem; background: var(--carte); color: var(--texte); box-shadow: inset 0 0 0 1.5px var(--ligne); }
.tc-etape {
  display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; gap: 8px; padding: 8px; border-radius: 20px;
  background: rgba(5, 14, 26, 0.4); box-shadow: inset 0 0 0 1.5px var(--ligne);
}
.tc-etape button { height: 56px; border: none; border-radius: 14px; background: rgba(255, 255, 255, 0.1); font-size: 1.8rem; font-weight: 700; }
.tc-etape button:disabled { opacity: 0.3; }
.tc-etape small { display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--texte-2); }
.tc-etape span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700; line-height: 1.25; }
.tc-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tc-grille button, .tc-duree { min-height: 54px; border: none; border-radius: 16px; background: var(--carte); box-shadow: inset 0 0 0 1.5px var(--ligne); font-weight: 800; }
.tc-grille button:disabled { opacity: 0.4; }
.tc-duree { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px; }
.tc-duree span { color: var(--texte-2); }
.tc-duree select { border: none; background: transparent; color: var(--texte); font: inherit; font-weight: 800; text-align: right; }

@media (max-width: 820px) {
  .cadran { padding: 14px 16px 18px; }
  .cadran-valeur b { font-size: 3.6rem; }
  .cadran-piste { height: 22px; }
  .cadran-piste .curseur { width: 34px; height: 34px; margin: -17px 0 0 -17px; }
  .metronome svg { width: 72px; }
  .bilan-chiffres div { min-width: 120px; padding: 10px 14px; }
}

/* ===================== Mode jeu (essai) : le jeu à gauche, le vote à droite ===================== */

.mode-jeu { overflow: hidden; }
.jeu { position: fixed; inset: 0; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) clamp(250px, 23vw, 360px); }
.jeu-cadre { background: #000; min-width: 0; min-height: 0; }
.jeu-cadre iframe { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.jeu-colonne {
  display: flex; flex-direction: column; gap: 12px; padding: 14px; min-height: 0; overflow: hidden;
  background: linear-gradient(180deg, var(--nuit), var(--nuit-2)); box-shadow: -1px 0 0 var(--ligne);
}
.jeu-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.jeu-tete .marque img { width: 36px; height: 36px; padding: 4px; border-radius: 11px; }
.jeu-tete .pastille { padding: 6px 10px; font-size: 0.85rem; }
.jeu-etat { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; text-align: center; }
.jeu-etat .petit { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; color: var(--or-vif); font-size: 0.78rem; }
.jeu-etat h2 { font-family: var(--titre); font-weight: 600; font-size: clamp(1.1rem, 1.6vw, 1.5rem); line-height: 1.2; margin: 0; text-wrap: balance; }
.jeu-etat .grand { font-family: var(--titre); font-weight: 700; font-size: clamp(2.4rem, 4.4vw, 4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.jeu-etat .aide { color: var(--texte-2); font-weight: 700; margin: 0; }
.jeu-etat .lettre { font-size: clamp(3rem, 5.5vw, 4.6rem); }
.jeu-barre { width: 100%; height: 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.jeu-barre i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--or), var(--or-vif)); transition: width 0.4s ease; }
.jeu-chrono { font-family: var(--titre); font-weight: 700; font-size: 1.4rem; color: var(--or-vif); }
.jeu-verdict { margin-top: 6px; padding: 6px 14px; border-radius: 999px; background: #39D98A; color: #06301B; font-family: var(--titre); font-weight: 700; }
.jeu-etat .piste-rythme { width: 100%; }
.jeu-etat[data-zone="juste"] .grand, .jeu-etat[data-zone="juste"] .jeu-conseil { color: #7FF0B5; }
.jeu-etat[data-zone="juste"] .piste-rythme i { background: #39D98A; }
.jeu-etat[data-zone="lent"] .piste-rythme i, .jeu-etat[data-zone="rapide"] .piste-rythme i { background: var(--or-vif); }
.jeu-etat[data-zone="attente"] .piste-rythme i { opacity: 0.35; }
.jeu-conseil { margin: 4px 0 0; font-family: var(--titre); font-weight: 600; font-size: 1.15rem; }
.jeu-metronome svg { width: 64px; }
.jeu-podium { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border-radius: 14px; background: var(--carte); font-family: var(--titre); font-weight: 600; font-size: 1.15rem; }
.jeu-podium svg { flex: none; width: 30px; height: auto; }
.jeu-rejoindre { display: grid; justify-items: center; gap: 4px; padding: 10px; border-radius: 18px; background: #fff; color: var(--nuit); }
.jeu-rejoindre .qr { width: 100%; max-width: 120px; }
.jeu-rejoindre.grand .qr { max-width: 230px; }
.jeu-rejoindre .qr svg { display: block; width: 100%; height: auto; }
.jeu-rejoindre span { font-family: var(--titre); font-weight: 700; font-size: 0.9rem; text-align: center; overflow-wrap: anywhere; }
.jeu-outils { display: flex; flex-wrap: wrap; gap: 6px; }
.jeu-outils button, .jeu-outils a {
  border: none; border-radius: 10px; padding: 7px 10px; background: rgba(255, 255, 255, 0.08); color: var(--texte);
  font-weight: 700; font-size: 0.78rem; text-decoration: none;
}
.jeu-outils button[aria-pressed="true"] { background: var(--or); color: #1A1406; }
.menu-plus .liste a { padding: 10px 12px; border-radius: 10px; font-weight: 700; color: var(--texte); text-decoration: none; }
.menu-plus .liste a:hover { background: rgba(255, 255, 255, 0.07); }

/* Mode jeu : écran de contrôle (état de la salle, gros bouton, déroulé du jeu). */
.jeu-etat { flex: none; justify-content: flex-start; padding: 4px 0; }
.jeu-etat .question-jeu { font-size: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.jeu-actions { display: grid; gap: 8px; }
.jeu-actions .tc-principal { min-height: 58px; padding: 10px 12px; font-size: 1.15rem; border-radius: 16px; }
.jeu-actions .tc-second { min-height: 42px; font-size: 0.95rem; border-radius: 14px; }
.jeu-actions .tc-bonne { justify-content: center; gap: 8px; }
.jeu-actions .tc-bonne .lettre { font-size: 1.5rem; }
.jeu-deroule { flex: 1; min-height: 70px; display: flex; flex-direction: column; gap: 6px; }
.jeu-deroule h3 { margin: 0; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--texte-2); font-weight: 800; }
.jeu-deroule ol { list-style: none; margin: 0; padding: 0; min-height: 0; overflow-y: auto; display: grid; gap: 4px; align-content: start; overscroll-behavior: contain; }
.jeu-deroule .astuce { color: var(--texte-2); font-size: 0.85rem; line-height: 1.35; }
.etape button {
  width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; border: none; border-radius: 10px; padding: 6px 8px;
  background: rgba(255, 255, 255, 0.05); color: var(--texte-2); font-weight: 700; font-size: 0.82rem;
}
.etape .marque-etape {
  flex: none; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1);
  color: var(--texte); font-family: var(--titre); font-size: 0.8rem;
}
.etape .marque-etape.juste { background: #39D98A; color: #06301B; }
.etape .texte-etape { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etape .badge-etape { flex: none; font-size: 0.68rem; padding: 2px 7px; border-radius: 999px; background: var(--or); color: #1A1406; }
.etape.faite button { opacity: 0.7; }
.etape.en-cours button { background: rgba(216, 176, 78, 0.18); color: var(--texte); box-shadow: inset 0 0 0 1.5px var(--or-vif); }
.etape.suivante button { color: var(--texte); box-shadow: inset 0 0 0 1px var(--ligne); }
.jeu-rejoindre.grand .qr { max-width: 180px; }
.jeu-rejoindre .qr { max-width: 96px; }
.jeu-outils select { border: none; border-radius: 10px; padding: 7px 10px; background: rgba(255, 255, 255, 0.08); color: var(--texte); font: inherit; font-weight: 700; font-size: 0.78rem; }
.jeu-outils button:disabled { opacity: 0.4; }
.jeu-outils button.a-confirmer { background: var(--a-fonce); color: #fff; }

/* Colonne du mode jeu : compacte, pour laisser de la place au déroulé (écrans de 720 à 1080 pixels de haut). */
.jeu-deroule ol { overflow-x: hidden; position: relative; }
.jeu-etat .grand { font-size: clamp(2rem, 3.8vw, 3.4rem); }
.jeu-etat .lettre { font-size: clamp(2.4rem, 4.2vw, 3.8rem); }
.jeu-metronome svg { width: 48px; }
.jeu-rejoindre:not(.grand) { grid-template-columns: 64px minmax(0, 1fr); align-items: center; justify-items: start; padding: 6px 10px; }
.jeu-rejoindre:not(.grand) .qr { max-width: 64px; }
.jeu-rejoindre:not(.grand) span { font-size: 0.8rem; text-align: left; }
@media (max-height: 820px) {
  .jeu-colonne { gap: 8px; padding: 10px 12px; }
  .jeu-actions .tc-principal { min-height: 48px; font-size: 1.05rem; }
  .jeu-actions .tc-second { min-height: 36px; }
  .jeu-rejoindre.grand .qr { max-width: 150px; }
}

/* Écran général : les réponses dans l'ordre affiché (comme sur les téléphones) et ⇅ pour suivre l'ordre du jeu. */
.jeu-reponses { list-style: none; margin: 2px 0 0; padding: 0; width: 100%; display: grid; gap: 4px; text-align: left; }
.jeu-reponses li {
  display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.05); font-weight: 700; font-size: 0.82rem; line-height: 1.2;
}
.jeu-etat .jeu-reponses .lettre { flex: none; font-size: 0.9rem; }
.jeu-reponses li span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jeu-echanges {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px;
  font-size: 0.75rem; font-weight: 700; color: var(--texte-2);
}
.jeu-echanges button {
  border: none; border-radius: 999px; padding: 4px 10px; background: rgba(255, 255, 255, 0.1); color: var(--texte);
  font-weight: 800; font-size: 0.78rem;
}
.jeu-echanges button:hover { background: rgba(255, 255, 255, 0.18); }
