@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap');
:root{color-scheme:dark;--bg:#161716;--carte:#22251f;--trait:#3d4136;--paper:#f5f1e7;--muted:#a7aaa0;--lime:#d8fc75;--corail:#fd977b;--rouge:#ff6b6b}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--paper);font-family:'DM Sans',sans-serif;overflow-x:hidden}
body{min-height:100svh}
button,input{font:inherit;color:inherit}
button{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
[hidden]{display:none!important}
.primary{background:var(--lime);border:0;color:#1c2410;font-weight:700;padding:15px 26px;border-radius:999px;font-size:17px;transition:transform .15s}
.primary:active{transform:scale(.96)}
.discret{background:none;border:0;color:var(--muted);text-decoration:underline;text-underline-offset:4px;padding:10px}
.rond{width:38px;height:38px;border-radius:50%;border:1px solid var(--trait);background:none;color:var(--muted)}

/* ---------- Disque vinyle ---------- */
.vinyl{width:180px;height:180px;border-radius:50%;border:0;padding:0;display:grid;place-items:center;
  background:radial-gradient(circle at 35% 30%,rgba(255,255,255,.14),transparent 40%),repeating-radial-gradient(#111210 0 2px,#1d1f1b 3px 4px);
  box-shadow:0 10px 30px rgba(0,0,0,.6),inset 0 0 0 6px #0c0d0b}
.vinyl.tourne,.joue .vinyl{animation:tourne 1.8s linear infinite}
.etiquette{width:40%;height:40%;border-radius:50%;background:var(--corail);display:grid;place-items:center;color:#222;font:700 26px 'Space Grotesk',sans-serif;position:relative;background-size:cover;background-position:center}
.etiquette::after{content:"";position:absolute;width:9px;height:9px;border-radius:50%;background:#111}
.etiquette span{font-size:10px;position:absolute;right:16%}
.etiquette .icone{position:static;font-size:20px;color:#222;z-index:1;text-shadow:0 0 6px rgba(255,255,255,.6)}
@keyframes tourne{to{transform:rotate(360deg)}}

/* ---------- Accueil, règles et équipes ---------- */
#setup{max-width:460px;margin:0 auto;padding:28px 20px 40px;text-align:center;min-height:100svh;display:flex;flex-direction:column}
.etape{display:none;flex-direction:column;align-items:center;flex:1}
.etape.on{display:flex;animation:etape .45s cubic-bezier(.2,.9,.3,1.1)}
.etape.on.arriere{animation-name:etape-arriere}
@keyframes etape{from{opacity:0;transform:translateX(40px)}}
@keyframes etape-arriere{from{opacity:0;transform:translateX(-40px)}}
.hero-disc{position:relative;display:grid;place-items:center;margin:30px 0 10px}
.hero-disc .vinyl{width:170px;height:170px;animation-duration:3s}
h1{font:700 60px/.95 'Space Grotesk',sans-serif;letter-spacing:-3px;margin:14px 0 14px}
h1 span,.logo span{color:var(--lime);font-size:.35em;vertical-align:.9em;margin-left:2px}
h2{font:700 32px/1.1 'Space Grotesk',sans-serif;letter-spacing:-1px;margin:6px 0 10px}
.accroche{color:var(--muted);font-size:19px;line-height:1.5;margin:0 0 30px}
.texte{color:var(--muted);font-size:16.5px;line-height:1.55;margin:0 0 18px;max-width:340px}
.numero{color:var(--lime);font-size:12px;letter-spacing:.15em;margin:0}
.primary.grand{font-size:20px;padding:18px 44px}
.nav{display:flex;gap:12px;align-items:center;justify-content:center;margin-top:auto;padding-top:22px;width:100%}
.nav .primary{flex:1;max-width:300px}
.retour{width:52px;height:52px;border-radius:50%;border:1px solid var(--trait);background:none;font-size:20px;color:var(--muted);flex-shrink:0}
#deja{margin-top:12px}
.note{position:absolute;color:var(--lime);font-size:26px;opacity:0;animation:note 3s ease-out infinite}
.note.n2{color:var(--corail);animation-delay:1s}.note.n3{animation-delay:2s;color:#8fd3ff}.note.n4{animation-delay:1.5s;color:#ffd84d}
@keyframes note{0%{opacity:0;transform:translate(0,0) scale(.5)}20%{opacity:1}100%{opacity:0;transform:translate(var(--x,70px),-120px) rotate(25deg) scale(1.2)}}
.n1{--x:80px}.n2{--x:-80px}.n3{--x:30px}.n4{--x:-40px}

/* Scènes des règles */
.scene{height:230px;width:100%;display:grid;place-items:center;margin:10px 0 6px}
.demo-ecoute{position:relative;display:grid;place-items:center}
.demo-ecoute .vinyl{width:170px;height:170px}
.demo-ecoute .etiquette{font-size:30px}
.demo-place,.demo-gagne{position:relative;display:flex;align-items:center;gap:10px;padding-top:40px}
.mini{width:84px;height:84px;border-radius:8px;display:grid;place-items:end center;padding-bottom:6px;font:700 18px 'Space Grotesk',sans-serif;box-shadow:0 8px 20px rgba(0,0,0,.5)}
.mini b{background:rgba(0,0,0,.55);padding:1px 8px;border-radius:999px;color:var(--lime)}
.mini.c1{background:linear-gradient(135deg,#ff8a5c,#b8327a)}
.mini.c2{background:linear-gradient(135deg,#3fb8ff,#3b3bb8)}
.mini-trou{width:84px;height:84px;border:2px dashed var(--lime);border-radius:8px;animation:trou 3.2s ease-in-out infinite}
@keyframes trou{0%,30%{opacity:.35}45%,80%{opacity:1;background:rgba(216,252,117,.12)}100%{opacity:.35}}
.mini.volante{position:absolute;left:94px;top:40px;place-items:center;padding:0;font-size:38px;color:#fff;background:linear-gradient(135deg,#9a7bff,#ff6b9a);filter:saturate(1.2);animation:vole 3.2s ease-in-out infinite}
@keyframes vole{0%{transform:translate(70px,-110px) rotate(10deg)}15%{transform:translate(70px,-110px) rotate(10deg)}55%,85%{transform:translate(0,0) rotate(0)}100%{transform:translate(0,0);opacity:0}}
.doigt{position:absolute;left:150px;top:96px;font-size:30px;animation:doigt 3.2s ease-in-out infinite}
@keyframes doigt{0%,15%{transform:translate(70px,-110px)}55%{transform:translate(0,0);opacity:1}70%,100%{opacity:0;transform:translate(10px,20px)}}
.mini.revelee{background:linear-gradient(135deg,#9a7bff,#ff6b9a);animation:revele 3s ease-in-out infinite}
@keyframes revele{0%{filter:blur(8px);transform:scale(.9)}25%{filter:blur(0);transform:scale(1.12);box-shadow:0 0 0 3px var(--lime),0 0 30px rgba(216,252,117,.6)}45%,100%{filter:blur(0);transform:scale(1);box-shadow:0 0 0 3px var(--lime)}}
.eclat{position:absolute;left:50%;top:60%;font-size:20px;opacity:0;animation:eclat 3s ease-out infinite}
.e1{--x:-90px;--y:-90px;color:var(--lime)}.e2{--x:80px;--y:-100px;color:var(--corail)}.e3{--x:-30px;--y:-130px;color:#8fd3ff}.e4{--x:110px;--y:-40px;color:#ffd84d}.e5{--x:-120px;--y:-30px;color:var(--paper)}
@keyframes eclat{0%,18%{opacity:0;transform:translate(0,0)}25%{opacity:1}60%{opacity:0;transform:translate(var(--x),var(--y)) rotate(200deg)}100%{opacity:0}}

/* Nombre d'équipes */
.compteur{display:flex;align-items:center;gap:26px;margin:10px 0 18px}
.compteur button{width:64px;height:64px;border-radius:50%;border:2px solid var(--trait);background:var(--carte);font-size:32px;line-height:1}
.compteur button:active{transform:scale(.9)}
.compteur button:disabled{opacity:.3}
#nb{font:700 96px/1 'Space Grotesk',sans-serif;min-width:80px;display:inline-block}
#nb.saute{animation:saute .35s cubic-bezier(.2,.9,.3,1.6)}
@keyframes saute{from{transform:scale(.6)}}
.bac{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;min-height:150px;max-width:340px;align-content:flex-start}
.bac .vinyl,.etagere .vinyl,.alignement .vinyl{width:68px;height:68px;animation:tombe-bac .55s cubic-bezier(.2,.9,.3,1.5) backwards,tourne 2.4s linear infinite}
.bac .vinyl.sort{animation:sort-bac .3s ease-in forwards}
@keyframes tombe-bac{from{transform:translateY(-90px) scale(.4);opacity:0}}
@keyframes sort-bac{to{transform:scale(0) rotate(180deg);opacity:0}}
.bac .etiquette,.etagere .etiquette,.alignement .etiquette{font-size:12px}

/* Noms */
.grand-disque{margin:4px 0 16px}
.grand-disque .vinyl{width:170px;height:170px;animation-duration:2.4s}
.grand-disque .etiquette{font-size:14px;line-height:1.1;padding:4px;text-align:center;overflow:hidden;word-break:break-word}
.grand-disque.envole .vinyl{animation:envole .5s ease-in forwards}
@keyframes envole{to{transform:translateY(200px) scale(.3) rotate(360deg);opacity:0}}
.saisie{display:flex;gap:8px;width:100%;max-width:340px}
.saisie input{margin:0;font-size:18px;text-align:center}
.rond.de{width:52px;height:52px;flex-shrink:0;font-size:24px;background:var(--carte)}
.de.roule{animation:roule .5s ease}
@keyframes roule{to{transform:rotate(360deg) scale(1.1)}}
.etagere{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin-top:20px}
.etagere figure,.alignement figure{margin:0;display:flex;flex-direction:column;align-items:center;gap:6px;font-size:12px;color:var(--muted);max-width:84px}
.etagere figure figcaption,.alignement figcaption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:84px}
.alignement{display:flex;flex-wrap:wrap;justify-content:center;gap:14px;margin:6px 0 22px}
.alignement figure{animation:entre .5s backwards}
.alignement figcaption{color:var(--paper);font-weight:600;font-size:13px}
.carte-reglages{background:var(--carte);border:1px solid var(--trait);border-radius:20px;padding:18px;text-align:left;display:grid;gap:14px;width:100%}
label{font-size:13px;color:var(--muted)}
input{width:100%;margin-top:8px;padding:13px 14px;background:#161a13;border:1px solid var(--trait);border-radius:12px}
.ligne{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;color:var(--muted);flex-wrap:wrap}
.pilules{display:flex;background:#161a13;border:1px solid var(--trait);border-radius:999px;padding:3px}
.pilules button{border:0;background:none;padding:7px 12px;border-radius:999px;font-size:14px;color:var(--muted)}
.pilules button.on{background:var(--lime);color:#1c2410;font-weight:700}
.pastille{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px;vertical-align:0}

/* ---------- Jeu ---------- */
#game{max-width:760px;margin:0 auto;padding:12px 16px 30px}
.barre{display:flex;align-items:center;gap:12px}
.logo{font:700 26px 'Space Grotesk',sans-serif;letter-spacing:-2px}
#scores{flex:1;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}
.score{flex-shrink:0;border:1px solid var(--trait);border-radius:999px;padding:5px 11px;font-size:13px;color:var(--muted);transition:.3s}
.score b{color:var(--paper);margin-left:4px}
.score.active{border-color:var(--lime);color:var(--lime);background:rgba(216,252,117,.08)}
.score.gagne{animation:pop .5s}
#banniere{text-align:center;margin:18px 0 6px;height:34px;overflow:hidden}
#tour-nom{display:inline-block;font:700 26px 'Space Grotesk',sans-serif;letter-spacing:-1px}
#tour-nom.entre{animation:banniere .6s cubic-bezier(.2,.9,.3,1.3)}
@keyframes banniere{from{transform:translateY(40px);opacity:0}}

/* La platine : la pochette à gauche, le disque qui sort et tourne, le bras */
.platine{position:relative;width:330px;height:200px;margin:8px auto 0}
.pochette-zone{position:absolute;left:0;top:10px;z-index:3}
.pochette{width:180px;height:180px;border-radius:8px;overflow:hidden;position:relative;background:linear-gradient(135deg,#3b4a2a,#262c1e);box-shadow:0 12px 30px rgba(0,0,0,.55)}
.pochette img{width:100%;height:100%;object-fit:cover;display:block}
.pochette.mystere img{filter:blur(16px) saturate(1.4);transform:scale(1.25)}
.pochette.mystere{cursor:grab;touch-action:none;animation:flotte 3s ease-in-out infinite}
.pochette.mystere:active{cursor:grabbing}
.point-q{position:absolute;inset:0;display:grid;place-items:center;font:700 64px 'Space Grotesk',sans-serif;color:rgba(255,255,255,.85);text-shadow:0 4px 20px rgba(0,0,0,.5)}
.pochette.levee{visibility:hidden}
@keyframes flotte{50%{transform:translateY(-5px) rotate(-1deg)}}
#disque{position:absolute;left:40px;top:20px;width:160px;height:160px;z-index:2;transition:left .7s cubic-bezier(.2,.9,.3,1)}
.sorti #disque,.joue #disque{left:150px}
.bras{position:absolute;right:10px;top:0;width:12px;height:120px;transform-origin:6px 6px;transform:rotate(-28deg);transition:transform .8s cubic-bezier(.3,1.4,.5,1);z-index:4}
.bras::before{content:"";position:absolute;left:0;top:0;width:12px;height:12px;border-radius:50%;background:#8b8f84}
.bras::after{content:"";position:absolute;left:4px;top:6px;width:4px;height:110px;background:linear-gradient(#c9ccc2,#8b8f84);border-radius:2px}
.bras .tete{position:absolute;left:-2px;bottom:-12px;width:14px;height:20px;background:#c9ccc2;border-radius:3px;z-index:1}
.joue .bras{transform:rotate(12deg)}
#statut{text-align:center;color:var(--muted);font-size:14px;margin:12px 0 18px;min-height:20px}

/* La frise */
.frise-tete{display:flex;justify-content:space-between;align-items:baseline;font-size:10px;opacity:.7;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
#consigne{font:700 17px 'Space Grotesk',sans-serif;color:var(--lime);text-align:center;margin:0 0 10px}
.frise{position:relative;display:flex;align-items:flex-start;overflow-x:auto;padding:14px 4px 18px;min-height:150px;scroll-behavior:smooth;justify-content:safe center}
.frise.change{animation:frise .5s ease}
@keyframes frise{from{opacity:0;transform:translateX(30px)}}
.case{flex-shrink:0;width:92px;text-align:center}
.case .pochette{width:92px;height:92px;border-radius:6px;box-shadow:0 6px 16px rgba(0,0,0,.5)}
.case .annee{font:700 22px 'Space Grotesk',sans-serif;color:var(--lime);margin-top:6px}
.case .titre{font-size:11px;color:var(--muted);line-height:1.25;margin-top:2px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.trou{flex-shrink:0;width:30px;height:92px;border:0;background:none;padding:0;position:relative;transition:width .25s ease}
.trou::before{content:"";position:absolute;left:50%;top:6px;bottom:6px;border-left:2px dashed #4d5046;transition:.25s}
.trou .plage{position:absolute;left:50%;top:100%;transform:translateX(-50%);white-space:nowrap;font-size:11px;color:var(--lime);opacity:0;transition:.2s;margin-top:8px}
.glisse .trou{width:40px}
.glisse .trou::before{border-color:var(--lime);opacity:.6}
.trou.vise,.trou:hover{width:104px}
.trou.vise::before,.trou:hover::before{left:6px;right:6px;border:2px dashed var(--lime);border-radius:8px;opacity:1;background:rgba(216,252,117,.07)}
.trou.vise .plage,.trou:hover .plage{opacity:1}
.revele .trou{display:none}.revele .case{margin:0 6px}#scores{padding:3px 2px}
.case.nouvelle .pochette{animation:pose .5s cubic-bezier(.2,.9,.3,1.4)}
.case.bon .pochette{box-shadow:0 0 0 3px var(--lime),0 0 30px rgba(216,252,117,.5)}
.case.faux .pochette{box-shadow:0 0 0 3px var(--rouge);animation:secoue .5s}
.case.faux .annee{color:var(--rouge)}
.case.tombe{animation:tombe .9s ease-in forwards}
@keyframes pose{from{transform:scale(1.3)}}
@keyframes secoue{20%,60%{transform:translateX(-7px) rotate(-3deg)}40%,80%{transform:translateX(7px) rotate(3deg)}}
@keyframes tombe{to{transform:translateY(160px) rotate(25deg);opacity:0}}
@keyframes pop{50%{transform:scale(1.25)}}

.actions{display:flex;justify-content:center;align-items:center;gap:14px;margin-top:6px;min-height:56px}
#suivant{animation:entre .4s cubic-bezier(.2,.9,.3,1.3)}
@keyframes entre{from{transform:translateY(20px);opacity:0}}

/* La pochette qu'on fait glisser */
#fantome{position:fixed;left:0;top:0;width:110px;height:110px;z-index:50;pointer-events:none;transform-origin:center;box-shadow:0 20px 40px rgba(0,0,0,.6)}
#fantome img{filter:blur(12px) saturate(1.4);transform:scale(1.25)}

/* Confettis et notes */
.confetti{position:fixed;z-index:60;pointer-events:none;font-size:18px;left:0;top:0}

/* Victoire */
#victoire{position:fixed;inset:0;z-index:40;background:rgba(10,11,9,.85);display:grid;place-items:center;padding:20px;animation:fondu .4s}
@keyframes fondu{from{opacity:0}}
.victoire-carte{background:var(--carte);border:1px solid var(--lime);border-radius:24px;padding:28px 22px;text-align:center;max-width:420px;width:100%;animation:entre .6s cubic-bezier(.2,.9,.3,1.3)}
.trophee{font-size:56px;animation:pop 1s infinite}
#gagnant{font:700 30px 'Space Grotesk',sans-serif;margin:6px 0 16px}
#mur{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin-bottom:20px}
#mur .pochette{width:56px;height:56px;border-radius:4px;animation:entre .4s backwards}

@media (max-width:420px){.platine{transform:scale(.92);transform-origin:top center;margin-bottom:-14px}h1{font-size:52px}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
/* Ajustements de l'onboarding */
#e-accueil{justify-content:center}
.scene{height:300px}
.demo-ecoute .vinyl{width:220px;height:220px}
.bac{gap:14px;min-height:200px}
.bac .vinyl{width:88px;height:88px}
.bac .etiquette{font-size:18px}
.etagere figure,.alignement figure,.etagere figure figcaption,.alignement figcaption{max-width:110px}
.alignement .vinyl{width:80px;height:80px}

/* Révélation : la chanson rejoue, pochette en grand, interrupteurs titre et artiste */
#revelation{position:fixed;inset:0;z-index:30;background:rgba(10,11,9,.88);display:grid;place-items:center;padding:16px;overflow:auto;animation:fondu .3s}
.rev-carte{background:var(--carte);border:1px solid var(--trait);border-radius:24px;padding:22px 20px;width:100%;max-width:400px;text-align:center}
.rev-carte.entre{animation:entre .5s cubic-bezier(.2,.9,.3,1.3)}
.rev-visuel{position:relative;width:min(62vw,230px);height:min(62vw,230px);margin:0 auto 4px}
.rev-visuel img{position:relative;z-index:1;width:100%;height:100%;object-fit:cover;border-radius:10px;box-shadow:0 18px 40px rgba(0,0,0,.6)}
.rev-vinyl{position:absolute;top:4%;left:4%;width:92%;height:92%;transition:left .8s cubic-bezier(.2,.9,.3,1)}
.joue .rev-vinyl{left:34%;animation:tourne 1.8s linear infinite}
.joue .rev-visuel{transform:translateX(-12%);transition:transform .8s}
.rev-visuel{transition:transform .8s}
.rev-annee{font:700 44px/1 'Space Grotesk',sans-serif;color:var(--lime);margin:16px 0 4px}
.rev-place{margin:0 0 14px;font-size:15px;color:var(--muted)}
.rev-place b{display:inline-block;min-width:34px;padding:2px 8px;border-radius:999px;margin-right:6px;font-weight:700}
.rev-place.ok b{background:var(--lime);color:#1c2410}
.rev-place.ko b{background:#3a2a26;color:var(--corail)}
.rev-question{font-size:13px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:0 0 8px}
.rev-ligne{display:flex;align-items:center;justify-content:space-between;gap:14px;text-align:left;background:#191b16;border:1px solid var(--trait);border-radius:16px;padding:12px 14px;margin-bottom:10px;cursor:pointer;transition:border-color .2s,background .2s}
.rev-ligne:has(:checked){border-color:var(--lime);background:rgba(216,252,117,.07)}
.rev-ligne small{display:block;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.rev-ligne b{display:block;font:700 21px/1.2 'Space Grotesk',sans-serif;color:var(--paper);margin-top:2px}
.interrupteur{appearance:none;-webkit-appearance:none;flex-shrink:0;width:58px;height:34px;margin:0;padding:0;border-radius:999px;background:#3d4136;border:0;position:relative;cursor:pointer;transition:background .25s}
.interrupteur::before{content:"";position:absolute;left:3px;top:3px;width:28px;height:28px;border-radius:50%;background:#f5f1e7;transition:transform .3s cubic-bezier(.2,.9,.3,1.4)}
.interrupteur:checked{background:var(--lime)}
.interrupteur:checked::before{transform:translateX(24px)}
.interrupteur::after{content:"+1";position:absolute;right:-6px;top:-18px;font:700 14px 'Space Grotesk',sans-serif;color:var(--lime);opacity:0}
.interrupteur:checked::after{animation:plus1 .7s ease-out}
@keyframes plus1{0%{opacity:0;transform:translateY(8px)}30%{opacity:1}100%{opacity:0;transform:translateY(-16px)}}
#rev-ok{width:100%;margin-top:6px}

/* Tableau des scores, en bas, une équipe par ligne */
.barre .espace{flex:1}
.tableau-tete{display:flex;justify-content:space-between;align-items:baseline;margin:22px 2px 8px;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.tableau{display:grid;gap:8px}
.tableau .score{display:grid;grid-template-columns:auto minmax(0,1fr) 30% auto;align-items:center;gap:10px;border:1px solid var(--trait);border-radius:14px;padding:11px 14px;background:var(--carte);font-size:16px;color:var(--paper)}
.tableau .score .nom{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tableau .score .pastille{width:12px;height:12px;margin:0}
.tableau .score.active{border-color:var(--lime);background:rgba(216,252,117,.08)}
.tableau .score.tete .nom::before{content:"👑 "}
.jauge{height:8px;border-radius:999px;background:#191b16;overflow:hidden}
.jauge i{display:block;height:100%;width:0;border-radius:999px;transition:width .8s cubic-bezier(.2,.9,.3,1)}
.tableau .pts{font:700 22px 'Space Grotesk',sans-serif;min-width:62px;text-align:right}
.tableau .score.gagne .pts{animation:pop .6s}
#scores.tableau{display:grid;overflow:visible;gap:8px}
.actions{min-height:0;margin-top:0}

/* Le fond prend la couleur de l'équipe qui joue */
@property --equipe{syntax:'<color>';inherits:true;initial-value:#161716}
body{transition:--equipe .9s ease}
body.en-jeu{background:radial-gradient(120% 70% at 50% 0%,color-mix(in srgb,var(--equipe) 55%,transparent),transparent 70%) fixed,color-mix(in srgb,var(--equipe) 22%,#121311)}
body.en-jeu .tableau .score.active{border-color:var(--equipe);background:color-mix(in srgb,var(--equipe) 16%,var(--carte));box-shadow:0 0 0 1px var(--equipe)}
body.en-jeu .tableau .score{background:rgba(20,21,19,.75)}
body.en-jeu #tour-nom{color:var(--paper);text-shadow:0 2px 14px rgba(0,0,0,.35)}
/* Pendant la partie, tous les accents prennent la couleur de l'équipe : boutons, interrupteurs, années, consigne, étiquette du disque, révélation */
body.en-jeu{--lime:var(--equipe);--corail:var(--equipe);--carte:color-mix(in srgb,var(--equipe) 14%,#1b1d19);--trait:color-mix(in srgb,var(--equipe) 30%,#3d4136)}
body.en-jeu #revelation{background:color-mix(in srgb,var(--equipe) 25%,rgba(10,11,9,.9))}
body.en-jeu .rev-ligne{background:color-mix(in srgb,var(--equipe) 8%,#191b16)}
body.en-jeu .rev-place.ko b{background:rgba(0,0,0,.35);color:var(--paper)}

/* Plus de logo en jeu : la croix flotte en haut à droite, le bouton « autre morceau » vit sur la platine */
#game{position:relative;padding-top:6px}
.barre{position:absolute;top:10px;right:16px;z-index:5}
#banniere{margin:8px 0 2px;padding:0 46px}
#tour-nom{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.autre{position:absolute;right:0;bottom:4px;z-index:5;width:44px;height:44px;display:grid;place-items:center;background:rgba(0,0,0,.3);color:var(--paper);border:1px solid var(--trait);transition:transform .2s}
.autre:active{transform:scale(.88) rotate(-10deg)}

/* Grand écran : la platine et les scores côte à côte, la frise sur toute la largeur en dessous */
@media (min-width:980px) and (min-height:620px){
  #game{max-width:1180px;padding:20px 32px 30px;display:grid;grid-template-columns:minmax(0,1fr) 340px;grid-template-areas:"scene scores" "frise frise";column-gap:40px;row-gap:12px;align-items:center;min-height:100svh;align-content:center}
  .jeu-scene{grid-area:scene}
  .jeu-scores{grid-area:scores;align-self:center;background:rgba(0,0,0,.18);border:1px solid var(--trait);border-radius:22px;padding:6px 16px 16px}
  .jeu-scores .tableau-tete{margin-top:12px}
  .jeu-scores .tableau .score{grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"p n pts" "j j j";row-gap:8px}
  .jeu-scores .score .pastille{grid-area:p}.jeu-scores .score .nom{grid-area:n}.jeu-scores .score .pts{grid-area:pts}.jeu-scores .score .jauge{grid-area:j}
  .jeu-frise{grid-area:frise;background:rgba(0,0,0,.14);border-radius:24px;padding:16px 22px 8px}
  .barre{top:22px;right:32px}
  #banniere{height:44px;margin:0 0 6px}
  #tour-nom{font-size:34px}
  .platine{transform:scale(1.3);transform-origin:top center;margin:6px auto 66px}
  #statut{font-size:15px;margin:0 0 4px}
  #consigne{font-size:19px}
  .frise{min-height:200px;padding:18px 8px 26px}
  .case{width:120px}
  .case .pochette{width:120px;height:120px}
  .case .annee{font-size:26px}
  .case .titre{font-size:12px}
  .trou{height:120px}
  .trou.vise,.trou:hover{width:132px}
  .rev-carte{max-width:800px;display:grid;grid-template-columns:340px 1fr;grid-template-rows:repeat(6,auto);align-content:center;column-gap:34px;text-align:left;padding:30px}
  .rev-visuel{grid-row:1/-1;width:250px;height:250px;align-self:center;justify-self:start;margin:0}
  .joue .rev-visuel{transform:none}
  .rev-annee{margin-top:4px;font-size:56px}
  #rev-ok{margin-top:10px}
}

/* Un appui long sur la pochette ne doit rien sélectionner ni ouvrir le menu d'iOS */
#game,#revelation,#victoire,#fantome,#setup .scene,.vinyl{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#game img,#revelation img,#fantome img{-webkit-user-drag:none;pointer-events:none}

/* Mode Histoire : une carte illustrée à la place du disque, l'événement écrit en grand dessous */
#evenement{display:none}
body.histoire #evenement{display:block;text-align:center;font:700 22px/1.2 'Space Grotesk',sans-serif;letter-spacing:-.5px;margin:4px auto 0;max-width:520px;min-height:27px;padding:0 10px}
body.histoire #disque,body.histoire #bras{display:none}
body.histoire .pochette-zone{left:50%;transform:translateX(-50%)}
body.histoire .pochette.mystere img,body.histoire #fantome img{filter:none;transform:none}
body.histoire .pochette.mystere .point-q{display:none}
body.histoire .pochette.mystere.sans-image .point-q{display:grid}
body.histoire #statut{margin-top:6px}
.rev-evenement{margin:0 0 14px;font-size:14px;line-height:1.45;color:var(--muted)}
.rev-evenement b{display:block;font:700 20px/1.2 'Space Grotesk',sans-serif;color:var(--paper);margin-bottom:6px}
.rev-evenement span{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
body.histoire .rev-vinyl{display:none}
body.histoire .joue .rev-visuel{transform:none}
@media (min-width:980px) and (min-height:620px){.rev-carte{grid-template-rows:repeat(7,auto)}body.histoire #evenement{font-size:28px}}

/* Choix de la langue, en haut à droite de l'accueil */
.langues{position:fixed;top:max(12px,env(safe-area-inset-top));right:14px;z-index:20;display:flex;gap:4px;padding:4px;border-radius:999px;background:rgba(0,0,0,.35);border:1px solid var(--trait)}
.langues button{border:0;background:none;padding:6px 8px;border-radius:999px;line-height:0;opacity:.45;transition:opacity .2s,background .2s}
.langues button svg{border-radius:3px;display:block}
.langues button.on{opacity:1;background:rgba(255,255,255,.12)}
#setup[hidden] .langues{display:none}

/* Le sélecteur de langue au centre, en haut de l'accueil, et le choix Musique ou Histoire avant de jouer */
.langues{position:static;align-self:center;margin:0 auto 6px;background:rgba(255,255,255,.06)}
.langues button{padding:8px 12px;opacity:.4}
.langues button svg{width:32px;height:22px}
.pilules.mode{margin:0 0 22px;padding:4px}
.pilules.mode button{font-size:17px;padding:11px 20px;font-weight:600}

/* Accueil explicite : le concept, une frise qui se remplit toute seule, deux portes d'entrée */
.logo-accueil{font:700 40px/1 'Space Grotesk',sans-serif;letter-spacing:-2px;margin:14px 0 12px}
.concept{font-size:18px;line-height:1.45;color:var(--muted);margin:0 0 4px;max-width:360px}
.concept b{color:var(--paper);font-weight:700}
.frise-demo{position:relative;display:flex;align-items:center;justify-content:center;gap:10px;height:120px;margin:10px 0 12px}
.fd-carte{width:70px;height:70px;border-radius:8px;display:grid;place-items:end center;padding-bottom:5px;box-shadow:0 8px 18px rgba(0,0,0,.5)}
.fd-carte b{background:rgba(0,0,0,.55);padding:1px 7px;border-radius:999px;color:var(--lime);font:700 15px 'Space Grotesk',sans-serif}
.fd-a{background:linear-gradient(135deg,#ff8a5c,#b8327a)}.fd-b{background:linear-gradient(135deg,#3fb8ff,#3b3bb8)}
.fd-trou{width:70px;height:70px;border:2px dashed var(--lime);border-radius:8px;animation:trou 3.2s ease-in-out infinite}
.fd-vole{position:absolute;left:50%;top:25px;margin-left:-35px;background:linear-gradient(135deg,#9a7bff,#ff6b9a);place-items:center;padding:0;animation:fd-vole 3.2s ease-in-out infinite}
.fd-vole span{grid-area:1/1;font-size:30px;color:#fff}
.fd-vole .fd-annee{grid-area:1/1;align-self:end;margin-bottom:5px;opacity:0;animation:fd-annee 3.2s ease-in-out infinite}
.fd-musique{animation:fd-un 6.4s steps(1) infinite}.fd-histoire{animation:fd-deux 6.4s steps(1) infinite}
@keyframes fd-vole{0%,12%{transform:translate(60px,-70px) rotate(12deg);opacity:0}22%{opacity:1}55%,88%{transform:none;opacity:1}100%{transform:none;opacity:0}}
@keyframes fd-annee{0%,58%{opacity:0}66%,88%{opacity:1}100%{opacity:0}}
@keyframes fd-un{0%{opacity:1}50%{opacity:0}}@keyframes fd-deux{0%{opacity:0}50%{opacity:1}}
.porte-titre{font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--lime);margin:4px 0 10px}
.portes{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%}
.porte{display:flex;flex-direction:column;align-items:center;gap:6px;padding:18px 10px 16px;border-radius:22px;border:1px solid var(--trait);background:var(--carte);transition:transform .2s,border-color .2s,box-shadow .2s}
.porte:hover{transform:translateY(-3px)}
.porte-musique:hover,.porte-musique:focus-visible{border-color:var(--lime);box-shadow:0 0 0 1px var(--lime)}
.porte-histoire:hover,.porte-histoire:focus-visible{border-color:#ffd84d;box-shadow:0 0 0 1px #ffd84d}
.porte b{font:700 22px 'Space Grotesk',sans-serif;letter-spacing:-.5px;color:var(--paper)}
.porte small{font-size:13.5px;line-height:1.3;color:var(--muted)}
.porte-icone{height:88px;display:grid;place-items:center}
.porte .vinyl{width:80px;height:80px}
.porte .etiquette{background:var(--lime)}
.sablier{font-size:56px;display:inline-block;animation:sablier 3s ease-in-out infinite}
@keyframes sablier{0%,40%{transform:rotate(0)}55%,100%{transform:rotate(180deg)}}
.trio{display:flex}.trio .vinyl{width:58px;height:58px;margin-left:-20px}.trio .vinyl:first-child{margin-left:0}
.seul-ou-plus{font-size:14px;color:var(--muted);margin:16px 0 0}
.portes.qui{margin:6px 0 4px}
.passer{font-size:13px;padding:4px 10px;margin:0 0 4px}
.demo-lis{display:none}
#setup.mode-histoire .demo-lis{display:grid;place-items:center}
#setup.mode-histoire .demo-ecoute{display:none}
.mini-evt{width:200px;height:150px;border-radius:14px;background:linear-gradient(135deg,#3b4a2a,#262c1e);box-shadow:0 14px 30px rgba(0,0,0,.5);display:grid;align-content:center;justify-items:center;gap:9px;animation:flotte 3s ease-in-out infinite}
.mini-evt span{font-size:44px}
.mini-evt i{display:block;width:140px;height:9px;border-radius:9px;background:rgba(255,255,255,.18)}
.mini-evt i.court{width:90px}
@media (max-width:360px){.porte b{font-size:19px}.porte small{font-size:12.5px}}
