/* ===========================================================
   LE GRAND QUIZ DU COUPLE — décor de plateau télé
   =========================================================== */
body.quiz {
  --p0: #ff4f86;
  --p1: #ffc94d;
  --t: #8f7bff;
  --ok: #3ee07f;
  --ko: #ff4d5e;
  --or: #ffcf5a;
  --nuit: #0b0820;
  background: radial-gradient(900px 500px at 50% 0%, #2a1a5e 0%, transparent 70%), radial-gradient(700px 400px at 50% 110%, #3a0f3a 0%, transparent 70%), var(--nuit);
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Décor : projecteurs, public, sol ---------- */
.studio-fond { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.faisceau {
  position: absolute;
  top: -10%;
  width: 46vmax;
  height: 120vh;
  transform-origin: 50% 0;
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%);
  filter: blur(6px);
  mix-blend-mode: screen;
}
.faisceau.f1 { left: -12vmax; background: linear-gradient(to bottom, rgba(143, 123, 255, 0.35), transparent 80%); animation: balaye 9s ease-in-out infinite alternate; }
.faisceau.f2 { left: calc(50% - 23vmax); background: linear-gradient(to bottom, rgba(255, 207, 90, 0.22), transparent 75%); animation: balaye 7s ease-in-out -3s infinite alternate-reverse; }
.faisceau.f3 { right: -12vmax; background: linear-gradient(to bottom, rgba(255, 79, 134, 0.35), transparent 80%); animation: balaye 10s ease-in-out -5s infinite alternate-reverse; }
@keyframes balaye { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
.public {
  position: absolute;
  left: 0; right: 0; bottom: 18vh;
  height: 30vh;
  background-image: radial-gradient(circle, rgba(255, 220, 160, 0.5) 0 1.2px, transparent 2px);
  background-size: 22px 18px;
  -webkit-mask-image: linear-gradient(to top, #000, transparent);
  mask-image: linear-gradient(to top, #000, transparent);
  opacity: 0.25;
  animation: scintille 3s steps(3) infinite;
}
@keyframes scintille { 50% { opacity: 0.4; background-position: 11px 0; } }
.sol {
  position: absolute;
  left: -50%; right: -50%; bottom: -2vh;
  height: 32vh;
  background:
    repeating-linear-gradient(90deg, rgba(143, 123, 255, 0.35) 0 2px, transparent 2px 70px),
    repeating-linear-gradient(0deg, rgba(143, 123, 255, 0.35) 0 2px, transparent 2px 50px),
    linear-gradient(to top, rgba(255, 79, 134, 0.25), transparent);
  transform: perspective(300px) rotateX(62deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 20%, transparent);
  mask-image: linear-gradient(to top, #000 20%, transparent);
  animation: sol-defile 4s linear infinite;
}
@keyframes sol-defile { to { background-position: 0 0, 0 50px, 0 0; } }
.fx-canvas#fx { z-index: 60; }

/* ---------- Écrans ---------- */
.ecran {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(12px + env(safe-area-inset-top)) 14px calc(12px + env(safe-area-inset-bottom));
}
.plateau, .fin { height: 100vh; height: 100dvh; }
.site-presentation { position: relative; z-index: 1; padding: 30px 20px 60px; }
.site-presentation .liens { margin-top: 24px; font-size: 0.9rem; }
.ecran.jeu:not([hidden]) ~ .site-presentation { display: none; }

/* ---------- Réglages ---------- */
.reglages { gap: 18px; justify-content: center; }
.reglages .back-to-site { margin-bottom: auto; }
.marque { text-align: center; }
.logo-emission {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 30px 12px;
  border-radius: 24px;
  background: linear-gradient(180deg, #2b1f6b, #150f3a);
  border: 2px solid var(--or);
  box-shadow: 0 0 0 4px rgba(255, 207, 90, 0.15), 0 0 50px rgba(143, 123, 255, 0.5), inset 0 0 30px rgba(143, 123, 255, 0.4);
  transform: rotate(-2deg);
  animation: logo-flotte 4s ease-in-out infinite;
}
.logo-emission span { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.3em; color: var(--or); text-transform: uppercase; }
.logo-emission b {
  font-size: clamp(3rem, 15vw, 4.4rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff 0%, #ffe7a3 45%, #ffb43a 55%, #ff7a2e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 #7a2e10) drop-shadow(0 0 16px rgba(255, 180, 58, 0.6));
}
.logo-emission span:last-child { font-family: var(--serif); font-style: italic; font-size: 1.3rem; letter-spacing: 0.04em; text-transform: none; color: #ff8fb4; }
@keyframes logo-flotte { 50% { transform: rotate(-2deg) translateY(-5px); } }
.sous-titre { color: #b9b0dd; margin: 14px auto 0; max-width: 360px; font-size: 0.95rem; }

.panneau {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(21, 16, 54, 0.82);
  border: 1px solid rgba(143, 123, 255, 0.3);
  box-shadow: 0 30px 80px -30px rgba(143, 123, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: auto;
}
.candidats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.candidat { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.perso-apercu { width: 84px; height: 96px; border-radius: 50% 50% 18px 18px; background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.12), transparent 70%); overflow: hidden; }
.look { display: flex; gap: 4px; }
.look button { font-size: 0.7rem; padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.05); color: #cfc7f2; cursor: pointer; }
.candidat .champ { width: 100%; }
.deux-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.champ { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.etiquette { display: flex; align-items: center; gap: 8px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #a79fd0; }
.pastille { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.pastille.p0 { background: var(--p0); box-shadow: 0 0 10px var(--p0); }
.pastille.p1 { background: var(--p1); box-shadow: 0 0 10px var(--p1); }
.champ input { width: 100%; min-width: 0; padding: 11px 12px; border-radius: 12px; border: 1px solid rgba(143, 123, 255, 0.35); background: rgba(11, 8, 32, 0.8); color: var(--text); font: inherit; }
.champ input:focus { outline: none; border-color: var(--or); box-shadow: 0 0 0 3px rgba(255, 207, 90, 0.2); }
.lien-mini { margin-left: auto; background: none; border: 0; color: var(--or); font-size: 0.74rem; text-transform: none; letter-spacing: 0; cursor: pointer; padding: 0; }
.puces { display: flex; flex-wrap: wrap; gap: 7px; }
.puce { --c: var(--t); padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.03); color: #a79fd0; font-size: 0.84rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.puce[aria-pressed="true"] { color: #fff; border-color: var(--c); background: color-mix(in srgb, var(--c) 24%, transparent); box-shadow: 0 0 16px -4px var(--c); }
.segments { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 12px; background: rgba(11, 8, 32, 0.8); border: 1px solid rgba(143, 123, 255, 0.25); }
.segments button { border: 0; background: none; padding: 9px 2px; border-radius: 9px; color: #a79fd0; font-weight: 700; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; min-width: 0; }
.segments button[aria-checked="true"] { color: #1a1030; background: linear-gradient(180deg, #ffe08a, #ffb43a); box-shadow: 0 4px 14px rgba(255, 180, 58, 0.4); }
#chaleur button[data-v="3"][aria-checked="true"] { color: #fff; background: linear-gradient(180deg, #ff7a3d, #ff3d3d); box-shadow: 0 4px 14px rgba(255, 61, 61, 0.45); }
.btn.gros { padding: 15px 20px; font-size: 1.05rem; background: linear-gradient(180deg, #ff6fa0, #e0436b); box-shadow: 0 6px 0 #9b1d44, 0 14px 30px rgba(224, 67, 107, 0.45); }
.btn.gros:active { transform: translateY(4px); box-shadow: 0 2px 0 #9b1d44; }
.aide { margin: -6px 0 0; min-height: 1.2em; text-align: center; font-size: 0.85rem; color: var(--ko); }

/* ---------- Plateau ---------- */
.plateau { gap: 10px; }
.barre { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: none; }
.rond { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(11, 8, 32, 0.6); cursor: pointer; font-size: 0.95rem; flex: none; }
.rond.coupe { opacity: 0.4; text-decoration: line-through; }
.manche { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--or); text-shadow: 0 0 12px rgba(255, 207, 90, 0.6); }

/* Écran géant avec ampoules */
.ecran-geant {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 22px;
  background:
    radial-gradient(420px 200px at 50% 0%, color-mix(in srgb, var(--t) 35%, transparent), transparent 70%),
    linear-gradient(180deg, #1d1650, #0f0b2c);
  box-shadow: 0 0 0 3px #2c2470, 0 0 0 6px #120d33, 0 20px 50px -10px rgba(0, 0, 0, 0.7), 0 0 60px -10px var(--t), inset 0 0 40px rgba(0, 0, 0, 0.5);
}
.ecran-geant::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.ampoules { position: absolute; left: -3px; top: -3px; width: calc(100% + 6px); height: calc(100% + 6px); overflow: visible; pointer-events: none; z-index: 2; }
.ampoules rect { fill: none; stroke: var(--or); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 0 2.2; filter: drop-shadow(0 0 3px var(--or)); animation: chenillard 1.2s linear infinite; }
.ecran-geant.gagne .ampoules rect { stroke: var(--ok); filter: drop-shadow(0 0 4px var(--ok)); animation-duration: 0.35s; }
.ecran-geant.perdu .ampoules rect { stroke: var(--ko); filter: drop-shadow(0 0 4px var(--ko)); animation: clignote 0.25s steps(2) 4; }
@keyframes chenillard { to { stroke-dashoffset: -4.4; } }
@keyframes clignote { 50% { opacity: 0.2; } }
.panneau-q { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.panneau-q.entree { animation: entree 0.45s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes entree { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
.haut-carte { display: flex; align-items: center; gap: 10px; }
.theme { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; padding: 4px 10px; border-radius: 6px; background: var(--t); box-shadow: 0 0 14px -2px var(--t); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.q-num { font-size: 0.72rem; color: #a79fd0; font-weight: 600; white-space: nowrap; }
.chrono { position: relative; margin-left: auto; width: 42px; height: 42px; flex: none; }
.chrono svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.chrono circle { fill: none; stroke-width: 4; }
.chrono .piste { stroke: rgba(255, 255, 255, 0.1); }
.chrono .reste { stroke: var(--ok); stroke-linecap: round; stroke-dasharray: 100 100; transition: stroke 0.3s; }
.chrono b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.chrono.urgent .reste { stroke: var(--ko); }
.chrono.urgent b { color: var(--ko); animation: battement 0.5s ease infinite; }
@keyframes battement { 50% { transform: scale(1.2); } }
.question {
  margin: auto 0;
  padding: 8px 0;
  text-align: center;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.02rem, min(5.2vw, 3.1dvh), 1.6rem);
  line-height: 1.28;
  text-wrap: balance;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* Réponses en losanges allongés, façon jeu télé */
.reponses { position: relative; display: grid; gap: 7px; flex: none; }
.reponse {
  --bord: #6f62c9;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 8px 26px;
  border: 0;
  background: var(--bord);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  cursor: pointer;
  overflow-wrap: anywhere;
  transition: transform 0.15s, opacity 0.3s;
}
.reponse::before {
  content: '';
  position: absolute;
  inset: 2px;
  clip-path: polygon(13px 0, calc(100% - 13px) 0, 100% 50%, calc(100% - 13px) 100%, 13px 100%, 0 50%);
  background: linear-gradient(180deg, #2a2170, #120d3a 60%, #1c1552);
  z-index: 0;
}
.reponse > * { position: relative; z-index: 1; }
.reponse .lettre { flex: none; font-weight: 800; color: var(--or); }
.reponse:not(:disabled):hover { --bord: var(--or); }
.reponse:not(:disabled):active { transform: scale(0.98); }
.reponse:disabled { cursor: default; }
.reponse.verrouillee { --bord: #ffd08a; animation: verrou 0.3s ease infinite alternate; }
.reponse.verrouillee::before { background: linear-gradient(180deg, #ffb24d, #e46d0f); }
.reponse.verrouillee .lettre, .reponse.bonne .lettre, .reponse.fausse .lettre { color: #fff; }
.reponse.bonne { --bord: #b8ffd4; animation: bonne-clignote 0.2s steps(2) 5; }
.reponse.bonne::before { background: linear-gradient(180deg, #4cf08d, #12a24c); }
.reponse.fausse { --bord: #ffb3ba; animation: secoue 0.4s ease; }
.reponse.fausse::before { background: linear-gradient(180deg, #ff6b78, #c21b30); }
.reponse.eliminee { opacity: 0.12; }
.reponse.estompee { opacity: 0.4; }
@keyframes verrou { to { filter: brightness(1.25); } }
@keyframes bonne-clignote { 50% { filter: brightness(1.5); } }
@keyframes secoue { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.pied-jeu { display: flex; gap: 10px; flex: none; }
.pied-jeu .btn { flex: 1; padding: 11px 12px; }
#joker { flex: 0 1 auto; background: rgba(255, 207, 90, 0.1); border-color: rgba(255, 207, 90, 0.5); color: var(--or); font-size: 0.9rem; }
#joker.utilise { opacity: 0.3; pointer-events: none; }
.pied-jeu .btn.primary { background: linear-gradient(180deg, #ffe08a, #ffb43a); color: #1a1030; box-shadow: 0 4px 0 #b06d12, 0 10px 24px rgba(255, 180, 58, 0.35); }

/* ---------- Scène : pupitres + présentateur ---------- */
.scene {
  --sh: clamp(100px, 19dvh, 168px);
  position: relative;
  height: var(--sh);
  display: grid;
  grid-template-columns: 1fr 0.72fr 1fr;
  align-items: end;
  gap: 6px;
  flex: none;
}
.podium { --pc: var(--p0); position: relative; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; min-width: 0; }
.podium.p1 { --pc: var(--p1); }
.podium .perso { height: calc(var(--sh) * 0.72); width: calc(var(--sh) * 0.72 * 100 / 130); margin-bottom: calc(var(--sh) * -0.2); z-index: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)) brightness(0.8); transition: filter 0.3s; }
.podium.actif .perso { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }
.pupitre {
  position: relative;
  z-index: 2;
  width: 100%;
  height: calc(var(--sh) * 0.48);
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 55%, #120d33), #120d33 75%);
  border-top: 3px solid var(--pc);
  transition: filter 0.3s;
}
.pupitre .nom { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pupitre .led {
  font-family: "Courier New", monospace;
  font-size: clamp(1.15rem, 4.2dvh, 1.8rem);
  font-weight: 700;
  line-height: 1;
  padding: 1px 12px;
  border-radius: 6px;
  color: var(--pc);
  background: #07051a;
  text-shadow: 0 0 8px var(--pc), 0 0 2px #fff;
  box-shadow: inset 0 0 8px #000;
  font-variant-numeric: tabular-nums;
}
.pupitre .coeurs { font-size: 0.6rem; color: var(--pc); letter-spacing: 0.15em; min-height: 0.9em; line-height: 1; }
.podium::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 10%;
  width: 140%;
  height: 150%;
  transform: translateX(-50%);
  background: radial-gradient(50% 60% at 50% 100%, color-mix(in srgb, var(--pc) 45%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.podium.actif::before { opacity: 1; }
.podium.actif .pupitre { filter: brightness(1.3); }
.podium.marque .led { animation: led-flash 0.5s ease 2; }
@keyframes led-flash { 50% { color: #fff; transform: scale(1.18); } }

.animateur { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.animateur .perso { height: calc(var(--sh) * 0.66); width: calc(var(--sh) * 0.66 * 100 / 130); margin-bottom: calc(var(--sh) * -0.06); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }
.estrade { width: 80%; height: calc(var(--sh) * 0.2); flex: none; border-radius: 50% 50% 4px 4px / 30% 30% 4px 4px; background: linear-gradient(180deg, #3a2f8a, #151036); border-top: 2px solid var(--or); position: relative; z-index: 2; }
.bulle {
  position: absolute;
  left: 50%;
  bottom: calc(var(--sh) * 0.78);
  transform: translateX(-50%);
  z-index: 5;
  width: max-content;
  max-width: min(260px, 70%);
  padding: 6px 11px;
  border-radius: 14px;
  background: #fff;
  color: #1a1030;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  animation: bulle 0.3s cubic-bezier(.2, 1.5, .4, 1);
}
.bulle::after { content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #fff; }
@keyframes bulle { from { transform: translateX(-50%) scale(0.6); opacity: 0; } }

/* ---------- Carton de début de manche ---------- */
.carton {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(143, 123, 255, 0.5), rgba(11, 8, 32, 0.97) 70%);
  animation: carton 2.2s ease forwards;
}
.carton-petit { font-size: 0.85rem; font-weight: 800; letter-spacing: 0.4em; text-transform: uppercase; color: var(--or); }
.carton b { font-size: clamp(3.4rem, 16dvh, 7rem); font-weight: 800; line-height: 1; background: linear-gradient(180deg, #fff, #ffe08a 50%, #ff9a2e); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #7a2e10) drop-shadow(0 0 30px rgba(255, 180, 58, 0.7)); animation: carton-zoom 2.2s cubic-bezier(.2, 1.4, .4, 1); }
.carton-sous { margin-top: 6px; font-size: 0.95rem; font-weight: 700; color: #ffb3c9; text-align: center; padding: 0 10px; }
@keyframes carton { 0% { opacity: 0; } 10%, 82% { opacity: 1; } 100% { opacity: 0; } }
@keyframes carton-zoom { 0% { transform: scale(2.4); } 25% { transform: scale(1); } 80% { transform: scale(1.05); } }

/* ---------- Roue des gages ---------- */
#panneau-roue { align-items: center; justify-content: center; gap: 10px; }
.roue-titre { margin: 0; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--or); text-shadow: 0 0 12px rgba(255, 207, 90, 0.6); text-align: center; }
.roue-boite { position: relative; width: min(100%, 300px); flex: 1; min-height: 0; max-height: 300px; aspect-ratio: 1; }
.roue { width: 100%; height: 100%; transition: transform 4.6s cubic-bezier(.12, .7, .1, 1); filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 20px rgba(143, 123, 255, 0.5)); }
.roue text { font: 800 10px "Inter", system-ui, sans-serif; fill: #fff; letter-spacing: 0.04em; paint-order: stroke; stroke: rgba(0, 0, 0, 0.35); stroke-width: 2px; }
.roue .ampoule { fill: #ffe9a8; animation: ampoule 0.8s steps(2) infinite; }
.roue .ampoule.b { animation-delay: 0.4s; }
@keyframes ampoule { 50% { fill: #6a4b12; } }
.pointeur { position: absolute; left: 50%; top: -6px; z-index: 2; width: 26px; height: 32px; transform: translateX(-50%); background: linear-gradient(180deg, #fff, var(--or)); clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5)); }
.pointeur.tic { animation: pointeur 0.12s ease; }
@keyframes pointeur { 50% { transform: translateX(-50%) rotate(-18deg); } }
#lancer-roue { background: linear-gradient(180deg, #ffe08a, #ffb43a); color: #1a1030; box-shadow: 0 5px 0 #b06d12, 0 12px 28px rgba(255, 180, 58, 0.4); padding: 12px 28px; flex: none; }

/* ---------- Carte de gage ---------- */
#panneau-gage { align-items: center; justify-content: center; gap: 12px; }
.carte-gage { position: relative; width: 100%; max-width: 360px; flex: 1; min-height: 150px; max-height: 300px; perspective: 1200px; cursor: pointer; }
.carte-gage .face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border-radius: 20px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.75s cubic-bezier(.3, 1.3, .4, 1);
  text-align: center;
}
.carte-gage .dos {
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0 10px, transparent 10px 20px), linear-gradient(145deg, #5a1240, #1d0b2e);
  border: 2px solid var(--p0);
  box-shadow: 0 0 40px -6px var(--p0), inset 0 0 40px rgba(255, 79, 134, 0.25);
  animation: flotte 3s ease-in-out infinite;
}
.carte-gage .dos span { font-size: clamp(1.8rem, 7dvh, 2.8rem); font-weight: 800; color: #fff; text-shadow: 0 0 24px var(--p0); text-transform: uppercase; letter-spacing: 0.06em; }
.carte-gage .dos small { color: #e6b5cb; }
.carte-gage .recto { transform: rotateY(180deg); background: radial-gradient(400px 200px at 50% 0%, rgba(255, 79, 134, 0.3), transparent 70%), #1a1240; border: 2px solid rgba(255, 79, 134, 0.6); box-shadow: 0 0 40px -10px var(--p0); overflow-y: auto; }
.carte-gage.retournee .dos { transform: rotateY(-180deg); animation: none; }
.carte-gage.retournee .recto { transform: rotateY(0); }
.carte-gage.retournee { cursor: default; }
@keyframes flotte { 50% { transform: translateY(-5px) rotate(-1deg); } }
.niveau { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: rgba(255, 79, 134, 0.2); color: #ff9fbf; }
.niveau.n1 { background: rgba(143, 123, 255, 0.2); color: #c7b8ff; }
.niveau.n3 { background: rgba(255, 77, 31, 0.22); color: #ffb08a; }
.pour { margin: 0; font-size: 0.8rem; color: #b9b0dd; }
.texte-gage { margin: 0; font-size: clamp(1rem, min(5vw, 3dvh), 1.4rem); line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.btn.petit { padding: 8px 14px; font-size: 0.85rem; }
.actions-gage { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; flex: none; animation: fadeIn 0.4s ease; }
.actions-gage .btn { width: 100%; max-width: 360px; padding: 11px; background: linear-gradient(180deg, #4cf08d, #12a24c); box-shadow: 0 4px 0 #0b6b31; color: #04210f; }
.refus { background: none; border: 0; color: #b9b0dd; font-size: 0.82rem; text-decoration: underline; cursor: pointer; padding: 4px; }

/* En mode roue / gage, on cache les réponses */
.plateau.mode-gage .reponses, .plateau.mode-gage .pied-jeu { display: none; }

/* ---------- Fin : podium ---------- */
.fin { justify-content: center; align-items: center; text-align: center; gap: 8px; }
.fin h2 { font-size: clamp(2rem, 9vw, 2.8rem); font-weight: 800; line-height: 1.05; margin: 4px 0 0; background: linear-gradient(180deg, #fff, #ffe08a 50%, #ff9a2e); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 #7a2e10); overflow-wrap: anywhere; }
.f-score { margin: 0; font-size: 1.05rem; color: var(--or); font-weight: 700; }
.podium-final { display: flex; align-items: flex-end; justify-content: center; gap: 10px; width: 100%; max-width: 340px; flex: 1; min-height: 140px; max-height: 260px; margin: 4px 0; }
.marche { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.marche .perso { height: 58%; aspect-ratio: 100 / 130; margin-bottom: -8%; z-index: 1; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5)); }
.marche .bloc { position: relative; z-index: 2; width: 100%; display: flex; flex-direction: column; align-items: center; padding-top: 8px; border-radius: 12px 12px 0 0; background: linear-gradient(180deg, #3a2f8a, #151036); border-top: 3px solid var(--or); }
.marche.premier .bloc { height: 40%; background: linear-gradient(180deg, #ffcf5a, #b06d12); border-top-color: #fff3c4; box-shadow: 0 0 40px -6px var(--or); }
.marche.second .bloc { height: 24%; }
.marche.egal .bloc { height: 32%; }
.marche .rang { font-size: 1.6rem; font-weight: 800; line-height: 1; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); }
.marche .nom { font-size: 0.76rem; font-weight: 700; max-width: 95%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marche.premier .nom { color: #3a2208; }
.f-texte { margin: 0 0 6px; color: #b9b0dd; max-width: 360px; font-size: 0.9rem; }
.actions-fin { width: 100%; max-width: 360px; display: grid; gap: 8px; flex: none; }
.actions-fin .btn { padding: 11px; }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- Ajustements selon la taille d'écran ---------- */
@media (min-width: 520px) {
  .reponses { grid-template-columns: 1fr 1fr; }
}
@media (max-height: 640px) {
  .ecran { padding-top: calc(8px + env(safe-area-inset-top)); padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .plateau { gap: 7px; }
  .ecran-geant { padding: 11px 12px; }
  .reponse { min-height: 39px; padding: 5px 22px; font-size: 0.86rem; }
  .reponses { gap: 5px; }
  .pied-jeu .btn { padding: 8px 10px; font-size: 0.88rem; }
  .rond { width: 30px; height: 30px; }
  .chrono { width: 34px; height: 34px; }
  .reglages { gap: 12px; }
  .panneau { padding: 14px; gap: 12px; }
  .perso-apercu { width: 64px; height: 74px; }
  .logo-emission { padding: 10px 22px 8px; }
  .logo-emission b { font-size: 2.6rem; }
  .fin { gap: 5px; }
  .actions-fin { gap: 6px; }
  .actions-fin .btn { padding: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .faisceau, .sol, .public, .logo-emission { animation: none; }
}

/* ---------- Qui joue ? ---------- */
.plateau.tour-0 { --joueur: var(--p0); }
.plateau.tour-1 { --joueur: var(--p1); }
.bandeau-tour {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: -16px -16px 10px;
  padding: 7px 12px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--joueur, var(--p0)) 45%, transparent), transparent);
  border-bottom: 2px solid var(--joueur, var(--p0));
  text-transform: uppercase;
}
.bandeau-tour span { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; color: #e9e3ff; }
.bandeau-tour b { font-size: 1.15rem; font-weight: 800; letter-spacing: 0.06em; color: var(--joueur, var(--p0)); text-shadow: 0 0 14px var(--joueur, var(--p0)); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plateau.tour-0 .ecran-geant, .plateau.tour-1 .ecran-geant { box-shadow: 0 0 0 3px var(--joueur), 0 0 0 6px #120d33, 0 20px 50px -10px rgba(0, 0, 0, 0.7), 0 0 50px -6px var(--joueur), inset 0 0 40px rgba(0, 0, 0, 0.5); }
.plateau.tour-0 .reponse:not(:disabled), .plateau.tour-1 .reponse:not(:disabled) { --bord: color-mix(in srgb, var(--joueur) 70%, #6f62c9); }
.relais {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: radial-gradient(circle, color-mix(in srgb, var(--joueur, var(--p0)) 45%, transparent), rgba(11, 8, 32, 0.96) 72%);
  animation: relais 1.15s ease forwards;
  pointer-events: none;
}
.relais span { font-size: 0.9rem; font-weight: 800; letter-spacing: 0.4em; text-transform: uppercase; color: #fff; }
.relais b { font-size: clamp(2.2rem, 11vw, 3.4rem); font-weight: 800; line-height: 1.05; color: var(--joueur, var(--p0)); text-shadow: 0 0 30px var(--joueur, var(--p0)), 0 3px 0 rgba(0, 0, 0, 0.4); max-width: 92%; overflow-wrap: anywhere; text-align: center; animation: carton-zoom 1.15s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes relais { 0% { opacity: 0; } 12%, 75% { opacity: 1; } 100% { opacity: 0; } }
.a-toi {
  position: absolute;
  top: -6px;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1a1030;
  background: var(--pc);
  box-shadow: 0 0 14px var(--pc);
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
}
.a-toi::after { content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--pc); }
.podium.actif .a-toi { opacity: 1; animation: a-toi 0.9s ease-in-out infinite; }
@keyframes a-toi { 50% { transform: translate(-50%, -3px); } }
.plateau.mode-gage .a-toi { display: none; }
.pupitre .coeurs { font-size: 0.66rem; letter-spacing: 0.04em; }

/* ---------- Règles ---------- */
.regles { border: 1px solid rgba(143, 123, 255, 0.3); border-radius: 14px; background: rgba(11, 8, 32, 0.5); padding: 0 14px; }
.regles summary { cursor: pointer; padding: 11px 0; font-weight: 700; font-size: 0.9rem; color: var(--or); }
.regles ul { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 6px; font-size: 0.84rem; color: #cfc7f2; line-height: 1.45; }
.regles b { color: #fff; }
.regle-refus { margin: 2px 0 0; font-size: 0.74rem; color: #b9b0dd; text-align: center; max-width: 340px; line-height: 1.35; }

/* Questions longues et petits écrans : on gagne de la place */
.question.longue { font-size: clamp(0.92rem, min(4.5vw, 2.7dvh), 1.35rem); line-height: 1.22; }
@media (max-height: 700px) {
  .bandeau-tour { padding: 4px 10px; margin-bottom: 6px; }
  .bandeau-tour b { font-size: 1rem; }
  .bandeau-tour span { font-size: 0.62rem; }
  .question { padding: 4px 0; }
}
