header {
    position: relative;
}
.header {
    margin-top: 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;

    .header-menu {
        font-size: 16px;
        font-style: normal;
        font-weight: 400;
        line-height: normal;
        text-decoration: none;
    }

    .header-avatar {
        display: flex;
        width: 41px;
        height: 41px;
        padding: 7px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-radius: 40px;
        background: var(--white);

        img {
            width: 27px;
            height: 27px;
            flex-shrink: 0;
            aspect-ratio: 1/1;
        }
    }
}
.header-deco {
    position: absolute;
    top: 10px;
    right: 0;
    z-index: -1;
}

body.no-scroll {
    overflow: hidden;
}
body.no-select {
    user-select: none;
}

.main-menu {
    position: fixed;
    inset: 0;
    z-index: 99;
    width: 100%;
    height: 100dvh;
    height: 100vh;

    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;

    .main-menu__background {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.80);
        z-index: 1;

        opacity: 0;
        transition: opacity .25s ease;
    }
    .main-menu__wrapper {
        position: relative;
        background: var(--background);
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 40px;
        z-index: 2;
        width: 100%;
        max-width: 310px;
        margin-left: auto;
        height: 100vh;

        transform: translateX(100%);
        transition: transform .30s ease;
        will-change: transform;

        .main-menu__wrapper-header {
            display: flex;
            justify-content: space-between;
            align-items: center;

            p {
                font-size: 24px;
                font-style: normal;
                font-weight: 900;
                line-height: normal;
                color: var(--primary);
            }
            .main-menu__content-header-close {
                cursor: pointer;
                width: 45px;
                height: 45px;
                border-radius: 8px;
                border: 1px solid var(--primary);
                display: flex;
                align-items: center;
                justify-content: center;

                i {
                    width: 26px;
                    height: 26px;
                    font-size: 26px;
                    color: var(--primary);
                }
            }
        }

        .main-menu__wrapper-body {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: flex-start;
            flex: 1 0 0;
            align-self: stretch;

            .main-menu__body-links {
                display: flex;
                flex-direction: column;
                align-items: flex-start;
                gap: 20px;
                align-self: stretch;

                a {
                    width: 100%;
                    font-size: 16px;
                    font-style: normal;
                    font-weight: 500;
                    line-height: normal;
                    text-decoration: none;
                    border-radius: var(--radius);
                    color: var(--text);

                    &.active {
                        padding: 8px 12px;
                        color: var(--white);
                        background: var(--text-light);
                    }
                }
            }

            .main-menu__body-bottom {
                display: flex;
                padding: 10px;
                flex-direction: column;
                align-items: center;
                gap: 10px;
                align-self: stretch;
                border-radius: var(--radius);
                background: var(--white);

                a {
                    width: 100%;
                }
            }
        }
    }

    /* ÉTAT OUVERT */
    &.is-open {
        opacity: 1;
        pointer-events: auto;

        .main-menu__background {
            opacity: 1;
        }
        .main-menu__wrapper {
            transform: translateX(0);
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .main-menu, .main-menu__background, .main-menu__wrapper {
        transition: none !important;
    }
}
