/* Lien sur le visuel de chaque chambre, sur la page d’accueil. */
.room-visual-link {
    display: block;
    position: relative;
    color: inherit;
    text-decoration: none;
}

.room-visual-link:focus-visible {
    outline-offset: -5px;
}

.room-cover {
    display: block;
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.gallery-link-label {
    display: block;
    padding: 12px 24px;
    background: var(--ink);
    color: white;
    font-size: 14px;
    text-align: right;
}

.room-visual-link:hover .gallery-link-label {
    background: #425b49;
    text-decoration: underline;
}

/* Page propre à chaque chambre. */
.gallery-intro {
    max-width: 60ch;
    margin-top: 16px;
}

.photo-section {
    padding-top: 24px;
    margin-top: 20px;
    border-top: 1px solid var(--line);
}

.photo-section h2 {
    margin-bottom: 12px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    margin-top: 32px;
}

.photo-grid figure {
    margin: 0;
    min-width: 0;
}

.photo-grid a {
    display: block;
}

.photo-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #e9eddf;
    border-radius: 6px;
}

.photo-grid figcaption {
    padding-top: 12px;
    color: var(--muted);
    font-size: 14px;
}

.gallery-empty {
    padding: 32px;
    background: #e9eddf;
    border-radius: 6px;
}

.gallery-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin: 56px 0 24px;
}

@media (max-width: 680px) {
    .room-cover { height: 240px; }
    .photo-grid { grid-template-columns: 1fr; gap: 28px; }
    .photo-section { padding-top: 18px; }
}

/* Espace en haut et en bas du contenu */
main.wrap.section {
    padding-top: 40px;
    padding-bottom: 40px;
}

/* Espace entre les paragraphes */
main.wrap.section p {
    margin-bottom: 12px;
}

/* Espacements de la page chambre */
main#contenu {
    padding-top: 24px;
    padding-bottom: 32px;
}

main#contenu .gallery-intro {
    margin-top: 12px;
}

main#contenu p {
    margin-bottom: 12px;
}

main#contenu .photo-section {
    margin-top: 20px;
    padding-top: 20px;
}

main#contenu .photo-section h2 {
    margin-bottom: 12px;
}

main#contenu .photo-grid {
    margin-top: 16px;
    gap: 24px;
}

main#contenu .gallery-actions {
    margin-top: 24px;
    margin-bottom: 12px;
}

#room-title {
    letter-spacing: -0.02em;
}

#visionneuse {
    width: 96vw;
    max-width: 1400px;
    max-height: 94dvh;
    padding: 16px;
    border: 0;
    border-radius: 8px;
    background: #627066;
    color: white;
}

#visionneuse::backdrop {
    background: #627066;
}

.visionneuse-barre {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.visionneuse-contenu {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
}

#photo-agrandie {
    display: block;
    width: 100%;
    height: 75dvh;
    object-fit: contain;
}

#visionneuse button {
    min-width: 44px;
    min-height: 44px;
    border: 1px solid #ffffff70;
    border-radius: 6px;
    background: transparent;
    color: white;
    cursor: pointer;
}

#photo-precedente,
#photo-suivante {
    font-size: 32px;
}

#visionneuse button:hover {
    background: #ffffff25;
}

html.galerie-ouverte {
    overflow: hidden;
}

@media (max-width: 680px) {
    #visionneuse {
        padding: 10px;
    }

    .visionneuse-contenu {
        gap: 4px;
    }

    #photo-agrandie {
        height: 65dvh;
    }
}

main#contenu {
    padding-top: 12px;
}

main#contenu .photo-section {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

#photos-title {
    margin-top: 0;
}
