:root {
    --sc-member-blue: #0b2c78;
    --sc-member-accent: #1669e8;
    --sc-member-text: #17243d;
    --sc-member-muted: #6e7c90;
    --sc-member-border: #e5eaf1;
    --sc-member-bg: #f6f8fb;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

.sc-member-body {
    background: var(--sc-member-bg);
    color: var(--sc-member-text);
}

.sc-member-app {
    min-height: 100vh;
}


/* =========================
   TOPBAR
   ========================= */

.sc-member-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    height: 66px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 22px;

    background: #fff;
    border-bottom: 1px solid var(--sc-member-border);

    z-index: 1000;
}

.sc-member-brand {
    display: flex;
    align-items: center;
    gap: 10px;

    color: var(--sc-member-blue);
    text-decoration: none;

    font-weight: 850;
}

.sc-member-brand img {
    height: 38px;
    width: auto;
}

.sc-member-logout {
    color: var(--sc-member-muted);
    text-decoration: none;

    font-size: .86rem;
    font-weight: 700;
}


/* =========================
   DESKTOP SIDEBAR
   ========================= */

.sc-member-sidebar {
    position: fixed;

    top: 66px;
    bottom: 0;
    left: 0;

    width: 218px;

    background: #fff;
    border-right: 1px solid var(--sc-member-border);

    padding: 20px 12px;

    z-index: 900;
}

.sc-member-side-nav {
    display: grid;
    gap: 6px;
}

.sc-member-nav-item {
    min-height: 48px;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 0 14px;

    border-radius: 13px;

    text-decoration: none;

    color: #42516a;

    font-size: .94rem;
    font-weight: 750;

    transition:
        background .15s ease,
        color .15s ease;
}

.sc-member-nav-item:hover {
    background: #f3f7fc;
    color: var(--sc-member-blue);
}

.sc-member-nav-item.active {
    background: #edf4ff;
    color: #155fc5;
}

.sc-member-nav-icon {
    width: 26px;

    display: grid;
    place-items: center;

    font-size: 1.1rem;
}


/* =========================
   CONTENT
   ========================= */

.sc-member-content {
    min-height: 100vh;

    padding:
        90px
        28px
        40px
        246px;
}


/* =========================
   MOBILE BOTTOM BAR
   ========================= */

.sc-member-bottom-nav {
    display: none;
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 767px) {

    .sc-member-topbar {
        height: 58px;

        padding:
            env(safe-area-inset-top)
            14px
            0;
    }

    .sc-member-brand img {
        height: 32px;
    }

    .sc-member-brand span {
        font-size: .92rem;
    }

    .sc-member-logout {
        font-size: .75rem;
    }


    .sc-member-sidebar {
        display: none;
    }


    .sc-member-content {
        padding:
            calc(72px + env(safe-area-inset-top))
            12px
            calc(92px + env(safe-area-inset-bottom))
            12px;
    }


    .sc-member-bottom-nav {
        position: fixed;

        left: 0;
        right: 0;
        bottom: 0;

        display: grid;

        grid-template-columns:
            repeat(4, minmax(0, 1fr));

        min-height: 68px;

        padding:
            6px
            6px
            calc(6px + env(safe-area-inset-bottom));

        background: rgba(255,255,255,.97);

        border-top:
            1px solid var(--sc-member-border);

        box-shadow:
            0 -8px 28px rgba(20,40,70,.08);

        backdrop-filter: blur(14px);

        z-index: 1200;
    }


    .sc-member-tab {
        position: relative;

        min-width: 0;

        display: flex;
        flex-direction: column;

        justify-content: center;
        align-items: center;

        gap: 3px;

        border-radius: 12px;

        color: #6c7889;

        text-decoration: none;

        font-size: .68rem;
        font-weight: 750;
    }


    .sc-member-tab.active {
        color: #145fc7;
        background: #f1f6fd;
    }


    .sc-member-tab-icon-wrap {
        position: relative;

        display: inline-grid;
        place-items: center;
    }


    .sc-member-tab-icon {
        font-size: 1.25rem;
        line-height: 1;
    }


    .sc-member-tab-label {
        max-width: 100%;

        overflow: hidden;
        text-overflow: ellipsis;

        white-space: nowrap;
    }


    .sc-member-tab-badge {
        position: absolute;

        top: -8px;
        right: -13px;

        min-width: 19px;
        height: 19px;

        padding: 0 5px;

        border-radius: 999px;

        display: grid;
        place-items: center;

        background: #d82929;
        color: #fff;

        border: 2px solid #fff;

        font-size: .62rem;
        font-weight: 900;
    }

    .sc-member-tab-badge[hidden] {
        display: none !important;
    }
}

/* Badge d'attention dans la navigation desktop */
.sc-member-nav-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: #d82929;
    color: #fff;
    font-size: .68rem;
    font-weight: 900;
}

.sc-member-nav-badge[hidden] {
    display: none !important;
}
