/****  ANIMATIONS  ****/
@keyframes slideWaveLeft {
    0% {
        transform: translateX(-120px) translateY(20px);
        opacity: 0;
    }

    50% {
        transform: translateX(-20px) translateY(-10px);
        opacity: 0.7;
    }

    100% {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
}

@keyframes slideWaveRight {
    0% {
        transform: translateX(120px) translateY(-20px);
        opacity: 0;
    }

    50% {
        transform: translateX(20px) translateY(10px);
        opacity: 0.7;
    }

    100% {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
}

.animate-left {
    animation: slideWaveLeft 1s ease-out forwards;
}

.animate-right {
    animation: slideWaveRight 1s ease-out forwards;
}

/* Éléments cachés avant animation */
.animate-element {
    opacity: 0;
    transform: translateX(-120px);
}

.animate-element.from-right {
    transform: translateX(120px);
}

/* carrousel*/

/* Carrousel infini */
.carousel-section {
    padding: 60px 0;
    overflow: hidden;
}

.carousel-container {
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    width: calc(300px * 24); /* 24 images total (12 + 12 dupliquées) * 300px */
    animation: scroll-infinite 30s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    margin-right: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.carousel-img:hover {
    transform: scale(1.05);
}

@keyframes scroll-infinite {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-300px * 12 - 20px * 12)); /* 12 images + marges pour revenir au début */
    }
}

/* Responsive carrousel */
@media (max-width: 768px) {
    .carousel-track {
        width: calc(250px * 24);
        animation: scroll-infinite-mobile 30s linear infinite;
    }
    
    .carousel-img {
        width: 250px;
        height: 150px;
        margin-right: 15px;
    }
    
    @keyframes scroll-infinite-mobile {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-250px * 12 - 15px * 12));
        }
    }
}