/*
 * Adaptations BlogThèque pour les contenus générés avec Vanilla HTML Designer.
 * Ce fichier est volontairement séparé du composant afin de survivre à ses mises à jour.
 */

/*
 * Chromium/WebKit imprime parfois une grille comme un bloc indivisible et
 * repousse alors une ligne VHD entière sur la page suivante. Flex conserve
 * les proportions des colonnes tout en offrant une meilleure fragmentation.
 */
@media print {
    .vhd-content {
        display: block;
        break-inside: auto;
        page-break-inside: auto;
    }

    .vhd-content .vhd-row {
        display: flex;
        flex-flow: row nowrap;
        align-items: flex-start;
        break-inside: auto;
        page-break-inside: auto;
    }

    .vhd-content .vhd-col {
        display: block;
        flex: var(--vhd-span) 1 0%;
        width: auto;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        break-inside: auto;
        page-break-inside: auto;
    }

    .vhd-content .vhd-col .vhd-image {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .vhd-content .vhd-col .vhd-image img,
    .vhd-content .vhd-col .vhd-inline-image {
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }
}
