/*
 * ==========================================================
 * ELYVARA SIDEBAR R5
 * ==========================================================
 */

.sidebar {
    box-sizing: border-box !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;

    display: flex !important;
    flex-direction: column !important;

    padding-top: 14px !important;
    padding-bottom: 12px !important;
}

.sidebar .brand {
    flex: 0 0 auto !important;
    padding-top: 0 !important;
    padding-bottom: 10px !important;
}

.sidebar .brand img {
    width: 58px !important;
    height: 58px !important;
}


/*
 * Le menu prend l'espace restant.
 * S'il manque de hauteur, SEUL le menu défile.
 * La carte Steam reste en bas.
 */
.sidebar .nav {
    flex: 1 1 auto !important;
    min-height: 0 !important;

    display: flex !important;
    flex-direction: column !important;

    gap: 1px !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    padding-right: 4px !important;

    scrollbar-width: thin;
}


/*
 * Navigation plus compacte pour conserver
 * toutes les fonctions sans sacrifier le footer.
 */
.sidebar .nav > a {
    flex: 0 0 auto !important;

    min-height: 36px !important;

    box-sizing: border-box !important;

    padding: 6px 9px !important;

    gap: 10px !important;

    border-radius: 10px !important;
}

.sidebar .nav-icon {
    width: 20px !important;
    height: 20px !important;
}

.sidebar .nav-icon svg {
    width: 18px !important;
    height: 18px !important;
}


/*
 * Barre de défilement très discrète.
 */
.sidebar .nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar .nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar .nav::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: rgba(83, 174, 150, .22);
}


/*
 * ==========================================================
 * COMPTE CONNECTE
 * ==========================================================
 */

.sidebar .sidebar-bottom {
    flex: 0 0 auto !important;

    margin-top: 9px !important;
    padding-top: 8px !important;

    display: grid !important;
    gap: 6px !important;

    border-top: 1px solid rgba(92, 168, 147, .10);
}

.sidebar .user-card,
.sidebar .steam-card {
    box-sizing: border-box !important;

    padding: 9px 11px !important;

    border-radius: 11px !important;

    background:
        linear-gradient(
            145deg,
            rgba(7, 34, 26, .94),
            rgba(4, 25, 19, .96)
        ) !important;
}

.sidebar .user-card {
    border-color: rgba(204, 165, 73, .20) !important;
}

.sidebar .user-card.connected {
    border-color: rgba(79, 196, 167, .26) !important;

    box-shadow:
        inset 0 0 18px rgba(65, 172, 143, .025);
}

.sidebar .user-card strong {
    overflow: hidden;

    display: block !important;

    color: #ebd6a7 !important;

    font-size: 12px !important;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar .user-card.connected strong {
    color: #dfe9df !important;
}

.sidebar .user-card span {
    overflow: hidden;

    display: block !important;

    margin-top: 3px !important;

    color: #d6ad59 !important;

    font-size: 10px !important;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar .steam-card {
    padding-top: 7px !important;
    padding-bottom: 7px !important;
}

.sidebar .steam-card strong {
    font-size: 10px !important;
}

.sidebar .steam-card span {
    margin-top: 2px !important;
    font-size: 9px !important;
}


/*
 * Evite qu'un vieux texte SVG parasite
 * puisse agrandir la navigation.
 */
.sidebar .nav > :not(a) {
    display: none !important;
}


/*
 * Sur les écrans très bas on laisse simplement
 * la navigation défiler.
 */
@media (max-height: 820px) and (min-width: 981px) {

    .sidebar .brand img {
        width: 50px !important;
        height: 50px !important;
    }

    .sidebar .brand {
        padding-bottom: 6px !important;
    }

    .sidebar .nav > a {
        min-height: 33px !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }

    .sidebar .sidebar-bottom {
        margin-top: 5px !important;
        padding-top: 5px !important;
    }

    .sidebar .steam-card {
        display: none !important;
    }
}


/*
 * On conserve le comportement mobile historique.
 */
@media (max-width: 980px) {

    .sidebar .sidebar-bottom {
        display: none !important;
    }
}