/*
 * Section avec image qui prend toute la hauteur de la colonne texte adjacente.
 * Usage : ajouter la classe CSS "voco-image-fill" sur la section Divi.
 * Fonctionne quelle que soit la position de la colonne image (gauche ou droite).
 */

.voco-image-fill .et_pb_row {
    align-items: stretch;
}

.voco-image-fill .et_pb_column {
    display: flex;
    flex-direction: column;
}

/* La colonne qui contient un module image doit étirer ce module */
.voco-image-fill .et_pb_column:has(> .et_pb_image) {
    justify-content: stretch;
}

.voco-image-fill .et_pb_column > .et_pb_image {
    flex: 1 1 auto;
    height: 100%;
    margin-bottom: 0;
}

.voco-image-fill .et_pb_column > .et_pb_image .et_pb_image_wrap {
    display: block;
    height: 100%;
    width: 100%;
}

.voco-image-fill .et_pb_column > .et_pb_image .et_pb_image_wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Sur mobile, les colonnes s'empilent : on rétablit le comportement naturel */
@media (max-width: 980px) {
    .voco-image-fill .et_pb_column > .et_pb_image,
    .voco-image-fill .et_pb_column > .et_pb_image .et_pb_image_wrap {
        height: auto;
    }
    .voco-image-fill .et_pb_column > .et_pb_image .et_pb_image_wrap img {
        height: auto;
        object-fit: initial;
    }
}
