.gallery {
    margin-top: 100px;
    display: flex;
    flex-wrap: wrap;
    margin: 80px 50px;
    gap: 20px;
    justify-content: center;
}

.gallery-item {
    position: relative;
    width: 300px; /* Ajustez la taille selon vos besoins */
    height: 200px; /* Ajustez la taille selon vos besoins */
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Fond semi-transparent */
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.overlay p {
    margin: 0;
    padding: 10px;
    text-align: center;
    font-size: 1.2rem;
}

/* Styles pour la modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    object-fit: contain;
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {transform: scale(0.1)}
    to {transform: scale(1)}
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover {
    color: #bbb;
}

.modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 800px;
    text-align: center;
    color: #fff;
    padding: 10px 0;
    font-size: 1.2rem;
}

/* Styles pour la pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    gap: 10px;
}

.pagination button {
    padding: 8px 15px;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover {
    background-color: #ddd;
}

.pagination button.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}