#lightbox { position: fixed; inset: 0; z-index: calc(var(--z-header) + 10); background-color: rgba(0, 0, 0, 0.92); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.3s ease, visibility 0.3s ease; body.lightbox-open & { opacity: 1; visibility: visible; pointer-events: auto; } } #lightbox-close { position: absolute; top: var(--padding-body); right: var(--padding-body); background: none; border: none; color: var(--color-txt); cursor: pointer; padding: 8px; z-index: 1; line-height: 0; svg { width: 30px; fill: var(--color-txt); transition: fill 0.2s ease; } &:hover svg { fill: var(--grey-400); } } #lightbox-swiper { width: 90vw; .swiper-slide { display: flex; align-items: center; justify-content: center; figure { display: flex; flex-direction: column; align-items: center; cursor: default; img { max-width: 90vw; max-height: calc(90dvh - 100px); width: auto; height: auto; object-fit: contain; } figcaption { margin-top: calc(var(--spacing) * 0.5); color: var(--color-txt-light); font-size: var(--fs-small); text-align: center; } } } } // Cursor zoom-in sur les figures éligibles — desktop uniquement @media (min-width: 1080px) { figure[data-lightbox] { cursor: zoom-in; } }