/* --- Galerie : grille --------------------------------------------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: #eef1f6;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 10px 12px 8px;
    background: linear-gradient(to top, rgba(13,40,70,.85), rgba(13,40,70,0));
    color: #fff;
    font-size: 12.5px;
    line-height: 1.35;
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

/* --- Lightbox ------------------------------------------------------- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 35, .92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 40px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-figure { max-width: 1100px; width: 100%; text-align: center; }
.lightbox-figure img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.lightbox-caption { color: #e2e8f0; font-size: 14px; margin-top: 14px; }
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: fixed;
    background: rgba(255,255,255,.1);
    border: none;
    color: #fff;
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.2); }

@media (max-width: 860px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .lightbox-prev, .lightbox-next { width: 38px; height: 38px; }
}
