/* li > a */

.wp-block-navigation__container .current-menu-item>a,
.wp-block-navigation__container .has-child button:hover {}

#primary-menu {
    margin: 0;
    display: flex;
    list-style: none;

    /* 1er niveau */
    >li {
        margin: 0 12px;
        padding: 0;

        a {
            display: flex;
            align-items: center;
            text-decoration: none;
            transition: all 200ms ease-in-out;
            padding-top: 0;
            padding-bottom: 0;
            position: relative;
            font-weight: var(--wp--custom--font-weight--semi-bold);
            font-family: var(--wp--preset--font-family--secondary);
            font-size: 1.125rem;

            &:hover {
                color: var(--wp--preset--color--primary);
            }

        }


        &.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 < 1400px) {
                        width: 40px;
                        height: 40px;
                    }
                }
            }

            .go-child {
                display: none;
            }

            &:hover {
                >.has-children-wrapper a {
                    color: var(--wp--preset--color--primary);

                    &:after {
                        transform: rotate(180deg);
                        color: var(--wp--preset--color--primary);
                    }
                }

                >.sub-menu {
                    opacity: 1;
                    visibility: visible;
                }
            }
        }

        &.current-menu-ancestor,
        &.current-menu-item {

            >.has-children-wrapper a,
            >.has-children-wrapper p {
                color: var(--wp--preset--color--primary);
            }
        }

        /* 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 < 1400px) {
                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 0 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 <=1400px) {
            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 <=1400px) {
        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: 108px 0 30px;

        &.is-open {
            transform: translateY(0);
        }

        #primary-menu {
            flex-direction: column;
            padding: 0;

            >li {
                margin: 0;
                padding: 0;
                border: none;

                .has-children-wrapper {
                    position: relative;
                    display: flex;
                    align-items: center;

                    .go-child {
                        display: block;
                        margin-left: auto;
                        margin-right: 15px;
                        color: #fff;
                    }

                    a {
                        color: #fff;
                        padding: 10px 30px;

                        &:before {
                            display: none;
                        }

                        &:after {
                            display: none;
                        }
                    }
                }

                a {
                    color: #fff;
                    padding: 10px 30px;

                    &:before {
                        display: none;
                    }

                    &:after {
                        display: none;
                    }
                }


                .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;
                    }
                }
            }
        }
    }

}


.hamburger {
    display: inline-block;
    width: 54px;
    height: 54px;
    flex: 54px 0 0;
    border: none;
    border-radius: 0;
    order: 1;
    padding: 0;
    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--primary);
    overflow: visible;
    position: relative;

    @media(width > 1400px) {
        display: none;
    }

    &:hover {
        cursor: pointer;
    }
}

/* .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--base);
}


.hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -2px;
    width: 15px;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    height: 2px;
    background-color: var(--wp--preset--color--base);
    border-radius: 4px;
    position: absolute;
    transition-property: transform;
    transition-duration: 0.15s;
    transition-timing-function: ease;
    left: -12px;
    right: 0;
    margin: auto;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: "";
    display: block;
}

.hamburger-inner::before {
    top: -7px;
    left: 0;
    width: 25px;
}

.hamburger-inner::after {
    bottom: -7px;
    left: 0;
    width: 25px;
}

.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: rotate(45deg);
    transition-delay: 0.12s;
    width: 25px;
    left: 0;
    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: rotate(-90deg);
    transition: bottom 0.075s ease, transform 0.075s 0.12s cubic-bezier(0.215, 0.61, 0.355, 1);
}