.sticky-animation-section {
    position: relative;
    background-color: #1e1e1e;
    color: white;
}

/* Ce conteneur a une grande hauteur pour permettre au scroll de piloter l'animation */
.sticky-animation__scroll-driver {
    height: 200vh;
    position: relative;
}

/* C'est cet élément qui sera "collé" en haut de l'écran */
.sticky-animation__pinned-element {
    height: 100vh;
    width: 100%;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Centrage vertical */
    align-items: center;
    overflow: hidden;
    /* Important pour le pinning */
}

.sticky-animation__content {
    text-align: center;
    width: 100%;
    max-width: 35rem;
    padding: 2rem;
    position: absolute;
    /* Le texte sort du flux */
    top: 20%;
    /* On le positionne un peu plus bas */
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    /* Pour qu'il soit au-dessus de l'image au départ */
}

.sticky-animation__content p {
    text-transform: uppercase;
    font-family: 'RMMono', sans-serif;
    font-size: .75rem;
    font-weight: 400;
    line-height: 1.07;
    position: relative;
    color: white;
    margin: 0;
}

/* Le conteneur de l'image qui va grandir */
.animation-box {
    width: 33%;
    /* Taille de départ */
    max-width: 400px;
    /* margin: 0 auto; */
    /* Centré, plus de marge en haut */
    border-radius: 1em;
    position: relative;
    z-index: 1;
    /* Derrière le texte */
    padding: 35px;
    box-sizing: border-box;
}

.animation-box::before {
    content: '';
    display: block;
    padding-top: 56.25%;
    /* Ratio 16:9 */
}

/* L'image animée */
.animated-image {
    width: calc(100% - 70px);
    height: calc(100% - 70px);
    position: absolute;
    top: 35px;
    left: 35px;
    border-radius: 1em;
    overflow: hidden;
}

.animated-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay pour la couleur */
.animation-overlay {
    position: absolute;
    top: 35px;
    left: 35px;
    width: calc(100% - 70px);
    height: calc(100% - 70px);
    background-color: var(--orange-primary);
    opacity: 0.4;
    z-index: 2;
    /* Pour être au-dessus de l'image */
    pointer-events: none;
    /* Pour ne pas bloquer le curseur */
    border-radius: inherit;
    /* Hérite des bords arrondis du parent */
}

/* SVG Corners styling pour animated-image */
.animation-box .corner {
    position: absolute;
    width: 31px;
    height: 31px;
    color: #ffffff;
    z-index: 10;
}

.animation-box .corner.first {
    top: 10px;
    left: 10px;
}

.animation-box .corner.second {
    top: 10px;
    right: 10px;
}

.animation-box .corner.third {
    bottom: 10px;
    left: 10px;
}

.animation-box .corner.forth {
    bottom: 10px;
    right: 10px;
}

/* =============================================
   RESPONSIVE — MOBILE (≤768px)
   La pin (height: 100vh, position: sticky) est CONSERVÉE — c'est la base de
   l'anim ScrollTrigger. On adapte uniquement les tailles internes.
   ============================================= */
@media (max-width: 768px) {
    /* Mobile : animation désactivée en JS → bloc statique et COMPACT. On
       supprime le driver de 200vh et le pin, et on repasse le texte dans le
       flux (position: relative) juste au-dessus de l'image → plus de grand vide
       et texte/image rapprochés. */
    .sticky-animation__scroll-driver {
        height: auto;
    }

    .sticky-animation__pinned-element {
        position: relative;
        height: auto;
        justify-content: center;
        gap: 1.5rem;
        padding: 3.5em 1.25rem;
    }

    .sticky-animation__content {
        /* !important : sur la page manifeste, a-propos-new.css (chargé après)
           force position:absolute → on garantit le retour en flux sur mobile. */
        position: relative !important;
        top: auto;
        left: auto;
        transform: none;
        padding: 0;
        max-width: 92vw;
    }

    /* Le texte est repassé dans le flux (2 items flex) → l'astuce ::before pour
       la hauteur ne tient plus. On force la hauteur via aspect-ratio (fiable en
       flex) pour que l'image reste visible. */
    .animation-box {
        width: 80%;
        max-width: 340px;
        padding: 14px;
        aspect-ratio: 16 / 9;
    }

    .animation-box::before {
        display: none;
    }

    .animated-image,
    .animation-overlay {
        top: 14px;
        left: 14px;
        width: calc(100% - 28px);
        height: calc(100% - 28px);
    }

    .animation-box .corner {
        width: 22px;
        height: 22px;
    }
}