/* Style de la galerie */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

.gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

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

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

/* Style de la modale */
/* Style de la modale */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #000;
    padding: 15px; /* Même espacement partout (haut, droite, bas, gauche) */
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    text-align: center;
    color: white;
    position: relative;
    text-align: left;
}

#modal-image {
    max-width: 100%;
    max-height: 60vh;
    margin-bottom: 20px;
    border-radius: 4px;
}

.close {
    position: absolute;
    top: 15px; /* Réduit cette valeur pour le monter */
    right: 30px;
    font-size: 48px;
    cursor: pointer;
    color: black;
    transition: transform 0.3s ease, color 0.3s ease;
    font-weight: bold;
}

.close:hover {
    transform: rotate(360deg);
    color: black;
}

#modal-title {
    color: white; /* Titre en blanc */
    margin-bottom: 10px;
    text-align: left;
}

#modal-description {
    color: white; /* Description en blanc */
    text-align: left;
}


#modal-image {
    max-width: 100%;
    max-height: 60vh;
    margin-bottom: 20px;
    border-radius: 4px;
}


/* Responsive */
@media (max-width: 960px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}
