/* Audace — Editor styles */

h1 {
    font-size: 2em;
}

/* Clean no margin */
:where(.wp-site-blocks) > *,
:root :where(.is-layout-constrained) > *  {
    margin-block-start: 0;
    margin-block-end: 0;
}

/* Clean no margin */
:where(.wp-site-blocks) > * {
    margin-block-start: 0;
    margin-block-end: 0;
}

/* Lock column widths in the editor too */
@media (min-width: 782px) {
    .wp-block-columns > .wp-block-column[style*="width"] {
        flex: 0 0 auto !important;
        flex-basis: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        box-sizing: border-box !important;
        overflow-wrap: break-word;
    }
}

.wp-block-navigation-item.is-style-audace-button > .wp-block-navigation-item__content {
    background: var(--wp--preset--color--primary, #1f5fff);
    color: var(--wp--preset--color--base, #fff);
    padding: 0.6rem 1.2rem;
    font-weight: 600;
}

/* Match the front-end overlay link styling in the editor: no underline,
 * and links inherit the surrounding text color (so white text on the
 * blue overlay stays white). Covers both the live overlay wrapper and
 * the standalone template-part preview (no wrapper). */
.audace-menu-overlay a,
.audace-overlay-content a,
.audace-overlay-nav a {
    text-decoration: none;
    color: inherit;
}
.audace-menu-overlay a:hover,
.audace-overlay-content a:hover,
.audace-overlay-nav a:hover {
    text-decoration: none;
    color: inherit;
}

.is-style-slides-container .wp-block-columns {
    min-height: 100lvh;         /* lets it grow beyond viewport if needed */
}

.wp-block-column.is-style-mobile-50vh figure.aligncenter {
    justify-content: center;
}

.has-audace-full-height .wp-block-cover {
    height: 100lvh;
}

.wp-block-column.is-style-full-height-image {
    height: 90lvh;
}

.wp-block-column.is-style-full-height-image figure,
.wp-block-column.is-style-full-height-image figure img {
    height: 100%;
    width: auto;
    max-height: 100%;
}

@media (max-width: 782px) {
    .wp-block-column.is-style-mobile-50vh,
    .has-audace-full-height .wp-block-column.is-style-mobile-50vh .wp-block-cover,
    .has-audace-full-height .wp-block-column.is-style-mobile-50vh .wp-block-cover img {
        height: 50lvh;
        min-height: 50lvh;
    }

    .is-style-slide .wp-block-column.is-style-mobile-50vh figure {
        display: flex;
        height: 100%!important;
    }

    .is-style-slide .wp-block-column.is-style-mobile-50vh figure img {
        height: 100% !important;
        width: auto !important;
    }
}

.audace-site-footer a {
    text-decoration: none;
}
.audace-site-footer a:hover,
.audace-site-footer a:focus-visible {
    color: var(--wp--preset--color--contrast, #000);
}


/* Columns: when the column has an inline width or flex-basis, lock it.
 * Gutenberg's default `flex: 1 1 0%` would otherwise discard the declared
 * size and let the column with the wider intrinsic content (image, etc.)
 * grow past 50%. */
@media (min-width: 782px) {
    .wp-block-columns > .wp-block-column[style*="width"],
    .wp-block-columns > .wp-block-column[style*="flex-basis"] {
        flex: 0 0 auto;
    }
}

/* Site-logo with "Faire un lien vers l'accueil" wraps the <img> in <a>.
 * The <a> defaults to inline display, and an SVG <img> with no intrinsic
 * size collapses to 0×0 — so the logo "disappears". Force the link and
 * image to fill the resizable-box container. */
.wp-block-site-logo .custom-logo-link {
    display: block;
    width: 100%;
    height: 100%;
}
.wp-block-site-logo .custom-logo-link img.custom-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Columns: left sticky, right scrolls (editor preview). */
@media (min-width: 782px) {
    .wp-block-columns.is-style-sticky-left > .wp-block-column:first-child {
        position: sticky;
        top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--audace-header-h, 0px));
        align-self: flex-start;
    }
}
