/* ==========================================================
   APEX SPORT — Design tokens & Global Config
   Direction : HUD de données sportives / Terminal analytique IA.
   ========================================================== */

:root {
    /* Couleurs */
    --bg:        #070B14;
    --bg-soft:   #0B1120;
    --surface:   #121A2C;
    --surface-2: #182238;
    --border:    rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text:      #E8ECF6;
    --text-dim:  #8C97AF;
    --text-faint:#5C6783;

    --cyan:   #00E5FF;
    --violet: #7B5CFF;
    --rose:   #FF4D6D;
    --mint:   #3DFFB0;
    --amber:  #FFD23F;

    /* Thème Avancé & Effet Cockpit (Glassmorphism) */
    --bg-card: rgba(18, 24, 36, 0.75);
    --border-glass: rgba(30, 41, 59, 0.7);

    /* Typographie */
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-body:    'Inter', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;

    --radius: 16px;
    --radius-sm: 10px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { 
        animation-duration: 0.001ms !important; 
        animation-iteration-count: 1 !important; 
        transition-duration: 0.001ms !important; 
    }
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
    border-radius: 4px;
}

h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; }

/* ---------------- Fond animé : grille + halos ---------------- */

.bg-grid {
    position: fixed; inset: 0; z-index: -2;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 40%, transparent 90%);
}

.bg-glow {
    position: fixed; z-index: -1; border-radius: 50%;
    filter: blur(90px); opacity: 0.28; pointer-events: none;
    animation: drift 18s ease-in-out infinite alternate;
}
.bg-glow--cyan   { width: 520px; height: 520px; background: var(--cyan);   top: -160px; left: -120px; }
.bg-glow--violet { width: 480px; height: 480px; background: var(--violet); top: 280px; right: -180px; animation-delay: -6s; }

@keyframes drift {
    from { transform: translate(0,0) scale(1); }
    to   { transform: translate(40px, 30px) scale(1.08); }
}

/* ---------------------- Topbar ---------------------- */

.topbar {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(7, 11, 20, 0.7);
    border-bottom: 1px solid var(--border);
}
.topbar__inner {
    max-width: 1240px; margin: 0 auto; padding: 14px 24px;
    display: flex; align-items: center; gap: 20px;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--cyan); flex-shrink: 0; }
.brand__text { font-family: var(--font-display); font-size: 17px; letter-spacing: 0.02em; color: var(--text); }
.brand__text strong { color: var(--cyan); font-weight: 700; }

.back-link { color: var(--text-dim); font-size: 14px; transition: color .2s; margin-left: auto; }
.back-link:hover { color: var(--cyan); }

.league-nav {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
    flex: 1;
}
.league-nav::-webkit-scrollbar { display: none; }

.league-chip {
    flex-shrink: 0;
    background: var(--surface); color: var(--text-dim);
    border: 1px solid var(--border); border-radius: 999px;
    padding: 7px 14px; font-size: 13px; font-family: var(--font-body); font-weight: 500;
    cursor: pointer; transition: all .2s;
    white-space: nowrap;
}
.league-chip:hover { border-color: var(--border-strong); color: var(--text); }
.league-chip.is-active { background: var(--cyan); color: #04141A; border-color: var(--cyan); font-weight: 600; }

.topbar__status {
    flex-shrink: 0; font-family: var(--font-mono); font-size: 13px; color: var(--text-dim);
    display: flex; align-items: center; gap: 8px;
}

.pulse-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--rose);
    box-shadow: 0 0 0 0 rgba(255,77,109,0.6);
    animation: pulse 1.6s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255,77,109,0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(255,77,109,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,77,109,0); }
}

/* ---------------------- Layout shell ---------------------- */

.shell { max-width: 1240px; margin: 0 auto; padding: 0 24px 80px; }
.shell--match { padding-top: 32px; }

/* ---------------------- Hero ---------------------- */

.hero {
    display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 40px;
    align-items: center;
    padding: 64px 0 40px;
}
.eyebrow {
    font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--cyan); margin: 0 0 14px;
}
.hero h1 {
    font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; font-weight: 700; color: var(--text);
}
.text-grad {
    background: linear-gradient(120deg, var(--cyan), var(--violet));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub { color: var(--text-dim); font-size: 16px; line-height: 1.6; max-width: 560px; margin-top: 18px; }

.hero__radar {
    aspect-ratio: 1; border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(0,229,255,0.10), transparent 60%),
        conic-gradient(from -90deg, var(--cyan) 0deg 130deg, var(--violet) 130deg 230deg, var(--rose) 230deg 360deg);
    position: relative;
    box-shadow: inset 0 0 60px rgba(0,0,0,0.55), 0 0 60px rgba(0,229,255,0.08);
    animation: spin 26s linear infinite;
}
.hero__radar::before {
    content: ''; position: absolute; inset: 14%; border-radius: 50%;
    background: var(--bg-soft); border: 1px solid var(--border-strong);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------ Communauté Telegram & WhatsApp ------------------ */

.community-channels {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px auto;
    max-width: 1240px;
    padding: 0 24px;
    flex-wrap: wrap;
}
.btn-community {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-community:hover { transform: translateY(-2px); }

.btn-telegram {
    background: #1d97f2;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(29, 151, 242, 0.2);
}
.btn-telegram:hover {
    background: #1485dc;
    box-shadow: 0 6px 20px rgba(29, 151, 242, 0.4);
}
.btn-whatsapp {
    background: #25d366;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}
.btn-whatsapp:hover {
    background: #1ebd58;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* ---------------------- Ticker (matchs en direct) ---------------------- */

.ticker-wrap { margin-bottom: 28px; }
.ticker-label {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
    color: var(--rose); margin-bottom: 10px;
}
.ticker {
    display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin;
}
.ticker-item {
    flex-shrink: 0; min-width: 230px;
    background: var(--surface); border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); padding: 12px 16px; cursor: pointer;
    transition: border-color .2s, transform .2s;
}
.ticker-item:hover { border-color: var(--cyan); transform: translateY(-2px); }
.ticker-item__league { font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); margin-bottom: 6px; }
.ticker-item__row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 3px; }
.ticker-item__row span:last-child { font-family: var(--font-mono); font-weight: 700; color: var(--cyan); }
.ticker-item__minute { font-family: var(--font-mono); font-size: 11px; color: var(--rose); margin-top: 6px; }

/* ---------------------- Tabs & Filtres Temporels ---------------------- */

.tabs { display: flex; gap: 10px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.tab {
    background: none; border: none; color: var(--text-dim);
    font-family: var(--font-display); font-size: 14px; font-weight: 600;
    padding: 10px 18px; cursor: pointer; position: relative; display: flex; align-items: center; gap: 8px;
    transition: color .2s;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); }
.tab.is-active::after {
    content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--violet));
    border-radius: 2px;
}
.tab__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); }
.tab__dot--live { background: var(--rose); animation: pulse 1.6s infinite; }

.time-filter-container {
    max-width: 1240px;
    margin: -10px auto 25px;
    padding: 0;
    transition: all 0.3s ease;
}
.time-subgrid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    animation: fadeInSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.chip-time {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    padding: 8px 16px;
    border-radius: 20px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.chip-time:hover {
    background: rgba(30, 41, 59, 0.8);
    color: #fff;
    border-color: rgba(0, 229, 255, 0.3);
}
.chip-time.is-active {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(123, 92, 255, 0.15));
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.15);
    font-weight: 600;
}

/* ------------- Cyber Match Cards (Forçage Effet Cockpit) ------------- */

.panel { min-height: 200px; }
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.match-card, 
#matchGrid article, 
.match-grid > article {
    background: var(--bg-card) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid var(--border-glass) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease !important;
    clip-path: none !important;
}

.match-card:hover, 
#matchGrid article:hover, 
.match-grid > article:hover {
    transform: translateY(-5px) scale(1.01) !important;
    box-shadow: 0 12px 40px 0 rgba(0, 229, 255, 0.25) !important;
    border-color: rgba(0, 229, 255, 0.6) !important;
}

/* Ligne néon supérieure réactive */
.match-card::before, 
#matchGrid article::before, 
.match-grid > article::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important; left: 0 !important; width: 100% !important; height: 3px !important;
    background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}
.match-card:hover::before, 
#matchGrid article:hover::before, 
.match-grid > article:hover::before {
    opacity: 1 !important;
}

/* Structure interne des cartes */
.match-card__head { display: flex; justify-content: space-between; align-items: center; }
.match-card__league { font-family: var(--font-mono); font-size: 11px; color: var(--cyan) !important; font-weight: 600; letter-spacing: 0.06em; }
.match-card__status {
    font-family: var(--font-mono); font-size: 11px; padding: 3px 9px; border-radius: 999px;
    border: 1px solid var(--border-strong); color: var(--text-dim);
}
.match-card__status.is-live { color: var(--rose); border-color: var(--rose); }
.match-card__status.is-finished { color: var(--mint); border-color: rgba(61,255,176,0.3); }

.match-card__body { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.team__logo { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 0 6px rgba(0,229,255,0.15)); }
.team__name { font-size: 12.5px; color: var(--text); line-height: 1.25; }

.match-card__score { font-family: var(--font-mono); font-size: 22px; font-weight: 700; display: flex; gap: 6px; align-items: center; color: var(--text); }
.score { font-family: var(--font-mono) !important; font-weight: 700 !important; color: #fff !important; font-size: 1.4rem !important; }
.score-sep { color: var(--text-faint); font-size: 14px; }

.match-card__foot {
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid var(--border); padding-top: 10px;
    font-size: 12px; color: var(--text-dim);
}
.match-card__cta { color: var(--cyan); font-weight: 600; }

/* States & Loaders */
.loader {
    display: flex; align-items: center; gap: 10px; color: var(--text-dim);
    font-family: var(--font-mono); font-size: 13px; padding: 40px 0; justify-content: center;
}
.loader__ring {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid var(--border-strong); border-top-color: var(--cyan);
    animation: spin 0.9s linear infinite;
}
.empty-state {
    text-align: center; padding: 40px 20px; color: #9ca3af;
    background: #121824; border-radius: 8px; border: 1px dashed #1e293b; font-size: 1.05rem;
}
.error-state { text-align: center; color: var(--rose); padding: 40px 0; font-size: 14px; }

/* ---------------------- Standings (Classement) ---------------------- */

.standings-section { margin-top: 56px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.select-ghost {
    background: var(--surface); color: var(--text); border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); padding: 8px 12px; font-family: var(--font-body); font-size: 13px;
}
.standings-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.standings-table th {
    text-align: left; color: var(--text-faint); font-family: var(--font-mono); font-weight: 500;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.standings-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.standings-table tr:hover td { background: rgba(255,255,255,0.02); }
.standings-table td:first-child, .standings-table th:first-child { text-align: center; width: 36px; }
.team-cell { display: flex; align-items: center; gap: 10px; }
.team-cell img { width: 20px; height: 20px; object-fit: contain; }
.std-group-title { font-family: var(--font-mono); color: var(--violet); font-size: 12px; margin: 22px 0 8px; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------------------- Page Détail Match ---------------------- */

.scoreboard {
    background: linear-gradient(180deg, var(--surface), var(--bg-soft));
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    padding: 28px 24px 22px; margin-bottom: 28px; position: relative; overflow: hidden;
}
.scoreboard__before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 50% -20%, rgba(123,92,255,0.18), transparent 60%);
    pointer-events: none;
}
.scoreboard__league {
    text-align: center; font-family: var(--font-mono); font-size: 12px; color: var(--violet);
    letter-spacing: 0.08em; margin-bottom: 18px; text-transform: uppercase;
}
.scoreboard__main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.sb-team { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.sb-team__logo { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(0,229,255,0.2)); }
.sb-team__name { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.sb-score { text-align: center; }
.sb-score__numbers { font-family: var(--font-mono); font-size: 48px; font-weight: 700; letter-spacing: 0.02em; }
.sb-score__sep { color: var(--text-faint); padding: 0 8px; }
.sb-score__status { margin-top: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--rose); text-transform: uppercase; letter-spacing: 0.06em; }
.scoreboard__meta { display: flex; justify-content: center; gap: 18px; margin-top: 18px; font-size: 12.5px; color: var(--text-dim); }

.match-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
.timeline-card, .prediction-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.timeline-card h2, .prediction-card h2 { font-size: 17px; margin-bottom: 18px; }
.prediction-card h3 { font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; margin: 22px 0 12px; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 27px; top: 4px; bottom: 4px; width: 1px; background: var(--border-strong); }
.timeline-item { display: grid; grid-template-columns: 46px auto 1fr; gap: 12px; align-items: start; padding: 10px 0; position: relative; }
.timeline-item__minute { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); text-align: right; padding-top: 3px; }
.timeline-item__icon { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-soft); border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-size: 13px; z-index: 1; }
.timeline-item.is-goal .timeline-item__icon { border-color: var(--mint); box-shadow: 0 0 12px rgba(61,255,176,0.35); }
.timeline-item__text { font-size: 13.5px; line-height: 1.5; padding-top: 3px; }
.timeline-item__team { color: var(--text-faint); font-size: 11.5px; display: block; margin-top: 2px; }

.radar-gauge { width: 168px; height: 168px; margin: 0 auto 18px; border-radius: 50%; position: relative; }
.radar-gauge::after { content: ''; position: absolute; inset: 18px; border-radius: 50%; background: var(--bg-soft); border: 1px solid var(--border-strong); }
.radar-gauge__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--font-mono); z-index: 2; }
.radar-gauge__score { font-size: 22px; font-weight: 700; color: var(--text); }
.radar-gauge__label { font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

.pred-legend { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pred-legend__item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); }
.pred-legend__item strong { margin-left: auto; font-family: var(--font-mono); color: var(--text); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot--home { background: var(--cyan); }
.dot--draw { background: var(--text-faint); }
.dot--away { background: var(--violet); }
.advice { background: rgba(123,92,255,0.1); border: 1px solid rgba(123,92,255,0.3); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; color: var(--text); }

.compare-bar { margin-bottom: 12px; }
.compare-bar__label { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-faint); margin-bottom: 4px; font-family: var(--font-mono); }
.compare-bar__track { display: flex; height: 6px; border-radius: 4px; overflow: hidden; background: var(--bg-soft); }
.compare-bar__home { background: var(--cyan); }
.compare-bar__away { background: var(--violet); }
.h2h-summary { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

/* ---------------------- Skeleton Loader ---------------------- */

.skeleton-card { background: #121824; border-radius: 8px; padding: 20px; margin-bottom: 15px; position: relative; overflow: hidden; }
.skeleton-line { height: 15px; background: #1e293b; margin-bottom: 10px; border-radius: 4px; animation: skeleton-blink 1.5s infinite ease-in-out; }
.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 70%; }

@keyframes skeleton-blink {
    0% { opacity: 0.6; }
    50% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

/* ---------------------- Footer Structuré ---------------------- */

.site-footer { background: #121824; border-top: 1px solid #1e293b; padding: 40px 24px 20px; margin-top: 60px; }
.footer-content { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; padding-bottom: 30px; border-bottom: 1px solid #1e293b; }
.footer-section h3 { color: #fff; font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 15px; }
.footer-section p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.5; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--text-dim); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--cyan); }
.footer-bottom { max-width: 1240px; margin: 20px auto 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; font-size: 0.85rem; color: var(--text-faint); }

/* ------------------ Classes Utilitaires ------------------ */

.is-hidden { display: none !important; }

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   RESPONSIVE UNIVERSEL MOBILE & TABLETTE
   ============================================================ */

@media (max-width: 991px) {
    .time-filter-container { padding: 0 10px; }
    .chip-time { padding: 6px 12px; font-size: 0.78rem; }
}

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
    .hero__radar { width: 200px; margin: 0 auto; }
    .match-layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .topbar__inner { flex-wrap: wrap; }
    .topbar__status { order: 3; width: 100%; justify-content: center; padding-top: 8px; border-top: 1px solid var(--border); }
    .scoreboard__main { grid-template-columns: 1fr; text-align: center; }
    .sb-score__numbers { font-size: 38px; }
    .match-card__body { grid-template-columns: 1fr auto 1fr; }
}
/* ==========================================================================
   CORRECTION APEX SPORT — DÉBORDEMENT ET SCROLL TABLEAU SUR MOBILE
   ========================================================================== */

/* Conteneur pour forcer le débordement interne au tableau uniquement */
.table-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch; /* Défilement fluide sur iOS */
    margin-bottom: 1.25rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.15);
}

/* Barre de défilement discrète et stylisée pour le tableau */
.table-container::-webkit-scrollbar {
    height: 4px;
}
.table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
.table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Ajustements ciblés pour les écrans mobiles étroits (< 480px) */
@media (max-width: 480px) {
    .standings-table {
        width: 100%;
        min-width: 320px; /* Assure une structure minimale sans s'écraser */
    }

    .standings-table th, 
    .standings-table td {
        padding: 8px 5px !important; /* Compresse les cellules */
        font-size: 0.82rem !important; /* Réduit légèrement la taille du texte */
    }

    /* Gestion stricte de la taille de la cellule équipe */
    .team-cell {
        max-width: 105px !important;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    .team-cell img {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    .team-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; /* Coupe avec "..." si le nom est trop long */
        display: block;
    }
}