/* =========================================================
   Galerie de démonstration
   ========================================================= */

.gallery {
    display: block;
    width: 80%;
    margin:auto;
    margin-top:80px;
    padding: 20px;
    text-align: center;
}

.gallery a {
    display: inline-block;
    overflow: hidden;
}

.gallery img {
    margin:10px;;
    display: block;
    height: 200px;
    filter:grayscale(100%);
    transition: filter 1s;
}

.gallery a:hover img {
    filter:grayscale(0%);
}


/* =========================================================
   Zoombox
   ========================================================= */

.zoombox-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}


.zoombox-overlay.is-open {
    opacity: 1;
    visibility: visible;
}


/* Empêche le scroll du document lorsque Zoombox est ouvert */

body.zoombox-open {
    overflow: hidden;
}


/* =========================================================
   Container
   ========================================================= */

.zoombox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* =========================================================
   Zone de visualisation
   ========================================================= */

.zoombox-stage {
    position: absolute;
    inset: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
}


.zoombox-stage.is-dragging {
    cursor: grabbing;
}


/* =========================================================
   Image
   ========================================================= */

.zoombox-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    user-select: none;
    -webkit-user-select: none;
    transform-origin: center center;
    will-change: transform;
    transition:
        transform 0.25s ease,
        opacity 0.2s ease;
    opacity: 0;
    pointer-events: none;
}


.zoombox-image.is-visible {
    opacity: 1;
}


/* Quand on déplace l'image, on ne veut pas de transition */

.zoombox-stage.is-dragging .zoombox-image {
    transition: none;
}


/* =========================================================
   Bouton fermer
   ========================================================= */

.zoombox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 20;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 50%;
    background: #8c8a7D;
    color: #F2EFE8;
    font-size: 38px;
    font-weight: 200;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}


.zoombox-close:hover {
    background: #8c8a7D;
    transform: scale(1.05);
}


/* =========================================================
   Navigation
   ========================================================= */

.zoombox-prev,
.zoombox-next {
    position: absolute;
    top: 50%;
    z-index: 20;
    transform: translateY(-50%);
    width: 55px;
    height: 70px;
    border: 0;
    background: #8c8a7D;
    color: #F2EFE8;
    font-size: 38px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        opacity 0.2s ease;
}


.zoombox-prev:hover,
.zoombox-next:hover {
    background: #8c8a7D;
}


.zoombox-prev {
    left: 10px;
}


.zoombox-next {
    right: 10px;
}


.zoombox-prev.is-hidden,
.zoombox-next.is-hidden {
    display: none;
}


/* =========================================================
   Toolbar
   ========================================================= */

.zoombox-toolbar {
    position: absolute;
    left: 50%;
    bottom: 20px;
    z-index: 20;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    visibility: hidden;
}


.zoombox-toolbar button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}


.zoombox-toolbar button:hover {
    background: rgba(255, 255, 255, 0.3);
}


.zoombox-zoom-value {
    min-width: 50px;
    text-align: center;
    font-size: 13px;
}


/* =========================================================
   Légende
   ========================================================= */

.zoombox-caption {
    position: absolute;
    left: 50%;
    bottom: 80px;
    z-index: 20;
    transform: translateX(-50%);
    max-width: calc(100% - 40px);
    padding: 8px 14px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 14px;
    text-align: center;
    pointer-events: none;
    visibility: hidden;
}


/* =========================================================
   Compteur
   ========================================================= */

.zoombox-counter {
    position: absolute;
    top: 25px;
    left: 50%;
    z-index: 20;
    transform: translateX(-50%);
    color: white;
    font-size: 13px;
    opacity: 0.8;
    visibility:hidden;
}


/* =========================================================
   Mobile
   ========================================================= */

@media screen and (max-width: 48rem) {
    
.gallery {
    display: block;
    width: 100%;
    margin:auto;
    margin-top:40px;
    padding: 0px;
    text-align: center;
}
    .gallery .zoombox {
        pointer-events: none;
        cursor: default;
    }

    .gallery .zoombox img {
        display: block;
        width: 100%;
        height: auto;
    }
    .gallery img {
    margin:0px;
    margin-bottom:0px;
    display: block;
    height: 200px;
    filter:grayscale(100%);
    transition: filter 1s;
}

}