/* =========================================================================
   Pronos MATRYS - Coupe du Monde 2026
   Thème DARK PREMIUM (OLED) conforme charte MATRYS V2.
   Noir #1A1517 + dégradé arc-en-ciel néon. Glassmorphism, glow, animations.
   Typo : Archivo Black (titres/chiffres, épais moderne) + Inter (texte).
   ========================================================================= */
:root {
    /* Charte - accents néon */
    --gold: #FFC600;
    --orange: #FF9600;
    --magenta: #D70A84;
    --violet: #7B2CBF;       /* violet charte un peu remonté pour le contraste dark */
    --teal: #41A2BF;
    --mint: #21CDAB;
    --green-pos: #1bd97b;

    /* Dégradés courts et contrastés (lisibles), au lieu de tout l'arc-en-ciel.
       Le rainbow complet est réservé aux fines bandes décoratives. */
    --grad: linear-gradient(100deg, #FF7A00, #D70A84, #7B2CBF);          /* CTA, pills (texte blanc OK) */
    --grad-cool: linear-gradient(100deg, #7B2CBF, #41A2BF, #21CDAB);
    --grad-text: linear-gradient(100deg, #FFB23E, #FF2E8B, #C065FF);     /* texte sur fond sombre, bien lisible */
    --grad-rainbow: linear-gradient(100deg, #FFC600, #FF9600, #D70A84, #7B2CBF, #41A2BF, #21CDAB);

    /* Surfaces dark */
    --bg: #0e0b0d;
    --bg-2: #141017;
    --surface: rgba(255, 255, 255, 0.045);
    --surface-2: rgba(255, 255, 255, 0.07);
    --surface-solid: #1a151b;
    --input-bg: rgba(255, 255, 255, 0.05);
    --text: #f6f3f6;
    --muted: #a79eb0;
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.18);

    --radius: 16px;
    --radius-lg: 22px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
    --shadow-sm: 0 6px 20px rgba(0, 0, 0, .30);
    --glow-magenta: 0 0 24px rgba(215, 10, 132, .45);
    --glow-mint: 0 0 22px rgba(33, 205, 171, .40);

    /* Typo : Archivo Black (titres + chiffres, épais & moderne) + Inter (texte). */
    --font-title: "Archivo Black", "Arial Black", sans-serif;
    --font-body: "Inter", "Arial", sans-serif;

    --nav-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    background-image:
        radial-gradient(900px 500px at 85% -10%, rgba(123, 44, 191, .22), transparent 60%),
        radial-gradient(800px 500px at 0% 0%, rgba(215, 10, 132, .15), transparent 55%),
        radial-gradient(700px 600px at 50% 120%, rgba(65, 162, 191, .12), transparent 60%);
    background-attachment: fixed;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-title); line-height: 1.1; color: #fff; margin: 0 0 .5em; font-weight: 700; letter-spacing: .4px; }
h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
img { max-width: 100%; }
code { background: rgba(255,255,255,.08); padding: .1rem .35rem; border-radius: 5px; font-size: .9em; color: #fff; }
::selection { background: var(--magenta); color: #fff; }

.container { width: min(1140px, 92%); margin: 0 auto; }
.stack > * + * { margin-top: 1rem; }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.grad-text { background: var(--grad-text); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Top header / nav (desktop) ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(14, 11, 13, .72);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 1.2rem; min-height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-title); font-weight: 800; color: #fff; font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.brand img { height: 26px; width: auto; display: block; }
.badge-cup { font-size: .58rem; background: var(--grad); color: #fff; padding: .2rem .55rem; border-radius: 999px; font-weight: 800; letter-spacing: .5px; box-shadow: var(--glow-magenta); }
.nav { display: flex; gap: .15rem; margin-left: auto; align-items: center; flex-wrap: wrap; }
/* Liens de nav « simples » : on exclut les vrais boutons (.btn*) pour ne pas ecraser leur fond/padding. */
.nav a:not(.btn), .nav button:not(.btn) {
    display: inline-flex; align-items: center; gap: .35rem;
    color: #c8c0cf; font-weight: 600; padding: .5rem .6rem; border-radius: 10px;
    background: transparent; border: 0; cursor: pointer; font-size: .9rem; font-family: inherit;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.nav a:not(.btn):hover { background: var(--surface-2); color: #fff; text-decoration: none; }
.nav a.active:not(.btn) { color: #fff; background: var(--surface-2); box-shadow: inset 0 -2px 0 0 transparent; position: relative; }
.nav a.active:not(.btn)::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: 2px; height: 2px; background: var(--grad); border-radius: 2px; }
.nav .nav-admin { color: var(--gold); }
.nav .icon { width: 18px; height: 18px; }

/* Bouton joker dans le header */
.nav-joker { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--font-title); font-weight: 800; font-size: .8rem; padding: .3rem .7rem; border-radius: 999px; background: var(--grad); color: #fff; box-shadow: var(--glow-magenta); }
.nav-joker:hover { text-decoration: none; filter: brightness(1.1); }

/* ---------- Bottom tab bar (mobile) ---------- */
.tabbar { display: none; }
@media (max-width: 860px) {
    .nav .desktop-only { display: none; }
    .tabbar {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
        background: rgba(14, 11, 13, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid var(--border);
        padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
        justify-content: space-around;
    }
    .tabbar a {
        flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
        color: var(--muted); font-size: .65rem; font-weight: 700; padding: .35rem 0; min-height: 48px; border-radius: 12px;
    }
    .tabbar a .icon { width: 22px; height: 22px; }
    .tabbar a.active { color: #fff; }
    .tabbar a.active .icon { color: var(--magenta); filter: drop-shadow(0 0 6px rgba(215,10,132,.7)); }
    .tabbar a:hover { text-decoration: none; }
    body { padding-bottom: 76px; }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    background: var(--surface-2); color: #fff; border: 1px solid var(--border-strong); border-radius: 12px;
    padding: .7rem 1.3rem; font-weight: 700; font-size: 1rem; cursor: pointer;
    font-family: var(--font-body); transition: transform .06s, filter .15s, box-shadow .2s, background .15s;
}
.btn .icon { width: 18px; height: 18px; }
.btn:hover { text-decoration: none; filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.btn-accent { background: var(--grad); background-size: 105% 105%; background-position: center; border-color: transparent; box-shadow: var(--glow-magenta); }
.btn-accent:hover { filter: brightness(1.08); }
.btn-gold { background: linear-gradient(100deg, #FFC600, #FF9600); color: #1A1517; border-color: transparent; box-shadow: 0 0 22px rgba(255,198,0,.4); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); filter: none; }
.btn-sm { padding: .42rem .85rem; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-danger { background: transparent; color: #ff6b8f; border: 1.5px solid rgba(255,107,143,.4); }
.btn-danger:hover { background: rgba(255,107,143,.12); filter: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Cards (glass) ---------- */
.card {
    background: var(--surface); border-radius: var(--radius);
    border: 1px solid var(--border);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem; position: relative;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent); border-radius: var(--radius) var(--radius) 0 0; }
.card h2 { font-size: 1.2rem; }
.grid { display: grid; gap: 1.2rem; align-items: stretch; }
.grid > .card { display: flex; flex-direction: column; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Stat (RÈGLE GLOBALE : nombre À CÔTÉ du texte, jamais au-dessus) ---------- */
.stat { display: flex; align-items: center; gap: .85rem; background: var(--surface); border-radius: var(--radius); padding: 1.1rem 1.3rem; border: 1px solid var(--border); position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad-rainbow); }
.stat .num { font-family: var(--font-title); font-size: 2rem; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.stat .label { color: var(--muted); font-size: .9rem; font-weight: 600; line-height: 1.2; }

/* Barre de stats du tableau de bord : une seule boîte, stats en ligne */
.statbar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.8rem; }
.statitem { display: flex; align-items: center; gap: .7rem; }
.statitem .n { font-family: var(--font-title); font-size: 2.1rem; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; flex: 0 0 auto; }
.statitem .lab { display: flex; flex-direction: column; line-height: 1.15; }
.statitem .lab strong { font-family: var(--font-title); font-weight: 700; color: #fff; }
.statitem .lab span { font-size: .78rem; color: var(--muted); }
.statitem + .statitem { border-left: 1px solid var(--border); padding-left: 1.8rem; }
@media (max-width: 760px) { .statitem + .statitem { border-left: 0; padding-left: 0; } .statbar { gap: 1.1rem 1.4rem; } }

/* ---------- Bento grid ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; grid-auto-flow: dense; }
.bento > * { margin: 0; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.3rem; position: relative; overflow: hidden; backdrop-filter: blur(14px); }
.tile.col-2 { grid-column: span 2; }
.tile.col-4 { grid-column: span 4; }
.tile.row-2 { grid-row: span 2; }
.tile-glow::after { content: ""; position: absolute; width: 240px; height: 240px; right: -80px; top: -90px; background: var(--grad-rainbow); opacity: .22; filter: blur(30px); border-radius: 50%; pointer-events: none; }
.tile .eyebrow { font-family: var(--font-title); text-transform: uppercase; letter-spacing: 1px; font-size: .68rem; color: var(--muted); font-weight: 800; }
.tile .big { font-family: var(--font-title); font-weight: 800; font-size: clamp(2.4rem, 6vw, 3.4rem); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.tile .big.grad-text { text-shadow: none; }
@media (max-width: 860px) {
    .bento { grid-template-columns: repeat(2, 1fr); }
    .tile.col-4 { grid-column: span 2; }
    .tile.col-2 { grid-column: span 2; }
    .tile.row-2 { grid-row: span 1; }
}

/* ---------- Progress (level) ---------- */
.progress { height: 12px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--grad); box-shadow: var(--glow-magenta); border-radius: 999px; transition: width .9s cubic-bezier(.22,1,.36,1); }

/* ---------- Forms ---------- */
label { font-weight: 600; font-size: .92rem; display: block; margin-bottom: .35rem; color: #e9e4ee; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
    width: 100%; padding: .68rem .8rem; border: 1.5px solid var(--border); border-radius: 11px;
    font-size: 1rem; font-family: inherit; background: var(--input-bg); color: #fff;
    transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #8b8194; }
select option { color: #111; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(33,205,171,.18); }
.field + .field { margin-top: 1rem; }
.form-error { color: #ff7a9c; font-size: .85rem; margin-top: .3rem; }
/* Liste deroulante stylisee (toutes les listes du site) : fleche custom, theme sombre */
select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    padding-right: 2.5rem; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23b9b2c2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .95rem center; background-size: 14px;
}
select:hover { border-color: var(--border-strong); }
/* Page bonus : aligne le controle (liste / reponse) en bas de chaque carte */
.bonus-control { margin-top: auto; padding-top: .7rem; }

/* ---------- Alerts ---------- */
.alert { border-radius: 12px; padding: .85rem 1.1rem; margin-bottom: 1.2rem; font-weight: 600; border: 1px solid var(--border); backdrop-filter: blur(8px); }
.alert-success { background: rgba(27,217,123,.12); color: #6df0b0; border-color: rgba(27,217,123,.3); }
.alert-error { background: rgba(215,10,132,.12); color: #ff8ac4; border-color: rgba(215,10,132,.3); }

/* ---------- Match rows ---------- */
.match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .8rem; padding: .9rem 0; border-bottom: 1px solid var(--border); }
.match:last-child { border-bottom: 0; }
.match .team { display: flex; align-items: center; gap: .55rem; font-weight: 700; color: #fff; }
.match .team.away { justify-content: flex-end; text-align: right; }
.match .team img { width: 26px; height: 26px; object-fit: contain; }
.match .score-input { display: flex; align-items: center; gap: .4rem; }
.match .score-input input { width: 54px; text-align: center; padding: .5rem; font-weight: 800; font-size: 1.1rem; font-family: var(--font-title); }
.match .vs { color: var(--muted); font-weight: 800; }
.match-meta { font-size: .8rem; color: var(--muted); grid-column: 1 / -1; display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.match.locked { opacity: .82; }
.lock-tag { font-size: .72rem; background: rgba(255,255,255,.08); color: var(--muted); padding: .12rem .5rem; border-radius: 999px; font-weight: 700; }
.result-tag { font-size: .8rem; font-weight: 800; color: var(--mint); }
.pts-tag { font-size: .75rem; font-weight: 800; padding: .12rem .55rem; border-radius: 999px; }
/* Pastille de points : couleur selon le résultat (quel que soit le nombre de points). */
.pts-tag.res-exact { background: rgba(27,217,123,.18); color: #6df0b0; }
.pts-tag.res-good  { background: rgba(27,217,123,.18); color: #6df0b0; }
.pts-tag.res-miss  { background: rgba(229,72,77,.20); color: #ff9094; }
.pts-tag.res-none  { background: rgba(255,255,255,.08); color: var(--muted); }

/* Prono colore selon bon/pas bon (vert = points marqués, rouge = raté). Le vrai score reste neutre.
   Prefixe .score-final pour battre la regle .score-final .sf-row strong (meme specificite sinon). */
.score-final .sf-pred.r-exact strong, .score-final .sf-pred.r-good strong { color: var(--green-pos); }
.score-final .sf-pred.r-miss strong { color: #ff8b8e; }
.sf-pred.r-exact .pick-tag, .sf-pred.r-good .pick-tag { background: rgba(27,217,123,.18); color: #6df0b0; }
.sf-pred.r-miss .pick-tag { background: rgba(229,72,77,.20); color: #ff9094; }

.pick { display: inline-flex; border: 1.5px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.pick label { margin: 0; cursor: pointer; }
.pick label input { position: absolute; opacity: 0; pointer-events: none; }
.pick label span { display: inline-grid; place-items: center; width: 44px; height: 40px; font-family: var(--font-title); font-weight: 800; color: var(--muted); transition: background .15s, color .15s; }
.pick label.on span,
.pick label input:checked + span { background: var(--grad); background-size: 105% 105%; background-position: center; color: #fff; }
.pick-tag { font-family: var(--font-title); font-weight: 800; font-size: 1.1rem; padding: .2rem .7rem; border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; }

.day-heading { margin: 1.6rem 0 .4rem; font-family: var(--font-title); font-size: .82rem; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 800; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.tabs a { padding: .45rem .9rem; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--border); font-weight: 700; font-size: .88rem; color: var(--muted); }
/* background-size 105% centre : rogne le bord du degrade pour masquer l'orange de depart qui reapparait dans le coin. */
.tabs a.active { background: var(--grad); background-size: 105% 105%; background-position: center; color: #fff; border-color: transparent; box-shadow: var(--glow-magenta); }
.tabs a:hover { text-decoration: none; color: #fff; }

/* ---------- Tables / leaderboard ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: .8rem .8rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-family: var(--font-title); font-size: .74rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--surface); }
.rank { font-family: var(--font-title); font-weight: 800; width: 48px; font-variant-numeric: tabular-nums; }
tr.me { background: rgba(123,44,191,.18); }
tr.me:hover { background: rgba(123,44,191,.24); }
.medal { font-size: 1.15rem; }
.rank-1 td { background: rgba(255,198,0,.10); }

/* ---------- Hero (landing) ---------- */
.hero { position: relative; padding: 5rem 0 4rem; overflow: hidden; }
.hero .container { position: relative; z-index: 2; }
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.2rem; color: #d8d2dd; max-width: 620px; }
.hero .actions { margin-top: 1.6rem; display: flex; gap: .8rem; flex-wrap: wrap; }
.hero .cup-emoji { font-size: 3rem; }
.prize-banner { background: var(--grad); color: #fff; border-radius: var(--radius); padding: 1.2rem 1.5rem; font-weight: 700; display: flex; align-items: center; gap: 1rem; box-shadow: var(--glow-magenta); text-shadow: 0 1px 3px rgba(0,0,0,.25); }
.prize-banner .gift { font-size: 2rem; text-shadow: none; display: inline-flex; }
.prize-banner .gift svg { width: 30px; height: 30px; }
.medal { width: 22px; height: 22px; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; position: relative; }
.auth-card { position: relative; z-index: 2; overflow: hidden; background: rgba(26,21,27,.7); border-radius: 20px; padding: 2.2rem; width: min(440px, 100%); box-shadow: var(--shadow); border: 1px solid var(--border); backdrop-filter: blur(20px); }
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.auth-card .brand { justify-content: center; margin-bottom: 1.2rem; }
.auth-card .brand img { height: 52px; filter: drop-shadow(0 0 16px rgba(123,44,191,.4)); }

/* ---------- Badges ---------- */
.badge { text-align: center; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem .8rem; background: var(--surface); display: flex; flex-direction: column; align-items: center; }
.badge.on { border-color: transparent; background: linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box, var(--grad) border-box; border: 2px solid transparent; box-shadow: var(--glow-magenta); }
.badge.off { opacity: .5; filter: grayscale(.7); }
.badge-emoji { font-size: 2.4rem; line-height: 1; }
.badge-label { font-family: var(--font-title); font-weight: 800; margin-top: .4rem; color: #fff; }
.badge-desc { font-size: .8rem; color: var(--muted); margin-top: .2rem; min-height: 2.4em; }

/* ---------- Duel ---------- */
.duel-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; text-align: center; }
.duel-head .pts { font-family: var(--font-title); font-size: 3rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.duel-head .vs { font-family: var(--font-title); font-weight: 800; color: var(--muted); }
.duel-head .win { color: var(--mint); text-shadow: var(--glow-mint); }
.cmp-win { color: var(--mint); font-weight: 800; }
.cmp-loss { color: #ff7a9c; font-weight: 800; }
.cmp-draw { color: var(--muted); font-weight: 800; }

/* ---------- Mode de jeu (réglages) ---------- */
.mode-choice { display: flex; gap: .8rem; align-items: flex-start; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 1rem; cursor: pointer; font-weight: 400; background: var(--surface); }
.mode-choice.on { border-color: transparent; background: linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box, var(--grad) border-box; border: 2px solid transparent; }
.mode-choice input { width: auto; margin-top: .3rem; }
.mode-choice strong { font-family: var(--font-title); font-size: 1.05rem; color: #fff; }
.mode-choice p { margin: .3rem 0 0; font-size: .85rem; }

/* ---------- Jokers ---------- */
.joker-counter { font-family: var(--font-title); font-weight: 800; font-size: .9rem; background: var(--grad); color: #fff; padding: .35rem .8rem; border-radius: 999px; box-shadow: var(--glow-magenta); }
.joker-toggle { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; color: #d9b6ee; cursor: pointer; border: 1.5px solid rgba(123,44,191,.5); padding: .14rem .55rem; border-radius: 999px; margin: 0; }
.joker-toggle.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--glow-magenta); }
.joker-toggle input { width: auto; margin: 0; }
.joker-tag { font-size: .72rem; font-weight: 800; padding: .12rem .5rem; border-radius: 999px; background: var(--grad); color: #fff; }

/* ---------- Misc ---------- */
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.8rem 0 1.2rem; }
.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 2.5rem 0; }
.footer a { color: var(--mint); }
.footer .baseline { font-family: var(--font-title); text-transform: uppercase; letter-spacing: 1px; font-size: .72rem; }
.pill { display: inline-block; font-size: .75rem; font-weight: 800; padding: .2rem .6rem; border-radius: 999px; }
.pill-ok { background: rgba(27,217,123,.18); color: #6df0b0; }
.pill-wait { background: rgba(255,198,0,.16); color: var(--gold); }
.inline-form { display: inline; }
.flex { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt { margin-top: 1.2rem; }
.icon { width: 20px; height: 20px; display: inline-block; vertical-align: middle; stroke: currentColor; flex: 0 0 auto; }

/* ---------- Animations ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal { opacity: 0; transform: translateY(14px); animation: reveal-up .55s cubic-bezier(.22,1,.36,1) forwards; }
    .bento > *, .stat-row > *, .grid-4 > *, .grid-3 > *, .grid-2 > * { opacity: 0; transform: translateY(14px); animation: reveal-up .55s cubic-bezier(.22,1,.36,1) forwards; }
    .bento > *:nth-child(1), .stat-row > *:nth-child(1), .grid-4 > *:nth-child(1), .grid-3 > *:nth-child(1), .grid-2 > *:nth-child(1) { animation-delay: .04s; }
    .bento > *:nth-child(2), .stat-row > *:nth-child(2), .grid-4 > *:nth-child(2), .grid-3 > *:nth-child(2), .grid-2 > *:nth-child(2) { animation-delay: .10s; }
    .bento > *:nth-child(3), .stat-row > *:nth-child(3), .grid-4 > *:nth-child(3), .grid-3 > *:nth-child(3) { animation-delay: .16s; }
    .bento > *:nth-child(4), .stat-row > *:nth-child(4), .grid-4 > *:nth-child(4) { animation-delay: .22s; }
    .bento > *:nth-child(5), .stat-row > *:nth-child(5) { animation-delay: .28s; }
    .bento > *:nth-child(6) { animation-delay: .34s; }
    .bento > *:nth-child(7) { animation-delay: .40s; }
}
@keyframes reveal-up { to { opacity: 1; transform: none; } }
@keyframes pulse-glow { 0%,100% { box-shadow: 0 0 16px rgba(215,10,132,.4); } 50% { box-shadow: 0 0 30px rgba(215,10,132,.75); } }

/* Touches gaming : dégradés vivants (lents), survols, halos pulsés */
@media (prefers-reduced-motion: no-preference) {
    .nav-joker { animation: pulse-glow 2.6s ease-in-out infinite; }
    .tile, .card { transition: transform .18s ease, box-shadow .25s ease, border-color .25s ease; }
    .tile:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: 0 22px 50px rgba(0,0,0,.5), 0 0 26px rgba(215,10,132,.25); }
    .btn:hover { transform: translateY(-1px); }
    .badge.on { animation: pulse-glow 3s ease-in-out infinite; }
}

/* Drapeaux / logos d'équipes */
.match .team img, .flag { height: 22px; width: auto; max-width: 34px; object-fit: contain; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,.14); background: rgba(255,255,255,.06); }

/* Variation douce et lente du fond (le « dégradé qui bouge légèrement ») */
body::before {
    content: ""; position: fixed; inset: -45%; z-index: -1; pointer-events: none; transform-origin: center;
    background:
        radial-gradient(520px 380px at 18% 88%, rgba(215,10,132,.15), transparent 60%),
        radial-gradient(560px 420px at 86% 78%, rgba(65,162,191,.12), transparent 62%);
}
@media (prefers-reduced-motion: no-preference) {
    /* Seul le fond bouge : rotation très lente de taches floues autour du centre.
       Pas de position de dégradé qui boucle, donc aucun effet « barre de chargement ». */
    body::before { animation: bg-drift 48s ease-in-out infinite alternate; }
}
@keyframes bg-drift { from { transform: rotate(-7deg) scale(1.08); } to { transform: rotate(7deg) scale(1.08); } }

/* ---------- Festif / foot (landing) ---------- */
/* Terrain en fond fixe de toute la page (derrière le contenu) */
.pitch { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .08; color: #fff; }
.pitch svg { width: 100%; height: 100%; display: block; }

/* Rangée de stats (tuiles de hauteur identique) */
.stat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; align-items: stretch; }
@media (max-width: 980px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .stat-row { grid-template-columns: 1fr; } }

/* Bandeau prochain match (horizontal) */
.next-match { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.next-match .nm-teams { display: flex; align-items: center; gap: 1rem; flex: 1; justify-content: center; font-family: var(--font-title); font-weight: 800; font-size: 1.05rem; min-width: 240px; }
.next-match .nm-teams .flex { color: #fff; }
.confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; opacity: .85; }
@media (prefers-reduced-motion: no-preference) {
    .confetti i { animation: confetti-fall linear infinite; }
}
@keyframes confetti-fall { 0% { transform: translateY(-20px) rotate(0); } 100% { transform: translateY(115vh) rotate(540deg); } }

.countdown { display: flex; gap: .8rem; flex-wrap: wrap; }
.countdown .cd { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .7rem 1rem; text-align: center; min-width: 74px; backdrop-filter: blur(10px); }
.countdown .cd b { display: block; font-family: var(--font-title); font-size: 2rem; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.countdown .cd span { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; }
.flags-strip { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.flags-strip img { height: 26px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
/* Parcours « Comment ça marche » (3 étapes, hauteurs garanties égales) */
.how-title { text-align: center; margin-bottom: 1.4rem; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; align-items: stretch; }
.how-step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .7rem; padding: 2rem 1.3rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); backdrop-filter: blur(10px); }
.how-ico { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); box-shadow: var(--glow-magenta); }
.how-ico svg { width: 30px; height: 30px; stroke: #fff; }
.how-step h3 { margin: 0; font-size: 1.2rem; }
.how-step p { margin: 0; color: var(--muted); font-size: .92rem; }
@media (max-width: 760px) { .how { grid-template-columns: 1fr; } }

/* Grille du règlement : 4 blocs de hauteur identique (toutes rangées égales) */
.rules-grid { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 1fr; gap: 1.2rem; align-items: stretch; }
.rules-grid > .card { display: flex; flex-direction: column; }
@media (max-width: 760px) { .rules-grid { grid-template-columns: 1fr; grid-auto-rows: auto; } }

/* En-tête de bloc (règlement) : icône en rond + titre */
.rule-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; }
.rule-ico { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--grad); box-shadow: var(--glow-magenta); }
.rule-ico svg { width: 22px; height: 22px; stroke: #fff; }
.rule-head h2 { margin: 0; font-size: 1.2rem; }
.card ul { margin: .2rem 0 0; padding-left: 1.15rem; }
.card li { color: var(--text); }
.card li + li { margin-top: .35rem; }

/* Mini-ligues */
.league-card { display: block; text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
.league-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.league-card h2 { font-size: 1.1rem; }
.league-code {
    font-family: 'Archivo Black', sans-serif;
    letter-spacing: .12em;
    color: var(--gold);
    background: rgba(255, 198, 0, .08);
    border: 1px solid rgba(255, 198, 0, .25);
    border-radius: 8px;
    padding: .15rem .5rem;
    display: inline-block;
}

/* Fil d'actu */
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item { display: flex; gap: .8rem; align-items: flex-start; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-ico {
    flex: 0 0 auto;
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    color: var(--text);
}
.feed-ico svg { width: 19px; height: 19px; }
.feed-body { flex: 1; min-width: 0; }
.feed-text { line-height: 1.35; }
.feed-time { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
/* Teinte statique selon le type de haut fait (pas d'animation) */
.feed-leader   { color: var(--gold); border-color: var(--gold); }
.feed-badge    { color: var(--magenta); border-color: var(--magenta); }
.feed-level_up { color: var(--violet); border-color: var(--violet); }
.feed-exact    { color: var(--mint); border-color: var(--mint); }
.feed-duel_won { color: var(--orange); border-color: var(--orange); }

/* Recompenses */
.rewards { list-style: none; margin: 0; padding: 0; }
.reward-item { display: flex; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.reward-item:last-child { border-bottom: 0; }
.reward-ico {
    flex: 0 0 auto;
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
}
.reward-ico svg { width: 20px; height: 20px; }
.reward-rank  { color: var(--gold); border-color: var(--gold); }
.reward-phase { color: var(--mint); border-color: var(--mint); }
.reward-draw  { color: var(--violet); border-color: var(--violet); }
.reward-body { flex: 1; min-width: 0; }
.reward-ctx { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.reward-prize { font-weight: 600; line-height: 1.3; }
.reward-holder { text-align: right; flex: 0 0 auto; max-width: 45%; }

/* Power-ups : sélecteur par match (Aucun / X2 / Assurance) */
.powerup-pick { display: inline-flex; gap: .25rem; flex-wrap: wrap; }
.powerup-pick label {
    display: inline-flex; align-items: center; gap: .25rem;
    font-size: .78rem; padding: .2rem .5rem; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--border-strong); color: var(--muted); background: var(--surface-2);
}
.powerup-pick label svg { width: 14px; height: 14px; }
.powerup-pick label input { display: none; }
.powerup-pick label.on { color: #fff; border-color: transparent; }
.powerup-pick label.on:nth-child(2) { background: var(--violet); } /* X2 */
.powerup-pick label.on:nth-child(3) { background: var(--teal); }   /* Assurance */
.powerup-pick label.on:first-child { background: var(--border-strong); color: var(--text); }

/* Match du jour */
.featured-tag {
    display: inline-flex; align-items: center; gap: .25rem;
    font-size: .76rem; font-weight: 600; color: #1a1517;
    background: var(--gold); border-radius: 999px; padding: .12rem .5rem;
}
.featured-tag svg { width: 13px; height: 13px; }
.feature-check {
    display: inline-flex; align-items: center; gap: .3rem; cursor: pointer;
    font-size: .8rem; color: var(--muted); white-space: nowrap;
}
.feature-check.on { color: var(--gold); font-weight: 600; }
.feature-check svg { width: 15px; height: 15px; }

/* Fil : teinte du type defi de ligue */
.feed-league_challenge { color: var(--teal); border-color: var(--teal); }

/* Score affiché quand le match est verrouillé : prono + résultat réel, même taille, empilés */
.score-final { display: flex; flex-direction: column; gap: .25rem; align-items: center; }
.score-final .sf-row { display: flex; align-items: center; gap: .4rem; }
.score-final .sf-row strong { font-size: 1.1rem; font-family: var(--font-title); color: #fff; }
.score-final .sf-lab { font-size: .62rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); width: 46px; text-align: right; }
.score-final .sf-real strong { color: #fff; }

/* Barre sticky d'enregistrement des pronos : opaque pour rester lisible au-dessus des matchs */
.save-bar {
    position: sticky; bottom: 1rem; z-index: 5;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: rgba(18, 14, 16, .97);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-strong); border-radius: 14px;
    padding: .75rem 1rem; box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.save-status { font-weight: 700; font-size: .9rem; color: var(--muted); display: inline-flex; align-items: center; gap: .35rem; }
.save-status .icon { width: 15px; height: 15px; }
.save-status.saving { color: var(--gold); }
.save-status.saved  { color: var(--green-pos); }
.save-status.error  { color: #ff9094; }
