.pix-site-header {
    position: relative;
    padding: 0;
}

.pix-wrapper-header {
    position: relative;
    z-index: 1000;
    background: var(--pix-color-primary) url('i/header-background.webp') no-repeat center center;
    background-size: cover;

    /* Taille de référence */
    font-size: 20px;

    display: flex;
    flex-direction: column;
}

@media (-webkit-min-device-pixel-ratio: 1.5),
(min-resolution: 144dpi) {
    .pix-wrapper-header {
        background-image: url('i/header-background-2x.webp');
    }
}

.pix-wrapper-header-logo {
    position: relative;
}

.pix-wrapper-header-logo-inner {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: fit-content;

    padding: 0 7em;
    margin: 1.25em auto;
}

.pix-wrapper-header-logo-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    background: url('i/spirale-header.svg') no-repeat top left;
    background-size: auto 100%;
    pointer-events: none;
}

.pix-wrapper-header-logo-inner::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 50%;
    background: url('i/spirale-header.svg') no-repeat top left;
    background-size: auto 100%;
    pointer-events: none;

    transform: scaleX(-1);
}

.header-logo-text {
    display: flex;
    flex-direction: row;
    align-items: center;
    font-family: "Boizenburg", sans-serif;
    color: var(--pix-color-background);
    font-size: 1.5em;
    line-height: 1;
    gap: 0.35em;
}

.header-logo-text .text-separator {
    width: 0.5em;
    height: 0.5em;
    background-color: var(--pix-color-accent);
}

.header-logo-text span:not(.text-separator) {
    padding-bottom: 0.3em;
}



.pix-wrapper-logo {}

a.pix-logo {
    text-decoration: none;
    display: inline-block;
    position: relative;
    z-index: 10;
    padding: 1em 5em;
    vertical-align: top;
}

a.pix-logo img {
    vertical-align: top;
    width: 15.25em;
}

.pix-site-navigation {
    position: relative;
    z-index: 2;

    background: var(--pix-color-background);
}

.pix-site-navigation::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
    z-index: 10;
    pointer-events: none;
    user-select: none;
}


.pix-wrapper-menu {
    padding: 0;
    margin: 0;
    list-style: none;
    position: relative;

    display: flex;
    flex-direction: row;
    justify-content: center;
}

.pix-wrapper-menu li {
    margin: 0px;
    display: inline-block;
    vertical-align: top;
    background-color: transparent;
    position: relative;
}

.pix-wrapper-menu li ul {
    text-align: center;
}


.pix-wrapper-menu a {
    font-family: "Bitter", serif;
    font-size: 1em;
    font-weight: 500;
    display: block;
    color: var(--pix-color-primary);
    line-height: 1em;
    text-decoration: none;
    text-align: center;
    padding: 1.25em 1.5em;

    text-transform: none;
    position: relative;
}


.pix-wrapper-menu li.pix-menu-selected>a {}




.pix-wrapper-menu a:hover,
.pix-wrapper-menu >ul>li:hover>a {
    color: var(--pix-color-primary);
    background: color-mix(in srgb, var(--pix-color-primary) 10%, transparent);
}

.pix-wrapper-menu li.pix-menu-selected>a {
    color: var(--pix-color-background);
    background: var(--pix-color-primary);
}

.pix-wrapper-menu a:hover::before,
.pix-wrapper-menu li:hover>a::before {}

.pix-wrapper-menu ul>li:hover>a::before {}

.menu-arrow-svg {
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    vertical-align: -0.05em;
    margin-left: 0.45em;

    background-color: var(--pix-color-primary);
    
    -webkit-mask-image: url('i/arrow.svg');
    mask-image: url('i/arrow.svg');
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}


#pix-menu-desktop>li:hover .menu-arrow-svg {
    bottom: 2px;
}

.pix-wrapper-menu li.pix-menu-selected>a .menu-arrow-svg,
.pix-header-nav_item:has(.pix-header-nav__subitem.pix-menu-selected)>a .menu-arrow-svg {
    background: var(--pix-color-background);
}

.pix-wrapper-menu ul a {
    text-align: center;
    padding: 1em 1em;
    font-size: 0.9em;
    font-weight: 500;
    text-transform: uppercase;
    line-height: 1.1;
    border-radius: 0 0 0 0;
    white-space: nowrap;
}


.pix-wrapper-menu ul a:hover {
    background: color-mix(in srgb, var(--pix-color-primary) 10%, transparent);
    color: var(--pix-color-primary);
}

.pix-wrapper-menu ul .pix-menu-selected a {
    color: var(--pix-color-background);
    background: var(--pix-color-primary);
}

.pix-wrapper-menu ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    min-width: 100%;
    padding: 0;
    background-color: color-mix(in srgb, var(--pix-color-background) 80%, transparent);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);

    /* border-radius: 0 0 1em 1em; */
    overflow: hidden;
}

.pix-wrapper-menu ul li {
    width: 100%;
}

.pix-wrapper-menu li:last-of-type ul {
    left: auto;
    right: 0;
    transform: none;
}

.pix-wrapper-menu li:hover>ul {
    display: inherit;
}


.pix-site-header .pix-burger-btn {
    position: absolute;
    bottom: 1em;
    right: 1em;
    width: 2em;
    height: 2em;
    background: var(--pix-color-accent);
    border: none;
    display: none;
    cursor: pointer;
    z-index: 10000;
    border-radius: 0;
    transition: background 0.2s ease;
    touch-action: manipulation;
}

.pix-site-header .pix-burger-btn .line {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    display: inline-block;
    width: 1.3em;
    height: 2px;
    background-color: var(--pix-color-primary);

    transition: transform 0.3s ease;
}

.pix-site-header.open .pix-burger-btn {}

.pix-site-header .pix-burger-btn .line:first-child {
    transform: translate(-50%, -8px);
    /* 8px + 2px de la hauteur*/
}

.pix-site-header .pix-burger-btn .line:last-child {
    transform: translate(-50%, 6px);
}

.pix-site-header.open .pix-burger-btn .line:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.pix-site-header.open .pix-burger-btn .line:nth-child(2) {
    transform: translate(-50%, -50%) scaleX(0);
}

.pix-site-header.open .pix-burger-btn .line:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}



.pix-header-mascotte {
    position: absolute;
    bottom: 0;
    left: 0.75em;
    width: 8.5em;
    height: auto;
    transform: translateY(6px);

    transition: transform 0.2s ease;
}

.pix-header-mascotte img {
    vertical-align: top;
}

.pix-header-mascotte:hover {
    transform: translateY(0);
}

.pix-header-top-contact {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1000;
}

.pix-header-top-contact a {
    display: inline-block;
    color: var(--pix-color-primary);
    background: var(--pix-color-accent);
    padding: 0.85em 0.6em 0.75em 0.5em;
    font-size: 1em;
    line-height: 1;
    font-weight: 500;
    font-family: "Bitter", serif;
    border-radius: 0 0 0 0.75em;
    text-decoration: none;

    transform: translateY(-0.2em) translateX(0.1em);
    transition: transform 0.2s ease;
}

.pix-header-top-contact a:hover {
    color: var(--pix-color-primary);
    transform: translateY(0) translateX(0);
}



@media (max-width: 1750px) {
    .pix-wrapper-header {
        font-size: 18px;
    }
}

@media (max-width: 1580px) {
    .pix-wrapper-header {
        font-size: 16px;
    }
    .pix-site-navigation {
        font-size: 16px;
    }
}

@media (max-width: 1410px) {
    .pix-wrapper-header {
        font-size: 15px;
    }
}

@media (max-width: 1330px) {
    .pix-wrapper-header {
        font-size: 14px;
    }
}

@media (max-width: 1250px) {
    a.pix-logo {
        padding: 1em 3em;
    }
    .pix-wrapper-header-logo-inner {
        padding: 0 5em;
    }

    .pix-wrapper-menu a {
        padding: 1em 1.2em;
    }
}

@media (max-width: 1130px) {
    .pix-wrapper-header {
        font-size: 13px;
    }

    .header-logo-text {
        flex-direction: column;
        gap: 0;
    }
}

/* MENU MOBILE VERTICALE ET BURGER */
@media (max-width:1000px) {

    body.nav-open {
        height: 100vh;
        height: 100dvh;
        overflow-y: hidden;
    }

    .pix-wrapper-header {
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
        overflow: hidden;
    }

    .pix-site-navigation {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        z-index: 1000;
        display: block;

        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        transform: translateX(100%);

        font-size: 1.5em;
    }

    .pix-site-navigation>div {
        height: 100%;
    }

    .pix-site-navigation ul {
        list-style: none;
    }

    .pix-wrapper-menu {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        height: 100%;
        background: var(--pix-color-background);
        width: max-content;
        margin-left: auto;
        padding: 15px 0 15px 0;
        overflow: auto;
        width: 100%;
        margin: 0;
        list-style: none;

        padding: 30px;
    }

    .pix-site-navigation a,
    .pix-site-navigation ul ul a {
        color: var(--pix-color-text);
        text-align: center;
        text-transform: uppercase;
        font-family: "Bitter", serif;
        font-weight: 600;
        display: inline-block;
        padding: 0.4em 1em 0.4em 0.6em;
        white-space: break-spaces;
        /* width: 100%; */
    }

    .pix-site-navigation ul>li {
        max-width: calc(100% - 50px);
        text-align: center;
    }

    .pix-site-navigation ul li ul {
        display: none;
        transform: none;
        padding-left: 10px;
        background: transparent;
        box-shadow: none;
        position: relative;
        top: auto;
        left: auto;
        list-style: none;
        margin: 0;
        margin-top: -1px;
    }

    .pix-site-navigation ul li:hover>ul {
        display: none;
    }

    .pix-site-navigation ul li.open>ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .pix-site-navigation ul ul a {
        text-align: center;
        font-weight: 400;
        font-size: 0.9em;
    }

    .menu-arrow-svg {
        position: static;
        display: inline-block;
        transform: translateX(50%) translateY(-1px) rotate(-90deg);
        margin: 0;
    }

    .menu-item-has-children.open .menu-arrow-svg {
        transform: translateX(50%) translateY(-1px) rotate(0deg);
    }

    .pix-site-header .pix-burger-btn {
        display: block;
    }

    .pix-site-header.open .pix-site-navigation {
        transform: translateX(0) translateZ(0);
        opacity: 1;
    }

    
    .pix-site-header.open .pix-wrapper-menu > li {
        opacity: 0;
        animation: pix-menu-item-fade-in 0.4s ease forwards;
    }

    .pix-site-header.open .pix-wrapper-menu > li:nth-child(1) { animation-delay: 0.05s; }
    .pix-site-header.open .pix-wrapper-menu > li:nth-child(2) { animation-delay: 0.1s; }
    .pix-site-header.open .pix-wrapper-menu > li:nth-child(3) { animation-delay: 0.15s; }
    .pix-site-header.open .pix-wrapper-menu > li:nth-child(4) { animation-delay: 0.2s; }
    .pix-site-header.open .pix-wrapper-menu > li:nth-child(5) { animation-delay: 0.25s; }
    .pix-site-header.open .pix-wrapper-menu > li:nth-child(6) { animation-delay: 0.3s; }
    .pix-site-header.open .pix-wrapper-menu > li:nth-child(7) { animation-delay: 0.35s; }
    .pix-site-header.open .pix-wrapper-menu > li:nth-child(8) { animation-delay: 0.4s; }
    .pix-site-header.open .pix-wrapper-menu > li:nth-child(n+9) { animation-delay: 0.45s; }

    @keyframes pix-menu-item-fade-in {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .pix-site-navigation ul ul li {
        max-width: 100%;
    }

    #pix-menu-mobile li ul a:hover {
        color: #000;
    }

    .pix-header-mascotte {
        font-size: 11px;
    }
}

@media (max-width: 800px) {
    .header-logo-text {
        display: none;
    }
    a.pix-logo {
        padding: 1em 1em;
    }
}

@media (max-width:530px) {
    .pix-wrapper-header-logo-inner {
        padding: 0;
    }
    .pix-wrapper-header-logo-inner::before,
    .pix-wrapper-header-logo-inner::after {
        content: none;
    }
    a.pix-logo {
        padding: 0;
    }

    .pix-header-top-contact {
        display: none;
    }

    .pix-site-header .pix-burger-btn{
        bottom: 50%;
        transform: translateY(50%);
    }
}

@media (max-width: 440px) {
    .pix-wrapper-logo {
        font-size: 11px;
    }
    .pix-header-mascotte {
        font-size: 9px;
    }
}

@media (max-width: 360px) {
    .pix-site-header .pix-burger-btn{
        right: 0.5em;
    }
    .pix-header-mascotte {
        font-size: 7.5px;
    }
}