/* ============================================
   PAGE DÉTAILS ENTREPRISE - UI MODERNE
   ============================================ */

:root {
    --primary-color: #3b82f6;
    --success-color: #10b981;
    --info-color: #06b6d4;
    --warning-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
}

/* ============================================
   ÉTATS CHARGEMENT ET ERREUR
   ============================================ */

.loading-container,
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.loading-text {
    margin-top: 1rem;
    color: var(--cmt-text-secondary);
}

.error-container h4 {
    margin-top: 1rem;
    color: var(--cmt-text-primary);
}

/* ============================================
   EN-TÊTE ENTREPRISE
   ============================================ */

.company-header-modern {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.company-avatar-modern {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.company-info-modern {
    flex: 1;
    min-width: 200px;
}

.company-meta-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.meta-item-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--cmt-text-secondary);
    font-size: 0.875rem;
}

.meta-item-modern i {
    color: var(--text-muted);
}

.company-status-modern {
    margin-top: 0.5rem;
}

.status-badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--cmt-radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
}

.status-badge-modern.status-active {
    background-color: var(--success-color);
    color: white;
}

.status-badge-modern.status-active i {
    color: white;
    font-size: 0.5rem;
}

.status-badge-modern.status-inactive {
    background-color: #F3F4F6;
    color: #6B7280;
}

.status-badge-modern.status-inactive i {
    color: #9CA3AF;
    font-size: 0.5rem;
}

.company-actions-modern {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

/* ============================================
   KPI CARDS
   ============================================ */

.kpi-card-modern {
    transition: var(--cmt-transition);
    border: none;
    box-shadow: var(--cmt-shadow);
    border-radius: var(--cmt-radius-md);
}

.kpi-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--cmt-shadow-lg);
}

.kpi-card-modern .card-body {
    padding: 1.25rem;
}

.kpi-content-modern {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kpi-icon-modern {
    width: 48px;
    height: 48px;
    border-radius: var(--cmt-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.kpi-icon-modern.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.kpi-icon-modern.bg-info {
    background: linear-gradient(135deg, var(--info-color), #0891b2);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.kpi-icon-modern.bg-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.kpi-icon-modern.bg-warning {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.kpi-value-modern {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--cmt-text-primary);
    line-height: 1;
}

.kpi-label-modern {
    font-size: 0.8125rem;
    color: var(--cmt-text-secondary);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* ============================================
   SECTIONS D'INFORMATION
   ============================================ */

.info-section-modern {
    margin-bottom: 1.5rem;
}

.section-title-modern {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.section-title-modern i {
    color: var(--primary-color);
}

.info-list-modern {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.info-item-modern {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item-modern label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cmt-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.info-item-modern value {
    font-size: 0.9375rem;
    color: var(--cmt-text-primary);
}

.link-modern {
    color: var(--info-color);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.link-modern:hover {
    color: #0891b2;
    text-decoration: underline;
}

.observation-text-modern {
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.empty-state-small-modern {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--cmt-text-muted);
}

.empty-state-small-modern i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    opacity: 0.5;
    color: var(--info-color);
}

.empty-state-small-modern p {
    margin: 0;
    font-size: 0.875rem;
}

/* ============================================
   AUDIT
   ============================================ */

.audit-section-modern {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    border: 1px solid #f1f5f9;
}

.audit-section-modern small {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.audit-section-modern i {
    color: var(--info-color);
}

/* ============================================
   SECTIONS ONGLETS
   ============================================ */

.tab-section-modern {
    padding: 1.5rem 0;
}

.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.section-header-modern h5 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.section-header-modern .badge {
    background-color: var(--primary-color);
}

/* ============================================
   ÉTATS VIDES ET CHARGEMENT
   ============================================ */

.empty-state-modern,
.loading-state-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.empty-state-modern i {
    font-size: 3.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-modern h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.empty-state-modern p {
    color: var(--cmt-text-secondary);
    margin: 0 0 1.5rem 0;
}

.loading-state-modern p {
    margin-top: 1rem;
    color: var(--cmt-text-secondary);
}

/* ============================================
   DATA GRID
   ============================================ */

.modern-grid {
    margin-top: 1rem;
    border-radius: 10px;
    overflow: hidden;
}

.employee-name-modern {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.employee-name-modern strong {
    color: var(--text-primary);
    font-weight: 600;
}

.employee-name-modern small {
    color: var(--cmt-text-muted);
    font-size: 0.8125rem;
}

.status-dot-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.status-dot-modern.active {
    background-color: #d1fae5;
    color: #065f46;
}

.status-dot-modern.active i {
    color: #10b981;
    font-size: 0.5rem;
}

.status-dot-modern.inactive {
    background-color: #F3F4F6;
    color: #6B7280;
}

.status-dot-modern.inactive i {
    color: #9CA3AF;
    font-size: 0.5rem;
}

/* ============================================
   CARDS DÉPARTEMENT
   ============================================ */

.department-card-modern {
    background: #f9fafb;
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    height: 100%;
}

.department-card-modern:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    background: white;
}

.department-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.department-header-modern h6 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.department-description-modern {
    color: var(--cmt-text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
}

.department-footer-modern {
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.department-footer-modern span {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.department-footer-modern i {
    color: var(--info-color);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .company-header-modern {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .company-actions-modern {
        width: 100%;
        margin-left: 0;
    }
    
    .company-actions-modern button {
        flex: 1;
    }
    
    .section-header-modern {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-header-modern > div:last-child {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .section-header-modern button {
        width: 100%;
    }
    
    .audit-section-modern {
        flex-direction: column;
    }
}

/* ============================================
   ÉTATS CHARGEMENT ET ERREUR
   ============================================ */

.loading-container,
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.loading-text {
    margin-top: 1rem;
    color: var(--text-secondary);
}

.error-container h4 {
    margin-top: 1rem;
    color: var(--text-primary);
}

/* ============================================
   EN-TÊTE ENTREPRISE
   ============================================ */

.company-header-modern {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.company-avatar-modern {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.company-info-modern {
    flex: 1;
    min-width: 200px;
}

.company-meta-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.meta-item-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.meta-item-modern i {
    color: var(--text-muted);
}

.company-status-modern {
    margin-top: 0.5rem;
}

.status-badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.status-badge-modern.status-active {
    background-color: #d1fae5;
    color: #065f46;
}

.status-badge-modern.status-active i {
    color: #10b981;
    font-size: 0.5rem;
}

.status-badge-modern.status-inactive {
    background-color: #f3f4f6;
    color: #6b7280;
}

.status-badge-modern.status-inactive i {
    color: #9ca3af;
    font-size: 0.5rem;
}

.company-actions-modern {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

/* ============================================
   KPI CARDS
   ============================================ */

.kpi-card-modern {
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.kpi-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.kpi-card-modern .card-body {
    padding: 1.25rem;
}

.kpi-content-modern {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kpi-icon-modern {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.kpi-icon-modern.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
}

.kpi-icon-modern.bg-info {
    background: linear-gradient(135deg, var(--info-color), #0891b2);
}

.kpi-icon-modern.bg-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
}

.kpi-icon-modern.bg-warning {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
}

.kpi-value-modern {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.kpi-label-modern {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* ============================================
   SECTIONS D'INFORMATION
   ============================================ */

.info-section-modern {
    margin-bottom: 1.5rem;
}

.section-title-modern {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.section-title-modern i {
    color: var(--primary-color);
}

.info-list-modern {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.info-item-modern {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item-modern label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.info-item-modern value {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.link-modern {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.link-modern:hover {
    color: #2563eb;
    text-decoration: underline;
}

.observation-text-modern {
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.empty-state-small-modern {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.empty-state-small-modern i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    opacity: 0.5;
}

.empty-state-small-modern p {
    margin: 0;
    font-size: 0.875rem;
}

/* ============================================
   AUDIT
   ============================================ */

.audit-section-modern {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.audit-section-modern small {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.audit-section-modern i {
    color: var(--text-muted);
}

/* ============================================
   SECTIONS ONGLETS
   ============================================ */

.tab-section-modern {
    padding: 1.5rem 0;
}

.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.section-header-modern h5 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

/* ============================================
   ÉTATS VIDES ET CHARGEMENT
   ============================================ */

.empty-state-modern,
.loading-state-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.empty-state-modern i {
    font-size: 3.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-modern h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.empty-state-modern p {
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
}

.loading-state-modern p {
    margin-top: 1rem;
    color: var(--text-secondary);
}

/* ============================================
   DATA GRID
   ============================================ */

.modern-grid {
    margin-top: 1rem;
}

.employee-name-modern {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.employee-name-modern strong {
    color: var(--text-primary);
    font-weight: 600;
}

.employee-name-modern small {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.status-dot-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.status-dot-modern.active {
    background-color: #d1fae5;
    color: #065f46;
}

.status-dot-modern.active i {
    color: #10b981;
    font-size: 0.5rem;
}

.status-dot-modern.inactive {
    background-color: #f3f4f6;
    color: #6b7280;
}

.status-dot-modern.inactive i {
    color: #9ca3af;
    font-size: 0.5rem;
}

/* ============================================
   CARDS DÉPARTEMENT
   ============================================ */

.department-card-modern {
    background: #f9fafb;
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    height: 100%;
}

.department-card-modern:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.department-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.department-header-modern h6 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.department-description-modern {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
}

.department-footer-modern {
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.department-footer-modern span {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.department-footer-modern i {
    color: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .company-header-modern {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .company-actions-modern {
        width: 100%;
        margin-left: 0;
    }
    
    .company-actions-modern button {
        flex: 1;
    }
    
    .section-header-modern {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-header-modern > div:last-child {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .section-header-modern button {
        width: 100%;
    }
    
    .audit-section-modern {
        flex-direction: column;
    }
}

:root {
    --primary-color: #3b82f6;
    --success-color: #10b981;
    --info-color: #06b6d4;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ============================================
   CONTENEUR PRINCIPAL
   ============================================ */

.entreprise-details-page {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================
   ÉTATS DE CHARGEMENT ET ERREUR
   ============================================ */

.loading-container,
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.loading-text {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.error-container {
    color: var(--text-secondary);
}

.error-container h4 {
    margin-top: 1rem;
    color: var(--text-primary);
}

/* ============================================
   EN-TÊTE DE LA PAGE
   ============================================ */

.page-header {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
}

.company-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.company-info {
    flex: 1;
}

.company-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 0.75rem;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.meta-item i {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.company-status {
    display: flex;
    gap: 0.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.status-badge.status-active {
    background-color: #d1fae5;
    color: #065f46;
}

.status-badge.status-active i {
    color: #10b981;
}

.status-badge.status-inactive {
    background-color: #f3f4f6;
    color: #6b7280;
}

.status-badge.status-inactive i {
    color: #9ca3af;
}

.status-badge i {
    font-size: 0.5rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.action-btn {
    font-weight: 500 !important;
}

/* ============================================
   KPI SECTION
   ============================================ */

.kpi-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.kpi-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.kpi-icon.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
}

.kpi-icon.bg-info {
    background: linear-gradient(135deg, var(--info-color), #0891b2);
}

.kpi-icon.bg-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
}

.kpi-icon.bg-warning {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
}

.kpi-content {
    flex: 1;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.kpi-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   ONGLETS MODERNES
   ============================================ */

.content-tabs {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.modern-tabs .rz-tabview-nav {
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
    background-color: var(--bg-light);
}

.modern-tabs .rz-tabview-nav-item {
    padding: 1rem 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.modern-tabs .rz-tabview-nav-item:hover {
    color: var(--text-primary);
    background-color: rgba(59, 130, 246, 0.05);
}

.modern-tabs .rz-tabview-nav-item.rz-state-active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: white;
}

.tab-content {
    padding: 2rem;
}

/* ============================================
   SECTION HEADER
   ============================================ */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.section-actions {
    display: flex;
    gap: 0.75rem;
}

/* ============================================
   GRILLE D'INFORMATIONS
   ============================================ */

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.info-card.full-width {
    grid-column: 1 / -1;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.info-card-header i {
    color: var(--primary-color);
    font-size: 1.125rem;
}

.info-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.info-card-body {
    padding: 1.25rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.info-item value {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.observation-text {
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
}

.empty-state-small {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.empty-state-small i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.empty-state-small p {
    margin: 0;
    font-size: 0.875rem;
}

/* ============================================
   AUDIT INFO
   ============================================ */

.audit-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    margin-top: 1.5rem;
}

.audit-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.audit-item i {
    color: var(--text-muted);
}

.audit-item .by {
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   ÉTATS VIDES
   ============================================ */

.empty-state,
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.empty-state p {
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
    max-width: 400px;
}

.loading-state p {
    margin-top: 1rem;
    color: var(--text-secondary);
}

/* ============================================
   DATA TABLE
   ============================================ */

.data-table-wrapper {
    margin-top: 1.5rem;
}

.modern-grid {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.modern-grid .rz-datatable-scrollable-wrapper {
    border-radius: var(--border-radius);
}

.modern-grid .rz-grid-table {
    border: none;
}

.modern-grid .rz-cell-data {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.employee-name {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.employee-name strong {
    color: var(--text-primary);
    font-weight: 600;
}

.employee-name small {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.date-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.status-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.status-dot.active {
    background-color: #d1fae5;
    color: #065f46;
}

.status-dot.active i {
    color: #10b981;
    font-size: 0.5rem;
}

.status-dot.inactive {
    background-color: #f3f4f6;
    color: #6b7280;
}

.status-dot.inactive i {
    color: #9ca3af;
    font-size: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* ============================================
   GRILLE DE DÉPARTEMENTS
   ============================================ */

.department-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.department-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.department-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.department-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.department-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: white;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.department-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 1rem 0;
}

.department-footer {
    display: flex;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.employee-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.employee-count i {
    color: var(--text-muted);
}

/* ============================================
   DROPDOWNS
   ============================================ */

.dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    padding: 0.5rem;
    min-width: 160px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    background-color: var(--bg-light);
    color: var(--text-primary);
}

.dropdown-item i {
    width: 16px;
    font-size: 0.875rem;
}

.dropdown-item.text-danger {
    color: var(--danger-color);
}

.dropdown-item.text-danger:hover {
    background-color: #fee2e2;
    color: var(--danger-color);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .kpi-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .department-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .entreprise-details-page {
        padding: 1rem;
    }
    
    .page-header {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
    
    .company-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .company-name {
        font-size: 1.25rem;
    }
    
    .kpi-section {
        grid-template-columns: 1fr;
    }
    
    .kpi-value {
        font-size: 1.5rem;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .section-actions button {
        width: 100%;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .department-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .company-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .kpi-card {
        padding: 1rem;
    }
    
    .kpi-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .audit-info {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* En-tête de l'entreprise */
.avatar-icon-wrapper .avatar-icon {
    font-weight: bold;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* Widgets statistiques */
.widget-chart {
    padding: 20px;
    border: none;
    box-shadow: 0 0.46875rem 2.1875rem rgba(4, 9, 20, 0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.widget-chart:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.625rem 2.5rem rgba(4, 9, 20, 0.08);
}

.widget-chart .icon-wrapper {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.widget-numbers {
    font-size: 2rem;
    font-weight: bold;
    color: #495057;
    margin-bottom: 5px;
}

.widget-subheading {
    color: #6c757d;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Onglets Radzen personnalisés */
.rz-tabview-nav {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}

.rz-tabview-nav-item {
    font-weight: 500;
}

/* DataGrid personnalisé */
.rz-datatable {
    box-shadow: none !important;
}

.rz-datatable .rz-cell-data {
    padding: 12px 8px;
}

/* Cards de départements */
.card.h-100 {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card.h-100:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.625rem 2.5rem rgba(4, 9, 20, 0.08);
}

/* Description list */
dl.row dt {
    font-weight: 600;
    color: #6c757d;
}

dl.row dd {
    color: #495057;
}

/* Responsive */
@@media (max-width: 768px) {
    .widget-numbers {
        font-size: 1.5rem;
    }

    .widget-chart .icon-wrapper {
        width: 50px;
        height: 50px;
    }

    .widget-chart .icon-wrapper i {
        font-size: 1.5rem !important;
    }
}
