body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
}

header h1 {
    margin: 0;
}

main {
    padding: 0; /* Supprime le padding */
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 0; /* Supprime l'espace entre les photos */
    justify-content: center;
}

.photo {
    position: relative;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    flex: 1 1 calc(40%); /* Largeur des photos */
    max-width: calc(40%);
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin: 0; /* Supprime les marges */
}

.photo img {
    width: 100%;
    height: auto;
    display: block;
}

.photo .description {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%; /* Description couvre la moitié inférieure de l'image */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
    color: #fff;
    padding: 10px;
    font-size: 0.9rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex; /* Pour centrer le texte verticalement */
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 0;
    
}

.photo:hover .description {
    opacity: 1;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    bottom: 0;
}

@media (max-width: 1200px) {
    .photo {
        flex: 1 1 calc(50%); /* Largeur des photos réduite à 50% */
        max-width: calc(50%);
    }
}

@media (max-width: 800px) {
    .photo {
        flex: 1 1 100%;
        max-width: 100%;
    }
}
