/**
 * ============================================
 * VARIABLES CSS - Elsanor Intranet S8
 * Variables globales réutilisables
 * ============================================
 */

:root {
    /* ==========================================
       COULEURS
       ========================================== */
    
    /* Couleurs principales */
    --color-primary: #2c3e50;
    --color-secondary: #34495e;
    --color-accent: #3498db;
    
    /* Couleurs sémantiques */
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-warning: #ffc107;
    --color-info: #17a2b8;
    --color-orange: #fd7e14;
    
    /* Couleurs de texte */
    --text-dark: #333333;
    --text-light: #ecf0f1;
    --text-muted: #7f8c8d;
    
    /* Couleurs de fond */
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-dark: #2c3e50;
    
    /* ==========================================
       BORDURES & ARRONDIS
       ========================================== */
    --border-color: #dee2e6;
    --border-radius: 4px;
    --border-radius-lg: 8px;
    --border-radius-xl: 12px;
    
    /* ==========================================
       OMBRES
       ========================================== */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
    
    /* ==========================================
       DIMENSIONS LAYOUT
       ========================================== */
    --sidebar-width: 250px;
    --sidebar-width-collapsed: 60px;
    --header-height: 56px;
    --impersonation-banner-height: 40px;
    
    /* ==========================================
       TRANSITIONS
       ========================================== */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* ==========================================
       Z-INDEX SCALE
       ========================================== */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 500;
    --z-modal-backdrop: 1000;
    --z-modal: 1050;
    --z-notification: 9999;
    --z-impersonation: 10000;
    
    /* ==========================================
       FEEDBACK COLORS (champs formulaires)
       ========================================== */
    --feedback-loading-border: #ffc107;
    --feedback-loading-bg: #fffbf0;
    --feedback-success-border: #28a745;
    --feedback-success-bg: #d4edda;
    --feedback-error-border: #dc3545;
    --feedback-error-bg: #f8d7da;
}
/**
 * ============================================
 * BASE CSS - Elsanor Intranet S8
 * Reset et styles fondamentaux
 * ============================================
 */

/* ==========================================
   RESET & BOX MODEL
   ========================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ==========================================
   BODY
   ========================================== */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-dark);
    background-color: var(--bg-light);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Body avec navbar fixe (SuperAdmin) */
body.has-fixed-navbar {
    padding-top: var(--header-height);
}

/* Body avec bannière d'impersonation */
body.is-impersonating {
    padding-top: calc(var(--header-height) + var(--impersonation-banner-height));
}

/* ==========================================
   TYPOGRAPHIE
   ========================================== */

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* ==========================================
   LIENS
   ========================================== */

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ==========================================
   CODE
   ========================================== */

code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875em;
    background-color: var(--bg-light);
    padding: 2px 6px;
    border-radius: var(--border-radius);
    color: #e83e8c;
}

pre {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    background-color: var(--bg-light);
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
}

/* ==========================================
   IMAGES
   ========================================== */

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================
   SCROLLBAR PERSONNALISÉE
   ========================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ==========================================
   SÉLECTION DE TEXTE
   ========================================== */

::selection {
    background-color: var(--color-accent);
    color: white;
}

/* ==========================================
   FOCUS VISIBLE (Accessibilité)
   ========================================== */

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ==========================================
   ANIMATIONS GLOBALES
   ========================================== */

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes flash-success {
    0% { background-color: var(--feedback-success-bg); }
    100% { background-color: transparent; }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Fix pour afficher sort-value en mode lecture */
.sort-value.visible {
    display: inline !important;
    visibility: visible !important;
}
/**
 * ============================================
 * UTILITIES CSS - Elsanor Intranet S8
 * Classes utilitaires réutilisables
 * ============================================
 */

/* ==========================================
   DISPLAY
   ========================================== */

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

/* ==========================================
   FLEXBOX
   ========================================== */

.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }

.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-stretch { align-items: stretch !important; }

.flex-1 { flex: 1 !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }

.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }

/* ==========================================
   TEXT ALIGNMENT
   ========================================== */

.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

/* ==========================================
   TEXT COLORS
   ========================================== */

.text-primary { color: var(--color-primary) !important; }
.text-secondary { color: var(--color-secondary) !important; }
.text-accent { color: var(--color-accent) !important; }
.text-success { color: var(--color-success) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-info { color: var(--color-info) !important; }
.text-orange { color: var(--color-orange) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-dark { color: var(--text-dark) !important; }
.text-light { color: var(--text-light) !important; }
.text-white { color: #ffffff !important; }

/* ==========================================
   TEXT UTILITIES
   ========================================== */

.text-nowrap { white-space: nowrap !important; }
.text-preline { white-space: pre-line !important; }
.text-truncate {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}
.text-break { word-wrap: break-word !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-lowercase { text-transform: lowercase !important; }
.text-capitalize { text-transform: capitalize !important; }

.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }

.fs-sm { font-size: 0.875rem !important; }
.fs-xs { font-size: 0.75rem !important; }
.fs-lg { font-size: 1.125rem !important; }

/* ==========================================
   BACKGROUND COLORS
   ========================================== */

.bg-primary { background-color: var(--color-primary) !important; }
.bg-secondary { background-color: var(--color-secondary) !important; }
.bg-success { background-color: var(--color-success) !important; }
.bg-danger { background-color: var(--color-danger) !important; }
.bg-warning { background-color: var(--color-warning) !important; }
.bg-info { background-color: var(--color-info) !important; }
.bg-light { background-color: var(--bg-light) !important; }
.bg-white { background-color: var(--bg-white) !important; }
.bg-transparent { background-color: transparent !important; }

/* Background opacity variants (compatible with bg-* classes) */
.bg-opacity-10 { --bg-opacity: 0.1; }
.bg-opacity-25 { --bg-opacity: 0.25; }
.bg-opacity-50 { --bg-opacity: 0.5; }
.bg-opacity-75 { --bg-opacity: 0.75; }
.bg-opacity-100 { --bg-opacity: 1; }

/* Override bg-* when used with bg-opacity */
.bg-info.bg-opacity-10 { background-color: rgba(23, 162, 184, 0.1) !important; }
.bg-info.bg-opacity-25 { background-color: rgba(23, 162, 184, 0.25) !important; }
.bg-info.bg-opacity-50 { background-color: rgba(23, 162, 184, 0.5) !important; }
.bg-success.bg-opacity-10 { background-color: rgba(40, 167, 69, 0.1) !important; }
.bg-success.bg-opacity-25 { background-color: rgba(40, 167, 69, 0.25) !important; }
.bg-warning.bg-opacity-10 { background-color: rgba(255, 193, 7, 0.1) !important; }
.bg-warning.bg-opacity-25 { background-color: rgba(255, 193, 7, 0.25) !important; }
.bg-danger.bg-opacity-10 { background-color: rgba(220, 53, 69, 0.1) !important; }
.bg-danger.bg-opacity-25 { background-color: rgba(220, 53, 69, 0.25) !important; }

/* ==========================================
   SPACING - MARGIN
   ========================================== */

.m-0 { margin: 0 !important; }
.m-1 { margin: 0.25rem !important; }
.m-2 { margin: 0.5rem !important; }
.m-3 { margin: 1rem !important; }
.m-4 { margin: 1.5rem !important; }
.m-5 { margin: 3rem !important; }
.m-auto { margin: auto !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.ms-0 { margin-left: 0 !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.ms-auto { margin-left: auto !important; }

.me-0 { margin-right: 0 !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.me-auto { margin-right: auto !important; }

.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* ==========================================
   SPACING - PADDING
   ========================================== */

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

.pt-0 { padding-top: 0 !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pb-3 { padding-bottom: 1rem !important; }

.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }

.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }

/* ==========================================
   WIDTH & HEIGHT
   ========================================== */

.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }

.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }

.mw-100 { max-width: 100% !important; }
.mh-100 { max-height: 100% !important; }

/* ==========================================
   POSITION
   ========================================== */

.position-static { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

.top-0 { top: 0 !important; }
.bottom-0 { bottom: 0 !important; }
.start-0 { left: 0 !important; }
.end-0 { right: 0 !important; }

/* ==========================================
   BORDERS
   ========================================== */

.border { border: 1px solid var(--border-color) !important; }
.border-0 { border: 0 !important; }
.border-top { border-top: 1px solid var(--border-color) !important; }
.border-bottom { border-bottom: 1px solid var(--border-color) !important; }

.rounded { border-radius: var(--border-radius) !important; }
.rounded-lg { border-radius: var(--border-radius-lg) !important; }
.rounded-circle { border-radius: 50% !important; }
.rounded-0 { border-radius: 0 !important; }

/* ==========================================
   SHADOWS
   ========================================== */

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-none { box-shadow: none !important; }

/* ==========================================
   OVERFLOW
   ========================================== */

.overflow-auto { overflow: auto !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-visible { overflow: visible !important; }
.overflow-scroll { overflow: scroll !important; }
.overflow-x-auto { overflow-x: auto !important; }
.overflow-y-auto { overflow-y: auto !important; }

/* ==========================================
   VISIBILITY & OPACITY
   ========================================== */

.visible { visibility: visible !important; }
.invisible { visibility: hidden !important; }

.opacity-0 { opacity: 0 !important; }
.opacity-25 { opacity: 0.25 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }

/* ==========================================
   CURSORS
   ========================================== */

.cursor-pointer { cursor: pointer !important; }
.cursor-default { cursor: default !important; }
.cursor-not-allowed { cursor: not-allowed !important; }
.cursor-wait { cursor: wait !important; }
.cursor-help { cursor: help !important; }
.cursor-grab { cursor: grab !important; }

/* ==========================================
   USER SELECT
   ========================================== */

.user-select-none { user-select: none !important; }
.user-select-all { user-select: all !important; }

/* ==========================================
   VERTICAL ALIGN
   ========================================== */

.align-middle { vertical-align: middle !important; }
.align-top { vertical-align: top !important; }
.align-bottom { vertical-align: bottom !important; }

/* ==========================================
   RESPONSIVE TABLE WRAPPER
   ========================================== */

.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================
   SCREEN READER ONLY
   ========================================== */

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ==========================================
   HEADER MESSAGING ICONS - Design Moderne
   ========================================== */

.header-messaging-icons {
    margin-right: 0.75rem;
}

/* Icônes header modernes - emojis */
.header-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    text-decoration: none;
    border: none !important;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none !important;
    box-shadow: none !important;
}

.header-icon-link:hover {
    background: rgba(0, 0, 0, 0.05);
}

.header-icon-link:focus,
.header-icon-link:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Emoji dans le header */
.header-emoji {
    font-size: 1.1rem;
    line-height: 1;
}

.header-icon-link .header-emoji {
    font-size: 1.2rem;
}

.header-icon-link:hover .header-emoji {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Badge notification (messages non lus) */
.header-notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    background-color: #dc3545;
    color: white;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Badge compteur inline (membres/clients) */
.header-count-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 22px;
    text-align: center;
    border-radius: 11px;
    background: #e9ecef;
    color: #6c757d;
    transition: all 0.3s ease;
}

/* Membres connectés : badge coloré */
.header-icon-members.has-online .header-count-badge {
    background: #0d6efd;
    color: white;
}

/* Clients connectés : badge coloré */
.header-icon-customers.has-online .header-count-badge,
.header-count-customers.has-online {
    background: #fd7e14;
    color: white;
}

/* Dropdown list */
.header-dropdown-list {
    min-width: 280px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.header-dropdown-list .dropdown-header {
    font-weight: 600;
    color: #495057;
    background: #f8f9fa;
    padding: 0.6rem 1rem;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-dropdown-list .dropdown-divider {
    margin: 0;
}

/* User item dans dropdown */
.header-online-user {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s;
}

.header-online-user:hover {
    background-color: #f0f7ff;
}

.online-dot-small {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #28a745;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.online-dot-customer {
    background-color: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

.header-online-user .user-name {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.header-online-user .btn-start-conv {
    opacity: 0;
    transition: opacity 0.15s;
    font-size: 12px;
    padding: 2px 8px;
}

.header-online-user:hover .btn-start-conv {
    opacity: 1;
}

/* Message "aucun membre" */
.header-no-users {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    font-size: 13px;
}

/* ========================================
   INDICATEURS D'OBJECTIFS COUVOIR (Stats Parcs)
   ======================================== */

/* Style de base pour les indicateurs d'objectifs */
.objective-indicator {
    font-size: 0.75rem;
    padding: 1px 4px;
    border-radius: 3px;
    white-space: nowrap;
}

.objective-indicator-footer {
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Statut: Objectif atteint (>= 100%) */
.objective-reached,
.objective-indicator.objective-reached {
    background-color: #d4edda;
    color: #155724;
}

/* Statut: Objectif proche (80-99%) */
.objective-close,
.objective-indicator.objective-close {
    background-color: #fff3cd;
    color: #856404;
}

/* Statut: Objectif loin (< 80%) */
.objective-far,
.objective-indicator.objective-far {
    background-color: #f8d7da;
    color: #721c24;
}

/* Footer objectifs */
.objective-indicator-footer.objective-reached {
    background-color: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.objective-indicator-footer.objective-close {
    background-color: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.objective-indicator-footer.objective-far {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

/* Cellules avec objectifs critiques */
.stats-parcs-cell-critical {
    background-color: #ffebee !important;
}

/* Sticky col dans tfoot */
#table-stats-parcs tfoot .sticky-col {
    position: sticky;
    left: 0;
    background: #212529;
    z-index: 2;
}

#table-stats-parcs tfoot tr.table-secondary .sticky-col {
    background: #e9ecef;
}
/**
 * ============================================
 * BUTTONS - Elsanor Intranet S8
 * Styles pour tous les boutons
 * ============================================
 */

/* ==========================================
   BOUTON DE BASE
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    background-color: transparent;
    transition: color var(--transition-fast),
                background-color var(--transition-fast),
                border-color var(--transition-fast),
                box-shadow var(--transition-fast);
}

.btn:hover {
    text-decoration: none;
}

.btn:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================
   TAILLES
   ========================================== */

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
    border-radius: var(--border-radius-lg);
}

.btn-xs {
    padding: 0.15rem 0.35rem;
    font-size: 0.75rem;
}

/* ==========================================
   VARIANTES PLEINES
   ========================================== */

.btn-primary {
    color: #fff;
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-primary:hover:not(:disabled) {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268;
    border-color: #5a6268;
}

.btn-success {
    color: #fff;
    background-color: var(--color-success);
    border-color: var(--color-success);
}

.btn-success:hover:not(:disabled) {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-danger {
    color: #fff;
    background-color: var(--color-danger);
    border-color: var(--color-danger);
}

.btn-danger:hover:not(:disabled) {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-warning {
    color: #212529;
    background-color: var(--color-warning);
    border-color: var(--color-warning);
}

.btn-warning:hover:not(:disabled) {
    background-color: #e0a800;
    border-color: #d39e00;
}

.btn-info {
    color: #fff;
    background-color: var(--color-info);
    border-color: var(--color-info);
}

.btn-info:hover:not(:disabled) {
    background-color: #138496;
    border-color: #117a8b;
}

.btn-dark {
    color: #fff;
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-dark:hover:not(:disabled) {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
}

.btn-light {
    color: #212529;
    background-color: #f8f9fa;
    border-color: #f8f9fa;
}

.btn-light:hover:not(:disabled) {
    background-color: #e2e6ea;
    border-color: #dae0e5;
}

/* ==========================================
   VARIANTES OUTLINE
   ========================================== */

.btn-outline-primary {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-outline-primary:hover:not(:disabled) {
    color: #fff;
    background-color: var(--color-accent);
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-secondary:hover:not(:disabled) {
    color: #fff;
    background-color: #6c757d;
}

.btn-outline-success {
    color: var(--color-success);
    border-color: var(--color-success);
}

.btn-outline-success:hover:not(:disabled) {
    color: #fff;
    background-color: var(--color-success);
}

.btn-outline-danger {
    color: var(--color-danger);
    border-color: var(--color-danger);
}

.btn-outline-danger:hover:not(:disabled) {
    color: #fff;
    background-color: var(--color-danger);
}

.btn-outline-warning {
    color: var(--color-warning);
    border-color: var(--color-warning);
}

.btn-outline-warning:hover:not(:disabled) {
    color: #212529;
    background-color: var(--color-warning);
}

/* ==========================================
   BOUTON LIEN
   ========================================== */

.btn-link {
    font-weight: 400;
    color: var(--color-accent);
    text-decoration: none;
    border: none;
    background: none;
    padding: 0;
}

.btn-link:hover:not(:disabled) {
    color: #2980b9;
    text-decoration: underline;
}

/* ==========================================
   BOUTONS SPÉCIAUX
   ========================================== */

/* Bouton d'action (tableaux) */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border-radius: var(--border-radius);
}

/* Bouton icône seul */
.btn-icon {
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
}

.btn-icon.btn-sm {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
}

.btn-icon.btn-lg {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
}

/* Bouton rond */
.btn-circle {
    border-radius: 50%;
}

/* Bouton supprimer désactivé */
.btn-delete-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Bouton historique d'audit */
.btn-audit-history {
    background-color: #6c757d;
    color: white;
    border: none;
}

.btn-audit-history:hover {
    background-color: #5a6268;
    color: white;
}

/* ==========================================
   GROUPE DE BOUTONS
   ========================================== */

.btn-group {
    display: inline-flex;
}

.btn-group > .btn:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-group > .btn:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
}

.btn-group-sm > .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* ==========================================
   BOUTON PLEINE LARGEUR
   ========================================== */

.btn-block {
    display: block;
    width: 100%;
}

/* ==========================================
   BOUTON CLOSE (fermeture)
   ========================================== */

.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em;
    color: #000;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: var(--border-radius);
    opacity: 0.5;
    cursor: pointer;
}

.btn-close:hover {
    opacity: 0.75;
}

.btn-close:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25);
    opacity: 1;
}
/**
 * ============================================
 * FORMS - Elsanor Intranet S8
 * Styles pour les formulaires
 * Inclut le feedback visuel des champs AJAX
 * ============================================
 */

/* ==========================================
   CHAMPS DE BASE
   ========================================== */

.form-control,
.form-select {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-dark);
    background-color: var(--bg-white);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
    appearance: none;
}

.form-control:focus,
.form-select:focus {
    color: var(--text-dark);
    background-color: var(--bg-white);
    border-color: var(--color-accent);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

.form-control:disabled,
.form-select:disabled {
    background-color: #e9ecef;
    opacity: 1;
    cursor: not-allowed;
}

/* ==========================================
   TAILLES
   ========================================== */

.form-control-sm,
.form-select-sm {
    min-height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius);
}

.form-control-lg,
.form-select-lg {
    min-height: calc(1.5em + 1rem + 2px);
    padding: 0.5rem 1rem;
    font-size: 1.125rem;
    border-radius: var(--border-radius-lg);
}

/* ==========================================
   SELECT
   ========================================== */

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.25rem;
}

/* ==========================================
   TEXTAREA
   ========================================== */

textarea.form-control {
    min-height: calc(1.5em + 0.75rem + 2px);
    resize: vertical;
}

/* ==========================================
   LABELS
   ========================================== */

.form-label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-label.required::after {
    content: " *";
    color: var(--color-danger);
}

/* ==========================================
   CHECKBOX & RADIO
   ========================================== */

.form-check {
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5em;
    margin-bottom: 0.125rem;
}

.form-check-input {
    float: left;
    width: 1em;
    height: 1em;
    margin-top: 0.25em;
    margin-left: -1.5em;
    vertical-align: top;
    background-color: var(--bg-white);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid rgba(0, 0, 0, 0.25);
    appearance: none;
    cursor: pointer;
    transition: background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.form-check-input[type="checkbox"] {
    border-radius: 0.25em;
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-input:checked {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

.form-check-input:checked[type="checkbox"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.form-check-input:checked[type="radio"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

.form-check-input:focus {
    border-color: var(--color-accent);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-check-label {
    cursor: pointer;
}

/* ==========================================
   SWITCH (Toggle)
   ========================================== */

.form-switch {
    padding-left: 2.5em;
}

.form-switch .form-check-input {
    width: 2em;
    margin-left: -2.5em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");
    background-position: left center;
    border-radius: 2em;
    transition: background-position 0.15s ease-in-out;
}

.form-switch .form-check-input:checked {
    background-position: right center;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

/* Switch inline */
.form-check.form-switch.d-inline-block {
    padding-left: 2.5em;
    margin-bottom: 0;
}

/* ==========================================
   INPUT GROUP
   ========================================== */

.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group > .form-control,
.input-group > .form-select {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.input-group > .form-control:not(:last-child),
.input-group > .form-select:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group > .form-control:not(:first-child),
.input-group > .form-select:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-dark);
    text-align: center;
    white-space: nowrap;
    background-color: #e9ecef;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

/* ==========================================
   VALIDATION STATES
   ========================================== */

.is-valid {
    border-color: var(--color-success) !important;
}

.is-valid:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.is-invalid {
    border-color: var(--color-danger) !important;
}

.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.valid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: var(--color-success);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: var(--color-danger);
}

.was-validated .form-control:valid ~ .valid-feedback,
.was-validated .form-control:invalid ~ .invalid-feedback,
.form-control.is-valid ~ .valid-feedback,
.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

/* ==========================================
   FEEDBACK VISUEL AJAX
   États des champs lors des requêtes AJAX
   - Loading: bordure orange
   - Success: bordure verte (10s puis normal)
   - Error: bordure rouge (reste jusqu'à succès)
   ========================================== */

/* Loading - En cours d'envoi */
.field-loading,
.form-control.field-loading,
.form-select.field-loading,
textarea.field-loading {
    border: 2px solid var(--feedback-loading-border) !important;
    background-color: var(--feedback-loading-bg) !important;
}

/* Row loading - Ligne entière en cours de traitement */
tr.row-loading {
    background-color: var(--feedback-loading-bg) !important;
    opacity: 0.7;
    pointer-events: none;
}

tr.row-loading td {
    position: relative;
}

/* Success - Enregistré */
.field-success,
.form-control.field-success,
.form-select.field-success,
textarea.field-success {
    border: 2px solid var(--feedback-success-border) !important;
    background-color: var(--feedback-success-bg) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem 1rem;
    padding-right: 2.5rem;
}

/* Error - Erreur */
.field-error,
.form-control.field-error,
.form-select.field-error,
textarea.field-error {
    border: 2px solid var(--feedback-error-border) !important;
    background-color: var(--feedback-error-bg) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem 1rem;
    padding-right: 2.5rem;
}

/* Classes alternatives (compatibilité) */
.form-control.saving,
.form-select.saving {
    border-color: var(--feedback-loading-border) !important;
    background-color: var(--feedback-loading-bg) !important;
}

.form-control.saved,
.form-select.saved {
    border-color: var(--feedback-success-border) !important;
    background-color: var(--feedback-success-bg) !important;
    animation: flash-success 0.5s ease;
}

.form-control.error,
.form-select.error {
    border-color: var(--feedback-error-border) !important;
    background-color: var(--feedback-error-bg) !important;
}

/* Message d'erreur sous le champ */
.field-error-message {
    color: var(--color-danger);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Wrapper avec erreur */
.field-wrapper.has-error .form-control,
.field-wrapper.has-error .form-select {
    border-color: var(--color-danger);
}

/* ==========================================
   FEEDBACK TOGGLE (Switch)
   ========================================== */

.form-check-input.field-loading {
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.5) !important;
}

.form-check-input.field-success {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.5) !important;
}

.form-check-input.field-error {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.5) !important;
}

/* Feedback pour les spans cliquables (entity-name-display) */
span.field-loading {
    background-color: var(--feedback-loading-bg) !important;
    border-radius: 4px;
    padding: 2px 6px;
    margin: -2px -6px;
}

span.field-success {
    background-color: var(--feedback-success-bg) !important;
    border-radius: 4px;
    padding: 2px 6px;
    margin: -2px -6px;
    transition: background-color 0.3s ease;
}

span.field-error {
    background-color: var(--feedback-error-bg) !important;
    border-radius: 4px;
    padding: 2px 6px;
    margin: -2px -6px;
}

/* ==========================================
   CHAMPS DANS LES TABLEAUX
   Style transparent par défaut
   ========================================== */

.table-admin .form-control,
.table-admin .form-select {
    border-color: transparent;
    background-color: transparent;
}

.table-admin .form-control:hover,
.table-admin .form-select:hover {
    border-color: var(--border-color);
    background-color: var(--bg-white);
}

.table-admin .form-control:focus,
.table-admin .form-select:focus {
    border-color: var(--color-accent);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
}

/* ==========================================
   ROW HIGHLIGHT
   Lignes de tableau modifiées
   ========================================== */

tr.row-modified {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

tr.row-saving {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

tr.row-saved {
    background-color: rgba(25, 135, 84, 0.1) !important;
    transition: background-color 2s ease-out;
}

/* ==========================================
   VALEUR CACHÉE POUR TRI
   ========================================== */

.sort-value {
    display: none;
}
/**
 * ============================================
 * TABLES - Elsanor Intranet S8
 * Styles pour les tableaux et DataTables
 * ============================================
 */

/* ==========================================
   TABLE DE BASE
   ========================================== */

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-dark);
    vertical-align: top;
    border-color: var(--border-color);
}

.table > :not(caption) > * > * {
    padding: 0.5rem;
    border-bottom-width: 1px;
}

.table > tbody {
    vertical-align: inherit;
}

.table > thead {
    vertical-align: bottom;
}

/* ==========================================
   TABLE ADMIN (PRINCIPALE)
   ========================================== */

.table-admin {
    width: 100%;
    margin-bottom: 0;
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border-collapse: collapse;
}

.table-admin thead {
    background: var(--bg-light);
    color: var(--text-dark);
}

.table-admin thead th {
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: left;
    white-space: nowrap;
    vertical-align: middle;
    border: none;
    border-bottom: 2px solid var(--border-color);
    background-color: transparent !important;
}

/* Coins arrondis pour le header */
.table-admin thead tr:first-child th:first-child {
    border-top-left-radius: var(--border-radius-lg);
}

.table-admin thead tr:first-child th:last-child {
    border-top-right-radius: var(--border-radius-lg);
}

.table-admin tbody td {
    padding: 0.5rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
}

.table-admin tbody tr:hover {
    background-color: #f8f9fa;
}

.table-admin tbody tr:last-child td {
    border-bottom: none;
}

/* Coins arrondis pour le dernier row */
.table-admin tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--border-radius-lg);
}

.table-admin tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--border-radius-lg);
}

/* ==========================================
   VARIANTES DE TABLE
   ========================================== */

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover > tbody > tr:hover > * {
    background-color: rgba(0, 0, 0, 0.04);
}

.table-bordered > :not(caption) > * {
    border-width: 1px 0;
}

.table-bordered > :not(caption) > * > * {
    border-width: 0 1px;
}

.table-sm > :not(caption) > * > * {
    padding: 0.25rem;
}

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

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 992px) {
    .table-admin {
        min-width: 800px;
    }
}

/* ==========================================
   DATATABLES - COLONNES TRIABLES
   ========================================== */

table.dataTable thead > tr > th.sorting,
table.dataTable thead > tr > th.sorting_asc,
table.dataTable thead > tr > th.sorting_desc {
    position: relative !important;
    cursor: pointer !important;
    padding-right: 26px !important;
}

/* ==========================================
   COLONNES NON TRIABLES
   ========================================== */

table.dataTable thead > tr > th.no-sort,
table.dataTable thead > tr > th.sorting_disabled {
    cursor: default !important;
    padding-right: 1rem !important;
}

/* ==========================================
   MASQUER LES PSEUDO-ELEMENTS DATATABLES
   On utilise des fleches HTML injectees par JS
   ========================================== */

table.dataTable thead > tr > th.sorting:before,
table.dataTable thead > tr > th.sorting:after,
table.dataTable thead > tr > th.sorting_asc:before,
table.dataTable thead > tr > th.sorting_asc:after,
table.dataTable thead > tr > th.sorting_desc:before,
table.dataTable thead > tr > th.sorting_desc:after {
    display: none !important;
    content: none !important;
}

/* ==========================================
   DATATABLES CUSTOMIZATION
   ========================================== */

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.dataTables_wrapper .dataTables_length select {
    padding: 0.25rem 2rem 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 10px;
    appearance: none;
    min-width: 70px;
}

.dataTables_wrapper .dataTables_filter input {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-left: 0.5rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--color-accent);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.dataTables_wrapper .dataTables_info {
    padding-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    margin: 0 0.125rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-dark);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    font-weight: 500;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dataTables_wrapper .dataTables_empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* ==========================================
   COLONNES SPECIFIQUES
   ========================================== */

.table-admin .col-actions {
    width: 1%;
    white-space: nowrap;
    text-align: center;
}

.table-admin .col-checkbox {
    width: 40px;
    text-align: center;
}

.table-admin .col-id {
    width: 60px;
    text-align: center;
}

.table-admin .col-status {
    width: 80px;
    text-align: center;
}

/* ==========================================
   CELL ALIGNMENT
   ========================================== */

.table-admin td.text-center,
.table-admin th.text-center {
    text-align: center;
}

.table-admin td.text-right,
.table-admin th.text-right {
    text-align: right;
}

/* ==========================================
   EMPTY STATE
   ========================================== */

.table-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.table-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.table-empty p {
    margin: 0;
    font-size: 1.1rem;
}

/* =============================================
   TRANSLATABLE LABELS
   ============================================= */
.translatable-label {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed #6c757d;
    transition: all 0.2s ease;
}

.translatable-label:hover {
    color: var(--bs-primary);
    border-bottom-color: var(--bs-primary);
    text-decoration: none;
}

.translatable-label .fa-language {
    opacity: 0.7;
}

.translatable-label:hover .fa-language {
    opacity: 1;
}

/* =============================================
   HIGHLIGHT ROW (pour scroll depuis ancre)
   ============================================= */
.highlight-row {
    animation: highlightFade 3s ease-out;
}

@keyframes highlightFade {
    0% {
        background-color: rgba(var(--bs-primary-rgb), 0.3);
    }
    100% {
        background-color: transparent;
    }
}

/* ==========================================
   COLUMN WIDTH UTILITIES
   Remplace les style="width: Xpx" inline
   ========================================== */

.col-w-40 { width: 40px; }
.col-w-50 { width: 50px; }
.col-w-60 { width: 60px; }
.col-w-70 { width: 70px; }
.col-w-80 { width: 80px; }
.col-w-100 { width: 100px; }
.col-w-120 { width: 120px; }
.col-w-140 { width: 140px; }
.col-w-150 { width: 150px; }
.col-w-200 { width: 200px; }
.col-w-250 { width: 250px; min-width: 250px; }
.col-w-300 { width: 300px; }
.col-w-350 { width: 350px; }

/* Min-width variants */
.col-min-w-200 { min-width: 200px; }
.col-min-w-250 { min-width: 250px; }
.col-min-w-300 { min-width: 300px; }

/* Max-height utilities for scrollable containers */
.max-h-250 { max-height: 250px; overflow-y: auto; }
.max-h-300 { max-height: 300px; overflow-y: auto; }
.max-h-400 { max-height: 400px; overflow-y: auto; }
/**
 * ============================================
 * CARDS - Elsanor Intranet S8
 * Styles pour les cartes
 * ============================================
 */

/* ==========================================
   CARD DE BASE
   ========================================== */

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--bg-white);
    background-clip: border-box;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 0.75rem 1rem;
    margin-bottom: 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.card-header:first-child {
    border-radius: calc(var(--border-radius-lg) - 1px) calc(var(--border-radius-lg) - 1px) 0 0;
}

.card-body {
    flex: 1 1 auto;
    padding: 1rem;
}

.card-footer {
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid var(--border-color);
}

.card-footer:last-child {
    border-radius: 0 0 calc(var(--border-radius-lg) - 1px) calc(var(--border-radius-lg) - 1px);
}

.card-title {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.card-subtitle {
    margin-top: -0.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.card-text:last-child {
    margin-bottom: 0;
}

/* ==========================================
   CARD D'AJOUT (Formulaire nouveau)
   ========================================== */

.card-add-new {
    border: 2px dashed var(--color-warning);
    border-left-width: 4px;
    border-left-style: solid;
    background-color: #fffdf5;
}

.card-add-new .card-header {
    background-color: #fff8e1;
    border-bottom-color: var(--color-warning);
    color: #856404;
}

.card-add-new .card-body {
    padding: 1.25rem;
}

/* ==========================================
   STATS CARDS
   ========================================== */

.stats-card {
    text-align: center;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    background: var(--bg-white);
}

.stats-card .stats-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    border-radius: 50%;
    font-size: 1.5rem;
}

.stats-card .stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stats-card .stats-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Stats card colors */
.stats-card.stats-primary .stats-icon {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--color-accent);
}

.stats-card.stats-success .stats-icon {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--color-success);
}

.stats-card.stats-warning .stats-icon {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--color-warning);
}

.stats-card.stats-danger .stats-icon {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--color-danger);
}

/* ==========================================
   CARD COULEURS
   ========================================== */

.card-primary {
    border-color: var(--color-accent);
}

.card-primary .card-header {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

.card-success {
    border-color: var(--color-success);
}

.card-success .card-header {
    background-color: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.card-danger {
    border-color: var(--color-danger);
}

.card-danger .card-header {
    background-color: var(--color-danger);
    border-color: var(--color-danger);
    color: white;
}

.card-warning {
    border-color: var(--color-warning);
}

.card-warning .card-header {
    background-color: var(--color-warning);
    border-color: var(--color-warning);
    color: #212529;
}

/* ==========================================
   CARD HOVER
   ========================================== */

.card-hover {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

/* ==========================================
   CARD CLICKABLE
   ========================================== */

.card-clickable {
    cursor: pointer;
    transition: all var(--transition-fast);
}

.card-clickable:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

/* ==========================================
   SECTION TITLE (dans cards/pages)
   ========================================== */

.section-title {
    font-size: 1rem;
    color: #495057;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.section-title:first-child {
    margin-top: 0;
}
/**
 * ============================================
 * MODALS - Elsanor Intranet S8
 * Styles pour les fenêtres modales
 * ============================================
 */

/* ==========================================
   MODAL OVERLAY (Backdrop)
   ========================================== */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-modal-backdrop);
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-backdrop.fade {
    opacity: 0;
}

.modal-backdrop.show {
    opacity: 1;
}

/* ==========================================
   MODAL CONTAINER
   ========================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-modal);
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal.show {
    display: block;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    pointer-events: none;
    max-width: 500px;
}

.modal.fade .modal-dialog {
    transform: translateY(-50px);
    transition: transform var(--transition-normal);
}

.modal.show .modal-dialog {
    transform: none;
}

/* ==========================================
   MODAL CONTENT
   ========================================== */

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: var(--bg-white);
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    outline: 0;
}

.modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    border-top-left-radius: calc(var(--border-radius-xl) - 1px);
    border-top-right-radius: calc(var(--border-radius-xl) - 1px);
}

.modal-header .btn-close {
    padding: 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
}

.modal-title {
    margin-bottom: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-title i {
    font-size: 1.5rem;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1.25rem;
}

.modal-body p {
    margin: 0;
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem 1.25rem;
    background-color: #f8f9fa;
    border-top: 1px solid var(--border-color);
    border-bottom-right-radius: calc(var(--border-radius-xl) - 1px);
    border-bottom-left-radius: calc(var(--border-radius-xl) - 1px);
    gap: 0.5rem;
}

/* ==========================================
   MODAL SIZES
   ========================================== */

.modal-sm {
    max-width: 300px;
}

.modal-lg {
    max-width: 800px;
}

.modal-xl {
    max-width: 1140px;
}

.modal-fullscreen {
    width: 100vw;
    max-width: none;
    height: 100%;
    margin: 0;
}

.modal-fullscreen .modal-content {
    height: 100%;
    border: 0;
    border-radius: 0;
}

/* ==========================================
   MODAL SCROLLABLE
   ========================================== */

.modal-dialog-scrollable {
    height: calc(100% - 3.5rem);
}

.modal-dialog-scrollable .modal-content {
    max-height: 100%;
    overflow: hidden;
}

.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
}

/* ==========================================
   MODAL CENTERED
   ========================================== */

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

/* ==========================================
   ADMIN MODAL (Custom Style)
   ========================================== */

.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    transition: background-color var(--transition-normal);
}

.admin-modal-overlay.show {
    background-color: rgba(0, 0, 0, 0.5);
}

.admin-modal {
    background: var(--bg-white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    min-width: 400px;
    max-width: 500px;
    transform: scale(0.8);
    opacity: 0;
    transition: all var(--transition-normal);
}

.admin-modal-overlay.show .admin-modal {
    transform: scale(1);
    opacity: 1;
}

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

.admin-modal-header i {
    font-size: 1.5rem;
    color: var(--color-danger);
}

.admin-modal-header h4 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.admin-modal-body {
    padding: 1.5rem 1.25rem;
}

.admin-modal-body p {
    margin: 0;
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
}

.admin-modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ==========================================
   MODAL SECTIONS
   ========================================== */

.modal-body h6.text-muted {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.modal-body .card.bg-light .card-body {
    padding: 0.75rem;
}
/**
 * ============================================
 * NOTIFICATIONS - Elsanor Intranet S8
 * Styles pour les toasts et notifications
 * ============================================
 */

/* ==========================================
   NOTIFICATION CONTAINER
   ========================================== */

.notifications-container {
    position: fixed;
    top: calc(var(--header-height) + 1rem);
    right: 1.25rem;
    z-index: var(--z-notification);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
    pointer-events: none;
}

.notifications-container > * {
    pointer-events: auto;
}

/* Ajustement si impersonation active */
body.is-impersonating .notifications-container {
    top: calc(var(--header-height) + var(--impersonation-banner-height) + 1rem);
}

/* ==========================================
   NOTIFICATION (TOAST)
   ========================================== */

.admin-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 450px;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease-out;
}

.admin-notification.hiding {
    animation: slideOutRight 0.3s ease-out forwards;
}

.admin-notification i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

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

.admin-notification .notification-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.admin-notification .notification-message {
    font-size: 0.9rem;
    line-height: 1.4;
}

.admin-notification .close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.admin-notification .close-btn:hover {
    opacity: 1;
}

/* ==========================================
   VARIANTES DE NOTIFICATION
   ========================================== */

.admin-notification.success {
    background-color: #d4edda;
    border-left: 4px solid var(--color-success);
    color: #155724;
}

.admin-notification.success i {
    color: var(--color-success);
}

.admin-notification.error {
    background-color: #f8d7da;
    border-left: 4px solid var(--color-danger);
    color: #721c24;
}

.admin-notification.error i {
    color: var(--color-danger);
}

.admin-notification.warning {
    background-color: #fff3cd;
    border-left: 4px solid var(--color-warning);
    color: #856404;
}

.admin-notification.warning i {
    color: #856404;
}

.admin-notification.info {
    background-color: #d1ecf1;
    border-left: 4px solid var(--color-info);
    color: #0c5460;
}

.admin-notification.info i {
    color: var(--color-info);
}

/* ==========================================
   ALERTS (Inline)
   ========================================== */

.alert {
    position: relative;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
}

.alert-heading {
    color: inherit;
    font-weight: 600;
}

.alert-link {
    font-weight: 600;
}

.alert-dismissible {
    padding-right: 3rem;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 1.25rem 1rem;
}

/* Alert Variants */
.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-success .alert-link {
    color: #0b2e13;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-danger .alert-link {
    color: #491217;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-warning .alert-link {
    color: #533f03;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-info .alert-link {
    color: #062c33;
}

.alert-light {
    color: #636464;
    background-color: #fefefe;
    border-color: #fdfdfe;
}

.alert-dark {
    color: #141619;
    background-color: #d3d3d4;
    border-color: #bcbebf;
}

/* Small alert */
.alert-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Alert container */
.alerts-container .alert {
    margin-bottom: 0.5rem;
}

.alerts-container .alert:last-child {
    margin-bottom: 0;
}
/**
 * ============================================
 * LOADERS - Elsanor Intranet S8
 * Indicateurs de chargement
 * ============================================
 */

/* ==========================================
   LOADER OVERLAY (Plein écran)
   ========================================== */

.admin-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-notification);
}

.admin-loader-content {
    background: var(--bg-white);
    padding: 2rem 3rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.admin-loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.admin-loader-content p {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.1rem;
}

/* ==========================================
   MINI LOADER (Header/Inline)
   ========================================== */

.admin-mini-loader {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    margin-right: 1rem;
    background: var(--color-accent, #0d6efd);
    border-radius: var(--border-radius);
}

.admin-mini-loader.show {
    display: inline-flex;
}

.admin-mini-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.admin-mini-loader .mini-loader-text {
    color: #fff;
    font-size: 0.85rem;
}

/* ==========================================
   SPINNER SIMPLE
   ========================================== */

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.spinner-sm {
    width: 0.75rem;
    height: 0.75rem;
    border-width: 1.5px;
}

.spinner-lg {
    width: 2rem;
    height: 2rem;
    border-width: 3px;
}

/* Spinner colors */
.spinner-primary {
    color: var(--color-accent);
}

.spinner-white {
    color: white;
}

.spinner-dark {
    color: var(--text-dark);
}

/* ==========================================
   SPINNER BORDER (Bootstrap compatible)
   ========================================== */

.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: -0.125em;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* ==========================================
   DOTS LOADER
   ========================================== */

.loader-dots {
    display: inline-flex;
    gap: 0.25rem;
}

.loader-dots span {
    width: 8px;
    height: 8px;
    background-color: var(--color-accent);
    border-radius: 50%;
    animation: dotPulse 1.4s infinite ease-in-out;
}

.loader-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==========================================
   SKELETON LOADER
   ========================================== */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--border-radius);
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-text:last-child {
    width: 80%;
}

.skeleton-circle {
    border-radius: 50%;
}

.skeleton-rect {
    border-radius: var(--border-radius);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==========================================
   LOADING STATE POUR BOUTONS
   ========================================== */

.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    margin-left: -0.5rem;
    margin-top: -0.5rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

/* Restore color for the spinner */
.btn-primary.loading::after,
.btn-success.loading::after,
.btn-danger.loading::after,
.btn-info.loading::after {
    border-color: white;
    border-right-color: transparent;
}

/* ==========================================
   PROGRESS BAR
   ========================================== */

.progress {
    display: flex;
    height: 1rem;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: #e9ecef;
    border-radius: var(--border-radius);
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: white;
    text-align: center;
    white-space: nowrap;
    background-color: var(--color-accent);
    transition: width 0.6s ease;
}

.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position-x: 1rem;
    }
}
/**
 * ============================================
 * BADGES - Elsanor Intranet S8
 * Styles pour les badges et labels
 * ============================================
 */

/* ==========================================
   BADGE DE BASE
   ========================================== */

.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--border-radius);
}

.badge:empty {
    display: none;
}

/* ==========================================
   BADGE COULEURS
   ========================================== */

.badge.bg-primary,
.badge-primary {
    background-color: var(--color-accent) !important;
    color: #fff !important;
}

.badge.bg-secondary,
.badge-secondary {
    background-color: #6c757d !important;
    color: #fff !important;
}

.badge.bg-success,
.badge-success {
    background-color: var(--color-success) !important;
    color: #fff !important;
}

.badge.bg-danger,
.badge-danger {
    background-color: var(--color-danger) !important;
    color: #fff !important;
}

.badge.bg-warning,
.badge-warning {
    background-color: var(--color-warning) !important;
    color: #212529 !important;
}

.badge.bg-info,
.badge-info {
    background-color: var(--color-info) !important;
    color: #fff !important;
}

.badge.bg-light,
.badge-light {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

.badge.bg-dark,
.badge-dark {
    background-color: var(--color-primary) !important;
    color: #fff !important;
}

.badge.bg-orange,
.badge-orange {
    background-color: var(--color-orange) !important;
    color: #fff !important;
}

/* ==========================================
   BADGE PILL (Arrondi)
   ========================================== */

.badge-pill,
.rounded-pill {
    padding-right: 0.75em;
    padding-left: 0.75em;
    border-radius: 50rem;
}

/* ==========================================
   BADGE TAILLES
   ========================================== */

.badge-sm {
    padding: 0.25em 0.5em;
    font-size: 0.65em;
}

.badge-lg {
    padding: 0.5em 0.85em;
    font-size: 0.85em;
}

/* ==========================================
   BADGE OUTLINE
   ========================================== */

.badge-outline-primary {
    background-color: transparent;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
}

.badge-outline-success {
    background-color: transparent;
    border: 1px solid var(--color-success);
    color: var(--color-success);
}

.badge-outline-danger {
    background-color: transparent;
    border: 1px solid var(--color-danger);
    color: var(--color-danger);
}

.badge-outline-warning {
    background-color: transparent;
    border: 1px solid var(--color-warning);
    color: #856404;
}

.badge-outline-info {
    background-color: transparent;
    border: 1px solid var(--color-info);
    color: var(--color-info);
}

.badge-outline-secondary {
    background-color: transparent;
    border: 1px solid #6c757d;
    color: #6c757d;
}

/* ==========================================
   BADGE COMPTEUR (dans navigation)
   ========================================== */

.badge-counter {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    font-size: 0.65rem;
    line-height: 1.25rem;
    border-radius: 50rem;
}

/* ==========================================
   BADGE DOT (Indicateur simple)
   ========================================== */

.badge-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
    border-radius: 50%;
    vertical-align: middle;
}

.badge-dot.badge-success { background-color: var(--color-success); }
.badge-dot.badge-danger { background-color: var(--color-danger); }
.badge-dot.badge-warning { background-color: var(--color-warning); }
.badge-dot.badge-info { background-color: var(--color-info); }

/* Badge dot avec animation pulse */
.badge-dot.pulse {
    animation: pulse 2s infinite;
}

/* ==========================================
   STATUS BADGES
   ========================================== */

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

.status-badge::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
}

.status-badge.status-active {
    background-color: #d4edda;
    color: #155724;
}

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

.status-badge.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.status-badge.status-inactive::before {
    background-color: var(--color-danger);
}

.status-badge.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-badge.status-pending::before {
    background-color: var(--color-warning);
}
/**
 * ============================================
 * FLAGS - Elsanor Intranet S8
 * Styles pour les drapeaux de pays
 * ============================================
 */

/* ==========================================
   FLAG ICON (Base)
   ========================================== */

.flag-icon {
    display: inline-block;
    width: 1.33333em;
    height: 1em;
    font-size: 1.5em;
    line-height: 1;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    vertical-align: middle;
}

/* Tailles */
.flag-icon-sm {
    font-size: 1em;
}

.flag-icon-lg {
    font-size: 2em;
}

.flag-icon-xl {
    font-size: 3em;
}

/* ==========================================
   FLAG INVALIDE / PAR DÉFAUT
   ========================================== */

.flag-default,
.flag-invalid {
    background-color: #f8d7da;
    border: 2px solid var(--color-danger);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.flag-default::before,
.flag-invalid::before {
    content: "✕";
    font-size: 0.8em;
    font-weight: bold;
    color: var(--color-danger);
}

/* ==========================================
   FLAG PREVIEW (Formulaires)
   ========================================== */

.flag-preview {
    font-size: 2em;
    vertical-align: middle;
    transition: all var(--transition-fast);
}

.flag-preview.loading {
    opacity: 0.5;
}

/* ==========================================
   FLAG DANS SELECT2
   ========================================== */

.select2-results__option .flag-icon,
.select2-selection__rendered .flag-icon {
    margin-right: 0.5rem;
}

/* ==========================================
   FLAG AVEC TEXTE
   ========================================== */

.flag-with-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.flag-with-text .flag-icon {
    flex-shrink: 0;
}

/* ==========================================
   COUNTRY SELECT DISPLAY
   ========================================== */

.country-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.country-display .country-code {
    font-family: monospace;
    font-size: 0.875em;
    color: var(--text-muted);
}
/**
 * ============================================
 * AVATAR - Elsanor Intranet S8
 * Styles pour les avatars utilisateurs
 * ============================================
 */

/* ==========================================
   AVATAR DE BASE
   ========================================== */

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================
   TAILLES
   ========================================== */

.user-avatar-xs {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.625rem;
}

.user-avatar-sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
}

.user-avatar-lg {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.25rem;
}

.user-avatar-xl {
    width: 5rem;
    height: 5rem;
    font-size: 1.75rem;
}

.user-avatar-xxl {
    width: 6.25rem;
    height: 6.25rem;
    font-size: 2rem;
}

/* ==========================================
   VARIANTES DE COULEURS
   ========================================== */

.user-avatar-primary {
    background: var(--color-accent);
}

.user-avatar-success {
    background: var(--color-success);
}

.user-avatar-danger {
    background: var(--color-danger);
}

.user-avatar-warning {
    background: var(--color-warning);
    color: #212529;
}

.user-avatar-info {
    background: var(--color-info);
}

.user-avatar-dark {
    background: var(--color-primary);
}

.user-avatar-light {
    background: #e9ecef;
    color: var(--text-dark);
}

/* ==========================================
   AVATAR AVEC BORDURE
   ========================================== */

.user-avatar-bordered {
    border: 3px solid var(--bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* ==========================================
   AVATAR AVEC STATUS
   ========================================== */

.user-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.user-avatar-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    border: 2px solid var(--bg-white);
}

.user-avatar-status.online {
    background-color: var(--color-success);
}

.user-avatar-status.offline {
    background-color: #6c757d;
}

.user-avatar-status.away {
    background-color: var(--color-warning);
}

.user-avatar-status.busy {
    background-color: var(--color-danger);
}

/* ==========================================
   GROUPE D'AVATARS
   ========================================== */

.avatar-group {
    display: inline-flex;
    flex-direction: row-reverse;
}

.avatar-group .user-avatar {
    margin-left: -0.75rem;
    border: 2px solid var(--bg-white);
    transition: transform var(--transition-fast);
}

.avatar-group .user-avatar:last-child {
    margin-left: 0;
}

.avatar-group .user-avatar:hover {
    z-index: 1;
    transform: translateY(-2px);
}

/* Avatar "+X" pour overflow */
.avatar-group .avatar-more {
    background-color: #e9ecef;
    color: var(--text-dark);
    font-size: 0.7rem;
}

/* ==========================================
   MEMBER PHOTO (Page détail)
   ========================================== */

.member-photo-container {
    position: relative;
    width: 6.25rem;
    height: 6.25rem;
}

.member-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.member-photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Bouton changer photo */
.btn-change-photo {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bouton supprimer photo */
.btn-remove-photo {
    position: absolute;
    top: 0;
    right: 0;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}
/**
 * ============================================
 * SELECT2 - Elsanor Intranet S8
 * Customisation de Select2 Bootstrap 5
 * ============================================
 */

/* ==========================================
   SELECT2 DANS TABLES
   ========================================== */

.table-admin .select2-container {
    min-width: 120px;
}

.table-admin .select2-container--bootstrap-5 .select2-selection {
    min-height: 31px;
    padding: 0.15rem 0.5rem;
    font-size: 0.875rem;
    border-color: transparent;
    background-color: transparent;
}

.table-admin .select2-container--bootstrap-5 .select2-selection:hover {
    border-color: var(--border-color);
    background-color: var(--bg-white);
}

.table-admin .select2-container--bootstrap-5.select2-container--focus .select2-selection,
.table-admin .select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--color-accent);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
}

.table-admin .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    padding: 0;
    line-height: 1.5;
}

.table-admin .select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 29px;
}

/* ==========================================
   SELECT2 STANDARD
   ========================================== */

.select2-container--bootstrap-5 .select2-selection {
    font-size: 0.875rem;
    min-height: calc(1.5em + 0.75rem + 2px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* ==========================================
   DROPDOWN
   ========================================== */

.select2-container--bootstrap-5 .select2-dropdown {
    border-color: var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    z-index: 1060;
}

.select2-container--bootstrap-5 .select2-results__option {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected] {
    background-color: var(--color-accent);
    color: white;
}

.select2-container--bootstrap-5 .select2-results__option--selected {
    background-color: #e9ecef;
}

/* ==========================================
   SEARCH INPUT
   ========================================== */

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--color-accent);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* ==========================================
   PLACEHOLDER
   ========================================== */

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
    color: var(--text-muted);
}

/* ==========================================
   CLEAR BUTTON
   ========================================== */

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear {
    margin-right: 0.25rem;
    color: var(--text-muted);
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear:hover {
    color: var(--color-danger);
}

/* ==========================================
   LOADING STATE
   ========================================== */

.select2-container--bootstrap-5 .select2-results__option--loading {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* ==========================================
   NO RESULTS
   ========================================== */

.select2-container--bootstrap-5 .select2-results__message {
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
}

/* ==========================================
   MULTIPLE SELECT
   ========================================== */

.select2-container--bootstrap-5 .select2-selection--multiple {
    min-height: calc(1.5em + 0.75rem + 2px);
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background-color: var(--color-accent);
    border: none;
    color: white;
    border-radius: var(--border-radius);
    padding: 0.15rem 0.5rem;
    margin: 0.15rem;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    color: white;
    margin-right: 0.25rem;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.2);
}

/* ==========================================
   DISABLED STATE
   ========================================== */

.select2-container--bootstrap-5.select2-container--disabled .select2-selection {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* ==========================================
   COMPACT MODE
   ========================================== */

.select2-sm .select2-container--bootstrap-5 .select2-selection {
    min-height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* ==========================================
   FLAGS DANS SELECT2
   ========================================== */

.select2-results__option .fi,
.select2-selection__rendered .fi,
.select2-results__option .flag-icon,
.select2-selection__rendered .flag-icon {
    margin-right: 0.5rem;
    vertical-align: middle;
}
/**
 * ============================================
 * PHONE INPUT - Elsanor Intranet S8
 * Composant de saisie téléphone avec indicatif
 * ============================================
 */

/* ==========================================
   GROUPE INPUT TÉLÉPHONE
   ========================================== */

.phone-input-group {
    display: flex;
    gap: 0;
}

.phone-input-group .phone-country-select {
    width: auto;
    min-width: 95px;
    max-width: 110px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
    padding-right: 0.5rem;
    background-color: #f8f9fa;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.phone-input-group .phone-number-input {
    flex: 1;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.phone-input-group .phone-country-select:focus {
    z-index: 3;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.phone-input-group .phone-number-input:focus {
    z-index: 3;
}

/* ==========================================
   VERSION COMPACTE
   ========================================== */

.phone-input-group.phone-input-sm .phone-country-select,
.phone-input-group.phone-input-sm .phone-number-input {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.phone-input-group.phone-input-sm .phone-country-select {
    min-width: 80px;
    max-width: 95px;
}

/* ==========================================
   AFFICHAGE LECTURE SEULE
   ========================================== */

.phone-display {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.phone-display .phone-flag {
    font-size: 1.1em;
}

.phone-display .phone-code {
    color: var(--text-muted);
    font-size: 0.9em;
}

.phone-display .phone-number {
    font-family: monospace;
}

/* ==========================================
   PHONE DANS TABLE
   ========================================== */

.table-admin .phone-input-group .phone-country-select,
.table-admin .phone-input-group .phone-number-input {
    border-color: transparent;
    background-color: transparent;
}

.table-admin .phone-input-group:hover .phone-country-select,
.table-admin .phone-input-group:hover .phone-number-input {
    border-color: var(--border-color);
    background-color: var(--bg-white);
}

.table-admin .phone-input-group .phone-country-select {
    background-color: transparent;
}

.table-admin .phone-input-group:hover .phone-country-select {
    background-color: #f8f9fa;
}

/* ==========================================
   VALIDATION STATES
   ========================================== */

.phone-input-group.is-invalid .phone-country-select,
.phone-input-group.is-invalid .phone-number-input {
    border-color: var(--color-danger);
}

.phone-input-group.is-valid .phone-country-select,
.phone-input-group.is-valid .phone-number-input {
    border-color: var(--color-success);
}
/**
 * ============================================
 * AUDIT - Elsanor Intranet S8
 * Styles pour l'historique d'audit
 * ============================================
 */

/* ==========================================
   MODAL D'AUDIT
   ========================================== */

.audit-modal {
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    margin: auto;
}

.audit-modal .admin-modal-body {
    max-height: calc(90vh - 180px);
    overflow-y: auto;
    padding: 0;
    flex: 1;
}

.audit-modal .admin-modal-header {
    background: var(--color-primary);
    color: white;
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
}

.audit-modal .admin-modal-header i {
    color: white;
}

.audit-modal .admin-modal-header h4 {
    color: white;
}

/* ==========================================
   TABLE D'AUDIT
   ========================================== */

.audit-table {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
}

.audit-table thead {
    background: var(--color-primary);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.audit-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 500;
    white-space: nowrap;
}

.audit-table td {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.audit-table tbody tr:hover {
    background-color: #f8f9fa;
}

.audit-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.audit-table tbody tr:nth-child(even):hover {
    background-color: #f0f2f5;
}

/* ==========================================
   BADGES D'ACTION
   ========================================== */

.audit-action {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: var(--border-radius);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    min-width: 90px;
    text-align: center;
}

.audit-action.create {
    background-color: #d4edda;
    color: #155724;
}

.audit-action.update {
    background-color: #fff3cd;
    color: #856404;
}

.audit-action.delete {
    background-color: #f8d7da;
    color: #721c24;
}

.audit-action.restore {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* ==========================================
   VALEURS AVANT/APRÈS
   ========================================== */

.audit-values {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.audit-value {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.8rem;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0.2rem 0.5rem;
    border-radius: var(--border-radius);
    background-color: #f8f9fa;
    cursor: help;
}

.audit-value.old {
    color: #c92a2a;
    text-decoration: line-through;
    background-color: #ffe3e3;
}

.audit-value.new {
    color: #2b8a3e;
    background-color: #d3f9d8;
}

.audit-arrow {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: bold;
}

/* ==========================================
   INFO UTILISATEUR
   ========================================== */

.audit-user {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.audit-user .username {
    font-weight: 500;
    color: var(--text-dark);
}

.audit-user .ip {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: monospace;
}

/* ==========================================
   DATE
   ========================================== */

.audit-date {
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 0.8rem;
}

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

/* État vide */
.audit-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

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

.audit-empty p {
    margin: 0;
    font-size: 1rem;
}

/* Loading */
.audit-loading {
    padding: 3rem 1.5rem;
    text-align: center;
}

.audit-loading .spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   FILTRES
   ========================================== */

.audit-filters {
    padding: 0.875rem 1.25rem;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

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

.audit-filters select {
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
}

.audit-filters select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.audit-count {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

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

@media (max-width: 768px) {
    .audit-modal {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .audit-modal .admin-modal-header {
        border-radius: 0;
    }

    .audit-table th,
    .audit-table td {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .audit-value {
        max-width: 100px;
    }

    .audit-filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .audit-count {
        margin-left: 0;
    }
}

/* ==========================================
   MODAL ACTIVITÉ UTILISATEUR
   ========================================== */

.audit-user-modal {
    max-width: 1100px;
}

.audit-user-modal .admin-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.audit-user-modal .admin-modal-header i {
    color: white;
}

.audit-user-table th:nth-child(3),
.audit-user-table td:nth-child(3) {
    min-width: 120px;
}

.audit-ip {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================
   ONGLETS D'ACTIVITÉ
   ========================================== */

.audit-tabs {
    display: flex;
    background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
    padding: 0.5rem 1rem 0;
    gap: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.audit-tab {
    padding: 0.75rem 1.25rem;
    border: 1px solid transparent;
    border-bottom: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    transition: all 0.2s ease;
    border-radius: 0.5rem 0.5rem 0 0;
    margin-bottom: -1px;
}

.audit-tab:hover {
    color: var(--color-primary);
    background: rgba(102, 126, 234, 0.08);
    border-color: #e9ecef #e9ecef transparent;
}

.audit-tab.active {
    color: var(--color-primary);
    background: #fff;
    border-color: #e9ecef #e9ecef #fff;
    box-shadow: 0 -2px 8px rgba(102, 126, 234, 0.1);
}

.audit-tab.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px 3px 0 0;
}

.audit-tab i {
    font-size: 0.9rem;
    opacity: 0.8;
}

.audit-tab.active i {
    opacity: 1;
}

/* ==========================================
   TABLE DE NAVIGATION
   ========================================== */

.audit-navigation-table th:nth-child(3),
.audit-navigation-table td:nth-child(3) {
    min-width: 180px;
}

.audit-navigation-table th:nth-child(4),
.audit-navigation-table td:nth-child(4) {
    max-width: 300px;
}

.audit-page-label {
    font-weight: 500;
    color: var(--text-dark);
}

.audit-path {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.75rem;
}

.audit-path code {
    background: #f1f3f5;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    color: #495057;
}

.audit-browser {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Badges de méthode HTTP */
.audit-method {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.audit-method.get {
    background-color: #d3f9d8;
    color: #2b8a3e;
}

.audit-method.post {
    background-color: #fff3cd;
    color: #856404;
}

.audit-method i {
    font-size: 0.65rem;
}
/**
 * ============================================
 * HEADER - Elsanor Intranet S8
 * Styles pour le header admin
 * ============================================
 */

/* ==========================================
   HEADER PRINCIPAL
   ========================================== */

.admin-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    z-index: var(--z-fixed);
}

/* Ajustement si impersonation active */
body.is-impersonating .admin-header {
    top: var(--impersonation-banner-height);
}

/* ==========================================
   BRAND / TITRE
   ========================================== */

.admin-header .brand {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-primary);
}

.admin-header .brand span {
    color: var(--color-accent);
}

/* ==========================================
   HEADER RIGHT (Actions)
   ========================================== */

.admin-header .header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-header .user-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================
   USER DROPDOWN
   ========================================== */

.user-dropdown .dropdown-toggle {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-fast);
}

.user-dropdown .dropdown-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.user-dropdown .dropdown-toggle::after {
    display: none;
}

.user-dropdown .dropdown-toggle .fa-chevron-down {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.user-dropdown .dropdown-menu {
    min-width: 200px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.user-dropdown .dropdown-item {
    padding: 0.625rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-dropdown .dropdown-item i {
    width: 1.25rem;
    text-align: center;
    color: var(--text-muted);
}

.user-dropdown .dropdown-item:hover i {
    color: inherit;
}

/* ==========================================
   SUPERADMIN LINK
   ========================================== */

.superadmin-link-header {
    background: linear-gradient(90deg, #6f42c1, #5a32a3);
    color: white !important;
    border-radius: var(--border-radius);
    padding: 0.375rem 0.75rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: all var(--transition-fast);
}

.superadmin-link-header:hover {
    background: linear-gradient(90deg, #5a32a3, #4a2893);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.4);
}

/* ==========================================
   LANGUAGE SELECTOR
   ========================================== */

.language-selector .dropdown-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: inherit;
    cursor: pointer;
    padding: 0.375rem 0.625rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-selector .dropdown-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: var(--color-primary);
}

.language-selector .dropdown-toggle::after {
    display: none;
}

.language-selector .dropdown-toggle .fi {
    font-size: 1.25rem;
    line-height: 1;
}

.language-selector .dropdown-menu {
    min-width: 160px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    padding: 0.375rem 0;
}

.language-selector .dropdown-item {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.language-selector .dropdown-item .fi {
    font-size: 1.1rem;
}

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

.language-selector .dropdown-item.active {
    background-color: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary);
    font-weight: 500;
}

/* ==========================================
   NAVBAR (SuperAdmin)
   ========================================== */

.navbar {
    z-index: var(--z-fixed);
}

.navbar-brand small {
    font-size: 0.7rem;
    margin-left: 0.375rem;
    opacity: 0.8;
}

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

@media (max-width: 768px) {
    .admin-header {
        left: var(--sidebar-width-collapsed);
        padding: 0 0.75rem;
    }

    .admin-header .brand {
        font-size: 1rem;
    }

    .admin-header .header-right {
        gap: 0.5rem;
    }

    .superadmin-link-header span {
        display: none;
    }
}
/**
 * ============================================
 * SIDEBAR - Elsanor Intranet S8
 * Styles pour la barre latérale
 * ============================================
 */

/* ==========================================
   SIDEBAR CONTAINER
   ========================================== */

.admin-sidebar,
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--color-primary);
    color: var(--text-light);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: var(--z-sticky);
    transition: all var(--transition-normal);
}

/* Ajustement si impersonation */
body.is-impersonating .admin-sidebar,
body.is-impersonating #sidebar {
    top: var(--impersonation-banner-height);
    height: calc(100vh - var(--impersonation-banner-height));
}

/* SuperAdmin avec navbar fixe */
#sidebar {
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
}

/* ==========================================
   SIDEBAR HEADER
   ========================================== */

.admin-sidebar .sidebar-header,
#sidebar .sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-secondary);
    text-align: center;
}

.admin-sidebar .sidebar-header h4,
#sidebar .sidebar-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-accent);
}

/* ==========================================
   NAVIGATION SECTIONS
   ========================================== */

.admin-sidebar .nav-section,
#sidebar ul.components {
    padding: 0.625rem 0;
    margin: 0;
}

#sidebar ul li {
    list-style: none;
}

/* Section title */
.admin-sidebar .nav-section-title,
#sidebar ul li.nav-section .nav-section-title {
    display: flex;
    align-items: center;
    padding: 0.625rem 1.25rem 0.375rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8fd19e;
    font-weight: 700;
}

/* Icônes des titres de section - TOUJOURS vertes et monochromes */
.admin-sidebar .nav-section-title i,
#sidebar ul li.nav-section .nav-section-title i,
.admin-sidebar .nav-section-title i[style],
#sidebar ul li.nav-section .nav-section-title i[style] {
    flex-shrink: 0;
    width: 1.25rem;
    margin-right: 0.5rem;
    text-align: center;
    color: #8fd19e !important; /* Force la couleur verte, ignore le style inline */
}

/* Emojis des titres de section - monochromes avec teinte verte */
.admin-sidebar .nav-section-title .nav-icon-emoji,
#sidebar ul li.nav-section .nav-section-title .nav-icon-emoji {
    flex-shrink: 0;
    width: 1.25rem;
    margin-right: 0.5rem;
    text-align: center;
    font-size: 0.85rem;
    filter: sepia(1) saturate(5) hue-rotate(85deg) brightness(0.9);
    opacity: 0.85;
}

/* ==========================================
   NAVIGATION LINKS
   ========================================== */

.admin-sidebar .nav-link,
#sidebar ul li a {
    display: flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    color: #adb5bd;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.admin-sidebar .nav-link:hover,
#sidebar ul li a:hover {
    color: white;
    background: var(--color-secondary);
    border-left-color: var(--color-accent);
}

.admin-sidebar .nav-link.active,
#sidebar ul li a.active {
    color: white;
    background: var(--color-accent);
    border-left-color: var(--color-accent);
}

/* Icônes de navigation - préserver les couleurs personnalisées */
.admin-sidebar .nav-link i,
#sidebar ul li a i {
    width: 1.5rem;
    margin-right: 0.625rem;
    text-align: center;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

/* Les icônes avec style inline (couleur personnalisée) gardent leur couleur */
.admin-sidebar .nav-link i[style],
#sidebar ul li a i[style] {
    opacity: 0.85;
}

.admin-sidebar .nav-link:hover i[style],
#sidebar ul li a:hover i[style],
.admin-sidebar .nav-link.active i[style],
#sidebar ul li a.active i[style] {
    opacity: 1;
    filter: brightness(1.2);
    transform: scale(1.1);
}

/* Titres de section - icônes toujours vertes (les couleurs inline sont ignorées via !important) */

/* Icônes Emoji dans la navigation */
.nav-icon-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    margin-right: 0.625rem;
    font-size: 1rem;
    line-height: 1;
    text-align: center;
}

/* Animation au hover pour les emojis */
.admin-sidebar .nav-link:hover .nav-icon-emoji,
#sidebar ul li a:hover .nav-icon-emoji {
    transform: scale(1.15);
}

.admin-sidebar .nav-link .nav-icon-emoji,
#sidebar ul li a .nav-icon-emoji {
    transition: transform 0.2s ease;
}

/* ==========================================
   CATÉGORIE NON DÉFINIE (Alerte)
   ========================================== */

#sidebar ul li.nav-section.undefined .nav-section-title {
    color: var(--color-danger) !important;
}

#sidebar ul li.nav-section.undefined .nav-section-title i {
    animation: pulse 2s infinite;
}

/* ==========================================
   BADGE DANS SIDEBAR
   ========================================== */

.admin-sidebar .nav-link .badge,
#sidebar ul li a .badge {
    margin-left: auto;
    font-size: 0.65rem;
}

/* ==========================================
   SIDEBAR NO ACCESS MESSAGE
   ========================================== */

.sidebar-no-access {
    padding: 1.25rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.sidebar-no-access i {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

/* ==========================================
   SIDEBAR FOOTER
   ========================================== */

.admin-sidebar .sidebar-footer,
#sidebar .sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--color-secondary);
    margin-top: auto;
}

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

@media (max-width: 768px) {
    .admin-sidebar,
    #sidebar {
        width: var(--sidebar-width-collapsed);
    }

    .admin-sidebar .nav-link span:not(.nav-icon-emoji),
    .admin-sidebar .sidebar-header h4,
    .admin-sidebar .nav-section-title,
    #sidebar ul li a span:not(.nav-icon-emoji),
    #sidebar .sidebar-header h4,
    #sidebar ul li.nav-section .nav-section-title {
        display: none;
    }

    .admin-sidebar .nav-link,
    #sidebar ul li a {
        justify-content: center;
        padding: 1rem;
    }

    .admin-sidebar .nav-link i,
    #sidebar ul li a i {
        margin: 0;
        font-size: 1.1rem;
    }

    /* Emojis en mode minifié */
    .admin-sidebar .nav-link .nav-icon-emoji,
    #sidebar ul li a .nav-icon-emoji {
        margin: 0;
        font-size: 1.3rem;
    }

    #sidebar {
        margin-left: -250px;
    }

    #sidebar.active {
        margin-left: 0;
        width: var(--sidebar-width);
    }

    #sidebar.active ul li a span,
    #sidebar.active .sidebar-header h4,
    #sidebar.active ul li.nav-section .nav-section-title {
        display: inline;
    }

    #sidebar.active ul li a {
        justify-content: flex-start;
        padding: 0.625rem 1.25rem;
    }

    #sidebar.active ul li a i {
        margin-right: 0.625rem;
        font-size: 0.9rem;
    }
}

/* ==========================================
   SIDEBAR COLLAPSED (FORCED BY USER)
   ========================================== */

/* Bouton toggle dans le header */
.sidebar-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    opacity: 0.6;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 0.9rem;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    z-index: 10;
    flex-shrink: 0;
}

/* Position absolue uniquement pour intranet (admin-sidebar) */
.admin-sidebar .sidebar-toggle-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.sidebar-toggle-btn:hover {
    opacity: 1;
}

.sidebar-header {
    position: relative;
}

/* SuperAdmin: bouton retour intranet */
#sidebar .sidebar-return-btn {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

#sidebar .sidebar-return-text {
    margin-left: 0.5rem;
}

/* Mode collapsed forcé par l'utilisateur - écrans larges */
/* Supporte la classe sur body OU sur html (pour le script inline dans head) */
@media (min-width: 769px) {
    body.sidebar-collapsed .admin-sidebar,
    body.sidebar-collapsed #sidebar,
    html.sidebar-collapsed-pending .admin-sidebar,
    html.sidebar-collapsed-pending #sidebar {
        width: var(--sidebar-width-collapsed);
    }

    /* Cacher le texte en mode collapsed */
    body.sidebar-collapsed .admin-sidebar .nav-link span:not(.nav-icon-emoji),
    body.sidebar-collapsed .admin-sidebar .sidebar-header h4,
    body.sidebar-collapsed .admin-sidebar .nav-section-title,
    body.sidebar-collapsed #sidebar .nav-link-text,
    body.sidebar-collapsed #sidebar .nav-section-text,
    body.sidebar-collapsed #sidebar .sidebar-header h4,
    body.sidebar-collapsed #sidebar .sidebar-return-text,
    body.sidebar-collapsed #sidebar ul li.nav-section .nav-section-title,
    html.sidebar-collapsed-pending .admin-sidebar .nav-link span:not(.nav-icon-emoji),
    html.sidebar-collapsed-pending .admin-sidebar .sidebar-header h4,
    html.sidebar-collapsed-pending .admin-sidebar .nav-section-title,
    html.sidebar-collapsed-pending #sidebar .nav-link-text,
    html.sidebar-collapsed-pending #sidebar .nav-section-text,
    html.sidebar-collapsed-pending #sidebar .sidebar-header h4,
    html.sidebar-collapsed-pending #sidebar .sidebar-return-text,
    html.sidebar-collapsed-pending #sidebar ul li.nav-section .nav-section-title {
        display: none;
    }

    /* SuperAdmin: bouton retour centré quand collapsed */
    body.sidebar-collapsed #sidebar .sidebar-return-btn,
    html.sidebar-collapsed-pending #sidebar .sidebar-return-btn {
        flex: 0;
        padding: 0.5rem;
        min-width: auto;
        width: auto;
    }
    
    /* Intranet: header en mode collapsed */
    body.sidebar-collapsed .admin-sidebar .sidebar-header,
    html.sidebar-collapsed-pending .admin-sidebar .sidebar-header {
        padding: 1rem 0.5rem;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 60px;
    }
    
    /* Intranet: bouton toggle centré en mode collapsed */
    body.sidebar-collapsed .admin-sidebar .sidebar-toggle-btn,
    html.sidebar-collapsed-pending .admin-sidebar .sidebar-toggle-btn {
        position: static !important;
        transform: rotate(180deg) !important;
    }
    
    /* SuperAdmin: header en mode collapsed */
    body.sidebar-collapsed #sidebar .sidebar-header,
    html.sidebar-collapsed-pending #sidebar .sidebar-header {
        padding: 0.75rem !important;
    }
    
    body.sidebar-collapsed #sidebar .sidebar-header > div,
    html.sidebar-collapsed-pending #sidebar .sidebar-header > div {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    body.sidebar-collapsed #sidebar .sidebar-toggle-btn,
    html.sidebar-collapsed-pending #sidebar .sidebar-toggle-btn {
        order: -1;
    }

    body.sidebar-collapsed .admin-sidebar .nav-link,
    body.sidebar-collapsed #sidebar ul li a,
    html.sidebar-collapsed-pending .admin-sidebar .nav-link,
    html.sidebar-collapsed-pending #sidebar ul li a {
        justify-content: center;
        padding: 1rem;
    }

    body.sidebar-collapsed .admin-sidebar .nav-link i,
    body.sidebar-collapsed #sidebar ul li a i,
    html.sidebar-collapsed-pending .admin-sidebar .nav-link i,
    html.sidebar-collapsed-pending #sidebar ul li a i {
        margin: 0;
        font-size: 1.1rem;
    }

    body.sidebar-collapsed .admin-sidebar .nav-link .nav-icon-emoji,
    body.sidebar-collapsed #sidebar ul li a .nav-icon-emoji,
    html.sidebar-collapsed-pending .admin-sidebar .nav-link .nav-icon-emoji,
    html.sidebar-collapsed-pending #sidebar ul li a .nav-icon-emoji {
        margin: 0;
        font-size: 1.3rem;
    }

    /* Ajuster le contenu principal */
    body.sidebar-collapsed .admin-main,
    html.sidebar-collapsed-pending .admin-main {
        margin-left: var(--sidebar-width-collapsed);
    }

    body.sidebar-collapsed .admin-header,
    html.sidebar-collapsed-pending .admin-header {
        left: var(--sidebar-width-collapsed);
        width: calc(100% - var(--sidebar-width-collapsed));
    }

    body.sidebar-collapsed .admin-footer,
    html.sidebar-collapsed-pending .admin-footer {
        margin-left: var(--sidebar-width-collapsed);
    }

    /* SuperAdmin content */
    body.sidebar-collapsed #content,
    html.sidebar-collapsed-pending #content {
        margin-left: var(--sidebar-width-collapsed);
    }
    
    /* SuperAdmin: rotation sans translate */
    body.sidebar-collapsed #sidebar .sidebar-toggle-btn,
    html.sidebar-collapsed-pending #sidebar .sidebar-toggle-btn {
        transform: rotate(180deg);
    }

    /* Tooltip sur les liens en mode collapsed */
    body.sidebar-collapsed .admin-sidebar .nav-link,
    body.sidebar-collapsed #sidebar ul li a {
        position: relative;
    }

    body.sidebar-collapsed .admin-sidebar .nav-link[title]:hover::after,
    body.sidebar-collapsed #sidebar ul li a[title]:hover::after {
        content: attr(title);
        position: absolute;
        left: calc(100% + 10px);
        top: 50%;
        transform: translateY(-50%);
        background: var(--color-dark);
        color: white;
        padding: 0.5rem 0.75rem;
        border-radius: var(--border-radius);
        font-size: 0.85rem;
        white-space: nowrap;
        z-index: 1000;
        box-shadow: var(--shadow);
    }
}
/**
 * ============================================
 * SUPERADMIN LAYOUT - Elsanor Intranet S8
 * Styles spécifiques au layout SuperAdmin
 * ============================================
 */

/* ==========================================
   VARIABLES (si pas déjà définies)
   ========================================== */

:root {
    --header-height: 56px;
    --sidebar-width: 250px;
    --sidebar-width-collapsed: 60px;
    --impersonation-banner-height: 40px;
    --transition-normal: 0.3s ease;
    --transition-fast: 0.15s ease;
    --border-color: #dee2e6;
    --border-radius: 0.375rem;
    --border-radius-lg: 0.5rem;
    --bg-white: #fff;
    --color-primary: #2c3e50;
    --color-accent: #3498db;
    --text-muted: #6c757d;
}

/* ==========================================
   BODY SUPERADMIN
   ========================================== */

body.superadmin-layout {
    padding-top: var(--header-height);
    background-color: #f8f9fa;
}

/* ==========================================
   WRAPPER - Compatible avec le template
   ========================================== */

.wrapper,
.superadmin-wrapper {
    display: flex;
    width: 100%;
    min-height: calc(100vh - var(--header-height));
    padding-top: var(--header-height);
}

/* ==========================================
   SIDEBAR
   ========================================== */

.superadmin-wrapper #sidebar,
.wrapper #sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    z-index: 100;
}

/* ==========================================
   CONTENT PRINCIPAL
   ========================================== */

#content {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    min-height: calc(100vh - var(--header-height));
    transition: all var(--transition-normal);
}

#content .container-fluid {
    padding: 1.25rem 2rem;
}

/* ==========================================
   ADMIN MAIN (Layout classique)
   ========================================== */

.admin-main {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 1.25rem;
    min-height: calc(100vh - var(--header-height));
}

/* Ajustement impersonation */
body.is-impersonating .admin-main {
    margin-top: calc(var(--header-height) + var(--impersonation-banner-height));
}

body.is-impersonating .superadmin-wrapper,
body.is-impersonating .wrapper {
    padding-top: calc(var(--header-height) + var(--impersonation-banner-height));
}

body.is-impersonating .superadmin-wrapper #sidebar,
body.is-impersonating .wrapper #sidebar {
    top: calc(var(--header-height) + var(--impersonation-banner-height));
    height: calc(100vh - var(--header-height) - var(--impersonation-banner-height));
}

/* ==========================================
   PAGE HEADER
   ========================================== */

.admin-main .page-header,
.page-header {
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-main .page-header h1,
.page-header h1 {
    font-size: 1.75rem;
    color: var(--color-primary);
    margin: 0;
}

.page-header .page-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ==========================================
   FOOTER ADMIN
   ========================================== */

.admin-footer {
    margin-left: var(--sidebar-width);
    padding: 1rem 1.25rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-white);
}

.admin-footer .shortcuts-hint {
    margin-left: 1.25rem;
    color: #999;
    font-size: 0.8rem;
}

.admin-footer kbd {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    font-family: monospace;
    background: #f4f4f4;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 0 #999;
}

/* ==========================================
   ICON PICKER (SuperAdmin)
   ========================================== */

.icon-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
}

.icon-pick {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-white);
    color: #495057;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.icon-pick:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: scale(1.1);
}

.icon-pick.selected {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.4);
}

.icon-pick i {
    font-size: 1rem;
}

.icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background-color: var(--color-accent);
    color: white;
}

.icon-btn.selected {
    background-color: var(--color-accent);
    color: white;
}

#commonIcons .btn {
    min-width: 3rem;
}

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

@media (max-width: 768px) {
    .admin-main {
        margin-left: var(--sidebar-width-collapsed);
    }

    .admin-footer {
        margin-left: var(--sidebar-width-collapsed);
    }

    .admin-footer .shortcuts-hint {
        display: none;
    }

    #content {
        width: 100%;
        margin-left: 0;
    }

    #content .container-fluid {
        padding: 1rem;
    }

    .superadmin-wrapper #sidebar,
    .wrapper #sidebar {
        width: var(--sidebar-width-collapsed);
    }
}
/**
 * ============================================
 * IMPERSONATION - Elsanor Intranet S8
 * Bannière d'impersonation utilisateur
 * ============================================
 */

/* ==========================================
   BANNIÈRE IMPERSONATION
   ========================================== */

.impersonation-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--impersonation-banner-height);
    background: linear-gradient(90deg, #dc3545, #c82333);
    color: white;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    z-index: var(--z-impersonation);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.impersonation-banner i {
    font-size: 1.1rem;
}

.impersonation-banner .impersonated-user {
    font-weight: 700;
}

.impersonation-banner a {
    color: white;
    text-decoration: underline;
    margin-left: 0.5rem;
    transition: color var(--transition-fast);
}

.impersonation-banner a:hover {
    color: var(--color-warning);
}

/* ==========================================
   BOUTON EXIT IMPERSONATION
   ========================================== */

.impersonation-banner .btn-exit {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.impersonation-banner .btn-exit:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ==========================================
   AJUSTEMENTS LAYOUT
   ========================================== */

/* Header décalé */
body.is-impersonating .admin-header {
    top: var(--impersonation-banner-height);
}

/* Sidebar décalé */
body.is-impersonating .admin-sidebar,
body.is-impersonating #sidebar {
    top: var(--impersonation-banner-height);
    height: calc(100vh - var(--impersonation-banner-height));
}

/* SuperAdmin sidebar (avec navbar) */
body.is-impersonating #sidebar {
    top: calc(var(--header-height) + var(--impersonation-banner-height));
    height: calc(100vh - var(--header-height) - var(--impersonation-banner-height));
}

/* Navbar décalée */
body.is-impersonating .navbar.fixed-top {
    top: var(--impersonation-banner-height);
}

/* Contenu principal décalé */
body.is-impersonating .admin-main {
    margin-top: calc(var(--header-height) + var(--impersonation-banner-height));
}

/* Body padding */
body.is-impersonating {
    padding-top: var(--impersonation-banner-height);
}

body.is-impersonating.superadmin-layout {
    padding-top: calc(var(--header-height) + var(--impersonation-banner-height));
}

/* ==========================================
   INDICATEUR COMPACT (Alternative)
   ========================================== */

.impersonation-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--color-danger);
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 500;
}

.impersonation-indicator i {
    font-size: 0.875rem;
}

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

@media (max-width: 768px) {
    .impersonation-banner {
        font-size: 0.8rem;
        padding: 0 0.75rem;
        flex-wrap: wrap;
        height: auto;
        min-height: var(--impersonation-banner-height);
        padding-top: 0.375rem;
        padding-bottom: 0.375rem;
    }

    .impersonation-banner .btn-exit {
        padding: 0.2rem 0.5rem;
        font-size: 0.75rem;
    }
}
/**
 * ============================================
 * ROLE PAGE - Elsanor Intranet S8
 * Styles pour la gestion des rôles et permissions
 * ============================================
 */

/* ==========================================
   LISTE DES RÔLES
   ========================================== */

.role-item {
    cursor: pointer;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.role-item:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.role-item.active {
    background-color: #e7f1ff;
    border-color: var(--color-accent, #0d6efd);
}

.role-item .role-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 0.75rem;
}

.role-item .badge {
    font-size: 0.75rem;
    min-width: 1.5rem;
}

/* ==========================================
   SECTIONS PAR SCOPE
   ========================================== */

.scope-section {
    margin-bottom: 1.5rem;
}

.scope-header {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: white;
}

/* ==========================================
   ONGLETS PAR SCOPE
   ========================================== */

#scopeTabs {
    border-bottom: none;
}

#scopeTabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    color: #6c757d;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    transition: all 0.2s;
}

#scopeTabs .nav-link:hover {
    color: #495057;
    border-bottom-color: #dee2e6;
}

#scopeTabs .nav-link.active {
    color: #0d6efd;
    border-bottom-color: #0d6efd;
    background: transparent;
}

/* Couleurs des onglets par scope */
#tab-PRODUCTION.active { color: #198754; border-bottom-color: #198754; }
#tab-BILLING.active { color: #0d6efd; border-bottom-color: #0d6efd; }
#tab-GLOBAL.active { color: #0dcaf0; border-bottom-color: #0dcaf0; }

.role-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 0.75rem;
}

/* ==========================================
   CATÉGORIES DE PAGES
   ========================================== */

.page-category {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
}

.category-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.category-label {
    font-weight: 600;
    color: #495057;
}

.category-actions .btn {
    padding: 0.25rem 0.5rem;
    margin-left: 0.25rem;
}

/* ==========================================
   GRILLE DES PAGES
   ========================================== */

.pages-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.page-permission-row {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.page-permission-row:hover {
    border-color: #adb5bd;
}

.page-permission-row.saving {
    opacity: 0.6;
    pointer-events: none;
}

.page-permission-row.just-saved {
    animation: pulse-success 0.5s ease;
}

.page-label {
    flex: 1;
    font-size: 0.9rem;
    color: #212529;
}

.page-label i {
    width: 20px;
    text-align: center;
    color: #6c757d;
}

/* ==========================================
   CHECKBOXES PERMISSIONS (VIEW/MANAGE)
   ========================================== */

.permission-checks {
    display: flex;
    gap: 0.5rem;
}

.permission-check {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0;
    font-size: 0.8rem;
    background: white;
}

.permission-check:hover {
    border-color: #adb5bd;
}

.permission-check input[type="checkbox"] {
    margin-right: 0.375rem;
    cursor: pointer;
}

.permission-check .check-label {
    user-select: none;
}

.permission-check .check-label i {
    margin-right: 0.25rem;
}

/* VIEW checked */
.permission-check.view-check.is-checked {
    background: #d1e7dd;
    border-color: #198754;
    color: #0f5132;
}

/* MANAGE checked */
.permission-check.manage-check.is-checked {
    background: #cfe2ff;
    border-color: #0d6efd;
    color: #084298;
}

/* ==========================================
   ICON PICKER
   ========================================== */

.icon-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.icon-pick {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.15s;
    background: none;
    color: inherit;
}

.icon-pick:hover {
    background: #e9ecef;
}

.icon-pick.selected {
    background: var(--color-accent, #0d6efd);
    color: white;
    border-color: var(--color-accent, #0d6efd);
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes pulse-success {
    0% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(25, 135, 84, 0); }
    100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}

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

#no-role-selected {
    color: var(--text-muted, #6c757d);
}

#no-role-selected i {
    opacity: 0.5;
}

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

@media (max-width: 992px) {
    .page-permission-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .permission-checks {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 576px) {
    .permission-checks {
        flex-direction: column;
        gap: 0.25rem;
    }

    .permission-check {
        width: 100%;
        justify-content: center;
    }
}
/**
 * ============================================
 * TEAM MEMBER - Elsanor Intranet S8
 * Styles pour la page détail d'un membre
 * ============================================
 */

/* ==========================================
   AUTO-SAVE FIELDS
   ========================================== */

.member-field.saving,
.member-relation.saving {
    border-color: var(--feedback-loading-border);
}

.member-field.saved,
.member-relation.saved {
    border-color: var(--feedback-success-border);
    animation: flash-success 0.5s;
}

.member-field.error,
.member-relation.error {
    border-color: var(--feedback-error-border);
}

/* ==========================================
   TYPE SELECT AVEC BOUTONS
   ========================================== */

.type-select-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.type-select-container select {
    flex: 1;
}

.type-select-container .type-actions {
    display: flex;
    gap: 0.25rem;
}

.type-select-container .btn-add-type,
.type-select-container .btn-delete-type {
    padding: 0.25rem 0.5rem;
}

.type-select-container .btn-delete-type {
    font-size: 1.1rem;
    line-height: 1;
}

/* ==========================================
   TABS BADGES
   ========================================== */

#memberTabs .nav-link .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    margin-left: 0.25rem;
    vertical-align: middle;
}

/* ==========================================
   CONTRATS
   ========================================== */

.contract-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--bg-white);
    transition: all var(--transition-fast);
}

.contract-card.current {
    border-left: 4px solid var(--color-success);
    background-color: #f8fff9;
}

.contract-card.ended {
    border-left: 4px solid var(--color-danger);
    opacity: 0.7;
    background-color: #fafafa;
}

.contract-docs {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
}

.contract-doc-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: var(--border-radius);
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.contract-doc-item a {
    color: var(--color-accent);
}

/* ==========================================
   DOCUMENTS STATUS CARDS
   ========================================== */

.doc-status-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-lg);
    background: #f8f9fa;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.doc-status-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Document OK */
.doc-status-card.ok {
    border-color: var(--color-success);
    background-color: #d1e7dd;
}

.doc-status-card.ok .doc-status-icon {
    color: var(--color-success);
}

/* Document obligatoire manquant */
.doc-status-card.missing {
    border-color: var(--color-danger);
    background-color: #f8d7da;
}

.doc-status-card.missing .doc-status-icon {
    color: var(--color-danger);
}

/* Document fortement conseillé */
.doc-status-card.strongly-advised {
    border-color: var(--color-orange);
    background-color: #ffe5d0;
}

.doc-status-card.strongly-advised .doc-status-icon {
    color: var(--color-orange);
}

/* Document conseillé */
.doc-status-card.advised {
    border-color: var(--color-warning);
    background-color: #fff3cd;
}

.doc-status-card.advised .doc-status-icon {
    color: #856404;
}

/* Document optionnel */
.doc-status-card.optional {
    border-color: var(--color-info);
    background-color: #cff4fc;
}

.doc-status-card.optional .doc-status-icon {
    color: var(--color-info);
}

.doc-status-icon {
    font-size: 1.75rem;
    width: 2.5rem;
    text-align: center;
    flex-shrink: 0;
}

.doc-status-info {
    flex: 1;
    min-width: 0;
}

.doc-status-label {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.doc-status-label .badge {
    font-size: 0.65rem;
    font-weight: 500;
}

.doc-status-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.doc-status-check {
    flex-shrink: 0;
}

/* ==========================================
   DOCUMENTS GRID
   ========================================== */

.document-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    background: var(--bg-white);
    height: 100%;
}

.document-card.expired {
    border-color: var(--color-danger);
    background-color: #fff5f5;
}

.document-card.expiring-soon {
    border-color: var(--color-warning);
    background-color: #fffbf0;
}

.document-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-lg);
    font-size: 1.25rem;
}

.document-icon.pdf {
    background-color: #f8d7da;
    color: var(--color-danger);
}

.document-icon.image {
    background-color: #d1e7dd;
    color: var(--color-success);
}

/* ==========================================
   ABSENCES
   ========================================== */

.absence-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-white);
}

.absence-card.justified {
    border-left: 4px solid var(--color-success);
}

.absence-card.current {
    background-color: #fff3cd;
    border-color: var(--color-warning);
}

/* ==========================================
   ÉQUIPEMENTS
   ========================================== */

.equipment-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-white);
}

.equipment-card.returned {
    opacity: 0.6;
    background-color: #f8f9fa;
}

.equipment-info {
    flex: 1;
}

.equipment-label {
    font-weight: 600;
}

.equipment-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================
   CONTACTS D'URGENCE
   ========================================== */

.emergency-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-white);
}

.priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background-color: var(--color-danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

/* ==========================================
   ACCÈS
   ========================================== */

.access-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    background: var(--bg-white);
}

.access-item.billing {
    border-left: 3px solid var(--color-accent);
}

.access-info {
    flex: 1;
}

.access-structure {
    font-weight: 500;
    font-size: 0.9rem;
}

.access-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================
   MOT DE PASSE
   ========================================== */

.password-section {
    background-color: #f8f9fa;
    border-radius: var(--border-radius-lg);
    padding: 1rem;
}

/* ==========================================
   RÔLES GLOBAUX
   ========================================== */

.global-role-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.global-role-item:last-child {
    border-bottom: none;
}
/**
 * ============================================
 * USER LIST - Elsanor Intranet S8
 * Styles pour la liste des utilisateurs
 * ============================================
 */

/* ==========================================
   USER ROW STATES
   ========================================== */

#table_users tr.user-disabled {
    opacity: 0.6;
}

#table_users tr.user-disabled td {
    background-color: #f8f9fa;
}

/* ==========================================
   ACCESS EXPIRY
   ========================================== */

.access-expired {
    color: var(--color-danger) !important;
}

.access-expiring-soon {
    color: var(--color-warning) !important;
}

/* ==========================================
   USER STATUS INDICATOR
   ========================================== */

.user-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.user-status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
}

.user-status-dot.active {
    background-color: var(--color-success);
}

.user-status-dot.inactive {
    background-color: var(--color-danger);
}

.user-status-dot.pending {
    background-color: var(--color-warning);
}

/* ==========================================
   USER INFO CELL
   ========================================== */

.user-info-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-info-cell .user-details {
    min-width: 0;
}

.user-info-cell .user-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info-cell .user-email {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================
   USER FILTERS
   ========================================== */

.user-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.user-filters .form-check {
    margin-bottom: 0;
}

.user-filters .filter-label {
    font-weight: 500;
    margin-right: 0.5rem;
}

/* ==========================================
   USER QUICK ACTIONS
   ========================================== */

.user-quick-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

tr:hover .user-quick-actions {
    opacity: 1;
}

/* ==========================================
   USER TYPE BADGE
   ========================================== */

.user-type-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: var(--border-radius);
    font-weight: 500;
}

.user-type-badge.internal {
    background-color: #cfe2ff;
    color: #084298;
}

.user-type-badge.external {
    background-color: #e2e3e5;
    color: #41464b;
}

.user-type-badge.customer {
    background-color: #d1e7dd;
    color: #0f5132;
}

/* ==========================================
   CONTRACT STATUS
   ========================================== */

.contract-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
}

.contract-status i {
    font-size: 0.7rem;
}

.contract-status.active {
    color: var(--color-success);
}

.contract-status.ending-soon {
    color: var(--color-warning);
}

.contract-status.ended {
    color: var(--color-danger);
}

.contract-status.no-contract {
    color: var(--text-muted);
}
