/**
 * LZ4 Carousel - Styles Frontend
 * Carrousel avec texte fixe en overlay
 */

/* ==========================================================================
   Container principal
   ========================================================================== */

.lz4-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #1a1a1a;
}

/* ==========================================================================
   Slides
   ========================================================================== */

.lz4-carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.lz4-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    will-change: opacity, transform;
}

.lz4-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* Animation Slide (glissement) */
.lz4-carousel-wrapper[data-animation="slide"] .lz4-slide {
    transform: translateX(100%);
    opacity: 1;
    visibility: visible;
}

.lz4-carousel-wrapper[data-animation="slide"] .lz4-slide.active {
    transform: translateX(0);
}

.lz4-carousel-wrapper[data-animation="slide"] .lz4-slide.prev {
    transform: translateX(-100%);
}

/* ==========================================================================
   Overlay avec texte fixe
   ========================================================================== */

.lz4-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    display: flex;
}

.lz4-text-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 40px;
    box-sizing: border-box;
}

/* Alignements horizontaux */
.lz4-text-container.lz4-h-left {
    align-items: flex-start;
    text-align: left;
}

.lz4-text-container.lz4-h-center {
    align-items: center;
    text-align: center;
}

.lz4-text-container.lz4-h-right {
    align-items: flex-end;
    text-align: right;
}

/* Alignements verticaux */
.lz4-text-container.lz4-v-top {
    justify-content: flex-start;
}

.lz4-text-container.lz4-v-middle {
    justify-content: center;
}

.lz4-text-container.lz4-v-bottom {
    justify-content: flex-end;
}

/* Styles du texte */
.lz4-title {
    margin: 0 0 15px 0;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    max-width: 800px;
}

.lz4-subtitle {
    margin: 0;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    line-height: 1.5;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    opacity: 0.9;
}

/* ==========================================================================
   Navigation (flèches)
   ========================================================================== */

.lz4-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.lz4-nav:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.lz4-nav:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.lz4-nav svg {
    width: 24px;
    height: 24px;
}

.lz4-prev {
    left: 20px;
}

.lz4-next {
    right: 20px;
}

/* ==========================================================================
   Points de navigation (dots)
   ========================================================================== */

.lz4-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 12px;
}

.lz4-dot {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.lz4-dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.lz4-dot.active {
    background: white;
    border-color: white;
}

.lz4-dot:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* ==========================================================================
   États et messages
   ========================================================================== */

.lz4-no-slides {
    padding: 60px 20px;
    text-align: center;
    color: #666;
    font-style: italic;
    background: #f5f5f5;
    border-radius: 8px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .lz4-text-container {
        padding: 25px;
    }
    
    .lz4-nav {
        width: 40px;
        height: 40px;
    }
    
    .lz4-nav svg {
        width: 20px;
        height: 20px;
    }
    
    .lz4-prev {
        left: 10px;
    }
    
    .lz4-next {
        right: 10px;
    }
    
    .lz4-dots {
        bottom: 15px;
        gap: 8px;
    }
    
    .lz4-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .lz4-text-container {
        padding: 20px;
    }
    
    .lz4-title {
        font-size: 1.5rem;
    }
    
    .lz4-subtitle {
        font-size: 0.9rem;
    }
    
    .lz4-nav {
        width: 35px;
        height: 35px;
    }
}

/* ==========================================================================
   Animations d'entrée
   ========================================================================== */

.lz4-carousel-wrapper.loaded .lz4-title {
    animation: lz4-fadeInUp 0.8s ease-out;
}

.lz4-carousel-wrapper.loaded .lz4-subtitle {
    animation: lz4-fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes lz4-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Pause au survol (accessibilité)
   ========================================================================== */

.lz4-carousel-wrapper:hover .lz4-slide,
.lz4-carousel-wrapper:focus-within .lz4-slide {
    /* Optionnel: pause les transitions au survol */
}

/* ==========================================================================
   Mode haute contraste
   ========================================================================== */

@media (prefers-contrast: high) {
    .lz4-nav {
        background: black;
        border: 2px solid white;
    }
    
    .lz4-dot {
        border-width: 3px;
    }
}

/* ==========================================================================
   Réduction des animations (accessibilité)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .lz4-slide {
        transition: opacity 0.1s ease;
    }
    
    .lz4-carousel-wrapper.loaded .lz4-title,
    .lz4-carousel-wrapper.loaded .lz4-subtitle {
        animation: none;
    }
}
