/* ==========================================================================
   Les Olympiades des 104 ans — thème « stade de nuit »
   Palette : encre nocturne, or olympique, Flammes (rouge) vs Vagues (bleu)
   ========================================================================== */

:root {
    --ink: #0b1026;
    --ink-2: #121a3d;
    --ink-3: #1b2552;
    --line: rgba(255, 255, 255, .12);
    --text: #f4f1ea;
    --muted: #a9b0d0;
    --gold: #ffc94a;
    --gold-2: #ff9f1c;
    --flame: #ff5a3c;
    --wave: #25b4ff;
    --violet: #7c5cff;
    --green: #3ddc97;
    --radius: 22px;
    --shadow: 0 20px 60px rgba(0, 0, 0, .45);
    --font-display: 'Bungee', 'Impact', 'Arial Black', system-ui, sans-serif;
    --font-body: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.5;
    color: var(--text);
    background: var(--ink);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 { line-height: 1.05; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* ---------- Décor : scène, projecteurs, grille ------------------------- */
.stage { position: fixed; inset: 0; z-index: -1; overflow: hidden; contain: strict; transform: translateZ(0); pointer-events: none;
    background:
        radial-gradient(1200px 700px at 50% -10%, #25307a 0%, transparent 60%),
        radial-gradient(900px 600px at 100% 100%, rgba(255, 90, 60, .18), transparent 60%),
        radial-gradient(900px 600px at 0% 100%, rgba(37, 180, 255, .18), transparent 60%),
        var(--ink);
}
/* Faisceaux : dégradé radial déjà « flou » (aucun filtre blur ni mix-blend-mode, très coûteux), animés en transform seul. */
.stage__beam { position: absolute; top: -20%; width: 34vw; height: 140%; opacity: .5; will-change: transform;
    background: radial-gradient(ellipse 45% 100% at 50% 0, rgba(255, 220, 140, .5), rgba(255, 220, 140, .12) 55%, transparent 75%);
    transform-origin: 50% 0; }
.stage__beam--a { left: 8%; animation: sweep 11s ease-in-out infinite alternate; }
.stage__beam--b { left: 38%; animation: sweep 14s ease-in-out -4s infinite alternate-reverse; opacity: .35; }
.stage__beam--c { right: 6%; animation: sweep 12s ease-in-out -7s infinite alternate; }
@keyframes sweep { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
.stage__glow { position: absolute; left: 50%; bottom: -30vh; width: 120vw; height: 60vh; transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(255, 201, 74, .22), transparent); }
.stage__grid { position: absolute; inset: 0; opacity: .5;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at 50% 100%, #000, transparent 70%); }

/* ---------- Barre du haut ---------------------------------------------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem clamp(1rem, 4vw, 3rem); position: relative; z-index: 2; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand__medal { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
    font: 400 1.05rem/1 var(--font-display); color: var(--ink);
    background: conic-gradient(from 200deg, #fff2b8, var(--gold), var(--gold-2), var(--gold), #fff2b8);
    box-shadow: 0 0 0 3px rgba(255, 201, 74, .25), 0 6px 20px rgba(255, 159, 28, .45); }
.brand__text { font: 400 1.15rem/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.topbar__nav { display: flex; align-items: center; gap: 1.25rem; }
.link { text-decoration: none; color: var(--muted); font-weight: 600; transition: color .2s; }
.link:hover { color: var(--text); }

.code-chip { display: inline-flex; align-items: baseline; gap: .6rem; padding: .45rem 1rem; border-radius: 999px;
    background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.code-chip small { color: var(--muted); text-transform: uppercase; letter-spacing: .15em; font-size: .7rem; }
.code-chip strong { font: 400 1.4rem/1 var(--font-display); letter-spacing: .18em; color: var(--gold); }

.page { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem) 4rem; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding: 1.5rem clamp(1rem, 4vw, 3rem);
    color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }

/* ---------- Boutons ----------------------------------------------------- */
.btn { --b: rgba(255, 255, 255, .1); display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    padding: .8rem 1.4rem; border: 0; border-radius: 999px; font: 700 1rem/1 var(--font-body); color: var(--text);
    background: var(--b); text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .2s, filter .2s, background .2s; }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn--gold { color: var(--ink); background: linear-gradient(135deg, #ffe08a, var(--gold) 40%, var(--gold-2));
    box-shadow: 0 8px 26px rgba(255, 159, 28, .4), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn--gold:hover:not(:disabled) { box-shadow: 0 12px 36px rgba(255, 159, 28, .6), inset 0 1px 0 rgba(255, 255, 255, .6); filter: saturate(1.15); }
.btn--ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.btn--ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.btn--small { padding: .55rem 1rem; font-size: .9rem; }
.btn--lg { padding: 1rem 1.6rem; font-size: 1.1rem; }
.btn--xl { padding: 1.15rem 2rem; font-size: 1.2rem; }
.btn--block { width: 100%; }

/* ---------- Cartes, formulaires ---------------------------------------- */
.narrow { max-width: 520px; margin: 2vh auto 0; }
.card { position: relative; padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(30, 40, 90, .78), rgba(16, 22, 56, .78));
    border: 1px solid var(--line); box-shadow: var(--shadow); }
.card--glow::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
    background: linear-gradient(135deg, var(--gold), transparent 35%, transparent 65%, var(--wave));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .8; }
.card__title { font: 400 clamp(1.6rem, 4vw, 2.2rem)/1.05 var(--font-display); }
.kicker { text-transform: uppercase; letter-spacing: .22em; font-size: .78rem; font-weight: 700; color: var(--gold); margin-bottom: .6rem; }
.display { font: 400 clamp(2rem, 4.5vw, 3.6rem)/1 var(--font-display); text-transform: uppercase; }

.form { display: grid; gap: 1.1rem; margin-top: 1.4rem; }
.field { display: grid; gap: .4rem; font-weight: 600; }
.field > span { font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
input[type=text], .joinbox__input { width: 100%; padding: .95rem 1.1rem; border-radius: 14px; border: 2px solid var(--line);
    background: rgba(8, 12, 32, .6); color: var(--text); font: 600 1.1rem var(--font-body); outline: none; transition: border-color .2s, box-shadow .2s; }
input[type=text]:focus, .joinbox__input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 201, 74, .18); }
.field__code { text-align: center; font: 400 2rem/1 var(--font-display) !important; letter-spacing: .3em; text-transform: uppercase; padding-left: 1.3em !important; }
.alert { margin: 1rem 0 0; padding: .8rem 1rem; border-radius: 12px; background: rgba(255, 90, 60, .15); border: 1px solid rgba(255, 90, 60, .5); color: #ffd2c8; font-weight: 600; }

/* ---------- Apparition au scroll --------------------------------------- */
.reveal--ready:not(.is-visible) { opacity: 0; transform: translateY(26px); }
.reveal--ready { transition: opacity .7s cubic-bezier(.2, .7, .2, 1) var(--delay, 0ms), transform .7s cubic-bezier(.2, .7, .2, 1) var(--delay, 0ms); }

/* ---------- Page d'accueil --------------------------------------------- */
.hero { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(1rem, 5vh, 3rem) 0 4rem; min-height: calc(100vh - 140px); justify-content: center; }
.confetti-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.hero__numbers { display: flex; align-items: center; justify-content: center; gap: clamp(.5rem, 3vw, 2rem); margin: .5rem 0 1rem; }
.laurel { width: clamp(50px, 9vw, 110px); height: auto; color: var(--gold); filter: drop-shadow(0 0 14px rgba(255, 201, 74, .5)); }
.laurel--right { transform: scaleX(-1); }
.hero__104 { position: relative; display: grid; place-items: center; width: clamp(200px, 32vw, 360px); aspect-ratio: 1; }
.hero__ring { position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(from 0deg, var(--gold), var(--flame), var(--violet), var(--wave), var(--gold));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px)); mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
    animation: spin 14s linear infinite; will-change: transform; }
.hero__104::before { content: ''; position: absolute; inset: -8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 201, 74, .35), transparent 70%); }
@keyframes spin { to { transform: rotate(360deg); } }
.hero__count { font: 400 clamp(4.5rem, 12vw, 9rem)/1 var(--font-display); color: var(--gold);
    background: linear-gradient(180deg, #fff6c9, var(--gold) 45%, var(--gold-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    animation: float 4s ease-in-out infinite; will-change: transform; }
.hero__ans { position: absolute; bottom: 19%; font: 700 1rem/1 var(--font-body); letter-spacing: .5em; text-transform: uppercase; color: var(--muted); padding-left: .5em; }
@keyframes float { 50% { transform: translateY(-8px); } }
.hero__title { font: 400 clamp(2.2rem, 6.5vw, 5rem)/1.02 var(--font-display); text-transform: uppercase; margin: 0 0 1rem; }
.hero__title em { font-style: normal; background: linear-gradient(90deg, var(--flame), var(--gold), var(--wave)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__lead { max-width: 640px; font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.2rem 2rem; margin-top: 1rem; }
.joinbox { display: inline-flex; gap: .6rem; align-items: center; }
.joinbox__input { width: 9rem; text-align: center; letter-spacing: .25em; font: 400 1.2rem var(--font-display); text-transform: uppercase; padding: .85rem .6rem .85rem 1rem; }
.scroll-hint { margin-top: 3rem; color: var(--muted); animation: bounce 1.8s ease-in-out infinite; font-size: 1.6rem; }
@keyframes bounce { 50% { transform: translateY(8px); } }

.section { padding: 3rem 0; content-visibility: auto; contain-intrinsic-size: auto 480px; }
.section__title { font: 400 clamp(1.8rem, 4vw, 3rem)/1 var(--font-display); text-align: center; text-transform: uppercase; margin-bottom: 2.2rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; }
.step { position: relative; padding: 1.6rem 1.4rem; border-radius: var(--radius); background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)); border: 1px solid var(--line); transition: transform .3s, border-color .3s; }
.step:hover { transform: translateY(-6px) rotate(-.6deg); border-color: var(--gold); }
.step__n { position: absolute; top: -14px; right: 18px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font: 400 1rem var(--font-display); color: var(--ink); background: var(--gold); box-shadow: 0 4px 14px rgba(255, 159, 28, .5); }
.step__icon { display: block; font-size: 2.6rem; margin-bottom: .6rem; }
.step h3 { font: 400 1.2rem/1.1 var(--font-display); text-transform: uppercase; }
.step p { color: var(--muted); margin: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; padding: 2rem; border-radius: var(--radius); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); text-align: center; }
.stat strong { display: block; font: 400 clamp(2.4rem, 6vw, 4rem)/1 var(--font-display); color: var(--gold); }
.stat span { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; }

.teams-teaser { display: flex; align-items: center; justify-content: center; gap: clamp(1rem, 4vw, 3rem); flex-wrap: wrap; }
.teaser { display: grid; place-items: center; gap: .3rem; width: min(260px, 40vw); padding: 2rem 1rem; border-radius: var(--radius); text-align: center; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: 0 0 50px color-mix(in srgb, var(--c) 35%, transparent); }
.teaser span { font-size: 3.4rem; }
.teaser b { font: 400 1.3rem var(--font-display); text-transform: uppercase; }
.teaser--flame { --c: var(--flame); }
.teaser--wave { --c: var(--wave); }
.teaser__vs { font: 400 2rem var(--font-display); color: var(--gold); }

/* ---------- Écran TV : salle d'attente --------------------------------- */
body.tv { font-size: clamp(16px, 1.15vw, 22px); }
.lobby { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: clamp(1rem, 2.5vw, 2.5rem); align-items: start; }
.join-card { text-align: center; position: sticky; top: 1rem; }
.join-card__qr { width: min(100%, 300px); margin: 0 auto 1.2rem; padding: 10px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 6px rgba(255, 201, 74, .35), 0 16px 40px rgba(0, 0, 0, .5); }
.join-card__qr svg { display: block; width: 100%; height: auto; }
.join-card__code { display: flex; justify-content: center; gap: .4rem; margin-bottom: .8rem; }
.join-card__code span { display: grid; place-items: center; width: 2.6rem; height: 3.2rem; border-radius: 12px; font: 400 2rem/1 var(--font-display); color: var(--ink); background: linear-gradient(180deg, #fff2b8, var(--gold)); box-shadow: 0 6px 0 #b9770e; }
.join-card__url { font-weight: 700; color: var(--gold); word-break: break-all; margin-bottom: .4rem; }

.roster__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.roster__head h2 { font: 400 clamp(1.6rem, 3vw, 2.4rem)/1 var(--font-display); text-transform: uppercase; margin: 0; }
.roster__head .count { color: var(--gold); }
.roster__head small { color: var(--muted); font-size: .55em; margin-left: .3em; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip { --h: var(--hue, 40); position: relative; display: inline-flex; align-items: center; gap: .55rem; padding: .35rem .5rem .35rem .4rem; border-radius: 999px;
    background: rgba(255, 255, 255, .08); border: 1px solid var(--line); font-weight: 600; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.chip[draggable=true] { cursor: grab; }
.chip.is-dragging { opacity: .35; cursor: grabbing; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.chip__avatar { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; font: 400 .95rem var(--font-display); color: var(--ink); background: hsl(var(--h) 85% 62%); }
.chip__name { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip__moves { display: inline-flex; gap: .25rem; }
.dot { width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 25%, transparent); cursor: pointer; font-size: .85rem; padding: 0; line-height: 1; transition: transform .15s, background .15s; }
.dot:hover { transform: scale(1.2); background: color-mix(in srgb, var(--c) 55%, transparent); }
.chip__kick { width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s, background .15s, color .15s; }
.chip:hover .chip__kick { opacity: 1; }
.chip__kick:hover { background: rgba(255, 90, 60, .3); color: #fff; }

.empty { display: grid; place-items: center; gap: .5rem; padding: 3rem 1rem; color: var(--muted); }
.empty__pulse { display: grid; place-items: center; width: 90px; height: 90px; border-radius: 50%; font-size: 2.6rem; background: rgba(255, 201, 74, .12); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 201, 74, .5); } 100% { box-shadow: 0 0 0 40px rgba(255, 201, 74, 0); } }

/* ---------- Écran TV : composition des équipes ------------------------- */
.teams-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; margin-bottom: 1.5rem; }
.teams-head__actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.teams-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2.5rem); }
.team { --team: var(--gold); padding: 1.2rem; border-radius: var(--radius); border: 2px solid color-mix(in srgb, var(--team) 70%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--team) 20%, transparent), rgba(255, 255, 255, .03)); min-height: 280px; transition: box-shadow .2s, transform .2s; }
.team.is-over { box-shadow: 0 0 0 4px var(--team), 0 0 60px color-mix(in srgb, var(--team) 60%, transparent); transform: scale(1.01); }
.team__head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.team__emoji { font-size: 2.2rem; }
.team__name { flex: 1; min-width: 0; padding: .3rem .5rem; border: 2px dashed transparent; border-radius: 10px; background: transparent; color: var(--text); font: 400 1.5rem/1.1 var(--font-display); text-transform: uppercase; outline: none; transition: border-color .2s, background .2s; }
.team__name:hover, .team__name:focus { border-color: var(--line); background: rgba(0, 0, 0, .25); }
.team__title { flex: 1; font: 400 1.2rem var(--font-display); text-transform: uppercase; }
.team__count { font: 400 2rem/1 var(--font-display); color: var(--team); }
.team__count small { font-size: .5em; color: var(--muted); }
.team__count.is-over { color: #fff; }
.chips--team { min-height: 120px; align-content: flex-start; }
.team--none { --team: var(--muted); margin-top: 1.5rem; min-height: 0; }
.late-join { margin-top: 1.5rem; text-align: center; color: var(--muted); }
.late-join b { color: var(--gold); letter-spacing: .15em; }

/* ---------- Écran TV : partie lancée ----------------------------------- */
.arena { position: relative; text-align: center; padding-top: 1rem; }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(.5rem, 2vw, 2rem); margin: 2rem 0; }
.scoreboard__vs { font: 400 clamp(1.6rem, 4vw, 3rem) var(--font-display); color: var(--gold); text-shadow: 0 0 30px rgba(255, 201, 74, .6); }
.score { --team: var(--gold); position: relative; padding: 1.6rem 1rem 1.4rem; border-radius: var(--radius); border: 2px solid var(--team);
    background: linear-gradient(180deg, color-mix(in srgb, var(--team) 28%, transparent), rgba(255, 255, 255, .03)); box-shadow: 0 0 70px color-mix(in srgb, var(--team) 30%, transparent); }
.score__emoji { font-size: 3.2rem; }
.score h2 { font: 400 clamp(1.2rem, 2.4vw, 2rem) var(--font-display); text-transform: uppercase; margin: 0; }
.score__value { font: 400 clamp(4rem, 10vw, 8rem)/1 var(--font-display); color: var(--team); text-shadow: 0 6px 0 rgba(0, 0, 0, .35); }
.score small { color: var(--muted); text-transform: uppercase; letter-spacing: .25em; font-weight: 700; }
.score__players { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.score__players li { padding: .2rem .7rem; border-radius: 999px; background: rgba(0, 0, 0, .3); font-size: .85rem; font-weight: 600; }
.coming-soon { max-width: 640px; margin: 0 auto; }
.coming-soon h3 { font: 400 1.4rem var(--font-display); text-transform: uppercase; }

.toast { position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%); z-index: 20; padding: .9rem 1.4rem; border-radius: 14px; font-weight: 700;
    background: #2a1218; border: 1px solid var(--flame); color: #ffd9d0; box-shadow: var(--shadow); animation: pop .3s ease both; }
.toast[hidden] { display: none; }

/* ---------- Téléphone --------------------------------------------------- */
body.phone .page { max-width: 560px; padding-top: .5rem; }
.topbar--phone .brand__text { font-size: .85rem; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.waiting { text-align: center; }
.waiting .empty__pulse { margin: 0 auto 1rem; }
.waiting__count { color: var(--muted); }
.waiting__count strong { color: var(--gold); font: 400 1.6rem var(--font-display); margin-right: .3rem; }
.mates { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .4rem; }
.mates--wrap { display: flex; flex-wrap: wrap; justify-content: center; }
.mates li { padding: .55rem .9rem; border-radius: 12px; background: rgba(255, 255, 255, .08); font-weight: 600; }
.mates--wrap li { padding: .3rem .8rem; border-radius: 999px; }
.mates li.is-me { background: var(--gold); color: var(--ink); }

.my-team { --team: var(--gold); position: relative; text-align: center; padding: 2rem 1.2rem; border-radius: 28px; border: 2px solid var(--team);
    background: linear-gradient(180deg, color-mix(in srgb, var(--team) 35%, transparent), rgba(11, 16, 38, .6)); box-shadow: 0 0 90px color-mix(in srgb, var(--team) 40%, transparent); animation: pop .6s cubic-bezier(.2, 1.3, .4, 1) both; }
.my-team .kicker { color: var(--text); opacity: .8; }
.my-team__emoji { font-size: 5rem; line-height: 1; animation: float 3s ease-in-out infinite; }
.my-team__name { font: 400 clamp(2rem, 9vw, 3rem)/1 var(--font-display); text-transform: uppercase; color: var(--team); text-shadow: 0 4px 0 rgba(0, 0, 0, .35); margin: .4rem 0; }
.my-team__you { font-weight: 700; font-size: 1.2rem; }
.my-team__score { margin: 1rem 0; }
.my-team__score strong { display: block; font: 400 4.5rem/1 var(--font-display); }
.my-team__score small { color: var(--muted); text-transform: uppercase; letter-spacing: .25em; font-weight: 700; }

/* ---------- Vote des noms d'équipe ------------------------------------- */
.names { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.name-row { display: flex; align-items: center; gap: .8rem; padding: .5rem .8rem; min-height: 3rem; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid transparent; transition: background .25s, border-color .25s; }
.name-row.is-top { background: color-mix(in srgb, var(--team) 25%, transparent); border-color: var(--team); }
.name-row__label { flex: 0 1 46%; font-weight: 700; line-height: 1.15; }
.name-row__count { margin-left: auto; min-width: 1.6rem; text-align: right; font: 400 1.3rem var(--font-display); color: var(--team); }
.pills { display: flex; flex-wrap: wrap; gap: .25rem; flex: 1; }
.pill { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; font: 400 .8rem var(--font-display); color: var(--ink);
    background: hsl(var(--hue) 85% 62%); box-shadow: 0 0 0 2px rgba(11, 16, 38, .8); }
.notes { list-style: none; max-width: 760px; margin: 1rem auto 0; padding: 0; display: grid; gap: .4rem; color: var(--muted); font-weight: 600; }
.notes li { padding: .6rem 1rem; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px dashed var(--line); }

.vote__title { font: 400 clamp(1.5rem, 7vw, 2.1rem)/1.05 var(--font-display); text-transform: uppercase; margin: .2rem 0 .6rem; }
.vote__left { font-weight: 700; color: var(--text); }
.vote__left strong { color: var(--team); font: 400 1.6rem var(--font-display); }
.vote__left.is-done { color: var(--green); }
.vote__list { display: grid; gap: .55rem; margin-top: 1rem; text-align: left; }
.vote-row { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .75rem .8rem; border-radius: 16px; border: 2px solid var(--line); background: rgba(8, 12, 32, .55);
    color: var(--text); font: 700 1rem/1.15 var(--font-body); text-align: left; cursor: pointer; transition: transform .12s, border-color .2s, background .2s; -webkit-tap-highlight-color: transparent; }
.vote-row:active { transform: scale(.98); }
.vote-row.is-mine { border-color: var(--team); background: color-mix(in srgb, var(--team) 28%, rgba(8, 12, 32, .6)); }
.vote-row__check { flex: none; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 2px solid var(--line); font-size: .95rem; color: var(--ink); }
.vote-row.is-mine .vote-row__check { background: var(--team); border-color: var(--team); }
.vote-row.is-mine .vote-row__check::before { content: '✔'; }
.vote-row__label { flex: 1 1 auto; }
.vote-row__emoji { font-size: 1.5rem; line-height: 1; }
.vote-row .pills { flex: 0 1 auto; justify-content: flex-end; max-width: 40%; }

/* ---------- Épreuves ---------------------------------------------------- */
input[type=number], select { width: 100%; padding: .8rem 1rem; border-radius: 14px; border: 2px solid var(--line); background: rgba(8, 12, 32, .6); color: var(--text); font: 600 1.05rem var(--font-body); outline: none; }
input[type=number]:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 201, 74, .18); }
select option, select optgroup { background: var(--ink-2); color: var(--text); }
.lead { font-size: 1.3em; color: var(--muted); margin-bottom: 1rem; }

.teambar { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 0 0 1.2rem; flex-wrap: wrap; }
.teambar__item { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem 1.1rem; border-radius: 999px; border: 2px solid var(--team); background: color-mix(in srgb, var(--team) 18%, transparent); }
.teambar__item b { font: 400 1rem var(--font-display); text-transform: uppercase; }
.teambar__item strong { font: 400 1.5rem/1 var(--font-display); color: var(--team); }
.teambar__item small { font: 600 .7rem var(--font-body); color: var(--muted); }
.teambar__vs { font: 400 1rem var(--font-display); color: var(--gold); }

.catalogue, .history { max-width: 920px; margin: 2.5rem auto 0; text-align: left; }
.catalogue__title { font: 400 1.4rem var(--font-display); text-transform: uppercase; margin-bottom: 1rem; text-align: center; }
.catalogue__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; justify-content: center; }
.minigame { text-align: center; }
.minigame__emoji { font-size: 3.4rem; line-height: 1; }
.minigame h3 { font: 400 1.4rem var(--font-display); text-transform: uppercase; margin: .4rem 0; }
.setup { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1rem; text-align: left; }
.setup__field { display: grid; gap: .3rem; }
.setup__field > span { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.setup__field--wide, .setup .btn { grid-column: 1 / -1; }
.history__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.history__list li { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .7rem 1.1rem; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }

.round-head { text-align: center; margin-bottom: 1.5rem; }
.briefing { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2.5vw, 2rem); align-items: start; }
.rules { margin: 0; padding-left: 1.4rem; display: grid; gap: .8rem; font-size: 1.05em; }
.rules li::marker { color: var(--gold); font-weight: 800; }
.referee-tag { padding: .6rem 1rem; border-radius: 12px; background: rgba(255, 201, 74, .12); border: 1px dashed var(--gold); }
.lineups { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.lineup { --team: var(--gold); padding: .9rem 1rem; border-radius: 16px; border: 2px solid var(--team); background: color-mix(in srgb, var(--team) 14%, transparent); margin-top: .8rem; }
.lineups .lineup { margin-top: 0; }
.lineup h3 { font: 400 1rem var(--font-display); text-transform: uppercase; margin-bottom: .6rem; }
.lineup ol { margin: 0; padding: 0; list-style: none; display: grid; gap: .4rem; }
.lineup li { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.lineup li em { font-size: .75rem; color: var(--team); font-style: normal; font-weight: 800; text-transform: uppercase; }
.round-actions { display: flex; justify-content: center; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

.duel { display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(.5rem, 2vw, 1.8rem); align-items: stretch; }
.duel__vs { align-self: center; font: 400 clamp(1.6rem, 4vw, 3rem) var(--font-display); color: var(--gold); text-shadow: 0 0 30px rgba(255, 201, 74, .6); }
.fighter { --team: var(--gold); padding: 1.3rem; border-radius: var(--radius); border: 2px solid color-mix(in srgb, var(--team) 60%, transparent); text-align: center;
    background: linear-gradient(180deg, color-mix(in srgb, var(--team) 20%, transparent), rgba(255, 255, 255, .03)); transition: box-shadow .3s, border-color .3s; }
.fighter.is-reading { border-color: var(--team); box-shadow: 0 0 0 4px color-mix(in srgb, var(--team) 45%, transparent), 0 0 70px color-mix(in srgb, var(--team) 45%, transparent); }
.fighter header { display: grid; justify-items: center; gap: .1rem; font: 400 1.3rem var(--font-display); text-transform: uppercase; }
.fighter header small { font: 700 .7rem var(--font-body); color: var(--muted); letter-spacing: .2em; }
.fighter__score { font: 400 clamp(3rem, 7vw, 5.5rem)/1 var(--font-display); color: var(--team); text-shadow: 0 5px 0 rgba(0, 0, 0, .35); }
.fighter__player { display: grid; justify-items: center; gap: .3rem; margin: 1rem 0; padding: 1rem; border-radius: 18px; background: rgba(0, 0, 0, .3); }
.fighter__avatar { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 50%; font: 400 2rem var(--font-display); color: var(--ink); background: hsl(var(--hue) 85% 62%); box-shadow: 0 0 0 4px rgba(11, 16, 38, .8), 0 0 0 7px var(--team); }
.fighter__player strong { font: 400 1.6rem var(--font-display); }
.fighter__role { font-weight: 800; color: var(--team); }
.fighter__bench { display: grid; gap: .4rem; justify-items: center; }
.fighter__bench small { color: var(--muted); text-transform: uppercase; letter-spacing: .15em; font-weight: 700; font-size: .7rem; }
.fighter__bench .chips { justify-content: center; }
.chip--static { animation: none; }
.chip.is-out { opacity: .45; text-decoration: line-through; filter: grayscale(.6); }
.round-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.5rem; }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; color: var(--muted); font-weight: 600; flex: 1; min-width: 240px; }
.log li:first-child { color: var(--text); }
.score.is-winner { box-shadow: 0 0 0 5px var(--team), 0 0 100px color-mix(in srgb, var(--team) 60%, transparent); transform: scale(1.03); }
.score__mini { margin: .4rem 0 0; color: var(--muted); }

/* Arbitre & programme (phase équipes) */
.teams-extra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2.5rem); margin-top: 1.5rem; align-items: start; }
.team--referee { --team: var(--violet); min-height: 0; }
.team--program { --team: var(--gold); min-height: 0; }
.blocker { align-self: center; }
.dot--ref { --c: var(--violet); }
.chip__ref { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--violet); font-size: .85rem; }
.referee-card { display: flex; align-items: center; gap: .7rem; font-size: 1.2rem; margin: .4rem 0 1rem; }
.referee-card small { color: var(--muted); }
.ref-badge { margin: .6rem 0; padding: .6rem .9rem; border-radius: 12px; background: rgba(124, 92, 255, .2); border: 1px dashed var(--violet); font-weight: 600; font-size: .95rem; }
.seg { display: inline-flex; padding: .25rem; border-radius: 999px; background: rgba(0, 0, 0, .3); margin-bottom: 1rem; }
.seg__btn { padding: .5rem 1rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 700 .9rem var(--font-body); cursor: pointer; transition: background .2s, color .2s; }
.seg__btn.is-on { background: var(--gold); color: var(--ink); }
.program { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .45rem; }
.program li { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: 12px; background: rgba(0, 0, 0, .25); }
.program__n { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--gold); color: var(--ink); font: 400 .8rem var(--font-display); }
.program__name { flex: 1; font-weight: 700; }
.mini-btn { width: 1.9rem; height: 1.9rem; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: var(--text); cursor: pointer; font-size: .75rem; }
.mini-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .15); }
.mini-btn:disabled { opacity: .3; cursor: default; }
.mini-btn--del:hover:not(:disabled) { background: rgba(255, 90, 60, .4); }
.program__add { display: flex; flex-wrap: wrap; gap: .5rem; }
.upcoming { margin-top: 1rem; }

/* Téléphone : arbitre et joueurs en épreuve */
.ref { display: grid; gap: .9rem; }
.ref-banner { padding: .9rem 1rem; border-radius: 16px; border: 2px solid var(--team); background: color-mix(in srgb, var(--team) 25%, transparent); text-align: center; font-size: 1.05rem; }
.ref-team { --team: var(--gold); display: grid; gap: .6rem; padding: 1rem; border-radius: 20px; border: 2px solid color-mix(in srgb, var(--team) 70%, transparent); background: color-mix(in srgb, var(--team) 12%, rgba(8, 12, 32, .6)); }
.ref-team header { display: flex; align-items: center; justify-content: space-between; font: 400 1.05rem var(--font-display); text-transform: uppercase; }
.ref-team__score { display: flex; align-items: center; gap: .6rem; }
.ref-team__score strong { min-width: 2ch; text-align: center; font: 400 2rem/1 var(--font-display); color: var(--team); }
.stepper { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px solid var(--line); background: rgba(255, 255, 255, .08); color: var(--text); font: 800 1.3rem/1 var(--font-body); cursor: pointer; }
.stepper:active { transform: scale(.9); }
.btn-laugh { padding: 1.1rem 1rem; border: 0; border-radius: 16px; font: 800 1.1rem/1.2 var(--font-body); color: var(--ink); background: linear-gradient(135deg, #ffe08a, var(--gold)); cursor: pointer; box-shadow: 0 6px 0 #b9770e; transition: transform .1s, box-shadow .1s; }
.btn-laugh:active { transform: translateY(4px); box-shadow: 0 2px 0 #b9770e; }
.btn-laugh.is-armed, .btn.is-armed { background: var(--flame); color: #fff; box-shadow: 0 0 0 4px rgba(255, 90, 60, .4); animation: armed .5s ease-in-out infinite alternate; }
@keyframes armed { to { transform: scale(1.02); } }
.miniscore { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1.2rem 0 .4rem; }
.miniscore div { display: flex; align-items: center; gap: .5rem; padding: .4rem 1rem; border-radius: 999px; border: 2px solid var(--team); }
.miniscore strong { font: 400 1.8rem/1 var(--font-display); color: var(--team); }
.miniscore small { color: var(--muted); max-width: 5rem; line-height: 1.1; }

/* ---------- Responsive -------------------------------------------------- */
@media (max-width: 900px) {
    .lobby, .teams-board { grid-template-columns: minmax(0, 1fr); }
    .join-card { position: static; }
    .scoreboard, .duel, .briefing, .teams-extra { grid-template-columns: minmax(0, 1fr); }
    .hero__ans { bottom: 17%; }
}
@media (max-width: 560px) {
    .brand__text { display: none; }
    .topbar--phone .brand__text, .topbar--tv .brand__text { display: inline; }
    .joinbox { width: 100%; justify-content: center; }
    .laurel { display: none; }
}
/* Téléphones / écrans tactiles : décor figé pour garder un défilement fluide et économiser la batterie. */
@media (max-width: 900px), (hover: none) {
    .stage__beam { animation: none; }
    .stage__beam--b, .stage__beam--c { display: none; }
    .hero__ring, .hero__count { animation: none; }
    .stage__grid { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Liste des parties ouvertes (page « Rejoindre ») */
.open-games { margin-top: 1rem; }
.open-games__list { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .5rem; }
.open-game {
    display: grid; grid-template-columns: 1fr auto; gap: .1rem .75rem; align-items: center;
    padding: .75rem 1rem; border-radius: 14px; color: inherit; text-decoration: none;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
}
a.open-game:active { background: rgba(255, 201, 74, .18); }
.open-game__name { font-weight: 700; }
.open-game__meta { grid-column: 1; font-size: .85rem; opacity: .7; }
.open-game__go { grid-row: 1 / span 2; grid-column: 2; color: #ffc94a; font-weight: 700; }
.open-game.is-full { opacity: .5; }

/* Changement de joueur (console de l'arbitre) */
.lineup li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ref-queue { display: grid; gap: .25rem; margin-top: .5rem; }
.ref-queue__row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.swap { position: relative; }
.swap summary { list-style: none; cursor: pointer; padding: .2rem .5rem; border-radius: 10px; background: rgba(255,255,255,.08); }
.swap summary::-webkit-details-marker { display: none; }
.swap[open] summary { background: rgba(255,201,74,.25); }
.swap__menu { display: grid; gap: .35rem; margin: .4rem 0; padding: .6rem; border-radius: 12px; background: rgba(8,12,34,.96); border: 1px solid rgba(255,255,255,.14); }
.swap__title { margin: 0; font-size: .85rem; opacity: .7; }
.swap__item { padding: .55rem .75rem; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: inherit; font: inherit; text-align: left; }
.swap__item--auto { color: #ffc94a; }
.swap__item--out { color: #ff8a8a; }
.swap__item--out.is-armed { background: rgba(255,90,90,.25); }

.capacity { display: inline-flex; align-items: center; gap: .5rem; font-size: .95rem; opacity: .9; }

/* ===== Console de l'arbitre : gros boutons faciles à toucher au pouce ===== */
.ref { gap: 1rem; padding-bottom: 5rem; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.ref button, .ref summary, .ref input { touch-action: manipulation; }
.ref .btn { min-height: 3.5rem; font-size: 1.05rem; border-radius: 16px; }
.ref .btn--small { min-height: 3.25rem; padding: .8rem 1rem; font-size: 1rem; }
.ref .btn--lg, .ref .btn--xl { min-height: 4.25rem; font-size: 1.2rem; }
.ref .setup__field input { min-height: 3.25rem; font-size: 1.25rem; text-align: center; }
.ref .stepper { width: 3.5rem; height: 3.5rem; font-size: 1.9rem; }
.ref .ref-team__score { gap: .8rem; }
.ref .ref-team__score strong { font-size: 2.4rem; min-width: 2.2ch; }
.ref .btn-laugh { min-height: 5rem; font-size: 1.25rem; border-radius: 20px; }
.ref .ref-team { padding: 1.1rem; gap: .8rem; }

/* Menu « changer ce joueur » : cible de 48 px, menu pleine largeur sous la ligne */
.ref .lineup li, .ref .ref-queue__row { flex-wrap: wrap; min-height: 3rem; }
.ref .lineup li > span, .ref .ref-queue__row > span { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.ref .swap summary { display: grid; place-items: center; min-width: 3rem; min-height: 3rem; padding: 0; font-size: 1.35rem; border-radius: 14px; }
.ref .swap[open] { flex: 1 0 100%; order: 3; }
.ref .swap[open] summary { display: none; }
.ref .swap__menu { gap: .5rem; padding: .75rem; margin: .3rem 0 0; }
.ref .swap__title { font-size: .95rem; }
.ref .swap__item { min-height: 3.25rem; padding: .8rem 1rem; font-size: 1.05rem; border-radius: 14px; }
.ref .swap__close { min-height: 3rem; border: 0; background: none; color: var(--muted, #aab); font: inherit; }

/* ===== Annonces de l'écran : centrées sous les cartes, elles s'effacent d'elles-mêmes ===== */
.round-foot { display: flex; justify-content: center; align-items: flex-start; min-height: 5.5rem; margin-top: 1.25rem; }
.round-foot .log { flex: 0 1 auto; justify-items: center; text-align: center; min-width: 0; font-size: 1.15rem; }
.round-foot .log li { padding: .4rem 1rem; border-radius: 999px; background: rgba(255, 255, 255, .07);
    animation: log-fade 7s linear forwards; animation-delay: calc(var(--age, 0s) * -1); }
@keyframes log-fade { 0%, 65% { opacity: 1; transform: none; max-height: 4rem; } 99% { opacity: 0; transform: translateY(6px); max-height: 4rem; } 100% { opacity: 0; max-height: 0; padding: 0; margin: 0; overflow: hidden; } }

/* ===== Console arbitre : « les deux ont rigolé » / « personne n'a ri » côte à côte ===== */
.ref-duo { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.btn-duo { display: grid; justify-items: center; align-content: center; gap: .15rem; min-height: 6.5rem; padding: .8rem .5rem;
    border-radius: 18px; border: 2px solid var(--line); color: var(--text); font: inherit; text-align: center; cursor: pointer;
    background: rgba(255, 255, 255, .07); transition: transform .1s; }
.btn-duo:active { transform: scale(.96); }
.btn-duo__emoji { font-size: 1.8rem; line-height: 1; }
.btn-duo b { font-size: 1.05rem; line-height: 1.15; }
.btn-duo small { font-size: .8rem; opacity: .7; }
.btn-duo--both { border-color: rgba(255, 201, 74, .6); background: rgba(255, 201, 74, .14); }
.btn-duo.is-armed { background: var(--flame); color: #fff; border-color: transparent; animation: armed .5s ease-in-out infinite alternate; }

/* ===== Bouton de fin d'épreuve ===== */
.btn-finish { display: flex; align-items: center; gap: .9rem; width: 100%; min-height: 4.5rem; padding: .8rem 1.1rem; margin-top: .4rem;
    border-radius: 20px; border: 2px solid rgba(255, 138, 138, .55); color: #fff; text-align: left; font: inherit; cursor: pointer;
    background: linear-gradient(135deg, rgba(255, 90, 60, .35), rgba(124, 92, 255, .35));
    box-shadow: 0 6px 0 rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .18); transition: transform .1s, box-shadow .1s; }
.btn-finish:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.btn-finish__icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; font-size: 1.6rem; background: rgba(255, 255, 255, .16); flex: none; }
.btn-finish__text { display: grid; gap: .1rem; }
.btn-finish__text b { font: 400 1.15rem var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.btn-finish__text small { opacity: .75; font-size: .82rem; }
.btn-finish.is-armed { background: var(--flame); animation: armed .5s ease-in-out infinite alternate; }

/* ===== Aide de l'arbitre : notes privées et paquet de cartes ===== */
.ref-help { display: grid; gap: .75rem; }
.ref-help__note { margin: 0; padding: .8rem 1rem; border-radius: 14px; background: rgba(255, 201, 74, .12); border: 1px dashed rgba(255, 201, 74, .5); font-size: .95rem; line-height: 1.35; }
.ref-deck { display: grid; gap: .6rem; }
.ref-deck__card { margin: 0; padding: 1.1rem 1rem; border-radius: 18px; text-align: center; font: 700 1.3rem/1.3 var(--font-body);
    background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .25); user-select: text; -webkit-user-select: text; }
.ref-deck__card.is-empty { font-weight: 500; font-size: 1rem; opacity: .6; }
.stepper--big { width: 3.2rem; font-size: 1rem; border-radius: 18px; }

/* ===== Chrono ===== */
.timer { display: inline-flex; align-items: center; gap: .6rem; justify-self: center; margin: .5rem auto; padding: .4rem 1.4rem; border-radius: 999px;
    background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .25); font: 400 2.2rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.timer__icon { font-size: 1.6rem; }
.timer.is-low { border-color: var(--flame); color: #ffb09e; animation: armed .5s ease-in-out infinite alternate; }
.timer.is-over { background: var(--flame); color: #fff; border-color: transparent; font-size: 1.5rem; }

/* ===== Cartes (mot interdit, sujets…) ===== */
.gamecard { display: grid; gap: .6rem; text-align: center; padding: 1.2rem 1rem; border-radius: 20px; background: #fffaf0; color: #1b1d36; border: 3px solid var(--gold); box-shadow: 0 8px 0 rgba(0, 0, 0, .25); }
.gamecard__word { font: 400 1.8rem/1.1 var(--font-display); text-transform: uppercase; color: #1b1d36; }
.gamecard__forbidden { font-weight: 800; color: #c0392b; font-size: 1.1rem; }
.gamecard__hint { font-size: .9rem; color: #555; }
.pubcard { display: grid; gap: .5rem; justify-items: center; margin: .75rem auto; max-width: 40rem; }
.pubcard .gamecard { width: 100%; }
.pubcard .gamecard__word { font-size: 2.2rem; }
.actor-card { display: grid; gap: .8rem; }
.turn-note { margin: .25rem 0 0; font-weight: 700; }
.turn-note b { color: var(--team, var(--gold)); }

/* ===== Arbitres multiples ===== */
.dot--ref.is-on { background: var(--gold); box-shadow: 0 0 0 3px rgba(255, 201, 74, .45); }
.chip.is-on { outline: 2px solid var(--gold); }
.ref-me { margin: 0; padding: .8rem 1rem; border-radius: 16px; background: rgba(124, 92, 255, .2); border: 1px dashed var(--violet); font-weight: 600; text-align: center; }
.ref-me--card { display: grid; gap: .6rem; justify-items: center; }
.ref-team--other { opacity: .75; }
.ref-team--other header { opacity: .9; }

/* ===== Chrono centré sur l'écran + bouton son ===== */
.timer-wrap { display: flex; justify-content: center; width: 100%; }
.timer-wrap .timer { margin: .6rem 0; }
.timer--tv { font-size: 4.2rem; padding: .5rem 2.2rem; gap: 1rem; }
.timer--tv .timer__icon { font-size: 3rem; }
.timer--tv.is-over { font-size: 3rem; }
.sound-toggle { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; width: 3.2rem; height: 3.2rem; border-radius: 50%; border: 2px solid var(--line); background: rgba(8, 12, 32, .8); color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ===== Console arbitre allégée ===== */
.ref-fold, .ref-tips { margin: .6rem 0; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.03); }
.ref-fold > summary, .ref-tips > summary { cursor: pointer; padding: .7rem .9rem; font-weight: 600; color: var(--muted, #aab); list-style: none; }
.ref-fold > summary::-webkit-details-marker, .ref-tips > summary::-webkit-details-marker { display: none; }
.ref-fold[open] > summary, .ref-tips[open] > summary { border-bottom: 1px solid var(--line); }
.ref-fold > .ref-queue, .ref-tips > .ref-help__note { margin: .6rem .9rem; }
.ref-fold--quiet { background: none; border-style: dashed; }
.ref-fold--quiet > .btn { margin: .6rem .9rem; width: calc(100% - 1.8rem); }

/* ===== Vidéo des règles ===== */
.video-card { max-width: 52rem; margin: 0 auto 1rem; text-align: center; }
.video-card video { width: 100%; border-radius: 14px; background: #000; aspect-ratio: 16/9; }
.video-card__hint { margin: .5rem 0 0; font-size: .85rem; }

/* ===== Vidéo des règles en fenêtre modale ===== */
.video-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; background: rgba(5, 6, 20, .88); }
.video-modal[hidden] { display: none; }
.video-modal__box { width: min(94vw, calc(90vh * 16 / 9)); text-align: center; }
.video-modal__box video { width: 100%; border-radius: 16px; background: #000; aspect-ratio: 16/9; box-shadow: 0 20px 80px rgba(0, 0, 0, .6); }
.video-modal__hint { margin: .6rem 0 0; color: var(--text); opacity: .85; }
