/* Visionneuse : garder un retour visible sans quitter la page. */
.photo-viewer {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    height: 100%;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 5.5rem 1rem 1rem;
    border: 0;
    background: rgba(12, 17, 14, .97);
    color: #f4efe5;
}

.photo-viewer[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-viewer::backdrop {
    background: #0c110e;
}

.photo-viewer__close {
    position: absolute;
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
    left: max(1rem, env(safe-area-inset-left));
    width: fit-content;
    max-width: calc(100% - 2rem);
    margin-inline: auto;
    padding: .8rem 1.2rem;
    border: 1px solid #b8c2b7;
    border-radius: 2rem;
    background: #f4efe5;
    color: #24392e;
    font: 600 1rem/1.4 var(--text-font), sans-serif;
    cursor: pointer;
}

.photo-viewer__close:focus-visible {
    outline: 3px solid #6ad225;
    outline-offset: 4px;
}

.photo-viewer__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
