/* ============================================================
   Elementor Swiper Carousel — carousel.css  v1.1.0
   ============================================================ */

/* ── Wrapper global ─────────────────────────────────────── */
.esc-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* ── Container Swiper (défaut) ──────────────────────────── */
.esc-swiper-container {
    width: 100%;
    height: 400px;
}

/* ════════════════════════════════════════════════════════════
   MODE FIXED — hauteur fixe, images rognées (cover)
   ════════════════════════════════════════════════════════════ */
.esc-mode-fixed .swiper-slide {
    height: 100%;
    overflow: hidden;
}
.esc-mode-fixed .esc-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ════════════════════════════════════════════════════════════
   MODE CONTAIN — hauteur fixe, image entière visible + fond
   ════════════════════════════════════════════════════════════ */
.esc-mode-contain .swiper-slide {
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}
.esc-mode-contain .esc-slide-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* ════════════════════════════════════════════════════════════
   MODE AUTO — le carousel s'adapte à la hauteur de l'image
   ════════════════════════════════════════════════════════════ */
.esc-mode-auto .esc-swiper-container {
    height: auto !important;
}
.esc-mode-auto .swiper-slide {
    height: auto !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.esc-mode-auto .esc-slide-img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: unset;
}
.esc-mode-auto .esc-slide-link {
    width: 100%;
    height: auto;
}
.esc-mode-auto .swiper-wrapper {
    transition-property: transform, height !important;
}
/* Légende sous l'image en mode auto */
.esc-mode-auto .esc-caption {
    position: relative;
    bottom: auto;
    width: 100%;
}

/* ════════════════════════════════════════════════════════════
   MODE RATIO — hauteur calculée via padding-bottom hack
   ════════════════════════════════════════════════════════════ */
.esc-ratio-box {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* padding-bottom défini inline depuis PHP selon le ratio */
}
.esc-mode-ratio .esc-ratio-box .esc-swiper-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
}
.esc-mode-ratio .swiper-slide {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}
.esc-mode-ratio .esc-slide-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* ── Styles communs ─────────────────────────────────────── */
.esc-slide-img {
    display: block;
    transition: transform 0.3s ease;
}

/* Zoom léger au survol (sauf mode auto) */
.esc-mode-fixed .swiper-slide:hover .esc-slide-img,
.esc-mode-contain .swiper-slide:hover .esc-slide-img,
.esc-mode-ratio .swiper-slide:hover .esc-slide-img {
    transform: scale(1.03);
}

.esc-slide-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.esc-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
    z-index: 10;
}

.swiper-slide:not(:hover) .esc-caption {
    opacity: 0.85;
}

/* ── Flèches de navigation ───────────────────────────────── */
.esc-carousel-wrapper .swiper-button-prev,
.esc-carousel-wrapper .swiper-button-next {
    background-color: rgba(0, 0, 0, 0.4);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: background-color 0.25s ease, transform 0.2s ease;
}
.esc-carousel-wrapper .swiper-button-prev:hover,
.esc-carousel-wrapper .swiper-button-next:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}
.esc-carousel-wrapper .swiper-button-prev::after,
.esc-carousel-wrapper .swiper-button-next::after {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

/* ── Pagination ─────────────────────────────────────────── */
.esc-carousel-wrapper .swiper-pagination { bottom: 10px; }
.esc-carousel-wrapper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}
.esc-carousel-wrapper .swiper-pagination-bullet-active {
    background: #0073aa;
    transform: scale(1.3);
}
.esc-carousel-wrapper .swiper-pagination-progressbar {
    background: rgba(255, 255, 255, 0.3);
    height: 4px;
    top: auto;
    bottom: 0;
}
.esc-carousel-wrapper .swiper-pagination-progressbar-fill { background: #0073aa; }
.esc-carousel-wrapper .swiper-pagination-fraction {
    color: #fff;
    font-size: 14px;
    bottom: 12px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 767px) {
    .esc-mode-fixed .esc-swiper-container,
    .esc-mode-contain .esc-swiper-container { height: 220px; }

    .esc-carousel-wrapper .swiper-button-prev,
    .esc-carousel-wrapper .swiper-button-next { width: 34px; height: 34px; }

    .esc-carousel-wrapper .swiper-button-prev::after,
    .esc-carousel-wrapper .swiper-button-next::after { font-size: 13px; }

    .esc-caption { font-size: 12px; padding: 8px 12px; }
}

/* ════════════════════════════════════════════════════════════
   THUMBS (miniatures)
   ════════════════════════════════════════════════════════════ */
.esc-thumbs-swiper {
    margin-top: 10px;
    height: 80px; /* overridé par le control Elementor */
}

.esc-thumbs-swiper .swiper-slide {
    height: 100%;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: opacity 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
}

.esc-thumbs-swiper .swiper-slide-thumb-active {
    opacity: 1 !important;
    border-color: #0073aa;
}

.esc-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ════════════════════════════════════════════════════════════
   SCROLLBAR
   ════════════════════════════════════════════════════════════ */
.esc-carousel-wrapper .swiper-scrollbar {
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    bottom: 4px;
    left: 1%;
    width: 98%;
}

.esc-carousel-wrapper .swiper-scrollbar-drag {
    background: #0073aa;
    border-radius: 2px;
    cursor: grab;
    transition: background 0.2s ease;
}

.esc-carousel-wrapper .swiper-scrollbar-drag:hover {
    background: #005a87;
}

/* Scrollbar en mode vertical */
.esc-carousel-wrapper .swiper-container-vertical .swiper-scrollbar {
    width: 4px;
    height: 98%;
    top: 1%;
    right: 4px;
    left: auto;
    bottom: auto;
}
