/* 
 * HATARI - Sidebar Professionnelle & Responsive
 * Version: 2.0 Pro
 */

:root {
    --sidebar-width: 240px;
    --sidebar-collapsed: 60px;
    --header-height: 56px;
    --primary: #1e40af;
    --primary-hover: #3b82f6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-hover: #f3f4f6;
    --bg-active: #eff6ff;
    --border-color: #e5e7eb;
}

/* Header compact */
.pro-header {
    height: var(--header-height);
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
}

/* Logo compact */
.pro-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
}

.pro-brand:hover {
    opacity: 0.8;
    color: var(--primary);
}

.pro-brand i {
    margin-right: 0.5rem;
    font-size: 1.4rem;
}

/* Bouton hamburger (mobile) */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
}

/* Sidebar compacte */
.pro-sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    z-index: 1020;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

/* Scrollbar fine */
.pro-sidebar::-webkit-scrollbar {
    width: 4px;
}

.pro-sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

/* Navigation */
.pro-nav {
    padding: 0.75rem 0;
}

.pro-nav-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 6px;
    margin: 0.15rem 0.5rem;
}

.pro-nav-link:hover {
    background: var(--bg-hover);
    color: var(--primary-hover);
    transform: translateX(2px);
}

.pro-nav-link.active {
    background: var(--bg-active);
    color: var(--primary);
    font-weight: 600;
}

.pro-nav-link i {
    width: 20px;
    font-size: 14px;
    margin-right: 0.75rem;
}

/* En-têtes sections */
.pro-section-header {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    padding: 1rem 1rem 0.4rem;
    letter-spacing: 0.5px;
}

/* Sous-menus */
.pro-submenu {
    padding-left: 0;
}

.pro-submenu .pro-nav-link {
    padding-left: 2.5rem;
    font-size: 12px;
    font-weight: 400;
}

/* Chevron */
.chevron {
    margin-left: auto;
    font-size: 11px;
    transition: transform 0.2s;
}

[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
}

/* Avatar */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

/* Dropdown menu */
.pro-dropdown {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 0.5rem;
    min-width: 200px;
}

.pro-dropdown-item {
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s;
}

.pro-dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

/* Content */
.pro-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 1.5rem;
    min-height: calc(100vh - var(--header-height));
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar-toggle {
        display: block;
    }
    
    .pro-sidebar {
        transform: translateX(-100%);
    }
    
    .pro-sidebar.show {
        transform: translateX(0);
        box-shadow: 0 0 20px rgba(0,0,0,0.2);
    }
    
    .pro-content {
        margin-left: 0;
    }
    
    .pro-brand span {
        display: none;
    }
}

@media (max-width: 576px) {
    .pro-header {
        padding: 0 1rem;
    }
    
    .pro-content {
        padding: 1rem;
    }
    
    .user-info {
        display: none;
    }
}

