/* ═══════════════════════════════════════
   BYRTN GALLERY — Masonry custom
═══════════════════════════════════════ */
.byrtn-gallery {
    column-count: 2;
    column-gap: 12px;
    padding: 20px 16px;
}

.byrtn-gallery-item {
    break-inside: avoid;
    margin-bottom: 12px;
    position: relative;
}

.byrtn-gallery-item img {
    width: 100%;
    display: block;
    border: 1px solid rgba(255,255,255,0.08);
}

.byrtn-gallery-link {
    display: block;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.byrtn-gallery-link img {
    display: block;
    width: 100%;
}

.byrtn-gallery-caption {
    color: rgba(255,255,255,0.85);
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 0.72rem;
    letter-spacing: 2px;
    line-height: 1.6;
    padding: 6px 2px 12px 2px;
}

/* ═══════════════════════════════════════
   LOUPE AU SURVOL
═══════════════════════════════════════ */
.byrtn-loupe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5,5,5,0);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.byrtn-gallery-link:hover .byrtn-loupe {
    opacity: 1;
    background: rgba(5,5,5,0.45);
}

/* ═══════════════════════════════════════
   LIGHTBOX — overlay fond
═══════════════════════════════════════ */
.byrtn-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.88);
    align-items: center;
    justify-content: center;
}

.byrtn-lightbox.is-open {
    display: flex;
}

/* ═══════════════════════════════════════
   LIGHTBOX — boîte centrée 85%
═══════════════════════════════════════ */
.byrtn-lightbox-box {
    position: relative;
    width: 85vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    border: 0.5px solid rgba(243,203,103,0.3);
}

/* Bouton fermer */
.byrtn-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    line-height: 0;
}

/* Inner scrollable */
.byrtn-lightbox-inner {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
}

/* Image — s'adapte sans dépasser */
.byrtn-lightbox-img-wrap {
    width: 100%;
    flex-shrink: 0;
}

.byrtn-lightbox-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 65vh;
    object-fit: contain;
    background: #000;
}

/* Caption sous l'image */
.byrtn-lightbox-caption {
    padding: 16px 20px 20px;
    color: rgba(255,255,255,0.9);
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    line-height: 1.7;
    border-top: 0.5px solid rgba(243,203,103,0.2);
}

.byrtn-lightbox-caption strong {
    color: #f3cb67;
    font-weight: 500;
    display: block;
    margin-bottom: 6px;
    font-size: 0.88rem;
    letter-spacing: 0.1em;
}

/* ═══════════════════════════════════════
   PAYSAGE — réduire la hauteur image
═══════════════════════════════════════ */
@media (orientation: landscape) and (max-height: 600px) {
    .byrtn-lightbox-box {
        width: 90vw;
        max-height: 92vh;
    }

    .byrtn-lightbox-img {
        max-height: 50vh;
    }
}
