/* =======================================
   SWIPER GALLERY
======================================= */
.swiper-gallery {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Empêche les conflits avec le markup Divi */
body:not(.et-fb):not(.et_fb_preview_active) .swiper-gallery .et_pb_gallery_items {
    display: none;
}

/* Wrapper Swiper */
.swiper-gallery .swiper-wrapper {
    overflow: visible; /* Permet aux slides de glisser naturellement */
}

/* Slides */
.swiper-gallery .swiper-slide {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-shrink: 0;
    border-radius:8px;
}

/* Images */
.swiper-gallery .swiper-slide img {
    display: block;
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
    background-color: #66737b; /* Couleur de fond placeholder */
    user-select: none;
    pointer-events: auto;
    cursor:grab;
    -webkit-user-drag: none;
    transition: all 0.3s ease;
}

/* ----------------------------------------------------------
   FLÈCHES SWIPER
---------------------------------------------------------- */
.swiper-gallery .swiper-button-prev,
.swiper-gallery .swiper-button-next {
    background-color: var(--sable-fond);
    color: var(--boreal);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
}

/* États hover */
.swiper-gallery .swiper-button-prev:hover,
.swiper-gallery .swiper-button-next:hover {
    background-color: var(--lin-hover);
}

/* Supprime les icônes Swiper par défaut */
.swiper-gallery .swiper-button-prev::after,
.swiper-gallery .swiper-button-next::after {
    content: none !important;
}

/* Position */
.swiper-gallery .swiper-button-prev {
    left: 0;
    border-radius: 0 8px 8px 0;
    background-image: url('../img/swiper/arrow-left.svg');
}

.swiper-gallery .swiper-button-next {
    right: 0;
    border-radius: 8px 0 0 8px;
    background-image: url('../img/swiper/arrow-right.svg');
}

/* =======================================
   LIGHTBOX CUSTOM
======================================= */
.custom-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.custom-lightbox img.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

/* Contrôles */
.custom-lightbox .lightbox-prev,
.custom-lightbox .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}

.custom-lightbox .lightbox-prev:hover,
.custom-lightbox .lightbox-next:hover,
.custom-lightbox .lightbox-close:hover {
    color: var(--lin-hover);
}

.custom-lightbox .lightbox-prev { left: 40px; }
.custom-lightbox .lightbox-next { right: 40px; }

.custom-lightbox .lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}

/* Animation d’apparition */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =======================================
   CAPTION (pour .swiper-gallery-w-label)
======================================= */
.swiper-gallery-w-label .swiper-slide {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.swiper-gallery-w-label .swiper-caption {
    position: relative;
    color: var(--boreal);
    font-size: 15px;
    font-family: 'Geist', Helvetica, Arial, sans-serif;
    padding: 0;
    text-align: left;
    margin-top: 12px;
    max-width: 100%;
}
/* ============================
   MODE FULLSIZE SI UNE IMAGE
============================ */
.swiper-gallery-1 .swiper-slide img {
    height: 100% !important;
    max-height: none;
    object-fit: cover; /* on garde le ratio naturel */
}