@use '~@/style/globals';

.DefaultLayoutSidebarMenu {
    margin: 0;
    padding: 0;
    list-style: none;

    &__item {
        $sub-block: &;

        flex: 0 0 auto;
        width: 100%;
        font-size: globals.$sidebar-font-size;

        &__link {
            display: block;
            padding: globals.$content-padding-small-vertical 0;
            text-align: center;
            transition: all 300ms;

            // - Permet de surcharger le style de base des liens.
            // stylelint-disable-next-line declaration-no-important, order/properties-order
            color: inherit !important;

            &:hover {
                background-color: globals.$bg-color-side-menu-item-hover;

                // - Permet de surcharger le style de base des liens.
                // stylelint-disable-next-line declaration-no-important
                color: globals.$link-hover-color !important;
            }
        }

        &__title {
            display: inline-block;
        }

        &__icon {
            margin-bottom: 0.5rem;
            font-size: globals.$sidebar-icon-size;
        }

        &--active {
            #{$sub-block}__link {
                background-color: globals.$bg-color-side-menu-item-active;

                // - Permet de surcharger le style de base des liens.
                // stylelint-disable-next-line declaration-no-important
                color: globals.$link-active-color !important;

                &:hover {
                    background-color: globals.$bg-color-side-menu-item-active;
                }
            }
        }
    }

    @media (min-width: globals.$screen-mobile) {
        &__item {
            &__title {
                display: none;
            }
        }
    }

    @media (min-width: globals.$screen-desktop) {
        &__item {
            &__title {
                display: inline-block;
            }
        }
    }
}
