/* Galerie en mosaïque - Styles CSS */
.gallery-container {
    display: flex;
    width: 100%;
    height: fit-content;
    background-color: white;
    justify-content: center;
    align-items: center;
    /* padding: 1rem; */
}

@media (min-width: 1024px) {
    .gallery-container {
        width: 75%;
    }
}

.gallery-grid {
    display: grid;
    width: 100%;
    max-width: 56rem; /* max-w-4xl */
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.gallery-item {
    aspect-ratio: 1 / 1;
    background-color: #a78bfa; /* bg-purple-400 */
    border-radius: 2rem; /* rounded-4xl */
    cursor: zoom-in;
    position: relative;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 1rem; /* rounded-2xl */
}

/* Tailles spécifiques pour chaque élément */
.gallery-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item:nth-child(2) {
    grid-column: span 1;
    grid-row: span 1;
}

.gallery-item:nth-child(3) {
    grid-column: span 1;
    grid-row: span 1;
}

.gallery-item:nth-child(4) {
    grid-column: span 1;
    grid-row: span 1;
}

.gallery-item:nth-child(5) {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item:nth-child(6) {
    grid-column: span 1;
    grid-row: span 1;
}

/* Responsive pour les petits écrans */
@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .gallery-item {
        aspect-ratio: 1 / 1; /* Force l'aspect ratio carré sur mobile */
        border-radius: 1rem;
    }

    .gallery-item:nth-child(1),
    .gallery-item:nth-child(2),
    .gallery-item:nth-child(3),
    .gallery-item:nth-child(4),
    .gallery-item:nth-child(5),
    .gallery-item:nth-child(6) {
        grid-column: span 1;
        grid-row: span 1;
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: 1rem; /* rounded-2xl sur mobile */
    }
}

/* Petits écrans - moins de sm (640px) */
@media (max-width: 639px) {
    .gallery-container {
        width: 100%;
    }
}

/* Effets de survol */
.gallery-item:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}
