:root {
    --sun:    #F97316;
    --gold:   #FBBF24;
    --grass:  #16A34A;
    --sky:    #0EA5E9;
    --dark:   #1C1917;
    --mid:    #44403C;
    --light:  #FEF3C7;
    --white:  #FFFBF5;
    --shadow: 0 4px 24px rgba(249,115,22,.15);
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--white);
    color: var(--dark);
    min-height: 100vh;
}

/* ── NAV ── */
nav {
    position: sticky; 
    top: 0; 
    z-index: 100;
    background: var(--dark);
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    padding: 0 2rem; 
    height: 60px;
    box-shadow: 0 2px 16px rgba(0,0,0,.4);
}

.nav-logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem; 
    letter-spacing: .1em;
    color: var(--gold);
    text-decoration: none;
}

.nav-links {   
    display: flex; 
    gap: .25rem; 
}

.nav-links a {
    color: #A8A29E; 
    text-decoration: none;
    font-size: .85rem; 
    font-weight: 500;
    padding: .4rem .9rem; 
    border-radius: 6px;
    transition: all .2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--white); 
    background: rgba(255,255,255,.1);
}

.nav-links a.active { 
    color: var(--gold); 
}

/* ── HERO ── */
.hero {
    position: relative; 
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark) 0%, #292524 50%, #1a1a2e 100%);
    padding: 5rem 2rem 4rem;
    text-align: center;
}

.hero::before {
    content: '';
    position: absolute; 
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(249,115,22,.25) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(251,191,36,.2) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(22,163,74,.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    background: rgba(249,115,22,.2);
    border: 1px solid rgba(249,115,22,.4);
    color: var(--gold);
    font-size: .75rem; 
    font-weight: 700; 
    letter-spacing: .15em;
    text-transform: uppercase; 
    padding: .35rem 1rem; 
    border-radius: 99px;
    margin-bottom: 1.5rem;
    animation: fadeDown .6s ease both;
}

.hero h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3.5rem, 10vw, 7rem);
    line-height: .95; 
    letter-spacing: .05em;
    color: var(--white);
    animation: fadeDown .6s .1s ease both;
}

.hero h1 span { 
    color: var(--sun); 
}

.hero p {
    color: #A8A29E; 
    font-size: 1.1rem;
    max-width: 560px; 
    margin: 1.5rem auto 0;
    line-height: 1.7;
    animation: fadeDown .6s .2s ease both;
}

.hero-hosts {
    display: flex; 
    justify-content: center; 
    gap: 1rem;
    margin-top: 2rem;
    animation: fadeDown .6s .3s ease both;
}

.host-pill {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    color: #D6D3D1; 
    font-size: .85rem; 
    font-weight: 500;
    padding: .45rem 1.1rem; 
    border-radius: 99px;
}

/* ── TRACKER ── */
.tracker-section {
    max-width: 900px; 
    margin: -2rem auto 0; 
    padding: 0 2rem;
    position: relative; 
    z-index: 10;
    animation: fadeUp .7s .4s ease both;
}

.tracker-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    box-shadow: var(--shadow), 0 0 0 1px rgba(249,115,22,.1);
}

.tracker-header {
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    margin-bottom: 1.25rem; 
    flex-wrap: wrap; 
    gap: 1rem;
}

.tracker-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem; 
    letter-spacing: .08em;
    color: var(--dark);
}

.tracker-count {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.2rem; 
    color: var(--sun); 
    letter-spacing: .05em;
}

.tracker-count span { 
    font-size: 1rem; 
    color: var(--mid); 
    font-family: 'DM Sans',sans-serif; 
    font-weight: 500; 
}

.progress-bar {
    height: 10px; 
    background: #E7E5E4;
    border-radius: 99px; 
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--grass), var(--gold), var(--sun));
    border-radius: 99px;
    transition: width 1s ease;
}

.stage-pills {
    display: flex; 
    gap: .5rem; 
    flex-wrap: wrap;
}

.stage-pill {
    font-size: .78rem; 
    font-weight: 600; 
    padding: .3rem .8rem;
    border-radius: 99px; 
    border: 1.5px solid #E7E5E4;
    color: #78716C;
    transition: all .2s;
}

.stage-pill.done    { 
    background: var(--grass); 
    color: white; 
    border-color: var(--grass); 
}

.stage-pill.active  { 
    background: var(--sun); 
    color: white; 
    border-color: var(--sun); 
}

.stage-pill.pending { 
    background: transparent; 
}

/* ── SECTION TITLE ── */
.section { 
    max-width: 1100px; 
    margin: 4rem auto; 
    padding: 0 2rem; 
}

.section-header {
    display: flex; 
    align-items: baseline; 
    gap: 1rem;
    margin-bottom: 2rem; 
    border-bottom: 2px solid var(--light);
    padding-bottom: 1rem;
}

.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem; 
    letter-spacing: .08em;
    color: var(--dark);
}

.section-sub { 
    color: #78716C; 
    font-size: .9rem; 
}

/* ── TOURNAMENT INFO ── */
.info-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
    gap: 1rem;
}

.info-card {
    background: linear-gradient(135deg, var(--light), #FFF8ED);
    border: 1px solid rgba(249,115,22,.15);
    border-radius: 14px; 
    padding: 1.25rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    height: 3px;
    background: linear-gradient(90deg, var(--sun), var(--gold));
}

.info-label { 
    font-size: .72rem; 
    font-weight: 700; 
    letter-spacing: .12em;
    text-transform: uppercase; 
    color: var(--sun); 
    margin-bottom: .4rem; 
}

.info-value { 
    font-size: 1.1rem; 
    font-weight: 700; 
    color: var(--dark); 
}

.info-sub   { 
    font-size: .82rem; 
    color: var(--mid); 
    margin-top: .15rem; 
}

/* ── ÉQUIPES PAR GROUPE ── */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.group-card {
    background: white;
    border: 1px solid #E7E5E4;
    border-radius: 14px; 
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.group-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.group-card-header {
    background: var(--dark);
    padding: .6rem 1rem;
    display: flex; 
    align-items: center; 
    justify-content: space-between;
}

.group-letter {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem; 
    letter-spacing: .1em; 
    color: var(--gold);
}

.group-conf { 
    font-size: .72rem; 
    color: #78716C; 
}

.team-row {
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    padding: .55rem 1rem;
    border-bottom: 1px solid #F5F5F4;
    font-size: .88rem;
}

.team-row:last-child { 
    border-bottom: none; 
}

.team-name { 
    font-weight: 500; 
    color: var(--dark); 
}

.team-rank {
    font-size: .75rem; 
    color: #A8A29E; 
    font-weight: 600;
    background: #F5F5F4; 
    padding: .15rem .5rem; 
    border-radius: 99px;
}

.team-flag { 
    font-size: 1.1rem; 
    margin-right: .4rem; 
}

/* ── STATS RAPIDES ── */
.stats-row {
    display: grid; 
    grid-template-columns: repeat(auto-fit,minmax(150px,1fr));
    gap: 1rem; 
    margin-bottom: 3rem;
}

.stat-card {
    text-align: center; 
    padding: 1.5rem 1rem;
    background: white; 
    border: 1px solid #E7E5E4; 
    border-radius: 14px;
}

.stat-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem; 
    color: var(--sun); 
    letter-spacing: .05em;
}

.stat-label { 
    font-size: .8rem; 
    color: var(--mid); 
    font-weight: 500; 
    margin-top: .25rem; 
}

/* ── FOOTER ── */
footer {
    background: var(--dark); 
    color: #78716C;
    text-align: center; 
    padding: 2rem;
    font-size: .82rem; 
    margin-top: 5rem;
}

footer strong { 
    color: var(--gold); 
}

/* ── ANIMATIONS ── */
@keyframes fadeDown {
    from { opacity:0; transform:translateY(-20px); }
    to   { opacity:1; transform:translateY(0); }
}

@keyframes fadeUp {
    from { opacity:0; transform:translateY(20px); }
    to   { opacity:1; transform:translateY(0); }
}

.fade-in { 
    opacity:0; 
    transform:translateY(16px); 
    transition: opacity .6s ease, transform .6s ease; 
}

.fade-in.visible { 
    opacity:1; 
    transform:translateY(0); 
}

/* ── CONFEDERATION COLORS ── */
.conf-UEFA { 
    color: #3B82F6; 
}

.conf-CONMEBOL { 
    color: var(--sun); 
}

.conf-CAF { 
    color: var(--grass); 
}

.conf-AFC      { 
    color: #8B5CF6; 
}

.conf-CONCACAF { 
    color: #EC4899; 
}

.conf-OFC { 
    color: #14B8A6; 
}

/* ── TEAMS LIST ── */
.teams-table { 
    width: 100%; 
    border-collapse: collapse; 
}

.teams-table tr { 
    border-bottom: 1px solid #F5F3EE; 
    transition: background .15s; 
}

.teams-table tr:hover { 
    background: #FFFBF5; 
}

.teams-table tr:last-child { 
    border-bottom: none; 
}

.teams-table td { 
    padding: .45rem .6rem; 
    vertical-align: middle; 
}

.t-rank-num {
    font-family: 'Bebas Neue', sans-serif; 
    font-size: 1.15rem;
    color: #A8A29E; 
    width: 40px; 
    text-align: right; 
    padding-right: .75rem;
}

.t-rank-num.top10  { 
    color: var(--sun); 
}

.t-rank-num.top30  { 
    color: var(--gold); 
}

.t-flag-img { 
    width: 24px; 
    height: 16px;
    object-fit: cover; 
    border-radius: 2px; 
    vertical-align: middle; 
}

.t-name { 
    font-weight: 500; 
    font-size: .88rem; 
    padding-left: .5rem; 
}

.t-badges { 
    display: flex; 
    align-items: center; 
    gap: .4rem; 
    justify-content: flex-end; 
    flex-wrap: nowrap; 
}

.t-group {
    font-size: .68rem; 
    font-weight: 700; 
    letter-spacing: .06em;
    color: #78716C; 
    background: #F5F3EE;
    padding: .15rem .45rem; 
    border-radius: 4px; 
    white-space: nowrap;
}

.t-conf {
    font-size: .68rem; 
    font-weight: 700; 
    letter-spacing: .06em;
    padding: .15rem .45rem; 
    border-radius: 4px; 
    white-space: nowrap;
}

.t-conf-UEFA { 
    background: #EFF6FF; 
    color: #3B82F6; 
}

.t-conf-CONMEBOL { 
    background: #FFF7ED; 
    color: #F97316; 
}

.t-conf-CAF { 
    background: #F0FDF4; 
    color: #16A34A; 
}

.t-conf-AFC { 
    background: #F5F3FF; 
    color: #8B5CF6; 
}

.t-conf-CONCACAF { 
    background: #FDF2F8; 
    color: #EC4899; 
}
.t-conf-OFC { 
    background: #F0FDFA;
    color: #14B8A6; 
}

@media (max-width:640px) {
    .hero { 
        padding: 3rem 1.5rem 3rem; 
    }

    .tracker-card { 
        padding: 1.5rem; 
    }

    nav { 
        padding: 0 1rem; 
    }

    .nav-links a { 
        padding: .4rem .6rem; 
        font-size: .78rem; 
    }
}