* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    padding: 20px;
    background-color: #10ab96;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.gallery img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
    border: 8px solid white;
    background-color: white;
}

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

/* Styles pour le 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);
    padding: 20px;
}

.modal-content {
    max-width: 90%;
    max-height: 85vh;
    margin: auto;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
}

.close {
    position: absolute;
    right: 25px;
    top: 10px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #bbb;
}

.download-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #45a049;
}

.no-images-message {
    text-align: center;
    padding: 50px;
    font-size: 24px;
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 20px auto;
    max-width: 600px;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        padding: 10px;
        gap: 10px;
    }

    .modal-content {
        max-width: 95%;
        max-height: 80vh;
    }

    .close {
        right: 15px;
        top: 5px;
    }
}
