:root {
    --rouge-fond: #db2319;
    --beige-clair: #f2e6d8;
    --brand-red: #db2319;/* --- PAGE QUIZ --- */
    --brand-yellow: #f8e71c;/* --- PAGE QUIZ --- */
    --brand-black: #000000;/* --- PAGE QUIZ --- */
}

/* 1. Sécurité globale contre le scroll horizontal */
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--rouge-fond);
    color: var(--beige-clair);
}

img {
    height: auto;
}

/* 1ere section : Menu + gros titre + perso + spirale */

.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';
    /* 1rem minimum, 2.2vw (variable), 1.5rem maximum */
    font-size: clamp(1rem, 2.2vw, 1.5rem); 
    text-transform: uppercase;
    color: var(--beige-clair);
    padding: 0.5rem 0.8rem; /* Réduction légère des marges internes */
    white-space: nowrap; /* Empêche un mot seul de passer à la ligne */
}

.site-menu .nav-link.active {
    color: #000 !important;
}

.nav {
    margin-left: 0;
    padding-left: 0;
}


@media (max-width: 480px) {
    .site-menu {
        justify-content: center !important; /* Centre le menu sur mobile */
    }
}

.nav > li > a:hover{
    color: black;
}

.nav-header {
    position: relative;
    z-index: 1000;
}



/* --- Titre : les dessous de la fiche de paie --- */
.titre-principal {
    font-size: clamp(8rem, 15vw, 25rem);
    font-family: 'Anton';
    line-height: 0.95;
    text-align: center;
    margin-top: 20px;
    color: var(--beige-clair);
    opacity: 0; /* Masqué au départ */
    animation: fadeIn 1.5s ease-out forwards;
    animation-delay: 0.5s; /* Petit délai avant de commencer */
}

/* --- Texte au dessus de la FDP --- */
.section-texte {
    padding: 150px 0;
    position: relative;
    z-index: 200;
}


.texte-description {
    position: relative;
    z-index: 201;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: justify;
    font-family: 'barlow';
}

/* --- *** textes autour du titre  *** --- */
.texte-autour-titre {
        font-family: 'Barlow';
        font-style: italic;
        font-size: 1.3rem; 
               
    }


#TaT-1 {
        position: relative;
        transform: rotate(10deg);
        top: 15%!important;
    }

#TaT-2 {
        transform: rotate(10deg);
         position: relative;
    }

#TaT-3 {
        transform: rotate(-15deg);
        position: relative;
        bottom: 15%;;   
    }

#TaT-4 {
        transform: rotate(-18deg);
        position: relative;   
        top: 15%!important;
    }

#TaT-5 {
        transform: rotate(-3deg);
        position: relative;  
        top: 20%!important;
    }

    
@media (max-width: 576px) {
    .texte-autour-titre {
        text-align: center;
        margin-bottom: 10px;
        padding-bottom: 10px;
        font-size: 1rem;
    }

    #TaT-1 {
        transform: rotate(5deg);
        padding-top: 7%;
    }

    #TaT-2 {
        transform: rotate(7deg);
        padding-top: 7%;
    }

    #TaT-3 {
        transform: rotate(-7deg);
        padding-top: 7%;
    }
    #TaT-4 {
        transform: rotate(10deg);
    }
    #TaT-5 {
        transform: rotate(-7deg);
    }
}

.perso-haut {
    position: absolute;
    max-width: 600px;
    z-index: 10;
    right: -35%;
    top: 15%;
}

/* --- SECTION NUAGE / BULLE --- */

.cloud-section .zone-image-texte {
    justify-content: center; /* Centre les colonnes horizontalement */
}

.cloud-section .image-container {
    margin: 0 auto;
}

.zone-image-texte {
    display: flex;
    flex-wrap: wrap;
}

.image-container {
    position: relative;
    width: 100%;
    max-width: 800px;   /* limite la taille sur grands écrans */
}

.image-container img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%; 
    max-width: 650px; 
    font-size: clamp(12px, 2.5vw, 18px);
    text-align: center; /* Centrer le texte améliore souvent le rendu sur mobile */
    font-family: 'Barlow';
    padding: 10px; 
}

@media (max-width: 768px) {
    /* 1. On force la colonne Bootstrap à centrer son contenu */
    .cloud-section .col-sm-12.d-flex {
        justify-content: center !important;
        align-items: center !important;
        min-height: 50vh; /* Optionnel : donne de la hauteur pour le centrage vertical */
        padding: 0;
    }

    /* 2. On s'assure que le conteneur de l'image est bien centré */
    .image-container {
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        width: 100%; /* Permet à l'image de prendre la place nécessaire */
        max-width: 400px; /* Limite la taille sur mobile pour ne pas déborder */
    }

    /* 3. L'image de la fleur doit rester fluide */
    .image-container .img-fluid {
        max-width: 100%;
        height: auto;
    }

    /* 4. Le texte par-dessus (overlay) */
    .overlay-text {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 85%; /* Largeur du texte à l'intérieur du cercle */
        text-align: center;
        margin: 0;
        padding: 0;
        z-index: 10;
    }
}


@media (max-width: 768px) {
  .col-3,
  .col-6 {
    width: 100%;
  }

  .col-6 {
    margin: 5px 0;
  }
}

.perso-bas {
    transform:scaleX(-1);
}

@media (max-width: 1400px) {
    .perso-bas {
        display: none;
    }

        .col-autour-nuage {
        display: none !important;
    }

    /* Force la colonne centrale à prendre toute la largeur pour centrer la fleur */
    .cloud-section .col-md-6 {
        width: 100%;
        justify-content: center;
    }
}

/* --- Texte : Payer des cotisations c'est financer...... --- */

.ligne-quote {
    position: absolute;
} 
.quote {
    font-style: italic;
    font-size: 1.6rem;
    color: var(--beige-clair);
    font-family: 'Anton';
    position : relative;
}


/* --------------------------------------------- */
/* --------------------------------------------- */
/* --------------------------------------------- */
/* Fiche de paie */
/* --- *** CSS DE LA FICHE DE PAIE *** --- */
/* --- VARIABLES ET STRUCTURE DE BASE --- */
:root {
    --payslip-blue: #273582;
    --payslip-red: #b4294f;
    --payslip-red2: #783160;
    --payslip-purple: #62337e;
    --payslip-orange: #ec9b00;
    --payslip-bg: #f8f9fa;
    --payslip-marron: #b84044;
    --payslip-total-employeur: #302683;
}

/* --- SECTION FRISE --- */

.frise-wrapper {
    width: 100%;
    max-width: 900px; /* Doit être identique à .payslip-card-fixed */
    line-height: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 2.5s ease-out, transform 2.5s ease-out;
}

/* Classe qui sera ajoutée en JavaScript lors du scroll */
.frise-wrapper.visible {
    opacity: 1;
    transform: translateY(0);
}

.img-frise {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0;
    }

.frise-wrapper img {
    /* Si votre tableau a des ombres ou des bordures, 
       ajustez le padding ici pour que les bords s'alignent visuellement */
    padding: 0; 
    border-radius: 5px; /* Optionnel : pour suivre l'arrondi de votre carte */
    max-width: 900px;
}

.frise-wrapper img:hover {
        filter: brightness(1.5);
}

.ps-integration-wrapper {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column; /* Empile frise puis FDP */
    align-items: center;
    overflow: visible; /* Empêche tout débordement accidentel */
    position: relative;
    margin: 0 auto;
    height: auto; 
    overflow: visible;
    margin-bottom: 50px; /* Espace avant la section IHS */
}

.payslip-card-fixed {
    background: white;
    width: 100%; /* S'adapte à la largeur du parent */
    max-width: 900px; /* Taille maximale en desktop */
    
    /* Ratio A4 */
    aspect-ratio: 21 / 29.7; 
    
    padding: 20px;
    font-size: 0.8rem;
    color: #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    
    /* Supprime les anciennes transformations */
    transform: none !important;
    height: auto;
    flex-shrink: 0;

    position: relative;
    /* On retire overflow: hidden s'il existe pour voir ce qui dépasse */
    overflow: visible !important;
    filter: brightness(85%);
    z-index: 10;
    position : relative;

    display: block; 
    float: none;
    clear: both;
}

/* Ajustement dynamique des textes pour le mobile */
@media (max-width: 991px) {
    .payslip-card-fixed {
        font-size: clamp(0.35rem, 1.5vw, 0.75rem); 
        padding: 8px; /* Réduction du padding interne de la carte */
    }

    .table-payslip td {
        /* Réduction du padding des cellules pour éviter que le texte ne pousse les colonnes */
        padding: 2px 3px !important;
    }

    .table-payslip thead th {
        font-size: 0.75em;
        padding: 2px 1px;
    }
}

/* --- TABLEAU --- */

.master-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Maintient le format A4 global */
}

.info-employer { 
    width: 55%; 
    vertical-align: top; 
    padding-bottom: 20px; 
    word-wrap: break-word;
}
.info-employee { 
    width: 45%; 
    vertical-align: top; 
    padding: 30px 0 0 20px; 
    word-wrap: break-word;
}

.table-payslip {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em; 
    table-layout: fixed; /* Indispensable pour respecter les % définis en HTML */
}

/* Ajustement des cellules : on autorise le texte à respirer */
.table-payslip td {
    padding: 3px 5px;
    position: relative;
    overflow: visible; /* modifié  hidden car icones tronquées */
    word-wrap: break-word; 
    white-space: normal;   /* Autorise le retour à la ligne pour les libellés longs */
    vertical-align: middle;
    border-left: 1px solid #dee2e6; 
    border-right: 1px solid #dee2e6;
}

.table-payslip td:nth-child(2) {
    padding-left: 5px !important; /* On remet un padding normal car l'icône flotte */
}


/* On force les chiffres à rester sur une seule ligne pour éviter les décalages */
.table-payslip td.text-end, 
.table-payslip td.col-salaries, 
.table-payslip td.col-employeur,
.table-payslip td.salaire-base {
    font-size: 0.9em; 
        letter-spacing: -0.5px; /* On resserre légèrement les chiffres */
}

/* Style des entêtes */
.header-box {
    background-color: var(--payslip-blue);
    color: white;
    padding: 15px;
}

.table-payslip thead th { 
    background-color: var(--payslip-blue); 
    color: white; 
    border: 1px solid #fff; 
    text-align: center;
    vertical-align: middle;
    font-size: 0.8em;
    padding: 4px 2px;
}

/* --- COULEURS SPÉCIFIQUES de la fiche de paie --- */
.col-salaries { background-color: var(--payslip-red); color: white; text-align: right; }
.col-employeur { background-color: var(--payslip-purple); color: white; text-align: right; }
.salaire-base { background-color: var(--payslip-red2); color: white; text-align: right; }
.row-category { font-weight: bold; background-color: #fff; }

.net-impot-value { 
    background-color: var(--payslip-marron); 
    color: white; 
    font-size: 1.4rem; 
    padding: 8px 20px; 
}

.border-blue { border: 2px solid var(--payslip-blue); }
.cell-tax-amount { background-color: var(--payslip-marron) !important; color: white !important; }
.cell-net-paid { background-color: var(--payslip-orange) !important; color: white !important; }
.cell-total-employer { background-color: var(--payslip-total-employeur) !important; color: white !important; }

/* --- Icones bootstrap --- */
/* 1. Style pour les icônes des LÉGENDES (à gauche) */
.label-attaque strong i.bi {
    font-size: 1.5rem !important; /* Taille ajustée pour ne pas déborder */
    margin-right: 0.8rem;
    vertical-align: baseline;
    display: inline-block;
}

/* 2. Style pour les icônes du TABLEAU (Fiche de paie) */
.ps-icon {
    position: absolute;
    left: 8px; /* Ajusté pour être bien visible */
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem !important;
    line-height: 1;
    z-index: 10;
    overflow: visible;
}

/* 3. PALETTE DE COULEURS UNIQUE (S'applique aux deux grâce aux classes) */

/* Salaires */
.leg-salaires, .fdp-salaires { color: #f8e71c !important; }
/* Exonérations */
.leg-cotisoc, .fdp-cotisoc { color: #ff9f43 !important; }
/* Santé */
.leg-sante, .fdp-sante { color: #55efc4 !important; }
/* Retraites */
.leg-retraites, .fdp-retraites { color: #a29bfe !important; }
/* Chômage */
.leg-chomage, .fdp-chomage { color: #74b9ff !important; }
/* Famille */
.leg-prestafam, .fdp-prestafam { color: #fab1a0 !important; }
/* Accidents du travail */
.leg-atmp, .fdp-atmp { color: #ff7675 !important; }
/* Services Publics */
.leg-spub, .fdp-spub { color: #81ecec !important; }

/* 4. Ajustement final de la cellule pour éviter que l'icône soit tronquée */
.table-payslip td:nth-child(2) {
    padding-left: 38px !important; 
    position: relative;
    overflow: visible !important;
}

/* --------------------------------------------- */
/* STYLES DES FENETRES MODALES
/* --------------------------------------------- */

.modal-title {
    color: rgb(126, 0, 0);
}


/* Style optionnel pour le titre dans la modale */
.font-anton {
    font-family: 'Anton', sans-serif;
}

.texte-modale {
    font-family: 'Barlow',
}

.pictos {
    position: absolute;
    max-width:50px;
} 

/* icônes flottantes */
.picto-flottant {
    position: absolute;
    z-index: 100;
    max-width: 80px; /* Ajustez selon vos besoins */
    height: auto;
    /* Positionnement par défaut : en haut à droite de la cellule  top: -10px; 
    right: -20px; */
   
    /* filtre pour qu'ils ressortent */
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 3s ease-out, transform 3s ease-out;
}

/* État final quand la classe 'visible' est ajoutée */
.picto-flottant.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Effet de zoom et de brillance au survol */
.picto-flottant:hover {
    transform: scale(1.2); /* L'icône grossit légèrement */
    filter: brightness(1.2) drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

/* apparition des pictos */ 

#icone-cc { transition-delay:0.4s; }
#icone-classif { transition-delay: 0.6s; }
#icone-qualif { transition-delay: 1s; }
#icone-brut { transition-delay: 2.5s; }
#icone-sante { transition-delay: 1.5s; }
#icone-retraite { transition-delay: 2.5s; }
#icone-chomage { transition-delay: 1.3s; }
#icone-csg { transition-delay: 3.7s; }
#icone-netfisc { transition-delay: 2s; }
#icone-net { transition-delay: 0.2s; }
#icone-ir { transition-delay: 2.8s; }
#icone-conges { transition-delay: 5s; }

/* --------------------------------------------- */
/*  POSITIONNNEMENT DES PICTOS SUR LA FICHE DE PAIE
/* --------------------------------------------- */

#icone-cc {
    left: 25%;
    top: 15%;
}

#icone-classif {
    left: 15%;
    top: 20%;
}

#icone-qualif {
    left: 20%;
    top: 25%;
}

#icone-brut {
    left: -15%;
    top: -80%;
}

#icone-sante {
    left: 60%;
    top: -80%;
}

#icone-retraite {
    left: 65%;
    top: 60%;
}

#icone-chomage {
   left: -15%;
    top: -15%;
}

#icone-csg {
    left: 95%;
    top: -90%;
}

#icone-netfisc {
    left: 50%;
    top: -90%;
}

#icone-net {
    right: 15%;
    top: 70%;
}

#icone-ir {
    left: 60%;
    top: -70%;
}

#icone-conges {
    
}

/* --------------------------------------------- */
/*         FLECHES A COTE DE LA FICHE DE PAIE
/* --------------------------------------------- */

/* Conteneur des flèches */
.fleches-indication-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 900px;
    height: 100%;
    z-index: 20;
    pointer-events: none;
    padding-right: 10px; /* Ajoute une petite marge de sécurité à droite */
}

.fleches-indication-wrapper img {
    pointer-events: auto;
    position: absolute;
    right: -10px;
}

/* Positionnement spécifique pour les grands écrans */
@media (min-width: 992px) {
    .fleches-indication-wrapper {
        position: absolute;
        top: 0;
        right: -60px; /* Ajustez pour les mettre sur le côté droit de la fiche */
        flex-direction: column;
        width: auto;
        height: 100%;
        justify-content: center;
        gap: 20px;
    }
}

.fleches {
    width: clamp(70px, 7vw, 130px) !important; 
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative; 
    z-index: 25;
}

@media (min-width: 992px) {
    .fleches {
        max-width: 130px; /* Taille normale pour desktop */
    }
}

.fleches:hover {
    transform: scale(1.1);
}

#fleche-1 {
    top: 28%; 
}

#fleche-2 {
    top: 42%; 
}

/*
#fleche-1 {
    top: 30%;
    width: 6vw;
    height: auto;
}

#fleche-2 {
    top: 45%;
    width: 6vw;
    height: auto;
}*/

/* --------------------------------------------- */
/* SECTION DES IMAGES DE MAGAZINES */
/* --------------------------------------------- */
      
.custom-layout-wrapper {
    
    padding: 60px 40px;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 50%; /* Ajustez le pourcentage selon la réduction souhaitée */
    margin: 0 auto; /* Garde le bloc centré après réduction */
}

/* Container de l'image de fond (celle de droite) */
.custom-bg-image-container {
    position: absolute;
    right: 5%;
    width: 60%;
    z-index: 1;
}

/* Container de l'image du magazine (celle de gauche/devant) */
.custom-magazine-container {
    position: relative;
    width: 75%;
    z-index: 2;
    /* Légère inclinaison pour l'effet vintage si souhaité */
    transform: rotate(-1deg); 
    box-shadow: 15px 15px 30px rgba(0,0,0,0.3);
}

/* Styles pour les blocs de légendes noirs */
.custom-caption {
    background-color: #000;
    color: #fff;
    position: absolute;
    bottom: 15%;
    left: -20px; /* Dépasse légèrement de l'image */
    max-width: 80%;
    line-height: 1.2;
}

.custom-bg-image-container .custom-caption {
    bottom: 10%;
    left: 10%;
}

/* Ajustement pour mobile */
@media (max-width: 768px) {
    .custom-layout-wrapper {
        padding: 20px 10px;
        min-height: 500px;
    }
    .custom-magazine-container {
        width: 90%;
    }
}

/* ------------------------------------- */
/* MODALE 1 : Que financent les cotisation */
/* ------------------------------------- */
        :root {
            --card-red: #d41d24;
            --gold: #f7941d;
            --payslip-red: #b4294f;
            --payslip-red2: #783160;
            --payslip-purple: #62337e;
            --payslip-orange: #ec9b00;
            --payslip-bg: #f8f9fa;
            --payslip-marron: #b84044;
            --payslip-total-employeur: #302683;
        }

        .main-container {
           /*  background-color: var(--bg-yellow); */
            padding: 30px 15px;
            color: #000;
            border-radius: 8px;
        }

        .title-main {
            color: var(--card-red);
            font-weight: 900;
            text-transform: uppercase;
            font-size: clamp(1.2rem, 5vw, 2rem);
        }

        .subtitle {
            font-size: 1rem;
            font-weight: 600;
            line-height: 1.3;
            margin-bottom: 40px;
        }

        /* Conteneur d'une colonne de cotisation */
        .cotis-column {
            display: flex;
            flex-direction: column;
            margin-bottom: 20px;
        }

        .amount {
            font-weight: 800;
            font-size: 1.25rem;
            margin-bottom: 8px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .cotisation-card {
            background-color: var(--card-red);
            color: white;
            padding: 12px 8px;
            /* Changement clé : min-height au lieu de height fixe */
            min-height: 160px; 
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }

        .card-details {
            font-size: 0.75rem;
            line-height: 1.2;
            word-wrap: break-word;
        }

        .category-label {
            font-weight: 800;
            text-transform: uppercase;
            font-size: 0.75rem;
            margin-top: 12px;
            min-height: 40px; /* Aligne les labels sur une même ligne */
            display: flex;
            justify-content: center;
            align-items: flex-start;
        }

        /* Ajustements spécifiques pour petits mobiles */
        @media (max-width: 400px) {
            .cotisation-card { min-height: auto; }
            .card-details { font-size: 0.85rem; }
        }

/* ----------------------- */
/* Modale 2 : Explications */
/* ----------------------- */

        .main-wrapper {
           /*  background-color: var(--bg-yellow); */
            padding: 15px;
            max-width: 700px;
            margin: 20px auto;
            /* box-shadow: 0 10px 30px rgba(0,0,0,0.1); */
        }

        /* Lignes de données */
        .data-row {
            display: flex;
            margin-bottom: 4px;
            color: white;
            min-height: 45px;
        }

        .amount-side {
            width: 120px;
            padding: 10px;
            font-weight: bold;
            font-size: 1.1rem;
            flex-shrink: 0;
            display: flex;
            align-items: flex-start;
        }

        .content-side {
            flex-grow: 1;
            padding: 10px 15px;
        }

        .content-side ul {
            margin: 5px 0 0 0;
            padding-left: 20px;
            font-size: 0.9rem;
        }

        /* Couleurs des sections */
        .section-employer { background-color: var(--payslip-total-employeur); }
        .section-patronale { background-color: var(--payslip-purple); }
        .section-brut { background-color: var(--payslip-red2); }
        .section-salariale { background-color: var(--payslip-red); }
        .section-net { background-color: var(--payslip-marron); }
        .section-tax { background-color: var(--payslip-marron); }
        .section-final { background-color: var(--gold); }

        .label-title { font-weight: bold; display: block; }

        /* Adaptabilité Mobile */
        @media (max-width: 576px) {
            .data-row { flex-direction: column; }
            .amount-side { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.2); }
        }

        /* --- 1. FEMME FLEUR (HAUT DE PAGE) --- */
#image-perso-droits {
    opacity: 0;
    transform: scale(0.3);
    transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#image-perso-droits.is-visible {
    opacity: 1;
    transform: scale(1); /* Ajoutez vos translate PC ici si besoin */
}

/* --- 2. FLEUR RONDE & PERSO BAS (SCROLL) --- */
#fleur-ronde, #perso-bas {
    opacity: 0;
    transform: scale(0.5) translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

#fleur-ronde.is-visible, #perso-bas.is-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* --- ****************************** --- */
/* --- ********* IMAGES IHS ********* --- */
/* --- ****************************** --- */


/* À AJOUTER (EFFET PILE DE PAPIERS) */
.carousel-container.paper-stack {
    position: relative;
    height: 750px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-item-custom {
    position: absolute;
    max-width: 600px;
    width: 90%;
    /* On définit l'aspect "papier" par défaut (en dessous) */
    opacity: 0.6;
    transform: rotate(-5deg) translateY(20px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.carousel-item-custom.active {
    opacity: 1;
    z-index: 10;
    transform: rotate(0deg) translateY(0) scale(1); /* Devient droit et net */
}

.document-paper {
    background: white;
    padding: 10px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.carousel-item-custom.exit {
    transform: translateX(120%) rotate(15deg); /* Glisse sur le côté au clic */
    opacity: 0;
}

/* ****************************** */
/* carrousel */
/* ****************************** */

/* --- CARROUSEL INTERACTIF --- */
#section-pince-finale {
    clear: both; /* Force la section à descendre après tout élément flottant */
    position: relative;
    padding-top: 40px; /* Marge de sécurité supplémentaire */
    padding: 80px 0;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/* Slide visible */
.carousel-item-custom.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) scale(1);
    z-index: 2;
}

/* Animation de sortie (vers la gauche) */
.carousel-item-custom.exit {
    transform: translateX(-50px) scale(0.95);
    opacity: 0;
}

/* --- BOUTONS --- */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: white;
    border: 2px solid var(--beige-clair);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    z-index: 10;
    cursor: pointer;
    transition: 0.3s;
}

/* --- EFFET HOVER SUR LES BOUTONS --- */
.carousel-control {
    /* ... vos propriétés actuelles ... */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Transition "élastique" */
}

.carousel-control:hover {
    background-color: transparent; /* Utilisation de votre jaune global */
    color: white;
    border-color: white;
    transform: translateY(-50%) scale(1.15); /* Grossit légèrement tout en restant centré verticalement */
    box-shadow: 0 0 20px rgba(248, 231, 28, 0.4); /* Halo lumineux discret */
}

/* Petit effet au clic (pression) */
.carousel-control:active {
    transform: translateY(-50%) scale(0.95);
    transition: duration 0.1s;
}

.carousel-control:hover { 
    color: white; }
    

.prev { left: -20px; }

.next { right: -20px; }

.carousel-control.prev:hover {
    padding-right: 5px; /* Pousse l'icône vers la gauche visuellement */
}

.carousel-control.next:hover {
    padding-left: 5px; /* Pousse l'icône vers la droite visuellement */
}

/* --- LÉGENDES --- */
.wrapper-ihs { position: relative; display: inline-block; }
.legende-noire {
    position: absolute;
    bottom: 5%;
    left: -5%;
    background: #000;
    color: #fff;
    padding: 15px;
    width: 80%;
    max-width: 350px;
    box-shadow: 10px 10px 20px rgba(0,0,0,0.5);
}
.legende-texte { font-family: 'Anton'; text-transform: uppercase; margin: 0; font-size: 1rem; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .carousel-container { height: 450px; }
    .carousel-item-custom { left: 0; width: 100%; }
    .prev { left: 5px; }
    .next { right: 5px; }
    .legende-noire { width: 90%; left: 5%; bottom: -10px; position: relative; }
}

/* -------- 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 ton 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;
}

/* liens des modales */
.plus-loin {
    text-decoration: none;
    color: rgb(43, 43, 43);
}

.plus-loin:hover {
    text-decoration: none;
    color: rgb(107, 1, 1);
    font-weight: bolder;
}


/* Animation titre + textes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.5) rotate(0deg); }
    70% { transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1) rotate(var(--rotation-finale)); }
}