/*
 * Sidebar Component - Jeety CRM
 * Styles pour la barre latérale de navigation
 */

/* === Container principal === */
/* Sidebar compacte */
.sidebar {
    width: 60px;
    background: white;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    transition: width 0.3s ease;
    overflow: hidden;
}
.sidebar:hover { width: 250px; box-shadow: 4px 0 16px rgba(0,0,0,0.06); }
.sidebar-nav { display: flex; flex-direction: column; gap: 1px; padding: 0 6px; flex: 1; }
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: #495057;
    white-space: nowrap;
}
.sidebar-item:hover { background: #f8f9fa; color: #212529; }
.sidebar-item.active { background: #f0f7ff; color: #003D7A; }
.sidebar-item-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; background: #f8f9fa; border-radius: 6px; }
.sidebar-item.active .sidebar-item-icon { background: linear-gradient(135deg, #003D7A 0%, #0052A3 100%); color: white; }
.sidebar-item-text { font-size: 12px; font-weight: 600; opacity: 0; transition: opacity 0.2s; }
.sidebar:hover .sidebar-item-text { opacity: 1; }
.sidebar-divider { height: 1px; background: #e9ecef; margin: 4px 6px; }
.sidebar-bottom { padding: 0 6px; }
.sidebar-item.logout { color: #dc3545; }
.sidebar-item.logout:hover { background: #FFF5F5; }
.sidebar-item.logout .sidebar-item-icon { background: #FFF5F5; }

/* Sous-menu */
.sidebar-sub {
    display: none;
    flex-direction: column;
    gap: 0px;
    margin-left: 14px;
    padding-left: 8px;
    border-left: 2px solid #e9ecef;
}
.sidebar:hover .sidebar-sub {
    display: flex;
    margin-left: 14px;
}
.sidebar-sub-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    font-size: 11px;
}
.sidebar-sub-item:hover {
    background: #f8f9fa;
    color: #212529;
}
.sidebar-sub-item.active {
    color: #003D7A;
    font-weight: 600;
}
.sidebar-sub-item-text {
    opacity: 0;
    transition: opacity 0.2s ease;
    /* white-space: normal; */
    line-height: 1.2;
}
.sidebar:hover .sidebar-sub-item-text {
    opacity: 1;
}
.sidebar-sub-item-dot {
    width: 5px;
    height: 5px;
    background: #adb5bd;
    border-radius: 50%;
    flex-shrink: 0;
}
.sidebar-sub-item:hover .sidebar-sub-item-dot {
    background: #495057;
}
.sidebar-sub-item.active .sidebar-sub-item-dot {
    background: #003D7A;
}

/* === Responsive === */
@media (max-width: 768px) {
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-smooth);
    }
    
    .app-sidebar.mobile-open {
        transform: translateX(0);
    }
}
