/* =========================================================
   Realizations Slider — Widget Elementor
   Layout : grande carte active gauche | cartes réduites droite
   Moteur : Swiper (slidesPerView auto, loop, autoHeight)
   ========================================================= */

/* ── Swiper core (minimal) ──────────────────────────────── */
.rs-swiper {
    overflow: hidden;
    position: relative;
    width: 100%;
    z-index: 1;
}

.rs-swiper .swiper-wrapper {
    display: flex;
    align-items: flex-start;
    width: 100%;
    box-sizing: content-box;
    position: relative;
    z-index: 1;
    transition-property: transform;
    transition-timing-function: ease;
}

.rs-slide {
    flex-shrink: 0;
    position: relative;
    transition-property: transform;
}

/* ── Variables par défaut ──────────────────────────────────
   Overridables via Elementor → CSS custom properties
   --------------------------------------------------------- */
.rs-wrapper {
    --rs-gap:         20px;
    --rs-offset-left: 80px;
    --rs-radius:      10px;
    --rs-nav-color:   #323232;

    position: relative;
    width: 100%;
    padding-left: var(--rs-offset-left);
    overflow: hidden;
}

/* ── Carte ────────────────────────────────────────────────── */
.rs-card {
    display: flex;
    flex-direction: column;
}

/* ── Image ─────────────────────────────────────────────────── */
.rs-image {
    border-radius: var(--rs-radius);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    min-height: 300px;
    max-height: 300px;
}

.swiper-slide-active .rs-image {
    min-height: 400px;
    max-height: 400px;
}

/* ── Infos sous l'image ────────────────────────────────────── */
.rs-info {
    padding-top: 14px;
    flex-shrink: 0;
}

/* Ligne catégorie | date */
.rs-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.rs-category {
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1;
    color: rgba(44, 44, 44, 0.8);
}

.rs-date {
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1;
    color: rgba(44, 44, 44, 0.5);
}

/* Titre */
.rs-title {
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.3;
    color: #2c2c2c;
    margin: 0;
}

/* Description — visible uniquement sur la carte active */
.rs-desc {
    font-family: 'Satoshi', system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.65;
    color: rgba(44, 44, 44, 0.8);
    margin-top: 10px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition:
        opacity    0.18s ease,
        max-height 0.22s ease;
}

.swiper-slide-active .rs-desc {
    opacity: 1;
    max-height: 2000px;
}

.rs-desc p { margin: 0 0 6px; }
.rs-desc p:last-child { margin-bottom: 0; }

/* ── Flèches de navigation ─────────────────────────────────── */
.rs-nav {
    position: absolute;
    top: 400px;
    right: 0;
    display: flex;
    align-items: center;
    z-index: 10;
}

.rs-nav-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--rs-nav-color);
    display: flex;
    align-items: center;
    transition: opacity 0.25s ease;
    line-height: 0;
}

.rs-nav-btn:hover { opacity: 0.55; }

.rs-nav-btn.swiper-button-disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

/* ── Responsive ≤ 768px ────────────────────────────────────── */
@media (max-width: 768px) {
    .rs-wrapper {
        --rs-offset-left: 20px;
    }

    .rs-nav {
        position: static;
        justify-content: center;
        padding-right: var(--rs-offset-left);
        margin-bottom: 30px;
    }

    .rs-wrapper{
        display: flex;
        flex-direction: column-reverse;
        
    }
}
