:root{
  --bg:#12101c;
  --bg-2:#181527;
  --surface:#1f1b33;
  --surface-2:#2a2545;
  --line:#3a3459;
  --ink:#f6f2ea;
  --muted:#a9a2c4;
  --accent:#ff5d8f;
  --accent-ink:#2a0614;
  --gold:#ffd23f;
  --ok:#3ddc97;
  --ko:#ff6b6b;
  --radius:18px;
  --display:"Bricolage Grotesque", system-ui, sans-serif;
  --body:"DM Sans", system-ui, sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0}
body{
  background:
    radial-gradient(1200px 600px at 85% -10%, #3a1f4f 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, #1d2f4f 0%, transparent 60%),
    var(--bg);
  background-attachment:fixed;
  color:var(--ink);
  font-family:var(--body);
  font-size:16px;
  line-height:1.45;
  min-height:100vh;
  -webkit-tap-highlight-color:transparent;
}
button{font:inherit;color:inherit;cursor:pointer}
.hidden{display:none !important}
.muted{color:var(--muted)}
.small{font-size:.85rem}

/* ---------- barre du haut ---------- */
.topbar{
  position:sticky;top:0;z-index:20;
  display:flex;align-items:center;justify-content:space-between;
  padding:12px max(16px, env(safe-area-inset-left));
  background:rgba(18,16,28,.82);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(255,255,255,.05);
}
.brand{display:flex;align-items:center;gap:10px;background:none;border:0;font-family:var(--display);font-size:1.25rem;font-weight:600;letter-spacing:-.01em;padding:0}
.brand b{color:var(--accent);font-weight:800}
.brand-disc{width:26px;height:26px;border-radius:50%;
  background:radial-gradient(circle,var(--accent) 0 18%,#111 19% 22%,#2b2b2b 23% 100%);
  box-shadow:inset 0 0 0 2px #000, 0 0 0 1px #444}
.topbar-actions{display:flex;gap:8px}

main{max-width:1100px;margin:0 auto;padding:20px 16px 80px}

/* ---------- boutons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  background:var(--accent);color:var(--accent-ink);
  border:0;border-radius:999px;padding:12px 22px;
  font-weight:700;font-size:1rem;
  box-shadow:0 6px 0 #b8325f;
  transition:transform .08s, box-shadow .08s, opacity .2s;
}
.btn:active{transform:translateY(4px);box-shadow:0 2px 0 #b8325f}
.btn:disabled{opacity:.4;cursor:not-allowed;transform:none}
.btn-big{width:100%;padding:16px 22px;font-size:1.1rem}
.btn-alt{background:var(--gold);color:#2b2100;box-shadow:0 6px 0 #b58f12}
.btn-alt:active{box-shadow:0 2px 0 #b58f12}
.btn-ghost{
  background:transparent;border:1px solid var(--line);border-radius:999px;
  padding:9px 16px;font-weight:500;color:var(--ink);
}
.btn-ghost:hover{border-color:var(--muted)}
.btn-ghost:disabled{opacity:.4;cursor:not-allowed}
.back{background:none;border:0;color:var(--muted);padding:0;margin-bottom:16px}

/* ---------- accueil ---------- */
.hero{padding:28px 0 8px}
.eyebrow{text-transform:uppercase;letter-spacing:.16em;font-size:.75rem;color:var(--gold);margin:0 0 10px;font-weight:700}
.hero h1{
  font-family:var(--display);font-weight:800;
  font-size:clamp(2.6rem, 8vw, 5rem);line-height:.95;letter-spacing:-.03em;margin:0 0 18px;
}
.hero h1 em{font-style:normal;color:var(--accent)}
.lede{max-width:560px;color:var(--muted);font-size:1.05rem;margin:0}
.section-title{font-family:var(--display);font-size:1.3rem;margin:36px 0 14px;font-weight:600}

.resume{
  margin-top:24px;display:flex;gap:12px;align-items:center;justify-content:space-between;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px;
}
.resume div{display:flex;flex-direction:column}
.resume span{color:var(--muted);font-size:.9rem}

.cat-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
@media (min-width:720px){.cat-grid{grid-template-columns:repeat(4,1fr)}}
.cat{
  position:relative;overflow:hidden;text-align:left;
  border:0;border-radius:var(--radius);padding:16px;min-height:150px;
  display:flex;flex-direction:column;justify-content:space-between;
  background:var(--c1);color:#16121f;
  box-shadow:0 6px 0 var(--c2);
  transition:transform .12s, box-shadow .12s;
}
.cat:hover{transform:translateY(-2px);box-shadow:0 8px 0 var(--c2)}
.cat:active{transform:translateY(4px);box-shadow:0 2px 0 var(--c2)}
.cat::after{ /* sillons de vinyle en décor */
  content:"";position:absolute;right:-50px;bottom:-50px;width:150px;height:150px;border-radius:50%;
  background:repeating-radial-gradient(circle, rgba(0,0,0,.14) 0 2px, transparent 2px 6px);
  opacity:.6;pointer-events:none;
}
.cat-label{font-family:var(--display);font-weight:800;font-size:clamp(2.1rem, 9vw, 2.6rem);line-height:1;letter-spacing:-.04em}
.cat-name{font-weight:700;font-size:1rem;line-height:1.2}
.cat-range{font-size:.8rem;opacity:.75}
.cat-count{display:inline-block;margin-top:6px;font-size:.72rem;font-weight:700;background:rgba(0,0,0,.13);padding:2px 8px;border-radius:999px}
.cat-count:empty{display:none}

/* ---------- configuration ---------- */
.setup-head{display:flex;gap:16px;align-items:center;margin-bottom:20px}
.setup-head h2{font-family:var(--display);margin:0;font-size:1.7rem;letter-spacing:-.02em}
.setup-head p{margin:2px 0 0}
.cat-badge{width:72px;height:72px;border-radius:16px;display:grid;place-items:center;
  font-family:var(--display);font-weight:800;font-size:1.6rem;color:#16121f;background:var(--c1);box-shadow:0 5px 0 var(--c2);flex:none}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:18px;margin-bottom:16px}
.panel h3{margin:0 0 6px;font-family:var(--display);font-size:1.1rem}
.player-list{display:flex;flex-direction:column;gap:8px;margin:12px 0}
.player-row{display:flex;gap:8px;align-items:center}
.player-row .dot{width:14px;height:14px;border-radius:50%;flex:none}
.player-row input{
  flex:1;min-width:0;background:var(--bg-2);border:1px solid var(--line);border-radius:12px;
  padding:11px 12px;color:var(--ink);font:inherit;font-size:16px;
}
.player-row input:focus{outline:2px solid var(--accent);outline-offset:1px}
.player-row .rm{background:none;border:0;color:var(--muted);font-size:1.3rem;width:36px;height:36px;border-radius:50%}
.player-row .rm:hover{background:var(--surface-2)}
.add{width:100%}
.seg{display:inline-flex;background:var(--bg-2);border:1px solid var(--line);border-radius:999px;padding:4px;margin:8px 0 16px}
.seg button{background:none;border:0;border-radius:999px;padding:8px 20px;font-weight:700;color:var(--muted)}
.seg button.on{background:var(--ink);color:var(--bg)}
.toggle{display:flex;align-items:center;gap:12px;cursor:pointer}
.toggle input{position:absolute;opacity:0;pointer-events:none}
.toggle .track{width:46px;height:28px;border-radius:999px;background:var(--line);position:relative;flex:none;transition:background .2s}
.toggle .knob{position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;transition:transform .2s}
.toggle input:checked + .track{background:var(--ok)}
.toggle input:checked + .track .knob{transform:translateX(18px)}
.toggle input:focus-visible + .track{outline:2px solid var(--accent);outline-offset:2px}

/* ---------- jeu ---------- */
.scoreboard{display:flex;gap:8px;overflow-x:auto;padding-bottom:6px;margin-bottom:14px;scrollbar-width:none}
.scoreboard::-webkit-scrollbar{display:none}
.score{
  flex:none;display:flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--line);
  border-radius:999px;padding:6px 12px 6px 6px;font-size:.88rem;white-space:nowrap;
}
.score.active{border-color:var(--pc);box-shadow:0 0 0 1px var(--pc) inset}
.score .av{width:26px;height:26px;border-radius:50%;background:var(--pc);color:#16121f;display:grid;place-items:center;font-weight:800;font-size:.8rem}
.score .n{font-weight:700}
.score .c{color:var(--muted)}
.score .tk{color:var(--gold);letter-spacing:-2px}
.score .lives{color:var(--ko)}

.game-layout{display:grid;gap:20px}
@media (min-width:860px){
  .game-layout{grid-template-columns:360px 1fr;align-items:start}
  .deck-col{position:sticky;top:76px}
}
.deck-col{display:flex;flex-direction:column;align-items:center;text-align:center}
.turn-label{font-family:var(--display);font-size:1.35rem;font-weight:700;margin-bottom:12px}
.turn-label span{color:var(--pc, var(--accent))}

.player-card{
  width:min(300px, 62vw);aspect-ratio:1;position:relative;
  perspective:900px;
}
.mystery{position:absolute;inset:0;display:grid;place-items:center}
.ring{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg)}
.ring-bg{fill:none;stroke:var(--surface-2);stroke-width:4}
.ring-fg{fill:none;stroke:var(--pc, var(--accent));stroke-width:4;stroke-linecap:round;stroke-dasharray:351.86;stroke-dashoffset:351.86;transition:stroke-dashoffset .25s linear}
.vinyl{
  width:86%;aspect-ratio:1;border-radius:50%;
  background:
    radial-gradient(circle, transparent 0 31%, rgba(255,255,255,.06) 31.5% 32%, transparent 32.5%),
    repeating-radial-gradient(circle, #151515 0 1.5px, #222 1.5px 3px),
    #111;
  box-shadow:0 18px 40px rgba(0,0,0,.5), inset 0 0 0 2px #000;
  display:grid;place-items:center;
}
.vinyl::before{ /* reflet */
  content:"";position:absolute;width:86%;aspect-ratio:1;border-radius:50%;
  background:conic-gradient(from 30deg, transparent 0 10%, rgba(255,255,255,.08) 14%, transparent 20% 60%, rgba(255,255,255,.06) 64%, transparent 70%);
  pointer-events:none;
}
.vinyl-label{width:34%;aspect-ratio:1;border-radius:50%;background:var(--pc, var(--accent));box-shadow:inset 0 0 0 3px rgba(0,0,0,.25)}
.vinyl.spin{animation:spin 2.4s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.play{
  position:absolute;width:64px;height:64px;border-radius:50%;border:0;
  background:var(--ink);color:var(--bg);display:grid;place-items:center;
  box-shadow:0 6px 18px rgba(0,0,0,.4);
}
.play svg{width:30px;height:30px;fill:currentColor}
.play .ico-pause{display:none}
.play.playing .ico-play{display:none}
.play.playing .ico-pause{display:block}
.play.loading{animation:pulse 1s ease-in-out infinite}
@keyframes pulse{50%{opacity:.5}}

.revealed{
  position:absolute;inset:0;border-radius:22px;padding:22px 18px;
  background:var(--yc);color:#16121f;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  box-shadow:0 18px 40px rgba(0,0,0,.45);
  animation:flipIn .55s cubic-bezier(.2,.8,.2,1);
}
@keyframes flipIn{from{transform:rotateY(90deg) scale(.9);opacity:.2}to{transform:none;opacity:1}}
.revealed img{width:84px;height:84px;border-radius:10px;object-fit:cover;box-shadow:0 4px 12px rgba(0,0,0,.25);margin-bottom:6px}
.rev-year{font-family:var(--display);font-weight:800;font-size:3.6rem;line-height:1;letter-spacing:-.04em}
.rev-title{font-weight:700;font-size:1.1rem;line-height:1.2}
.rev-artist{font-size:.95rem;opacity:.8}
.rev-link{margin-top:6px;font-size:.8rem;color:inherit;opacity:.75}

.status{min-height:2.9em;margin:14px 0 8px;color:var(--muted);max-width:340px}
.status b{color:var(--ink)}
.status.ok{color:var(--ok)}
.status.ko{color:var(--ko)}
.actions{display:flex;flex-direction:column;gap:10px;width:100%;max-width:340px}
.actions .row{display:flex;gap:8px}
.actions .row > *{flex:1}

.challenges{width:100%;max-width:340px;margin:0 0 12px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px;text-align:left}
.challenges h4{margin:0 0 4px;font-family:var(--display)}
.challenges .list{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.chal{border:1px solid var(--line);background:var(--bg-2);border-radius:999px;padding:7px 12px;font-size:.88rem;display:flex;align-items:center;gap:6px}
.chal .d{width:10px;height:10px;border-radius:50%;background:var(--pc)}
.chal.on{border-color:var(--pc);box-shadow:0 0 0 1px var(--pc) inset}
.chal.done{opacity:.55}

/* frise */
.timeline-col{background:var(--surface);border:1px solid var(--line);border-radius:22px;padding:16px}
.timeline-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:10px;flex-wrap:wrap}
.timeline-head h3{margin:0;font-family:var(--display);font-size:1.15rem}
.timeline{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;align-items:stretch}
.tl-card{
  display:flex;align-items:center;gap:14px;
  background:var(--yc);color:#16121f;border-radius:14px;padding:10px 14px;
  box-shadow:0 3px 0 rgba(0,0,0,.25);
}
.tl-card .y{font-family:var(--display);font-weight:800;font-size:1.6rem;letter-spacing:-.03em;min-width:3.2ch}
.tl-card .meta{display:flex;flex-direction:column;min-width:0}
.tl-card .t{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tl-card .a{font-size:.85rem;opacity:.75;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tl-card.new{animation:pop .6s cubic-bezier(.2,1.4,.4,1)}
@keyframes pop{from{transform:scale(.6);opacity:0}}
.tl-card.ghost{background:repeating-linear-gradient(135deg,var(--surface-2) 0 10px,var(--line) 10px 20px);color:var(--ink);border:2px dashed var(--accent)}
.tl-card.ghost.wrong{border-color:var(--ko);opacity:.6;text-decoration:line-through}

.slot{
  position:relative;isolation:isolate;width:100%;margin:4px 0;height:30px;border-radius:10px;border:2px dashed transparent;
  background:none;display:flex;align-items:center;justify-content:center;gap:6px;
  color:var(--muted);font-size:.8rem;
  transition:background .15s, border-color .15s, height .15s;
}
.slot::before{content:"";position:absolute;left:24px;right:24px;top:50%;height:2px;background:var(--line);z-index:-1}
.slot.pickable{border-color:var(--line);height:40px;cursor:pointer}
.slot.pickable:hover{border-color:var(--accent);color:var(--ink);background:rgba(255,93,143,.08)}
.slot.pickable::after{content:"Placer ici";background:var(--surface);padding:0 8px}
.slot.taken{border-color:transparent;cursor:not-allowed}
.slot.correct{border-color:var(--ok);background:rgba(61,220,151,.12);color:var(--ok);height:40px}
.slot.correct::after{content:"Bonne place";background:var(--surface);padding:0 8px}
.chip{display:inline-flex;align-items:center;gap:4px;background:var(--pc);color:#16121f;font-weight:700;font-size:.75rem;padding:3px 8px;border-radius:999px;z-index:1}
.chip.wrong{opacity:.45;text-decoration:line-through}
.slot:not(.pickable):not(.correct) + .tl-card{margin-top:0}
.tl-wrap{display:flex;flex-direction:column}
.tl-empty{color:var(--muted);text-align:center;padding:20px}

/* ---------- overlay ---------- */
.overlay{position:fixed;inset:0;z-index:50;background:rgba(10,8,18,.88);backdrop-filter:blur(8px);display:grid;place-items:center;padding:20px}
.overlay-card{width:min(420px,100%);text-align:center;background:var(--surface);border:1px solid var(--line);border-radius:26px;padding:30px 22px}
.overlay-card h2{font-family:var(--display);font-size:2.6rem;margin:4px 0 6px;letter-spacing:-.03em;color:var(--pc, var(--accent))}
.overlay-card .btn{margin-top:18px}

/* ---------- fin ---------- */
.end-box{max-width:520px;margin:30px auto;text-align:center}
.end-box h1{font-family:var(--display);font-size:clamp(2.2rem,7vw,3.6rem);letter-spacing:-.03em;margin:0 0 20px;line-height:1}
.ranking{list-style:none;padding:0;margin:0 0 24px;text-align:left;display:flex;flex-direction:column;gap:8px}
.ranking li{display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:12px 14px}
.ranking .pos{font-family:var(--display);font-weight:800;font-size:1.4rem;width:1.6ch;color:var(--muted)}
.ranking li:first-child{border-color:var(--gold)}
.ranking li:first-child .pos{color:var(--gold)}
.ranking .nm{flex:1;font-weight:700}
.end-actions{display:flex;flex-direction:column;gap:10px;align-items:center}

/* ---------- dialog règles ---------- */
dialog{
  background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:22px;
  max-width:520px;width:calc(100% - 32px);padding:22px;
}
dialog::backdrop{background:rgba(8,6,14,.75)}
dialog h2{font-family:var(--display);margin:0 0 10px}
dialog ol{padding-left:20px;margin:0 0 10px}
dialog li{margin-bottom:8px}
dialog .btn{width:100%;margin-top:8px}

/* ---------- toast & confettis ---------- */
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:60;background:var(--ink);color:var(--bg);padding:10px 18px;border-radius:999px;font-weight:600;box-shadow:0 8px 24px rgba(0,0,0,.4);max-width:calc(100% - 32px);text-align:center}
.confetti{position:fixed;top:-12px;width:10px;height:14px;z-index:70;pointer-events:none;animation:fall linear forwards}
@keyframes fall{to{transform:translateY(110vh) rotate(720deg)}}

@media (prefers-reduced-motion: reduce){
  *{animation:none !important;transition:none !important}
}

@media (max-width:859px){
  .player-card{width:min(240px, 58vw)}
  .turn-label{margin-bottom:8px}
}

.sub-list{display:flex;flex-direction:column;gap:12px;margin-top:12px}
.rev-kind{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.12em;background:rgba(0,0,0,.14);padding:3px 10px;border-radius:999px;margin-bottom:4px}

/* ---------- mode en ligne ---------- */
.join-box{margin-top:24px}
.join-form{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.join-form input{flex:1 1 140px;min-width:0;background:var(--bg-2);border:1px solid var(--line);border-radius:12px;padding:12px;color:var(--ink);font:inherit;font-size:16px}
.join-form input:focus{outline:2px solid var(--accent);outline-offset:1px}
.join-form .code-input{flex:0 0 120px;text-transform:uppercase;font-family:var(--display);font-weight:800;letter-spacing:.18em;text-align:center}
.join-form .btn{flex:1 1 120px}
.seg-sm{margin:0}
.seg-sm button{padding:6px 12px;font-size:.82rem}
#modeSeg{flex-wrap:wrap}
.code-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}
.code-bar-right{display:flex;align-items:center;gap:8px}
.code{font-family:var(--display);font-weight:800;font-size:2rem;letter-spacing:.14em;line-height:1;color:var(--gold)}
.net{font-size:.75rem;color:var(--ko);border:1px solid var(--ko);border-radius:999px;padding:3px 9px}
.me-chip{display:inline-flex;align-items:center;gap:6px;font-weight:700;background:var(--surface);border:1px solid var(--pc,var(--line));border-radius:999px;padding:6px 12px}
.lobby-grid{display:grid;gap:16px}
@media (min-width:760px){.lobby-grid{grid-template-columns:300px 1fr}}
.qr-panel{text-align:center}
.qr{background:#fff;border-radius:14px;padding:12px;display:inline-block;min-width:200px;min-height:200px}
.qr svg{display:block;width:200px;height:200px;margin:0 auto}
.lobby-list{list-style:none;padding:0;margin:12px 0;display:flex;flex-wrap:wrap;gap:8px}
.lobby-list li{display:flex;align-items:center;gap:8px;background:var(--bg-2);border:1px solid var(--line);border-radius:999px;padding:6px 8px 6px 12px;font-weight:600}
.lobby-list li .d{width:10px;height:10px;border-radius:50%;background:var(--pc)}
.lobby-list li button{background:none;border:0;color:var(--muted);width:26px;height:26px;border-radius:50%}
.lobby-list li button:hover{background:var(--surface-2);color:var(--ink)}
.lobby-list .empty{background:none;border:1px dashed var(--line);color:var(--muted);font-weight:400;padding:10px 14px}
.pl-lobby{text-align:center;padding:30px 0}
.pl-lobby h2{font-family:var(--display);font-size:1.8rem;margin:18px 0 4px}
.pl-lobby .lobby-list{justify-content:center}
.small-vinyl{width:150px;margin:0 auto;position:relative}
.secret{
  width:100%;max-width:340px;margin-top:14px;border-radius:16px;padding:12px 14px;
  background:var(--yc);color:#16121f;display:grid;grid-template-columns:auto 1fr;gap:2px 14px;align-items:center;text-align:left;
  box-shadow:0 4px 0 rgba(0,0,0,.25);
}
.secret .lock{grid-column:1/-1;font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;opacity:.7}
.secret .y{font-family:var(--display);font-weight:800;font-size:2.4rem;letter-spacing:-.03em;grid-row:span 2}
.secret .t{font-weight:700;line-height:1.2}
.secret .a{font-size:.88rem;opacity:.8}
.verdict-hint{display:inline-block;font-weight:700;padding:2px 10px;border-radius:999px;margin-top:4px}
.verdict-hint.ok{background:rgba(61,220,151,.15);color:var(--ok)}
.verdict-hint.ko{background:rgba(255,107,107,.15);color:var(--ko)}
.btn-ko{background:transparent;border:1px solid var(--ko);color:var(--ko);border-radius:999px;padding:12px 18px;font-weight:700}
.btn.dim{background:var(--surface-2);color:var(--ink);box-shadow:0 6px 0 #17142a}
.tl-hint{margin:0 0 8px}
.score.kickable{cursor:pointer}

.guess-row{display:flex;flex-direction:column;gap:6px;text-align:left}
.guess-row label{font-size:.85rem;color:var(--muted)}
.guess-row input{background:var(--bg-2);border:1px solid var(--line);border-radius:12px;padding:12px;color:var(--ink);font:700 1.3rem var(--display);text-align:center;letter-spacing:.08em;width:100%}
.guess-row input:focus{outline:2px solid var(--accent);outline-offset:1px}
.guess-big{font-family:var(--display);font-size:2.2rem;font-weight:800;color:var(--gold);line-height:1}

.audio-opts{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
#audioSeg{flex-wrap:wrap}
.audio-ctl{width:100%;max-width:340px;margin-top:12px;display:flex;flex-direction:column;align-items:center;gap:8px}
.audio-ctl .seg{margin:0}
.audio-ctl-row{display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap}
.toggle-sm .track{width:38px;height:22px}
.toggle-sm .knob{width:16px;height:16px}
.toggle-sm input:checked + .track .knob{transform:translateX(16px)}
.btn-xs{padding:6px 12px;font-size:.82rem}
.pl-play{position:absolute;width:64px;height:64px;border-radius:50%;border:0;background:var(--ink);color:var(--bg);display:grid;place-items:center;box-shadow:0 6px 18px rgba(0,0,0,.4)}
.pl-play svg{width:30px;height:30px;fill:currentColor}
.pl-play .ico-pause{display:none}
.pl-play.playing .ico-play{display:none}
.pl-play.playing .ico-pause{display:block}
.pl-play.nudge{animation:pulse 1s ease-in-out infinite}
.sound-hint{color:var(--gold);font-weight:700}

.choice-list{display:flex;flex-direction:column;gap:8px;margin:10px 0 16px}
.choice-list button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;background:var(--bg-2);border:2px solid var(--line);border-radius:14px;padding:12px 14px;color:var(--ink);cursor:pointer}
.choice-list button span{font-size:.85rem;color:var(--muted)}
.choice-list button:hover{border-color:var(--muted)}
.choice-list button.on{border-color:var(--accent);background:rgba(255,93,143,.10)}
.choice-list button.on b::after{content:" ✓";color:var(--accent)}
.lobby-audio{display:flex;flex-direction:column;align-items:flex-start;gap:6px;margin:4px 0 16px}

/* ---------- partie en ligne : réponses, validation, chat ---------- */
.right-col{display:flex;flex-direction:column;gap:16px;min-width:0}
.text-input{width:100%;background:var(--bg-2);border:1px solid var(--line);border-radius:12px;padding:11px 12px;color:var(--ink);font:inherit;font-size:16px}
.text-input:focus{outline:2px solid var(--accent);outline-offset:1px}
.answer-box,.judge-box{width:100%;max-width:340px;display:flex;flex-direction:column;gap:8px;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px;margin-bottom:12px}
.answer-box h4,.judge-box h4{margin:0;font-family:var(--display)}
.judge-box{border-color:var(--gold)}
.judge-answer{background:var(--bg-2);border-radius:12px;padding:10px 12px;font-size:.95rem;line-height:1.5}
.judge-answer b{color:var(--gold)}
.judge-row{display:flex;justify-content:space-between;align-items:center;gap:8px}
.judge-row .seg{margin:0}
.judge-row .seg button[data-v="1"].on{background:var(--ok);color:#06281a}
.judge-row .seg button[data-v="0"].on{background:var(--ko);color:#2a0606}
.chat h3{margin:0 0 8px;font-family:var(--display);font-size:1.05rem}
.chat-list{list-style:none;margin:0;padding:0;max-height:260px;min-height:80px;overflow-y:auto;display:flex;flex-direction:column;gap:6px;scroll-behavior:smooth}
.chat-list li{font-size:.92rem;line-height:1.35;word-wrap:break-word}
.chat-list .who{font-weight:700;margin-right:6px}
.chat-list .sys{color:var(--muted);font-size:.84rem;font-style:italic}
.chat-list .empty{color:var(--muted);font-size:.85rem}
.chat-form{display:flex;gap:8px;margin-top:10px}
.chat-form .btn{padding:10px 16px;box-shadow:0 4px 0 #b8325f}
.dj-plays{display:flex;flex-direction:column;gap:8px;margin:6px 0 14px;padding:12px;border:1px dashed var(--line);border-radius:14px}
.dj-plays p{margin:0}
.score .djtag{font-size:.65rem;font-weight:800;background:var(--gold);color:#2b2100;border-radius:999px;padding:1px 6px}
.score .vtag{font-size:.65rem;font-weight:800;border:1px solid var(--gold);color:var(--gold);border-radius:999px;padding:1px 6px}
.audio-opts h3.mt{margin-top:18px}

.rev-link-btn{display:inline-block;margin-top:10px;padding:7px 14px;border-radius:999px;background:rgba(0,0,0,.18);color:inherit;font-weight:700;font-size:.85rem;text-decoration:none;opacity:1}
.rev-link-btn:hover{background:rgba(0,0,0,.28)}

.invite-dialog h2{margin-bottom:4px}
.inv-preview{white-space:pre-wrap;word-break:break-word;background:var(--bg-2);border:1px solid var(--line);border-radius:12px;padding:12px;margin:8px 0 14px;font:inherit;font-size:.92rem;line-height:1.45}
.inv-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.inv-grid #invShare{grid-column:1/-1}
.inv-btn{display:flex;align-items:center;justify-content:center;gap:6px;background:var(--surface-2);border:1px solid var(--line);border-radius:14px;padding:12px;color:var(--ink);text-decoration:none;font:600 .95rem var(--body);cursor:pointer}
.inv-btn:hover{border-color:var(--muted)}
#invCopy{grid-column:1/-1}
.inv-close{width:100%;margin-top:12px}
