/* ============================================================
   COUPE DU MONDE 2026 — FEUILLE DE STYLE
   Design : nuit de stade · or trophée · rouges des pays hôtes
   ============================================================ */

:root {
    --ink:        #06081A;
    --ink-2:      #0E1330;
    --ink-3:      #1A2147;
    --ink-4:      #232C5B;
    --gold:       #E7B43A;
    --gold-warm:  #F4D88A;
    --gold-deep:  #9C7720;
    --crimson:    #DA1A32;
    --turf:       #00B574;
    --bone:       #F5F2EA;
    --bone-dim:   rgba(245, 242, 234, 0.55);
    --bone-faint: rgba(245, 242, 234, 0.25);
    --line:       rgba(232, 179, 57, 0.18);
    --line-strong:rgba(232, 179, 57, 0.4);

    --font-display: 'Archivo Black', 'Arial Black', sans-serif;
    --font-body:    'Inter', system-ui, -apple-system, sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, monospace;

    --shadow-card: 0 10px 30px -10px rgba(0,0,0,0.5),
                   0 2px 4px rgba(0,0,0,0.2);
    --shadow-gold: 0 0 30px -5px rgba(231,180,58,0.4);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--ink);
    color: var(--bone);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* ============================================================
   HÉROS
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    padding: 28px 6vw 70px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 80% -10%, rgba(218, 26, 50, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 10% 80%, rgba(0, 181, 116, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 50%, var(--ink-2) 0%, var(--ink) 80%);
}

.hero__atmosphere {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(231,180,58,0.07), transparent 8%),
        radial-gradient(circle at 65% 20%, rgba(231,180,58,0.05), transparent 6%),
        radial-gradient(circle at 85% 75%, rgba(231,180,58,0.06), transparent 9%),
        radial-gradient(circle at 30% 80%, rgba(231,180,58,0.04), transparent 7%);
    pointer-events: none;
}

/* --- Navigation haute --- */
.topnav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 60px;
    z-index: 5;
}

.topnav__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    letter-spacing: 0.08em;
    font-size: 14px;
    text-transform: uppercase;
}

.trophy-mark {
    display: inline-block;
    color: var(--gold);
    font-size: 18px;
    transform: translateY(-1px);
}

.topnav__links {
    display: flex;
    gap: 28px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bone-dim);
}

.topnav__links a {
    transition: color 0.2s;
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
}

.topnav__links a:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* --- Contenu héros --- */
.hero__inner {
    position: relative;
    z-index: 2;
    max-width: 1300px;
    margin: 0 auto;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(218, 26, 50, 0.12);
    border: 1px solid rgba(218, 26, 50, 0.3);
    border-radius: 100px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 40px;
}

.dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--crimson);
}

.dot--live {
    box-shadow: 0 0 0 0 rgba(218, 26, 50, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0   rgba(218, 26, 50, 0.6); }
    70%  { box-shadow: 0 0 0 12px rgba(218, 26, 50, 0); }
    100% { box-shadow: 0 0 0 0   rgba(218, 26, 50, 0); }
}

/* --- Titre du héros, traitement éditorial --- */
.hero__title {
    font-family: var(--font-display);
    font-size: clamp(64px, 13vw, 200px);
    line-height: 0.88;
    margin: 0;
    letter-spacing: -0.02em;
    font-weight: normal;
}

.hero__title-row {
    display: block;
}

.hero__title-row--accent {
    color: var(--gold);
    padding-left: clamp(40px, 8vw, 140px);
    font-style: italic;
    text-shadow: 0 4px 30px rgba(231,180,58,0.3);
}

/* --- Métadonnées sous le titre --- */
.hero__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin: 50px 0;
    padding: 30px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.hero__hosts {
    display: flex;
    gap: 14px;
}

.hero__hosts img {
    width: 48px;
    height: 32px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.hero__dates {
    font-family: var(--font-display);
    font-size: clamp(20px, 3vw, 36px);
    letter-spacing: 0.02em;
    color: var(--bone);
}

.hero__dates-sep {
    color: var(--gold);
    margin: 0 18px;
}

/* --- Statistiques --- */
.hero__stats {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.hero__stats li {
    background: var(--ink);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hero__stats-num {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 48px);
    color: var(--gold);
    line-height: 1;
}

.hero__stats-label {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--bone-dim);
}

/* ============================================================
   EN-TÊTES DE SECTION
   ============================================================ */
.section-header {
    max-width: 1300px;
    margin: 0 auto;
    padding: 80px 6vw 32px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    margin-bottom: 36px;
}

.section-header__title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 60px);
    margin: 0;
    line-height: 1;
    letter-spacing: -0.01em;
    font-weight: normal;
}

.section-header__sub {
    color: var(--bone-dim);
    font-size: 14px;
    letter-spacing: 0.04em;
    max-width: 400px;
    text-align: right;
}

/* ============================================================
   PROCHAINS MATCHS (BANDEAU)
   ============================================================ */
.upcoming {
    background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
}

.upcoming__strip {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 6vw 60px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.up-card {
    background: var(--ink-3);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 18px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
}

.up-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 3px; height: 100%;
    background: var(--gold);
    opacity: 0.7;
}

.up-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
}

.up-card__stage {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 14px;
}

.up-card__teams {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 14px;
}

.up-card__team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.up-card__team:last-child {
    justify-content: flex-end;
    text-align: right;
}

.up-card__team img {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.up-card__team span {
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.up-card__placeholder {
    color: var(--bone-dim);
    font-style: italic;
    font-weight: 500 !important;
    font-size: 12px !important;
}

.up-card__vs {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 13px;
    letter-spacing: 0.1em;
}

.up-card__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(245,242,234,0.08);
    font-size: 11px;
    color: var(--bone-dim);
}

.up-card__date {
    font-family: var(--font-mono);
    color: var(--bone);
}

.up-card__venue {
    display: flex;
    align-items: center;
    gap: 6px;
    text-align: right;
    line-height: 1.3;
}

.up-card__venue img {
    width: 14px;
    height: 10px;
    object-fit: cover;
    border-radius: 1px;
}

.flag-placeholder { opacity: 0.2; }

/* ============================================================
   PHASE DE GROUPES
   ============================================================ */
.groups {
    padding-bottom: 80px;
    background: var(--ink);
}

.groups__grid {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 6vw;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.group-card {
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.group-card:hover {
    border-color: var(--line-strong);
}

.group-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(90deg, var(--ink-3) 0%, var(--ink-2) 100%);
    border-bottom: 1px solid var(--line);
}

.group-card__letter {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--gold);
    line-height: 1;
}

.group-card__title {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--bone-dim);
    font-weight: 600;
}

.group-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.group-table thead {
    background: rgba(0,0,0,0.2);
}

.group-table th {
    text-align: center;
    padding: 8px 6px;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--bone-dim);
}

.group-table th.group-table__team { text-align: left; padding-left: 18px; }
.group-table th.group-table__pos  { width: 28px; }
.group-table th.group-table__pts  { width: 40px; }

.group-table td {
    padding: 10px 6px;
    text-align: center;
    border-top: 1px solid rgba(245,242,234,0.04);
}

.group-table td.group-table__pos {
    color: var(--bone-dim);
    font-family: var(--font-mono);
    font-weight: 700;
}

.group-table td.group-table__team {
    text-align: left;
    padding-left: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-table td.group-table__team img {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 1.5px;
    flex-shrink: 0;
}

.group-table td.group-table__team span {
    font-weight: 600;
    font-size: 13px;
}

.group-table td.group-table__pts {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--bone);
}

.host-tag {
    display: inline-block;
    font-style: normal;
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid var(--gold-deep);
    padding: 1px 5px;
    border-radius: 2px;
    margin-left: 4px;
}

/* Lignes qualifiées */
.group-table tr.is-qualified td {
    background: linear-gradient(90deg, rgba(231,180,58,0.10) 0%, transparent 100%);
}

.group-table tr.is-qualified td.group-table__pos {
    color: var(--gold);
    position: relative;
}

.group-table tr.is-qualified td.group-table__pos::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    width: 3px; height: 60%;
    background: var(--gold);
    transform: translateY(-50%);
}

.group-table tr.is-third-qualified td {
    background: linear-gradient(90deg, rgba(0,181,116,0.07) 0%, transparent 100%);
}

.group-table tr.is-third-qualified td.group-table__pos {
    color: var(--turf);
}

/* ============================================================
   TABLEAU À ÉLIMINATION DIRECTE
   ============================================================ */
.bracket {
    background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
    padding-bottom: 80px;
}

.bracket__scroll {
    overflow-x: auto;
    padding: 0 6vw 30px;
    scrollbar-color: var(--gold-deep) var(--ink-2);
}

.bracket__scroll::-webkit-scrollbar {
    height: 10px;
}
.bracket__scroll::-webkit-scrollbar-track {
    background: var(--ink-2);
}
.bracket__scroll::-webkit-scrollbar-thumb {
    background: var(--gold-deep);
    border-radius: 5px;
}

.bracket__board {
    display: inline-flex;
    gap: 28px;
    align-items: stretch;
    min-width: 100%;
    padding-top: 10px;
}

.bracket__col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 220px;
    flex-shrink: 0;
}

.bracket__col-head {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
    text-align: center;
    line-height: 1.4;
}

/* Espacement croissant : R16 plus aéré que R32, etc. */
.col-r32 { gap: 8px; }
.col-r16 { justify-content: space-around; min-width: 230px; }
.col-qf  { justify-content: space-around; min-width: 240px; }
.col-sf  { justify-content: space-around; min-width: 250px; }
.col-third { justify-content: center; min-width: 260px; }
.col-final { justify-content: center; min-width: 280px; }

/* --- Carte de match (signature : rail or vertical) --- */
.match-card {
    background: var(--ink-3);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 12px 14px 10px 18px;
    position: relative;
    transition: border-color 0.2s, transform 0.2s;
}

.match-card::before {
    content: '';
    position: absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 3px;
    background: var(--gold-deep);
    border-radius: 0 2px 2px 0;
}

/* Rail progressivement plus brillant à mesure qu'on avance */
.col-r32 .match-card::before { background: rgba(231,180,58,0.3); }
.col-r16 .match-card::before { background: rgba(231,180,58,0.5); }
.col-qf  .match-card::before { background: rgba(231,180,58,0.7); }
.col-sf  .match-card::before { background: var(--gold); }
.col-third .match-card::before { background: var(--bone-faint); }
.col-final .match-card::before {
    background: var(--gold);
    box-shadow: 0 0 16px var(--gold);
    width: 4px;
}

.match-card.is-played::before {
    box-shadow: 0 0 12px rgba(231,180,58,0.4);
}

.match-card:hover {
    border-color: var(--line-strong);
}

.match-card--final {
    background: linear-gradient(135deg, var(--ink-3) 0%, var(--ink-4) 100%);
    border-color: var(--gold-deep);
    box-shadow: var(--shadow-gold);
    padding: 18px 18px 14px 22px;
}

.match-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bone-dim);
    margin-bottom: 10px;
}

.match-card__num {
    font-family: var(--font-mono);
    color: var(--gold);
    font-weight: 700;
}

.match-card__date {
    font-family: var(--font-mono);
}

.match-card__rows {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.match-card__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(245,242,234,0.04);
}

.match-card__row:last-child {
    border-bottom: none;
}

.match-card__row.is-winner .match-card__name {
    color: var(--gold);
}

.match-card__row.is-winner .match-card__score {
    color: var(--gold);
    font-weight: 700;
}

.match-card__flag {
    width: 24px; height: 18px;
    object-fit: cover;
    border-radius: 1.5px;
    flex-shrink: 0;
}

.match-card__flag--placeholder {
    background: rgba(245,242,234,0.06);
    border: 1px dashed rgba(245,242,234,0.15);
    display: block;
}

.match-card__name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-card__name--placeholder {
    color: var(--bone-dim);
    font-style: italic;
    font-weight: 500;
    font-size: 11px;
}

.match-card__score {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 16px;
    color: var(--bone-dim);
    min-width: 18px;
    text-align: right;
}

.match-card__foot {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(245,242,234,0.06);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bone-dim);
}

.match-card__foot img {
    width: 14px; height: 10px;
    object-fit: cover;
    border-radius: 1px;
}

/* ============================================================
   PIED DE PAGE
   ============================================================ */
.footer {
    background: var(--ink);
    border-top: 1px solid var(--line);
    padding: 50px 6vw;
}

.footer__inner {
    max-width: 1300px;
    margin: 0 auto;
    text-align: center;
}

.footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    letter-spacing: 0.06em;
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.footer__note {
    color: var(--bone-dim);
    line-height: 1.7;
    max-width: 540px;
    margin: 0 auto 20px;
    font-size: 14px;
}

.footer__credit {
    color: var(--bone-faint);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
    .hero { padding: 24px 5vw 50px; }

    .topnav__links { gap: 14px; font-size: 11px; }
    .topnav__links a:not(:first-child):not(:last-child) { display: none; }

    .hero__meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero__stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero__title-row--accent {
        padding-left: 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 60px 5vw 24px;
    }

    .section-header__sub {
        text-align: left;
    }

    .groups__grid {
        grid-template-columns: 1fr;
        padding: 0 5vw;
    }
}

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