/* Header */

header.wp-block-template-part {
    position: fixed;
    --header-link-color: var(--wp--preset--color--custom-paragraphe);
    z-index: 100;
}

/* Scroll Padding */

body header.wp-block-template-part>div {
    transition: .5s ease all;
}

body:not(.scrolled-top) header.wp-block-template-part>div {
    padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30) !important;
}

body:has(section.wp-block-cover:first-of-type).scrolled-top header.wp-block-template-part {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 100%);
}

body:has(section.wp-block-cover:first-of-type, section.has-custom-rouge-framboise-background-color:first-of-type) header.wp-block-template-part {
    --header-link-color: #fff;
}

body .wp-site-blocks header.wp-block-template-part div div :is(li, a):not(.wp-block-button__link) {
    color: var(--header-link-color);
}

body section:first-of-type {
    padding-top: var(--nav-height) !important;
}

/* Header + Scroll */

html * {
    box-sizing: border-box;
}

header {
    width: 100%;
    transition: 0.3s ease all;
}

@media (max-width: 991px) {
    body.scroll-down header {
        transform: translateY(-100%);
    }

    body:not(.scrolled-top) header {
        --header-link-color: var(--wp--preset--color--custom-paragraphe) !important;
    }
}

body header:before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    transition: .3s ease all;
    background-color: #fff;
    border-bottom: 1px solid #eaeaea;
}

body:not(.scrolled-top) header:before {
    height: 100%;
    transition: 0.3s 0.1s ease all;
}

body header.wp-block-template-part a:not(.wp-block-button__link) {
    transition: 0.2s ease color;
}

body header.wp-block-template-part nav ul li a:not(.wp-block-button__link) {
    padding: .75rem .25rem;
}

body:not(.scrolled-top):has(section:first-of-type) header.wp-block-template-part {
    --header-link-color: var(--wp--preset--color--custom-paragraphe) !important;
}

/* Menu */
body header.wp-block-template-part nav ul li a:hover {
    text-decoration: none !important;
}

body header.wp-block-template-part nav ul:hover li.current-menu-item a {
    cursor: default;
    pointer-events: none;
}

body header.wp-block-template-part nav ul li a:after,
.trp-language-switcher:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--wp--preset--color--custom-orange-cora-cora);
    transform-origin: left;
    transform: scaleX(0);
    transition: 0.3s ease all;
}

@media (min-width: 992px) {
    body header.wp-block-template-part nav ul:hover li.current-menu-item a:after {
        transform: scaleX(0);
    }

    body header.wp-block-template-part nav ul li a:is(:hover, :focus):after,
    body header.wp-block-template-part nav ul li.current-menu-item a:after,
    .trp-language-switcher:hover:after,
    .trp-language-switcher:focus:after {
        transform: scaleX(1);
    }
}


/* Mobile Menu */
body.scrolled-top:has(section.wp-block-cover:first-of-type, section.has-custom-rouge-framboise-background-color:first-of-type) .wp-block-navigation__responsive-container-open svg {
    fill: #fff;
}

/* Mobile Offcanvas Links */
@media (max-width: 991px) {
    body header.wp-block-template-part ul li a:not(.wp-block-button__link) {
        font-size: 1.5rem;
    }

    body:has(section.wp-block-cover:first-of-type, section.has-custom-rouge-framboise-background-color:first-of-type) header.wp-block-template-part ul li a:not(.wp-block-button__link) {
        color: var(--wp--preset--color--contrast) !important;
        font-size: 1.5rem;
    }
}

/* Language Switcher */
.trp-language-switcher {
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trp-language-switcher>div {
    width: auto !important;
    background-color: transparent;
    border: none;
    padding: 0;
    background-image: none;
}

.trp-language-switcher:focus .trp-ls-shortcode-language,
.trp-language-switcher:hover .trp-ls-shortcode-language {
    padding: 0;
    margin: 0;
    top: 3px !important;
}

/* Language Link */
.trp-language-switcher>div>a,
.trp-language-switcher>div>a:hover {
    font-size: 14px;
    background-color: transparent;
}