/* ── Carousel Ruah — front.css ── */

/* Empêche le saut de layout à l'ouverture de la lightbox */
html { scrollbar-gutter: stable; }
body.cr-lb-open {
    overflow: hidden;
    padding-right: var(--cr-scrollbar-w, 0px);
}

/* ── Carousel ── */
.wp-block-carousel-ruah-carousel {
    position: relative;
    width: 100%;
    overflow: visible;
}

.cr-swiper {
    width: 100%;
    padding: 30px 0 50px;
    overflow: visible;
}

.swiper-slide.cr-slide {
    width: 60%;
    max-width: 700px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
    will-change: transform, opacity;
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.cr-slide:not(.swiper-slide-active) { cursor: default; }

.cr-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    border-radius: 12px;
    pointer-events: none;
    background: #f0f0f0;
}

.cr-swiper .swiper-wrapper { align-items: center; }

/* Navigation Swiper */
.cr-swiper .swiper-button-prev,
.cr-swiper .swiper-button-next {
    color: #fff;
    background: rgba(0,0,0,.45);
    width: 44px; height: 44px;
    border-radius: 50%;
    top: 50%;
    transition: background .2s;
}
.cr-swiper .swiper-button-prev:hover,
.cr-swiper .swiper-button-next:hover { background: rgba(0,0,0,.7); }
.cr-swiper .swiper-button-prev::after,
.cr-swiper .swiper-button-next::after { font-size: 18px; font-weight: 700; }
.cr-swiper .swiper-pagination          { bottom: 8px; }
.cr-swiper .swiper-pagination-bullet-active { background: #333; }

@media (max-width: 768px) {
    .swiper-slide.cr-slide { width: 82%; }
    .cr-img { max-height: none; }
}

/* ── GLightbox — surcharges cosmétiques ── */

/* Bouton fermer : toujours visible, circulaire */
.glightbox-container .gclose.gbtn {
    opacity: 1 !important;
    visibility: visible !important;
    background: rgba(0,0,0,.7) !important;
    border: 2px solid rgba(255,255,255,.35) !important;
    border-radius: 50% !important;
    width: 48px !important;
    height: 48px !important;
    top: 14px !important;
    right: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.glightbox-container .gclose.gbtn svg {
    width: 20px !important;
    height: 20px !important;
    color: #fff !important;
    stroke: #fff !important;
}

/* Flèches nav : légèrement opaques sur desktop */
@media (min-width: 769px) {
    .glightbox-container .gnext.gbtn,
    .glightbox-container .gprev.gbtn {
        opacity: 0.7 !important;
    }
    .glightbox-container .gnext.gbtn:hover,
    .glightbox-container .gprev.gbtn:hover {
        opacity: 1 !important;
    }
}
