
#lightbox {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    /* width: 100%; */
    height: 100%;
    background: var(--black-low-opacity-fixed);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-index-lightbox);
    transition: var(--transition-4);
    overflow: hidden;
}
#lightbox.hidden {
    top: -100%;
}

#lightbox, #lightbox * {
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;

    -webkit-user-drag: none; /* Chrome/Safari */
    user-drag: none; /* Pas standard, mais ignore warning */
    -moz-user-drag: none; /* Firefox ne supporte pas, mais ça ne gêne pas */
}

.lightbox_content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 80%;
}

#lightbox .lightbox_content img {
    max-width: 100%;
    max-height: 100%;
    transition: var(--transition-2);
    transform: translateX(0%);
}

#lightbox .lightbox_content img.fade-out-left {
    transform: translateX(5%);
}
#lightbox .lightbox_content img.fade-out-right {
    transform: translateX(-5%);
}

#close, #prev, #next {
    position: absolute;
    color: var(--font-white-fixed);
    background-color: var(--black-low-opacity-fixed);
    aspect-ratio: 1 / 1;
    font-size: var(--fs-32);
    cursor: pointer;
    user-select: none;
    z-index: 1;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    /* 
    Fixe la hauteur (et donc width = height par aspect-ratio)
    selon la taille du texte + padding désiré 
    */
    height: 3rem;
    padding: calc(var(--ffs-18) / 2);
    box-sizing: content-box; /* ou border-box si tu veux inclure padding dans hauteur */
}

#close {
    top: 0;
    right: 0;
    background-color: transparent;
    padding: 15px;
}
#close svg {
    stroke: var(--white-fixed);
    stroke-width: 2;
}

#close:hover {
    transform: rotate(90deg);
    transition: var(--transition-2);
}

#prev {
    left: 0;
}
#next {
    right: 0;
}
#next svg polyline,
#prev svg polyline {
    stroke: var(--white-fixed);
}

#caption {
    position: absolute;
    margin-top: 10px;
    color: var(--font-white-fixed);
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 1rem;
    text-align: center;
    max-width: 90%;
    bottom: 15px;
}