/* --- RESET & BASE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: #004B91;
    background: #fdfdfd;
    overflow-x: hidden;
}

/* --- HEADER GRID --- */
.grid-header {
    position: relative;
    width: 100%;
    background: #000;
    line-height: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 100vh;
    opacity: 1;
    overflow: hidden;
}

.grid-header.hidden {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.bg-img {
    width: 100%;
    height: auto;
    display: block;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 34% 36% 30%;
}

.item-p {
    grid-column: 1;
    grid-row: 3;
    display: flex;
    align-items: center;
    padding-left: 25.5%;
}

.item-p p {
    color: white;
    font-weight: bold;
    font-size: 1.2vw;
    text-align:center;
    text-transform: uppercase;
    line-height: 1.2;
}

.item-h1 {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 5%;
}

.item-h1 h1 {
    color: white;
    font-size: 2.8vw;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.item-h1-date {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 5%;
}

.item-h1-date h1 {
    color: white;
    font-size: 2.8vw;
    font-weight: 900;
    text-align: right;
    text-transform: uppercase;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

/* --- NAVIGATION --- */
nav {
    background: #004B91;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: 0.3s;
    padding: 5px 10px;
}

nav a:hover {
    color: #ff6600;
}

#btn-accueil {
    color: #ff6600;
    border: 1px solid #ff6600;
    border-radius: 4px;
}

/* --- SECTIONS (Mode Slide) --- */
.section {
    display: none;
    min-height: 70vh;
}

.section.active {
    display: block;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px;
}

h2 {
    color: #004B91;
    font-size: 2.2rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    border-left: 5px solid #ff6600;
    padding-left: 15px;
}
/* Grille pour les 3 encadrés de course */
.grid-race {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes égales */
    gap: 20px;
    margin-top: 40px;
}

/* Style de chaque encadré */
.race-card {
    border: 3px solid #f39233; /* Orange de ton image */
    border-radius: 25px;       /* Bords très arrondis */
    padding: 25px 15px;
    text-align: center;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.3s ease;
}

/* --- STYLE DU BOUTON SUNSET MARATHON --- */
#btn {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 30px;
    background-color: #ff6600; /* Orange dynamique */
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 1rem;
    border-radius: 50px; /* Forme pilule très moderne */
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.3);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

#btn:hover {
    background-color: white;
    color: #ff6600;
    border: 2px solid #ff6600;
    transform: translateY(-3px); /* Petit saut au survol */
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.4);
}

#btn:active {
    transform: translateY(-1px);
}

/* Texte à l'intérieur des cartes */
.race-card h3 {
    color: #007bc4;           /* Bleu de ton image */
    font-size: 1.3rem;
    margin-bottom: 15px;
    border: none;             /* On enlève la bordure gauche des h2 généraux */
    padding-left: 0;
    text-transform: none;
}

.race-card p {
    color: #007bc4;
    margin-bottom: 5px;
    font-weight: 500;
    text-align: center;      /* Force le centrage du texte */
    font-size: 1rem;
}

.race-card .detail {
    font-size: 0.95rem;
}

/* Effet au survol (optionnel mais sympa) */
.race-card:hover {
    transform: scale(1.03);
}

/* RESPONSIVE : Passage en 1 colonne sur mobile */
@media (max-width: 768px) {
    .grid-race {
        grid-template-columns: 1fr;
    }
}

.tag {
    color: #ff6600;
    font-weight: bold;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 10px;
}

/* --- GRILLES & CARTES --- */
.grid-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-top: 5px solid #ff6600;
}

.card-roi {
    background: white;
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 8px;
    transition: 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.card-roi:hover {
    border-color: #ff6600;
    transform: translateY(-5px);
    background: #fffaf7;
}

/* --- LISTE PREP --- */
.list-prep {
    list-style: none;
    padding-left: 0;
}

.list-prep li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.list-prep li::before {
    content: "➔";
    position: absolute;
    left: 0;
    color: #ff6600;
    font-weight: bold;
}

/* --- FOOTER --- */
footer {
    background: #004B91;
    color: white;
    text-align: center;
    padding: 40px;
    font-size: 1rem;
    margin-top: 40px;
}
footer a {
    color: #ff6600;
    text-decoration: none;
    
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .grid-cards {
        grid-template-columns: 1fr;
    }

    .item-p p {
        font-size: 2vw;
    }

    .item-h1 h1 {
        font-size: 5vw;
    }

    nav ul {
        gap: 10px;
        flex-wrap: wrap;
    }
}