.container-galerie {
    width: 90%;
    margin: 0 auto;
    display: flex;
    text-align: center;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
}

.flex {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.bloc {
    background: #f4f4f4;
    border: 1px solid #ddd;
    padding: 20px;
    margin: 10px;
    width: calc(25% - 20px); /* Ajuste le pourcentage pour le nombre de colonnes souhaitées */
    box-sizing: border-box;
    height: auto;
    display: flex;
    flex-direction: column;
}
.bloc:hover{
    border: 1px solid #b34b32;
    transition: 0.5s;
}

.bloc p {
    margin: 20px 0;
    flex: 1; /* Permet au texte de prendre tout l'espace disponible */
    text-align: justify;
}

.enBas {
    margin-top: auto; /* Pousse l'élément vers le bas */
}
.enBas a {
    color: #b34b32;
}

.imageBackground {
    width: 100%;
    height: 250px;
    background: #ddd;
    margin-bottom: 10px;
}

.imageBackground img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.imageBackground iframe {
    width: 100%;
    height: 100%;

}

.titreS {
    color: black;
    font-weight: bold;
    font-size: 1.5em;
    margin: 10px 0;
}

.lien-galerie {
    display: block;
    margin-top: 10px;
    text-decoration: none;
    text-align: center;
    font-size: 22px;
    color: white;
}

.lien-galerie:hover {
    text-decoration: underline;
}

.youtube-facade {
    position: relative;
    cursor: pointer;
    display: inline-block;

    width: 100%;
    height: 100%;
}
.video-thumbnail {
    width: 100%;
    display: block;
}
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 0.5em 1em;
    border-radius: 0.3em;
    pointer-events: none;
}
.youtube_player{
    width: 100%;
}

@media screen and (max-width: 600px) {
    .bloc p {
        margin: auto;
    }

    .flex {
        flex-direction: column;
        align-items: center;
    }

    .bloc {
        width: 300px;
    }


    .bloc:nth-of-type(3),
    .bloc:nth-of-type(4) {
        display: none;
    }
}

@media screen and (min-width: 600px) and (max-width: 955px) {
    .bloc {
        width: 350px;
    }


}

/* Pour les écrans entre 600px et 1024px de largeur */
@media screen and (min-width: 955px) and (max-width: 1024px) {
    .bloc {
        width: 400px;
    }

    .bloc:nth-of-type(1),
    .bloc:nth-of-type(2),
    .bloc:nth-of-type(3),
    .bloc:nth-of-type(4) {
        display: block;
    }
}

/* Pour les écrans de moins de 1600px de largeur */


@media screen and (min-width: 1024px) and (max-width: 1700px) {
    .bloc {
        width: 400px;
    }
}