/**
 * Section Images Projet - DÃ©filement avec Pin
 * wp-content/themes/custom-theme/src/assets/css/projet/images-projet.css
 */

/* ====================================
   ðŸŽ¯ SECTION IMAGES PROJET - PINNED
   ==================================== */
.images-projet-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    overflow: hidden;
}

.images-projet-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
    position: relative;
    z-index: 1;
    height: 100%;

    /* Centrer le contenu verticalement et horizontalement */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ====================================
   ðŸ“– CONTENU FIXE CENTRÃ‰
   ==================================== */
.images-projet-content {
    text-align: center;
    position: relative;
    z-index: 10; /* Images avec z-index > 10 passeront devant */
    pointer-events: none;
}

.images-projet-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    opacity: 0;
    transform: scale(0.5);
    position: relative;
    z-index: inherit;
}

.images-projet-badge img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.images-projet-badge svg {
    width: 30px;
    height: 30px;
    fill: var(--white);
}

.images-projet-title {
    font-family: var(--font-primary);
    font-size: var(--h1-size);
    font-weight: 900;
    color: var(--dark);
    margin-bottom: var(--space-sm);
    opacity: 0;
    position: relative;
    z-index: inherit;
}

.images-projet-subtitle {
    font-family: var(--font-secondary);
    font-size: var(--h4-size);
    font-weight: 400;
    color: var(--dark);
    margin-bottom: 0;
    opacity: 0;
    position: relative;
    z-index: inherit;
}

/* ====================================
   ARROW DOWN
   ==================================== */
.images-projet-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--space-lg);
    opacity: 0;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    z-index: inherit;
    pointer-events: auto;
}

.images-projet-arrow img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    animation: bounce 2s infinite;
}

.images-projet-arrow:hover {
    transform: translateY(5px);
}

/* Animation bounce pour la flÃ¨che */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ====================================
   ðŸ–¼ï¸ CONTENEUR DES IMAGES
   ==================================== */
.images-projet-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

.images-projet-item {
    position: absolute;
    width: 340px;
    height: auto;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100vh);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.images-projet-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ====================================
   ðŸŽ¨ POSITIONNEMENTS VARIÃ‰S
   ==================================== */
.images-projet-item:nth-child(1) { left: 5%; z-index: 5 !important; }
.images-projet-item:nth-child(2) { right: 8%; z-index: 20 !important; }
.images-projet-item:nth-child(3) { left: 10%; z-index: 3 !important; }
.images-projet-item:nth-child(4) { left: 50%; margin-left: -140px; z-index: 25 !important; }
.images-projet-item:nth-child(5) { right: 12%; z-index: 7 !important; }
.images-projet-item:nth-child(6) { left: 15%; z-index: 22 !important; }
.images-projet-item:nth-child(7) { left: 40%; z-index: 2 !important; }
.images-projet-item:nth-child(8) { right: 10%; z-index: 18 !important; }
.images-projet-item:nth-child(9) { left: 25%; z-index: 30 !important; }
.images-projet-item:nth-child(10) { right: 20%; z-index: 4 !important; }
.images-projet-item:nth-child(11) { left: 8%; z-index: 28 !important; }
.images-projet-item:nth-child(12) { right: 15%; z-index: 6 !important; }

/* ====================================
   ETATS VISIBLES
   ==================================== */
.images-projet-badge.visible {
    opacity: 1;
    transform: scale(1);
}

.images-projet-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.images-projet-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}

.images-projet-arrow.visible {
    opacity: 1;
    transform: translateY(0);
}

.images-projet-item.visible {
    opacity: 1;
}

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

@media (max-width: 2000px) {
.images-projet-item {
    position: absolute;
    width: 340px;
    height: auto;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100vh);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    }
}

@media (max-width: 1600px) {
    .images-projet-item {
        position: absolute;
        width: 250px;
        height: auto;
        border-radius: var(--border-radius-xl);
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: translateY(100vh);
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
}

@media (max-width: 968px) {
    .images-projet-section {
        min-height: 90vh;
    }

    .images-projet-arrow {
        margin-top: var(--space-md);
    }

    .images-projet-arrow img {
        width: 40px;
        height: 40px;
    }

    .images-projet-item {
        width: 200px;
    }

    .images-projet-item:nth-child(1) { left: 5%; top: 8%; }
    .images-projet-item:nth-child(2) { right: 5%; top: 30%; }
    .images-projet-item:nth-child(3) { left: 8%; top: 50%; }
    .images-projet-item:nth-child(4) { left: 50%; bottom: 12%; }
}

@media (max-width: 768px) {
    .images-projet-item {
        width: 160px;
    }

    .images-projet-badge {
        width: 50px;
        height: 50px;
    }

    .images-projet-badge svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .images-projet-section {
        min-height: 85vh;
    }

    .images-projet-arrow {
        margin-top: var(--space-sm);
    }

    .images-projet-arrow img {
        width: 35px;
        height: 35px;
    }

    .images-projet-item {
        width: 140px;
    }

    .images-projet-item:nth-child(n+7) {
        display: none;
    }
}

/* ====================================
   ðŸŽ­ OPTIMISATION PERFORMANCE
   ==================================== */
.images-projet-item,
.images-projet-badge,
.images-projet-title,
.images-projet-subtitle,
.images-projet-arrow {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.images-projet-section {
    contain: layout style;
}

/* ====================================
   ðŸ”§ FALLBACK SANS GSAP
   ==================================== */
.images-projet-section:not(.gsap-ready) .images-projet-badge,
.images-projet-section:not(.gsap-ready) .images-projet-title,
.images-projet-section:not(.gsap-ready) .images-projet-subtitle,
.images-projet-section:not(.gsap-ready) .images-projet-arrow {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

.images-projet-section:not(.gsap-ready) .images-projet-item {
    opacity: 0.8 !important;
    transform: translateY(0) !important;
}