/* --- Variables & Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}


:root {
    --nav-mobile-width: 75px;
    --nav-width: 260px;
    --nav-bg: #0b0c10;
    --active-bg: rgba(255, 255, 255, 0.08);
    --text-main: #e8e8f5;
    --accent-cyan: #00f5d4;
}

/* --- Sidebar (Desktop) --- */
.sidebar {
    font-family: sans-serif!important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: var(--nav-width) !important;
    background: var(--nav-bg) !important; /* On force la couleur de fond */
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    /* Valeur très haute pour passer devant les modales, headers et composants tiers */
    z-index: 9999 !important;
    transition: transform 0.3s ease !important;
    line-height: 1.5!important;
}
.mobile-nav {
    display: none; /* Caché sur PC */
}

.nav-logo {
    font-family: sans-serif!important;
    color: #00f5d4;
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.nav-section-title {
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    color: #7777a0;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: 0.2s;
}

.nav-item:hover { background: var(--active-bg); }
.nav-item.active {
    background: var(--active-bg);
    border: 1px solid rgba(255,255,255,0.1);
}

/* --- Mobile Header (Caché sur PC) --- */
.mobile-header { display: none; }

/* --- RESPONSIVE --- */
@media (max-width: 1200px) {
    .sidebar { display: none !important; }

    .mobile-nav {
        line-height: 1.5!important;
        font-family: sans-serif!important;
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: var(--nav-mobile-width)!important;
        background: rgba(11, 12, 16, 0.9) !important;
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        justify-content: space-around !important;
        align-items: center !important;
        z-index: 9999 !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
    }
    body {
        padding-bottom: 80px !important;
        padding-left: 0 !important;
        height: fit-content;
    }

    .nav-item-mobile {
        position: relative; /* Pour positionner l'indicateur */
        display: flex;
        flex-direction: column;
        align-items: center;
        color: #b08bb0 !important;
        text-decoration: none;
        font-size: 0.75rem;
        gap: 5px;
        transition: all 0.3s ease;
        flex: 1;
    }

    .nav-item-mobile.active {
        color: #ffffff;
        border: none !important;
        font-weight: 900;
    }

    .nav-item-mobile .icon {
        font-size: 1.4rem;
    }
    .nav-item-mobile.active::after {
        content: "";
        position: absolute;
        top: -10px; /* Aligné avec le haut de la nav */
        width: 30px;
        height: 3px;
        background: var(--accent-cyan);
        box-shadow: 0 0 10px var(--accent-cyan), 0 0 20px var(--accent-cyan);
        border-radius: 10px;
    }

    .nav-item-mobile .icon {
        font-size: 1.4rem;
        transition: transform 0.3s ease;
    }

    /* Animation de l'icône active */
    .nav-item-mobile.active .icon {
        transform: translateY(-2px) scale(1.1);
        color: var(--accent-cyan);
    }

    /* On ajoute de la marge en bas du contenu pour ne pas que le footer cache le texte */
    body { padding-bottom: var(--nav-mobile-width) !important; padding-left: 0 !important; }
}

@media (min-width: 1200px) {
    .mobile-nav { display: none !important; }
    body { padding-left: var(--nav-width) !important; }
}

.nav-item, .nav-item-mobile {
    text-decoration: none !important;
    color: var(--text-main) !important;
}