/* Mise en page globale */
.galerie-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.galerie-header {
    text-align: center;
    margin-bottom: 40px;
}

.galerie-header h1 {
    font-family: 'Playfair Display', serif;
    color: #821517;
    font-size: 36px;
    margin-bottom: 10px;
}

/* Alignement horizontal avec Flexbox */
.galerie-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Espace entre les images */
    justify-content: center;
}

/* Taille des images (3 par ligne sur PC) */
.galerie-item {
    flex: 0 1 calc(33.333% - 20px);
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.galerie-item img {
    width: 100%;
    height: 250px; /* Force une hauteur harmonieuse */
    object-fit: cover; /* Recadre proprement sans déformer */
    display: block;
}

.galerie-item:hover {
    transform: scale(1.03);
}

/* Overlay au survol */
.galerie-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(130, 21, 23, 0.5);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s;
}

.galerie-item:hover .galerie-overlay {
    opacity: 1;
}

.galerie-overlay span {
    color: white;
    border: 2px solid white;
    padding: 5px 15px;
    font-family: 'Montserrat', sans-serif;
}

/* Responsive : Tablettes (2 par ligne) */
@media (max-width: 991px) {
    .galerie-item {
        flex: 0 1 calc(50% - 20px);
    }
}

/* Responsive : Mobiles (1 par ligne) */
@media (max-width: 576px) {
    .galerie-item {
        flex: 0 1 100%;
    }
}

/* Correction affichage interface Lightbox */
.lb-dataContainer { padding-top: 15px; }
.lb-caption { font-family: 'Montserrat', sans-serif; font-size: 16px; color: #fff; }
.lb-closeContainer { margin-top: 10px; }