/* ====================================================================
   BK Paryaj — CALQUE PREMIUM de la vue client (sportsbook)
   Chargé UNIQUEMENT par index.php, APRÈS style.css : il ne modifie ni
   le staff ni l'admin. S'appuie sur les variables de thème existantes
   (--navy, --gold, --red…) pour rester compatible avec les thèmes.
   ==================================================================== */

:root {
    /* Surfaces dérivées de la palette de thème (donc thèmes respectés) */
    --sb-bg-1:      #0a1526;
    --sb-bg-2:      #0e1b33;
    --sb-surface:   #142543;
    --sb-surface-2: #1a2e52;
    --sb-line:      #263c6b;
    --sb-line-soft: #1d2f57;
    --sb-radius:    14px;
    --sb-radius-sm: 10px;
    --sb-shadow:    0 8px 24px rgba(0,0,0,.35);
    --sb-shadow-lg: 0 18px 50px rgba(0,0,0,.5);
    --sb-green:     #21c17a;
    --sb-green-dk:  #0f7a4d;
    /* Voile posé sur l'image du bandeau d'accueil : garantit la lisibilité
       du texte quelle que soit l'image déposée. Surchargé par le thème
       clair (voir Settings::THEME_CSS). */
    --hero-veil-1:  rgba(10,21,38,.94);
    --hero-veil-2:  rgba(10,21,38,.55);
}

/* ------------------------------------------------------------------
   Fond général : dégradé profond + halo discret
   ------------------------------------------------------------------ */
body {
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(212,175,55,.10), transparent 60%),
        radial-gradient(900px 500px at -10% 10%, rgba(214,40,40,.10), transparent 55%),
        linear-gradient(180deg, var(--sb-bg-1), var(--sb-bg-2));
    background-attachment: fixed;
}

/* ------------------------------------------------------------------
   En-tête
   ------------------------------------------------------------------ */
.topbar {
    position: sticky; top: 0; z-index: 40;
    padding: 12px 22px;
    background: rgba(10,21,38,.82);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(212,175,55,.35);
    box-shadow: 0 6px 22px rgba(0,0,0,.28);
}
.brand { font-size: 1.5rem; font-weight: 900; letter-spacing: .5px; }
.topbar nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.topbar nav a {
    margin-left: 0; padding: 8px 12px; border-radius: 999px;
    font-weight: 600; color: var(--text); opacity: .85;
    transition: background .15s, opacity .15s;
}
.topbar nav a:hover { background: rgba(255,255,255,.07); opacity: 1; }
/* Pastille solde / compte : mise en avant dorée */
.topbar nav a[href^="account"]:first-of-type,
.topbar nav a[style*="gold"] {
    background: linear-gradient(135deg, rgba(212,175,55,.18), rgba(212,175,55,.08));
    border: 1px solid rgba(212,175,55,.45);
    color: var(--gold-light) !important; opacity: 1;
}

/* ==================================================================
   VITRINE : bandeau d'accueil, encarts, recherche, filtres
   Palette maison uniquement (navy / or / rouge) — aucune image
   externe : le fond est un dégradé tant qu'aucun visuel n'est déposé.
   ================================================================== */
.hero {
    position: relative; overflow: hidden;
    margin: 16px 0 14px; padding: 30px 26px;
    min-height: 230px;
    border-radius: var(--sb-radius);
    border: 1px solid var(--sb-line-soft);
    background:
        radial-gradient(700px 300px at 88% 20%, rgba(212,175,55,.20), transparent 62%),
        radial-gradient(560px 260px at 8% 90%, rgba(214,40,40,.22), transparent 60%),
        linear-gradient(120deg, var(--sb-surface-2), var(--sb-bg-1));
    background-size: cover; background-position: center;
    box-shadow: var(--sb-shadow);
    display: flex; flex-wrap: wrap; gap: 22px;
    align-items: center; justify-content: space-between;
}
/* Visuel déposé par l'admin : recadré en bandeau, jamais déformé, et
   surmonté d'un voile sombre pour que le texte reste lisible quelle que
   soit l'image (photo claire, logo, affiche…). */
.hero.has-img {
    background-size: cover; background-position: center;
    background-repeat: no-repeat;
}
/* Liseré doré en bas du bandeau */
.hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--red), transparent);
}
.hero-in { max-width: 620px; min-width: 260px; }
.hero-kicker {
    margin: 0 0 6px; color: var(--gold-light); font-size: .74rem;
    font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
}
.hero-title {
    margin: 0 0 10px; font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.1;
    font-weight: 900; letter-spacing: -.5px;
}
.hero-title span { color: var(--gold); display: block; }
.hero-sub { margin: 0 0 18px; color: #c3cee4; font-size: .95rem; line-height: 1.5; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-btn {
    display: inline-block; padding: 12px 24px; border-radius: 999px;
    background: linear-gradient(135deg, #e23b3b, var(--red-dark));
    color: #fff !important; font-weight: 800; text-decoration: none;
    box-shadow: 0 8px 20px rgba(214,40,40,.34);
    transition: transform .12s, filter .12s;
}
.hero-btn:hover { transform: translateY(-1px); filter: brightness(1.07); }
.hero-btn.ghost {
    background: transparent; border: 1px solid rgba(212,175,55,.6);
    color: var(--gold-light) !important; box-shadow: none;
}
.hero-btn.ghost:hover { background: rgba(212,175,55,.12); }
.hero-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats div {
    min-width: 104px; padding: 14px 16px; border-radius: var(--sb-radius-sm);
    background: rgba(10,21,38,.55); border: 1px solid var(--sb-line);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); text-align: center;
}
.hero-stats b { display: block; font-size: 1.55rem; color: var(--gold); font-weight: 900; }
.hero-stats span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

/* ==================================================================
   BANDEAU ANIMÉ (design « BK Paryaj Banner », Claude Design)
   Composition 1600×800 rendue FLUIDE : couches animées en fond, texte
   libre à gauche, médaillon logo + cartes sports à droite. S'efface
   automatiquement si un visuel est déposé dans Admin > Bannières.
   ================================================================== */
.hero.hero-fx {
    background: linear-gradient(120deg, #08090d 0%, #101219 55%, #191320 100%);
    border-color: rgba(232,114,44,.28);
    padding: clamp(22px, 3.4vw, 48px);
    min-height: clamp(300px, 30vw, 420px);
    isolation: isolate;              /* les couches restent sous le contenu */
}
.hero.hero-fx > .hero-in,
.hero.hero-fx > .hero-art { position: relative; z-index: 2; }

/* ---- Couches de fond (toutes en z-index 0/1, jamais au-dessus) ---- */
.hero-fx .fx { position: absolute; pointer-events: none; z-index: 0; }
.fx-glow-a {
    right: 2%; top: -22%; width: 58%; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle, rgba(232,114,44,.40) 0%, rgba(232,114,44,0) 66%);
    animation: bkDrift 14s ease-in-out infinite;
}
.fx-glow-b {
    left: -14%; bottom: -34%; width: 54%; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle, rgba(63,84,104,.60) 0%, rgba(63,84,104,0) 68%);
    animation: bkDrift2 18s ease-in-out infinite;
}
/* Trame technique */
.fx-grid {
    inset: 0;
    background:
        repeating-linear-gradient(0deg, rgba(255,255,255,.022) 0 1px, transparent 1px 42px),
        repeating-linear-gradient(90deg, rgba(255,255,255,.022) 0 1px, transparent 1px 42px);
}
/* Balayage vertical façon scanner */
.fx-scan {
    left: 0; right: 0; top: 0; height: 180px;
    background: linear-gradient(180deg, rgba(232,114,44,.10), rgba(232,114,44,0));
    animation: bkScan 7s linear infinite;
}
/* Reflet qui traverse */
.fx-sweep {
    top: 0; bottom: 0; left: 0; width: 220px;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.085), rgba(255,255,255,0));
    animation: bkSweep 6.5s ease-in-out infinite;
}
/* Voile gauche : garantit la lisibilité du titre par-dessus les effets */
.fx-veil {
    left: 0; top: 0; bottom: 0; width: 62%; z-index: 1;
    background: linear-gradient(90deg, rgba(8,9,13,.93) 0%, rgba(8,9,13,.76) 52%, rgba(8,9,13,0) 100%);
}
/* Filet dégradé en pied de bandeau */
.hero.hero-fx::after {
    background: linear-gradient(90deg, #E8722C, #ffb46a 30%, #C6F24E 62%, #3F5468 100%);
    height: 6px; z-index: 3;
}

/* ---- Colonne de droite : médaillon + cartes ---- */
.hero-art {
    display: flex; align-items: center; gap: clamp(14px, 2vw, 30px);
    margin-left: auto;
}
/* Les cartes de cotes flottantes ont été RETIRÉES (demande client) :
   sur téléphone elles alourdissaient le bandeau sans rien apporter, les
   compteurs par sport étant déjà juste en dessous. Seul le médaillon
   reste à droite. */

/* Médaillon logo — HALO DOUX, pas un disque blanc.
   Le dégradé radial s'estompe vers le transparent : le logo se fond
   dans le bandeau sans bord net, ce qui masque aussi les défauts de
   fond d'une image mal détourée. */
.art-logo {
    position: relative; flex-shrink: 0;
    /* Volontairement modeste : le médaillon accompagne le titre, il ne
       lui dispute pas la vedette. Trop grand, il écrasait le bandeau
       sur téléphone. */
    /* Hauteur explicite EN PLUS de aspect-ratio : sur iOS 14 (Safari 14)
       aspect-ratio n'existe pas et le médaillon s'écrasait à 0. */
    width: clamp(92px, 11vw, 180px); height: clamp(92px, 11vw, 180px);
    aspect-ratio: 1;
    display: grid; place-items: center;
    animation: bkFloat 9s ease-in-out infinite;
}
.art-logo::before {
    content: ""; position: absolute; inset: -7%; border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255,255,255,.92) 0%, rgba(255,255,255,.86) 52%,
        rgba(255,255,255,.20) 68%, rgba(255,255,255,0) 76%);
    box-shadow: 0 40px 120px rgba(232,114,44,.26);
}
.art-logo img { position: relative; width: 100%; height: auto; display: block; }
.art-logo .txt {
    position: relative;
    font-size: clamp(1.1rem, 1.9vw, 1.9rem); font-weight: 900; color: #0a0b10;
}

@keyframes bkSweep {
    0%   { transform: translateX(-60%) skewX(-18deg); opacity: 0; }
    18%  { opacity: .5; }
    55%  { opacity: 0; }
    100% { transform: translateX(340%) skewX(-18deg); opacity: 0; }
}
@keyframes bkDrift {
    0%,100% { transform: translate3d(0,0,0) scale(1); }
    50%     { transform: translate3d(-40px,26px,0) scale(1.12); }
}
@keyframes bkDrift2 {
    0%,100% { transform: translate3d(0,0,0) scale(1.05); }
    50%     { transform: translate3d(38px,-22px,0) scale(.94); }
}
@keyframes bkFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-13px); } }
@keyframes bkScan  { 0% { transform: translateY(-180px); } 100% { transform: translateY(820px); } }
@keyframes bkPulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* Écrans étroits : on garde le médaillon, on retire les cartes (le
   bandeau doit rester un bandeau, pas une colonne interminable). */
/* ---- Téléphone : bandeau compact, animation VISIBLE ----
   L'ancien voile couvrait toute la largeur à 94 % d'opacité et
   étouffait les halos animés : on ne voyait plus rien bouger. Il est
   désormais dégressif et s'arrête avant le bord droit, là où le
   médaillon et les effets respirent. */
@media (max-width: 900px) {
    .hero.hero-fx { min-height: 0; padding: 20px 18px; }
    .fx-veil {
        width: 78%;
        background: linear-gradient(90deg, rgba(8,9,13,.88) 0%, rgba(8,9,13,.62) 60%, rgba(8,9,13,0) 100%);
    }
    .hero-art { align-self: flex-start; }
}
@media (max-width: 560px) {
    /* Le médaillon reste visible — la place gagnée par le retrait des
       cartes lui suffit — mais réduit et posé en haut à droite. */
    .art-logo {
        position: absolute; top: 12px; right: 12px; z-index: 2;
        width: 74px; height: 74px;
    }
    /* Bandeau COMPACT : sur un écran de téléphone il doit tenir dans le
       premier coup d'œil, pas occuper deux hauteurs d'écran avant les
       matchs. Titre resserré, sous-titre écourté, stats en ligne. */
    .hero.hero-fx { padding: 16px 14px; }
    /* Seuls les éléments du HAUT dégagent le médaillon ; en dessous, la
       largeur est rendue au texte, sinon les deux boutons se cassaient
       sur deux lignes. */
    .hero-kicker, .hero-title { padding-right: 84px; }
    .hero-kicker { font-size: .64rem; letter-spacing: 1.4px; margin-bottom: 3px; }
    .hero-title { font-size: 1.5rem; margin-bottom: 6px; }
    .hero-sub {
        font-size: .84rem; line-height: 1.4; margin-bottom: 12px;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
        overflow: hidden;                       /* 2 lignes maximum */
    }
    .hero-cta { gap: 8px; }
    .hero-btn { padding: 10px 16px; font-size: .88rem; }
    /* Les 3 compteurs sur une seule ligne au lieu de gros pavés */
    .hero-stats { gap: 8px; width: 100%; }
    .hero-stats div { flex: 1 1 0; min-width: 0; padding: 8px 6px; }
    .hero-stats b { font-size: 1.15rem; }
    .hero-stats span { font-size: .58rem; letter-spacing: .3px; }
}

/* Réglage système « animations réduites » : tout se fige */
@media (prefers-reduced-motion: reduce) {
    .fx-glow-a, .fx-glow-b, .fx-scan, .fx-sweep, .art-logo {
        animation: none !important;
    }
}

/* Repère d'emplacement — visible par le staff UNIQUEMENT */
.slot-hint {
    margin: 14px 0 0; padding: 8px 12px; font-size: .78rem;
    color: var(--gold-light); border: 1px dashed rgba(212,175,55,.5);
    border-radius: 8px; background: rgba(212,175,55,.06); display: inline-block;
}
.slot-hint a { color: var(--gold); }

/* ---------- Encarts publicitaires : DIAPORAMA ----------
   Une seule bannière visible à la fois, au même endroit, qui défile
   automatiquement. Les visuels se superposent (position absolue) et
   c'est l'opacité qui change — pas de saut de mise en page. */
.promo-slider {
    position: relative; margin: 0 0 16px;
    border-radius: var(--sb-radius-sm); overflow: hidden;
    border: 1px solid var(--sb-line-soft); background: var(--sb-surface);
    box-shadow: var(--sb-shadow);
}
.promo-track { position: relative; }
.promo-slide {
    position: absolute; inset: 0; display: block;
    opacity: 0; visibility: hidden; transition: opacity .5s ease;
}
.promo-slide.on { opacity: 1; visibility: visible; position: relative; }
/* Format IMPOSÉ : l'admin dépose ce qu'il veut (affiche verticale, photo
   carrée…) et l'encart reste une bannière régulière. Sans cela, une
   affiche portrait s'étire et repousse les matchs hors de l'écran. */
.promo-slide img {
    width: 100%; display: block;
    /* Hauteur fixée en plus du ratio : sans aspect-ratio (iOS 14), une
       affiche verticale reprendrait sa hauteur naturelle et casserait
       la mise en page. object-fit assure le recadrage partout. */
    height: clamp(104px, 30vw, 250px);
    aspect-ratio: 8 / 3;
    object-fit: cover; object-position: center;
}
/* Flèches — discrètes, apparaissent au survol sur grand écran */
.promo-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
    border: none; background: rgba(0,0,0,.45); color: #fff;
    font-size: 1.3rem; line-height: 1; display: grid; place-items: center;
    opacity: 0; transition: opacity .18s, background .18s; z-index: 2;
}
.promo-slider:hover .promo-nav { opacity: 1; }
.promo-nav:hover { background: rgba(0,0,0,.7); }
.promo-nav.prev { left: 8px; }
.promo-nav.next { right: 8px; }
@media (hover: none) { .promo-nav { opacity: .85; } }   /* tactile : toujours visibles */
/* Pastilles de position */
.promo-dots {
    position: absolute; left: 0; right: 0; bottom: 8px; z-index: 2;
    display: flex; justify-content: center; gap: 7px;
}
.promo-dots button {
    width: 9px; height: 9px; padding: 0; border-radius: 50%; cursor: pointer;
    border: 1px solid rgba(255,255,255,.85); background: rgba(0,0,0,.35);
    transition: background .18s, transform .18s;
}
.promo-dots button.on { background: #fff; transform: scale(1.25); }

/* Emplacement libre (staff uniquement) */
.promo-row { display: flex; gap: 12px; margin: 0 0 16px; }
.promo {
    display: block; border-radius: var(--sb-radius-sm); overflow: hidden;
    border: 1px solid var(--sb-line-soft); background: var(--sb-surface);
    flex: 1 1 auto;
}
.promo.empty {
    padding: 22px; text-align: center; font-size: .82rem; color: var(--muted);
    border-style: dashed; border-color: rgba(212,175,55,.4);
}
.promo.empty a { color: var(--gold-light); }

/* ---------- Recherche ---------- */
.find-bar { display: flex; gap: 8px; margin: 0 0 12px; flex-wrap: wrap; }
.find-bar input[type=search] {
    flex: 1; min-width: 220px; padding: 12px 16px; font-size: .95rem;
    background: var(--sb-surface); color: var(--text);
    border: 1px solid var(--sb-line); border-radius: 999px;
}
.find-bar input[type=search]:focus { outline: none; border-color: var(--gold); }
.find-bar button {
    padding: 12px 22px; border: none; border-radius: 999px; cursor: pointer;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #241c00; font-weight: 800;
}
.find-clear {
    display: inline-grid; place-items: center; width: 42px; border-radius: 999px;
    background: var(--sb-surface); border: 1px solid var(--sb-line);
    color: var(--muted); text-decoration: none;
}

/* ---------- Onglets de période ---------- */
.when-tabs { display: flex; gap: 8px; margin: 0 0 10px; flex-wrap: wrap; }
.when-tabs a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 16px; border-radius: 999px; text-decoration: none;
    background: var(--sb-surface); border: 1px solid var(--sb-line-soft);
    color: var(--text); font-size: .86rem; font-weight: 600;
}
.when-tabs a:hover { border-color: var(--gold); }
.when-tabs a.active {
    background: rgba(212,175,55,.14); border-color: var(--gold); color: var(--gold-light);
}
.when-tabs .n, .sport-tabs .n {
    background: rgba(255,255,255,.1); border-radius: 999px;
    padding: 1px 8px; font-size: .72rem; font-weight: 800;
}
.sport-tabs button.active .n { background: rgba(0,0,0,.22); color: #fff; }

/* ---------- Badge « + N marchés » ---------- */
.more-badge {
    display: inline-block; padding: 1px 8px; border-radius: 999px;
    background: var(--gold); color: #241c00; font-weight: 900; font-size: .74rem;
}

/* ------------------------------------------------------------------
   Panier reçu d'un ami (?slip=CODE)
   ------------------------------------------------------------------ */
.shared-box {
    margin: 16px 0; padding: 18px 20px;
    background: var(--sb-surface); border: 1px solid var(--gold);
    border-radius: var(--sb-radius); box-shadow: var(--sb-shadow-lg);
}
.shared-box h3 { margin: 0 0 6px; color: var(--gold); font-size: 1.1rem; }
.shared-intro { margin: 0 0 12px; color: var(--muted); font-size: .88rem; }
.shared-warn {
    margin: 0 0 10px; padding: 9px 13px; border-radius: var(--sb-radius-sm); font-size: .85rem;
}
.shared-warn.changed { background: rgba(212,175,55,.12); border: 1px solid rgba(212,175,55,.45); }
.shared-warn.invalid { background: rgba(214,40,40,.12); border: 1px solid rgba(214,40,40,.45); }

.shared-list { list-style: none; margin: 0 0 14px; padding: 0; }
.shared-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid var(--sb-line-soft);
}
.shared-item:last-child { border-bottom: none; }
.si-main { flex: 1; min-width: 0; }
.si-match { display: block; font-weight: 700; font-size: .92rem; }
.si-pick  { display: block; color: var(--gold-light); font-size: .84rem; font-weight: 600; }
.si-reason { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.si-odd { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.si-odd b { font-size: 1.05rem; }
.si-odd s { color: var(--muted); font-size: .8rem; margin-right: 5px; }
.si-x { color: #ff8a8a; font-size: .78rem; font-weight: 700; }
.si-del {
    background: rgba(214,40,40,.14); border: 1px solid rgba(214,40,40,.35);
    color: #ff8a8a; cursor: pointer; width: 26px; height: 26px;
    border-radius: 7px; flex-shrink: 0; line-height: 1;
}
.si-del:hover { background: rgba(214,40,40,.3); }

/* Sélection devenue impariable : grisée, et elle bloque la validation */
.shared-item.invalid { opacity: .45; }
.shared-item.invalid .si-pick { color: var(--muted); }
.shared-item.changed .si-pick { color: var(--gold); }

.shared-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.shared-accept {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    font-size: .88rem; font-weight: 600;
}
.shared-accept input { width: 17px; height: 17px; accent-color: var(--gold); }
.shared-skip { color: var(--muted); font-size: .85rem; }
#btnLoadShared:disabled { opacity: .45; cursor: not-allowed; }

/* Lien de partage généré */
.share-out { padding: 10px 16px 0; }
.share-out input {
    width: 100%; padding: 9px 11px; font-size: .82rem;
    background: var(--sb-bg-1); color: var(--text);
    border: 1px solid var(--sb-line); border-radius: 8px;
}
.share-out button {
    margin-top: 6px; padding: 7px 14px; cursor: pointer; font-size: .8rem; font-weight: 700;
    background: var(--gold); color: #241c00; border: none; border-radius: 999px;
}
.share-out p { margin: 6px 0 0; color: var(--muted); font-size: .76rem; }

/* ------------------------------------------------------------------
   Bandeau « poste de boutique » (agent connecté sur la vue client)
   ------------------------------------------------------------------ */
.staff-bar {
    display: flex; flex-wrap: wrap; gap: 10px 16px;
    align-items: center; justify-content: space-between;
    margin: 14px 0 4px; padding: 10px 14px;
    background: linear-gradient(135deg, rgba(212,175,55,.16), rgba(212,175,55,.05));
    border: 1px solid rgba(212,175,55,.4); border-left: 4px solid var(--gold);
    border-radius: var(--sb-radius-sm);
    font-size: .86rem; color: var(--text);
}
.staff-bar a {
    margin-left: 12px; font-weight: 700; text-decoration: none;
    color: var(--gold-light); white-space: nowrap;
}
.staff-bar a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------
   Onglets sport (segmented, icône + label, défilement mobile)
   ------------------------------------------------------------------ */
.sport-tabs {
    gap: 8px; margin: 18px 0 14px; padding-bottom: 4px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.sport-tabs::-webkit-scrollbar { display: none; }
.sport-tabs button {
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
    background: var(--sb-surface); color: var(--text);
    border: 1px solid var(--sb-line-soft); border-radius: 999px;
    padding: 9px 17px; font-weight: 600; font-size: .9rem;
    transition: transform .12s, border-color .15s, background .15s;
}
.sport-tabs button .ico { font-size: 1.05rem; line-height: 1; }
.sport-tabs button:hover { border-color: var(--gold); transform: translateY(-1px); }
.sport-tabs button.active {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #241c00; border-color: var(--gold); font-weight: 800;
    box-shadow: 0 6px 16px rgba(212,175,55,.28);
}

/* Barre outils déplier/replier */
.tools-row { display: flex; gap: 8px; margin: 0 0 14px; }
.tools-row .btn-sm {
    background: var(--sb-surface); color: var(--muted);
    border: 1px solid var(--sb-line-soft); border-radius: 999px; padding: 7px 14px;
    transition: color .15s, border-color .15s;
}
.tools-row .btn-sm:hover { color: var(--gold-light); border-color: var(--gold); }

/* ------------------------------------------------------------------
   Titre de section (famille de sport)
   ------------------------------------------------------------------ */
h2.section {
    display: flex; align-items: center; gap: 10px;
    color: var(--text); border: none; margin: 26px 0 12px;
    font-size: 1.15rem; letter-spacing: .3px; text-transform: none;
}
h2.section .ico {
    display: inline-grid; place-items: center; width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--sb-surface-2), var(--sb-surface));
    border: 1px solid var(--sb-line); border-radius: 10px; font-size: 1.1rem;
}
h2.section::after {
    content: ""; flex: 1; height: 1px;
    background: linear-gradient(90deg, var(--sb-line), transparent);
}

/* ------------------------------------------------------------------
   Apparition des titres au défilement.
   La classe .reveal est posée PAR JAVASCRIPT : sans JS, rien n'est
   masqué et la page reste entièrement lisible.
   ------------------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.seen {
    opacity: 1; transform: none;
    transition: opacity .6s ease, transform .6s cubic-bezier(.2,.85,.25,1);
}
/* Le trait sous le titre se dessine de gauche à droite */
h2.section.reveal::after { transform: scaleX(0); transform-origin: left; }
h2.section.reveal.seen::after {
    transform: scaleX(1); transition: transform .7s cubic-bezier(.2,.85,.25,1) .15s;
}
/* La pastille du sport arrive en tournant légèrement */
h2.section.reveal .ico { transform: scale(.6) rotate(-12deg); }
h2.section.reveal.seen .ico {
    transform: none; transition: transform .55s cubic-bezier(.2,1.5,.4,1) .1s;
}
/* Réglage système « animations réduites » : tout reste immobile */
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal.seen,
    h2.section.reveal::after, h2.section.reveal.seen::after,
    h2.section.reveal .ico, h2.section.reveal.seen .ico {
        opacity: 1; transform: none; transition: none;
    }
}

/* ------------------------------------------------------------------
   Accordéon par championnat
   ------------------------------------------------------------------ */
.comp-block {
    margin: 12px 0; border: 1px solid var(--sb-line-soft);
    border-radius: var(--sb-radius); overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,.02), transparent);
    box-shadow: var(--sb-shadow);
}
.comp-block > summary {
    background: linear-gradient(135deg, var(--sb-surface-2), var(--sb-surface));
    border: none; border-radius: 0; padding: 14px 16px;
    border-left: 3px solid transparent; letter-spacing: .2px;
}
.comp-block > summary:hover { border-left-color: var(--gold); }
.comp-block > summary > span:first-child {
    display: flex; align-items: center; gap: 9px; font-weight: 700;
}
.comp-block > summary .lea-ico {
    display: inline-grid; place-items: center; width: 26px; height: 26px;
    background: rgba(212,175,55,.12); border: 1px solid rgba(212,175,55,.3);
    border-radius: 7px; font-size: .95rem;
}
.comp-block[open] > summary {
    background: linear-gradient(135deg, rgba(212,175,55,.14), rgba(212,175,55,.04));
    color: var(--text); border-left-color: var(--gold);
    border-bottom: 1px solid var(--sb-line-soft); border-radius: 0;
}
.comp-block[open] > summary .comp-count { color: var(--gold-light); }
.comp-block .comp-count {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .78rem; font-weight: 700; color: var(--muted);
}
.comp-block .comp-count .chev { transition: transform .2s; }
.comp-block[open] .comp-count .chev { transform: rotate(180deg); }
.comp-block > .match-card:first-of-type { margin-top: 0; }
.comp-inner { padding: 6px 10px 10px; }

/* En-tête de colonnes 1 / X / 2 (aligné avec les cotes) */
.market-head {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 8px 12px 2px; color: var(--muted);
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
}
.market-head span { width: 62px; text-align: center; }
@media (max-width: 768px) { .market-head { display: none; } }

/* ------------------------------------------------------------------
   Ligne de match
   ------------------------------------------------------------------ */
.match-card {
    background: transparent; border: none;
    border-bottom: 1px solid var(--sb-line-soft); border-radius: 0;
    padding: 12px; margin: 0;
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px;
    transition: background .15s;
}
.comp-inner .match-card:last-child { border-bottom: none; }
.match-card:hover { background: rgba(255,255,255,.025); }

.match-teams { min-width: 0; }
.match-teams .teams {
    font-weight: 700; font-size: .98rem; line-height: 1.35;
    display: flex; flex-direction: column; gap: 1px;
}
.match-teams .teams .vs {
    color: var(--muted); font-weight: 500; font-size: .72rem;
    text-transform: uppercase; letter-spacing: .5px; margin: 1px 0;
}
.match-teams .when {
    color: var(--muted); font-size: .76rem; margin-top: 5px;
    display: inline-flex; align-items: center; gap: 6px;
}
.match-teams .when::before { content: "🕑"; font-size: .8rem; opacity: .7; }

/* Maillot aux couleurs de l'équipe (sports collectifs) / pastille
   d'initiales (tennis). Génériques : aucun logo ni photo (droits). */
.teams > span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.teams .tn { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.jersey {
    width: 21px; height: 21px; flex-shrink: 0;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.45));
}
.avatar {
    width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
    display: inline-grid; place-items: center;
    font-size: .64rem; font-weight: 800; color: #fff; letter-spacing: .3px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}

.badge-live {
    background: var(--red); color: #fff; font-weight: 800;
    font-size: .62rem; letter-spacing: .5px; padding: 2px 8px; border-radius: 999px;
    display: inline-flex; align-items: center; gap: 5px; vertical-align: middle;
}
.badge-live::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: #fff; animation: sb-pulse 1.2s infinite;
}
@keyframes sb-pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ------------------------------------------------------------------
   Boutons de cote
   ------------------------------------------------------------------ */
.odd-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
/* Les groupes par marché n'existent QUE sur téléphone : ici ils sont
   neutralisés, les boutons redeviennent enfants directs de .odd-btns et
   la ligne desktop reste strictement identique à avant. */
.odd-row { display: contents; }
.odd-row-label { display: none; }
.odd-btn {
    position: relative; min-width: 62px; width: 62px;
    padding: 8px 6px; cursor: pointer;
    background: linear-gradient(180deg, var(--sb-surface-2), var(--sb-surface));
    color: var(--text); border: 1px solid var(--sb-line);
    border-radius: var(--sb-radius-sm); text-align: center;
    font-variant-numeric: tabular-nums;
    transition: transform .1s, border-color .12s, box-shadow .12s, background .12s;
}
.odd-btn small {
    display: block; color: var(--muted); font-size: .64rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .3px; margin-bottom: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Le bouton porte le NOM de l'équipe seulement s'il tient EN ENTIER :
   un nom tronqué (« CAROLINA HU… ») est moins lisible qu'un 1 / X / 2.
   Seuil haut + boutons élargis pour éviter toute troncature. */
.odd-btn small .lbl { display: none; }
.odd-btn small .pk  { display: inline; }
.odd-btn small .pkm { display: none; }   /* variante téléphone (totals) */
@media (min-width: 1500px) {
    .odd-btn { width: 132px; min-width: 132px; }
    .odd-btn small .lbl { display: inline; }
    .odd-btn small .pk  { display: none; }
}
.odd-btn b { font-size: 1rem; font-weight: 800; }
.odd-btn:hover {
    border-color: var(--gold); transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,.35);
}
.odd-btn.selected {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border-color: var(--gold); color: #241c00;
    box-shadow: 0 6px 16px rgba(212,175,55,.35);
}
.odd-btn.selected small { color: #5a4708; }
.odd-btn:disabled { opacity: .35; cursor: not-allowed; }
@keyframes odd-flash {
    0%   { background: var(--gold); color: #241c00; }
    100% { background: var(--sb-surface); color: var(--text); }
}
.odd-btn.refreshed { animation: odd-flash 1.6s ease-out; }
.match-card.closed { opacity: .4; }
.match-card.closed .odd-btn { pointer-events: none; }

/* ------------------------------------------------------------------
   Fiche d'événement : lien depuis la liste + retour
   ------------------------------------------------------------------ */
.match-link { text-decoration: none; color: inherit; display: block; }
.match-link:hover .tn { text-decoration: underline; text-underline-offset: 3px; }

/* Renvoi vers les marchés pointus (corners, cartons, joueurs) */
.more-markets {
    grid-column: 1 / -1; justify-self: start;
    display: inline-flex; align-items: center; gap: 7px; margin-top: 4px;
    padding: 5px 12px; border-radius: 999px; text-decoration: none;
    background: rgba(255,255,255,.04); border: 1px solid var(--sb-line-soft);
    color: var(--muted); font-size: .78rem; font-weight: 700;
    transition: border-color .12s, color .12s;
}
.more-markets:hover { border-color: var(--gold); color: var(--gold-light); }

.back-link { margin: 14px 0 4px; }
.back-link a {
    color: var(--muted); text-decoration: none; font-size: .88rem; font-weight: 600;
}
.back-link a:hover { color: var(--gold-light); }

/* ------------------------------------------------------------------
   Marchés spéciaux (expander compact)
   ------------------------------------------------------------------ */
.match-card .specials { grid-column: 1 / -1; margin-top: 4px; }
.match-card .specials > summary {
    display: inline-flex; align-items: center; gap: 6px; width: auto;
    background: rgba(212,175,55,.08); border: 1px solid rgba(212,175,55,.28);
    border-radius: 999px; padding: 5px 12px;
    color: var(--gold-light) !important; font-size: .78rem !important; font-weight: 700;
    list-style: none;
}
.match-card .specials > summary::-webkit-details-marker { display: none; }
.match-card .specials[open] > summary { margin-bottom: 8px; }
.match-card .specials .competition {
    color: var(--muted); font-size: .72rem; text-transform: uppercase;
    letter-spacing: .5px; margin: 10px 0 5px;
}
.special-btn { width: auto; min-width: 70px; padding: 7px 10px; }

/* ------------------------------------------------------------------
   Panier de tikè (bet slip)
   ------------------------------------------------------------------ */
.slip {
    background: linear-gradient(180deg, var(--sb-surface), var(--sb-bg-2));
    border: 1px solid rgba(212,175,55,.4);
    border-radius: var(--sb-radius); padding: 0; overflow: hidden;
    box-shadow: var(--sb-shadow-lg); top: 16px;
}
.slip h3 {
    margin: 0; padding: 14px 16px; color: #241c00;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    font-size: 1rem; font-weight: 900; letter-spacing: .3px;
    display: flex; align-items: center; justify-content: space-between;
}
.slip h3 .slip-count {
    background: rgba(0,0,0,.22); color: #fff; min-width: 24px; height: 24px;
    border-radius: 999px; display: inline-grid; place-items: center;
    font-size: .82rem; padding: 0 7px;
}
/* Barre d'actions du panier (vider / partager) */
.slip-actions {
    display: flex; gap: 8px; padding: 10px 16px 0;
}
.slip-actions button {
    flex: 1; padding: 7px 10px; cursor: pointer; font-size: .78rem; font-weight: 700;
    background: var(--sb-bg-1); color: var(--muted);
    border: 1px solid var(--sb-line-soft); border-radius: 999px;
    transition: color .15s, border-color .15s;
}
.slip-actions button:hover { color: var(--gold-light); border-color: var(--gold); }
#btnClear:hover { color: #ff8a8a; border-color: rgba(214,40,40,.5); }

#slipItems {
    padding: 6px 16px; overflow-y: auto;
    max-height: 42vh; max-height: 42dvh;   /* dvh : hauteur visible réelle sur iOS */
}
.slip-empty {
    color: var(--muted); font-size: .88rem; text-align: center;
    padding: 26px 8px; line-height: 1.5;
}
.slip-empty::before {
    content: "🎯"; display: block; font-size: 1.8rem; margin-bottom: 8px; opacity: .8;
}
.slip-item {
    border-bottom: 1px solid var(--sb-line-soft); padding: 10px 0; font-size: .87rem;
    display: flex; justify-content: space-between; gap: 8px; align-items: flex-start;
}
.slip-item:last-child { border-bottom: none; }
.slip-item .pick { color: var(--gold-light); font-weight: 700; }
.slip-item button {
    background: rgba(214,40,40,.14); border: 1px solid rgba(214,40,40,.35);
    color: #ff8a8a; cursor: pointer; font-size: .8rem; line-height: 1;
    width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
    transition: background .12s;
}
.slip-item button:hover { background: rgba(214,40,40,.3); }

.slip-body { padding: 4px 16px 16px; }
.slip label { display: block; margin-top: 12px; font-size: .82rem; color: var(--muted); }
.slip input[type=number], .slip input[type=text],
.slip input[type=tel], .slip input[type=password] {
    width: 100%; padding: 11px; margin-top: 5px;
    background: var(--sb-bg-1); color: var(--text);
    border: 1px solid var(--sb-line); border-radius: var(--sb-radius-sm);
    font-size: 1rem; transition: border-color .15s;
}
.slip input:focus { outline: none; border-color: var(--gold); }

.slip-totals {
    margin-top: 14px; padding: 12px 14px; border-radius: var(--sb-radius-sm);
    background: var(--sb-bg-1); border: 1px solid var(--sb-line-soft); font-size: .9rem;
}
.slip-totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.slip-totals div span:first-child { color: var(--muted); }
.slip-totals div span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.slip-totals .win {
    margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--sb-line);
    font-size: 1.1rem;
}
.slip-totals .win span:first-child { color: var(--text) !important; font-weight: 700; }
.slip-totals .win span:last-child { color: var(--sb-green); font-weight: 900; }

/* Choix du mode de paiement en cartes */
.pay-opts { margin-top: 14px; display: grid; gap: 8px; }
.pay-opts label {
    margin: 0; display: flex; align-items: center; gap: 9px; cursor: pointer;
    padding: 11px 13px; border-radius: var(--sb-radius-sm);
    background: var(--sb-bg-1); border: 1px solid var(--sb-line-soft);
    color: var(--text); font-size: .88rem; transition: border-color .15s, background .15s;
}
.pay-opts label:hover { border-color: var(--gold); }
.pay-opts input[type=radio] { accent-color: var(--gold); width: 16px; height: 16px; }

.btn-primary {
    margin: 14px 0 0; padding: 15px; border-radius: var(--sb-radius-sm);
    background: linear-gradient(135deg, #e23b3b, var(--red-dark));
    font-size: 1.05rem; font-weight: 900; letter-spacing: .5px;
    box-shadow: 0 10px 24px rgba(214,40,40,.35);
    transition: transform .1s, box-shadow .12s, filter .12s;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }
.btn-primary:disabled {
    background: var(--sb-surface-2); box-shadow: none; color: var(--muted); opacity: 1;
}

/* ------------------------------------------------------------------
   Bet slip mobile : barre flottante + feuille coulissante
   ------------------------------------------------------------------ */
.slip-fab {
    display: none; position: fixed; left: 12px; right: 12px; z-index: 60;
    /* Décalé au-dessus de la barre d'accueil iPhone, sinon le bouton
       tombe dans la zone non cliquable du bas de l'écran. */
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 18px; border-radius: var(--sb-radius);
    background: linear-gradient(135deg, #e23b3b, var(--red-dark));
    color: #fff; font-weight: 800; border: none; cursor: pointer;
    box-shadow: var(--sb-shadow-lg);
}
.slip-fab .fab-left { display: flex; align-items: center; gap: 10px; }
.slip-fab .fab-badge {
    background: rgba(0,0,0,.28); min-width: 26px; height: 26px; border-radius: 999px;
    display: inline-grid; place-items: center; font-size: .85rem; padding: 0 8px;
}
.slip-fab .fab-win { font-variant-numeric: tabular-nums; }
.slip-backdrop {
    display: none; position: fixed; inset: 0; z-index: 55;
    background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.slip-backdrop.show { display: block; }

/* Petits écrans : téléphone ET mini-POS/tablette (≤ 1024px).
   Le panier latéral se transforme en bouton flottant + feuille. */
@media (max-width: 1024px) {
    .layout { grid-template-columns: 1fr; }
    .slip-fab.show { display: flex; }
    /* iOS : `vh` compte la hauteur AVEC la barre d'adresse, donc une
       feuille en 90vh dépassait sous le bord de l'écran et le bouton
       « Créer le BKtikè » devenait inatteignable. `dvh` suit la hauteur
       réellement visible ; `vh` reste en repli pour les vieux Safari.
       `env(safe-area-inset-bottom)` dégage la barre d'accueil iPhone. */
    aside {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 58;
        transform: translateY(105%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
        max-height: 88vh; max-height: 88dvh; overflow: hidden;
    }
    aside.open { transform: translateY(0); }
    .slip {
        border-radius: var(--sb-radius) var(--sb-radius) 0 0; top: 0;
        max-height: 88vh; max-height: 88dvh;
        overflow-y: auto; -webkit-overflow-scrolling: touch;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
    /* En-tête figé en haut pendant le défilement de la feuille */
    .slip h3 {
        cursor: pointer; position: sticky; top: 0; z-index: 2; padding-top: 20px;
    }
    /* Poignée d'affordance */
    .slip h3::before {
        content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
        width: 42px; height: 4px; border-radius: 999px; background: rgba(0,0,0,.28);
    }
    .slip h3 .slip-close { font-size: 1.2rem; color: #241c00; }
    #slipItems { max-height: none; }
    /* Feuille ouverte : le fond ne défile plus et le bouton flottant
       s'efface (la feuille a déjà son propre bouton « Créer le tikè ») */
    body.sheet-open { overflow: hidden; }
    body.sheet-open .slip-fab { display: none !important; }
}
@media (min-width: 1025px) {
    .slip h3 .slip-close { display: none; }
    .layout { grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
}

/* Téléphone ET mini-POS (≤ 768px) : équipes en PLEINE LARGEUR au-dessus,
   cotes sur leur propre ligne dessous → les noms d'équipes ne sont plus
   jamais tronqués. Cellules de cotes bornées pour rester nettes. */
@media (max-width: 768px) {
    .match-card { grid-template-columns: 1fr; gap: 10px; padding: 14px 12px; }
    .match-teams .teams { font-size: 1rem; }

    /* ---- Cotes sur téléphone : UNE RANGÉE PAR MARCHÉ ----
       Quatre boutons de 68 px alignés dans 375 px étaient serrés et
       mélangeaient deux paris différents (résultat / total). Chaque
       marché a maintenant sa rangée titrée, avec des boutons larges. */
    .odd-btns {
        display: flex; flex-direction: column; gap: 10px;
        justify-content: flex-start; flex-wrap: nowrap;
    }
    /* Flex plutôt que grid : `auto-fit` avec un minimum de 0 laissait
       les colonnes s'effondrer à quelques pixels. Ici le titre prend
       toute la largeur et les boutons se partagent le reste à parts
       égales, quel que soit leur nombre (2 ou 3 selon le sport). */
    .odd-row { display: flex; flex-wrap: wrap; gap: 7px; }
    .odd-row-label {
        display: block; flex: 0 0 100%;
        color: var(--muted); font-size: .68rem; font-weight: 800;
        text-transform: uppercase; letter-spacing: .06em;
    }
    .odd-row .odd-btn { flex: 1 1 0; }
    .odd-btn {
        width: auto; min-width: 0; max-width: none;
        min-height: 46px;            /* cible tactile confortable */
        padding: 7px 6px;
        display: flex; flex-direction: column; justify-content: center; gap: 1px;
    }
    .odd-btn small { font-size: .66rem; margin: 0; }
    .odd-btn b { font-size: 1.05rem; }
    /* Mots simples plutôt que « +6.5 » sur les totaux : la ligne est
       déjà dans le titre de la rangée (« Total 6.5 »). On cible les
       boutons par leur data-pick — explicite et supporté partout,
       contrairement à :has() sur les vieux navigateurs mobiles. */
    .odd-btn small .lbl { display: none; }
    .odd-btn small .pk  { display: inline; }
    .odd-btn[data-pick="over"] .pk,
    .odd-btn[data-pick="under"] .pk  { display: none; }
    .odd-btn[data-pick="over"] .pkm,
    .odd-btn[data-pick="under"] .pkm { display: inline; }

    /* Marchés spéciaux : ils gardent leur disposition libre */
    .match-card .specials .odd-btns { flex-direction: row; flex-wrap: wrap; }
    .odd-btn.special-btn {
        flex: 0 1 auto; max-width: none; min-height: 0;
        display: inline-block; padding: 8px 10px;
    }
}
