  /* Conteneur de la galerie utilisant Flexbox */
.gallery {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	width: 95%;
	flex-direction: row;
    align-items: flex-start;
}

.gallery .galleryfull{
    width: 100%;
}

.gallery iframe{
    margin: 0;
    width: 100%;
    height: 200%;
    border-radius: 8px 8px 0 0;
}

/* Styles pour chaque image */
.gallery > * {
    width: calc(33.333% - 20px);
    /*height: 21vw;*/
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.55);
    transition: transform 0.3s;
    margin: 10px;
    color: black;
    text-decoration: none;


    img{
        width: 100%;
        border-radius: 8px 8px 0 0;
        height: 400px;
        object-fit: cover;

    }

    .short{
        height: 21vw;
    }      
}

.gallery.x4 > *{
    margin: 40px;
    height: 28vw;
    width: calc(25% - 80px);
}

/* Responsivité pour les tablettes */
@media (max-width: 1200px) {
    .gallery.x4 > * {
        height: 44vw;
        min-height: 200px;
        width: calc(33.333% - 80px); /* trois images par ligne */
    }
      .headimage {
        height: 50vh;}
}

@media (max-width: 900px) {
    .gallery > * , .gallery.x4 > * {
        min-height: 200px;
        width: calc(50% - 20px); /* Deux images par ligne */
    }

    .gallery.x4 > * {
        width: calc(50% - 80px);
    }
}

/* Responsivité pour les mobiles */
@media (max-width: 600px) {
    .gallery > * , .gallery.x4 > * {
        width: 100%; /* Une image par ligne */
    }

    .gallery.x4 > * {height: 100vw;
}