.gallery-grid {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr;
    gap: 20px;
    align-items: stretch;
}

/* MINIATURES */
.thumbnails {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.thumb {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    cursor: pointer;
    border-radius: 6px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.thumb:hover {
    transform: scale(1.04);
    opacity: 0.9;
}

.thumb.active {
    outline: 2px solid var(--primary);
}

/* IMAGE PRINCIPALE */
.main-image {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.4s ease;
}

/* LIGHTBOX */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: none;
    justify-content: center;
    align-items: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 85%;
}

.lightbox .close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* MOBILE */
@media (max-width: 768px) {
    .gallery {
        padding: 20px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .thumbnails {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        margin-top: 15px;
    }

    .thumb {
        min-width: 80px;
    }
}