:root {
  --a: #9b5cff; --b: #ff3fa4; --c: #ffd23f; --bg1: #170a36; --bg2: #3b0d5c;
  --ink: #fff; --muted: rgba(255,255,255,.7); --card: rgba(255,255,255,.1); --line: rgba(255,255,255,.18);
  --ok: #2fe08b; --ko: #ff4d6d;
  --c0: #ff4d6d; --c1: #3fa9ff; --c2: #ffc93f; --c3: #2fd18b;
  --u: min(1vw, 1.78vh); /* unité qui tient en 16/9 */
}
.theme-brain   { --a:#3a86ff; --b:#00d4ff; --c:#ffd23f; --bg1:#06142e; --bg2:#0b2e5c; }
.theme-stade   { --a:#00c271; --b:#ffd60a; --c:#ffffff; --bg1:#03210f; --bg2:#0a4a26; }
.theme-neon    { --a:#ff2bd6; --b:#00f0ff; --c:#fff200; --bg1:#0d021f; --bg2:#2a0845; }
.theme-disco   { --a:#ff7a00; --b:#ff2e63; --c:#ffe066; --bg1:#1a0826; --bg2:#4a0d3a; }
.theme-cartoon { --a:#ff9f1c; --b:#ff5d8f; --c:#ffe14d; --bg1:#1c7ed6; --bg2:#4dabf7; }
.theme-mystere { --a:#e63946; --b:#8d0c1e; --c:#ffd6a5; --bg1:#07070b; --bg2:#1c0b12; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, sans-serif;
  color: var(--ink); background: var(--bg1); -webkit-font-smoothing: antialiased; user-select: none;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

/* ───────── Fond animé ───────── */
#bg { position: fixed; inset: 0; background: radial-gradient(ellipse at 30% 20%, var(--bg2), var(--bg1) 70%); overflow: hidden; transition: background 1s; }
.blob { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .45; mix-blend-mode: screen; }
.b1 { background: var(--a); top: -25vmax; left: -15vmax; animation: float1 18s ease-in-out infinite alternate; }
.b2 { background: var(--b); bottom: -30vmax; right: -15vmax; animation: float2 22s ease-in-out infinite alternate; }
.b3 { background: var(--c); width: 30vmax; height: 30vmax; top: 40%; left: 45%; opacity: .15; animation: float1 26s ease-in-out infinite alternate-reverse; }
@keyframes float1 { to { transform: translate(18vmax, 14vmax) scale(1.2); } }
@keyframes float2 { to { transform: translate(-20vmax, -10vmax) scale(.85); } }
.grid { display: none; position: absolute; left: -50%; right: -50%; bottom: -10%; height: 55%;
  background-image: linear-gradient(var(--a) 2px, transparent 2px), linear-gradient(90deg, var(--a) 2px, transparent 2px);
  background-size: 80px 80px; transform: perspective(400px) rotateX(65deg); opacity: .35; animation: gridmove 2s linear infinite; }
.theme-neon .grid { display: block; }
@keyframes gridmove { to { background-position: 0 80px; } }
.theme-cartoon .blob { opacity: .35; filter: blur(60px); }
#stars { position: absolute; inset: 0; width: 100%; height: 100%; }

@keyframes bgpulse { 50% { filter: brightness(1.6); } }

#app { position: relative; height: 100%; }
.screen { position: absolute; inset: 0; display: none; padding: calc(3 * var(--u)) calc(4 * var(--u)); }
.screen.on { display: flex; animation: screenIn .5s cubic-bezier(.2,1.2,.3,1); }
.screen.center { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: calc(2 * var(--u)); }
@keyframes screenIn { from { opacity: 0; transform: scale(.96) translateY(20px); } }

/* ───────── Avatars ───────── */
.av { --s: calc(7 * var(--u)); width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; flex: none;
  font-size: calc(var(--s) * .58); background: var(--pc, #888); border: calc(var(--s) * .06) solid #fff; box-shadow: 0 6px 20px rgba(0,0,0,.35); overflow: hidden; position: relative; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.off { filter: grayscale(1) opacity(.5); }
.pname { font-weight: 800; font-size: calc(1.6 * var(--u)); text-shadow: 0 2px 6px rgba(0,0,0,.5); max-width: calc(14 * var(--u)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────── Lobby ───────── */
#s-lobby { display: none; grid-template-columns: 1fr calc(27 * var(--u)); grid-template-rows: minmax(0, 1fr) auto; gap: calc(1.6 * var(--u)) calc(3 * var(--u)); }
#s-lobby.on { display: grid; }
.lobby-left { display: flex; flex-direction: column; gap: calc(1.6 * var(--u)); min-height: 0; }
.logo { font-size: calc(5.4 * var(--u)); line-height: .9; font-weight: 900; letter-spacing: -.02em; display: flex; gap: .3em; align-items: baseline; }
.logo span:first-child { color: var(--c); text-shadow: 0 .06em 0 var(--b), 0 .12em 30px rgba(0,0,0,.4); display: inline-block; animation: wobble 3s ease-in-out infinite; }
.logo span:last-child { background: linear-gradient(90deg, #fff, var(--b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes wobble { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) scale(1.05); } }
.quiz-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(1.2 * var(--u)); }
.quiz-card { background: var(--card); border: 2px solid var(--line); border-radius: calc(1.4 * var(--u)); padding: calc(.9 * var(--u)) calc(1.1 * var(--u)); text-align: left;
  transition: transform .2s, background .2s, border-color .2s; backdrop-filter: blur(8px); }
.quiz-card:hover { transform: translateY(-4px); }
.quiz-card.sel { background: linear-gradient(135deg, var(--a), var(--b)); border-color: #fff; transform: scale(1.04); box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.quiz-card .qe { font-size: calc(2.6 * var(--u)); line-height: 1; }
.quiz-card .qn { font-weight: 900; font-size: calc(1.6 * var(--u)); margin: .25em 0 .15em; }
.quiz-card .qd { font-size: calc(1.05 * var(--u)); color: var(--muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.quiz-card.sel .qd { color: #fff; }
.options { display: flex; flex-wrap: wrap; gap: calc(.8 * var(--u)) calc(1 * var(--u)); align-items: center; }
.opt { display: flex; align-items: center; gap: .5em; background: var(--card); border-radius: 999px; padding: .3em .35em .3em .9em; font-size: calc(1.25 * var(--u)); font-weight: 700; }
.opt .seg { display: flex; background: rgba(0,0,0,.25); border-radius: 999px; padding: 3px; }
.opt .seg button { padding: .3em .8em; border-radius: 999px; font-weight: 800; color: var(--muted); }
.opt .seg button.sel { background: #fff; color: #222; }
.lobby-right { display: flex; flex-direction: column; gap: calc(1.4 * var(--u)); align-items: stretch; justify-content: center; }
.qr-card { background: #fff; color: #222; border-radius: calc(2.2 * var(--u)); padding: calc(1.4 * var(--u)); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.45); transform: rotate(1.5deg); animation: qrfloat 4s ease-in-out infinite; }
@keyframes qrfloat { 50% { transform: rotate(-1deg) translateY(-6px); } }
.qr-title { font-weight: 900; font-size: calc(1.8 * var(--u)); }
#qr { width: calc(19 * var(--u)); aspect-ratio: 1; display: block; margin: calc(.6 * var(--u)) auto; image-rendering: pixelated; }
.join-url { font-size: calc(1.15 * var(--u)); color: #555; word-break: break-all; font-weight: 700; }
.code-line { font-size: calc(1.8 * var(--u)); margin-top: .2em; }
.code-line b { letter-spacing: .15em; color: #7b2ff7; font-size: 1.3em; }
.https-toggle { display: block; margin-top: .5em; font-size: calc(1.05 * var(--u)); color: #666; cursor: pointer; }
.go { background: linear-gradient(135deg, var(--c), #ff9f1c); color: #2a1300; font-weight: 900; font-size: calc(2.3 * var(--u)); padding: .55em 1em; border-radius: 999px;
  box-shadow: 0 .18em 0 #b85c00, 0 12px 40px rgba(0,0,0,.4); transition: transform .15s; }
.go:hover { transform: translateY(-3px) scale(1.03); }
.go:active { transform: translateY(3px); box-shadow: 0 .05em 0 #b85c00; }
.go:disabled { filter: grayscale(1) opacity(.6); transform: none; }
.ghost { font-weight: 800; font-size: calc(2 * var(--u)); padding: .6em 1.1em; border-radius: 999px; border: 3px solid rgba(255,255,255,.6); }
.hint { text-align: center; color: var(--muted); font-size: calc(1.3 * var(--u)); min-height: 1.4em; }
.lobby-players { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: calc(1.4 * var(--u)); align-items: flex-end; justify-content: center; min-height: calc(9.5 * var(--u)); }
.lp { display: flex; flex-direction: column; align-items: center; gap: .4em; animation: popin .6s cubic-bezier(.2,1.6,.4,1) both; position: relative; }
.lp .av { --s: calc(6.5 * var(--u)); animation: bob 2.4s ease-in-out infinite; }
.lp:nth-child(2n) .av { animation-delay: -.8s; } .lp:nth-child(3n) .av { animation-delay: -1.6s; }
.lp .kick { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.6); font-size: 14px; display: none; }
.lp:hover .kick { display: block; }
.lp .tm { font-size: calc(1.1 * var(--u)); padding: .1em .6em; border-radius: 999px; font-weight: 800; }
.waiting-players { color: var(--muted); font-size: calc(2 * var(--u)); font-weight: 700; align-self: center; animation: breathe 2s ease-in-out infinite; }
@keyframes popin { from { transform: scale(0) rotate(-30deg); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes breathe { 50% { opacity: .45; } }

/* ───────── Chargement, compte à rebours, événement, intro ───────── */
.spinner { width: calc(10 * var(--u)); height: calc(10 * var(--u)); border-radius: 50%; border: calc(1.2 * var(--u)) solid rgba(255,255,255,.2); border-top-color: var(--c); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.big-msg { font-size: calc(3.5 * var(--u)); font-weight: 900; }
.ready-quiz { font-size: calc(4 * var(--u)); font-weight: 900; }
.ready-quiz .e { font-size: 2.4em; display: block; animation: bob 1.5s infinite; }
.count321 { font-size: calc(22 * var(--u)); font-weight: 900; color: var(--c); text-shadow: 0 .05em 0 var(--b); line-height: 1; }
.count321.tick { animation: zoomout .9s ease-out; }
@keyframes zoomout { from { transform: scale(2.2); opacity: 0; } 30% { opacity: 1; } }
.event-card { background: linear-gradient(135deg, var(--c), #ff9f1c); color: #2a1300; border-radius: calc(3 * var(--u)); padding: calc(4 * var(--u)) calc(7 * var(--u));
  box-shadow: 0 0 0 calc(1 * var(--u)) rgba(255,255,255,.3), 0 30px 90px rgba(0,0,0,.5); animation: cardflip 1.1s cubic-bezier(.2,1.4,.4,1); }
.event-card .e { font-size: calc(12 * var(--u)); display: block; animation: shake .5s .9s 3; }
.event-card .n { font-size: calc(6 * var(--u)); font-weight: 900; }
.event-card .d { font-size: calc(2.4 * var(--u)); font-weight: 700; margin-top: .4em; }
@keyframes cardflip { from { transform: rotateY(720deg) scale(.2); opacity: 0; } }
@keyframes shake { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.intro-num { font-size: calc(3 * var(--u)); font-weight: 800; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; animation: slidein .6s both; }
.intro-cat { font-size: calc(7.5 * var(--u)); font-weight: 900; animation: slidein .7s .15s cubic-bezier(.2,1.4,.4,1) both; }
.intro-cat .e { display: block; font-size: 1.8em; animation: popin .8s .3s cubic-bezier(.2,1.6,.4,1) both; }
.intro-imp { display: none; font-size: calc(2.6 * var(--u)); font-weight: 800; color: var(--c); animation: breathe 1.5s infinite; }
.imp .intro-imp { display: block; }
@keyframes slidein { from { transform: translateX(-60px); opacity: 0; } }

/* ───────── Question ───────── */
#s-question { flex-direction: column; gap: calc(1.5 * var(--u)); }
.qbar { display: flex; align-items: center; justify-content: space-between; gap: 2em; }
.qcat { background: var(--card); padding: .35em 1em; border-radius: 999px; font-weight: 800; font-size: calc(2 * var(--u)); backdrop-filter: blur(6px); }
.qnum { font-weight: 800; font-size: calc(2 * var(--u)); color: var(--muted); }
.timer { position: relative; width: calc(10 * var(--u)); height: calc(10 * var(--u)); }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 9; }
.timer .track { stroke: rgba(255,255,255,.15); }
.timer .bar { stroke: var(--c); stroke-linecap: round; stroke-dasharray: 276.5; transition: stroke .3s; }
.timer.hurry .bar { stroke: var(--ko); }

.timer span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: calc(3.6 * var(--u)); }
.timer.hide { visibility: hidden; }
@keyframes heartbeat { 30% { transform: scale(1.12); } }
.qbody { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: calc(1.6 * var(--u)); min-height: 0; overflow: hidden; }
.qtext { font-size: calc(4 * var(--u)); font-weight: 900; text-align: center; line-height: 1.15; max-width: 90%; text-shadow: 0 4px 20px rgba(0,0,0,.35); animation: qin .7s cubic-bezier(.2,1.3,.4,1) both; }
.qtext.long { font-size: calc(3.4 * var(--u)); }
@keyframes qin { from { transform: translateY(30px) scale(.9); opacity: 0; } }
.qmedia:empty { display: none; }
.qmedia { display: flex; align-items: center; justify-content: center; animation: popin .8s .2s cubic-bezier(.2,1.6,.4,1) both; }
.m-emoji { font-size: calc(13 * var(--u)); line-height: 1; filter: drop-shadow(0 10px 30px rgba(0,0,0,.4)); }
.m-emoji.count { font-size: calc(8 * var(--u)); max-width: 80%; text-align: center; letter-spacing: .1em; }
.m-text { font-size: calc(6 * var(--u)); font-weight: 900; background: var(--card); padding: .2em .8em; border-radius: calc(2 * var(--u)); }
.m-color { width: calc(15 * var(--u)); height: calc(15 * var(--u)); border-radius: 50%; border: calc(1 * var(--u)) solid #fff; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.letters { display: flex; gap: calc(1 * var(--u)); flex-wrap: wrap; justify-content: center; }
.letters span { width: calc(7.5 * var(--u)); height: calc(8.5 * var(--u)); background: #fff8e1; color: #3b2400; border-radius: calc(1 * var(--u)); display: grid; place-items: center;
  font-size: calc(5 * var(--u)); font-weight: 900; box-shadow: 0 .4em 0 #c9a46b, 0 10px 30px rgba(0,0,0,.4); animation: tile .6s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes tile { from { transform: translateY(-120px) rotate(-30deg); opacity: 0; } }
.vinyl { width: calc(17 * var(--u)); height: calc(17 * var(--u)); border-radius: 50%; position: relative; animation: spin 2s linear infinite;
  background: repeating-radial-gradient(circle, #111 0 3px, #222 3px 5px); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.vinyl::after { content: '🎵'; position: absolute; inset: 35%; border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--b)); display: grid; place-items: center; font-size: calc(3 * var(--u)); }
.vinyl.art { background-size: cover; background-position: center; animation-duration: 6s; }
.vinyl.art::after { display: none; }
.eq { display: flex; gap: calc(.6 * var(--u)); align-items: flex-end; height: calc(9 * var(--u)); margin-left: calc(4 * var(--u)); }
.eq i { width: calc(1.6 * var(--u)); background: linear-gradient(var(--c), var(--b)); border-radius: 6px; animation: eq 0.9s ease-in-out infinite alternate; }
@keyframes eq { from { height: 10%; } to { height: 100%; } }
.qzone { width: 100%; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: calc(1.6 * var(--u)); width: 100%; }
.choices.n3 { grid-template-columns: repeat(3, 1fr); }
.choice { position: relative; display: flex; align-items: center; gap: .6em; padding: calc(1.6 * var(--u)) calc(2 * var(--u)); border-radius: calc(1.6 * var(--u)); font-size: calc(3 * var(--u));
  font-weight: 800; background: var(--cc); box-shadow: 0 .25em 0 rgba(0,0,0,.25), 0 10px 30px rgba(0,0,0,.25); transition: all .5s; animation: choiceIn .5s cubic-bezier(.2,1.4,.4,1) both; min-height: calc(9 * var(--u)); }
.choice:nth-child(2) { animation-delay: .1s; } .choice:nth-child(3) { animation-delay: .2s; } .choice:nth-child(4) { animation-delay: .3s; }
@keyframes choiceIn { from { transform: scale(.6); opacity: 0; } }
.choice .sh { width: 1.3em; height: 1.3em; display: grid; place-items: center; font-size: .9em; background: rgba(0,0,0,.2); border-radius: .3em; flex: none; }
.choice .ce { font-size: 1.6em; }
.choice.emoji-only { justify-content: center; font-size: calc(7 * var(--u)); min-height: calc(13 * var(--u)); }
.choice .col { width: 1.6em; height: 1.6em; border-radius: 50%; border: 4px solid #fff; flex: none; }
.choice .shape { width: 2.6em; height: 2.6em; }
.choice .cnt { margin-left: auto; font-size: .7em; background: rgba(0,0,0,.25); padding: .1em .6em; border-radius: 999px; display: none; }
.choice .who { position: absolute; bottom: -.9em; right: .6em; display: flex; }
.choice .who .av { --s: calc(4 * var(--u)); margin-left: -.6em; border-width: 3px; }
.revealed .choice.bad { opacity: .25; transform: scale(.95); filter: grayscale(.7); }
.revealed .choice.good { box-shadow: 0 0 0 .2em #fff, 0 0 60px var(--ok); transform: scale(1.04); animation: goodpulse 1s 2; }
.revealed .choice .cnt { display: block; }
@keyframes goodpulse { 50% { transform: scale(1.08); } }
.answer-big { text-align: center; font-size: calc(5 * var(--u)); font-weight: 900; color: var(--c); animation: popin .7s cubic-bezier(.2,1.6,.4,1) both; text-shadow: 0 4px 20px rgba(0,0,0,.4); }
.answer-big small { display: block; font-size: .4em; color: #fff; opacity: .8; letter-spacing: .1em; text-transform: uppercase; }
.wait-phone { text-align: center; font-size: calc(3 * var(--u)); font-weight: 800; color: var(--muted); }
.wait-phone .ph { font-size: 2em; display: inline-block; animation: shake 1s infinite; }
.rows { display: flex; flex-wrap: wrap; gap: calc(1 * var(--u)); justify-content: center; margin-top: calc(1.5 * var(--u)); }
.row { display: flex; align-items: center; gap: .6em; background: var(--card); border-radius: 999px; padding: .3em 1em .3em .3em; font-size: calc(1.8 * var(--u)); font-weight: 700;
  border: 3px solid transparent; animation: popin .5s cubic-bezier(.2,1.6,.4,1) both; cursor: pointer; backdrop-filter: blur(6px); }
.row .av { --s: calc(4.4 * var(--u)); border-width: 3px; }
.row.ok { border-color: var(--ok); background: rgba(47,224,139,.18); }
.row.ko { border-color: rgba(255,77,109,.6); opacity: .85; }
.row .g { font-weight: 900; color: var(--ok); }
.row .v { max-width: calc(26 * var(--u)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.none .v { font-style: italic; opacity: .6; }
.judge-hint { text-align: center; color: var(--muted); font-size: calc(1.2 * var(--u)); margin-top: .5em; }
.numline { position: relative; width: 90%; height: calc(16 * var(--u)); margin: calc(2 * var(--u)) auto 0; }
.numline .axis { position: absolute; left: 0; right: 0; top: 50%; height: 6px; background: rgba(255,255,255,.35); border-radius: 3px; }
.numline .target { position: absolute; top: 50%; transform: translate(-50%, -50%); background: var(--c); color: #2a1300; font-weight: 900; font-size: calc(2.6 * var(--u)); padding: .2em .6em; border-radius: 999px; z-index: 3; box-shadow: 0 0 30px var(--c); animation: popin .7s .8s both; }
.numline .g { position: absolute; top: 50%; transform: translate(-50%, -115%); display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 800; font-size: calc(1.4 * var(--u)); transition: left 1.2s cubic-bezier(.2,1,.3,1); }
.numline .g.low { transform: translate(-50%, 15%); flex-direction: column-reverse; }
.numline .g .av { --s: calc(4.4 * var(--u)); border-width: 3px; }
.numline .g.win .av { box-shadow: 0 0 0 4px var(--c), 0 0 30px var(--c); }
.explain { font-size: calc(2 * var(--u)); color: #fff; background: rgba(0,0,0,.25); padding: .5em 1.2em; border-radius: 999px; max-width: 85%; text-align: center; animation: slidein .6s .8s both; }
.explain:empty { display: none; }
.answered { display: flex; justify-content: center; gap: calc(1.2 * var(--u)); flex-wrap: wrap; min-height: calc(7 * var(--u)); flex: none; }
.answered .av { --s: calc(6 * var(--u)); transition: transform .3s; }
.answered .av.done { animation: jump .5s; }
.answered .av.done::after { content: '✓'; position: absolute; inset: 0; background: rgba(47,224,139,.7); display: grid; place-items: center; font-size: calc(3 * var(--u)); font-weight: 900; }
.answered .av.fx-freeze { box-shadow: 0 0 0 5px #a5f3fc, 0 0 30px #a5f3fc; }
@keyframes jump { 40% { transform: translateY(-20px) scale(1.15); } }

/* ───────── Vote ───────── */
.vote-title { font-size: calc(6 * var(--u)); font-weight: 900; }
.vote-sub { font-size: calc(2.4 * var(--u)); color: var(--muted); font-weight: 700; }
.vote-grid { display: flex; flex-wrap: wrap; gap: calc(3 * var(--u)); justify-content: center; margin-top: calc(2 * var(--u)); }
.vp { display: flex; flex-direction: column; align-items: center; gap: .5em; position: relative; transition: all .8s; }
.vp .av { --s: calc(12 * var(--u)); }
.vp .voted { font-size: calc(1.4 * var(--u)); color: var(--ok); font-weight: 800; height: 1.4em; }
.vp .votes { position: absolute; top: -10px; right: -10px; background: var(--c); color: #2a1300; width: calc(4.5 * var(--u)); height: calc(4.5 * var(--u)); border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: calc(2.4 * var(--u)); animation: popin .5s both; }
.vp.dim { opacity: .2; transform: scale(.8); }
.vp.spot .av { box-shadow: 0 0 0 8px var(--c), 0 0 100px 20px var(--a); animation: goodpulse 1s infinite; }
.vote-verdict { font-size: calc(4.5 * var(--u)); font-weight: 900; min-height: 1.2em; animation: popin .8s 1.6s both; }

/* ───────── Classement ───────── */
#s-scores { flex-direction: column; align-items: center; gap: calc(1.5 * var(--u)); }
.scores-title { font-size: calc(5 * var(--u)); font-weight: 900; }
.team-scores { display: flex; gap: calc(2 * var(--u)); }
.team-scores:empty { display: none; }
.ts { padding: .4em 1.2em; border-radius: 999px; font-weight: 900; font-size: calc(2.4 * var(--u)); background: var(--tc); color: #111; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.score-list { position: relative; width: min(100%, calc(110 * var(--u))); flex: 1; }
.sr { position: absolute; left: 0; right: 0; height: calc(7 * var(--u)); display: flex; align-items: center; gap: calc(1.4 * var(--u)); transition: top .9s cubic-bezier(.3,1.3,.5,1); }
.sr .rk { width: calc(4 * var(--u)); font-size: calc(3 * var(--u)); font-weight: 900; text-align: center; }
.sr .av { --s: calc(5.6 * var(--u)); }
.sr .barw { flex: 1; height: 72%; background: rgba(255,255,255,.08); border-radius: 999px; position: relative; overflow: hidden; }
.sr .bar { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--pc), color-mix(in srgb, var(--pc) 60%, #fff)); border-radius: 999px; transition: width 1.2s cubic-bezier(.2,1,.3,1); display: flex; align-items: center; padding-left: 1em; }
.sr .nm { position: absolute; left: 1em; top: 50%; transform: translateY(-50%); font-weight: 900; font-size: calc(2.2 * var(--u)); text-shadow: 0 2px 6px rgba(0,0,0,.5); z-index: 1; white-space: nowrap; }
.sr .sc { width: calc(12 * var(--u)); text-align: right; font-weight: 900; font-size: calc(2.6 * var(--u)); font-variant-numeric: tabular-nums; }
.sr .dl { width: calc(9 * var(--u)); font-weight: 900; font-size: calc(2 * var(--u)); color: var(--ok); animation: popin .5s 1s both; }
.sr .dl.neg { color: var(--ko); }
.sr .st { font-size: calc(2 * var(--u)); }
.sr.up .av { animation: jump .6s .5s; }

/* ───────── Fin ───────── */
.end-title { font-size: calc(5.5 * var(--u)); font-weight: 900; animation: popin .8s both; }
.podium { display: flex; align-items: flex-end; gap: calc(2 * var(--u)); height: calc(42 * var(--u)); }
.pod { display: flex; flex-direction: column; align-items: center; gap: .5em; width: calc(20 * var(--u)); }
.pod .av { --s: calc(11 * var(--u)); animation: popin .8s both; }
.pod .step { width: 100%; border-radius: calc(1.6 * var(--u)) calc(1.6 * var(--u)) 0 0; display: flex; flex-direction: column; align-items: center; padding-top: .4em; font-weight: 900; font-size: calc(5 * var(--u));
  background: linear-gradient(var(--sc), color-mix(in srgb, var(--sc) 50%, #000)); animation: rise 1.2s cubic-bezier(.2,1.2,.4,1) both; transform-origin: bottom; }
.pod .step small { font-size: .45em; }
.pod.p1 { order: 2; --sc: #ffd23f; } .pod.p2 { order: 1; --sc: #cfd8e3; } .pod.p3 { order: 3; --sc: #e39b5b; }
.pod.p1 .av { --s: calc(14 * var(--u)); animation-delay: 2.2s; } .pod.p2 .av { animation-delay: 1.4s; } .pod.p3 .av { animation-delay: .7s; }
.pod.p1 .step { height: calc(20 * var(--u)); animation-delay: 1.6s; } .pod.p2 .step { height: calc(14 * var(--u)); animation-delay: .9s; } .pod.p3 .step { height: calc(9 * var(--u)); animation-delay: .3s; }
.pod.p1 .crown { font-size: calc(5 * var(--u)); animation: popin .6s 2.6s both, bob 2s 3s infinite; }
@keyframes rise { from { transform: scaleY(0); } }
.awards { display: flex; gap: calc(1.4 * var(--u)); flex-wrap: wrap; justify-content: center; }
.award { background: var(--card); border-radius: calc(1.4 * var(--u)); padding: .5em 1em; display: flex; align-items: center; gap: .6em; font-size: calc(1.6 * var(--u)); animation: popin .6s both; animation-delay: calc(3s + var(--i) * .3s); backdrop-filter: blur(6px); }
.award .av { --s: calc(4 * var(--u)); border-width: 3px; }
.award b { display: block; font-size: 1.1em; }
.end-rest { color: var(--muted); font-size: calc(1.6 * var(--u)); font-weight: 700; }
.end-btns { display: flex; gap: calc(2 * var(--u)); align-items: center; }
.kids-end .av { --s: calc(9 * var(--u)); }

/* ───────── Effets (jokers), toast, contrôles ───────── */
#fxLayer { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.fx { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); background: rgba(10,10,30,.88); border: 4px solid var(--c); border-radius: calc(2 * var(--u));
  padding: calc(1.5 * var(--u)) calc(3 * var(--u)); display: flex; align-items: center; gap: calc(1.6 * var(--u)); font-size: calc(3 * var(--u)); font-weight: 900; box-shadow: 0 20px 80px rgba(0,0,0,.6);
  animation: fxin 2.6s cubic-bezier(.2,1.4,.4,1) both; white-space: nowrap; }
.fx .e { font-size: 2.2em; animation: shake .4s .3s 3; }
.fx .av { --s: calc(6 * var(--u)); }
.fx small { display: block; font-size: .55em; color: var(--muted); }
@keyframes fxin { 0% { transform: translate(-50%, -50%) scale(0) rotate(-10deg); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; } 25%, 80% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -150%) scale(.8); opacity: 0; } }
.confetti { position: fixed; top: -20px; width: 12px; height: 18px; z-index: 40; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
#toast { position: fixed; bottom: 6%; left: 50%; transform: translateX(-50%) translateY(200%); background: #fff; color: #222; font-weight: 800; padding: .8em 1.4em; border-radius: 999px; font-size: calc(1.8 * var(--u)); transition: transform .4s cubic-bezier(.2,1.4,.4,1), opacity .3s; opacity: 0; z-index: 60; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
#toast.on { transform: translateX(-50%) translateY(0); opacity: 1; }
#controls { position: fixed; right: 14px; bottom: 14px; display: flex; gap: 6px; z-index: 70; opacity: .25; transition: opacity .3s; }
#controls:hover { opacity: 1; }
#controls button { width: 44px; height: 44px; border-radius: 12px; background: rgba(0,0,0,.45); font-size: 20px; backdrop-filter: blur(6px); }
#controls button:hover { background: rgba(255,255,255,.25); }
#pausedBanner { position: fixed; inset: 0; display: none; place-items: center; font-size: calc(10 * var(--u)); font-weight: 900; background: rgba(0,0,0,.55); z-index: 65; backdrop-filter: blur(4px); }
body.paused #pausedBanner { display: grid; }
.bt-reveal { display: flex; align-items: center; gap: calc(3 * var(--u)); }
.bt-reveal img { width: calc(17 * var(--u)); height: calc(17 * var(--u)); border-radius: calc(1.4 * var(--u)); box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: popin .8s both; }
.bt-reveal .t { font-size: calc(4.4 * var(--u)); font-weight: 900; color: var(--c); }
.bt-reveal .a { font-size: calc(3 * var(--u)); font-weight: 800; }
.bt-reveal .y { font-size: calc(2 * var(--u)); color: var(--muted); font-weight: 700; }
.mini-tag { font-size: .7em; padding: .05em .4em; border-radius: .4em; background: rgba(0,0,0,.3); margin-left: .3em; }
.av.noanim { animation: none !important; }
.qbar { flex: none; }
.qzone { padding: 0 calc(1.5 * var(--u)); }
.choice.neutral { --cc: rgba(255,255,255,.18) !important; }
.choices.kidrow { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
