/* ──────────────────────────────────────────────────────────────────
   RSL Gallery — layout styles
   Utilisé par les shortcodes [reseaulution_galerie1] … [reseaulution_galerie10]
   ────────────────────────────────────────────────────────────────── */

.rsl-gallery { width: 100%; }
.rsl-gallery__item { overflow: hidden; }
.rsl-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.rsl-gallery__caption {
    font-size: 13px;
    padding: 5px 6px;
    text-align: center;
    color: #555;
    background: rgba(255,255,255,.85);
}

/* ── Grille ─────────────────────────────────────────────────────── */
.rsl-gallery--grid {
    display: grid;
    grid-template-columns: repeat(var(--rsl-cols, 3), 1fr);
    gap: var(--rsl-gap, 16px);
}
.rsl-gallery--grid .rsl-gallery__item {
    border-radius: 6px;
    overflow: hidden;
}
.rsl-gallery--grid .rsl-gallery__item img {
    aspect-ratio: var(--rsl-ratio, 4/3);
    transition: transform .3s ease;
}
.rsl-gallery--grid .rsl-gallery__item:hover img {
    transform: scale(1.04);
}

/* ── Masonry ─────────────────────────────────────────────────────── */
.rsl-gallery--masonry {
    column-count: var(--rsl-cols, 3);
    column-gap: var(--rsl-gap, 16px);
}
.rsl-gallery--masonry .rsl-gallery__item {
    break-inside: avoid;
    margin-bottom: var(--rsl-gap, 16px);
    border-radius: 6px;
    overflow: hidden;
}
.rsl-gallery--masonry .rsl-gallery__item img {
    height: auto;
    aspect-ratio: auto;
    transition: transform .3s ease;
}
.rsl-gallery--masonry .rsl-gallery__item:hover img {
    transform: scale(1.03);
}

/* ── Slider / Carrousel (Splide overrides) ───────────────────────── */
.rsl-gallery--slider .rsl-gallery__item img,
.rsl-gallery--carousel .rsl-gallery__item img {
    aspect-ratio: var(--rsl-ratio, 16/9);
    border-radius: 6px;
}

/* ── Lightbox ────────────────────────────────────────────────────── */
.rsl-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.rsl-lightbox.is-open { display: flex; }
.rsl-lightbox__img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 6px;
    object-fit: contain;
    box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.rsl-lightbox__caption {
    color: #ddd;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
    max-width: 600px;
}
.rsl-lightbox__close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 34px;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    opacity: .8;
    padding: 0;
}
.rsl-lightbox__close:hover { opacity: 1; }
.rsl-lightbox__prev,
.rsl-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.15);
    color: #fff;
    border: none;
    font-size: 22px;
    padding: 14px 18px;
    cursor: pointer;
    border-radius: 4px;
    transition: background .2s;
}
.rsl-lightbox__prev { left: 12px; }
.rsl-lightbox__next { right: 12px; }
.rsl-lightbox__prev:hover,
.rsl-lightbox__next:hover { background: rgba(255,255,255,.28); }

/* ── Curseur sur items cliquables ───────────────────────────────── */
.rsl-gallery[data-lightbox="1"] .rsl-gallery__item { cursor: zoom-in; }

@media (max-width: 768px) {
    .rsl-gallery--grid { grid-template-columns: repeat(2, 1fr) !important; }
    .rsl-gallery--masonry { column-count: 2 !important; }
}
@media (max-width: 480px) {
    .rsl-gallery--grid { grid-template-columns: 1fr !important; }
    .rsl-gallery--masonry { column-count: 1 !important; }
}
