/* =========================================================
   MHPSS ProCare Firm
   Articles (publications, actualites, documents)
   ========================================================= */

/* Mise en page des articles */
body.single main {
    --wp--style--global--content-size: 44rem;
    --wp--style--global--wide-size: 52rem;
    --wp--preset--spacing--60: 1.25rem;
}

body.single main>.wp-block-group {
    padding-inline: 1.25rem !important;
    box-sizing: border-box !important;
}

body.single h1.wp-block-post-title {
    display: block !important;
    margin-bottom: 1.5rem !important;
    font-size: clamp(1.9rem, 4.5vw, 2.75rem) !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
}

body.single .wp-block-post-featured-image {
    margin-bottom: 2rem !important;
    border-radius: 0.75rem;
    overflow: hidden;
}

body.single .wp-block-post-featured-image img {
    width: 100%;
    height: auto;
    max-height: 22rem;
    object-fit: cover;
}

body.single .wp-block-group:has(> .wp-block-post-author-name) {
    display: none !important;
}

body.single .entry-content p {
    margin-block: 0 1.1em;
}

body.single .entry-content h2 {
    margin-block: 2.2rem 0.8rem;
}

body.single .entry-content h3 {
    margin-block: 1.8rem 0.6rem;
}

/* Article publie sous forme de PDF */
body.single .wp-block-file {
    margin-block: 1.5rem 2rem;
}

body.single .wp-block-file__embed {
    display: block;
    width: 100% !important;
    height: min(78vh, 900px) !important;
    border: 1px solid var(--hz-border, #d7e0e4);
    border-radius: 0.75rem;
    background: #ffffff;
}

body.single .wp-block-file>a:not(.wp-block-file__button) {
    display: inline-block;
    margin-top: 0.9rem;
    font-weight: 600;
}

body.single .wp-block-file__button {
    margin-left: 0.75rem;
}

@media (max-width: 781px) {
    body.single .wp-block-file__embed {
        display: none !important;
    }

    body.single .wp-block-file {
        border: 1px solid var(--hz-border, #d7e0e4);
        border-radius: 0.75rem;
        padding: 1.25rem;
        background: #ffffff;
        text-align: center;
    }

    body.single .wp-block-file>a:not(.wp-block-file__button) {
        display: block;
        margin: 0 0 1rem;
    }

    body.single .wp-block-file__button {
        margin-left: 0;
    }
}

/* Pas de navigation d un article a l autre */
body.single nav.wp-block-group.alignwide {
    display: none !important;
}

/* Bouton de telechargement aux couleurs du site */
body.single .wp-block-file__button {
    background: var(--hz-primary);
    color: #ffffff;
    border-radius: 0.5rem;
}

body.single .wp-block-file__button:hover,
body.single .wp-block-file__button:focus-visible {
    background: color-mix(in srgb, var(--hz-primary) 85%, #000000);
    color: #ffffff;
}

/* « Plus de publications » : la date reste sur une ligne. */
body.single .wp-block-post .wp-block-post-date {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Telephone : la date passe sous le titre. */
@media (max-width: 640px) {
    body.single .wp-block-post>.wp-block-group.is-nowrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    body.single .wp-block-post .wp-block-post-date {
        text-align: left;
    }
}
