/**
 * ClientZone Editor - Widget Styles
 *
 * Styles pour le widget Client Zone Display
 * Mode fixe et carrousel
 *
 * @package    ClientZoneEditor
 * @since      1.0.0
 */

/* ========================================
   Widget Wrapper
   ======================================== */
.cze-widget-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

/* ========================================
   Image Container
   ======================================== */
.cze-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.cze-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.cze-image-container:hover img {
    transform: scale(1.05);
}

/* ========================================
   Overlay
   ======================================== */
.cze-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 30px 20px;
    color: #ffffff;
    transition: all 0.3s ease;
}

.cze-image-container:hover .cze-overlay {
    padding-bottom: 40px;
}

/* ========================================
   Titre
   ======================================== */
.cze-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* ========================================
   Description
   ======================================== */
.cze-description {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 15px 0;
    color: rgba(255,255,255,0.9);
}

/* ========================================
   Prix
   ======================================== */
.cze-price {
    display: inline-block;
    font-size: 20px;
    font-weight: 700;
    color: #ffcc00;
    background-color: rgba(0,0,0,0.7);
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.cze-price:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* ========================================
   Mode Carrousel - Swiper
   ======================================== */
.cze-mode-carousel {
    width: 100%;
    position: relative;
}

.cze-mode-carousel .swiper-wrapper {
    align-items: stretch;
}

.cze-mode-carousel .swiper-slide {
    height: auto;
}

/* Navigation Arrows */
.cze-mode-carousel .swiper-button-prev,
.cze-mode-carousel .swiper-button-next {
    color: #ffffff;
    background-color: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cze-mode-carousel .swiper-button-prev:after,
.cze-mode-carousel .swiper-button-next:after {
    font-size: 20px;
}

.cze-mode-carousel .swiper-button-prev:hover,
.cze-mode-carousel .swiper-button-next:hover {
    background-color: rgba(0,0,0,0.8);
    transform: scale(1.1);
}

/* Pagination */
.cze-mode-carousel .swiper-pagination {
    bottom: 20px;
}

.cze-mode-carousel .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background-color: #ffffff;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.cze-mode-carousel .swiper-pagination-bullet-active {
    opacity: 1;
    background-color: #ffcc00;
    transform: scale(1.3);
}

/* État pause */
.cze-carousel-paused {
    opacity: 0.9;
}

/* ========================================
   Mode Fixe
   ======================================== */
.cze-mode-fixed {
    /* Styles spécifiques au mode fixe si nécessaire */
}

/* ========================================
   Placeholder (Mode Éditeur Elementor)
   ======================================== */
.cze-placeholder {
    background-color: #f9f9f9;
    border: 2px dashed #cccccc;
    padding: 40px 20px;
    text-align: center;
    border-radius: 8px;
}

.cze-placeholder p {
    color: #666666;
    font-size: 14px;
    margin: 0;
}

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

/* Tablettes */
@media (max-width: 768px) {
    .cze-image-container {
        height: 300px;
    }

    .cze-title {
        font-size: 20px;
    }

    .cze-description {
        font-size: 13px;
    }

    .cze-price {
        font-size: 18px;
        padding: 8px 16px;
    }

    .cze-mode-carousel .swiper-button-prev,
    .cze-mode-carousel .swiper-button-next {
        width: 40px;
        height: 40px;
    }

    .cze-mode-carousel .swiper-button-prev:after,
    .cze-mode-carousel .swiper-button-next:after {
        font-size: 16px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .cze-image-container {
        height: 250px;
    }

    .cze-overlay {
        padding: 20px 15px;
    }

    .cze-title {
        font-size: 18px;
    }

    .cze-description {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .cze-price {
        font-size: 16px;
        padding: 6px 12px;
    }

    /* Masquer les flèches sur mobile (navigation par swipe) */
    .cze-mode-carousel .swiper-button-prev,
    .cze-mode-carousel .swiper-button-next {
        display: none;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cze-widget-wrapper {
    animation: fadeIn 0.5s ease-out;
}

/* ========================================
   Accessibilité
   ======================================== */
.cze-image-container:focus-within {
    outline: 3px solid #ffcc00;
    outline-offset: 2px;
}

.cze-mode-carousel .swiper-button-prev:focus,
.cze-mode-carousel .swiper-button-next:focus {
    outline: 3px solid #ffcc00;
    outline-offset: 2px;
}

/* Mode contraste élevé */
@media (prefers-contrast: high) {
    .cze-overlay {
        background: rgba(0,0,0,0.9);
    }

    .cze-price {
        background-color: #000000;
        border: 2px solid #ffcc00;
    }
}

/* Mode mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    .cze-image-container img,
    .cze-overlay,
    .cze-price,
    .cze-mode-carousel .swiper-button-prev,
    .cze-mode-carousel .swiper-button-next,
    .cze-mode-carousel .swiper-pagination-bullet {
        transition: none;
    }

    .cze-image-container:hover img {
        transform: none;
    }

    .cze-widget-wrapper {
        animation: none;
    }
}

/* ========================================
   Print
   ======================================== */
@media print {
    .cze-mode-carousel .swiper-button-prev,
    .cze-mode-carousel .swiper-button-next,
    .cze-mode-carousel .swiper-pagination {
        display: none;
    }

    .cze-overlay {
        position: static;
        background: #ffffff;
        color: #000000;
    }

    .cze-title,
    .cze-description {
        color: #000000;
    }
}
