/* ============================================
   SLIDER COVERFLOW - RÉUTILISABLE
   ============================================ */

/* Section slider */
.coverflow-slider-section {
    position: relative;
    padding: 2rem 0 4rem;
    background: #f8f8f8;
    overflow: hidden;
}

.coverflow-slider-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 400px;
    margin: 0 auto;
    perspective: 1000px;
}

.coverflow-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.coverflow-slide {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 55%;
    max-width: 550px;
    transform: translate(-50%, -50%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.coverflow-slide img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Slide actif au centre */
.coverflow-slide.active {
    opacity: 1;
    z-index: 3;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
    cursor: pointer;
}

/* Slide précédent à gauche */
.coverflow-slide.prev {
    opacity: 0.7;
    z-index: 2;
    pointer-events: auto;
    transform: translate(-143%, -50%) scale(0.85);
    cursor: pointer;
}

/* Slide suivant à droite */
.coverflow-slide.next {
    opacity: 0.7;
    z-index: 2;
    pointer-events: auto;
    transform: translate(43%, -50%) scale(0.85);
    cursor: pointer;
}

/* Barre de progression sur l'image active */
.coverflow-slide .slide-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.coverflow-slide.active .slide-progress {
    opacity: 1;
}

.coverflow-slide .slide-progress-fill {
    height: 100%;
    width: 100%;
    background: white;
    transform-origin: left;
    transform: scaleX(0);
}

/* Flèches discrètes */
.coverflow-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0.5;
}

.coverflow-arrow:hover {
    background: white;
    opacity: 1;
}

.coverflow-arrow svg {
    width: 18px;
    height: 18px;
    stroke: #333;
}

.coverflow-prev {
    left: -30%;
}

.coverflow-next {
    right: -30%;
}

/* Dots de navigation */
.coverflow-dots {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.coverflow-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.coverflow-dot:hover {
    background: rgba(0, 0, 0, 0.5);
}

.coverflow-dot.active {
    background: #000;
    transform: scale(1.2);
}

/* Lightbox */
.coverflow-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.coverflow-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.coverflow-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: none;
    border: none;
    outline: none;
}

.coverflow-lightbox .lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 50px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.3s ease;
}

.coverflow-lightbox .lightbox-close:hover {
    transform: scale(1.1);
}

/* ===== RESPONSIVE TABLETTE (1024px) ===== */
@media (max-width: 1024px) {
    .coverflow-slider-container {
        height: 350px;
    }
    
    .coverflow-slide {
        width: 60%;
    }
    
    .coverflow-prev {
        left: -25%;
    }
    
    .coverflow-next {
        right: -25%;
    }
}

/* ===== RESPONSIVE MOBILE (768px) ===== */
@media (max-width: 768px) {
    .coverflow-slider-section {
        padding: 1.5rem 0 3rem;
    }
    
    .coverflow-slider-container {
        height: 280px;
    }
    
    .coverflow-slide {
        width: 75%;
    }
    
    .coverflow-slide.prev {
        transform: translate(-120%, -50%) scale(0.8);
    }
    
    .coverflow-slide.next {
        transform: translate(20%, -50%) scale(0.8);
    }
    
    .coverflow-arrow {
        width: 35px;
        height: 35px;
    }
    
    .coverflow-prev {
        left: -20%;
    }
    
    .coverflow-next {
        right: -20%;
    }
}
