/* =========================================================
   ZIZ - GALERIE A FLECHES (style page Historique)
   Utilisee en bas des pages Distribution, Produits, Activites
========================================================= */

.ziz-gallery {
    position: relative;
    width: 100%;
    margin-top: 28px;
    box-sizing: border-box;
}

.ziz-gallery-viewport {
    width: 100%;
    overflow: hidden;
}

.ziz-gallery-track {
    display: flex;
    gap: 18px;
    transition: transform .35s ease;
    will-change: transform;
}

.ziz-gallery-item {
    flex: 0 0 calc((100% - 36px) / 3);
    height: 200px;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,.16);
    background: #eee;
    cursor: pointer;
}

.ziz-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}

.ziz-gallery-item:hover img {
    transform: scale(1.035);
}

.ziz-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: #087630;
    color: #fff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    z-index: 4;
    transition: .2s;
}

.ziz-gallery-arrow:hover {
    background: #ef7f1a;
}

.ziz-gallery-arrow:disabled {
    opacity: .35;
    cursor: default;
}

.ziz-gallery-prev {
    left: 0;
}

.ziz-gallery-next {
    right: 0;
}


/* LIGHTBOX */

.ziz-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-sizing: border-box;
    background: rgba(0,0,0,.86);
}

.ziz-gallery-lightbox.active {
    display: flex;
}

.ziz-gallery-lightbox-image {
    max-width: min(1100px, 88vw);
    max-height: 84vh;
    object-fit: contain;
    display: block;
}

.ziz-gallery-lightbox-btn {
    position: absolute;
    border: 0;
    border-radius: 3px;
    background: #087630;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    transition: .2s;
}

.ziz-gallery-lightbox-btn:hover {
    background: #ef7f1a;
}

.ziz-gallery-lightbox-close {
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    font-size: 28px;
}

.ziz-gallery-lightbox-prev,
.ziz-gallery-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 56px;
    font-size: 32px;
}

.ziz-gallery-lightbox-prev {
    left: 18px;
}

.ziz-gallery-lightbox-next {
    right: 18px;
}


@media (max-width: 900px) {

    .ziz-gallery-item {
        flex: 0 0 calc((100% - 18px) / 2);
    }

}

@media (max-width: 600px) {

    .ziz-gallery-item {
        flex: 0 0 100%;
    }

    .ziz-gallery-track {
        gap: 12px;
    }

}
