/* --- 1. Variables et Réinitialisation de Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    /* CLÉ POUR LA RESPONSIVITÉ: Empêche le débordement horizontal */
    max-width: 100%;
}

:root {
    /* Couleurs du Gabon */
    --primary-color: #009e49; /* Vert Émeraude */
    --secondary-color: #fcd116; /* Jaune Soleil (Accent/CTA) */
    --tertiary-color: #003087; /* Bleu Profond */
    
    --text-light: #ffffff;
    --text-dark: #222;
    --bg-light: #f4f4f4;
    
    /* Couleurs spécifiques */
    --color-match-win: var(--primary-color);
    --color-match-loss: #d93d3d;
    --color-match-upcoming: var(--secondary-color);
    --price-color: var(--primary-color);
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    padding-top: 70px; 
    /* CLÉ POUR LA RESPONSIVITÉ: Empêche le débordement horizontal sur le body */
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    /* Assure que toutes les images s'adaptent à leur conteneur */
    max-width: 100%;
    height: auto;
}

/* --- 2. Navigation (Header) --- */
header {
    background-color: rgba(0, 48, 135, 0.95);
    color: var(--text-light);
    padding: 15px 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5em;
    font-weight: 900;
    letter-spacing: 1px;
}

nav ul {
    list-style: none;
    display: flex;
    transition: all 0.3s ease-in-out;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    padding: 10px 15px;
    font-weight: 600;
    transition: color 0.3s, border-bottom 0.3s;
    white-space: nowrap; /* Empêche les liens de sauter de ligne */
}

.active-link {
    color: var(--secondary-color) !important;
    border-bottom: 2px solid var(--secondary-color);
}

nav ul li a:hover {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

/* Styles du Menu Burger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background: var(--text-light);
    border-radius: 10px;
    transition: all 0.3s linear;
    transform-origin: 1px;
}

/* Animation du Burger en croix */
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; transform: translateX(-20px); }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg); }


/* --- 3. Section HÉROS --- */
#hero {
    /* REMPLACER PAR VOTRE IMAGE LOCALE */
    background: url('e2.avif') no-repeat center center/cover;
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); 
}

.hero-content {
    color: var(--text-light);
    z-index: 10;
    max-width: 900px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 4em;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 900;
    text-shadow: 2px 2px var(--tertiary-color);
}

.hero-content p {
    font-size: 1.3em;
    margin-bottom: 40px;
    font-weight: 400;
}

.cta-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--tertiary-color);
    padding: 18px 35px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
}

.cta-button:hover {
    background-color: #e5b300;
    transform: translateY(-3px);
}

/* --- 4. Styles Généraux de Section --- */
section {
    padding: 80px 5%;
}

h1, h2 {
    text-align: center;
    margin-bottom: 50px;
    color: var(--tertiary-color);
    font-size: 2.5em;
    font-weight: 900;
    text-transform: uppercase;
}

/* --- 10. Media Queries (Responsivité) --- */
@media (max-width: 768px) {
    
    /* ... (NAVIGATION MOBILE ET AUTRES ADAPTATIONS GÉNÉRALES) ... */
    
    /* 3. PROCHAIN MATCH (ADAPTATION CRITIQUE) */
    .match-card {
        flex-direction: column;
        padding: 20px 10px; /* Réduit l'espace intérieur */
        margin: 0 5px; /* S'assurer qu'il ne colle pas aux bords */
    }
    
    .team {
        margin-bottom: 15px;
        flex-basis: auto;
        width: 100%;
        order: 2; /* Les équipes sont en bas */
    }
    
    .team-logo {
        width: 80px; /* Encore plus petit pour la place */
        height: 80px;
        margin-bottom: 5px;
    }
    
    .team h3 {
        font-size: 1.2em; /* Taille de police réduite */
    }

    .match-details-countdown {
        flex-basis: 100%;
        order: 1; /* Les détails sont au centre */
        padding-top: 10px;
    }
    
    .vs-text {
        font-size: 2.5em; /* Taille VS réduite */
        margin-bottom: 5px;
    }
    
    .match-info p {
        font-size: 0.9em; /* Texte d'info réduit */
    }
    
    .competition {
        font-size: 1em;
    }
    
    /* CLÉ : Rendre le compte à rebours extrêmement compact */
    .countdown-timer {
        gap: 8px; /* Réduire l'espace entre les unités */
        margin: 15px 0;
        padding: 8px 0;
        justify-content: center;
        width: 100%;
    }
    
    .timer-unit {
        min-width: 50px; /* Taille minimale très petite */
    }
    
    .timer-unit .number {
        font-size: 1.8em; /* Les chiffres sont réduits */
    }
    
    .timer-unit .label {
        font-size: 0.7em; /* Les labels sont très petits */
    }

    /* ... (FIN DES AUTRES ADAPTATIONS) ... */
}
/* --- 6. Section CALENDRIER DÉTAILLÉ --- */
#calendrier-detail {
    background-color: var(--text-light);
    padding: 80px 5%;
}

.match-list {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.match-list-card {
    background-color: var(--bg-light);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 8px solid;
    transition: box-shadow 0.3s;
}

.match-list-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* Styles spécifiques au statut de match */
.status-upcoming { border-color: var(--color-match-upcoming); }
.status-win { border-color: var(--color-match-win); }
.status-loss { border-color: var(--color-match-loss); }

.list-match-info {
    flex-grow: 1;
}

.list-match-info p {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 5px;
}

.list-match-details {
    display: flex;
    align-items: center;
    font-size: 1.2em;
    font-weight: 700;
}

.list-match-details .team-name-gabon {
    color: var(--tertiary-color);
    min-width: 120px;
    text-align: right;
    text-transform: uppercase;
}

.list-match-details .team-name-opponent {
    color: var(--primary-color);
    min-width: 120px;
    text-align: left;
    text-transform: uppercase;
}

.list-match-details .score {
    font-size: 1.5em;
    font-weight: 900;
    margin: 0 25px;
    padding: 5px 10px;
    border-radius: 5px;
    background-color: #ddd;
    color: var(--text-dark);
}

.match-list-meta {
    text-align: right;
    font-size: 0.85em;
    color: #666;
}

.calendar-divider {
    text-align: center;
    margin: 50px 0 60px;
    font-size: 1.5em;
    font-weight: 900;
    color: var(--tertiary-color);
    position: relative;
}

.calendar-divider span {
     background-color: var(--text-light); 
     padding: 0 20px;
     z-index: 2;
     position: relative;
}

.calendar-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 2px;
    background-color: var(--secondary-color);
    z-index: 1;
}

/* --- 7. Sections Cartes (Actualités, Équipe, Boutique) --- */
#actualites, #equipe, #boutique {
    background-color: var(--bg-light);
    padding-bottom: 100px;
}

.news-grid, .squad-grid, .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.news-card, .player-card, .product-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.news-card:hover, .player-card:hover, .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.player-image-container {
    position: relative;
    height: 350px; 
    overflow: hidden;
    border-bottom: 5px solid var(--primary-color);
}

.player-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(10%); 
    transition: filter 0.5s;
}

.player-card:hover .player-photo {
    filter: grayscale(0%); 
}

.product-card img {
    height: 280px;
    border-bottom: 3px solid var(--primary-color);
}

.player-number {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--secondary-color);
    color: var(--tertiary-color);
    font-size: 2em;
    font-weight: 900;
    padding: 5px 15px;
    border-radius: 5px;
    line-height: 1;
}

.card-content, .player-info {
    padding: 20px;
}


/* --- 9. Pied de Page (Footer) --- */
footer {
    background-color: var(--tertiary-color);
    color: var(--text-light);
    text-align: center;
    padding: 30px 5%;
    font-size: 0.9em;
    margin-top: 50px;
}


/* --- 10. Media Queries (Responsivité) --- */
@media (max-width: 768px) {
    
    /* 1. NAVIGATION MOBILE */
    .menu-toggle {
        display: flex;
    }
    
    nav ul {
        position: absolute;
        top: 60px;
        left: 0;
        height: auto;
        width: 100%;
        background-color: var(--tertiary-color);
        flex-direction: column;
        align-items: center;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-100%);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    nav ul.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    
    nav ul li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    nav ul li a {
        padding: 15px 0;
    }

    /* 2. ADAPTATIONS GÉNÉRALES */
    h1, h2 {
        font-size: 2em;
        margin-bottom: 30px;
    }
    
    .hero-content h1 {
        font-size: 2.5em;
    }
    
    /* 3. PROCHAIN MATCH (LE POINT SENSIBLE) */
    .match-card {
        flex-direction: column;
        padding: 20px 10px;
    }
    
    .team {
        margin-bottom: 15px;
        flex-basis: auto;
        width: 100%;
    }
    
    .team-logo {
        width: 100px;
        height: 100px;
        margin-bottom: 5px;
    }
    
    .team h3 {
        font-size: 1.4em;
    }

    .match-details-countdown {
        flex-basis: 100%;
        order: -1; /* Place les détails du match au-dessus des logos sur mobile */
    }
    
    .vs-text {
        font-size: 3em;
        margin-bottom: 5px;
    }
    
    .match-info p {
        font-size: 1em;
    }
    
    /* CLÉ : Rendre le compte à rebours plus petit et utiliser moins d'espace */
    .countdown-timer {
        gap: 10px; /* Réduire l'espace entre les unités */
        margin: 20px 0;
        padding: 10px 0;
        justify-content: center;
        width: 100%; /* S'assurer qu'il prend toute la largeur disponible */
    }
    
    .timer-unit {
        min-width: 60px; /* Réduire la taille minimale */
    }
    
    .timer-unit .number {
        font-size: 2.2em;
    }
    
    .timer-unit .label {
        font-size: 0.8em;
    }

    /* 4. ADAPTATIONS DES GRILLES ET LISTES */
    
    .news-grid, .squad-grid, .product-grid {
        grid-template-columns: 1fr; /* Passage à une seule colonne */
    }
    
    .match-list-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    .list-match-details {
        margin-top: 10px;
        font-size: 1em;
    }
    .list-match-details .score {
        font-size: 1.3em;
        margin: 0 15px;
    }
    .list-match-details .team-name-gabon, 
    .list-match-details .team-name-opponent {
        min-width: 80px;
        text-align: center;
    }
    .match-list-meta {
        text-align: left;
        margin-top: 10px;
        margin-left: 0;
    }
    
    .category-bar a {
        display: block;
        margin: 10px auto;
    }

}