/*--------------------------------------------------------------
# Sidebar Dashboard - Design Élégant & Professionnel
--------------------------------------------------------------*/

#sidebar {
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden;
    position: fixed;
    top: 60px;
    left: 0;
    width: 300px;
    z-index: 996;
    transition: left 0.3s ease;
}

/* Custom Scrollbar */
#sidebar::-webkit-scrollbar {
    width: 6px;
}

#sidebar::-webkit-scrollbar-track {
    background: #f9fafb;
}

#sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Sidebar Header */
.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #f3f4f6;
    background: #ffffff;
    position: relative;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: -1px;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #3d5f9e 0%, #2c4a7c 100%);
    pointer-events: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-brand:hover {
    transform: translateX(2px);
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3d5f9e 0%, #2c4a7c 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(61, 95, 158, 0.2);
    transition: all 0.3s ease;
}

.sidebar-brand:hover .brand-icon {
    box-shadow: 0 6px 16px rgba(61, 95, 158, 0.3);
    transform: scale(1.05);
}

.brand-icon i {
    font-size: 1.5rem;
    color: #ffffff;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
    font-weight: 500;
    line-height: 1.2;
}

/* Sidebar Content */
.sidebar-content {
    padding: 24px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.sidebar-nav .nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #f9fafb;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sidebar-nav .nav-item:hover {
    color: #3d5f9e;
    border-color: #e5e7eb;
}

.sidebar-nav .nav-item:hover::before {
    opacity: 1;
}

.sidebar-nav .nav-icon {
    width: 36px;
    height: 36px;
    background: #f9fafb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: all 0.25s ease;
}

.sidebar-nav .nav-item:hover .nav-icon {
    background: linear-gradient(135deg, #3d5f9e 0%, #2c4a7c 100%);
}

.sidebar-nav .nav-icon i {
    font-size: 1rem;
    color: #6b7280;
    transition: color 0.25s ease;
}

.sidebar-nav .nav-item:hover .nav-icon i {
    color: #ffffff;
}

.sidebar-nav .nav-label {
    position: relative;
    z-index: 1;
}

/* Progress Card */
.progress-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.progress-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-bottom: 1px solid #f3f4f6;
}

.progress-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3d5f9e 0%, #2c4a7c 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(61, 95, 158, 0.2);
}

.progress-icon i {
    font-size: 1.125rem;
    color: #ffffff;
}

.progress-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    letter-spacing: -0.01em;
}

.progress-section {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-label-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.progress-label {
    font-size: 0.8125rem;
    color: #6b7280;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.progress-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.progress-badge.bg-success {
    background: #10b981 !important;
    color: #ffffff;
}

.progress-badge.bg-warning {
    background: #f59e0b !important;
    color: #ffffff;
}

.progress-badge.bg-danger {
    background: #ef4444 !important;
    color: #ffffff;
}

.progress-badge.bg-info {
    background: #3b82f6 !important;
    color: #ffffff;
}

.progress-stats {
    display: flex;
    align-items: center;
}

.stats-text {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
}

.progress-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 4px 0;
}

.progress-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 4px;
}

.progress-alert i {
    font-size: 0.875rem;
    flex-shrink: 0;
}

.progress-alert.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.progress-alert.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
}

.empty-icon {
    width: 48px;
    height: 48px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e5e7eb;
}

.empty-icon i {
    font-size: 1.5rem;
    color: #9ca3af;
}

.empty-text {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0;
    font-weight: 500;
    line-height: 1.5;
}

/* Mentor Section */
.mentor-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.section-header {
    padding: 0 4px;
}

.section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

.mentor-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Allow ribbon triangle to be visible on info cards */
.info-card.mentor-card {
    overflow: visible;
}

.mentor-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mentor-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    text-decoration: none;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.25s ease;
    cursor: pointer;
}

.mentor-toggle:hover {
    color: #3d5f9e;
    background: #f9fafb;
}

.toggle-icon {
    width: 36px;
    height: 36px;
    background: #f9fafb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.mentor-toggle:hover .toggle-icon {
    background: linear-gradient(135deg, #3d5f9e 0%, #2c4a7c 100%);
}

.toggle-icon i {
    font-size: 1rem;
    color: #6b7280;
    transition: color 0.25s ease;
}

.mentor-toggle:hover .toggle-icon i {
    color: #ffffff;
}

.toggle-label {
    flex: 1;
}

.toggle-chevron {
    font-size: 0.875rem;
    transition: transform 0.25s ease;
}

.mentor-toggle[aria-expanded="true"] .toggle-chevron {
    transform: rotate(180deg);
}

.mentor-links {
    padding: 8px 14px 14px;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
}

.mentor-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    text-decoration: none;
    color: #6b7280;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.25s ease;
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.mentor-link i {
    font-size: 1.125rem;
    color: #9ca3af;
    transition: color 0.25s ease;
}

.mentor-link:hover {
    color: #3d5f9e;
    background: #ffffff;
    border-color: #3d5f9e;
    transform: translateX(4px);
}

.mentor-link:hover i {
    color: #3d5f9e;
}

/* Responsive Design */
@media (max-width: 1199.98px) {
    .sidebar-content {
        padding: 20px 14px;
    }
    
    #sidebar {
        left: -300px;
    }
    
    body.toggle-sidebar #sidebar {
        left: 0;
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.1);
    }
}

@media (min-width: 1200px) {
    body.toggle-sidebar #sidebar {
        left: -300px;
    }
    
    body.toggle-sidebar #main,
    body.toggle-sidebar #footer {
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    .sidebar-header {
        padding: 20px 16px;
    }
    
    .sidebar-content {
        padding: 18px 12px;
        gap: 20px;
    }
    
    .brand-icon {
        width: 42px;
        height: 42px;
    }
    
    .brand-icon i {
        font-size: 1.25rem;
    }
    
    .brand-title {
        font-size: 1rem;
    }
    
    .brand-subtitle {
        font-size: 0.6875rem;
    }
    
    .sidebar-nav .nav-item {
        padding: 10px 12px;
    }
    
    .sidebar-nav .nav-icon {
        width: 32px;
        height: 32px;
    }
    
    .sidebar-nav .nav-icon i {
        font-size: 0.875rem;
    }
    
    .progress-header {
        padding: 14px 16px;
    }
    
    .progress-icon {
        width: 36px;
        height: 36px;
    }
    
    .progress-icon i {
        font-size: 1rem;
    }
    
    .progress-title {
        font-size: 0.875rem;
    }
    
    .progress-section {
        padding: 16px;
    }
}

@media (max-width: 575.98px) {
    #sidebar {
        width: 100%;
        left: -100%;
    }
    
    .sidebar-content {
        padding: 16px 12px;
        gap: 16px;
    }
    
    .progress-card {
        border-radius: 10px;
    }
}

/* Print Styles */
@media print {
    #sidebar {
        display: none;
    }
}

/* Animation for collapse */
.collapse {
    transition: height 0.35s ease;
}

.collapsing {
    transition: height 0.35s ease;
}
