/*
 * Topbar Component - Jeety CRM
 * Styles pour la barre de navigation supérieure
 */

/* === Container principal === */
/* Header compact */
.header {
    background: white;
    padding: 10px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}
.logo { display: flex; align-items: center; }
.logo-img { height: 30px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.primes-payables {
    padding: 6px 12px;
    background: #E8F9F3;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #00C48C;
}
.primes-payables-icon { font-size: 16px; }
.primes-payables-text { font-size: 10px; color: #00965E; font-weight: 600; text-transform: uppercase; }
.primes-payables-amount { font-size: 14px; font-weight: 800; color: #00965E; }
/* Notification dropdown container */
.notification-container {
    position: relative;
}

.notification-bell {
    position: relative;
    width: 32px;
    height: 32px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease;
}

.notification-bell:hover {
    background: #e9ecef;
}

.notification-container.active .notification-bell {
    background: #e9ecef;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: #E6007E;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User dropdown container */
.user-info-container {
    position: relative;
}

.user-info { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    padding: 4px 10px; 
    background: #f8f9fa; 
    border-radius: 8px; 
    cursor: pointer;
    transition: background 0.2s ease;
}

.user-info:hover {
    background: #e9ecef;
}

.user-dropdown-arrow {
    color: #6c757d;
    transition: transform 0.2s ease;
}

.user-info-container.active .user-dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: fixed;
    top: 0;
    right: 20px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 10000;
}

.user-info-container.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #212529;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

.user-dropdown-item:last-child {
    border-bottom: none;
}

.user-dropdown-item:hover {
    background: #f8f9fa;
}

.user-dropdown-item svg {
    color: #6c757d;
    flex-shrink: 0;
}

.user-dropdown-item:hover svg {
    color: #003D7A;
}

/* Notification dropdown */
.notification-dropdown {
    position: fixed;
    top: 0;
    right: 60px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 320px;
    max-width: 380px;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 10000;
}

.notification-container.active .notification-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: background 0.2s ease;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #e8f4ff;
}

.notification-item.unread:hover {
    background: #d9edff;
}

.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 13px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    font-size: 11px;
    color: #adb5bd;
}

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.notification-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.notification-empty-text {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.notification-view-all {
    display: block;
    padding: 12px 16px;
    text-align: center;
    color: #003D7A;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-top: 1px solid #e9ecef;
    transition: background 0.2s ease;
}

.notification-view-all:hover {
    background: #f8f9fa;
}

.user-avatar { width: 28px; height: 28px; background: linear-gradient(135deg, #003D7A 0%, #0052A3 100%); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 11px; }
.user-name { font-size: 12px; font-weight: 600; color: #212529; }

/* === Responsive === */
@media (max-width: 768px) {
    .topbar-menu-toggle {
        display: flex;
    }
    
    .topbar-search {
        display: none;
    }
    
    .topbar-user-info {
        display: none;
    }
    
    .topbar-breadcrumb {
        display: none;
    }
}

@media (max-width: 576px) {
    .app-topbar {
        padding: 0 var(--spacing-md);
    }
    
    .topbar-action {
        width: 36px;
        height: 36px;
    }
}
