/* ========================================
   GALERIE - BASE
======================================== */

.laf-realisation-carousel {
    position: relative;
    overflow: hidden;
}

/* ========================================
   TRACK / SLIDES
======================================== */

.laf-realisation-carousel-track {
    display: flex;
    transition: transform 0.4s ease;
    will-change: transform;
}

.laf-realisation-carousel-slide {
    min-width: 100%;
    box-sizing: border-box;
    flex: 0 0 100%;
}

.laf-realisation-carousel-slide__inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ========================================
   MEDIA
======================================== */

.laf-realisation-carousel-slide__media {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
}

/* image */
.laf-carousel-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* si hauteur max définie */
.laf-realisation-carousel.has-max-height .laf-realisation-carousel-slide__media {
    max-height: var(--gallery-max-height);
}

.laf-realisation-carousel.has-max-height .laf-carousel-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: var(--gallery-max-height);
    object-fit: contain;
    object-position: center;
}

/* vidéo / youtube */
.laf-realisation-media {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
}
/*
.laf-realisation-carousel.has-max-height .laf-realisation-media,
.laf-realisation-carousel.has-max-height .laf-realisation-media iframe,
.laf-realisation-carousel.has-max-height .laf-realisation-media video {
    width: 100%;
    height: 100%;
}
*/
/* ========================================
   YOUTUBE / VIDEO (contain propre)
======================================== */

.laf-realisation-carousel.has-max-height .laf-realisation-media {
    height: var(--gallery-max-height);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000; /* fond propre */
}

/* iframe youtube */
.laf-realisation-carousel.has-max-height .laf-realisation-media iframe {
    width: 100%;
    height: 100%;
    max-height: 100%;

    /* on garde le ratio vidéo */
    aspect-ratio: 16 / 9;
}

.laf-realisation-media iframe,
.laf-realisation-media video {
    display: block;
    width: 100%;
    height: auto;
    border: 0;
}

/* ========================================
   CAPTION
======================================== */

.laf-realisation-carousel-caption {
    padding: 8px 4px;
}

.laf-realisation-carousel-caption__title {
    font-weight: 600;
    margin-bottom: 6px;
}

.laf-realisation-carousel-caption__text {
    font-size: 14px;
    line-height: 1.5;
}

/* ========================================
   NAV BUTTONS
======================================== */

.laf-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;

    width: 42px;
    height: 42px;

    border-radius: 50%;
    border: none;

    background: rgba(0, 0, 0, 0.6);
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
}

.laf-carousel-prev {
    left: 10px;
}

.laf-carousel-next {
    right: 10px;
}

.laf-carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* ========================================
   DOTS
======================================== */

.laf-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.laf-carousel-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #ccc;
    cursor: pointer;
}

.laf-carousel-dot.is-active {
    background: #333;
}

/* ========================================
   LIGHTBOX
======================================== */

.laf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.laf-lightbox.is-open {
    display: block;
}