/* ========================================================
   TEMPLATE DEFAULT - STYLES
   ======================================================== */

/* Réinitialiser les styles du body pour permettre le scroll */
body, html {
    height: auto !important;
    overflow: visible !important;
    overflow-y: auto !important;
    min-height: 100vh;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: white;
    min-height: 100vh;
}

.gallery-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 0 20px;
}

.gallery-header h1 {
    font-size: 2.5rem;
    color: black;
    margin-bottom: 20px;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.gallery-description {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 30px;
}

.gallery-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.meta-item {
    font-size: 0.95rem;
    color: #666;
}

.meta-label {
    font-weight: 600;
    color: black;
}

.meta-value {
    color: #444;
}

/* Grille d'images */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.image-caption {
    padding: 15px;
    background-color: white;
}

.image-caption h3 {
    font-size: 1.1rem;
    color: black;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.image-caption p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* Bouton retour */
.gallery-back {
    text-align: center;
    padding: 20px;
}

.btn-back {
    display: inline-block;
    padding: 12px 30px;
    background-color: white;
    color: black;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    border: none;
}

.btn-back:hover {
    background-color: #f5f5f5;
    color: black;
}

/* Message si pas d'images */
.no-images {
    text-align: center;
    font-size: 1.2rem;
    color: #999;
    padding: 60px 20px;
}

/* ========================================================
   LIGHTBOX
   ======================================================== */

.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding: 50px 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: 300;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
}

.lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: white;
    padding: 20px 0;
    height: auto;
}

.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: 300;
    font-size: 40px;
    transition: 0.3s ease;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.5);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
    left: 0;
}

.lightbox-next {
    right: 0;
}

/* ========================================================
   RESPONSIVE
   ======================================================== */

@media screen and (max-width: 900px) {
    .gallery-header h1 {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 12px;
    }
}

@media screen and (max-width: 700px) {
    .gallery-container {
        padding: 20px 10px;
    }

    .gallery-header h1 {
        font-size: 1.5rem;
    }

    .gallery-description {
        font-size: 1rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .gallery-item img {
        aspect-ratio: 16/9;
    }

    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 24px;
        padding: 8px;
    }
}
