/* gallery.css */

/* ================= VARIABLES ================= */
:root {
    --bs-grey: #b0b0b0;
    --bs-grey-hover: #969696;
    --text-muted-color: #6c757d;
}

/* ================= GALLERY PAGE ================= */
.gallery-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 300;
    margin: 2rem 0;
}

/* Container for gallery content */
.container-gallery {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Flex container for gallery description and visuals */
.gallery-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.gallery-description {
    font-size: 0.95rem;
    color: var(--text-muted-color);
    line-height: 1.6;
}

/* Sub-container for each image + caption */
.gallery-sub-container {
    display: inline-block;
    text-align: center;
    margin: 0 0.5rem 1rem 0.5rem;
}

.gallery-sub-container span {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 300;
    font-size: 0.9rem;
    color: #333;
}

/* Images: equal size and maintain aspect ratio */
.gallery-sub-container img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-sub-container img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Triptych layout: side by side */
.gallery-wide-visuals {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.gallery-wide-texts {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted-color);
    line-height: 1.6;
    margin-top: 1rem;
}

/* Main style for "Toutes les œuvres" / newsletter button */
.cta-back-all-works {
    display: inline-block;
    background-color: transparent;
    color: #555; /* slightly darker than previous grey */
    border: 1px solid var(--bs-grey);
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
    border-radius: 4px;
}

.cta-back-all-works:hover,
.cta-back-all-works:focus {
    background-color: var(--bs-grey-hover);
    color: #000; /* black on hover */
    border-color: var(--bs-grey-hover);
    transform: translateY(-1px);
}

/* ================= MODAL ZOOM ================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    justify-content: center;
    align-items: center;
    background-color: rgba(0,0,0,0.8);
    z-index: 1050;
}

.modal-content {
    position: relative;
    max-width: 95%;
    max-height: 90%;
}

.modal-content img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.modal-content .btn-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2.5rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 992px) {
    .gallery-sub-container img {
        width: 45%;
        height: 150px;
    }
}

@media (max-width: 576px) {
    .gallery-sub-container img {
        width: 100%;
        height: auto;
    }
    .gallery-wide-visuals {
        flex-direction: column;
        gap: 1rem;
    }
    .gallery-wide-texts {
        text-align: left;
    }
}
