/**
 * Actualités : visionneuse des images d'article (cf. assets/js/article-lightbox.js).
 */

.article-content img.ss-zoomable {
    cursor: zoom-in;
}
.article-content img.ss-zoomable:focus-visible,
.article-content a:focus-visible > img.ss-zoomable {
    outline: 3px solid var(--color-1, #00e1ff);
    outline-offset: -3px; /* .article-content est en overflow-x: hidden */
}

html.ss-lightbox-open {
    overflow: hidden;
}

.ss-lightbox {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(8, 10, 18, .94);
    color: #fff;
    overflow: hidden;
}
.ss-lightbox::backdrop {
    background: transparent;
}

/* margin: auto sur la figure : centrée quand elle tient, défilable depuis le bord quand elle déborde */
.ss-lightbox__stage {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    padding: 64px 72px;
    box-sizing: border-box;
    overflow: auto;
    overscroll-behavior: contain;
}
.ss-lightbox__figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: auto;
}
.ss-lightbox__img {
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100vw - 144px);
    max-height: calc(100vh - 160px);
    max-height: calc(100dvh - 160px);
    background: #fff;
    cursor: default;
}
.ss-lightbox.is-zoomable .ss-lightbox__img {
    cursor: zoom-in;
}
.ss-lightbox.is-zoomed .ss-lightbox__img {
    max-width: none;
    max-height: none;
    cursor: zoom-out;
}
.ss-lightbox__caption {
    max-width: 800px;
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.4;
    text-align: center;
    color: #fff;
}

.ss-lightbox__counter {
    position: absolute;
    top: 20px;
    left: 24px;
    margin: 0;
    font-size: 15px;
    line-height: 24px;
    color: #fff;
}

.ss-lightbox__toolbar {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

.ss-lightbox__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
    transition: background-color .2s;
}
.ss-lightbox__btn:hover {
    background: rgba(255, 255, 255, .25);
}
.ss-lightbox__btn:focus-visible {
    outline: 3px solid var(--color-1, #00e1ff);
    outline-offset: 2px;
}
.ss-lightbox__btn[hidden] {
    display: none;
}
.ss-lightbox__btn svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ss-lightbox__zoom[aria-pressed="true"] .ss-lightbox__plus {
    display: none;
}

.ss-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
.ss-lightbox__nav--prev {
    left: 14px;
}
.ss-lightbox__nav--next {
    right: 14px;
}

@media (max-width: 767px) {
    .ss-lightbox__stage {
        padding: 68px 8px;
    }
    .ss-lightbox__img {
        max-width: calc(100vw - 16px);
        max-height: calc(100vh - 136px);
        max-height: calc(100dvh - 136px);
    }
    .ss-lightbox__nav {
        top: auto;
        bottom: 12px;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ss-lightbox__btn {
        transition: none;
    }
}
