/* =========================
PAGE GALERIE
========================= */

/* Titre */
h1 {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

/* Description */
p {
    max-width: 65ch;
    margin: 0 auto 2.5rem auto;
    text-align: center;
    font-size: clamp(1.2rem, 2.8vw, 1.45rem);
    line-height: 1.7;
}

/* =========================
CONTENEUR GALERIE - Style Masonry
========================= */

.gallery-media {
    max-width: 1200px;
    margin: 0 auto 3rem auto;
    padding: 0 1rem;

    /* Grille multi-colonnes qui s'adapte */
    column-count: 3;
    column-gap: 24px;
}

@media (max-width: 900px) {
    .gallery-media {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .gallery-media {
        column-count: 1;
    }
}

/* =========================
IMAGES & VIDÉOS (cartes)
========================= */

.gallery-media a {
    display: inline-block;
    width: 100%;
    margin-bottom: 24px;
    break-inside: avoid; /* Évite de couper les images entre colonnes */
}

.gallery-image,
.gallery-video {
    width: 100%;
    height: auto; /* ← Hauteur automatique selon ratio de l'image */
    object-fit: cover;
    cursor: pointer;

    border-radius: 12px;
    background-color: #000;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-image:hover,
.gallery-video:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
}

/* =========================
LIGHTBOX (plein écran)
========================= */

.glightbox video {
    max-height: 90vh;
}

/* =========================
LIEN RETOUR
========================= */

.retour {
    display: block;
    width: fit-content;
    margin: 0 auto 2rem auto;

    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: 2px solid #000;

    background-color: #EFE7D6;
    color: #000;
    text-decoration: none;
    font-weight: 600;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.retour:hover {
    background-color: #f5f0e6;
    transform: translateY(-2px);
}

/* =========================
RESPONSIVE
========================= */

@media (max-width: 768px) {
    h1 {
        margin-bottom: 1rem;
    }
}