/** BASE **/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 CSS Variables
2.0 Body
3.0 Styles from design
4.0 Layout
5.0 Core Gutenberg blocks

--------------------------------------------------------------*/

/* albert-sans-regular - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Albert Sans';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/albert-sans-v4-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* albert-sans-500 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Albert Sans';
    font-style: normal;
    font-weight: 500;
    src: url('../fonts/albert-sans-v4-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* albert-sans-600 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Albert Sans';
    font-style: normal;
    font-weight: 600;
    src: url('../fonts/albert-sans-v4-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* albert-sans-700 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Albert Sans';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/albert-sans-v4-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* albert-sans-800 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Albert Sans';
    font-style: normal;
    font-weight: 800;
    src: url('../fonts/albert-sans-v4-latin-800.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}



/*- 1.0 CSS Variables */
:root {
    /* Defined by WP through theme.json */

    --wp--style--root--padding-top: 0px;
    --wp--style--root--padding-right: 78px;
    --wp--style--root--padding-bottom: 0px;
    --wp--style--root--padding-left: 78px;

    --wp--style--global--content-size: 1284px;
    --wp--style--global--wide-size: 1440px;
    /*
    Variables below are generated by WordPress based on theme.json
    --wp--preset--color--blue: #30396C;
    --wp--preset--color--blue-500: #616DAD;
    --wp--preset--color--grey-main: #595959;
    --wp--preset--color--golden: #BFAA90;
    --wp--preset--color--golden-600: #B5956F;
    --wp--preset--color--golden-500: #BFAA90;
    --wp--preset--color--golden-100: #F8F5F2;
    --wp--preset--color--bcoworker-golden: #D0B47A;
    --wp--preset--color--bcoworker-blue: #5B7E97;
    --wp--preset--color--bcoworker-golden: #C8B89D;
    --wp--preset--color--bcoworker-blue: #484D52;
    --wp--preset--color--cir-prefa-red: #BB5549;
    --wp--preset--color--cir-prefa-main: #6C776E;
    */

    /* Utils */
    --scrollbar-width: 0px;
    --admin-bar-height: 0px;
    --viewport-height-diff: 0px;

    --custom-theme-z-index-nav: 2000;
    --custom-theme-z-index-overlay: 4000;

    --custom-theme-flex-span: 1;
    --custom-theme-flex-gap: 24px;

    /* Put custom css variables here */
    --custom-theme-site-header-height: 113px;
    --custom-theme-footer-margin-top: 64px;
}
body {

}

.has-white-color { color: #FFF; }
.has-black-color { color: #000; }

.has-blue-color { color: var(--wp--preset--color--blue); }
.has-blue-background-color { background-color: var(--wp--preset--color--blue); }
.has-blue-500-color { color: var(--wp--preset--color--blue-500); }
.has-blue-500-background-color { background-color: var(--wp--preset--color--blue-500); }
.has-grey-main-color { color: var(--wp--preset--color--grey-main); }
.has-grey-main-background-color { background-color: var(--wp--preset--color--grey-main); }
.has-golden-color { color: var(--wp--preset--color--golden); }
.has-golden-background-color { background-color: var(--wp--preset--color--golden); }
.has-golden-600-color { color: var(--wp--preset--color--golden-600); }
.has-golden-600-background-color { background-color: var(--wp--preset--color--golden-600); }
.has-golden-500-color { color: var(--wp--preset--color--golden-500); }
.has-golden-500-background-color { background-color: var(--wp--preset--color--golden-500); }
.has-golden-100-color { color: var(--wp--preset--color--golden-100); }
.has-golden-100-background-color { background-color: var(--wp--preset--color--golden-100); }
.has-bcoworker-golden-color { color: var(--wp--preset--color--bcoworker-golden); }
.has-bcoworker-golden-background-color { background-color: var(--wp--preset--color--bcoworker-golden); }
.has-bcoworker-blue-color { color: var(--wp--preset--color--bcoworker-blue); }
.has-bcoworker-blue-background-color { background-color: var(--wp--preset--color--bcoworker-blue); }
.has-bmg-fonciere-golden-color { color: var(--wp--preset--color--bmg-fonciere-golden); }
.has-bmg-fonciere-golden-background-color { background-color: var(--wp--preset--color--bmg-fonciere-golden); }
.has-bmg-fonciere-blue-color { color: var(--wp--preset--color--bmg-fonciere-blue); }
.has-bmg-fonciere-blue-background-color { background-color: var(--wp--preset--color--bmg-fonciere-blue); }
.has-cir-prefa-red-color { color: var(--wp--preset--color--cir-prefa-red); }
.has-cir-prefa-red-background-color { background-color: var(--wp--preset--color--cir-prefa-red); }
.has-cir-prefa-main-color { color: var(--wp--preset--color--cir-prefa-main); }
.has-cir-prefa-main-background-color { background-color: var(--wp--preset--color--cir-prefa-main); }

.has-grey-50-background-color { background-color: #FAFAFA; }
.has-white-background-color { background-color: #FFF; }

.has-blue-background-color,
.has-blue-background-color .wp-block-heading,
.has-blue-background-color .is-style-like-h3 {
    color: #FFF;
}
.has-blue-background-color .is-style-label {
    background-color: #E9E2D8;
}
.has-blue-background-color {
    --custom-theme-button-bg-color: var(--wp--preset--color--golden-500);
    --custom-theme-button-bg-color-alt: var(--wp--preset--color--golden-600);
    --custom-theme-button-border-color: var(--wp--preset--color--golden-500);
    --custom-theme-button-border-color-alt: var(--wp--preset--color--golden-600);
}

@media screen and (max-width: 1279px) {
    :root {
        --custom-theme-site-header-height: 76px;
        --wp--style--root--padding-right: 48px;
        --wp--style--root--padding-left: 48px;
    }
}
@media screen and (max-width: 991px) {
    :root {
        --custom-theme-footer-margin-top: 48px;
    }
}

@media screen and (max-width: 767px) {
    :root {
        --wp--style--root--padding-right: 20px;
        --wp--style--root--padding-left: 20px;
    }
}

/*- 2.0 Body */
.editor-styles-wrapper,
body:not(.wp-admin) {
    font-family: 'Albert Sans', sans-serif;
    font-size: 1.125rem;
    line-height: 1.3;
    color: var(--wp--preset--color--grey-main);
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;

    transition: 0.5s ease-out;
}
body:not(.wp-admin).has-blue-background-color {
    color: #FFFFFF;
    background: var(--wp--preset--color--blue) url('../images/body-blue-bg.webp') center center / cover no-repeat;
}
body:not(.wp-admin).has-blue-background-color.no-gradient-background-color {
    background-image: none;
}

/*- 3.0 Styles from design */

/*- 4.0 Layout */

.layout-width {
    max-width: var(--wp--style--global--wide-size);
    margin: 0 auto;
}
.is-root-container,
.content-width {
    max-width: var(--wp--style--global--content-size);
    margin: 0 auto;
}
.is-layout-constrained > *:not(.alignfull):not(.alignwide) {
    margin-right: auto;
    margin-left: auto;
    max-width: var(--wp--style--global--content-size);
}
.has-global-padding .alignfull,
.has-global-padding .alignwide {
    margin-left: calc(var(--wp--style--root--padding-left) * -1);
    margin-right: calc(var(--wp--style--root--padding-right) * -1);
}
.is-layout-constrained > .alignwide {
    margin-left: auto;
    margin-right: auto;
    width: var(--wp--style--global--wide-size);
    max-width: 100%;
    height: auto;
}

.content-width .alignfull,
.is-layout-constrained .alignfull,
.block-column .alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-left: calc(50% - 50vw + var(--scrollbar-width) / 2);
    margin-right: calc(50% - 50vw + var(--scrollbar-width) / 2);
    max-width: calc(100vw - var(--scrollbar-width));
    width: calc(100vw - var(--scrollbar-width));
    box-sizing: border-box; /* for wp-admin */
}
[data-type].alignfull > .alignfull {
    width: auto;
    margin-left: 0;
    margin-right: 0;
}

.custom-theme-flex-grid,
.gform_fields,
.ginput_complex {
    display: flex;
    gap: var(--custom-theme-flex-gap);
}
.custom-theme-flex-grid > *,
.custom-theme-flex-grid::before,
.gform_fields > *,
.ginput_complex > * {
    flex: 0 0 calc((100% - 11 * var(--custom-theme-flex-gap)) / 12 * var(--custom-theme-flex-span) + var(--custom-theme-flex-gap) * (var(--custom-theme-flex-span) - 1));
    min-width: 0;
}

.site-content::after {
    content: '';
    display: block;
    margin-top: var(--custom-theme-footer-margin-top);
}

/*- 5.0 Core Gutenberg blocks */

.custom-block-title {
    background: #CCC;
    color: #333;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    padding: 5px 20px;
    grid-row: -1;
    grid-column: span 12;
}
.custom-block-title--lvl2 {
    font-size: 80%;
    background: #DDD;
    grid-row: -1;
    grid-column: span 12;
}

p[data-type="core/paragraph"],
.block-paragraph {
    margin-top: 0;
    margin-bottom: 1.2em;
    font-size: inherit;
}

p[data-type="core/paragraph"] a,
.block-paragraph a,
[data-type="core/list"] a,
.wp-block-list a {
    color: var(--wp--preset--color--golden);
    text-decoration: none;
}
.block-paragraph a:hover,
.block-paragraph a:focus,
.wp-block-list a:hover,
.wp-block-list a:focus {
    color: var(--wp--preset--color--golden-600);
    text-decoration: underline;
}

.wp-block-heading:where(:not(.has-text-color)) {
    color: var(--wp--preset--color--blue);
}
.wp-block-spacer + .wp-block-heading {
    margin-top: 0;
}

h1[data-type="core/heading"],
.block-h1 {
    font-size: 6rem;
    line-height: 1.1;
    font-weight: 800;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 1em;
}

h2[data-type="core/heading"],
.block-h2 {
    font-size: 2.25rem;
    line-height: 1.1;
    font-weight: 800;
    margin-top: 1.33em;
    margin-bottom: 1.2em;
}
.block-h2:has(+.wp-block-list) {
    margin-bottom: 0.67em;
}
.block-h2:has(+.block-h3) {
    margin-bottom: 0.5em;
}
.is-style-label + .block-h2 {
    margin-top: 0.67em;
}

h3[data-type="core/heading"],
.block-h3,
[data-type="core/heading"].is-style-like-h3,
.is-style-like-h3 {
    font-size: 1.25rem;
    line-height: 1.3;
    font-weight: 600;
    margin-top: 2.4em;
    margin-bottom: 0.8em;
}
.block-h2 +.block-h3 {
    margin-top: 0;
}
[data-type="core/heading"].is-style-bigger-h3,
.is-style-bigger-h3 {
    font-size: 1.875rem;
    line-height: 1.1;
    font-weight: 800;
}

[data-type="core/list"],
.wp-block-list {
    margin-top: 0;
    margin-bottom: 1.33em;
    font-size: inherit;
}
ul[data-type="core/list"],
ul.wp-block-list {
    list-style-type: none;
    padding-left: 0;
}
ul[data-type="core/list"] > li,
ul.wp-block-list > li {
    position: relative;
    padding-left: 1.78em;
}
ul[data-type="core/list"] > li::before,
ul.wp-block-list > li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0.33em;
    width: 0.67em;
    height: 1.3em;
    background: url('data:image/svg+xml;utf8,<svg width="12" height="20" viewBox="0 0 12 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m1.42 19.308 9.653-9.654L1.42 0 0 1.42l8.235 8.234L0 17.888z" fill="%23bfaa90"/></svg>');
    background-position: left center;
    background-repeat: no-repeat;
    background-size: 100% auto;
}
ul[data-type="core/list"] > li + li,
ul.wp-block-list > li + li {
    margin-top: 0.5em;
}
ul[data-type="core/list"] > li > .block-editor-rich-text__editable {
    display: inline-block!important;
}

ul[data-type="core/list"].is-style-bullets,
ul.wp-block-list.is-style-bullets {
    padding-left: 1.22em;
    list-style-type: disc;
}
ul[data-type="core/list"].is-style-bullets > li,
ul.wp-block-list.is-style-bullets > li {
    padding-left: 0.2em;
    margin-top: 0!important;
}
ul[data-type="core/list"].is-style-bullets > li::before,
ul.wp-block-list.is-style-bullets > li::before {
    display: none;
}
ul.wp-block-list.is-style-bullets .block-editor-rich-text__editable {
    vertical-align: top;
}

.wp-block-image {
    margin: 48px 0;
}
.wp-block-image img {
    display: block;
    max-width: 100%;
    height: auto;
}
.wp-element-caption {
    font-size: 0.75rem;
    line-height: 1.3;
    margin-top: 16px;
}
.wp-block-image.is-style-rounded img {
    border-radius: 8px;
}
.is-layout-constrained > .wp-block-image.alignwide {
    max-width: min(100%, var(--wp--style--global--wide-size) - 46px);
}
.wp-block-image.alignwide img {
    width: 100%;
}

.wp-block-buttons {
    margin-top: 32px;
    margin-bottom: 32px;
    gap: 16px;
}

body,
.has-white-background-color {
    --custom-theme-button-bg-color: var(--wp--preset--color--blue);
    --custom-theme-button-bg-color-alt: var(--wp--preset--color--blue-700);
    --custom-theme-button-border-color: var(--wp--preset--color--blue);
    --custom-theme-button-border-color-alt: var(--wp--preset--color--blue-700);
    --custom-theme-button-text-color: #FFF;
    --custom-theme-button-text-color-alt: #FFF;
}
.wp-block-button__link {
    background: var(--custom-theme-button-bg-color);
    border: 1px solid var(--custom-theme-button-border-color);
    color: var(--custom-theme-button-text-color);
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 600;
    padding: 11px 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: 0.3s ease-out;
}
.wp-block-button__link.has-text-align-center {
    justify-content: center;
}
.wp-block-button__link--icon-only {
    padding-left: 13px;
    padding-right: 13px;
}
.wp-block-button__link span {
    white-space: nowrap;
}
.wp-block-button__link:focus,
.wp-block-button__link:hover {
    background: var(--custom-theme-button-bg-color-alt);
    border-color: var(--custom-theme-button-border-color-alt);
    color: var(--custom-theme-button-text-color-alt);
}
.is-style-alt-color .wp-block-button__link {
    --custom-theme-button-bg-color: var(--wp--preset--color--golden-500);
    --custom-theme-button-bg-color-alt: var(--wp--preset--color--golden-600);
    --custom-theme-button-border-color: var(--wp--preset--color--golden-500);
    --custom-theme-button-border-color-alt: var(--wp--preset--color--golden-600);
}
.is-style-secondary .wp-block-button__link {
    --custom-theme-button-bg-color: #FFF;
    --custom-theme-button-bg-color-alt: #FAFAFA;
    --custom-theme-button-border-color: #E1E1DF;
    --custom-theme-button-border-color-alt: #E1E1DF;
    --custom-theme-button-text-color: var(--wp--preset--color--blue);
    --custom-theme-button-text-color-alt: var(--wp--preset--color--blue);
}
.is-style-link .wp-block-button__link {
    padding: 0;
    text-decoration: underline;
    border: 0;
    --custom-theme-button-bg-color: transparent;
    --custom-theme-button-bg-color-alt: transparent;
    --custom-theme-button-text-color: var(--wp--preset--color--golden);
    --custom-theme-button-text-color-alt: var(--wp--preset--color--golden-600);
}

.wp-block-pullquote {
    margin: 48px 0;
    border-left: 2px solid var(--wp--preset--color--golden);
    padding: 8px 0 8px 20px;
}
.wp-block-pullquote blockquote {
    margin: 0;
}
.wp-block-pullquote p {
    font-size: 1.5rem;
    line-height: 1.3;
    font-style: italic;
    font-weight: 600;
    color: var(--wp--preset--color--golden);
    margin: 0;
}
.wp-block-pullquote p:before {
    content: "« ";
}
.wp-block-pullquote p:after {
    content: " »";
}
.wp-block-pullquote cite {
    font-size: 1rem;
    line-height: 1.3;
    font-style: normal;
    margin-top: 32px;
    display: block;
}
.wp-block-pullquote cite::before {
    content: "— ";
}

.wp-block-quote {
    margin: 24px 0;
}
.wp-block-quote .block-paragraph {
    font-size: 2.25rem;
    line-height: 1.1!important;
    font-weight: 800;
    font-style: italic;
    margin-bottom: 0;
}
.wp-block-quote .block-paragraph::before {
    content: '« ';
}
.wp-block-quote .block-paragraph::after {
    content: ' »';
}

.wp-block-embed {

}

.wp-block-columns {
    --wp--style--block-gap: 10px;
}

.wp-block-separator {
    border:0;
    border-top: 1px solid #E1E1DF51;
    margin: 1.33em 0;
}

.wp-block-post-featured-image {
    margin: 40px 0;
    max-width: 160px;
    padding: 9px 30px;
    background: #FFF;
    border-radius: 8px;
}
.wp-block-post-featured-image img {
    max-width: 100%;
    height: auto;
    object-fit: contain!important;
}
body.has-blue-background-color .wp-block-post-featured-image {
    padding-top: 20px;
    padding-bottom: 20px;
}


.wp-block-heading:has(+.wp-block-navigation) {
    margin-top: 0;
}
.wp-block-navigation {
    margin-top: 0;
    margin-bottom: 1.33em;
    font-size: inherit;
}
.wp-block-navigation__container {
    padding: 0;
    margin: 0;
}
.wp-block-navigation-item {
    list-style-type: none;
    position: relative;
    padding-left: 1.78em;
}
.wp-block-navigation-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0.33em;
    width: 0.67em;
    height: 1.3em;
    background: url('data:image/svg+xml;utf8,<svg width="12" height="20" viewBox="0 0 12 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m1.42 19.308 9.653-9.654L1.42 0 0 1.42l8.235 8.234L0 17.888z" fill="%23bfaa90"/></svg>');
    background-position: left center;
    background-repeat: no-repeat;
    background-size: 100% auto;
}

.wp-block-navigation-item + .wp-block-navigation-item {
    margin-top: 0.5em;
}

.wp-block-navigation-item a {
    color: var(--wp--preset--color--grey-main);
    text-decoration: none;
}
.wp-block-navigation-item a:focus,
.wp-block-navigation-item a:hover {
    text-decoration: underline;
}

.wp-block-navigation-item a[href="#"] {
    pointer-events: none;
}

.wp-block-navigation__submenu-container {
    padding: 0;
    margin-top: 9px;
}

.is-style-label {
    background-color: var(--wp--preset--color--golden-100);
    color: var(--wp--preset--color--golden-600);

    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 4px 12px;
    width: fit-content;
    border-radius: 13px;

    font-size: 0.875rem;
    line-height: 1.3;
    text-transform: uppercase;
    font-weight: 500;
}
.is-style-label.has-text-align-center {
    margin-left: auto;
    margin-right: auto;
}
.wp-block-separator + .is-style-like-h3 {
    margin-top: 0;
}

.is-style-legal {
    font-size: 0.75rem;
    line-height: 1.3;
    font-style: italic;
}


.is-style-subtitle {
    font-size: 1.25rem;
    line-height: 1.3;
}
.wp-block-heading:has(+.is-style-subtitle) {
    margin-bottom: 24px;
}
.is-style-smaller {
    font-size: 0.75rem;
    line-height: 1.3;
}

h2[data-type="core/heading"].is-style-numbered,
.block-h2.is-style-numbered {
    counter-increment: block-h2 1;
}
h2[data-type="core/heading"].is-style-numbered::before,
.block-h2.is-style-numbered::before {
    content: counter(block-h2)". ";
}

@media screen and (max-width: 1279px) {
    .block-h1 {
        font-size: 9.6vw;
    }

    .block-paragraph a,
    .wp-block-list a {
        text-decoration: underline;
    }

    .wp-block-quote .block-paragraph {
        font-size: 1.75rem;
    }
    .wp-block-image.alignleft {
        float: none;
        margin-right: 0;
        margin-top: 32px;
    }
}

@media screen and (max-width: 991px) {
    .wp-block-spacer,
    .wp-block-post-featured-image {
        display: none;
    }
}
@media screen and (max-width: 767px) {
    .editor-styles-wrapper,
    body:not(.wp-admin) {
        font-size: 1rem;
    }
    .block-h1 {
        margin-bottom: 1.55em;
    }
    .block-h2 {
        font-size: 1.5rem;
    }
    .block-h2 br:not(mark + br) {
        display: none;
    }
    .block-h3,
    .is-style-like-h3 {
        font-size: 1.125rem;
    }

    .wp-block-button__link {
        font-size: 0.875rem;
    }

    ul.wp-block-list > li::before {
        top: 0.1em;
    }

    .wp-block-quote .block-paragraph {
        font-size: 1.375rem;
    }
    .wp-block-pullquote p {
        font-size: 1.25rem;
    }
    .wp-block-pullquote cite {
        font-size: 0.875rem;
    }

    .is-style-complex-data {
        margin-top: 0;
        margin-bottom: 19px;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .is-style-complex-data .wp-element-caption {
        order: -1;
        font-size: 1.125rem;
        font-weight: 500;
    }
    .is-style-complex-data img {
        display: none;
    }
    .is-style-complex-data a {
        text-decoration: underline;
        color: var(--wp--preset--color--blue);
    }
    .is-style-complex-data a::after {
        content: 'Consulter les données';
    }
    .is-style-complex-data + .block-columns {
        margin-top: 0!important;
    }

    .is-style-bigger-h3 {
        font-size: 1.5rem;
    }

    .is-style-label {
        font-size: 0.75rem;
    }
    .is-style-subtitle {
        font-size: 1rem;
    }
}
