/* =========================================
   1. RÉGLAGES GLOBAUX & TYPOGRAPHIE
   ========================================= */

:root {
    --primary-color: #d32f2f; /* Rouge WFA */
    --dark-bg: #1a1a1a;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    line-height: 1.6;
    padding-top: 76px; /* INDISPENSABLE : Pour ne pas que le menu cache le haut du site */
}

h1, h2, h3, h4, h5, .navbar-brand {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Couleurs utilitaires */
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }

/* Boutons */
.btn-danger {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: bold;
    transition: all 0.3s ease;
}
.btn-danger:hover { background-color: #b71c1c; }

/* =========================================
   2. NAVBAR (MENU PRINCIPAL)
   ========================================= */

.navbar {
    background-color: rgba(26, 26, 26, 0.98) !important; /* Noir presque opaque */
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 9999 !important; /* Force le menu à être au-dessus de tout (neige incluse) */
}

.navbar-brand img {
    transition: transform 0.3s;
}
.navbar-brand:hover img {
    transform: rotate(360deg); /* Petit effet sympa au survol du logo */
}

/* =========================================
   3. HERO SECTION & PAGES
   ========================================= */

.hero-section {
    position: relative;
    /* Ombre interne pour assombrir l'image et rendre le texte lisible */
    box-shadow: inset 0 0 0 1000px rgba(0,0,0,0.5); 
}

/* =========================================
   4. COMPOSANTS (Cartes, Onglets, etc.)
   ========================================= */

/* Cartes Planning & Coachs */
.planning-card .card-header {
    border-bottom: 3px solid var(--primary-color);
}
.card {
    transition: transform 0.3s ease;
}
.card:hover {
    transform: translateY(-5px); /* La carte remonte un peu au survol */
}
.badge {
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: inline-block;
}

/* Onglets Disciplines */
.nav-pills .nav-link.active {
    background-color: var(--primary-color) !important;
}
.nav-pills .nav-link { color: #333; }

/* Effet zoom sur les logos réseaux sociaux */
.hover-scale {
    transition: transform 0.3s ease;
    display: inline-block;
}
.hover-scale:hover {
    transform: scale(1.2); /* Grossit de 20% */
    color: #ffc107 !important; /* Devient jaune au survol */
}

/* =========================================
   5. STYLE DU MENU BURGER (Le Bouton Rond)
   ========================================= */

/* Le bouton lui-même */
.navbar-toggler {
    border: none !important;
    background-color: #dc3545; /* Fond ROUGE */
    border-radius: 50%; /* ROND */
    width: 50px;
    height: 50px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 10000; /* Doit être au-dessus de l'écran noir */
    position: relative;
}

/* Effet Focus */
.navbar-toggler:focus {
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.8);
    outline: none;
}

/* Animation quand ouvert (Tourne + devient blanc) */
.navbar-toggler[aria-expanded="true"] {
    background-color: #fff; 
    transform: rotate(90deg);
}

/* L'icône (les 3 barres) */
.navbar-toggler-icon {
    width: 1.5em;
    height: 1.5em;
    filter: invert(1) grayscale(100%) brightness(200%); /* Force le blanc */
    transition: filter 0.3s;
}

/* L'icône devient rouge quand le fond est blanc */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    filter: none; 
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(220, 53, 69, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* =========================================
   6. MENU MOBILE "PLEIN ÉCRAN" (CORRIGÉ)
   ========================================= */

@media (max-width: 991px) { /* Mobile et Tablette */

    /* On cible .show (ouvert) ET .collapsing (en train d'ouvrir)
       pour éviter le bug du "vieux menu" pendant 1 seconde 
    */
    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100vh !important; /* Force la pleine hauteur même pendant l'anim */
        background-color: rgba(33, 37, 41, 0.98); /* Fond noir opaque */
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 9990;
        transition: none !important; /* On gère l'anim nous-mêmes sur les liens */
        overflow-y: auto; /* Permet de scroller si l'écran est petit */
    }

    /* CORRECTION DE L'ALIGNEMENT (Annule le ms-auto) */
    .navbar-nav {
        width: 100%;
        padding-left: 0;
        margin: 0 !important; /* Annule le décalage à droite */
        text-align: center;   /* Force le centrage du texte */
    }

    /* Style des liens */
    .navbar-nav .nav-item {
        width: 100%;       /* Prend toute la largeur */
        margin: 15px 0;    /* Espacement vertical */
        text-align: center; /* Sécurité pour centrer */
        opacity: 0;
        /* Animation seulement quand le menu est fini d'ouvrir (.show) */
    }
    
    .navbar-collapse.show .navbar-nav .nav-item {
        animation: slideUpFade 0.5s forwards;
    }

    .navbar-nav .nav-link {
        font-size: 1.8rem; /* Texte ENCORE plus gros */
        font-family: 'Oswald', sans-serif;
        text-transform: uppercase;
        color: white !important;
        font-weight: bold;
        letter-spacing: 2px;
        display: inline-block; /* Aide au centrage */
    }

    /* Bouton rouge dans le menu */
    .navbar-nav .nav-item .btn {
        margin-top: 10px;
        width: 80% !important; /* Pas trop large, juste ce qu'il faut */
        max-width: 300px;
        font-size: 1.2rem;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }

    /* CASCADE (Délais d'animation) */
    .navbar-collapse.show .nav-item:nth-child(1) { animation-delay: 0.1s; }
    .navbar-collapse.show .nav-item:nth-child(2) { animation-delay: 0.2s; }
    .navbar-collapse.show .nav-item:nth-child(3) { animation-delay: 0.3s; }
    .navbar-collapse.show .nav-item:nth-child(4) { animation-delay: 0.4s; }
    .navbar-collapse.show .nav-item:nth-child(5) { animation-delay: 0.5s; }
    .navbar-collapse.show .nav-item:nth-child(6) { animation-delay: 0.6s; }
    .navbar-collapse.show .nav-item:nth-child(7) { animation-delay: 0.7s; }
    .navbar-collapse.show .nav-item:nth-child(8) { animation-delay: 0.8s; }

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

/* =========================================
   7. OPTIMISATIONS PETITS ÉCRANS (< 768px)
   ========================================= */

@media (max-width: 768px) {
    body {
        padding-top: 66px;
    }

    .hero-section {
        height: auto !important;
        min-height: 80vh;
        padding: 100px 0;
        background-attachment: scroll; /* Fix iPhone */
    }

    .hero-section h1 {
        font-size: 2.5rem; 
        line-height: 1.1;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }

    /* Boutons en pleine largeur sur mobile */
    .hero-section .btn {
        display: block;
        width: 100%;
        margin-right: 0 !important;
        margin-bottom: 15px;
    }

    /* Espacements réduits */
    section { padding: 40px 0; }
    .card { margin-bottom: 15px; }
    .navbar-brand img { height: 40px; width: 40px; }
    .navbar-brand span { font-size: 1.1rem; }
}