/* Importation des polices Lato (Globale) et Caveat (Citation) */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600&family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400&display=swap');

/* Variables de couleurs et de typographie */
:root {
    --fid-font-family: 'Lato', sans-serif;
    --fid-green-solid: #64C051; /* Le vert vif des boîtes */
    --fid-green-light: #F2F6ED; /* Le vert très clair/gris des autres boîtes */
    --fid-dark: #111111;        /* La couleur du texte, de la ligne et des dates */
    --fidouest-green: #2BA84A;  /* Vert par défaut pour les titres et guillemets */
    --fidouest-text: #333333;
}

/* Application globale de la police sur la page anniversaire */
.anniversary-hero, 
.anniversary-timeline, 
.anniversary-quote, 
.anniversary-gallery {
    font-family: var(--fid-font-family);
}

/* =========================================
   TYPOGRAPHIE GLOBALE
   ========================================= */
.anniversary-hero h1 {
    color: var(--fidouest-green);
    font-weight: 900; /* Plus épais pour Lato */
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.anniversary-hero h2, 
.anniversary-gallery h2 {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--fidouest-text);
    letter-spacing: 1px;
}

.anniversary-hero h2::before, 
.anniversary-gallery h2::before {
    content: '≡';
    font-size: 1.5rem;
    font-weight: 400;
}

/* Force le header à passer au premier plan par-dessus l'image */
header, .site-header, #masthead {
    position: relative; /* ou absolute selon le comportement de ton thème */
    z-index: 9999 !important;
}

/* =========================================
   SECTION HERO (IMAGE SEULE)
   ========================================= */
.anniversary-hero-simple {
    width: 100%;
    height: 90vh; /* Ajuste cette valeur (ex: 80vh, 100vh, ou 800px) */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: block;
    margin-top:-110px;
}

/* Ajustement pour mobile : on réduit un peu la hauteur pour éviter de trop scroller */
@media (max-width: 767px) {
    .anniversary-hero-simple {
        height: 60vh;
        background-position: center center; /* On peut changer pour 'right center' si le sujet est à droite */
    }
}

/* =========================================
   Conteneur PERSO 
   ========================================= */

/* On crée un conteneur plus large que le standard Bootstrap */
.container-custom {
    width: 100%;
    max-width: 1400px;
    margin-right: auto;
    margin-left: auto;
    padding-right: 15px;
    padding-left: 15px;
}


/* =========================================
   TIMELINE (Structure en quinconce)
   ========================================= */
.timeline-wrapper {
    position: relative;
    padding: 40px 0;
}

@media (min-width: 768px) {
    .timeline-wrapper::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        width: 2px;
        background-color: var(--fid-dark);
        transform: translateX(-50%);
        z-index: 1;
    }
}

@media (min-width: 768px) {
    .timeline-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 14px; 
        height: 14px;
        background-color: #fff;
        border: 2px solid var(--fid-dark);
        border-radius: 50%;
        z-index: 2;
    }
}

.timeline-date {
    color: var(--fid-dark);
    font-weight: 900;
    font-size: 3.5rem;
    display: block;
    line-height: 1;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    background-color: #fff;
    border: 2px solid var(--fid-dark);
    border-radius: 50%;
    position: relative;
    z-index: 2;
    margin: 0 auto;
}

/* Style de base de la boîte de texte + État initial de l'animation (Caché et basculé) */
.timeline-box {
    padding: 25px 30px;
    text-align: left;
    border-radius: 4px;
    
    /* ANIMATION FLIP : État de départ */
    opacity: 0;
    transform: perspective(1000px) rotateX(60deg); /* Basculé de 60 degrés en 3D */
    transform-origin: center center;
    /* La courbe cubic-bezier donne le petit effet "élastique / rebond" à la fin */
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.6s ease-out;
    will-change: transform, opacity; /* Optimisation pour le navigateur */
}

/* État final de l'animation (Déclenché au scroll) */
.timeline-box.is-visible {
    opacity: 1;
    transform: perspective(1000px) rotateX(0deg); /* Revient à plat */
}

/* Le reste de tes styles h4 et p pour timeline-box ne changent pas... */
.timeline-box h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.timeline-box .timeline-text p {
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 0;
    line-height: 1.6;
}

/* =========================================
   COULEURS DES BOÎTES VIA ACF 
   ========================================= */

/* Option : Boîte Vert Vif (Texte blanc) */
.timeline-box.box-vert-vif {
    background-color: var(--fid-green-solid);
}
.timeline-box.box-vert-vif h4,
.timeline-box.box-vert-vif p {
    color: #ffffff;
}

/* Option : Boîte Vert Clair (Texte noir) */
.timeline-box.box-vert-clair {
    background-color: var(--fid-green-light);
}
.timeline-box.box-vert-clair h4 {
    color: var(--fid-dark);
}
.timeline-box.box-vert-clair p {
    color: #444444;
}

/* =========================================
   CITATION PDG
   ========================================= */
.anniversary-quote {
    margin-top: 40px;
    margin-bottom: 40px;
}

/* Le conteneur avec le liseré vert */
.quote-box-wrapper {
    border: 1px solid var(--fid-green-solid); /* Le liseré vert */
    background-color: #ffffff;
    overflow: hidden; /* Empêche l'image de dépasser si on ajoute des coins arrondis */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Légère ombre pour détacher le bloc du fond */
}

/* On s'assure que l'image prend bien toute la hauteur de sa colonne */
.quote-img-col {
    display: flex;
}
.quote-img-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* La zone de texte avec espacement interne (padding) */
.quote-text-col {
    padding: 60px 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.custom-blockquote {
    margin: 0;
    width: 100%;
}

.quote-text {
    font-family: 'Caveat', cursive;
    font-size: 2.2rem;
    color: var(--fid-dark);
    line-height: 1.3;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* On enlève la marge basse par défaut du paragraphe WordPress */
.quote-text p {
    margin-bottom: 0; 
}

/* L'auteur en dessous (Police classique, centré) */
.quote-author {
    display: block;
    font-family: var(--fid-font-family); /* Retour à la police Lato */
    color: var(--fid-dark);
    font-weight: 400;
    font-size: 1.1rem;
    font-style: normal;
}

/* On s'assure de supprimer l'ancien tiret généré en CSS s'il y était */
.custom-blockquote cite::before {
    content: none;
}

/* Ajustements pour Mobile */
@media (max-width: 767px) {
    .quote-text-col {
        padding: 30px 20px;
    }
    .quote-text {
        font-size: 1.8rem;
    }
    .quote-img-col img {
        min-height: auto;
        max-height: 350px;
        object-position: top center; /* Garde le visage visible sur mobile */
    }
}

/* =========================================
   GALERIE ET RESPONSIVE
   ========================================= */
.gallery-item img {
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 767px) {
    .timeline-date {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    .timeline-item {
        margin-bottom: 50px !important;
    }
}

/* =========================================
   STYLE DU SLIDER SWIPER
   ========================================= */
.swiper-button-next, 
.swiper-button-prev {
    color: var(--fidouest-green) !important;
}
.swiper-pagination-bullet-active {
    background-color: var(--fidouest-green) !important;
}
.swiper-slide {
    height: auto; /* Permet aux slides d'avoir la même hauteur */
}

/* =========================================
   STYLE SPECIFIQUE GALERIE ET SLIDER
   ========================================= */

/* Le titre de la galerie (Vert vif, plus grand, sans l'icône menu) */
.gallery-title {
    color: var(--fid-green-solid) !important;
    font-size: 3rem !important;
    text-transform: none !important;
}
.gallery-title::before {
    content: none !important; /* Retire le petit icône ≡ de ce titre précis */
}

/* Les images du slider */
.slider-img {
    object-fit: cover;
    height: 400px; /* Hauteur augmentée pour des images plus grandes */
    width: 100%;
}

/* La légende (Texte sur l'image) */
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 20px 15px; /* Plus d'espace en haut pour le dégradé */
    color: #ffffff;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 400;
    /* Dégradé noir transparent pour assurer la lisibilité du texte blanc */
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none; /* Empêche le dégradé de bloquer le clic ou le hover */
}

/* Les flèches du slider en blanc avec une petite ombre */
.custom-nav-arrow {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Ombre pour les rendre visibles même sur fond clair */
}

/* La couleur des points de pagination en bas */
.swiper-pagination-bullet-active {
    background-color: var(--fid-green-solid) !important;
}