/* -------------
    SOMMAIRE
------------- */

/*
    @AUTHOR : Nicolas BOUDOT

    MOLÉCULE : NAV-MOBILE
    Styles des éléments de navigation mobile
*/

@media (min-width: 992px) {
    .molecule_widgets-mobile {
        display: none;
        visibility: hidden;
    }
}

.molecule_nav-mobile {
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--white);
    width: 100vw;
    /* 100% - Barre admin - Widgets Mobile */
    height: calc(100vh - 54px);
    transition: opacity .4s, transform .4s;
    z-index: 20;
}

    /* Not active */
    .molecule_nav-mobile:not(.active) {
        pointer-events: none;
        opacity: 0;
        transform: translateY(-10%);
    }

    /* Connecté au BO */
    body.admin-bar .molecule_nav-mobile {
        /* 100% - Barre admin - Widgets Mobile */
        height: calc(100vh - 46px - 54px);
    }


/* Géneral */
.molecule_nav-mobile nav ul > li > a {
    display: block;
    color: black;
    font-weight: 700;
    padding: 18px 30px;
    font-size: 1.8rem;
}

/* Niveau 1 */

/* Barre des widgets (dont le btn-burger) */
.molecule_nav-mobile__widgets-bar {
    padding: 25px 30px;
    background-color: var(--gray-300);
}

/* Niveau 2 */
.molecule_nav-mobile nav ul.second-level {
    background-color: #f9f9f9;
    transition: transform .5s, opacity .5s;
}

    @media (max-width: 991px) {
        /* Not hover */
        .molecule_nav-mobile nav ul.first-level li:not(.sfhover) ul {
            pointer-events: none;
            padding: 0;
            height: 0;
            opacity: 0;
            transform: translateY(-10px);
        }
    }

.molecule_nav-mobile nav ul.second-level > li > a {
    padding: 15px 30px;
    font-size: 1.4rem;
}

.molecule_nav-mobile_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px;
}

.molecule_nav-mobile_header #mobile-search-form {
    flex: 1;
}

.menu-mobile-burger {
    width: 30px;
    height: 30px;
    display: none;
    cursor: pointer;
}
@media (max-width: 991px) {
    .menu-mobile-burger {
        display: block;
    }
}
.menu-mobile-burger > div {
    position: relative;
    height: 100%;
}
.menu-mobile-burger span {
    display: block;
    width: 100%;
    height: 4px;
    background: var(--c-secondary);
    border-radius: 4px;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}
.menu-mobile-burger span::after,
.menu-mobile-burger span::before {
    content: "";
    display: block;
    width: 100%;
    height: 4px;
    background: var(--c-secondary);
    border-radius: 4px;
    position: absolute;
    left: 0;
}

.menu-mobile-burger span::after {
    bottom: -8px;
}
.menu-mobile-burger span::before {
    top: -8px;
}

#mobile-search-form form {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 10px;
}

#mobile-search-form form button[type="submit"] {
    border: none;
    padding: 0;
    margin: 0;
    background: none;
    outline: none;
    font-size: 20px;
}

/* Menu item avec enfants */
.molecule_nav-mobile nav ul.first-level > li.menu-item-has-children > a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.molecule_nav-mobile nav ul.first-level > li.menu-item-has-children > a::after {
    content: "\e907";
    display: block;
    width: 10px;
    height: 10px;
    font-family: 'icomoon';
    font-size: 1.2rem;
    color: var(--black);
}
