
.navigation-container {
    transition: height .25s ease;
    height: 100px;
    display: flex !important;
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.10);

    @media (width <= 1400px) {
        height: 70px;
        padding: 10px 20px !important;
    }

    .custom-logo-link img {
        @media (width <= 1400px) {
            max-height: 50px;
            width: auto;
        }
    }

    > .hamburger{
      flex: 0 0 auto;
    }

    > .nav-search-panel{
        flex: 0 0 100%;
        text-align: center;
        width: 100%;
        order: 99;
    }

    > .nav-search-panel .nav-search-panel__inner{
        max-width: 695px;
        margin: 60px auto 0;
    }
}

@media (max-width: 1400px) {
  .navigation-container > .wp-block-buttons {
    display: none;
  }
}

.nav-search-panel[hidden]{
  display: none !important;
}

#nav-search-panel {
    .nav-search-panel__header {
        position: relative;
        display: flex;
        align-items: center;
        width: fit-content;
        margin-bottom: 30px;

        .nav-search-panel__title {
            font-family: var(--wp--preset--font-family--expanded);
            color: var(--wp--preset--color--secondary);
            font-size: 1.375rem;
            font-weight: var(--wp--custom--font-weight--bold);
            line-height: normal;
            margin-bottom: 0;
        }
    }

    .nav-search-panel__close{
        background: url('../../../assets/icons/icon-close-searchbar.svg');
        background-repeat: no-repeat;
        background-position: center;
        color: transparent;
        border: none;
        padding-right: 45px;
    }

    .asp_m_3 {
        background: #F5F5F5;
    }
}

#navigation {
    margin-left: auto;
}

#primary-menu {
    margin: 0;
    display: flex;
    list-style: none;
    margin-right: 15px;

    /* 1er niveau */
    >li {
        margin: 0 5px;
        padding: 0;

        a {
            display: flex;
            align-items: center;
            text-decoration: none;
            transition: all 200ms ease-in-out;
            color: var(--wp--preset--color--secondary);
            font-size: 18px;
            font-style: normal;
            font-weight: 600;
            line-height: normal;
            padding: 19px 10px;

            &:hover {
                color: var(--wp--preset--color--primary);
            }

        }


        &.menu-item-has-children {

            >.has-children-wrapper a {
                &:after {
                    content: '';
                    display: inline-block;
                    width: 8px;
                    height: 8px;
                    margin-left: 8px;
                    border-left: 2px solid var(--wp--preset--color--primary);
                    border-bottom: 2px solid var(--wp--preset--color--primary);
                    transform: rotate(-45deg);
                    transform-origin: center;
                    vertical-align: middle;
                    transition: transform 200ms ease-in-out,
                    border-color 200ms ease-in-out;
                }
            }

            .go-child {
                display: none;
            }

            &:hover {
                >.has-children-wrapper a {
                    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 {
            opacity: 0;
            visibility: hidden;
            display: grid !important;
            grid-template-columns: 400px 400px !important;
            column-gap: 60px;
            row-gap: 20px;
            justify-content: center;
            position: absolute !important;
            top: 80px;
            left: 0 !important;
            right: 0 !important;
            width: 100% !important;
            margin-left: initial !important;
            padding: 60px 90px !important;
            border: none !important;
            border-radius: 10px !important;
            font-size: var(--wp--preset--font-size--small);
            line-height: var(--wp--custom--line-height--snug);
            min-width: 225px !important;
            margin-left: calc(var(--wp--preset--spacing--medium) * -1);
            z-index: 20 !important;
            list-style: none;

            transform: translateY(0) !important;
            transition:
                opacity 0.25s ease,
                transform 0.25s ease !important;
            transform-origin: top center !important;

            @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--base);
                position: absolute;
                left: 0;
                top: 20px;
                right: 0;
                bottom: 0;
                border-radius: 0 0 10px 10px;
            }

            .menu-item--go-parent {
                display: none;
            }

            >li {
                padding: 0;
                border-bottom: solid 1px rgba(255, 255, 255, 0.25) !important;

                &:last-child {
                    grid-column: 2;
                    /* grid-row: 1 / -3;
                    align-self: end;  */

                    &:hover {
                        > a {
                            background: none;
                        }
                    }

                    > a {
                        position: relative;
                        display: inline-block;
                        padding: 15px 20px 0 0;
                        font-weight: var(--wp--custom--font-weight--semi-bold);
                        border: none;
                        background: none !important;
                        color: var(--wp--preset--color--secondary);
                        
                        &:hover {
                            background: none;
                            text-decoration: underline;
                        }

                        &:after {
                            content: url('../../../assets/icons/icon-arrow-dark.svg');
                            position: absolute;
                            right: -10px;
                        }
                    }
                }

                a {
                    padding: 15px 20px;
                    border: 1px solid transparent;
                    border-radius: 10px;
                    background:
                        linear-gradient(#fff, #fff) padding-box,
                        linear-gradient(90deg, #BE0C3E80 0%, #BE0C3E1A 100%) border-box;
                    font-size: 1.125rem;
                    font-weight: 700;
                    color: var(--wp--preset--color--primary);
                }

                &:hover {
                    >a {
                        background:
                        linear-gradient(#F9E7EC, #F9E7EC) padding-box,
                        linear-gradient(90deg, #BE0C3E80 0%, #BE0C3E1A 100%) border-box;
                    }
                }

                &.current-menu-item {
                    >a {
                        font-weight: var(--wp--custom--font-weight--semi-bold);
                        background: linear-gradient(#F9E7EC, #F9E7EC) padding-box,
                            linear-gradient(90deg, #BE0C3E80 0%, #BE0C3E1A 100%) border-box;

                        &: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);
                        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--colorsecondary);

                            &:after {
                                color: var(--wp--preset--colorsecondary);
                            }
                        }

                        >.sub-menu {
                            opacity: 1;
                            visibility: visible;
                        }
                    }
                }


            }
        }

    }

}

/* Gestion du menu mobile */
.mobile_elements {
    display: none;
}

@media(width <= 1400px) {
    .navigation-container {
        justify-content: initial !important;
        
        .menu-search {
            order: 3;
            margin: auto 10px auto auto;
            list-style: none;
        }

        .menu-search::marker {
            content: none;
        }

        .wp-block-site-logo {
            order: 2;
        }
        
        > .hamburger {
            order: 1;
            margin-right: 10px;
        }

        .wp-block-buttons {
            margin: 40px 32px;
    
            .wp-block-button {
                flex: 1;
            }
        }
    }
}

.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--base);
        padding: 190px 0 30px;

        &.is-open {
            transform: translateY(0);
            margin-left: initial !important;
        }

        #primary-menu {
            flex-direction: column;
            row-gap: 20px;
            padding: 0;
            margin: 0 32px;

            >li {
                margin: 0;
                padding: 0;
                border-radius: 10px;
                border: 1px solid rgba(0, 0, 0, 0.50);

                .menu-item-has-children:hover > .sub-menu {
                    opacity: 0 !important;
                    visibility: hidden !important;
                }

                .has-children-wrapper {
                    position: relative;
                    display: flex;
                    align-items: center;

                    .go-child {
                        display: block;
                        margin-left: auto;
                        margin-right: 15px;
                        padding: 13px 10px;
                        color: var(--wp--preset--color--secondary);
                    }

                    a {
                        color: var(--wp--preset--color--secondary);
                        padding: 15px 20px;
                        font-size: 1.0625rem;
                        width: 100%;

                        &:before {
                            display: none;
                        }

                        &:after {
                            display: none;
                        }
                    }
                }

                a {
                    color: var(--wp--preset--color--secondary) !important;
                    padding: 15px 20px !important;
                    font-size: 1.0625rem !important;
                    border: none !important;

                    &:hover {
                        background-color: none !important;
                    }

                    &: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 {
                        overflow: hidden;
                        left: 30px !important;
                        right: 30px !important;
                        top: 190px;
                        width: initial !important;
                        opacity: 1 !important;
                        visibility: visible !important;
                        display: flex !important;
                        flex-direction: column;
                        justify-content: flex-start;
                        padding: 0 !important;
                        background-color: var(--wp--preset--color--base);
                        color: var(--wp--preset--color--secondary);

                        li {
                            border-radius: 10px;
                            border: 1px solid rgba(0, 0, 0, 0.50) !important;

                            &:hover {
                                >a {
                                    background: none;
                                }
                            }
                        }

                        a {
                            color: var(--wp--preset--color--secondary);
                            padding: 15px 20px;
                            font-size: 1.0625rem;
                        }

                        .menu-item--go-parent {
                            display: initial !important;
                            border: none !important;
                            margin: 0 !important;
                        }
                    }

                    .go-parent {
                        display: flex;
                        align-items: center;
                        color: var(--wp--preset--color--primary) !important;
                        font-size: .9375rem !important;
                        font-weight: var(--wp--custom--font-weight--semi-bold);
                        text-decoration: underline;
                        padding-left: 0 !important;
                        padding-bottom: 0 !important;
                        padding-top: 0 !important;
                        position: relative;

                        &::before {
                            content: '';
                            display: block;
                            width: 20px;
                            height: 20px;
                            flex-shrink: 0;
                            background-image: url('../../../assets/icons/icon-arrow-primary.svg');
                            background-repeat: no-repeat;
                            background-position: center;
                            background-size: contain;
                            transform: rotate(180deg);
                            margin-right: 8px;
                        }
                    }

                    li {
                        border: none !important;
                    }
                }

                &:hover {
                    >.sub-menu {
                        display: block;
                        opacity: 0;
                        visibility: hidden;
                    }
                }
            }
        }
    }

}


.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;
    overflow: visible;
    position: relative;
    background-color: var(--wp--preset--color--base);

    @media(width > 1400px) {
        display: none;
    }

    &:hover {
        cursor: pointer;
    }
}

.hamburger.is-active .hamburger-inner,
.hamburger.is-active .hamburger-inner::before,
.hamburger.is-active .hamburger-inner::after {
    background-color: var(--wp--preset--color--primary);
}


.hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -2px;
    width: 25px;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    height: 2px;
    background-color: var(--wp--preset--color--primary);
    border-radius: 4px;
    position: absolute;
    transition-property: transform;
    transition-duration: 0.15s;
    transition-timing-function: ease;
    left: 0;
    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);
}