@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   EDEM PARYE V2 — LUMINOUS MODERN GLASSMORPHISM THEME (LIGHT MODE)
   ========================================================================== */

:root {
    --bg-body: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.78);
    --bg-card-solid: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.85);
    --border-light: rgba(226, 232, 240, 0.9);
    --border-glass: rgba(255, 255, 255, 0.7);
    --border-glow: rgba(16, 185, 129, 0.3);
    
    /* Vibrant Color System */
    --accent-green: #10b981;      /* Emerald Green */
    --accent-green-dark: #059669;
    --accent-red: #d32f2f;        /* Exact Live Red */
    --accent-red-dark: #b71c1c;
    --accent-gold: #f59e0b;       /* Amber Gold */
    --accent-gold-dark: #d97706;
    --accent-blue: #2563eb;       /* Royal Blue */
    --accent-indigo: #6366f1;     /* Electric Indigo */
    
    /* Text Palette */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    /* Layout & Shadow */
    --radius: 14px;
    --radius-lg: 18px;
    --shadow-soft: 0 10px 30px -5px rgba(0, 0, 0, 0.04);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
    --shadow-card-hover: 0 16px 36px -8px rgba(16, 185, 129, 0.18);
    --backdrop-blur: blur(16px) saturate(180%);
    --font-primary: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: -0.01em;
    background-image: 
        radial-gradient(circle at 5% 10%, rgba(99, 102, 241, 0.07) 0%, transparent 40%),
        radial-gradient(circle at 95% 20%, rgba(16, 185, 129, 0.07) 0%, transparent 40%),
        radial-gradient(circle at 50% 90%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
}

/* ==========================================================================
   TOP HEADER (RICH OBSIDIAN BLACK BACKGROUND)
   ========================================================================== */
.top-header {
    background: #1e1e1e; /* Black Obsidian Header */
    border-bottom: 2px solid #d32f2f; /* Red Accent Border from live site */
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.header-inner {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Logo Container — Black box with animated neon gradient glow */
.header-center a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 24px;
    background: #000000; /* Deep Black Box */
    border-radius: 16px;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.header-center a:hover {
    transform: scale(1.04);
}

/* Animated color gradient border */
.header-center a::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 19px;
    background: linear-gradient(90deg, #10b981, #6366f1, #f43f5e, #f59e0b, #10b981);
    background-size: 300% 300%;
    animation: logoGradientShift 4s ease infinite;
    z-index: -1;
}

/* Outer glowing blur effect */
.header-center a::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 22px;
    background: linear-gradient(90deg, #10b981, #6366f1, #f43f5e, #f59e0b, #10b981);
    background-size: 300% 300%;
    animation: logoGradientShift 4s ease infinite;
    z-index: -2;
    filter: blur(10px);
    opacity: 0.7;
}

@keyframes logoGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.site-logo {
    height: 40px;
    width: auto;
    display: block;
}

/* Slogan anime — idantik ak Version 1 (edem.titele.site) */
.slogan { display: flex; align-items: center; gap: 14px; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.03em; white-space: nowrap; }
.slogan-word { position: relative; color: #7d90a5; opacity: 0.55; animation: sloganPulse 6s ease-in-out infinite; display: inline-flex; align-items: center; gap: 4px; }
.slogan-word.w1 { animation-delay: 0s; }
.slogan-word.w2 { animation-delay: 2s; }
.slogan-word.w3 { animation-delay: 4s; animation-name: sloganPulseGold; }
.slogan-word::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, #ffd54f, #ff8f00); transform: scaleX(0); transform-origin: left;
    animation: sloganUnderline 6s ease-in-out infinite; animation-delay: inherit;
}
.slogan-dot { color: #d32f2f; font-weight: 900; }
@keyframes sloganPulse {
    0%, 30%, 100% { color: #7d90a5; opacity: 0.55; transform: translateY(0); text-shadow: none; }
    8%, 22% { color: #fff; opacity: 1; transform: translateY(-2px); text-shadow: 0 0 12px rgba(255,255,255,0.45); }
}
@keyframes sloganPulseGold {
    0%, 30%, 100% { color: #7d90a5; opacity: 0.55; transform: translateY(0) scale(1); text-shadow: none; }
    8%, 22% { color: #ffd54f; opacity: 1; transform: translateY(-2px) scale(1.12); text-shadow: 0 0 14px rgba(255,213,79,0.85), 0 0 30px rgba(255,143,0,0.4); }
}
@keyframes sloganUnderline {
    0%, 5%, 30%, 100% { transform: scaleX(0); }
    10%, 20% { transform: scaleX(1); }
    24% { transform-origin: right; transform: scaleX(0); }
}

/* Navigation Buttons inside Black Header */
.main-nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-blue));
    border-color: var(--accent-indigo);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* ===== BOUTON COMBINAISON ANIME ===== */
.nav-btn[data-view="combo"] {
    position: relative;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    padding: 10px 24px !important;
    border-radius: 30px !important;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(79, 70, 229, 0.45);
    animation: comboPulseGlow 3s infinite ease-in-out;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.nav-btn[data-view="combo"]:hover {
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 8px 28px rgba(6, 182, 212, 0.75) !important;
}

/* Light sheen sweep animation across the button */
.nav-btn[data-view="combo"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.45) 50%,
        transparent 70%
    );
    transform: rotate(30deg);
    animation: comboShimmer 3.5s infinite;
    pointer-events: none;
}

@keyframes comboPulseGlow {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4), 0 0 0 0 rgba(6, 182, 212, 0.4);
    }
    50% {
        box-shadow: 0 6px 24px rgba(79, 70, 229, 0.7), 0 0 16px 4px rgba(6, 182, 212, 0.6);
    }
}

@keyframes comboShimmer {
    0% {
        left: -120%;
    }
    25%, 100% {
        left: 120%;
    }
}

/* ==========================================================================
   WINNING CELEBRATION PARTICLES (EVERY 5 SECONDS)
   ========================================================================== */
@keyframes popAndFade {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.3) rotate(0deg);
    }
    40% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.3) rotate(220deg);
    }
}

/* ==========================================================================
   PROMO BAR: VEDETTE / AN DIRÈK / TICKER (CRIMSON RED GRADIENT)
   ========================================================================== */
.promo-bar {
    display: flex;
    align-items: stretch;
    gap: 10px;
    background: linear-gradient(90deg, #7f0000, #b71c1c 45%, #8e0000);
    padding: 8px 16px;
    overflow: hidden;
    box-shadow: inset 0 -3px 8px rgba(0,0,0,0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.promo-card {
    flex: 0 0 auto;
    max-width: 300px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    padding: 6px 12px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    transition: transform 0.2s, background 0.2s;
    animation: promoGlow 3s ease-in-out infinite;
    cursor: pointer;
}

.promo-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.22);
}

.promo-label {
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #ffd54f;
    text-transform: uppercase;
}

.promo-featured .promo-label {
    color: #ffd54f !important; /* Gold */
    text-shadow: 0 0 6px rgba(255, 213, 79, 0.4);
}

.promo-choix .promo-label {
    color: #38bdf8 !important; /* Vibrant Electric Cyan Blue */
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.promo-content {
    font-size: 0.76rem;
    font-weight: 700;
    color: #ffffff !important;
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 2px;
}

.promo-match-title {
    font-weight: 800;
    font-size: 0.88rem;
    color: #ffffff;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.promo-pick-badge {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffd54f; /* Gold accent pour prono */
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.promo-pick-badge strong {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.promo-conf {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    font-weight: 600;
}

.promo-sub-info {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.2;
}

@keyframes promoGlow {
    0%, 100% { box-shadow: 0 0 0 rgba(255,213,79,0); }
    50% { box-shadow: 0 0 12px rgba(255,213,79,0.45); }
}

.promo-ticker {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
}

.megaphone {
    font-size: 1.3rem;
    flex: 0 0 auto;
    animation: megaShake 2.2s ease-in-out infinite;
    filter: drop-shadow(0 0 4px rgba(255,213,79,0.6));
}

@keyframes megaShake {
    0%, 100% { transform: rotate(0); }
    8% { transform: rotate(-14deg); }
    16% { transform: rotate(10deg); }
    24% { transform: rotate(-8deg); }
    32% { transform: rotate(0); }
}

.ticker-viewport {
    flex: 1 1 auto;
    overflow: hidden;
    min-width: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

.ticker-track {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: tickerScroll 40s linear infinite;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 600;
}

.promo-ticker:hover .ticker-track {
    animation-play-state: paused;
}

@keyframes tickerScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.ticker-item {
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0 22px;
    position: relative;
}

.ticker-item::after {
    content: '•';
    position: absolute;
    right: -4px;
    color: #ffd54f;
}

.ticker-score {
    color: #a5d6a7;
    font-weight: 900;
}


/* ==========================================================================
   DATE RANGE BAR (LIGHT PILLS)
   ========================================================================== */
.date-range-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    padding: 14px 24px;
    background: transparent;
    border-bottom: 1px solid var(--border-light);
    scrollbar-width: none;
    touch-action: pan-x;
}

.date-range-bar::-webkit-scrollbar {
    display: none;
}

.date-range-btn {
    flex: 0 0 auto;
    scroll-snap-align: center;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    user-select: none;
    -webkit-user-select: none;
}

.date-range-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.date-range-btn.active {
    transform: translateY(-1px);
    border-width: 2px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
}

/* Number Count Badges — Vibrant Blue default */
.range-count-badge {
    background: #2563eb !important; /* Vibrant Blue Badge */
    color: #ffffff !important;
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* ==========================================================================
   INDIVIDUAL COLOR THEMES FOR EACH DATE BUTTON
   ========================================================================== */

/* 1. Mois passé (Slate Tint) */
.date-range-btn[data-range="mois_passe"] {
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    color: #334155;
}

/* 2. Semaine passée (Indigo Tint) */
.date-range-btn[data-range="semaine_passee"] {
    background: #eef2ff;
    border: 1.5px solid #c7d2fe;
    color: #3730a3;
}
.date-range-btn[data-range="semaine_passee"] .range-count-badge {
    background: #4f46e5 !important;
}

/* 3. Hier (Purple Tint) */
.date-range-btn[data-range="hier"] {
    background: #faf5ff;
    border: 1.5px solid #e9d5ff;
    color: #6b21a8;
}
.date-range-btn[data-range="hier"] .range-count-badge {
    background: #9333ea !important;
}

/* 4. Aujourd'hui (Emerald Green Highlight) */
.date-range-btn[data-range="aujourdhui"] {
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    color: #065f46;
    font-weight: 800;
}
.date-range-btn[data-range="aujourdhui"] .range-count-badge {
    background: #10b981 !important;
}

/* 5. 🔴 En direct (Rose Red Live) */
.date-range-btn[data-view="live"], #live-range-btn {
    background: #fff1f2;
    border: 1.5px solid #fecdd3;
    color: #9f1239;
    font-weight: 800;
}
.date-range-btn[data-view="live"] .live-count-badge, #live-count-badge {
    background: #f43f5e !important;
    color: #ffffff !important;
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 800;
    animation: livePulse 1.5s infinite;
}

/* 6. Demain (Cyan / Ocean Blue) */
.date-range-btn[data-range="demain"] {
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    color: #0369a1;
}
.date-range-btn[data-range="demain"] .range-count-badge {
    background: #0284c7 !important;
}

/* 7. Cette semaine (Amber / Gold) */
.date-range-btn[data-range="semaine"] {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    color: #92400e;
}
.date-range-btn[data-range="semaine"] .range-count-badge {
    background: #d97706 !important;
}

/* 8. À venir (Teal) */
.date-range-btn[data-range="venir"] {
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    color: #115e59;
}
.date-range-btn[data-range="venir"] .range-count-badge {
    background: #0d9488 !important;
}

@keyframes livePulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.9); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   APP SHELL & SIDEBAR (LIGHT GLASS)
   ========================================================================== */
.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    max-width: 1600px;
    margin: 20px auto;
    padding: 0 24px 40px;
    align-items: start;
    transition: grid-template-columns 0.3s ease;
}

.app-shell.full-width {
    grid-template-columns: 1fr;
}

/* Vi ki pa "matches" (Combinaison, En direct) — sidebar Populaires la pa gen
   plas la : kache l nèt (anvan li te rete kòm timoun grid e parèt orizontal). */
.app-shell.full-width .sidebar {
    display: none;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-section {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-glass);
}

.sidebar-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 12px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    font-weight: 600;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.sidebar-link.active {
    background: rgba(16, 185, 129, 0.08);
    color: var(--accent-green-dark);
    font-weight: 800;
    border-left: 4px solid var(--accent-green);
    padding-left: 8px;
}

.sidebar-filter {
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 0.82rem;
    font-family: var(--font-primary);
    outline: none;
    transition: all 0.2s ease;
}

.sidebar-filter:focus {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
    background: #ffffff;
}

.sidebar-loading {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    padding: 20px 0;
}

.count-badge {
    background: #e2e8f0;
    color: var(--text-secondary);
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 8px;
    font-weight: 700;
}

.sidebar-link.active .count-badge {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green-dark);
}

/* ==========================================================================
   CONTENT AREA & SEARCH
   ========================================================================== */
.content-area {
    min-width: 0;
}

.content-header {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.search-container {
    margin-bottom: 16px;
}

#global-match-search {
    width: 100%;
    padding: 14px 18px;
    font-size: 0.95rem;
    outline: none;
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    border-radius: var(--radius-lg);
    font-family: var(--font-primary);
    box-shadow: var(--shadow-glass);
    transition: all 0.25s ease;
}

#global-match-search:focus {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
    background: #ffffff;
}

/* ==========================================================================
   LEAGUE SECTION & CUTE MATCH CARDS
   ========================================================================== */
.league-section {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
    overflow: hidden;
}

.league-section-header {
    font-size: 0.95rem;
    font-weight: 900;
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    margin: -20px -20px 18px -20px;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.2);
}

.forebet-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.forebet-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: var(--font-primary);
}

/* En-tête du tableau — barre rouge (ton sur ton avec le header/promo du site) */
.forebet-table thead th {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ffffff;
    background: linear-gradient(180deg, #c62828, #8e0000);
    padding: 13px 10px;
    border-bottom: none;
    white-space: nowrap;
}
.forebet-table thead th:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}
.forebet-table thead th:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}
.forebet-table thead th.col-match {
    text-align: left;
    padding-left: 14px;
}

/* Ligne de match — un vrai tableau : une seule ligne par match */
.clickable-match-row {
    transition: background 0.18s ease;
}
.clickable-match-row:hover {
    background: rgba(16, 185, 129, 0.06);
}

/* Coloration GAGNÉ / PERDU (matchs terminés) — accent à gauche + fond teinté */
.clickable-match-row.row-won { background: rgba(16, 185, 129, 0.07); }
.clickable-match-row.row-won:hover { background: rgba(16, 185, 129, 0.12); }
.clickable-match-row.row-lost { background: rgba(239, 68, 68, 0.06); }
.clickable-match-row.row-lost:hover { background: rgba(239, 68, 68, 0.11); }
.clickable-match-row.row-won td.col-match { box-shadow: inset 4px 0 0 var(--accent-green); }
.clickable-match-row.row-lost td.col-match { box-shadow: inset 4px 0 0 #ef4444; }

/* Cellules — bien alignées verticalement, une ligne par match */
.forebet-table td {
    padding: 13px 10px;
    vertical-align: middle;
    text-align: center;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}
.forebet-table tbody tr:last-child td { border-bottom: none; }

.forebet-table td.col-match {
    text-align: left;
    padding-left: 8px;
    min-width: 180px;
}

/* Micro-libellés par cellule : MASQUÉS sur desktop (le <thead> sert d'en-tête),
   RÉ-AFFICHÉS en mode carte sur mobile (voir media query plus bas). */
.col-prono::before { content: 'PRONO'; }
.col-score-prono::before { content: 'SCORE'; }
.col-market::before { content: '🤖 AI PARYAJ'; }
.col-proba::before { content: 'PROBA'; }
.col-cote::before { content: 'COTE'; }
.col-resultat::before { content: 'RÉSULTAT'; }
.col-bet::before { content: 'PARIER'; }

.col-prono::before,
.col-score-prono::before,
.col-market::before,
.col-proba::before,
.col-cote::before,
.col-resultat::before,
.col-bet::before {
    display: none;
    font-size: 0.6rem;
    font-weight: 900;
    color: #94a3b8;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

/* Team Name */
.team-name-wrap {
    font-size: 0.98rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.match-sub-info {
    font-size: 0.74rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-weight: 600;
}

.live-badge {
    background: rgba(244, 63, 94, 0.12);
    color: #e11d48;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid rgba(244, 63, 94, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.finished-badge {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Cute Circular Predict Badges */
.forebet-circle-badge {
    width: 38px;
    height: 38px;
    font-size: 0.92rem;
    font-weight: 900;
    border-radius: 50% !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981, #059669);
    border: 2px solid #ffffff;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.28);
}

/* Color Coding for 1, X, 2 */
.forebet-circle-badge[data-prono="1"], .forebet-circle-badge:contains("1") {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.forebet-circle-badge.pred-pulse {
    border-color: #10b981;
    animation: glowGreenPulse 2s infinite;
}

@keyframes glowGreenPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.col-score-prono {
    font-size: 0.95rem !important;
    font-weight: 900;
    color: var(--text-primary) !important;
    white-space: nowrap;
}

.col-market {
    font-size: 0.8rem !important;
    font-weight: 700;
    color: var(--text-secondary) !important;
    line-height: 1.3;
    min-width: 120px;
}

.col-proba {
    font-size: 0.85rem !important;
    font-weight: 800;
    color: var(--text-primary) !important;
}

.col-cote {
    font-size: 0.92rem !important;
    font-weight: 900;
    color: var(--accent-green-dark) !important;
    white-space: nowrap;
}
.col-resultat { white-space: nowrap; }

.actual-score {
    font-size: 1.05rem !important;
    font-weight: 900;
    color: #0f172a;
}

.comparison-status {
    font-size: 0.72rem !important;
    margin-top: 2px;
}

/* Cute Bet Pill Button */
.bet-btn {
    width: 100%;
    padding: 9px 14px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
    color: #ffffff !important;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    transition: all 0.22s ease !important;
}

.bet-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

.bet-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #cbd5e1 !important;
    box-shadow: none !important;
}

.bet-btn.big { font-size: 0.88rem; padding: 10px 22px; border-radius: 22px; }

/* ==========================================================================
   MODAL "PLACER CE PARI" (bet.js) — restore apre refonte tèm nan te retire l
   (san sa, modal la louvri men san estil -> parèt "pa mache").
   ========================================================================== */
#bet-modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.55);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.bet-modal {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0,0,0,0.35);
    width: 100%; max-width: 460px;
    max-height: 86vh; overflow-y: auto;
    padding: 18px;
}
.bet-modal-head {
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 900; font-size: 1rem; margin-bottom: 12px;
    color: var(--text-primary);
}
.bet-modal-close {
    background: none; border: none; cursor: pointer;
    font-size: 1rem; color: var(--text-muted); padding: 4px 8px;
}
.bet-modal-legs { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.bet-leg-line {
    display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    background: var(--bg-body); border-radius: 8px; padding: 8px 10px; font-size: 0.8rem;
}
.bet-leg-name { font-weight: 700; color: var(--text-primary); }
.bet-leg-pick { color: var(--text-secondary); }
.bet-leg-pick b { color: var(--accent-green-dark); }
.bet-modal-choose { font-size: 0.8rem; font-weight: 800; color: var(--text-secondary); margin-bottom: 8px; }
.bet-provider-row { display: flex; gap: 10px; margin-bottom: 12px; }
.bet-provider-btn {
    flex: 1; border: none; border-radius: 10px; cursor: pointer;
    padding: 12px 8px; font-size: 0.88rem; font-weight: 800; font-family: inherit;
    color: #fff; transition: filter 0.15s, transform 0.15s;
}
.bet-provider-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.bet-provider-btn.pl { background: linear-gradient(135deg, #2e7d32, #4caf50); }
.bet-provider-btn.pp { background: linear-gradient(135deg, #b06000, #ffb300); }
.bet-modal-note { font-size: 0.74rem; color: var(--text-muted); line-height: 1.45; }
.bet-modal-links { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.bet-leg-link {
    display: flex; justify-content: space-between; gap: 10px; align-items: center;
    background: #eef7ee; border: 1px solid var(--accent-green);
    border-radius: 8px; padding: 9px 12px; font-size: 0.8rem; font-weight: 700;
    color: var(--accent-green-dark); text-decoration: none;
    transition: background 0.15s;
}
.bet-leg-link:hover { background: #ddefdd; }
.bet-leg-link:visited { opacity: 0.65; }
.bet-leg-link-pick { white-space: nowrap; }

/* Slots disponibilite pa bookmaker (tchek davans) */
.bet-provider-slot { border: 1.5px solid var(--border-light); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.bp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.bp-name { font-weight: 900; font-size: 0.95rem; color: var(--text-primary); }
.bp-status { font-size: 0.82rem; font-weight: 700; }
.bp-ok { color: var(--accent-green-dark); }
.bp-warn { color: var(--accent-gold-dark); }
.bp-no { color: #c0392b; }
.bp-missing { font-size: 0.74rem; color: var(--text-muted); font-weight: 600; margin-top: 3px; }
.bp-go { width: 100%; border: none; border-radius: 10px; cursor: pointer; padding: 11px; font-family: var(--font-primary); font-size: 0.9rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #2e7d32, #4caf50); transition: filter .15s, transform .1s; }
.bp-go:hover { filter: brightness(1.08); }
.bp-go:active { transform: translateY(1px); }
.bp-go.warn { background: linear-gradient(135deg, #b06000, #f59e0b); }
.bp-go.disabled { background: #cbd5e1; color: #64748b; cursor: not-allowed; }

/* ==========================================================================
   RESPONSIVE — le tableau devient une carte empilée sur mobile (≤ 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .forebet-table thead { display: none; }
    .forebet-table,
    .forebet-table tbody { display: block; width: 100%; }
    .forebet-table tbody {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    /* Chaque match = une carte : grille de 3 colonnes */
    .clickable-match-row {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 14px 10px;
        background: var(--bg-card-solid);
        border: 1.5px solid var(--border-light);
        border-radius: 16px;
        padding: 16px;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
    }
    .clickable-match-row.row-won { border-left: 4px solid var(--accent-green); }
    .clickable-match-row.row-lost { border-left: 4px solid #ef4444; }

    .forebet-table td {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        text-align: center;
        padding: 0 !important;
        border-bottom: none !important;
    }
    /* Nom des équipes + bouton Parier = pleine largeur */
    .forebet-table td.col-match {
        grid-column: 1 / -1;
        align-items: flex-start;
        text-align: left;
        border-bottom: 1px solid var(--border-light) !important;
        padding-bottom: 12px !important;
        box-shadow: none !important;
        min-width: 0;
    }
    .col-bet { grid-column: 1 / -1; }

    /* En mode carte, chaque cellule affiche son propre libellé */
    .col-prono::before,
    .col-score-prono::before,
    .col-market::before,
    .col-proba::before,
    .col-cote::before,
    .col-resultat::before,
    .col-bet::before {
        display: block;
    }
}

/* ==========================================================================
   COMBINAISON & TICKET SLIP (LIGHT MODE)
   ========================================================================== */
.combo-panel {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-glass);
}

.combo-explainer-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(59, 130, 246, 0.05));
    border: 1.5px solid rgba(16, 185, 129, 0.25);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.06);
    backdrop-filter: blur(8px);
}

.cec-icon {
    font-size: 1.8rem;
    background: #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cec-body {
    flex: 1;
}

.cec-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--accent-green-dark);
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}

.cec-text {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.combo-strategies-grid button {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.25s ease !important;
}

.combo-strategies-grid button:hover {
    background: #ffffff !important;
    border-color: var(--accent-indigo) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15) !important;
}

.combo-strategies-grid button:hover span:first-child {
    color: var(--accent-indigo) !important;
}

/* ===== CONSTRUCTEUR SUR-MESURE (Smart Combo) ===== */
.smart-combo-builder {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.06), rgba(99, 102, 241, 0.05));
}
.scb-head { margin-bottom: 16px; }
.scb-title { font-weight: 900; font-size: 1.1rem; color: var(--text-primary); display: block; }
.scb-sub { font-size: 0.78rem; color: var(--text-muted); }
.scb-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}
.scb-group { display: flex; flex-direction: column; gap: 8px; }
.scb-label { font-size: 0.8rem; font-weight: 800; color: var(--text-secondary); }
.scb-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.scb-chip {
    padding: 8px 13px;
    border: 1.5px solid var(--border-light);
    border-radius: 20px;
    background: var(--bg-white, #fff);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.scb-chip:hover { border-color: var(--accent-green); transform: translateY(-1px); }
.scb-chip.active {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    border-color: #2e7d32;
    color: #fff;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.25);
}
.scb-generate-btn {
    margin-top: 18px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #1e3a2a, #2e7d32 60%, #4caf50);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    transition: filter 0.15s, transform 0.1s;
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.28);
}
.scb-generate-btn:hover { filter: brightness(1.08); }
.scb-generate-btn:active { transform: translateY(1px); }
.scb-generate-btn:disabled { opacity: 0.65; cursor: default; }
.scb-hint {
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.45;
}
.combo-quick-title {
    margin-top: 26px;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-secondary);
}

/* ===== VOIR LES COMBINAISONS (track record) ===== */
.combo-top-actions { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.voir-combos-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, #b45309 0%, #f59e0b 55%, #fbbf24 100%);
    color: #fff; border: none; border-radius: 24px;
    padding: 11px 20px; font-family: var(--font-primary); font-size: 0.9rem; font-weight: 800;
    letter-spacing: .01em; cursor: pointer;
    transition: transform .15s cubic-bezier(.4,0,.2,1), box-shadow .15s, filter .15s;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.32);
}
.voir-combos-btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 9px 24px rgba(245, 158, 11, 0.42); }
.voir-combos-btn:active { transform: translateY(0); }
.voir-combos-btn .vc-sub { font-weight: 600; opacity: .82; font-size: 0.76rem; }
@media (max-width: 560px) {
    .combo-top-actions { justify-content: stretch; }
    .voir-combos-btn { width: 100%; justify-content: center; }
    .voir-combos-btn .vc-sub { display: none; }
}

#combos-view { margin-top: 8px; }
.cv-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.cv-title { font-size: 1.1rem; font-weight: 900; color: var(--text-primary); }
.cv-summary { display: flex; gap: 8px; flex-wrap: wrap; }
.cv-stat { font-size: 0.82rem; font-weight: 800; padding: 4px 10px; border-radius: 20px; background: var(--bg-body); }
.cv-stat.won { color: var(--accent-green-dark); background: rgba(16,185,129,0.1); }
.cv-stat.lost { color: #c0392b; background: rgba(239,68,68,0.1); }
.cv-stat.pending { color: var(--accent-gold-dark); background: rgba(245,158,11,0.12); }
.cv-stat.rate { color: #fff; background: linear-gradient(135deg,#2e7d32,#4caf50); }

.cv-controls { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cv-filters, .cv-sorts { display: flex; gap: 6px; flex-wrap: wrap; }
.cv-chip { padding: 7px 12px; border: 1.5px solid var(--border-light); border-radius: 20px; background: #ffffff; color: var(--text-secondary); font-family: var(--font-primary); font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: all .15s; }
.cv-chip:hover { border-color: var(--accent-green); }
.cv-chip.active { background: var(--text-primary); border-color: var(--text-primary); color: #fff; }

.cv-card { background: #fff; border: 1px solid var(--border-light); border-left: 4px solid #94a3b8; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow-soft); }
.cv-card.won { border-left-color: var(--accent-green); }
.cv-card.lost { border-left-color: #ef4444; }
.cv-card.pending { border-left-color: var(--accent-gold); }
.cv-card-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.cv-badge { font-size: 0.78rem; font-weight: 900; padding: 3px 10px; border-radius: 20px; }
.cv-badge.won { color: var(--accent-green-dark); background: rgba(16,185,129,0.12); }
.cv-badge.lost { color: #c0392b; background: rgba(239,68,68,0.1); }
.cv-badge.pending { color: var(--accent-gold-dark); background: rgba(245,158,11,0.14); }
.cv-legcount { font-size: 0.78rem; color: var(--text-muted); font-weight: 700; margin-left: 4px; }
.cv-card-meta { font-size: 0.76rem; color: var(--text-muted); font-weight: 600; }
.cv-card-meta b { color: var(--text-primary); }
.cv-legs { display: flex; flex-direction: column; gap: 4px; }
.cv-leg { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; padding: 5px 8px; border-radius: 6px; background: var(--bg-body); }
.cv-leg.won { background: rgba(16,185,129,0.06); }
.cv-leg.lost { background: rgba(239,68,68,0.06); }
.cv-leg-ic { flex-shrink: 0; }
.cv-leg-match { flex: 1; font-weight: 600; color: var(--text-secondary); min-width: 0; }
.cv-leg-score { font-weight: 800; color: var(--text-primary); }
.cv-leg-pick { color: var(--accent-green-dark); font-weight: 700; white-space: nowrap; }

/* Realistic Ticket Slip in Light Mode */
.bet-slip-ticket {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-top: 5px solid var(--accent-gold);
    border-radius: var(--radius);
    padding: 24px;
    color: var(--text-primary);
    max-width: 480px;
    margin: 20px auto 0;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
    position: relative;
}

.bet-slip-ticket::after {
    content: '';
    position: absolute;
    bottom: -8px; left: 0; right: 0;
    height: 8px;
    background-image: linear-gradient(-45deg, transparent 4px, #ffffff 4px), linear-gradient(45deg, transparent 4px, #ffffff 4px);
    background-size: 8px 8px;
}

.ticket-header {
    text-align: center;
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.ticket-brand {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--accent-gold-dark);
    letter-spacing: 0.05em;
}

.ticket-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.ticket-match-row {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.ticket-match-names {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.ticket-match-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.76rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.ticket-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ticket-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.ticket-summary-row.total-row {
    border-top: 1px dashed #cbd5e1;
    padding-top: 10px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent-gold-dark);
}

.ticket-ai-reasoning {
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    padding: 14px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #3730a3;
    margin-top: 16px;
}

/* ==========================================================================
   MODAL OVERLAY & CONTENT (LIGHT MODE)
   ========================================================================== */
.modal-overlay {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-top: 5px solid var(--accent-green);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.modal-close {
    color: var(--text-muted);
    font-size: 1.4rem;
    transition: color 0.15s;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* H2H progress meters */
.progress-container {
    background: #e2e8f0;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 10px;
}

/* Color definitions */
.bg-green { background: var(--accent-green); }
.bg-red { background: var(--accent-red); }
.bg-gold { background: var(--accent-gold); }

/* Buttons global */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-green-dark), var(--accent-green));
    border: none;
    color: #ffffff;
    font-weight: 800;
    font-family: var(--font-primary);
    padding: 10px 22px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid var(--border-light) !important;
    color: var(--text-secondary) !important;
    font-weight: 700 !important;
    font-family: var(--font-primary) !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02) !important;
}

.btn-secondary:hover {
    background: #ffffff !important;
    color: var(--text-primary) !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
}


/* ==========================================================================
   COMPOSANTS RESTAURÉS — styles supprimés par la refonte du thème (Live, cartes
   de marché, H2H, spinner, empty-state, pills de confiance, groupes pays...).
   Adaptés aux variables du nouveau thème.
   ========================================================================== */
.sidebar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

.tab-count {
    background: #e9ecef;
    color: var(--text-muted);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: 6px;
}

.sidebar-link.active .tab-count { background: var(--accent-green); color: #fff; }

.country-group { margin-bottom: 2px; }

.country-toggle {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    text-align: left;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
}

.country-toggle:hover { background: var(--bg-body); }

.country-toggle::before { content: "▸ "; color: var(--text-muted); }

.country-toggle.open::before { content: "▾ "; color: var(--accent-green); }

.country-leagues { padding: 2px 0 4px; display: flex; flex-direction: column; gap: 1px; }

.country-leagues[hidden] { display: none; }

/* "En direct" rete rouj menm lè li pa aktif — se yon estati an tan reyèl,
   pa yon senp peryòd tan, li merite atire je a tout tan. */
.live-range-btn {
    border-color: rgba(211,47,47,0.35);
    color: var(--accent-red);
}

.live-range-btn:hover { border-color: var(--accent-red); color: var(--accent-red); }

.live-range-btn.active {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #fff;
    box-shadow: 0 2px 8px rgba(211,47,47,0.35);
}

.live-range-btn .live-count-badge { margin-left: 4px; }

.forebet-circle-badge.pred-placeholder { background: #d8dde1; color: var(--text-muted); }

.forebet-circle-badge.conf-high { background: var(--accent-green); }

.forebet-circle-badge.conf-mid { background: var(--accent-gold); color: #5d4a00; }

.forebet-circle-badge.conf-low { background: var(--accent-red); }

/* Grille des 9 marchés — réutilisée dans le modal détail match */
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.market-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.market-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.market-card-conf.conf-high {
    background: var(--accent-green);
}

.market-card-conf.conf-mid {
    background: var(--accent-gold);
    color: #5d4a00;
}

.market-card-conf.conf-low {
    background: var(--accent-red);
}

.match-list { display: flex; flex-direction: column; gap: 10px; }

.live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.live-grid .match-card { flex-direction: column; align-items: stretch; height: 100%; }

.live-grid .match-card:hover { box-shadow: var(--shadow-card-hover); border-left-color: var(--accent-red); }

.live-freshness { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    background: #ffffff;
    border-radius: var(--radius);
    border: 1px dashed var(--border-light);
}

.match-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-left: 4px solid transparent;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.match-card:hover { box-shadow: var(--shadow-card-hover); border-left-color: var(--accent-green); }

.match-info { flex: 1; min-width: 200px; }

.match-teams { font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--text-primary); }

.match-meta { color: var(--text-muted); font-size: 0.8rem; margin-top: 3px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.live-card { border-left-color: var(--accent-red); }

.live-score {
    background: #1e2430;
    color: #fff;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.9rem;
}

.live-minute { color: var(--accent-red); font-weight: 800; font-size: 0.82rem; }

.live-state { color: var(--accent-red); font-weight: 700; }

.last-goal { color: var(--accent-gold); font-weight: 700; }

.live-stats { color: var(--text-secondary); font-weight: 600; }

.btn-predict {
    background: var(--accent-green);
    color: #fff;
    border: none;
    padding: 9px 16px;
    border-radius: 7px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
}

.btn-predict:hover { background: var(--accent-green-dark); }

.btn-predict:disabled { opacity: 0.6; cursor: wait; }

.prediction-panel { width: 100%; margin-top: 4px; }

.prediction-panel[hidden] { display: none; }

.pred-loading, .pred-empty { color: var(--text-muted); font-size: 0.85rem; padding: 6px 0; }

.pred-result {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #eef7ee;
    border: 1px solid var(--accent-green);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
}

.pred-market { color: var(--text-secondary); }

.pred-pick { font-weight: 800; color: var(--text-primary); }

.pred-odds { color: var(--text-muted); font-size: 0.8rem; }

.pred-conf {
    margin-left: auto;
    border-radius: 999px;
    padding: 4px 12px;
    font-weight: 800;
    font-size: 0.85rem;
    color: #fff;
}

.conf-high { background: var(--accent-green); }

.conf-mid  { background: var(--accent-gold); color: #5d4a00; }

.conf-low  { background: var(--accent-red); }

.combo-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }

.combo-form label { display: flex; flex-direction: column; gap: 5px; font-size: 0.8rem; color: var(--text-secondary); font-weight: 600; }

.combo-form input, .combo-form select {
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 0.9rem;
    min-width: 130px;
}

.combo-summary {
    background: #1e2430;
    color: #fff;
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-weight: 600;
}

.combo-summary-prob { color: var(--accent-green); font-size: 1.2rem; font-weight: 800; }

.combo-warning {
    background: #fff8e6;
    border: 1px solid var(--accent-gold);
    color: #8a6200;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.combo-warning.info { border-color: var(--accent-green); color: var(--accent-green-dark); background: #eef7ee; }

.combo-risk-note { color: var(--accent-red); font-size: 0.8rem; margin-bottom: 12px; }

.combo-leg-card { margin-bottom: 8px; }

@media (max-width: 600px) {
    .topbar-inner { flex-direction: column; align-items: flex-start; }
    .pred-conf { margin-left: 0; }
}

/* ===== SOFASCORE H2H CUSTOM STYLES ===== */
.sofa-h2h-section {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-soft);
}

.sofa-h2h-summary {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.sofa-h2h-bar {
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
    background: #e9ecef;
}

.sofa-h2h-bar > div {
    height: 100%;
    transition: width 0.3s ease;
}

/* ===== CELL SPINNER LOADER ===== */
.cell-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-green);
    animation: cellSpin 1s linear infinite;
    vertical-align: middle;
}
@keyframes cellSpin { to { transform: rotate(360deg); } }

/* ==========================================================================
   MODE APPLICATION MOBILE — tirwa championnats (drawer) + barre de nav fiks
   ========================================================================== */
.mobile-tabbar,
.mobile-menu-btn,
.btn-choose-league-mobile,
.sidebar-backdrop,
.sidebar-mobile-header {
    display: none;
}

@media (max-width: 768px) {
    /* Bouton nan header prensipal la */
    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        border: 1px solid var(--border-light);
        border-radius: 20px;
        background: var(--bg-white);
        font-weight: 700;
        font-size: 0.78rem;
        color: var(--text-primary);
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
        transition: background-color 0.2s, transform 0.15s;
    }
    .mobile-menu-btn:active {
        transform: scale(0.96);
    }
    .mobile-menu-btn .mm-icon {
        font-size: 0.95rem;
    }

    /* Bouton nan tèt vi match yo */
    .btn-choose-league-mobile {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 7px 12px;
        border: 1px solid var(--accent-green);
        border-radius: 8px;
        background: #eef7ee;
        color: var(--accent-green-dark);
        font-weight: 700;
        font-size: 0.8rem;
        cursor: pointer;
        transition: all 0.2s;
        box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    }
    .btn-choose-league-mobile:active {
        transform: scale(0.97);
    }

    /* Backdrop nwa ak flou dèyè tirwa mobil la */
    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .sidebar-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Tèt tirwa mobil la */
    .sidebar-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 14px;
        margin-bottom: 14px;
        border-bottom: 2px solid var(--border-light);
    }
    .sidebar-mobile-header .smh-title {
        font-weight: 800;
        font-size: 1.05rem;
        color: var(--text-primary);
    }
    .sidebar-mobile-header .smh-close {
        background: var(--bg-card);
        border: 1px solid var(--border-light);
        border-radius: 50%;
        width: 34px;
        height: 34px;
        font-weight: 800;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        color: var(--text-secondary);
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    }

    /* Transformasyon sidebar an an Meni Tirwa (Drawer) sou mobil */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 86% !important;
        max-width: 340px !important;
        height: 100vh !important;
        z-index: 999 !important;
        background: #ffffff !important;
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.25) !important;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        padding: 16px !important;
        border-right: 1px solid var(--border-light);
        display: flex !important;
    }
    .sidebar.open {
        transform: translateX(0) !important;
    }

    /* Anpeche scrolle nan fon lè meni tirwa a louvri */
    body.mobile-drawer-open {
        overflow: hidden !important;
    }

    /* App Shell responsive — 1 seul colonne propre sur mobile */
    .app-shell {
        grid-template-columns: 1fr !important;
        margin: 12px auto !important;
        padding: 0 12px 20px !important;
        gap: 12px !important;
    }
    .app-shell.full-width .sidebar {
        display: flex !important; /* Rete disponib nan tirwa a menm si vi an chanje */
    }

    /* Mobile tabbar fixed en bas */
    .mobile-tabbar {
        display: flex;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 200;
        background: #1e1e1e;
        border-top: 2px solid #d32f2f;
        box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.35);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .mtab {
        flex: 1;
        background: none;
        border: none;
        color: #9fb0bd;
        font-family: var(--font-primary);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 8px 2px 9px;
        cursor: pointer;
        font-size: 0.62rem;
        font-weight: 700;
        transition: color 0.15s;
        min-height: 52px;
    }
    .mtab-ic { font-size: 1.25rem; line-height: 1; transition: transform 0.15s; }
    .mtab.active { color: #ffffff; }
    .mtab.active .mtab-ic { transform: translateY(-2px); filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.55)); }
    .mtab.active .mtab-lbl { color: var(--accent-green); }

    /* Espas anba pou tabbar fiks la pa kouvri kontni an */
    body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }

    /* Header pi konpak — logo santre nèt */
    .top-header {
        padding: 10px 14px;
        padding-top: calc(10px + env(safe-area-inset-top, 0px));
    }
    .slogan { display: none !important; }
    .main-nav { display: none !important; }
    .header-left,
    .header-right {
        display: none !important;
    }
    .header-inner {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    .header-center {
        display: flex;
        justify-content: center;
        width: 100%;
    }
    .site-logo {
        height: 36px;
        margin: 0 auto;
    }

    /* Barres promo / info : empilées verticalement l'une sous l'autre sur mobile */
    .promo-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding: 10px 12px !important;
        overflow: visible !important;
    }
    .promo-card {
        max-width: 100% !important;
        width: 100% !important;
        flex: 1 1 100% !important;
        box-sizing: border-box !important;
        padding: 8px 12px !important;
    }
    .promo-content {
        white-space: normal !important;
        word-break: break-word !important;
        overflow: visible !important;
        font-size: 0.8rem !important;
        line-height: 1.35 !important;
    }
    .promo-ticker {
        width: 100% !important;
        flex: 1 1 100% !important;
        margin-top: 2px !important;
    }

    .date-range-bar {
        padding: 10px 14px !important;
        gap: 8px !important;
        scroll-padding: 0 14px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
    }
    .date-range-btn {
        padding: 7px 14px !important;
        font-size: 0.78rem !important;
    }
}

/* Mode « installé » (standalone) — un peu plus d'air en haut pour l'encoche */
@media (display-mode: standalone) {
    .top-header { padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
}
