/*
====================================
   Carrousel Logos Clients
   Défilement logo par logo avec pause et zoom au survol
====================================
*/

.clients-carousel-section {
    background-color: #ffffff;
    padding: 80px 0 40px 0;
    border-top: none;
}

.clients-carousel-container {
    max-width: var(--breakpoint-desktop);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.clients-carousel-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    margin: 0 0 15px;
    color: var(--color-text);
}

.clients-carousel-wrapper {
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

/* Effet de dégradé sur les bords pour un effet professionnel */
.clients-carousel-wrapper::before,
.clients-carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.clients-carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #ffffff, transparent);
}

.clients-carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #ffffff, transparent);
}

.clients-carousel {
    display: flex;
    gap: 80px;
    /* Animation désactivée - gérée par JavaScript */
    will-change: transform;
    transition: none;
}

/* Pause au survol du carrousel */
.clients-carousel:hover {
    animation-play-state: paused;
}

/* Animation avec réinitialisation fluide */
@keyframes scroll-logos {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-100% / 3));
    }
}

.client-logo-item {
    flex-shrink: 0;
    width: 200px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-logo-inner {
    width: 100%;
    height: 100%;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-shadow: none;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

/* Effet de brillance au survol - désactivé */
.client-logo-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    transition: none;
    pointer-events: none;
}

.client-logo-inner:hover::before {
    background: transparent;
}

/* Zoom et élévation au survol */
.client-logo-inner:hover {
    transform: scale(1.15) translateY(-10px);
    box-shadow: none;
    z-index: 10;
}

.client-logo-inner img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    filter: grayscale(100%) opacity(0.7);
}

/* Image en couleur au survol */
.client-logo-inner:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

/* Placeholder pour les logos manquants */
.logo-placeholder {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-light);
    text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .clients-carousel-section {
        padding: 60px 0;
    }

    .clients-carousel-title {
        font-size: 1.6rem;
        margin-bottom: 40px;
    }

    .clients-carousel {
        gap: 60px;
    }

    .client-logo-item {
        width: 160px;
        height: 100px;
    }

    .clients-carousel-wrapper::before,
    .clients-carousel-wrapper::after {
        width: 60px;
    }
}

@media (max-width: 768px) {
    .clients-carousel-section {
        padding: 50px 0;
    }

    .clients-carousel-title {
        font-size: 1.4rem;
        margin-bottom: 30px;
    }

    .clients-carousel {
        gap: 40px;
        animation-duration: 15s;
    }

    .client-logo-item {
        width: 140px;
        height: 90px;
    }

    .client-logo-inner {
        padding: 15px;
    }

    .clients-carousel-wrapper::before,
    .clients-carousel-wrapper::after {
        width: 40px;
    }

    /* Sur mobile, pas de zoom au tap (éviter les problèmes d'interface) */
    .client-logo-inner:hover {
        transform: scale(1.05) translateY(-5px);
    }
}

@media (max-width: 480px) {
    .clients-carousel {
        gap: 30px;
    }

    .client-logo-item {
        width: 120px;
        height: 80px;
    }
}

/* Animation de chargement pour les images */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.client-logo-inner img {
    animation: fadeIn 0.5s ease-out;
}

/* Amélioration des performances */
.clients-carousel {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000px;
    perspective: 1000px;
}

.client-logo-inner {
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}


/* ON-EVENTS : désactiver les dégradés de bord du carrousel */
.on-events-carousel .clients-carousel-wrapper::before,
.on-events-carousel .clients-carousel-wrapper::after {
    display: none;
}
