:root {
    --rouge-fond: #db2319;
    --beige-clair: #f2e6d8;
    --brand-red: #db2319;
    --brand-yellow: #f8e71c;
    --brand-black: #000000;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--rouge-fond);
    color: var(--beige-clair);
}

/* --- HEADER & MENU --- */
.header-fullscreen {
    min-height: 100vh;
}

.site-title {
    font-family: 'Anton';
    font-size: 1.9rem;
    text-transform: uppercase;
    padding-left: 1rem;
}

#lien-titre-site {
    text-decoration: none!important;
    color: var(--beige-clair)!important;
}

.site-menu .nav-link {
    font-family: 'Anton';
    font-size: clamp(1rem, 2.2vw, 1.5rem); 
    text-transform: uppercase;
    color: var(--beige-clair);
    padding: 0.5rem 0.8rem;
}

.site-menu .nav-link.active {
    color: #000 !important;
}

.nav > li > a:hover {
    color: black;
}

@media (max-width: 480px) {
    .site-menu {
        justify-content: center !important;
        flex-wrap: wrap; /* Évite que le menu ne pousse la largeur sur petit mobile */
    }
    .site-menu .nav-link {
        white-space: normal; 
        text-align: center;
    }
}

/* --- TITRES ET CITATIONS --- */
.titre-principal {
    font-size: clamp(3.5rem, 12vw, 18rem);
    font-family: 'Anton';
    line-height: 0.95;
    text-align: center;
    margin-top: 20px;
    color: var(--beige-clair);
    word-wrap: break-word;
}

.quote {
    font-style: italic;
    font-size: 1.8rem;
    color: var(--beige-clair);
    font-family: 'Anton';
    margin-right: 5%;
    
}

@media (max-width: 768px) {
    .quote {
        font-size: 1.6rem;
        text-align: center !important;
        margin-top: 20px;
    }
}

/* --- SECTION PERSONNAGES (Perso 1 & 2) --- */
#perso-1 {
    display: block;
    width: 100%;
    max-width: 250px;
    height: auto;
    margin: 20px auto;
    z-index: 101;
}

/* Effets de débordement sur PC */
@media (min-width: 992px) {
    #perso-1 {
        max-width: 800px;
        width: 140%;
        transform: translate(20%, 15%); 
    }
}

/* ----------------------------------- */
/* -------- ANIMATIONS PERSOS  ------- */
/* ----------------------------------- */

/* État initial de Perso-1 : Fondu + Zoom */
#perso-1 {
    opacity: 0;
    transform: scale(0.5); /* Réduit au départ */
    transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* État activé pour Perso-1 (Apparition immédiate au chargement) */
#perso-1.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* PC */
@media (min-width: 992px) {
    #perso-1.is-visible {
        transform: translate(20%, 15%) scale(1);
    }
}


/* État initial de Perso-2 : Fondu + Scale */
#perso-2 {
    position: absolute;
    opacity: 0;
    transform: translateY(-50%) scale(0.2); /* On garde votre translateY et on réduit l'échelle */
    transition: opacity 1s ease-out, transform 1s ease-out;
    z-index: 50;
    width: 450px; /* Ajustez la taille selon vos besoins */
    top: 30vh;         /* Descend le haut de l'image au milieu du parent */
    transform: translateY(-50%); /* Centre parfaitement l'image sur l'axe vertical du décalage */
    pointer-events: none; /* Permet de cliquer sur le texte même si l'image est "devant" */
    left: -15vw; /* Plus le chiffre est négatif, plus il va à gauche */
}

/* État activé pour Perso-2 au scroll */
#perso-2.is-visible {
    opacity: 0.45;
    transform: translateY(-50%) scale(1);
}

/* Ajustement mobile pour Perso-2 */
@media (max-width: 768px) {
    #perso-2 {
        position: relative !important; /* Sort du mode absolu pour obéir au text-center du parent */
        left: auto !important;
        top: 7vh;
        bottom: auto !important;
        display: inline-block;
        max-width: 60%;   /* Taille adaptée au mobile */
    }
    #perso-2.is-visible {
        transform: scale(1);
    }
}


/* ---------------------------------------- */
/* --- SECTION CENTRALE Perso-2 + texte --- */
/* ---------------------------------------- */

.section_texte_centrale {
    background-color: var(--rouge-fond);
    overflow: visible; /* Empêche le scroll si l'image déborde */
}

.texte-central {
    position: relative; /* pour que l'image ne s'envole pas en haut de page */
    margin-top: 6%;
    margin-bottom: 6%;
}

.texte-central p {
    position: relative;
    z-index: 1000;
    font-size: 1.6rem;
    font-weight: bold;
    text-align: start;
    font-family: 'barlow';
    line-height: 1.2;
}

@media (max-width: 480px) {
    .texte-central p {
            font-size: 1.3rem!important;}
        }

@media (max-width: 768px) {
    .texte-central p {
        font-weight: bold;
        text-align: center;
        font-family: 'barlow';
        line-height: 1.2;
    }
}

/* --- SECTION ZONE FICHE DE PAIE & SPIRALES --- */
.zone_f_d_p {
    min-height: 100vh;
    padding: 20px 0;
}

.fiche-paie-img {
    width: 100%;
    max-width: 600px;
    height: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    display: block;
    margin: 0 auto;
    filter: brightness(85%);
    
}

/* --- CONFIGURATION DES SPIRALES (ZOOM + FONDU) --- */
#spirale-wrapper-4, 
#spirale-wrapper-5, 
#spirale-wrapper-6 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    
    /* Animation : on part de 0 d'opacité et scale 0.5 */
    opacity: 0;
    transform: scale(0.5); 
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 2. État quand la classe .is-visible est ajoutée */
#spirale-wrapper-4.is-visible, 
#spirale-wrapper-5.is-visible, 
#spirale-wrapper-6.is-visible {
    opacity: 1;
    /* Le transform: scale(1) sera ajouté spécifiquement dans les media queries ci-dessous */
}

/* 3. Styles du Texte et Images (Inchangés) */
#spirale-4, #spirale-5, #spirale-6 {
    width: 80vw;
    max-width: 350px;
    height: auto;
    opacity: 0.8;
}

.texte-des-spirales {
    color: black;
    text-align: center;
    width: 75%;
    line-height: 1.2;
    font-weight: 900;
    text-transform: uppercase;
    font-family: 'Anton';
    font-size: 1.8rem;
}

/* PC (min-width: 992px) */
@media (min-width: 992px) {
    #spirale-wrapper-4.is-visible { transform: translateX(15rem) scale(1); }
    #spirale-wrapper-5.is-visible { transform: translate(-22rem, -7rem) scale(1); }
    #spirale-wrapper-6.is-visible { transform: translate(-23rem, 18rem) scale(1); }

    #spirale-4 { width: 500px; }
    #spirale-5 { width: 300px; }
    #spirale-6 { width: 350px; }

    #texte-spirale-4 { font-size: 6rem; }
    #texte-spirale-5 { font-size: 3rem; }
    #texte-spirale-6 { font-size: 5rem !important; }
}

/* MOBILE (max-width: 480px) */
@media (max-width: 991px) { /* @media (max-width: 480px) remplacé par  @media (max-width: 991px)*/
    #spirale-wrapper-4 { 
        margin: 5% auto; 
    }

    .fiche-paie-img {
        margin-top: 5%;
    }

    #spirale-wrapper-4.is-visible {
        bottom: 6% !important; 
        transform: scale(1); 
    }
    
    #spirale-wrapper-5 { 
        margin: 30px auto; 
    }
    #spirale-wrapper-5.is-visible { 
        left: 12%; 
        transform: scale(1); 
    }
    
    #spirale-wrapper-6 { 
        margin: 6% auto; 
    }
    #spirale-wrapper-6.is-visible { 
        right: 15%; 
        transform: scale(1); 
    }
/* Ajout regle pour taille des textes */
    #texte-spirale-4 { font-size: 3.5rem; }
    #texte-spirale-5 { font-size: 2rem; }
    #texte-spirale-6 { font-size: 2.5rem !important; }

}

/* ----------------------------------- */
/* -------- IMAGE IHS  ------- */
/* ----------------------------------- */
.img-ihs-container {
    margin-top: 1%;
    margin-bottom : 4%;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.img-ihs-accueil {
    max-width: 90%; /* Prend plus de place sur mobile */
    height: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    margin: 0 auto;
}

@media (min-width: 992px) {
    .img-ihs-accueil {
        max-width: 50%;
        margin-bottom: 3%;
        margin-top: 5%;
    }
}

.gap-responsive {
    gap: clamp(20px, 3vw, 250px);
}


.img-ihs-container {
    padding: 80px 0;
    background-color: var(--rouge-fond);
    display: flex;
    justify-content: center; /* Centre horizontalement le bloc image + légende */
    align-items: center;
}

.wrapper-ihs {
    position: relative;
    display: inline-block; /* Le cadre colle à la taille de l'image */
}

.img-ihs-accueil {
    display: block;
    max-width: 600px; /* Taille sur PC */
    height: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.legende-noire {
    position: absolute;
    bottom: 35%; 
    left: -15%; /* Superposition : la légende mord sur la gauche de l'image */
    background-color: #000;
    color: #fff;
    padding: 20px 25px;
    text-align: left;
    z-index: 10;
    width: 350px;
    box-shadow: 10px 10px 20px rgba(0,0,0,0.3);
}

.legende-texte {
    font-family: 'Barlow', sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    line-height: 1.1;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.legende-credit {
    font-family: 'Barlow', sans-serif;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* --- 3. ANIMATIONS DE L'IMAGE IHS (EFFET PINCE) --- */

.anim-right {
    transform: translateX(100vw);
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s ease;
}

.anim-left {
    transform: translateX(-100vw);
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.1s, opacity 1s ease;
}

/* Activation des animations IHS */
#scroll-trigger-ihs.is-visible .anim-right,
#scroll-trigger-ihs.is-visible .anim-left {
    transform: translateX(0);
    opacity: 1;
}

/* --- 4. RESPONSIVE --- */

@media (max-width: 992px) {
    .img-ihs-accueil { max-width: 80%; }
    .legende-noire { width: 280px; left: -5%; }
}

@media (max-width: 576px) {
    .legende-noire {
        position: relative;
        left: 0;
        width: 90%;
        margin: -30px auto 0 auto;
    }
}



/* ---------------------------- */
/* -------- BACK TO TOP ------- */
/* ---------------------------- */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    
    /* Fond transparent */
    background-color: transparent; 
    
    /* Couleur de la flèche */
    color: #ffffff; 
    
    /* Bordure ronde blanche */
    border: 2px solid #ffffff; 
    border-radius: 50%;
    
    text-align: center;
    font-size: 20px;
    z-index: 1000;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Effet au survol pour qu'il reste visible sur fond rouge */
.back-to-top:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Léger voile blanc au survol */
    color: #ffffff;
    transform: translateY(-5px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

