/* li > a */

.wp-block-navigation__container .current-menu-item>a,
.wp-block-navigation__container .has-child button:hover {}

.menu-mobile-image {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 101;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms ease-in-out, visibility 0s linear 200ms;

    img {
        width: 100%;
        display: block;
    }
}

body.is-open .menu-mobile-image {
    opacity: 1;
    visibility: visible;
    transition: opacity 200ms ease-in-out 300ms, visibility 0s linear 300ms;
}

#primary-menu {
    margin: 0;
    display: flex;
    column-gap: 38px;
    list-style: none;

    /* 1er niveau */
    >li {
        margin: 0;
        padding: 0;

        a {
            display: flex;
            align-items: center;
            text-decoration: none;
            padding-top: 0;
            padding-bottom: 0;
            position: relative;
            font-weight: var(--wp--custom--font-weight--regular);
            font-family: var(--wp--preset--font-family--secondary);
            font-size: 1.125rem;

            .menu-item-text {
                position: relative;
                display: inline-block;

                &::before {
                    content: attr(data-text);
                    display: block;
                    font-weight: var(--wp--custom--font-weight--bold);
                    height: 0;
                    overflow: hidden;
                    visibility: hidden;
                }
            }

            &:hover {
                color: var(--wp--preset--color--secondary);
                text-decoration: none;
            }

        }


        &.menu-item-has-children {
            position: relative;

            >.has-children-wrapper a {
                &:after {
                    content: '\e803';
                    display: inline-flex;
                    transform-origin: center;
                    transition: all 200ms ease-in-out;
                    font-family: 'demeurance';
                    font-size: 8px;
                    margin-left: 8px;
                    font-weight: normal;
                    line-height: normal;
                    justify-content: center;
                    align-items: center;
                    z-index: 1;

                    @media(width < 1200px) {
                        width: 40px;
                        height: 40px;
                    }
                }
            }

            .go-child {
                display: none;
            }

            &:hover {
                >.has-children-wrapper a {
                    color: var(--wp--preset--color--secondary);

                    &:after {
                        transform: rotate(180deg);
                        color: var(--wp--preset--color--secondary);
                    }
                }

                >.sub-menu {
                    opacity: 1;
                    visibility: visible;
                }
            }
        }

        &.current-menu-ancestor,
        &.current-menu-item {

            >a,
            >.has-children-wrapper a,
            >.has-children-wrapper p {
                font-weight: var(--wp--custom--font-weight--bold);
            }
        }

        /* 2eme niveau */
        >.sub-menu {
            width: 200px;
            list-style: none;
            padding: 20px 0 0 0;
            position: absolute;
            opacity: 0;
            visibility: hidden;
            transition: all 200ms ease-in;
            z-index: 1;
            left: 50%;
            transform: translateX(-50%);

            @media(width < 1200px) {
                left: 0;
                transform: none;
                width: 100%;
            }

            .go-parent {
                display: none;
            }

            &:before {
                content: '';
                display: block;
                border-radius: 0;
                width: 100%;
                height: auto;
                z-index: -1;
                background-color: var(--wp--preset--color--secondary);
                position: absolute;
                left: 0;
                top: 20px;
                right: 0;
                bottom: 0;
            }

            &:after {
                content: '';
                display: inline-block;
                height: 0;
                width: 0;
                border-right: 11px solid transparent;
                border-bottom: 14px solid var(--wp--preset--color--secondary);
                border-left: 11px solid transparent;
                position: absolute;
                top: 6px;
                left: 0;
                right: 0;
                margin: auto;
            }

            >li {
                padding: 0;
                border-bottom: solid 1px rgba(255, 255, 255, 0.25) !important;

                &:nth-child(1) {
                    border-bottom: none !important;
                }

                a {
                    align-items: flex-start;
                    padding: 13px 16px;
                    font-size: 1rem;
                    line-height: normal;
                    font-weight: 500;
                    border-radius: 0;
                    position: relative;
                    color: #fff;

                    &:before {
                        display: inline-block;
                        content: '';
                        width: 0;
                        flex: 0;
                        margin-right: 0;
                        margin-top: 5px;
                        height: 12px;
                        transition: all 200ms ease-in-out;
                        background-color: var(--wp--preset--color--primary);
                    }

                }

                &:hover {
                    >a {
                        &:before {
                            flex: 0 0 12px;
                            width: 12px;
                            margin-right: 8px;
                        }
                    }

                }

                &.current-menu-item {
                    >a {
                        /* background-color: var(--wp--preset--color--primary); */
                        /* color: var(--wp--preset--color--main); */
                        font-weight: var(--wp--custom--font-weight--semibold);

                        &:before {
                            width: 12px;
                            flex: 0 0 12px;
                            margin-right: 8px;
                        }

                    }
                }

                /* 3eme niveau */
                >.sub-menu {
                    width: 200px;
                    list-style: none;
                    padding: 20px 0 0 0;
                    position: absolute;
                    opacity: 0;
                    visibility: hidden;
                    transition: all 200ms ease-in;
                    z-index: 1;
                    right: 0;

                    &:before {
                        content: '';
                        display: block;
                        border-radius: 10px;
                        width: auto;
                        height: 100%;
                        z-index: 0;
                        backdrop-filter: blur(20px);
                        background-color: rgba(0, 0, 0, 0.07);
                        /* background-color: rgba(0, 0, 0, 1); */
                        position: absolute;
                        left: 10px;
                        top: 10px;
                        right: 0;
                        bottom: 0;
                    }

                    >li {
                        padding: 5px 11px;
                        display: block;

                    }
                }

                &.menu-item-has-children {

                    >a {
                        position: relative;

                        &:after {
                            content: '\e800';
                            display: inline-flex;
                            transform-origin: center;
                            transition: all 200ms ease-in-out;
                            transform: rotate(-90deg);
                            width: 20px;
                            height: 20px;
                            font-family: 'mvgroup';
                            margin-left: 0;
                            font-weight: normal;
                            line-height: 1;
                            justify-content: center;
                            color: #fff;
                            position: absolute;
                            right: 10px;
                        }
                    }

                    &:hover {
                        >a {
                            background-color: var(--wp--preset--color--primary);
                            color: var(--wp--preset--color--main);

                            &:after {
                                color: var(--wp--preset--color--main);
                            }
                        }

                        >.sub-menu {
                            opacity: 1;
                            visibility: visible;
                        }
                    }
                }


            }
        }

    }

}

/* Gestion du menu mobile */
.mobile_elements {
    display: none;
}

.menu__container {
    .mobile_elements {
        @media(width <=1200px) {
            display: block;
        }

        padding: 0 30px !important;

        .compte,
        .favoris {
            a {
                text-decoration: none;
                color: #fff;

                &:before {
                    font-family: 'demeurance';
                    font-size: 1.6rem;
                    color: var(--wp--preset--color--primary);
                    margin: 0 8px 0 0;
                    display: inline-block;
                }
            }
        }

        .compte {
            a {
                &:before {
                    font-size: 1.8rem;
                    content: '\e80a';
                }
            }
        }

        .favoris {
            margin: 0;

            a {
                &:before {
                    content: '\e80b';
                }
            }
        }

        .wp-block-button-obf {
            margin-top: 15px;
            margin-bottom: 10px;
        }

        .wp-element-button {
            display: block;
        }

    }

    @media(width <=1200px) {
        transform: translateY(calc(-100vh - 10px));
        transition: all 300ms ease-in-out;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: -1;
        height: 100vh;
        width: 100vw;
        overflow-y: scroll;
        background-color: var(--wp--preset--color--secondary);
        padding: 90px 24px 30px;

        &.is-open {
            transform: translateY(0);
        }

        #primary-menu {
            flex-direction: column;
            padding: 0;

            >li {
                margin: 0;
                padding: 20px 0;
                border: none;
                border-bottom: 1px solid var(--colors_design_system-neutral-400, #A3A3A3);

                .has-children-wrapper {
                    position: relative;
                    display: flex;
                    align-items: center;

                    .go-child {
                        display: block;
                        margin-left: auto;
                        margin-right: 15px;
                        color: #fff;
                    }

                    a {
                        color: var(--wp--preset--color--cream);
                        font-size: 32px;
                        font-weight: 600;
                        line-height: 40px;
                        padding: 0 10px 0 0;

                        &:before {
                            display: none;
                        }

                        &:after {
                            display: none;
                        }
                    }
                }

                a {
                    color: var(--wp--preset--color--cream);
                    font-size: 32px;
                    font-weight: 600;
                    line-height: 40px;
                    padding: 0 10px 0 0;
                    justify-content: space-between;

                    &:before {
                        display: none;
                    }

                    &:after {
                        content: '';
                        display: inline-block;
                        width: 12px;
                        height: 12px;
                        flex-shrink: 0;
                        margin-left: 12px;
                        background-repeat: no-repeat;
                        background-size: contain;
                        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M12 11C12 11.5523 11.5523 12 11 12C10.4477 12 10 11.5523 10 11V3.41406L1.70703 11.707C1.31651 12.0976 0.683493 12.0976 0.292969 11.707C-0.0975556 11.3165 -0.0975556 10.6835 0.292969 10.293L8.58594 2H1C0.447715 2 0 1.55228 0 1C0 0.447715 0.447715 0 1 0H11C11.5523 0 12 0.447715 12 1V11Z' fill='%23F7F5EB'/%3E%3C/svg%3E");
                    }
                }


                .sub-menu {
                    position: fixed;
                    top: 0;
                    bottom: 0;
                    width: 100%;
                    height: 100%;
                    z-index: 100;
                    left: -100%;
                    margin: 0;
                    padding: 108px 0 30px;
                    list-style: none;
                    transition: all 0.2s ease-in-out;
                    z-index: 100;
                    background: var(--wp--preset--color--secondary);
                    overflow-y: scroll;

                    &:before,
                    &:after {
                        display: none;
                    }

                    &.active {
                        left: 0;
                        opacity: 1;
                        visibility: visible;
                    }

                    .go-parent {
                        font-weight: 300;
                        padding-left: 20px;
                        display: flex;
                        align-items: center;

                        &:before {
                            margin-right: 8px;
                            display: block;
                            content: '\e809';
                            font-family: 'demeurance';
                            vertical-align: middle;
                            margin-top: 0;
                            transform: scaleX(-1);
                            width: auto;
                            flex: auto 0 0;
                            background: transparent;
                        }
                    }

                    li {
                        border: none !important;
                    }
                }

                &:hover {
                    >.sub-menu {
                        display: block;
                        opacity: 1;
                        visibility: visible;
                    }
                }
            }
        }

        .header-boutons {
            .wp-block-button {
                width: 100%;
            }

            .wp-block-button__link {
                font-family: var(--wp--preset--font-family--primary);
                width: 100%;
                margin-top: 16px;
                font-size: 32px;
                padding: 10px 16px;
                display: flex;
                align-items: center;
                justify-content: space-between;

                &:after {
                    content: '';
                    display: inline-block;
                    width: 24px;
                    height: 24px;
                    flex-shrink: 0;
                    margin-left: 16px;
                    background-repeat: no-repeat;
                    background-size: contain;
                    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M21.0139 1.08153C21.2434 1.00147 21.4883 0.978334 21.7278 1.01415L21.8323 1.03368L21.9348 1.06005C22.1383 1.12083 22.3262 1.22463 22.4866 1.36376L22.5647 1.43602L22.637 1.51317C22.776 1.67343 22.8789 1.86169 22.9397 2.06493L22.967 2.16845L22.9866 2.27294C23.0222 2.51183 22.9979 2.75591 22.9182 2.98485L22.9192 2.98583L16.4192 21.9858V21.9868C16.3199 22.2761 16.1345 22.5285 15.8879 22.7095C15.6412 22.8905 15.3443 22.9917 15.0383 22.9995C14.7326 23.0073 14.4316 22.9214 14.176 22.7534C13.9522 22.6062 13.7723 22.4017 13.6545 22.1626L13.6077 22.0581L10.428 14.1274L10.386 14.0356C10.3391 13.9465 10.2788 13.8649 10.2073 13.7934C10.1117 13.6981 9.99763 13.6229 9.87232 13.5727V13.5718L1.94166 10.3921C1.65776 10.2782 1.41549 10.0802 1.24732 9.8247C1.07913 9.56899 0.993389 9.26738 1.00123 8.96141L1.00806 8.84716C1.0352 8.5822 1.13288 8.32863 1.29126 8.11278L1.36158 8.02294C1.53513 7.82068 1.76052 7.66843 2.01392 7.58153V7.58055L21.0139 1.08056V1.08153ZM12.2063 13.2056C12.2121 13.2176 12.2183 13.2295 12.2239 13.2417L12.2835 13.3804L12.2844 13.3823L14.9622 20.063L19.9602 5.45263L12.2063 13.2056ZM3.9358 9.03661L10.6145 11.7153H10.6155C10.675 11.7391 10.7336 11.7659 10.7913 11.7934L18.5471 4.03759L3.9358 9.03661Z' fill='%23411F07'/%3E%3C/svg%3E");
                }
            }
        }
    }

}


.hamburger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    height: auto;
    flex: 0 0 auto;
    border: none;
    border-radius: 50px;
    order: 1;
    padding: 10px 20px;
    margin-top: 16px !important;
    margin: 0;
    cursor: pointer;
    transition-property: opacity, filter;
    transition-duration: 0.15s;
    transition-timing-function: linear;
    font: inherit;
    color: inherit;
    text-transform: none;
    background-color: var(--wp--preset--color--secondary);
    overflow: visible;
    position: relative;

    @media(width > 1200px) {
        display: none;
    }

    &:hover {
        cursor: pointer;
    }
}

.hamburger-label {
    font-family: var(--wp--preset--font-family--primary);
    font-weight: var(--wp--custom--font-weight--semi-bold);
    font-size: 14px;
    color: var(--wp--preset--color--base);
    white-space: nowrap;
}

.hamburger-box {
    position: relative;
    display: inline-block;
    width: 12px;
    height: 18px;
    flex-shrink: 0;
}

.hamburger.is-active {
    background-color: var(--wp--preset--color--primary);
    border-radius: 50%;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
}

.hamburger.is-active .hamburger-label {
    display: none;
}

/* .hamburger:hover {
    opacity: 0.7;
} */

/* .hamburger.is-active:hover {
    opacity: 0.7;
} */

.hamburger.is-active .hamburger-inner,
.hamburger.is-active .hamburger-inner::before,
.hamburger.is-active .hamburger-inner::after {
    background-color: var(--wp--preset--color--secondary);
}

.hamburger.is-active .hamburger-box {
    width: 10px;
}


.hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -2px;
    width: 12px;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    height: 1px;
    background-color: var(--wp--preset--color--base);
    border-radius: 4px;
    position: absolute;
    transition-property: transform;
    transition-duration: 0.15s;
    transition-timing-function: ease;
    left: 50%;
    transform: translateX(-50%);
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: "";
    display: block;
}

.hamburger-inner::before {
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
}

.hamburger-inner::after {
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
}

.hamburger--squeeze .hamburger-inner {
    transition-duration: 0.075s;
    transition-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}

.hamburger--squeeze .hamburger-inner::before {
    transition: top 0.075s 0.12s ease, opacity 0.075s ease;
}

.hamburger--squeeze .hamburger-inner::after {
    transition: bottom 0.075s 0.12s ease, transform 0.075s cubic-bezier(0.55, 0.055, 0.675, 0.19);
}

.hamburger--squeeze.is-active .hamburger-inner {
    transform: translateX(-50%) rotate(45deg);
    transition-delay: 0.12s;
    width: 12px;
    left: 50%;
    transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}

.hamburger--squeeze.is-active .hamburger-inner::before {
    top: 0;
    opacity: 0;
    transition: top 0.075s ease, opacity 0.075s 0.12s ease;
}

.hamburger--squeeze.is-active .hamburger-inner::after {
    bottom: 0;
    transform: translateX(-50%) rotate(-90deg);
    transition: bottom 0.075s ease, transform 0.075s 0.12s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* Until the JS moves .header-boutons into the mobile menu, hide it so it does
   not flash in the header bar (the ~ selector only matches before the move). */
@media (width <=1200px) {
    .menu__container ~ .header-boutons {
        display: none;
    }
}

/* Same header bar height whether the mobile menu is open or closed (the two
   logos and the burger states have different heights), so the page does not jump. */
@media (width <=1200px) {
    .site-header > div > .wp-block-group {
        min-height: 64px;
    }

    .hamburger {
        height: 40px;
    }
}
