/* Logo Carousel Styles - Version avec Flex */
.logo-carousel-container {
    margin: 2rem 0;
}

.carousel-container {
    width: 100vw;
    overflow: hidden;
    background: #ffffff;
    padding: 2rem 0;
    position: relative;
    margin-left: calc(-50vw + 50%);
}

.carousel-track {
    display: flex;
    gap: 60px;
    animation: scroll-left 45s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.logo-slide {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 90px;
    padding: 0;
    background: transparent;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    /* Assurer que les clics fonctionnent */
    pointer-events: auto;
    z-index: 1;
    position: relative;
}

.logo-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: grayscale(30%) opacity(0.8);
    transform-origin: center center;
    transition: transform 0.3s ease, filter 0.3s ease;
    will-change: transform;
    backface-visibility: hidden;
    /* Empêcher les clics sur l'image pour que ce soit le parent qui reçoit l'événement */
    pointer-events: none;
}

.logo-slide:hover img {
    transform: scale(1.005);
    filter: grayscale(0%) opacity(1);
}

/* Gradient fade aux bords pour effet infini */
.carousel-container::before,
.carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.carousel-container::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 100%);
}

.carousel-container::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 100%);
}

/* Popup Styles - Version avec Flex */
.logo-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.logo-popup-overlay.show {
    opacity: 1;
}

.logo-popup-content {
    position: relative;
    background: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-50px);
    transition: transform 0.3s ease;
}

.logo-popup-overlay.show .logo-popup-content {
    transform: translateY(0);
}

.logo-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.logo-popup-close:hover {
    background: #f0f0f0;
    color: #333;
}

.logo-popup-header {
    padding: 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-popup-header img {
    max-width: 120px;
    max-height: 60px;
    object-fit: contain;
}

.logo-popup-header h2 {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.logo-popup-body {
    padding: 30px;
}

.logo-popup-body p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 16px;
}

/* Container d'images avec Flex - Nom de classe modifié */
.popup-images-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    justify-content: flex-start;
}

.popup-images-container img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: pointer;
    flex: 0 0 auto;
}

.popup-images-container img:hover {
    transform: scale(1.05);
}

#popup-images{
    display: flex ;
    gap:2rem;
    margin-top: 1rem;
}

#popup-images img{
    width: 150px;
    max-width: 100%;
}

#popup-description {
    line-height: 1.5em!important;
}
/* Animations par défaut */
@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-container {
        padding: 40px 0;
    }
    
    .carousel-track {
        gap: 40px;
    }
    
    .logo-slide {
        width: 140px;
        height: 70px;
    }
    
    .carousel-container::before,
    .carousel-container::after {
        width: 60px;
    }
    
    .logo-popup-content {
        margin: 10% auto;
        max-width: 95%;
    }
    
    .logo-popup-header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .logo-popup-body {
        padding: 20px;
    }
    
    .popup-images-container {
        gap: 10px;
        justify-content: center;
    }
    
    .popup-images-container img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        padding: 30px 0;
    }
    
    .carousel-track {
        gap: 30px;
    }
    
    .logo-slide {
        width: 120px;
        height: 60px;
    }
    
    .carousel-container::before,
    .carousel-container::after {
        width: 40px;
    }
    
    .logo-popup-header h2 {
        font-size: 20px;
    }
    
    .popup-images-container {
        gap: 12px;
        margin-top: 20px;
        justify-content: center;
    }
    
    .popup-images-container img {
        width: 90px;
        height: 68px;
    }
}