/* ===============================================================
   CSS DE BASE : OBJECTIF 100% HAUTEUR
   =============================================================== */

.custom-carousel-wrapper .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.custom-carousel-wrapper .swiper-slide picture,
.custom-carousel-wrapper .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/*
 * 3. Style des flèches de navigation
 * ------------------------------------------- */
.custom-carousel-wrapper .swiper-button-next,
.custom-carousel-wrapper .swiper-button-prev {
    background-color: #ffffff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.custom-carousel-wrapper:hover .swiper-button-next,
.custom-carousel-wrapper:hover .swiper-button-prev {
    opacity: 1;
    visibility: visible;
}

.custom-carousel-wrapper .swiper-button-next svg,
.custom-carousel-wrapper .swiper-button-prev svg {
    width: 22px;
    height: 22px;
    stroke: #1e293b;
    fill: none !important;
}

.custom-carousel-wrapper .swiper-button-prev svg {
    transform: translateX(-2px);
}

.custom-carousel-wrapper .swiper-button-next svg {
    transform: translateX(2px);
}

.custom-carousel-wrapper .swiper-button-next:hover,
.custom-carousel-wrapper .swiper-button-prev:hover {
    background-color: #f8fafc;
    transform: scale(1.05);
}


/*
 * 3. Optimisations responsives pour le mobile
 * ---------------------------------------------------------------------- */
@media (max-width: 767px) {
    /* On applique le ratio au conteneur Swiper */
    .custom-carousel-wrapper .swiper {
        height: auto;
        aspect-ratio: 2 / 1;
    }

    /* On s'assure que les slides et l'image remplissent bien ce nouveau conteneur */
    .custom-carousel-wrapper .swiper-slide,
    .custom-carousel-wrapper .swiper-slide a,
    .custom-carousel-wrapper .swiper-slide picture,
    .custom-carousel-wrapper .swiper-slide img {
        height: 100%;
    }

    .custom-carousel-wrapper .swiper-button-next,
    .custom-carousel-wrapper .swiper-button-prev {
        display: none;
    }

    .custom-carousel-wrapper .swiper-pagination-bullet {
        background-color: #ffffff;
        opacity: 0.6;
        transition: opacity 0.3s ease, background-color 0.3s ease;
    }

    .custom-carousel-wrapper .swiper-pagination-bullet-active {
        opacity: 1;
        background-color: #ffffff;
    }
}

@media (min-width: 768px) {
    .custom-carousel-wrapper .swiper-pagination {
        display: none;
    }
}