/*
Theme Name: Les Étriers de la Plage
Author: Toi
Description: Thème sur-mesure pour le club d'équitation de mon frère.
Version: 1.0
*/

/* --- VARIABLES GLOBALES --- */
:root {
    --jaune: #FFC107;
    --texte-sombre: #2f3132;
    --police-titre: 'Fredoka One', cursive;
    --police-texte: 'Roboto Flex', sans-serif;
    --blanc-doux: #F7F7F7;
}

/* --- RÉINITIALISATION DE BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- STYLE GÉNÉRAL DE LA PAGE --- */
body {
    background-color: var(--jaune);
    /* ⬅️ C'est lui qui va combler le vide du rebond ! */
    font-family: var(--police-texte);
    color: var(--texte-sombre);
    margin: 0;
    padding-top: 54px;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
.logo {
    font-family: var(--police-titre);
    font-weight: normal;
}

/* --- 1. LE BANDEAU DU HAUT --- */
.bandeau-haut {
    background-color: var(--jaune);
    /* Utilisation de max() pour que sur les très grands écrans (> 1600px), le contenu ne s'écarte plus */
    padding: 15px calc(max(40px, (100vw - 1600px) / 2));
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

.bandeau-haut.cache {
    transform: translateY(-100%);
}

.logo {
    font-size: 24px;
    position: relative;
    z-index: 2000;
}

.menu a {
    text-decoration: none;
    color: var(--texte-sombre);
    margin: 0 15px;
    font-size: 18px;
    font-weight: 700;
    transition: opacity 0.3s ease;
}

.menu a:hover {
    opacity: 0.6;
}

/* --- LE BOUTON RÉSERVER --- */
.bouton-reserver {
    background-color: #FFFFFF;
    /* Fond blanc */
    color: var(--texte-sombre);
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.3s;
    min-width: 220px;
    /* ⬅️ Bloque la taille du bouton pour qu'il ne rétrécisse pas */
    text-align: center;
    box-sizing: border-box;
}

/* On cache les boutons mobiles quand on est sur un ordinateur */
.btn-menu-mobile,
.btn-accueil-mobile {
    display: none;
}

.bouton-reserver:hover {
    background-color: #f0f0f0;
}

/* --- LE BOUTON BURGER --- */
.bouton-burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 2000;
}

.ligne-burger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--texte-sombre);
    margin: 8px 0;
    transition: 0.3s;
}

/* Bouton burger flottant qui remplace le menu original au scroll */
.bouton-burger-flottant {
    display: none;
}

/* --- 2. LA SECTION ACCUEIL --- */
.section-accueil {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('images/accueil.jpg');
    background-size: cover;
    background-position: center;
    height: calc(100vh - 54px);
    /* ⬅️ Adapté au nouveau bandeau */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--blanc-doux);
    padding: 20px;
}

.contenu-accueil h1 {
    font-size: 55px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
}

.contenu-accueil p {
    font-size: 24px;
    font-weight: 700;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

/* --- 3. SECTION HORAIRES ET CARTE --- */
.section-horaires {
    padding: 80px 20px;
    background-color: var(--blanc-doux);
}

.conteneur-horaires {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    gap: 50px;
    align-items: center;
}

.bloc-texte-horaires {
    flex: 1;
}

.bloc-texte-horaires h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--jaune);
}

.bloc-texte-horaires ul {
    list-style: none;
    font-size: 18px;
    line-height: 2;
    margin-bottom: 20px;
}

.note-horaires {
    font-style: italic;
    color: #666;
}

.bloc-carte {
    flex: 1;
}

.vraie-carte {
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.vraie-carte iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* --- 4. SECTION TARIFS --- */
.section-tarifs {
    padding: 80px 20px;
    background-color: var(--blanc-doux);
}

.conteneur-tarifs {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    gap: 50px;
    align-items: center;
}

.bloc-image-tarifs {
    flex: 1;
}

.image-chevaux {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.15);
}

.bloc-texte-tarifs {
    flex: 1;
}

.bloc-texte-tarifs h2 {
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--jaune);
}

.intro-tarifs {
    font-size: 18px;
    margin-bottom: 30px;
    color: #666;
}

.boite-prix {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bloc-tarif {
    border-bottom: 2px dashed #e0e0e0;
    padding-bottom: 15px;
}

.bloc-tarif:last-child {
    border-bottom: none;
}

.ligne-prix {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
}

.montant-prix {
    color: var(--jaune);
    font-size: 22px;
    font-family: var(--police-titre);
}

.description-tarif {
    font-size: 14px;
    color: #777;
    margin-top: 5px;
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.4;
}


/* --- 5. LIGNE SÉPARATRICE ET GALERIE --- */
.separateur-galerie {
    border: none;
    border-top: 2px dotted rgba(47, 49, 50, 0.25); /* Trait en pointillés (dotted) */
    margin: 0 -20px 60px -20px; /* Marges gauche/droite négatives pour annuler le padding de 20px de la section et prendre toute la largeur */
}

.section-galerie {
    padding: 60px 20px 80px 20px; /* L'espace du haut est géré par le padding pour garder le fond blanc */
    background-color: var(--blanc-doux);
    text-align: center;
}

.conteneur-galerie {
    max-width: 1000px;
    margin: 0 auto;
}

.conteneur-galerie h2 {
    font-size: 36px;
    color: var(--jaune);
    margin-bottom: 40px;
}

.carrousel {
    position: relative;
    display: block; /* Prend toute la largeur pour que les boutons restent fixes aux extrémités */
    width: 100%;
}

.fenetre-carrousel {
    position: relative;
    height: 500px; /* La hauteur fixe est maintenant sur le conteneur */
    width: 100%;
}

.piste-carrousel {
    display: block;
    height: 100%;
}

.slide-galerie {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
    width: 100%;
    height: 100%;
}

.slide-galerie.active {
    display: flex; /* Flex pour centrer la photo verticalement et horizontalement */
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.image-galerie {
    max-width: 100%;
    max-height: 100%; /* S'assure que la photo ne dépasse jamais 500px de haut */
    width: auto;
    height: auto;
    display: block;
    border-radius: 12px; /* Les coins arrondis épousent maintenant EXACTEMENT la photo */
}

.faux-carre {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--police-texte);
    font-size: 24px;
    color: #999;
    background-color: #f8f9fa;
    width: 800px; /* Taille fixe pour le mode démo */
    height: 100%;
    max-width: 100%;
    border-radius: 12px;
}

.btn-carrousel {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    color: var(--texte-sombre);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: background-color 0.3s, transform 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-carrousel:hover {
    background-color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.btn-carrousel.prev {
    left: 10px; /* Collé à l'image */
}

.btn-carrousel.next {
    right: 10px; /* Collé à droite du conteneur */
}

/* --- INDICATEURS DE CARROUSEL --- */
.indicateurs-galerie {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
}

.trait-indicateur {
    width: 30px;
    height: 4px;
    background-color: #ddd;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.trait-indicateur.actif {
    background-color: var(--jaune);
}

/* --- 6. LE PIED DE PAGE (Footer) --- */
.pied-de-page {
    background-color: var(--jaune);
    color: var(--texte-sombre);
    padding: 60px 20px 20px 20px;
    text-align: center;
}

.logo-footer {
    font-size: 32px;
    margin-bottom: 30px;
}

.blocs-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    /* On retire align-items: start pour que les colonnes s'étirent à la même hauteur max */
    margin-bottom: 40px;
}

.reseaux-footer {
    grid-column: 1;
    justify-self: end; /* Le pousse vers la droite (vers le centre) */
    margin-right: 80px; /* Laisse un bel espace avec le bloc central */
    text-align: left; /* Aligne le titre "Nos réseaux" avec les icônes */
    display: flex;
    flex-direction: column;
}

.infos-contact {
    grid-column: 2;
    /* Ce bloc est maintenant parfaitement centré sous le titre ! */
}

.reseaux-footer h3,
.infos-contact h3 {
    font-size: 20px;
    margin-top: 0; /* Empêche les décalages liés aux marges par défaut */
    margin-bottom: 20px;
    font-family: var(--police-titre);
    line-height: 1.2; /* Corrige le décalage causé par l'héritage du line-height: 2 de infos-contact */
}

.liens-reseaux {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Aligne proprement les icônes verticalement */
    flex-grow: 1; /* Prend tout l'espace vertical disponible sous le titre */
    justify-content: center; /* Centre les 2 icônes par rapport aux 3 lignes d'adresse */
    gap: 15px; /* On remet un petit espace pour que le bloc soit aéré */
}

.lien-reseau {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 36px; /* Correspond EXACTEMENT à la hauteur d'une ligne de contact (line-height: 2 sur 18px font = 36px) */
    font-size: 18px; /* Identique à la taille du texte des contacts */
    color: var(--texte-sombre);
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.lien-reseau:hover {
    transform: translateX(5px);
}

.icone-reseau {
    width: 24px;
    height: 24px;
}

.infos-contact {
    font-size: 18px;
    font-weight: 500;
    line-height: 2;
}

.infos-contact p {
    margin: 0; /* Retire les marges par défaut des paragraphes pour un contrôle total via le line-height */
}

.infos-legales {
    border-top: 2px solid rgba(47, 49, 50, 0.1);
    padding-top: 20px;
    font-size: 14px;
}

.infos-legales a {
    color: var(--texte-sombre);
    text-decoration: none;
    font-weight: bold;
}

.infos-legales a:hover {
    text-decoration: underline;
}

/* Classe pour bloquer le scroll */
body.no-scroll {
    overflow: hidden;
}

/* --- PAGE MENTIONS LÉGALES --- */
.section-legale {
    background-color: #FAF8F5;
    padding: 40px 20px;
    min-height: calc(100vh - 54px);
    /* ⬅️ Adapté au nouveau bandeau */
    display: flex;
    align-items: center;
    justify-content: center;
}

.conteneur-legal {
    max-width: 800px;
    width: 100%;
    background-color: var(--blanc-doux);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.05);
}

.conteneur-legal h1 {
    color: var(--jaune);
    text-align: center;
    font-size: 40px;
    margin-bottom: 40px;
    font-family: var(--police-texte);
    font-weight: 700;
}

.conteneur-legal h2 {
    color: var(--texte-sombre);
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--jaune);
    display: inline-block;
    padding-bottom: 5px;
    font-family: var(--police-texte);
    font-weight: 700;
}

.conteneur-legal p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 15px;
}

.conteneur-legal a {
    color: var(--texte-sombre);
    font-weight: bold;
}

/* --- ADAPTATION POUR LES TÉLÉPHONES (Responsive) --- */
@media (max-width: 768px) {
    .bandeau-haut {
        padding: 0 20px;
        height: 50px;
    }

    .logo {
        font-size: 22px;
    }

    .bouton-burger {
        display: block;
        opacity: 0;
        pointer-events: none;
        transform: translateY(5px); /* Ajustement pour faire descendre le menu */
    }

    .bouton-burger-flottant {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 8px;
        position: fixed;
        top: 0; /* Centré verticalement dans le header */
        right: 5px;
        width: 50px;
        height: 50px;
        background: transparent;
        border: none;
        padding: 0;
        cursor: pointer;
        z-index: 2000;
    }

    .bouton-burger-flottant .ligne-burger {
        margin: 0;
    }

    .bouton-burger-flottant::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #fff;
        border-radius: 50%;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
        z-index: -1;
        transform: scale(0);
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .bouton-burger-flottant.visible::before {
        transform: scale(1);
    }

    .menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--jaune);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        z-index: 1500;
    }

    .menu.menu-ouvert {
        right: 0;
    }

    .menu a {
        font-size: 28px;
        margin: 20px 0;
    }

    /* On cache UNIQUEMENT le bouton original en haut à droite du header */
    .bandeau-haut>.bouton-reserver {
        display: none;
    }

    /* On affiche le bouton dans le menu burger */
    .btn-menu-mobile {
        display: block;
        margin-top: 30px;
        /* Sépare un peu le bouton des autres liens */
    }

    /* On affiche le bouton sous le titre de l'accueil */
    .btn-accueil-mobile {
        display: inline-block;
        margin-top: 40px;
        /* Sépare le bouton du texte de présentation */
    }

    .contenu-accueil h1 {
        font-size: 35px;
    }

    .contenu-accueil p {
        font-size: 18px;
    }

    body {
        padding-top: 50px;
    }

    .section-legale {
        align-items: flex-start;
        padding-top: 20px;
    }

    .conteneur-horaires {
        flex-direction: column;
        gap: 30px;
    }

    .bloc-carte {
        width: 100%;
    }

    .conteneur-tarifs {
        flex-direction: column-reverse;
        gap: 30px;
    }

    /* Carrousel mobile */
    .fenetre-carrousel {
        height: 350px; /* Hauteur réduite pour mobile */
    }

    .btn-carrousel {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .btn-carrousel.prev {
        left: 5px;
    }
    
    .btn-carrousel.next {
        right: 5px;
    }

    /* Footer mobile */
    .blocs-footer {
        display: flex; /* Désactive la grid sur mobile */
        flex-direction: column;
        gap: 60px; /* Espace vertical entre les blocs */
    }

    .reseaux-footer {
        position: relative;
        margin-right: 0; /* On annule le décalage sur mobile pour le centrer */
        text-align: center; /* Recentre le titre "Nos réseaux" */
        align-items: center; /* Centre le conteneur des liens */
    }

    .liens-reseaux {
        align-items: center; /* Recentre les icônes et les liens */
    }

    /* Petit trait gris entre réseaux et contacts */
    .reseaux-footer::after {
        content: '';
        position: absolute;
        bottom: -30px; /* Centré exactement dans l'espace de 60px */
        left: 50%;
        transform: translateX(-50%);
        width: 60px; /* Retour à une taille beaucoup plus courte */
        height: 2px;
        background-color: rgba(47, 49, 50, 0.15);
    }
}