/* ───────────────────────── Thème « stade de nuit » ───────────────────────── */
:root {
    --bg: #0b1220;
    --bg-soft: #111a2c;
    --card: #16213a;
    --card-border: #243250;
    --ink: #e8edf6;
    --ink-muted: #93a1ba;
    --green: #22c55e;
    --green-deep: #15803d;
    --green-hover: #2dd368;
    --pitch-a: #1c7a3d;
    --pitch-b: #186a35;
    --gold: #fbbf24;
    --danger: #f87171;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html.modal-open { overflow: hidden; }

body {
    margin: 0;
    font-family: "Inter", system-ui, sans-serif;
    background:
        radial-gradient(1200px 500px at 50% -10%, rgba(34, 197, 94, 0.14), transparent 60%),
        var(--bg);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* la scène stade et le ticker débordent volontairement en 100vw */
}

/* ─────────── Univers par jeu : le thème bascule sur la page entière ─────── */
body.theme-team {
    background:
        radial-gradient(1000px 480px at 20% -10%, rgba(34, 197, 94, 0.22), transparent 60%),
        radial-gradient(1000px 480px at 85% -10%, rgba(34, 197, 94, 0.1), transparent 55%),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px) 0 0 / 100% 56px,
        var(--bg);
}
body.theme-player {
    --green: #eab308;
    --green-deep: #a16207;
    --green-hover: #facc15;
    background:
        radial-gradient(900px 460px at 50% -10%, rgba(234, 179, 8, 0.16), transparent 60%),
        radial-gradient(500px 320px at 90% 25%, rgba(234, 179, 8, 0.05), transparent 65%),
        var(--bg);
}
body.theme-player .site-header a:hover, body.theme-player a:not(.btn) { color: var(--green); }
body.theme-player .site-header a { color: var(--ink); }

/* Univers « Devine les buteurs » : bascule l'accent en bleu ciel */
body.theme-scorer {
    --green: #38bdf8;
    --green-deep: #0284c7;
    --green-hover: #56c9fb;
    background:
        radial-gradient(900px 460px at 50% -10%, rgba(56, 189, 248, 0.16), transparent 60%),
        radial-gradient(500px 320px at 90% 25%, rgba(56, 189, 248, 0.05), transparent 65%),
        var(--bg);
}
body.theme-scorer .site-header a:hover, body.theme-scorer a:not(.btn) { color: var(--green); }
body.theme-scorer .site-header a { color: var(--ink); }

h1, h2, h3, .brand { font-family: "Sora", "Inter", sans-serif; }

a { color: var(--green); }

/* ───────────────────────────────── Header ────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1.4rem;
    background: rgba(11, 18, 32, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
}
.site-nav { display: flex; align-items: center; gap: 1.1rem; }
.site-header a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.site-header a:hover { color: var(--green); }
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.45rem;
    background: none;
    border: none;
    border-radius: 10px;
    color: var(--ink);
    cursor: pointer;
}
.nav-toggle:hover { color: var(--green); }
.nav-toggle .icon { width: 1.45rem; height: 1.45rem; }
.nav-toggle .nav-icon-close { display: none; }
.nav-open .nav-toggle .nav-icon-open { display: none; }
.nav-open .nav-toggle .nav-icon-close { display: block; }
.brand { font-size: 1.12rem; letter-spacing: 0.2px; display: flex; align-items: center; gap: 0.55rem; font-weight: 700; }
.brand strong { color: var(--green); font-weight: 800; }
.brand .icon { width: 1.35rem; height: 1.35rem; color: var(--green); vertical-align: middle; }
.user-chip { color: var(--ink-muted); font-size: 0.9rem; }
.premium-star { color: var(--gold); margin-left: 0.2rem; }
.nav-muted { color: var(--ink-muted) !important; font-size: 0.88rem !important; }
.nav-muted:hover { color: var(--danger) !important; }

/* Sélecteur d'espace admin : pilule « Jeu | Admin » (desktop + responsive) */
.env-switch {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: 99px;
    background: var(--bg-soft);
    border: 1px solid var(--card-border);
}
.env-switch .env-opt {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.34rem 0.85rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-muted) !important;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.env-switch .env-opt .icon { width: 1rem; height: 1rem; }
.env-switch .env-opt:not(.is-active):hover { color: var(--ink) !important; }
.env-switch .env-opt.is-active {
    background: var(--green);
    color: #04130a !important;
    box-shadow: 0 1px 6px rgba(34, 197, 94, 0.35);
}

.container { width: 100%; max-width: 920px; margin: 0 auto; padding: 1.6rem 1.1rem 4rem; flex: 1; }

.site-footer {
    text-align: center;
    padding: 1.2rem;
    color: var(--ink-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--card-border);
}

.muted { color: var(--ink-muted); }

/* ─────────────────────────────── Flash & boutons ─────────────────────────── */
.flash {
    padding: 0.8rem 1.1rem;
    border-radius: var(--radius);
    margin-bottom: 1.1rem;
    border: 1px solid;
    font-weight: 500;
}
.flash-warning { background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.4); color: var(--gold); }
.flash-info { background: rgba(96, 165, 250, 0.1); border-color: rgba(96, 165, 250, 0.4); color: #93c5fd; }
.flash-danger { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.4); color: var(--danger); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--green);
    color: #04130a;
    border: none;
    padding: 0.65rem 1.4rem;
    border-radius: 10px;
    font-size: 0.98rem;
    font-weight: 600;
    font-family: "Inter", sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease;
}
.btn:hover { background: var(--green-hover); }
.btn:active { background: var(--green-deep); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.btn-big { font-size: 1.08rem; padding: 0.85rem 2.1rem; border-radius: 12px; }
.btn-small { padding: 0.4rem 0.95rem; font-size: 0.88rem; }
.btn-secondary { background: var(--card); color: var(--ink); border: 1px solid var(--card-border); }
.btn-secondary:hover { background: var(--card); border-color: var(--green); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid rgba(248, 113, 113, 0.45); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.08); }

/* Icônes inline (UX Icons) */
.icon { width: 1.05em; height: 1.05em; vertical-align: -0.18em; flex-shrink: 0; }
.icon-lg { width: 1.5rem; height: 1.5rem; }

/* ──────────────────────────────── Accueil ────────────────────────────────── */
/* Scène « stade de nuit » pleine largeur : tribunes + flashs, projecteurs qui
   balayent, sol en perspective et compo fantôme qui flotte sur la pelouse. */
.stadium {
    position: relative;
    width: 100vw;
    margin: -1.6rem 0 0 calc(50% - 50vw);
    padding: 4.6rem 1rem 11.5rem;
    overflow: hidden;
    text-align: center;
}
/* Vignette : la nuit se referme sur les bords de la scène */
.stadium::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(120% 95% at 50% 32%, transparent 52%, rgba(4, 8, 16, 0.6) 100%);
}

/* Tribunes : grain de foule en pointillés + flashs de photographes */
.stadium-stands {
    position: absolute;
    inset: 0 0 auto;
    height: 46%;
    background:
        radial-gradient(circle 1.5px at 50% 50%, rgba(148, 163, 184, 0.26) 99%, transparent) 0 0 / 13px 10px,
        radial-gradient(circle 1.5px at 50% 50%, rgba(148, 163, 184, 0.15) 99%, transparent) 6px 5px / 13px 10px,
        linear-gradient(180deg, #0a101d, #0d1526);
    -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent);
    mask-image: linear-gradient(to bottom, #000 45%, transparent);
}
.stadium-stands .flash {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px 3px rgba(255, 255, 255, 0.75);
    opacity: 0;
    animation: camera-flash 6s linear infinite;
}
@keyframes camera-flash {
    0%, 4%, 100% { opacity: 0; }
    1.5% { opacity: 1; }
    2.5% { opacity: 0.25; }
}

/* Projecteurs : deux cônes de lumière qui balayent lentement le terrain */
.floodlight {
    position: absolute;
    top: 0;
    width: 60vw;
    height: 100%;
    pointer-events: none;
    filter: blur(12px);
}
.floodlight-l {
    left: 0;
    background: conic-gradient(from 0deg at 0% 0%,
        transparent 116deg, rgba(167, 243, 196, 0.14) 128deg 142deg, transparent 154deg);
    transform-origin: top left;
    animation: sweep-l 13s ease-in-out infinite alternate;
}
.floodlight-r {
    right: 0;
    background: conic-gradient(from 0deg at 100% 0%,
        transparent 206deg, rgba(167, 243, 196, 0.14) 218deg 232deg, transparent 244deg);
    transform-origin: top right;
    animation: sweep-r 13s ease-in-out infinite alternate;
}
@keyframes sweep-l { from { transform: rotate(-5deg); } to { transform: rotate(6deg); } }
@keyframes sweep-r { from { transform: rotate(6deg); } to { transform: rotate(-5deg); } }

/* Compo fantôme : onze « ? » qui flottent sur la pelouse, taille = profondeur */
.stadium-lineup {
    --scale: 1;
    position: absolute;
    left: 50%;
    bottom: 2.4rem;
    transform: translateX(-50%);
    width: min(660px, 94%);
    height: 165px;
    pointer-events: none;
}
.stadium-lineup span {
    position: absolute;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(var(--s) * var(--scale));
    height: calc(var(--s) * var(--scale));
    border-radius: 50%;
    background: rgba(9, 15, 28, 0.85);
    border: 1.5px solid rgba(134, 239, 172, 0.5);
    color: #b9f6cf;
    font-family: "Sora", sans-serif;
    font-weight: 800;
    font-size: calc(var(--s) * var(--scale) * 0.46);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 16px rgba(34, 197, 94, 0.2);
    animation: token-bob 3.8s ease-in-out infinite;
}
@keyframes token-bob {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -7px; }
}

.stadium-floor {
    position: absolute;
    left: 50%;
    bottom: -12%;
    width: 170%;
    height: 62%;
    transform: translateX(-50%) perspective(650px) rotateX(57deg);
    background:
        radial-gradient(circle at 50% 12%, transparent 88px, rgba(34, 197, 94, 0.5) 89px 91px, transparent 92px),
        linear-gradient(rgba(34, 197, 94, 0.32) 2px, transparent 2px) 0 0 / 100% 88px,
        linear-gradient(90deg, rgba(34, 197, 94, 0.22) 2px, transparent 2px) 0 0 / 128px 100%;
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9) 30%, transparent 95%);
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9) 30%, transparent 95%);
    pointer-events: none;
}
.stadium-content { position: relative; z-index: 1; }

/* Variante « page » : le décor du stade derrière un contenu (inscription, connexion…) */
.stadium-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.2rem 1rem 4.6rem;
    text-align: left;
    min-height: calc(100vh - 220px);
}
.stadium-page .stadium-content { width: 100%; }
.stadium-page .auth-card {
    margin: 0 auto;
    background: rgba(13, 20, 38, 0.88);
    border-color: rgba(134, 239, 172, 0.22);
    backdrop-filter: blur(6px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 44px rgba(34, 197, 94, 0.08);
}
.stadium-page .auth-card h1 {
    font-size: 1.8rem;
    text-shadow: 0 0 32px rgba(34, 197, 94, 0.35);
}
.stadium-page .card-kicker { color: rgba(134, 239, 172, 0.85); margin-bottom: 0.45rem; }

/* Tableau d'affichage : les chiffres clés façon panneau LED du stade */
.scoreboard {
    display: inline-flex;
    margin-top: 1.7rem;
    background: rgba(5, 9, 18, 0.82);
    border: 1px solid rgba(134, 239, 172, 0.25);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(4px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), inset 0 0 26px rgba(34, 197, 94, 0.07);
}
.scoreboard > div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.8rem 1.6rem;
}
.scoreboard > div + div { border-left: 1px solid rgba(134, 239, 172, 0.16); }
.scoreboard strong {
    font-family: "Sora", sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    color: var(--green);
    text-shadow: 0 0 14px rgba(34, 197, 94, 0.75);
}
.scoreboard span {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.hero-cta { margin-top: 1.8rem; display: flex; flex-direction: column; gap: 0.9rem; align-items: center; }
.hero-cta .muted {
    font-size: 0.92rem;
    margin: 0;
    padding: 0.45rem 1rem;
    border-radius: 99px;
    color: #cdd7e8;
    background: rgba(5, 9, 18, 0.62);
    border: 1px solid rgba(134, 239, 172, 0.16);
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.hero-cta .muted a { color: #86efac; font-weight: 600; }

/* Coup d'envoi : le contenu du hero entre en scène en cascade */
.stadium-content > * { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.stadium-content > :nth-child(2) { animation-delay: 0.1s; }
.stadium-content > :nth-child(3) { animation-delay: 0.2s; }
.stadium-content > :nth-child(4) { animation-delay: 0.32s; }
.stadium-content > :nth-child(5) { animation-delay: 0.44s; }
@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Bandeau défilant des équipes de légende, façon panneau publicitaire LED */
.legend-ticker {
    width: 100vw;
    margin: 0 0 1.9rem calc(50% - 50vw);
    padding: 0.65rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(134, 239, 172, 0.18);
    border-bottom: 1px solid rgba(134, 239, 172, 0.18);
    background: rgba(5, 9, 18, 0.75);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7% 93%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 7% 93%, transparent);
}
.ticker-track {
    display: inline-flex;
    white-space: nowrap;
    animation: ticker 48s linear infinite;
    will-change: transform;
}
.ticker-track span {
    color: rgba(134, 239, 172, 0.75);
    font-weight: 600;
    font-size: 0.84rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.35);
}
.ticker-track span::after { content: "·"; margin: 0 1.3rem; color: rgba(134, 239, 172, 0.3); text-shadow: none; }
@keyframes ticker { to { transform: translateX(-50%); } }

.hero { text-align: center; margin: 2.2rem 0 2.6rem; }
.stadium .hero { margin: 0; }
.hero h1 {
    font-size: clamp(2.6rem, 8vw, 4.6rem);
    font-weight: 800;
    margin: 0 0 0.6rem;
    line-height: 1.06;
    text-shadow: 0 0 60px rgba(34, 197, 94, 0.5), 0 4px 30px rgba(0, 0, 0, 0.6);
}
.hero h1 .accent { color: var(--green); }
.hero-overline {
    display: block;
    color: var(--ink-muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    margin-bottom: 0.9rem;
}
.hero p { color: var(--ink-muted); font-size: 1.1rem; max-width: 560px; margin: 0 auto; }

.quota {
    text-align: center;
    margin: 0 0 1.6rem;
    font-size: 1rem;
    color: var(--ink-muted);
}
.quota strong { color: var(--green); font-size: 1.1rem; }
.quota .upsell { color: var(--gold); font-weight: 600; }

.start-form { display: flex; flex-direction: column; gap: 1.4rem; }
.start-form fieldset { border: none; margin: 0; padding: 0; }
.start-form legend {
    font-family: "Sora", sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.7rem;
    padding: 0;
}
.start-form legend small { color: var(--ink-muted); font-weight: 400; font-family: "Inter", sans-serif; }

/* Niveaux de jeu : un écusson par mode, sa couleur, sa jauge de difficulté */
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.mode-card {
    --mode-accent: var(--green);
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0.4rem;
    text-align: center;
    background: var(--card);
    border: 1.5px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1.25rem 0.9rem 1.15rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease,
        transform 0.15s ease, box-shadow 0.15s ease;
}
.mode-beginner { --mode-accent: #4ade80; }
.mode-senior { --mode-accent: #fb923c; }
.mode-veteran { --mode-accent: #fbbf24; }
.mode-card:hover {
    border-color: color-mix(in srgb, var(--mode-accent) 55%, transparent);
    transform: translateY(-2px);
}
.mode-card input { position: absolute; opacity: 0; }
.mode-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--mode-accent) 12%, transparent);
    border: 1.5px solid color-mix(in srgb, var(--mode-accent) 40%, transparent);
    color: var(--mode-accent);
    margin-bottom: 0.15rem;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.mode-badge .icon { width: 1.45rem; height: 1.45rem; }
.mode-card strong { font-family: "Sora", sans-serif; font-size: 1.02rem; }
.mode-pips { display: flex; gap: 4px; align-items: flex-end; height: 12px; }
.mode-pips i { width: 5px; border-radius: 2px; background: rgba(255, 255, 255, 0.13); }
.mode-pips i:nth-child(1) { height: 6px; }
.mode-pips i:nth-child(2) { height: 9px; }
.mode-pips i:nth-child(3) { height: 12px; }
.mode-pips .pip-on {
    background: var(--mode-accent);
    box-shadow: 0 0 6px color-mix(in srgb, var(--mode-accent) 60%, transparent);
}
.mode-card small { color: var(--ink-muted); line-height: 1.4; }
/* Coche de sélection en haut à droite */
.mode-card::after {
    content: "";
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    border: 1.5px solid var(--card-border);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.mode-card:has(input:checked) {
    border-color: var(--mode-accent);
    background: color-mix(in srgb, var(--mode-accent) 8%, var(--card));
    box-shadow: 0 0 26px color-mix(in srgb, var(--mode-accent) 16%, transparent);
}
.mode-card:has(input:checked) .mode-badge {
    background: color-mix(in srgb, var(--mode-accent) 22%, transparent);
    box-shadow: 0 0 18px color-mix(in srgb, var(--mode-accent) 35%, transparent);
}
.mode-card:has(input:checked)::after {
    border-color: var(--mode-accent);
    background: var(--mode-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23081018' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4 10-10'/%3E%3C/svg%3E") center / 11px 11px no-repeat;
}
.mode-card:has(input:focus-visible) { outline: 2px solid var(--mode-accent); outline-offset: 2px; }

.decades { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.decade-chip {
    position: relative;
    padding: 0.45rem 1.05rem;
    border-radius: 999px;
    border: 1.5px solid var(--card-border);
    background: var(--card);
    color: var(--ink-muted);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s ease;
}
.decade-chip:hover { border-color: rgba(34, 197, 94, 0.5); color: var(--ink); }
.decade-chip input { position: absolute; opacity: 0; }
.decade-chip:has(input:checked) {
    background: rgba(34, 197, 94, 0.16);
    border-color: var(--green);
    color: #86efac;
}

.start-cta { text-align: center; margin-top: 0.6rem; }

/* ─────────────────────────────── Plateau de jeu ──────────────────────────── */
.game-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.game-header h1 { margin: 0 0 0.2rem; font-size: 1.7rem; }
.game-header .muted { font-size: 0.92rem; }
.game-score { text-align: right; }
.game-score .score-big { font-family: "Sora", sans-serif; font-size: 1.5rem; font-weight: 800; color: var(--green); }
.game-score .score-sub { color: var(--ink-muted); font-size: 0.85rem; }

.progress-track {
    height: 7px;
    border-radius: 99px;
    background: var(--card);
    overflow: hidden;
    margin-bottom: 1.2rem;
}
.progress-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--green-deep), var(--green));
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.pitch {
    position: relative;
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    grid-template-columns: repeat(5, 1fr);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.06), transparent 55%),
        repeating-linear-gradient(to bottom, var(--pitch-a) 0 16.66%, var(--pitch-b) 16.66% 33.33%);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 1.6rem 0.4rem;
    min-height: 580px;
    margin: 0 0 1.2rem;
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.3), var(--shadow);
    overflow: hidden;
}

/* Marquages du terrain */
.pitch-markings { position: absolute; inset: 0; pointer-events: none; }
.pitch-markings span { position: absolute; --line: rgba(255, 255, 255, 0.45); }
.pm-halfway { top: 50%; left: 0; right: 0; border-top: 2px solid var(--line); }
.pm-circle {
    top: 50%; left: 50%;
    width: 21%; aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border: 2px solid var(--line);
    border-radius: 50%;
}
.pm-box { left: 50%; transform: translateX(-50%); width: 58%; height: 13%; border: 2px solid var(--line); }
.pm-box-top { top: -2px; border-top: none; }
.pm-box-bottom { bottom: -2px; border-bottom: none; }
.pm-six { left: 50%; transform: translateX(-50%); width: 28%; height: 5.5%; border: 2px solid var(--line); }
.pm-six-top { top: -2px; border-top: none; }
.pm-six-bottom { bottom: -2px; border-bottom: none; }
.pm-spot { width: 5px; height: 5px; background: var(--line); border-radius: 50%; left: 50%; transform: translateX(-50%); }
.pm-spot-center { top: 50%; transform: translate(-50%, -50%); }
.pm-spot-top { top: 9.5%; }
.pm-spot-bottom { bottom: 9.5%; }

/* Pastilles joueurs, façon graphique de compo TV */
.player-token {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    background: none;
    border: none;
    padding: 0.2rem;
    cursor: pointer;
    min-width: 0;
    font-family: "Inter", sans-serif;
}
.token-disc {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #0d1626;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-family: "Sora", sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.player-token:hover:not(:disabled) .token-disc,
.bench-token:hover:not(:disabled) .token-disc {
    border-color: var(--gold);
    transform: scale(1.08);
}
.is-selected .token-disc {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.35), 0 3px 8px rgba(0, 0, 0, 0.4);
}
.is-found .token-disc {
    background: var(--green);
    border-color: #fff;
    color: #04130a;
    animation: reveal 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.is-missed .token-disc { background: #4c1d1d; border-color: rgba(255, 255, 255, 0.25); color: #fecaca; }
@keyframes reveal {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.token-name {
    max-width: 100%;
    padding: 0.12rem 0.5rem;
    border-radius: 5px;
    background: rgba(7, 12, 22, 0.6);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.is-found .token-name,
.is-missed .token-name {
    background: rgba(255, 255, 255, 0.92);
    color: #0b1220;
    font-size: 0.72rem;
    letter-spacing: 0;
    font-weight: 600;
}
.is-missed .token-name { text-decoration: line-through; color: #9b2c2c; }

.bench-title { display: flex; align-items: center; gap: 0.45rem; margin: 1.3rem 0 0.6rem; font-size: 1.05rem; }
.bench-title .icon { color: var(--ink-muted); }
.trophy-icon { color: var(--gold); }
.bench { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.bench-token {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.45rem 0.85rem 0.45rem 0.5rem;
    cursor: pointer;
    font-family: "Inter", sans-serif;
    transition: border-color 0.15s ease;
}
.bench-token:hover:not(:disabled) { border-color: var(--gold); }
.bench-token .token-disc { width: 38px; height: 38px; font-size: 0.9rem; }
.bench-token .token-name { background: none; padding: 0; font-size: 0.85rem; color: var(--ink); text-align: left; }
.bench-token.is-found .token-name { background: none; color: var(--ink); }
.bench-token.is-missed .token-name { background: none; color: #fca5a5; }
.bench-info { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; min-width: 0; }
.bench-minute { font-size: 0.72rem; color: var(--ink-muted); }

/* ─────────────────────── Modal de saisie ─────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(4, 8, 16, 0.7);
    backdrop-filter: blur(3px);
    animation: fade-in 0.15s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem 1.3rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    animation: modal-in 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes modal-in {
    from { transform: translateY(14px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes slide-up {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.modal-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-muted);
    cursor: pointer;
}
.modal-close:hover { background: var(--bg-soft); color: var(--ink); }
.modal-close .icon { width: 1.15rem; height: 1.15rem; }
.modal-title {
    margin: 0 0 0.2rem;
    font-size: 1.15rem;
    padding-right: 2.2rem;
}
.modal-number { color: var(--ink-muted); font-weight: 600; font-size: 0.95rem; margin-left: 0.3rem; }
.modal-context { margin: 0 0 0.3rem; color: var(--ink-muted); font-size: 0.92rem; }
.modal-context .icon { color: var(--ink-muted); }
.modal-tip { margin: 0.7rem 0 0; color: var(--ink-muted); font-size: 0.82rem; }
.modal .guess-form { margin-top: 0.9rem; }
.modal .guess-feedback { margin: 0.7rem 0 0; }
.hint { display: block; margin: 0.4rem 0 0; color: var(--gold); font-size: 0.95rem; }
.guess-form { display: flex; gap: 0.6rem; }
.guess-form input[type="text"] {
    flex: 1;
    padding: 0.7rem 0.95rem;
    font-size: 1.05rem;
    border: 1.5px solid var(--card-border);
    border-radius: 10px;
    background: var(--bg-soft);
    color: var(--ink);
    font-family: "Inter", sans-serif;
}
.guess-form input[type="text"]::placeholder { color: var(--ink-muted); }
.guess-form input[type="text"]:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }

.guess-feedback { font-weight: 700; margin: 0.7rem 0 0; }
.guess-correct { color: var(--green); animation: slide-up 0.25s ease; }
.guess-wrong { color: var(--danger); animation: shake 0.35s ease; }
.guess-ambiguous { color: var(--gold); }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
.guess-help { text-align: center; color: var(--ink-muted); margin-top: 1rem; }

/* Jeton révélé cliquable → ouvre la fiche joueur */
.player-token.is-clickable, .bench-token.is-clickable { cursor: pointer; }
.player-token.is-clickable:hover .token-disc { border-color: #fff; transform: scale(1.06); }
.bench-token.is-clickable:hover { border-color: var(--gold); }

/* Fiche joueur (modale d'infos) */
.player-info { max-width: 440px; }
.player-info-head { display: flex; align-items: center; gap: 1rem; padding-right: 2rem; }
.player-info-photo {
    flex-shrink: 0;
    width: 84px;
    height: 84px;
    border-radius: 14px;
    object-fit: cover;
    object-position: top center;
    background: var(--bg-soft);
    border: 1px solid var(--card-border);
}
.player-info-photo--ph {
    display: grid;
    place-items: center;
    font-family: "Sora", sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--green);
    background: rgba(34, 197, 94, 0.1);
}
.player-info-id { min-width: 0; }
.player-info .modal-title { margin: 0; font-size: 1.3rem; }
.player-info-sub { margin: 0.2rem 0 0; color: var(--ink-muted); font-size: 0.92rem; }
.player-info-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem 1rem;
    margin: 1.2rem 0 0;
    padding: 0.9rem 0 0;
    border-top: 1px solid var(--card-border);
}
.player-info-facts div { min-width: 0; }
.player-info-facts dt { color: var(--ink-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 0.15rem; }
.player-info-facts dd { margin: 0; font-weight: 600; font-size: 0.95rem; }
.player-info-desc { margin: 1rem 0 0; color: var(--ink); font-size: 0.95rem; line-height: 1.55; }
.player-info-credit { display: inline-block; margin-top: 1rem; color: var(--ink-muted); font-size: 0.78rem; text-decoration: none; }
.player-info-credit:hover { color: var(--green); text-decoration: underline; }
.player-info-empty { margin: 1rem 0 0; }

.game-actions { margin-top: 1.5rem; text-align: right; }

.game-over {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1.6rem;
    margin: 0 0 1.4rem;
    text-align: center;
    box-shadow: var(--shadow);
    animation: slide-up 0.3s ease;
}
.game-over h2 { margin: 0 0 0.4rem; font-size: 1.5rem; }
.game-over p { color: var(--ink-muted); margin: 0 0 1rem; }
.game-over .btn { margin: 0.2rem 0.3rem; }
/* Écran de victoire : carte qui pulse en or, trophée qui surgit, balayage lumineux + confettis */
.game-over-perfect {
    position: relative;
    overflow: hidden;
    border-color: rgba(251, 191, 36, 0.55);
    background:
        radial-gradient(150% 120% at 50% -15%, rgba(251, 191, 36, 0.22), transparent 60%),
        linear-gradient(180deg, rgba(251, 191, 36, 0.12), var(--card));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 55px rgba(251, 191, 36, 0.16);
    animation: slide-up 0.3s ease, perfect-glow 2.6s ease-in-out infinite alternate;
}
@keyframes perfect-glow {
    from { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 38px rgba(251, 191, 36, 0.12); }
    to   { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 78px rgba(251, 191, 36, 0.3); }
}
/* Balayage lumineux qui traverse la carte */
.game-over-perfect::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.16) 48%, transparent 62%);
    transform: translateX(-120%);
    animation: shine-sweep 3s ease-in-out 0.6s infinite;
}
@keyframes shine-sweep { 0% { transform: translateX(-120%); } 55%, 100% { transform: translateX(120%); } }

.game-over-perfect h2 { color: var(--gold); font-size: 1.7rem; position: relative; }
.game-over-perfect h2 .icon {
    width: 1.55rem;
    height: 1.55rem;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.7));
    transform-origin: 50% 90%;
    animation: trophy-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both,
               trophy-wobble 2.4s ease-in-out 0.7s infinite;
}
@keyframes trophy-pop { from { transform: scale(0) rotate(-25deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes trophy-wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.game-over-perfect p, .game-over-perfect .btn { position: relative; }

/* Confettis */
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.confetti span {
    position: absolute;
    top: -16px;
    width: 8px;
    height: 13px;
    border-radius: 2px;
    opacity: 0;
    animation: confetti-fall 2.6s linear infinite;
}
@keyframes confetti-fall {
    0%   { transform: translateY(-20px) rotateZ(0); opacity: 0; }
    10%  { opacity: 1; }
    100% { transform: translateY(260px) rotateZ(620deg); opacity: 0; }
}
.confetti span:nth-child(1)  { left: 6%;  background: #fbbf24; animation-delay: 0s;    animation-duration: 2.4s; }
.confetti span:nth-child(2)  { left: 13%; background: #22c55e; animation-delay: 0.5s;  animation-duration: 2.9s; }
.confetti span:nth-child(3)  { left: 20%; background: #fff;    animation-delay: 1.1s;  animation-duration: 2.5s; }
.confetti span:nth-child(4)  { left: 27%; background: #fb923c; animation-delay: 0.3s;  animation-duration: 3.1s; }
.confetti span:nth-child(5)  { left: 34%; background: #86efac; animation-delay: 1.4s;  animation-duration: 2.6s; }
.confetti span:nth-child(6)  { left: 41%; background: #fbbf24; animation-delay: 0.8s;  animation-duration: 2.8s; }
.confetti span:nth-child(7)  { left: 48%; background: #fff;    animation-delay: 0.1s;  animation-duration: 3.2s; }
.confetti span:nth-child(8)  { left: 55%; background: #22c55e; animation-delay: 1.7s;  animation-duration: 2.5s; }
.confetti span:nth-child(9)  { left: 62%; background: #fb923c; animation-delay: 0.6s;  animation-duration: 2.9s; }
.confetti span:nth-child(10) { left: 69%; background: #fbbf24; animation-delay: 1.2s;  animation-duration: 2.7s; }
.confetti span:nth-child(11) { left: 76%; background: #86efac; animation-delay: 0.4s;  animation-duration: 3.0s; }
.confetti span:nth-child(12) { left: 83%; background: #fff;    animation-delay: 1.5s;  animation-duration: 2.4s; }
.confetti span:nth-child(13) { left: 90%; background: #22c55e; animation-delay: 0.9s;  animation-duration: 2.8s; }
.confetti span:nth-child(14) { left: 95%; background: #fb923c; animation-delay: 1.9s;  animation-duration: 2.6s; }
.confetti span:nth-child(15) { left: 10%; background: #fff;    animation-delay: 2.1s;  animation-duration: 3.1s; }
.confetti span:nth-child(16) { left: 58%; background: #fbbf24; animation-delay: 2.3s;  animation-duration: 2.5s; }

/* ─────────────────── Cartes de jeu immersives (accueil) ──────────────────── */
.game-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.3rem; margin-top: 1.8rem; }
.game-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 1.7rem 1.6rem;
    min-height: 330px;
    display: flex;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-team {
    background:
        radial-gradient(420px 300px at 105% 110%, rgba(34, 197, 94, 0.25), transparent 70%),
        linear-gradient(155deg, #11331f 0%, #0d2014 45%, var(--card) 100%);
}
.card-team:hover { border-color: rgba(34, 197, 94, 0.6); }
.card-player {
    --green: #eab308;
    --green-deep: #a16207;
    --green-hover: #facc15;
    background:
        radial-gradient(420px 300px at 105% 110%, rgba(234, 179, 8, 0.2), transparent 70%),
        linear-gradient(155deg, #38290c 0%, #211807 45%, var(--card) 100%);
}
.card-player:hover { border-color: rgba(234, 179, 8, 0.55); }
.card-scorer {
    --green: #38bdf8;
    --green-deep: #0284c7;
    --green-hover: #56c9fb;
    background:
        radial-gradient(420px 300px at 105% 110%, rgba(56, 189, 248, 0.2), transparent 70%),
        linear-gradient(155deg, #0c2c3a 0%, #08202b 45%, var(--card) 100%);
}
.card-scorer:hover { border-color: rgba(56, 189, 248, 0.55); }
.card-scorer .card-art { color: #7dd3fc; }
.card-art {
    position: absolute;
    right: -1.5rem;
    top: 50%;
    transform: translateY(-50%) rotate(6deg);
    width: 46%;
    max-width: 230px;
    pointer-events: none;
    opacity: 0.32;
    transition: opacity 0.2s ease, transform 0.25s ease;
}
.card-team .card-art { color: #5fd98a; }
.card-player .card-art { color: #f3cc4a; }
.game-card:hover .card-art { opacity: 0.5; transform: translateY(-52%) rotate(3deg) scale(1.03); }
.card-body { position: relative; display: flex; flex-direction: column; gap: 0.65rem; max-width: 66%; }
.card-kicker {
    display: block;
    color: var(--ink-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}
.game-card h2 { margin: 0; font-size: 1.45rem; }
.game-card p { margin: 0; color: var(--ink-muted); line-height: 1.5; }
.card-stats { display: flex; gap: 0.5rem; list-style: none; padding: 0; margin: 0.2rem 0 0; flex-wrap: wrap; }
.card-stats li {
    padding: 0.22rem 0.7rem;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    font-weight: 600;
}
.game-card .start-form { margin-top: auto; gap: 0.8rem; padding-top: 0.9rem; }
.game-card .btn-big { align-self: flex-start; }

.decade-filter summary {
    cursor: pointer;
    color: var(--ink-muted);
    font-size: 0.88rem;
    font-weight: 600;
    list-style: none;
}
.decade-filter summary::before { content: "▸ "; }
.decade-filter[open] summary::before { content: "▾ "; }
.decade-filter .decades { margin-top: 0.6rem; }

/* ─────────────────────── Devine le joueur ────────────────────────────────── */
.mystery-id { display: flex; align-items: center; gap: 1rem; }
.mystery-avatar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px dashed rgba(234, 179, 8, 0.6);
    background: rgba(234, 179, 8, 0.08);
    color: var(--green);
    font-family: "Sora", sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
}
.player-board .game-header h1 { font-size: 1.5rem; }

.clue-list { list-style: none; margin: 1.2rem 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.clue-card {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 0.85rem 1.1rem;
    font-size: 1.02rem;
}
.clue-latest { border-color: rgba(34, 197, 94, 0.55); animation: slide-up 0.25s ease; }
.clue-index {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--bg-soft);
    color: var(--ink-muted);
    font-size: 0.8rem;
    font-weight: 700;
    align-self: center;
}
.clue-latest .clue-index { background: rgba(34, 197, 94, 0.16); color: var(--green); }
body.theme-player .clue-latest { border-color: rgba(234, 179, 8, 0.55); }
body.theme-player .clue-latest .clue-index { background: rgba(234, 179, 8, 0.16); color: var(--green); }
body.theme-player .guess-form input[type="text"]:focus { box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.18); }
body.theme-player .score-pill { background: rgba(234, 179, 8, 0.15); color: var(--green); }
.letter-board { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; margin: 1.2rem 0; }
.letter-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.5rem;
    border-radius: 8px;
    background: var(--card);
    border: 1px solid var(--card-border);
    font-family: "Sora", sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
}
.letter-hidden { background: var(--bg-soft); border-style: dashed; }
.letter-shown { border-color: rgba(234, 179, 8, 0.55); color: var(--green); animation: slide-up 0.25s ease; }
.letter-gap { width: 1.1rem; }
@media (max-width: 680px) {
    .letter-board { gap: 0.22rem; }
    .letter-tile { width: 1.7rem; height: 2.1rem; font-size: 0.95rem; }
    .letter-gap { width: 0.8rem; }
}
.player-guess-form { margin-top: 0.4rem; }
.player-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.2rem;
}
.score-pill-missed { background: rgba(248, 113, 113, 0.15); color: var(--danger); }
.results-section { display: flex; align-items: center; gap: 0.5rem; font-size: 1.15rem; margin: 1.6rem 0 0.7rem; }
.results-section .icon { color: var(--green); }

/* ─────────────────────── Devine les buteurs ──────────────────────────────── */
.scorer-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 0.6rem 0 1.4rem; }
@media (max-width: 680px) { .scorer-teams { grid-template-columns: 1fr; } }
.scorer-team {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem 1.1rem;
}
.scorer-team-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin: 0 0 0.85rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--card-border);
    font-size: 1.05rem;
}
.scorer-team-score {
    font-family: "Sora", sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--green);
}
.scorer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.scorer-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: var(--bg-soft);
    border: 1px solid transparent;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.scorer-card.is-found {
    border-color: color-mix(in srgb, var(--green) 45%, transparent);
    background: color-mix(in srgb, var(--green) 9%, var(--bg-soft));
}
.scorer-card.is-missed { opacity: 0.8; }
.scorer-disc {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #0d1626;
    border: 2px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-family: "Sora", sans-serif;
    font-weight: 800;
}
.scorer-disc .icon { width: 1.05rem; height: 1.05rem; }
.scorer-card.is-found .scorer-disc { background: var(--green); border-color: #fff; color: #04130a; }
.scorer-card.is-missed .scorer-disc { background: #4c1d1d; border-color: rgba(255, 255, 255, 0.2); color: #fecaca; }
.scorer-meta { display: flex; flex-direction: column; gap: 0.12rem; min-width: 0; }
.scorer-name { font-weight: 700; font-size: 0.96rem; }
.scorer-card:not(.is-found):not(.is-missed) .scorer-name { color: var(--ink-muted); }
.scorer-hint { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; color: var(--ink-muted); }
.scorer-hint .icon { width: 0.85rem; height: 0.85rem; color: var(--green); }
.scorer-minute { color: var(--green); font-weight: 600; }
.scorer-guess-form { margin-top: 0.2rem; }

/* ─────────────────────── Auth, résultats, tableaux ───────────────────────── */
.auth-card {
    max-width: 420px;
    margin: 2.5rem auto;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1.8rem;
    box-shadow: var(--shadow);
}
.auth-card h1 { margin: 0 0 0.4rem; font-size: 1.6rem; }
.auth-card > .muted { margin-top: 0; }
.auth-form { display: flex; flex-direction: column; gap: 1.15rem; margin-top: 1.3rem; }
.auth-form > label, .auth-form .form-label,
.auth-form > div { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.92rem; }
.auth-form input[type="email"], .auth-form input[type="password"], .auth-form input[type="text"] {
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    border: 1.5px solid var(--card-border);
    border-radius: 10px;
    background: var(--bg-soft);
    color: var(--ink);
}
.auth-form input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }
.auth-form .btn { margin-top: 0.7rem; padding-top: 0.78rem; padding-bottom: 0.78rem; }
.auth-form ul { margin: 0.3rem 0 0; padding-left: 1.1rem; color: var(--danger); font-size: 0.85rem; font-weight: 400; }
.auth-form .help-text { color: var(--ink-muted); font-size: 0.8rem; font-weight: 400; margin: 0.1rem 0 0; }
.auth-alt {
    text-align: center;
    margin-top: 1.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--card-border);
    font-size: 0.92rem;
}
.resend-form { margin-top: 1.3rem; text-align: center; }
.auth-card-wide { max-width: 640px; }
.form-mode { display: flex; flex-direction: column; gap: 0.6rem; }
.form-label-text { font-weight: 600; font-size: 0.92rem; }
.form-mode .mode-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 680px) { .form-mode .mode-grid { grid-template-columns: 1fr; } }
/* Badge « ton mode » sur l'accueil connecté : couleur dictée par le mode choisi */
.current-mode-row { display: flex; justify-content: center; margin: 0.4rem 0 0; }
.current-mode {
    --mode-accent: var(--green);
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.4rem 0.45rem 0.4rem 1.05rem;
    border-radius: 99px;
    background: var(--card);
    border: 1px solid color-mix(in srgb, var(--mode-accent) 38%, var(--card-border));
    box-shadow: 0 0 22px color-mix(in srgb, var(--mode-accent) 14%, transparent);
}
.current-mode-kicker {
    color: var(--ink-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.9px;
}
.current-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: var(--mode-accent);
    font-family: "Sora", sans-serif;
    font-weight: 700;
    font-size: 0.98rem;
}
.current-mode-badge .icon { width: 1.1rem; height: 1.1rem; }
.current-mode-change {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.32rem 0.85rem;
    border-radius: 99px;
    background: color-mix(in srgb, var(--mode-accent) 15%, transparent);
    color: var(--mode-accent) !important;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}
.current-mode-change .icon { width: 0.92rem; height: 0.92rem; }
.current-mode-change:hover { background: color-mix(in srgb, var(--mode-accent) 26%, transparent); }
@media (max-width: 420px) {
    .current-mode { flex-wrap: wrap; justify-content: center; text-align: center; border-radius: var(--radius); }
}

/* Mon compte */
.account-card { max-width: 640px; }
.account-facts { display: flex; gap: 2.2rem; margin: 1.2rem 0 1.6rem; }
.account-facts dt { color: var(--ink-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 0.25rem; }
.account-facts dd { margin: 0; font-weight: 600; }
.account-form h2 { font-size: 1.05rem; margin: 0 0 0.7rem; }
.account-save { margin-top: 1.1rem; }
.account-upgrade { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--card-border); }

/* Offre illimitée — même fond que le reste du site, carte accentuée or */
.premium-card {
    max-width: 480px;
    text-align: center;
    border-color: rgba(251, 191, 36, 0.4);
    background:
        radial-gradient(130% 80% at 50% 0%, rgba(251, 191, 36, 0.12), transparent 62%),
        var(--card);
}
.premium-card .premium-kicker {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.25rem 0.7rem;
    border-radius: 99px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: var(--gold); font-weight: 700; font-size: 0.82rem;
    text-transform: uppercase; letter-spacing: 0.6px;
}
.premium-card .premium-kicker .icon { width: 1rem; height: 1rem; }
.premium-card h1 { margin-top: 0.7rem; }
.premium-price { margin: 1.3rem 0; }
.premium-price strong { display: block; font-size: 3.2rem; color: var(--gold); line-height: 1; font-family: "Sora", sans-serif; }
.premium-price span { color: var(--ink-muted); font-size: 0.9rem; }
.premium-features { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; text-align: left; display: flex; flex-direction: column; gap: 0.7rem; }
.premium-features li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.95rem; }
.premium-features .icon { width: 1.15rem; height: 1.15rem; color: var(--green); flex-shrink: 0; margin-top: 0.1rem; }
.premium-card form { display: flex; flex-direction: column; }
.premium-reassure { margin-top: 0.9rem; font-size: 0.82rem; display: inline-flex; align-items: center; gap: 0.4rem; justify-content: center; }
.premium-reassure .icon { width: 0.9rem; height: 0.9rem; }

/* CTA premium : bouton or pleine largeur, volontairement très tranché */
.btn-premium {
    width: 100%;
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    color: #2a1c02;
    font-size: 1.12rem;
    font-weight: 800;
    padding: 0.95rem 1.6rem;
    border: 1px solid rgba(252, 211, 77, 0.7);
    border-radius: 13px;
    box-shadow: 0 10px 26px rgba(245, 158, 11, 0.32);
}
.btn-premium .icon { color: #2a1c02; }
.btn-premium:hover { background: linear-gradient(135deg, #fde68a 0%, #fbbf24 100%); box-shadow: 0 12px 32px rgba(245, 158, 11, 0.42); }
.btn-premium:active { background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%); }
.btn-premium:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.results-table th, .results-table td { padding: 0.75rem 0.95rem; text-align: left; border-bottom: 1px solid var(--card-border); }
.results-table tbody tr:last-child td { border-bottom: none; }
.results-table thead { background: var(--bg-soft); }
.results-table thead th { color: var(--ink-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.6px; }
.results-table tbody tr:hover { background: rgba(34, 197, 94, 0.05); }
.score-pill {
    display: inline-block;
    padding: 0.15rem 0.65rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.88rem;
    background: rgba(34, 197, 94, 0.15);
    color: var(--green);
}
.score-pill-perfect { background: rgba(251, 191, 36, 0.15); color: var(--gold); }

/* Page « Mes résultats » */
.results-hero { margin: 0.5rem 0 1.8rem; }
.results-hero .card-kicker { margin-bottom: 0.4rem; }
.results-hero h1 { margin: 0 0 0.35rem; font-size: 2.1rem; }
.results-hero p { margin: 0; }

.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
    margin-bottom: 2.2rem;
}
.stat-card {
    --stat-accent: var(--green);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.05rem 1.15rem;
    background:
        radial-gradient(120% 130% at 0% 0%, color-mix(in srgb, var(--stat-accent) 12%, transparent), transparent 65%),
        var(--card);
    border: 1px solid color-mix(in srgb, var(--stat-accent) 28%, var(--card-border));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.stat-green { --stat-accent: var(--green); }
.stat-gold { --stat-accent: var(--gold); }
.stat-amber { --stat-accent: #eab308; }
.stat-sky { --stat-accent: #38bdf8; }
.stat-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 13px;
    background: color-mix(in srgb, var(--stat-accent) 16%, transparent);
    color: var(--stat-accent);
}
.stat-icon .icon { width: 1.5rem; height: 1.5rem; }
.stat-body { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.stat-value { font-family: "Sora", sans-serif; font-size: 1.7rem; font-weight: 800; color: var(--ink); }
.stat-label { color: var(--ink-muted); font-size: 0.82rem; font-weight: 600; }

.results-block { margin-bottom: 2rem; }
.results-note { margin: 0.4rem 0 0; }

.results-empty {
    text-align: center;
    max-width: 460px;
    margin: 2.5rem auto;
    padding: 2.4rem 1.6rem;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.results-empty-icon {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.12);
    color: var(--green);
}
.results-empty-icon .icon { width: 2rem; height: 2rem; }
.results-empty h2 { margin: 0 0 0.4rem; font-size: 1.4rem; }
.results-empty p { margin: 0 0 1.4rem; }

@media (max-width: 680px) {
    .results-stats { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
    .stat-value { font-size: 1.45rem; }
    .results-hero h1 { font-size: 1.7rem; }
    /* Les tableaux de résultats se replient en cartes, comme l'admin */
    .results-table { background: transparent; box-shadow: none; }
    .results-table thead { display: none; }
    .results-table tbody, .results-table tr, .results-table td { display: block; }
    .results-table tr {
        background: var(--card);
        border: 1px solid var(--card-border);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        margin-bottom: 0.85rem;
        padding: 0.35rem 0;
        overflow: hidden;
    }
    .results-table tbody tr:hover { background: var(--card); }
    .results-table td { border: none; padding: 0.4rem 1rem; text-align: left; }
    .results-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.15rem;
        color: var(--ink-muted);
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}

/* ─────────────────────────────── Pages d'erreur ──────────────────────────── */
.error-scene { min-height: calc(100vh - 200px); }
.error-content { text-align: center; max-width: 560px; margin: 0 auto; }
.error-badge {
    display: inline-grid;
    place-items: center;
    width: 66px;
    height: 66px;
    margin: 0 auto 0.4rem;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(134, 239, 172, 0.32);
    color: var(--green);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.18);
}
.error-badge .icon { width: 2rem; height: 2rem; }
.error-code {
    font-family: "Sora", sans-serif;
    font-size: clamp(4.8rem, 19vw, 8.5rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
    color: var(--green);
    text-shadow: 0 0 60px rgba(34, 197, 94, 0.5), 0 4px 30px rgba(0, 0, 0, 0.6);
}
.error-content .card-kicker { margin-top: 0.5rem; color: rgba(134, 239, 172, 0.85); }
.error-content h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); margin: 0.15rem 0 0.65rem; }
.error-msg { color: var(--ink-muted); font-size: 1.05rem; max-width: 440px; margin: 0 auto 1.7rem; line-height: 1.6; }
.error-actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

/* Variante serveur (5xx) : tonalité « alerte » rouge */
.error-server .error-badge { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.35); color: var(--danger); box-shadow: 0 0 30px rgba(248, 113, 113, 0.16); }
.error-server .error-code { color: var(--danger); text-shadow: 0 0 60px rgba(248, 113, 113, 0.45), 0 4px 30px rgba(0, 0, 0, 0.6); }
.error-server .card-kicker { color: rgba(252, 165, 165, 0.9); }

/* ──────────────────────────────── Responsive ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 680px) {
    .stadium { padding-bottom: 8.5rem; }
    .stadium-page { padding: 2rem 0.7rem 3.4rem; }
    .stadium-lineup { --scale: 0.72; height: 120px; bottom: 1.8rem; }
    .scoreboard > div { padding: 0.65rem 0.95rem; }
    .scoreboard strong { font-size: 1.2rem; }
    .mode-grid { grid-template-columns: 1fr; }
    .mode-card {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto auto;
        justify-items: start;
        column-gap: 0.85rem;
        row-gap: 0.2rem;
        text-align: left;
        padding: 0.85rem 2.6rem 0.85rem 0.85rem;
    }
    .mode-card .mode-badge {
        grid-area: 1 / 1 / 4 / 2;
        width: 42px;
        height: 42px;
        margin: 0;
        align-self: center;
    }
    .mode-card strong { grid-area: 1 / 2 / 2 / 3; }
    .mode-card .mode-pips { grid-area: 2 / 2 / 3 / 3; }
    .mode-card small { grid-area: 3 / 2 / 4 / 3; }
    .game-cards { grid-template-columns: 1fr; }
    .game-card { min-height: 0; }
    .card-body { max-width: 78%; }
    .card-art { opacity: 0.18; right: -3rem; }
    .mystery-id { align-items: flex-start; }
    .mystery-avatar { width: 50px; height: 50px; font-size: 1.3rem; }
    /* Modal en bottom-sheet sur mobile (hors dialog des décennies, centré lui) */
    .modal-backdrop { align-items: flex-end; padding: 0; }
    .modal-backdrop .modal {
        max-width: none;
        border-radius: var(--radius) var(--radius) 0 0;
        border-bottom: none;
        padding-bottom: max(1.3rem, env(safe-area-inset-bottom));
        animation: sheet-in 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    }
    @keyframes sheet-in {
        from { transform: translateY(40%); }
        to { transform: translateY(0); }
    }
    .pitch { min-height: 480px; padding: 1.2rem 0.15rem; }
    .token-disc { width: 38px; height: 38px; font-size: 0.9rem; }
    .token-name { font-size: 0.58rem; padding: 0.1rem 0.35rem; }
    .is-found .token-name, .is-missed .token-name { font-size: 0.62rem; }
    .game-header { align-items: flex-start; }
    .game-score { text-align: left; }
    .site-header { padding: 0.6rem 0.9rem; }
    .nav-toggle { display: flex; }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.3rem 0.9rem 0.8rem;
        background: rgba(11, 18, 32, 0.96);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--card-border);
        box-shadow: var(--shadow);
    }
    .nav-open .site-nav { display: flex; animation: slide-up 0.18s ease; }
    .site-nav a, .site-nav .user-chip { padding: 0.75rem 0.2rem; }
    .site-nav a:not(.btn) { border-bottom: 1px solid var(--card-border); }
    .site-nav a:last-child { border-bottom: none; }
    .site-nav .user-chip { order: -1; border-bottom: 1px solid var(--card-border); }
    .site-nav .btn { margin-top: 0.6rem; text-align: center; }
    /* La pilule reste un bloc horizontal compact dans le menu en colonne */
    .site-nav .env-switch { align-self: flex-start; margin: 0.5rem 0 0.3rem; }
    .site-nav .env-switch .env-opt { padding: 0.4rem 1rem; border-bottom: none; }
}

/* ───────────────────────── Bannière d'installation PWA ───────────────────────── */
.pwa-install {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 1rem;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: min(560px, calc(100vw - 2rem));
    padding: 0.8rem 1rem;
    background: var(--bg-soft);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: slide-up 0.18s ease;
}
.pwa-install[hidden] { display: none; }
.pwa-install-text {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    margin: 0;
    font-size: 0.92rem;
}
.pwa-install-text .icon { width: 1.4rem; height: 1.4rem; color: var(--green); }
.pwa-install .btn { white-space: nowrap; }
.pwa-install-close {
    background: none;
    border: 0;
    padding: 0.3rem;
    display: grid;
    color: var(--ink-muted);
    cursor: pointer;
}
.pwa-install-close:hover { color: var(--ink); }

/* ──────────────────────────────── Administration ─────────────────────────── */
.admin-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}
.admin-head h1 { margin: 0; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.admin-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 99px;
    color: var(--ink-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
}
.admin-nav a:hover { color: var(--ink); background: var(--bg-soft); }
.admin-nav a.is-active { color: var(--green); border-color: var(--card-border); background: var(--card); }

.admin-section { margin-bottom: 2rem; }
.admin-section > h2 {
    font-size: 1.05rem;
    margin: 0 0 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ink);
}

/* Cartes KPI */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.9rem;
}
.kpi-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.kpi-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.12);
    color: var(--green);
}
.kpi-icon .icon { width: 1.4rem; height: 1.4rem; }
.kpi-body { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.kpi-value { font-family: "Sora", sans-serif; font-size: 1.55rem; font-weight: 800; }
.kpi-label { color: var(--ink-muted); font-size: 0.82rem; font-weight: 600; }
.kpi-hint { color: var(--ink-muted); font-size: 0.74rem; margin-top: 0.15rem; }
.kpi-gold .kpi-icon { background: rgba(251, 191, 36, 0.14); color: var(--gold); }
.kpi-green .kpi-icon { background: rgba(34, 197, 94, 0.14); color: var(--green); }
.kpi-warn .kpi-icon { background: rgba(248, 113, 113, 0.14); color: var(--danger); }
.kpi-warn .kpi-value { color: var(--danger); }

/* Mini histogramme inscriptions */
.spark {
    display: flex;
    align-items: flex-end;
    gap: 0.4rem;
    height: 130px;
    padding: 0.8rem 1rem;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
}
.spark-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 0.3rem; }
.spark-bar {
    width: 100%;
    min-height: 3px;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(180deg, var(--green), var(--green-deep));
}
.spark-val { font-size: 0.72rem; color: var(--ink-muted); font-weight: 600; }

/* Recherche / filtres */
.admin-search {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
    color: var(--ink-muted);
}
.admin-search input[type="search"] {
    flex: 1;
    min-width: 200px;
    padding: 0.55rem 0.85rem;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--ink);
    font-family: "Inter", sans-serif;
    font-size: 0.92rem;
}
.admin-search input[type="search"]:focus { outline: none; border-color: var(--green); }
.admin-select {
    padding: 0.55rem 0.7rem;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--ink);
    font-family: "Inter", sans-serif;
    font-size: 0.9rem;
}

/* Tableaux admin */
.table-scroll { overflow-x: auto; }
.admin-table { font-size: 0.92rem; }
.admin-table .ta-right { text-align: right; }
.hint-cmd code { background: var(--bg-soft); padding: 0.1rem 0.4rem; border-radius: 6px; font-size: 0.85em; }

.badge {
    display: inline-block;
    padding: 0.12rem 0.55rem;
    border-radius: 99px;
    font-size: 0.74rem;
    font-weight: 700;
    margin: 0 0.15rem 0.15rem 0;
}
.badge-ok { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.badge-warn { background: rgba(248, 113, 113, 0.15); color: var(--danger); }
.badge-gold { background: rgba(251, 191, 36, 0.15); color: var(--gold); }
.badge-admin { background: rgba(147, 161, 186, 0.18); color: var(--ink); }

.admin-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end; }
.admin-actions form { margin: 0; }
.btn-act {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.46rem 0.8rem;
    border-radius: 9px;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1;
    min-height: 38px;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}

/* Mobile / petite tablette : la table se replie en cartes — plus de scroll horizontal */
@media (max-width: 900px) {
    .table-scroll { overflow: visible; }
    .admin-table { background: transparent; box-shadow: none; }
    .admin-table thead { display: none; }
    .admin-table tbody, .admin-table tr, .admin-table td { display: block; }
    .admin-table tr {
        background: var(--card);
        border: 1px solid var(--card-border);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        margin-bottom: 0.85rem;
        padding: 0.35rem 0;
        overflow: hidden;
    }
    .admin-table tbody tr:hover { background: var(--card); }
    .admin-table td {
        border: none;
        padding: 0.4rem 1rem;
        text-align: left;
    }
    .admin-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.2rem;
        color: var(--ink-muted);
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    .admin-table .cell-email { word-break: break-all; }
    .admin-table .cell-actions { text-align: left; padding-top: 0.6rem; }
    .admin-table .cell-actions .admin-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .admin-table .cell-actions form { width: 100%; }
    .admin-table .cell-actions .btn-act { width: 100%; justify-content: center; min-height: 46px; font-size: 0.88rem; }
}

@media (max-width: 680px) {
    .admin-head { flex-direction: column; align-items: stretch; }
    .admin-nav { justify-content: center; }
    .kpi-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .admin-search input[type="search"] { min-width: 0; }
}

@media (max-width: 420px) {
    .admin-table .cell-actions .admin-actions { grid-template-columns: 1fr; }
}

/* ──────────────────────── Double authentification (2FA) ──────────────────── */
.code-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: var(--bg-soft);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--ink);
    font-family: "Sora", monospace;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    text-align: center;
}
.code-input:focus { outline: none; border-color: var(--green); }
.code-input::placeholder { color: var(--card-border); letter-spacing: 0.5rem; }

.setup-steps { color: var(--ink-muted); padding-left: 1.2rem; margin: 0.6rem 0 1.4rem; line-height: 1.7; }
.setup-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.4rem;
    margin-bottom: 1.6rem;
}
.qr-frame {
    flex-shrink: 0;
    padding: 0.7rem;
    background: #fff;
    border-radius: 12px;
    line-height: 0;
}
.qr-frame svg { width: 200px; height: 200px; display: block; }
.setup-key { min-width: 200px; }
.secret-key {
    display: inline-block;
    margin-top: 0.3rem;
    padding: 0.45rem 0.7rem;
    background: var(--bg-soft);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    font-size: 1.05rem;
    letter-spacing: 0.12rem;
    word-break: break-all;
    color: var(--green);
}
.setup-hint { font-size: 0.82rem; margin: 0.4rem 0 0; }
.trusted-option { display: flex; align-items: center; gap: 0.5rem; color: var(--ink-muted); font-size: 0.9rem; }

@media (max-width: 480px) {
    .setup-grid { justify-content: center; text-align: center; }
    .setup-key { text-align: center; }
}

/* ─────────────────── Onboarding (après confirmation d'email) ──────────────── */
.onboarding {
    max-width: 760px;
    margin: 1.5rem auto;
    text-align: center;
}
.onboarding-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: 99px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--green);
    font-weight: 700; font-size: 0.82rem;
    text-transform: uppercase; letter-spacing: 0.6px;
    margin-bottom: 1.1rem;
}
.onboarding h1 { font-size: 2.1rem; margin: 0 0 0.6rem; }
.onboarding h1 .accent { color: var(--green); }
.onboarding-lead { color: var(--ink-muted); font-size: 1.05rem; max-width: 540px; margin: 0 auto 2rem; line-height: 1.6; }

.onboarding-games {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.8rem;
    text-align: left;
}
.onboarding-game {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1.3rem;
    box-shadow: var(--shadow);
}
.onboarding-game-icon {
    display: inline-grid; place-items: center;
    width: 46px; height: 46px;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.12);
    color: var(--green);
    margin-bottom: 0.7rem;
}
.onboarding-game-icon .icon { width: 1.5rem; height: 1.5rem; }
.onboarding-game h2 { font-size: 1.15rem; margin: 0 0 0.35rem; }
.onboarding-game p { color: var(--ink-muted); font-size: 0.92rem; margin: 0; line-height: 1.5; }
.onboarding-game.theme-player-accent .onboarding-game-icon { background: rgba(234, 179, 8, 0.14); color: var(--gold); }

.onboarding-steps {
    list-style: none; padding: 0; margin: 0 auto 2rem;
    max-width: 560px; text-align: left;
    display: flex; flex-direction: column; gap: 0.8rem;
}
.onboarding-steps li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.96rem; color: var(--ink); }
.onboarding-steps .icon { width: 1.2rem; height: 1.2rem; color: var(--green); flex-shrink: 0; margin-top: 0.12rem; }
.onboarding-steps strong { font-weight: 700; }

.onboarding-cta { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.onboarding-cta .btn-big { padding: 0.95rem 2.4rem; }
.onboarding-secondary { color: var(--ink-muted); font-size: 0.92rem; display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none; }
.onboarding-secondary:hover { color: var(--green); }
.onboarding-secondary .icon { width: 1rem; height: 1rem; }

@media (max-width: 620px) {
    .onboarding h1 { font-size: 1.7rem; }
    .onboarding-games { grid-template-columns: 1fr; }
}

/* ─────────────────── Saisie « Devine l'équipe » : ajustements ─────────────── */
/* Bouton Valider en icône seule : ne déborde jamais de la modale sur mobile. */
.guess-submit { flex: 0 0 auto; padding: 0.7rem 1rem; }
.guess-submit .icon { width: 1.35rem; height: 1.35rem; }

/* L'attribut [hidden] doit l'emporter sur .modal-backdrop { display:flex }. */
.modal-backdrop[hidden] { display: none; }

/* Modale de choix des décennies */
.decade-modal-grid { margin: 0.9rem 0 1.3rem; }
.decade-go { width: 100%; justify-content: center; }

/* <dialog> natif : centré par le navigateur (top layer), fond transparent —
   la carte intérieure réutilise le style .modal. */
.decade-dialog {
    margin: auto;
    max-width: min(460px, calc(100vw - 2rem));
    padding: 0;
    border: none;
    background: transparent;
    overflow: visible;
}
.decade-dialog::backdrop {
    background: rgba(4, 8, 16, 0.7);
    backdrop-filter: blur(3px);
}
.decade-dialog .decade-dialog-card { margin: 0; }
/* L'étiquette « Tout » : un poil détachée des décennies */
.decade-chip-all { font-weight: 700; }
