/**
 * Sticky Scroll - Section "Nos Engagements"
 * Images centrées + texte qui défile verticalement
 * 
 * @version 1.0.0
 */

/* ========================================
   SMOOTH SCROLL (global)
======================================== */

html {
    scroll-behavior: smooth;
}

/* ========================================
   SECTION NOS ENGAGEMENTS
   Layout : Images + texte vertical (centre)
======================================== */

.sticky-scroll-section--engagements {
    position: relative;
    min-height: 220vh;
    overflow: visible;
}

.sticky-scroll-section--engagements .sticky-content-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
    pointer-events: none;
}

.sticky-scroll-section--engagements .sticky-content-wrapper > * {
    pointer-events: auto;
}

.sticky-scroll-section--engagements .scroll-content-wrapper {
    position: relative;
    z-index: 2;
    padding-top: 30vh;
    padding-bottom: 15vh;
}

.sticky-scroll-section--engagements .scroll-item {
    min-height: auto;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 5vh 0;
    opacity:1;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-scroll-section--engagements .scroll-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.sticky-scroll-section--engagements .scroll-item:first-child {
    padding-top: 10vh;
}

.sticky-scroll-section--engagements .scroll-item:last-child {
    padding-bottom: 20vh;
}

.sticky-scroll-section--engagements .scroll-item:nth-child(2) {
    transition-delay: 0.15s;
}

.sticky-scroll-section--engagements .scroll-item:nth-child(3) {
    transition-delay: 0.3s;
}

/* ========================================
   LAZY LOADING FIX
======================================== */

.sticky-scroll-section--engagements .scroll-item.bricks-lazy-hidden,
.sticky-scroll-section--engagements .scroll-item .bricks-lazy-hidden {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 768px) {
    .sticky-scroll-section--engagements {
        min-height: 240vh;
    }

    .sticky-scroll-section--engagements .scroll-content-wrapper {
        padding-top: 20vh;
        padding-bottom: 10vh;
    }

    .sticky-scroll-section--engagements .scroll-item {
        padding: 3vh 0;
    }

    .sticky-scroll-section--engagements .scroll-item:first-child {
        padding-top: 5vh;
    }

    .sticky-scroll-section--engagements .scroll-item:last-child {
        padding-bottom: 15vh;
    }
}

/* ========================================
   ACCESSIBILITÉ
======================================== */

@media (prefers-reduced-motion: reduce) {
    .sticky-scroll-section--engagements .scroll-item {
        transition: none;
        opacity: 1;
        transform: none;
    }
}
