/* Custom styles pour l'application Hardware Test Database avec Glassmorphisme */

/* Import Google Fonts - Mulish */
@import url('https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200..1000;1,200..1000&display=swap');

/* Z-index pour ninja-keys command palette */
ninja-keys {
    --ninja-z-index: 5000 !important;
}

/* ===============================================
   VARIABLES CSS - SYSTÈME UNIFIÉ
   =============================================== */
:root {
    /* Border radius unifiés */
    --border-radius-sm: 0.75rem;
    --border-radius-md: 1rem;
    --border-radius-lg: 0.8rem;
    --border-radius-circle: 50%;
    
    /* Couleurs principales */
    --color-primary: #556EB3;
    --color-primary-light: rgba(85, 110, 179, 0.1);
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-warning: #ffc107;
    --color-secondary: #6b7280;
    --color-info: #556EB3;
    
    /* Glassmorphisme */
    --glass-bg: rgba(255, 255, 255, 0.90);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-backdrop: blur(4px);
    --glass-shadow: 0 8px 32px 0 rgba(85, 110, 179, 0.12);
    
    /* SYSTÈME UNIFIÉ - CHAMPS DE SAISIE ET TRANSITIONS */
    --field-bg: rgba(255, 255, 255, 0.9);
    --field-bg-focus: rgba(255, 255, 255, 0.95);
    --field-border: #e2e8f0;
    --field-border-focus: #556eb3;
    --field-shadow-focus: rgba(85, 110, 179, 0.2);
    --field-color: #334155;
    --field-padding: 0.75rem 1rem;
    --field-font-size: 0.875rem;
    --field-font-weight: 500;
    --field-transition: var(--transition-fast);
    
    /* SYSTÈME UNIFIÉ - TRANSITIONS GLOBALES */
    --transition-fast: all 0.15s ease;     /* Interactions rapides : boutons, hover */
    --transition-medium: all 0.3s ease;    /* Animations moyennes : sidebar, cartes */
    --transition-slow: all 0.5s ease;      /* Animations lentes : collapse, accordéons */
    
    /* Couleurs de statut pour bordures contextuelles */
    --status-success-solid: rgba(40, 167, 69, 1);
    --status-danger-solid: rgba(220, 53, 69, 1);
    --status-warning-solid: rgba(255, 193, 7, 1);
    --status-secondary-solid: rgba(107, 114, 128, 1);

    /* Variables pour les cartes d'appareils ADB */
    --device-card-bg: rgba(255, 255, 255, 0.95);
    --device-card-border: rgba(85, 110, 179, 0.2);
    --device-card-hover-bg: rgba(85, 110, 179, 0.05);
    --device-card-hover-border: rgba(85, 110, 179, 0.4);
    --device-card-selected-bg: rgba(40, 167, 69, 0.1);
    --device-card-selected-border: rgba(40, 167, 69, 0.6);
    
    /* Variables pour les mini-cartes d'équipes */
    --team-chip-bg: #ffffff;
    --team-chip-border: #d4ddec;
    --team-chip-hover-border: #a3b5d6;
    --team-chip-active-bg: linear-gradient(135deg, #556EB3 0%, #4a5fa0 100%);
    --team-chip-active-border: #3d4d82;
    --team-chip-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --team-chip-shadow-hover: 0 4px 16px rgba(85, 110, 179, 0.2);
    --team-chip-shadow-active: 0 6px 24px rgba(85, 110, 179, 0.4);
    
    /* Variables pour les éléments de métadonnées */
    --metadata-label-color: #6b7280;
    --metadata-value-color: #334155;
}

/* ===============================================
   STYLES POUR LA SECTION MÉTADONNÉES
   =============================================== */
.metadata-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(85, 110, 179, 0.1);
    transition: var(--transition-fast);
}

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

.metadata-item:hover {
    background: rgba(85, 110, 179, 0.05);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: var(--border-radius-sm);
}

.metadata-label {
    font-weight: 600;
    color: var(--metadata-label-color);
    min-width: 140px;
    font-size: 0.875rem;
}

.metadata-value {
    font-weight: 500;
    color: var(--metadata-value-color);
    text-align: right;
    flex: 1;
    font-size: 0.9rem;
}

/* ===============================================
   CARTES D'APPAREILS ADB - GLASSMORPHISME
   =============================================== */

/* Container des cartes d'appareils */
.adb-device-card {
    background: var(--device-card-bg);
    border: 2px solid var(--device-card-border);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    backdrop-filter: var(--glass-backdrop);
    box-shadow: var(--glass-shadow);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* Effet hover des cartes d'appareils */
.adb-device-card:hover {
    background: var(--device-card-hover-bg);
    border-color: var(--device-card-hover-border);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(85, 110, 179, 0.2);
}

/* État sélectionné de la carte */
.adb-device-card.selected {
    background: var(--device-card-selected-bg);
    border-color: var(--device-card-selected-border);
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
}

.adb-device-card.selected:hover {
    background: var(--device-card-selected-bg);
    border-color: var(--device-card-selected-border);
}

/* En-tête de la carte avec icône et statut */
.adb-device-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.adb-device-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary), rgba(102, 107, 173, 1));
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.adb-device-status {
    padding: 0.25rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.adb-device-status.online {
    background: rgba(40, 167, 69, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.adb-device-status.offline {
    background: rgba(220, 53, 69, 0.1);
    color: var(--color-danger);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Contenu principal de la carte */
.adb-device-info h6 {
    margin-bottom: 0.25rem;
    color: #2d3748;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
}

.adb-device-info .text-muted {
    font-size: 0.8rem;
    color: #64748b !important;
    margin-bottom: 0.125rem;
}

/* Serial number avec style monospace */
.adb-device-serial {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.75rem;
    background: rgba(85, 110, 179, 0.1);
    padding: 0.25rem 0.8rem;
    border-radius: 6px;
    color: var(--color-primary);
    font-weight: 600;
    word-break: break-all;
    margin-top: 0.8rem;
}

/* Animation de pulse pour le chargement */
.adb-device-card.loading {
    animation: pulse-card 1.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse-card {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Badge de sélection */
.adb-device-card::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: var(--color-success);
    border-radius: 50%;
    transform: scale(0);
    transition: var(--transition-fast);
    z-index: 1;
}

.adb-device-card.selected::after {
    transform: scale(1);
}

.adb-device-card.selected::before {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 6px;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 2;
}

/* État d'erreur */
.adb-device-card.error {
    background: rgba(220, 53, 69, 0.05);
    border-color: rgba(220, 53, 69, 0.3);
    opacity: 0.6;
    pointer-events: none;
}

/* Container responsive pour les cartes */
@media (max-width: 768px) {
    .adb-device-card {
        min-height: 100px;
        padding: 0.75rem;
    }
    
    .adb-device-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .adb-device-info h6 {
        font-size: 0.85rem;
    }
    
    .adb-device-serial {
        font-size: 0.7rem;
    }
}

/* ===============================================
   BARRE D'OUTILS FIXE - SYSTÈME UNIFIÉ
   =============================================== */

/* Barre d'outils principale fixe (mode lecture) - Utilise le même style que l'édition */
.sticky-toolbar {
    position: sticky !important;
    top: 1rem !important; /* Même espacement que la barre d'édition */
    z-index: 1000 !important; /* Même z-index que la barre d'édition */
    margin-bottom: 2rem !important;
}

/* Informations de l'appareil dans la barre d'outils */
.device-info-toolbar {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    max-width: 300px !important;
}

.device-serial {
    font-weight: 700 !important;
    color: var(--field-color) !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.device-details {
    font-weight: 500 !important;
    color: var(--color-secondary) !important;
    font-size: 0.8rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 2px !important;
}

/* Responsive - masquer les infos sur mobile */
@media (max-width: 768px) {
    .device-info-toolbar {
        display: none !important;
    }
}

/* ===============================================
   SYSTÈME GÉNÉRAL - GALERIES D'IMAGES
   =============================================== */

/* Conteneur générique pour toute galerie d'images */
.image-gallery {
    margin-top: 10px !important;
    position: relative !important;
}

/* Image améliorée générique - réutilisable partout */
.image-enhanced {
    border: 3px solid #ffffff !important;
    border-radius: var(--border-radius-sm) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    transition: box-shadow var(--transition-fast) !important;
}

.image-enhanced:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.25) !important;
}

/* Body et layout avec sidebar */
* {
    box-sizing: border-box;
}

html, body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Mulish', 'ui-sans-serif', 'system-ui', 'sans-serif';
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #cbd5e1 100%);
    background-attachment: fixed;
}

body {
    display: flex;
    width: 100vw;
    overflow-x: hidden;
}

/* Header responsive */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    display: none; /* Masqué par défaut, affiché quand largeur insuffisante */
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 20px;
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo-img {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    cursor: pointer;
    transition: var(--transition-fast);
}

.header-logo-img:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: #556eb3;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.sidebar-toggle:hover {
    background: rgba(85, 110, 179, 0.1);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

.logout-btn-header {
    color: #64748b;
    text-decoration: none;
    padding: 8px;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.logout-btn-header:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Conteneur principal avec offset pour sidebar */
.main-content-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Avatar styling - Fix pour détourage correct */
.avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    object-fit: contain;
}

/* Avatar buttons avec spécificité élevée pour surcharger les styles Bootstrap */
html body .avatar-option, 
html body .avatar-option-create {
    overflow: hidden;
    position: relative;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* Styles spécifiques pour les boutons d'avatar - ne pas écraser */
html body button.avatar-option,
html body button.avatar-option-create {
    padding: 0 !important;
    box-shadow: none !important;
    border: 2px solid transparent !important;
}

html body button.avatar-option:hover,
html body button.avatar-option-create:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.avatar-option.avatar-image-type {
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

.sidebar-avatar, #sidebar-avatar {
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* Styles spécifiques pour les avatars dans la liste utilisateur */
html body .user-avatar {
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    flex-shrink: 0 !important;
}

#current-avatar-preview, #create-avatar-preview, #edit-avatar-preview {
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}


/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    padding: 0;
    transition: var(--transition-medium);
}



.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

.sidebar-logo {
    height: 50px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    cursor: pointer;
    transition: var(--transition-fast);
}

.sidebar-logo:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.sidebar-logo-compact {
    cursor: pointer;
    transition: var(--transition-fast);
}

.sidebar-logo-compact:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.sidebar-logo-compact {
    display: none; /* Masqué par défaut en mode desktop */
}

.sidebar-profile {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 16px;
    margin-top: 16px;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #556EB3;
    background: linear-gradient(90deg, rgba(85, 110, 179, 1) 25%, rgba(102, 107, 173, 1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 2px;
}

.profile-role {
    font-size: 12px;
    color: #64748b;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #64748b;
    text-decoration: none;
    border-radius: 0.75rem;
    margin-bottom: 4px;
    transition: var(--transition-fast);
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(85, 110, 179, 0.1);
    color: #556eb3;
}

.nav-item.active {
    background: #556EB3;
    background: linear-gradient(90deg, rgba(85, 110, 179, 1) 25%, rgba(102, 107, 173, 1) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(85, 110, 179, 0.3);
}

.nav-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Navigation Submenu for Android MDM */
.nav-group {
    margin-bottom: 4px;
}

.nav-item-expandable {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    color: #64748b;
    border-radius: 0.75rem;
    margin-bottom: 4px;
    transition: var(--transition-fast);
}

.nav-item-expandable:hover {
    background: rgba(85, 110, 179, 0.1);
}

.nav-item-expandable.active {
    background: #556EB3;
    background: linear-gradient(90deg, rgba(85, 110, 179, 1) 25%, rgba(102, 107, 173, 1) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(85, 110, 179, 0.3);
}

.nav-item-expandable.active .nav-item-link,
.nav-item-expandable.active .nav-toggle-btn {
    color: white;
}

.nav-item-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

.nav-item-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.nav-toggle-btn {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition-fast);
    opacity: 0.7;
}

.nav-toggle-btn:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

.nav-toggle-btn i {
    transition: transform 0.3s ease;
}

.nav-group.open .nav-toggle-btn i {
    transform: rotate(180deg);
}

.nav-submenu {
    padding-left: 12px;
    margin-top: 4px;
    margin-bottom: 8px;
    border-left: 2px solid rgba(85, 110, 179, 0.3);
    margin-left: 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.nav-group.open .nav-submenu {
    max-height: 300px;
    opacity: 1;
}

.nav-subitem {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: #64748b;
    text-decoration: none;
    border-radius: 0.5rem;
    margin-bottom: 2px;
    transition: var(--transition-fast);
    font-size: 13px;
    font-weight: 400;
}

.nav-subitem:hover {
    background: rgba(85, 110, 179, 0.08);
    color: #556eb3;
}

.nav-subitem.active {
    background: rgba(85, 110, 179, 0.15);
    color: #556eb3;
    font-weight: 500;
}

.nav-subitem i {
    font-size: 12px;
    width: 16px;
    text-align: center;
}

/* User Menu en dessous du logo */
.sidebar-user-menu {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 8px;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: auto;
}

/* User Menu Wrapper */
.user-menu-wrapper {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: inherit;
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(85, 110, 179, 0.3);
    transform: translateY(-1px);
}

.user-menu-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #556eb3, #666bad);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.user-menu-info {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.user-menu-name {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-role {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-chevron {
    color: #94a3b8;
    font-size: 12px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.user-menu-btn.active .user-menu-chevron {
    transform: rotate(180deg);
}

/* User Dropdown - S'ouvre vers le bas */
.user-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1100;
    overflow: hidden;
}

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

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.user-dropdown-item:hover {
    background: rgba(85, 110, 179, 0.08);
    color: #556eb3;
}

.user-dropdown-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.user-dropdown-item.logout-item {
    color: #ef4444;
}

.user-dropdown-item.logout-item:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

.user-dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 4px 0;
}

/* Actions rapides dans la sidebar - Spécificité maximale pour surpasser tous les autres styles */
.sidebar-actions {
    padding: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Styles de base pour les boutons d'action dans la sidebar avec spécificité maximale */
html body .sidebar-actions .action-btn,
html body .sidebar-actions .action-btn#generate-report,
html body .sidebar-actions .action-btn#export-excel,
html body .sidebar-actions button.action-btn,
html body .sidebar-actions button.action-btn#generate-report,
html body .sidebar-actions button.action-btn#export-excel,
html body .sidebar-actions .btn.action-btn,
html body .sidebar-actions .btn.action-btn#generate-report,
html body .sidebar-actions .btn.action-btn#export-excel {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    color: #64748b !important;
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    width: 100% !important;
    text-align: left !important;
    cursor: pointer !important;
    border-radius: 0.75rem !important;
    transition: var(--transition-fast) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    margin-bottom: 4px !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Styles de hover pour les boutons d'action dans la sidebar */
html body .sidebar-actions .action-btn:hover,
html body .sidebar-actions .action-btn:focus,
html body .sidebar-actions .action-btn:active,
html body .sidebar-actions .action-btn:focus-visible,
html body .sidebar-actions button.action-btn:hover,
html body .sidebar-actions button.action-btn:focus,
html body .sidebar-actions button.action-btn:active,
html body .sidebar-actions button.action-btn:focus-visible,
html body .sidebar-actions .btn.action-btn:hover,
html body .sidebar-actions .btn.action-btn:focus,
html body .sidebar-actions .btn.action-btn:active,
html body .sidebar-actions .btn.action-btn:focus-visible {
    background: rgba(85, 110, 179, 0.1) !important;
    background-color: rgba(85, 110, 179, 0.1) !important;
    background-image: none !important;
    color: #556eb3 !important;
    transform: none !important;
    box-shadow: none !important;
}

.sidebar-actions .action-btn i {
    font-size: 16px !important;
    width: 20px !important;
    text-align: center !important;
}

/* Hover spécifique pour le bouton rapport HTML - utilise le même bleu que les autres nav-items */
html body .sidebar-actions .action-btn#generate-report:hover,
html body .sidebar-actions .action-btn#generate-report:focus,
html body .sidebar-actions .action-btn#generate-report:active,
html body .sidebar-actions .action-btn#generate-report:focus-visible,
html body .sidebar-actions button.action-btn#generate-report:hover,
html body .sidebar-actions button.action-btn#generate-report:focus,
html body .sidebar-actions button.action-btn#generate-report:active,
html body .sidebar-actions button.action-btn#generate-report:focus-visible,
html body .sidebar-actions .btn.action-btn#generate-report:hover,
html body .sidebar-actions .btn.action-btn#generate-report:focus,
html body .sidebar-actions .btn.action-btn#generate-report:active,
html body .sidebar-actions .btn.action-btn#generate-report:focus-visible {
    background: rgba(85, 110, 179, 0.1) !important;
    background-color: rgba(85, 110, 179, 0.1) !important;
    background-image: none !important;
    color: #556eb3 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Hover spécifique pour le bouton export Excel */
html body .sidebar-actions .action-btn#export-excel:hover,
html body .sidebar-actions .action-btn#export-excel:focus,
html body .sidebar-actions .action-btn#export-excel:active,
html body .sidebar-actions .action-btn#export-excel:focus-visible,
html body .sidebar-actions button.action-btn#export-excel:hover,
html body .sidebar-actions button.action-btn#export-excel:focus,
html body .sidebar-actions button.action-btn#export-excel:active,
html body .sidebar-actions button.action-btn#export-excel:focus-visible,
html body .sidebar-actions .btn.action-btn#export-excel:hover,
html body .sidebar-actions .btn.action-btn#export-excel:focus,
html body .sidebar-actions .btn.action-btn#export-excel:active,
html body .sidebar-actions .btn.action-btn#export-excel:focus-visible {
    background: rgba(71, 165, 105, 0.1) !important;
    background-color: rgba(71, 165, 105, 0.1) !important;
    background-image: none !important;
    color: #47a569 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Main Content Area */
.main-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: 280px;
    padding: 0;
    background: transparent;
    width: calc(100vw - 280px);
    transition: margin-left var(--transition-medium), width var(--transition-medium);
}







.main-footer {
    margin-top: auto; /* Pousse le footer vers le bas */
    padding: 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
}

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

/* Largeur insuffisante : masquer header et sidebar réduite en plein écran */
@media (max-width: 1000px) and (min-width: 769px) {
    /* Masquer complètement le header */
    .top-header {
        display: none !important;
    }
    
    body {
        padding-top: 0; /* Supprimer le padding du header */
    }
    
    /* Sidebar réduite en plein écran avec logo en haut */
    .sidebar {
        width: 60px;
        top: 0; /* Positionner tout en haut */
        height: 100vh; /* Prendre toute la hauteur */
    }
    
    .sidebar .sidebar-header {
        padding: 12px 8px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .sidebar .sidebar-logo {
        display: none; /* Masquer le logo complet en mode réduit */
    }
    
    .sidebar .sidebar-logo-compact {
        display: block;
        height: 36px;
        width: 36px;
        object-fit: contain;
    }
    
    .sidebar .sidebar-nav {
        padding: 20px 0; /* Supprimer le padding horizontal pour éviter le décalage */
    }
    
    .sidebar .sidebar-profile {
        margin: 0 6px 6px 6px;
        padding: 0;
        flex-direction: column;
        gap: 0;
        align-items: center;
    }
    
    .sidebar .profile-info {
        display: none;
    }
    
    .sidebar .profile-avatar {
        width: 48px;
        height: 48px;
        font-size: 20px;
        margin: 0;
        border-radius: 50%;
        background: #556eb3;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        border: none;
        box-shadow: none;
    }
    
    /* User menu compact pour tablette */
    .sidebar .sidebar-user-menu {
        padding: 8px 6px;
        margin-bottom: 8px;
    }
    
    .sidebar .user-menu-info {
        display: none;
    }
    
    .sidebar .user-menu-chevron {
        display: none;
    }
    
    .sidebar .user-menu-avatar {
        width: 48px;
        height: 48px;
    }
    
    .sidebar .user-menu-btn {
        justify-content: center;
        padding: 0;
    }
    
    .sidebar .nav-item span {
        display: none;
    }
    
    .sidebar .nav-item {
        justify-content: center;
        padding: 0;
        margin: 0 6px 6px 6px;
        border-radius: 0.75rem;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        box-sizing: border-box;
    }
    
    .sidebar .nav-item i {
        margin: 0;
        font-size: 18px;
    }
    
    .sidebar .sidebar-footer {
        padding: 12px 0; /* Supprimer le padding horizontal pour éviter le décalage */
    }
    
    .sidebar .logout-btn span {
        display: none;
    }
    
    .sidebar .logout-btn {
        justify-content: center;
        padding: 0;
        margin: 0 6px;
        border-radius: 0.75rem;
        width: 48px;
        height: 48px;
        box-sizing: border-box;
    }
    
    .sidebar .logout-btn i {
        font-size: 18px;
    }
    
    .sidebar .sidebar-actions {
        padding: 12px 0;
    }
    
    .sidebar .sidebar-actions .action-btn span {
        display: none;
    }
    
    .sidebar .sidebar-actions .action-btn,
    html body .sidebar .sidebar-actions .action-btn,
    html body .sidebar .sidebar-actions .action-btn#generate-report,
    html body .sidebar .sidebar-actions .action-btn#export-excel,
    html body .sidebar .sidebar-actions button.action-btn,
    html body .sidebar .sidebar-actions button.action-btn#generate-report,
    html body .sidebar .sidebar-actions button.action-btn#export-excel,
    html body .sidebar .sidebar-actions .btn.action-btn,
    html body .sidebar .sidebar-actions .btn.action-btn#generate-report,
    html body .sidebar .sidebar-actions .btn.action-btn#export-excel {
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 6px 6px 6px !important;
        border-radius: 0.75rem !important;
        width: 48px !important;
        height: 48px !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        gap: 0 !important;
    }
    
    .sidebar .sidebar-actions .action-btn i,
    html body .sidebar .sidebar-actions .action-btn i {
        font-size: 18px !important;
        margin: 0 !important;
        width: auto !important;
        text-align: center !important;
    }
    
    .main-content {
        margin-left: 60px;
        width: calc(100vw - 60px);
    }
    
    /* Pas besoin d'ajuster le footer en mode réduit car il n'est plus fixed */
}



/* ===============================================
   SYSTÈME DE CARTES GLASSMORPHISME UNIFIÉ
   =============================================== */
.glass-card, .card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    border: 2px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius-lg);
    transition: var(--transition-medium);
    border: none;
    /* min-height supprimé - géré individuellement par chaque type de carte */
}

/* Supprimer les contours et fonds carrés des cartes */
.card-body {
    background: transparent !important;
    border: none !important;
    padding: 0.8rem; /* Padding uniforme augmenté pour plus de cohérence */
}

/* Alignement des paddings entre les cartes filtres et actions - padding uniforme */
.glass-card .card-body {
    padding: 0.8rem !important; /* Padding uniforme augmenté pour toutes les cartes */
}

/* Supprimer le padding en bas uniquement de la carte principale des détails des tests */
.glass-card:has(.component-card-success, .component-card-danger, .component-card-warning, .component-card-secondary) .card-body {
    padding-bottom: 0 !important;
}

/* Style pour input-group-text transparent - logique simple */
.input-group-text.bg-transparent {
    background-color: white !important;
    border: 2px solid #e2e8f0 !important;
    padding: 0.625rem 1rem !important;
    transition: var(--transition-fast) !important;
}

/* Curseur pointer et effet hover pour tous les input-group-text cliquables */
.input-group-text[onclick] {
    cursor: pointer !important;
    transition: var(--transition-fast) !important;
}

.input-group-text[onclick]:hover {
    background-color: #556eb3 !important;
    border-color: #556eb3 !important;
    color: white !important;
}

.input-group-text[onclick]:hover i {
    color: white !important;
}

/* Premier élément (icône search) : arrondis à gauche, pas de border-right */
.input-group .input-group-text:first-child {
    border-radius: 0.75rem 0 0 0.75rem !important;
    border-right: none !important;
}

/* Dernier élément (bouton clear) : arrondis à droite, pas de border-left */
.input-group .input-group-text:last-child {
    border-radius: 0 0.75rem 0.75rem 0 !important;
    border-left: none !important;
}

/* Focus spécifique pour la barre de recherche globale */
#global-search-input {
    transition: var(--transition-fast) !important;
}

#global-search-input:focus {
    background: var(--field-bg-focus) !important;
    border-color: var(--field-border-focus) !important;
    /* Pas de box-shadow sur les côtés - sera sur le conteneur */
    box-shadow: none !important;
    outline: none !important;
}

/* Focus unifié pour toute la barre de recherche */
#global-search-input:focus + .input-group-text,
#global-search-input:focus ~ .input-group-text {
    border-color: var(--field-border-focus) !important;
    transition: var(--transition-fast) !important;
}

/* Focus sur l'icône de recherche quand le champ est en focus */
.input-group:has(#global-search-input:focus) .input-group-text:first-child {
    border-color: var(--field-border-focus) !important;
}

/* Box-shadow unifié sur tout le conteneur de la barre de recherche */
.input-group:has(#global-search-input:focus) {
    box-shadow: 0 0 0 0.25rem var(--field-shadow-focus) !important;
    border-radius: 0.75rem !important;
    transition: var(--transition-fast) !important;
}

/* Style simple pour input-group : adaptation des coins arrondis seulement */
.input-group .form-control {
    margin-bottom: 0 !important;
}

/* Form-control au milieu (entre input-group-text) : pas d'arrondis, pas de border left/right */
.input-group .form-control:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
}

/* Input avec bouton à droite : coins arrondis à gauche seulement */
.input-group .form-control:first-child:not(:last-child) {
    border-radius: 0.75rem 0 0 0.75rem !important;
}

/* Bouton à droite de l'input : coins arrondis à droite seulement */
.input-group .btn:last-child {
    border-radius: 0 0.75rem 0.75rem 0 !important;
}

/* Select seul dans un input-group - coins arrondis complets */
.input-group .form-select:only-child {
    border-radius: 0.75rem !important;
}

/* ===============================================
   CHECKBOXES PERSONNALISÉES - BLEU APP
   =============================================== */

/* Style personnalisé pour toutes les checkboxes */
.form-check-input[type="checkbox"] {
    width: 1.2em !important;
    height: 1.2em !important;
    border: 2px solid #d1d5db !important;
    border-radius: 0.25rem !important;
    background-color: white !important;
    background-image: none !important;
    transition: var(--transition-fast) !important;
    cursor: pointer !important;
    vertical-align: top !important;
    margin-top: 0.1em !important;
}

.form-check-input[type="checkbox"]:checked {
    background-color: #556eb3 !important;
    border-color: #556eb3 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3e%3cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3e%3c/svg%3e") !important;
}

.form-check-input[type="checkbox"]:focus {
    border-color: #556eb3 !important;
    box-shadow: 0 0 0 0.2rem rgba(85, 110, 179, 0.25) !important;
}

.form-check-input[type="checkbox"]:hover {
    border-color: #556eb3 !important;
}

/* Style pour les labels des checkboxes */
.form-check-label {
    cursor: pointer !important;
    color: #374151 !important;
    font-weight: 500 !important;
    margin-left: 0.8rem !important;
}

/* ===============================================
   BARRES DE DÉFILEMENT PERSONNALISÉES - BLEU APP
   =============================================== */

/* Webkit scrollbars (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-radius: 4px !important;
}

::-webkit-scrollbar-thumb {
    background: #556eb3 !important;
    border-radius: 4px !important;
    transition: background var(--transition-fast) !important;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a5ba3 !important;
}

::-webkit-scrollbar-corner {
    background: #f1f5f9 !important;
}

/* Firefox scrollbars */
* {
    scrollbar-width: thin !important;
    scrollbar-color: #556eb3 #f1f5f9 !important;
}

/* Suppression de toute la logique complexe focus-within
   Les form-control gèrent leur propre focus naturellement */

/* Supprimé : conflictuel avec la logique d'éléments multiples */



/* Style pour le wrapper de select avec icône */
.role-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: var(--transition-medium);
}

.role-select-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.1);
}

.role-icon-display {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
}

.role-select-wrapper .form-select {
    padding-right: 4.5rem;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.role-select-wrapper .form-select:focus {
    box-shadow: none !important;
    outline: none !important;
}

/* ========== SYSTÈME UNIFIÉ DE BOUTONS ========== */

/* BOUTONS DANS INPUT-GROUP (côté droit) - Style unifié */
html body #add-filter-btn,
html body .btn#add-filter-btn,
html body #password-toggle-btn,
html body .btn#password-toggle-btn,
html body #confirm-password-toggle-btn,
html body .btn#confirm-password-toggle-btn,
html body #edit-password-toggle-btn,
html body .btn#edit-password-toggle-btn,
html body #edit-confirm-password-toggle-btn,
html body .btn#edit-confirm-password-toggle-btn {
    background: white !important;
    border: 2px solid #e2e8f0 !important;
    color: #333 !important;
    border-radius: 0 0.75rem 0.75rem 0 !important;
    transition: background-color var(--transition-fast), 
                border-color var(--transition-fast), 
                color var(--transition-fast), 
                box-shadow var(--transition-fast) !important;
}

html body #add-filter-btn:hover,
html body .btn#add-filter-btn:hover,
html body #password-toggle-btn:hover,
html body .btn#password-toggle-btn:hover,
html body #confirm-password-toggle-btn:hover,
html body .btn#confirm-password-toggle-btn:hover,
html body #edit-password-toggle-btn:hover,
html body .btn#edit-password-toggle-btn:hover,
html body #edit-confirm-password-toggle-btn:hover,
html body .btn#edit-confirm-password-toggle-btn:hover {
    background: linear-gradient(90deg, rgba(85, 110, 179, 1) 25%, rgba(102, 107, 173, 1) 100%) !important;
    color: white !important;
    border-color: #556eb3 !important;
    box-shadow: 0 4px 12px rgba(85, 110, 179, 0.4) !important;
}

.card-header {
    background: transparent !important;
    border-bottom: none !important;
    border-radius: 0.8rem 0.8rem 0 0 !important;
}

/* Flexbox spécifique pour les en-têtes de cartes avec badges */
.card-header.d-flex.justify-content-between.align-items-center {
    align-items: center !important;
    min-height: 60px !important;
}

.card-header.d-flex.justify-content-between.align-items-center h6 {
    margin: 0 !important;
    line-height: 1.5 !important;
    flex: 1 !important;
}

/* Style spécial pour l'affichage JSON avec styles uniformes */
.json-display-card {
    font-family: 'Courier New', monospace;
    background-color: #ffffff !important;
    border-radius: 0 0 0.8rem 0.8rem !important;
}

/* Transition fluide pour l'ouverture/fermeture de la carte JSON */
#jsonCollapse {
    transition: none !important; /* Laisser Bootstrap gérer */
}

#jsonCollapse.collapsing {
    transition: var(--transition-slow) !important;
    overflow: hidden !important;
}

.json-pre {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 1rem;
    border-radius: 0.8rem;
    max-height: 500px;
    overflow-y: auto;
    font-size: 0.875rem;
    color: #333;
    margin: 0;
}

.glass-card:hover, .card:hover {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 40px 0 rgba(85, 110, 179, 0.18);
    border-color: rgba(255, 255, 255, 0.6);
}



/* Supprimer l'effet hover pour les cartes de contenu (sauf cartes de stats) */
.glass-card:not(.stats-card):hover {
    transform: none !important;
}

/* Cartes de statistiques avec transitions complètes */
.stats-card {
    transform: translateY(0px) scale(1.0) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    box-shadow: 0 8px 32px 0 rgba(85, 110, 179, 0.12) !important;
    flex: 1 1 auto !important; /* Utiliser flex au lieu de min-width fixe */
    max-width: 100% !important;
    overflow: hidden !important; /* Forcer la carte à ne pas déborder */
}

.stats-card:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 12px 48px 0 rgba(85, 110, 179, 0.45) !important;
}

/* Cartes de stats - padding uniforme avec centrage vertical garanti */
.stats-card .card-body {
    padding: 0.8rem !important;
    display: flex !important;
    align-items: center !important;
    min-height: 85px !important;
    overflow: hidden !important; /* Empêcher le débordement du contenu */
}

/* Espacement optimisé pour les cartes de stats - utiliser Bootstrap uniquement */

.stats-card .card-title {
    font-size: 0.875rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0.8rem !important;
    font-weight: 500 !important;
}

.stats-card h4 {
    font-size: 1.2rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    width: 100% !important; /* CORRECTION CRITIQUE : sans width définie, text-overflow ne fonctionne pas */
}



/* Évolutions des statistiques - gestion des débordements */
.stats-card small {
    font-size: 0.7rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
}

/* Gradients pour cartes statistiques - Couleurs vives */
.gradient-green { 
    background: linear-gradient(135deg, #4caf50, #388e3c) !important;
    color: white !important;
}
.gradient-blue { 
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%) !important;
    color: white !important;
}
.gradient-blue-soft { 
    background: linear-gradient(135deg, #556EB3 0%, #4a5d95 100%) !important;
    color: white !important;
}
.gradient-pink { 
    background: linear-gradient(135deg, #e91e63, #c2185b) !important;
    color: white !important;
}
.gradient-orange { 
    background: linear-gradient(135deg, #ff9800, #f57c00) !important;
    color: white !important;
}

.gradient-purple { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

/* Nombres des cartes stats avec couleurs vives */
#total-tests {
    color: #4caf50 !important;
    font-weight: 700 !important;
}

#recent-tests {
    color: #4caf50 !important;
    font-weight: 700 !important;
}

#unique-oe {
    color: #2196f3 !important;
    font-weight: 700 !important;
}

#unique-manufacturers {
    color: #e91e63 !important;
    font-weight: 700 !important;
}

/* Règle avec priorité maximale pour top-tester */
.stats-card .card-body #top-tester.fw-bold {
    color: #e91e63 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    max-width: 100% !important;
}

/* ========================================= */
/* STYLES TABLES - ORGANISATION COMPLÈTE    */
/* ========================================= */

/* 1. Base table glassmorphisme */
.table {
    background: transparent;
    color: #334155;
}

/* 2. En-têtes de table */
.table thead th {
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 2px solid rgba(85, 110, 179, 0.1);
    color: #1e293b;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    padding: 1rem 0.75rem;
    user-select: none;
    transition: var(--transition-fast);
}

.table thead th[onclick]:hover {
    background-color: rgba(85, 110, 179, 0.05);
    color: rgba(85, 110, 179, 1);
}

/* 3. Cellules de contenu */
.table tbody td,
.table tbody th {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3) !important;
}

/* 4. Lignes de table - base et transitions */
.table tbody tr {
    cursor: pointer;
    transition: var(--transition-medium);
}

.table tbody tr:last-child td,
.table tbody tr:last-child th {
    border-bottom: none !important;
}

/* 5. Override Bootstrap 5 CSS variables */
.table-hover {
    --bs-table-accent-bg: rgba(59, 130, 246, 0.1);
    --bs-table-hover-bg: rgba(59, 130, 246, 0.1);
    --bs-table-hover-color: inherit;
}

.table-striped {
    --bs-table-accent-bg: rgba(85, 110, 179, 0.03);
    --bs-table-striped-bg: rgba(85, 110, 179, 0.03);
}

/* 6. Lignes alternées (striped) */
#results-table-element.table.table-striped > tbody > tr:nth-of-type(odd) > td,
#results-table-element.table.table-striped > tbody > tr:nth-of-type(odd) > th,
table.table.table-striped > tbody > tr:nth-of-type(odd) > td,
table.table.table-striped > tbody > tr:nth-of-type(odd) > th {
    background-color: rgba(85, 110, 179, 0.03) !important;
    --bs-table-accent-bg: rgba(85, 110, 179, 0.03) !important;
}

#results-table-element.table.table-striped > tbody > tr:nth-of-type(even) > td,
#results-table-element.table.table-striped > tbody > tr:nth-of-type(even) > th,
table.table.table-striped > tbody > tr:nth-of-type(even) > td,
table.table.table-striped > tbody > tr:nth-of-type(even) > th {
    background-color: transparent !important;
    --bs-table-accent-bg: transparent !important;
}

/* 7. Hover effects - spécificité maximale */
#results-table-element.table.table-hover.table-striped > tbody > tr:hover > td,
#results-table-element.table.table-hover.table-striped > tbody > tr:hover > th,
#results-table-element.table.table-hover > tbody > tr:hover > td,
#results-table-element.table.table-hover > tbody > tr:hover > th,
table.table.table-hover.table-striped > tbody > tr:hover > td,
table.table.table-hover.table-striped > tbody > tr:hover > th,
table.table.table-hover > tbody > tr:hover > td,
table.table.table-hover > tbody > tr:hover > th,
.table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th {
    background-color: rgba(59, 130, 246, 0.1) !important;
    color: inherit !important;
    box-shadow: none !important;
    --bs-table-accent-bg: rgba(59, 130, 246, 0.1) !important;
    --bs-table-hover-bg: rgba(59, 130, 246, 0.1) !important;
}

/* ===============================================
   SYSTÈME GÉNÉRAL - CHAMPS DE SAISIE AMÉLIORÉS
   =============================================== */

/* Champ de saisie amélioré générique - réutilisable partout */
.field-enhanced {
    background: var(--field-bg) !important;
    backdrop-filter: blur(4px) !important;
    border: 2px solid var(--field-border) !important;
    border-radius: var(--border-radius-sm) !important;
    color: var(--field-color) !important;
    font-weight: var(--field-font-weight) !important;
    transition: var(--field-transition) !important;
    padding: var(--field-padding) !important;
    font-size: var(--field-font-size) !important;
}

.field-enhanced:focus {
    background: var(--field-bg-focus) !important;
    border-color: var(--field-border-focus) !important;
    box-shadow: 0 0 0 0.25rem var(--field-shadow-focus) !important;
    outline: none !important;
}

/* Textarea spécifique - réutilisable */
.field-enhanced.textarea {
    resize: vertical !important;
}

/* ===============================================
   FONCTIONNALITÉ ADB - ANIMATIONS ET FEEDBACK
   =============================================== */

/* Animation de succès pour champs auto-remplis */
.field-enhanced-success {
    border-color: var(--bs-success) !important;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25) !important;
    animation: fieldFillSuccess 0.8s ease-in-out;
    background: rgba(25, 135, 84, 0.05) !important;
}

@keyframes fieldFillSuccess {
    0% { 
        background-color: rgba(25, 135, 84, 0.15);
        transform: scale(1.02);
    }
    50% { 
        background-color: rgba(25, 135, 84, 0.1);
    }
    100% { 
        background-color: rgba(25, 135, 84, 0.05);
        transform: scale(1);
    }
}

/* Animation de frappe simulée */
.field-typing {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15) !important;
    animation: typingBlink 1s infinite;
}

@keyframes typingBlink {
    0%, 50% { 
        border-color: var(--bs-primary);
    }
    51%, 100% { 
        border-color: rgba(13, 110, 253, 0.5);
    }
}

/* Bouton ADB avec états visuels */
#listenAdbBtn {
    transition: all 0.3s ease;
}

#listenAdbBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#listenAdbBtn.listening {
    background-color: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

/* Statuts ADB améliorés */
#adbStatus {
    font-size: 0.9rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
}

#adbStatus .alert {
    margin-bottom: 0;
    padding: 0.75rem;
    border: none;
    backdrop-filter: blur(4px);
}

#adbStatus .alert-info {
    background: rgba(13, 202, 240, 0.1);
    color: var(--bs-info);
    border-left: 4px solid var(--bs-info);
}

#adbStatus .alert-success {
    background: rgba(25, 135, 84, 0.1);
    color: var(--bs-success);
    border-left: 4px solid var(--bs-success);
    animation: statusSuccess 0.5s ease-in-out;
}

#adbStatus .alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--bs-danger);
    border-left: 4px solid var(--bs-danger);
    animation: statusError 0.5s ease-in-out;
}

@keyframes statusSuccess {
    0% { transform: translateY(-10px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes statusError {
    0% { transform: translateX(-5px); }
    25% { transform: translateX(5px); }
    50% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
    100% { transform: translateX(0); }
}

/* Icônes animées pour les statuts */
#adbStatus .fa-spin {
    animation: fa-spin 1s infinite linear;
}

#adbStatus .fa-check {
    animation: checkBounce 0.6s ease-in-out;
}

#adbStatus .fa-exclamation-triangle {
    animation: errorShake 0.6s ease-in-out;
}

@keyframes checkBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* Responsiveness pour le bouton ADB */
@media (max-width: 768px) {
    #listenAdbBtn {
        width: 100%;
        margin-bottom: 0.8rem;
    }
    
    #adbStatus {
        margin-top: 0;
    }
}

/* ===============================================
   SYSTÈME GÉNÉRAL - CARTES DE STATUT
   =============================================== */

/* Carte avec statut générique - réutilisable */
.card-status {
    border-radius: 0.8rem !important;
    transition: var(--transition-fast) !important;
}

.card-status:hover {
    scale: 1.02 !important;
}

/* Variantes de couleurs - système modulaire */
.card-status.success {
    background: rgba(40, 167, 69, 0.4) !important;
}
.card-status.success:hover {
    background: rgba(40, 167, 69, 0.5) !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3) !important;
}

.card-status.danger {
    background: rgba(220, 53, 69, 0.4) !important;
}
.card-status.danger:hover {
    background: rgba(220, 53, 69, 0.5) !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3) !important;
}

.card-status.warning {
    background: rgba(255, 193, 7, 0.4) !important;
}
.card-status.warning:hover {
    background: rgba(255, 193, 7, 0.5) !important;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3) !important;
}

.card-status.secondary {
    background: rgba(226, 232, 240, 0.4) !important;
}
.card-status.secondary:hover {
    background: rgba(226, 232, 240, 0.5) !important;
}

/* Champs dans cartes de statut - système modulaire */
.card-status.success .field-enhanced {
    border-color: var(--status-success-solid) !important;
}
.card-status.success .field-enhanced:focus {
    border-color: var(--status-success-solid) !important;
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.2) !important;
}

.card-status.danger .field-enhanced {
    border-color: var(--status-danger-solid) !important;
}
.card-status.danger .field-enhanced:focus {
    border-color: var(--status-danger-solid) !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.2) !important;
}

.card-status.warning .field-enhanced {
    border-color: var(--status-warning-solid) !important;
}
.card-status.warning .field-enhanced:focus {
    border-color: var(--status-warning-solid) !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.2) !important;
}

.card-status.secondary .field-enhanced {
    border-color: var(--status-secondary-solid) !important;
}
.card-status.secondary .field-enhanced:focus {
    border-color: var(--status-secondary-solid) !important;
    box-shadow: 0 0 0 0.25rem rgba(107, 114, 128, 0.2) !important;
}

/* ===============================================
   SYSTÈME UNIFIÉ - LEGACY COMPATIBILITY (À MIGRER)
   =============================================== */

/* Base pour tous les champs de saisie */
.form-control, 
.form-select, 
.device-field,
.component-comment-input,
.component-total-capacity-input {
    background: var(--field-bg) !important;
    backdrop-filter: blur(4px) !important;
    border: 2px solid var(--field-border) !important;
    border-radius: var(--border-radius-sm) !important;
    color: var(--field-color) !important;
    font-weight: var(--field-font-weight) !important;
    transition: var(--field-transition) !important;
    padding: var(--field-padding) !important;
    font-size: var(--field-font-size) !important;
}

/* Flèche pour TOUS les champs select - spécificité maximale */
.form-select,
.input-group .form-select,
html body .form-select,
html body .input-group .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='%23000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 6.5 6.5L14 6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    padding-right: 2.5rem !important;
    background-attachment: scroll !important;
}

/* États focus unifiés - legacy et nouveau système */
.form-control:focus, 
.form-select:focus, 
.field-enhanced:focus,
.device-field:focus,
.component-comment-input:focus,
.component-total-capacity-input:focus {
    background: var(--field-bg-focus) !important;
    border-color: var(--field-border-focus) !important;
    box-shadow: 0 0 0 0.25rem var(--field-shadow-focus) !important;
    outline: none !important;
}



.form-label {
    color: #475569;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.8rem;
}

/* Astérisques rouges pour les champs obligatoires */
.form-label .required-asterisk {
    color: #dc3545 !important;
    font-weight: bold;
}

/* Classe supprimée - utilisation de unified-select */

/* Modals glassmorphisme */
.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 0.8rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.8rem 0.8rem 0 0;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0 0 0.8rem 0.8rem;
}

/* Status badges */
.status-success {
    background-color: var(--bs-success) !important;
}

.status-danger {
    background-color: var(--bs-danger) !important;
}

.status-warning {
    background-color: var(--bs-warning) !important;
}

/* Navigation glassmorphisme */
.navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 24px 0 rgba(59, 130, 246, 0.08);
}

.navbar-brand {
    color: #1e293b !important;
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    color: #475569 !important;
    font-weight: 500;
    transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease !important;
    border-radius: 0.75rem;
    padding: 0.8rem 1rem !important;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
    color: #556eb3 !important;
    background: rgba(85, 110, 179, 0.1);
    transform: translateY(-2px);
}

/* Footer glassmorphisme */
footer {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #64748b !important;
}



/* Loading spinner avec animation fluide */
.fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* Animations fluides - RÉDUITES pour éviter l'effet de chargement */
.transition-smooth { 
    transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important; 
    /* Suppression de transform et opacity pour éviter l'effet de balayage */
}

/* Effet hover pour les cartes GET API avec transition spécifique */
.hover-lift-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.hover-lift-card:hover {
    transform: scale(1.02) translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* ===============================================
   SYSTÈME UNIFIÉ DE BADGES - PLUS DE DOUBLONS
   =============================================== */

/* Badge de base - styles communs */
.badge {
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Badges circulaires pour statuts avec icônes uniquement */
.badge-status {
    width: 2rem !important;
    height: 2rem !important;
    min-width: 2rem !important;
    min-height: 2rem !important;
    max-width: 2rem !important;
    max-height: 2rem !important;
    padding: 0 !important;
    border-radius: var(--border-radius-circle) !important;
    font-size: 0.75rem !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

/* Badges rectangulaires pour informations textuelles */
.badge-info {
    padding: 0.8rem 1rem !important;
    border-radius: var(--border-radius-md) !important;
    min-width: fit-content !important;
    width: auto !important;
    height: auto !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    white-space: nowrap !important;
}

/* ===============================================
   COULEURS DE BADGES - SYSTÈME COHÉRENT
   =============================================== */

/* Badges de statut - couleurs simples et cohérentes avec variables */
.badge-status.bg-success { background: var(--color-success) !important; color: white !important; }
.badge-status.bg-danger { background: var(--color-danger) !important; color: white !important; }
.badge-status.bg-warning { background: var(--color-warning) !important; color: white !important; }
.badge-status.bg-secondary { background: var(--color-secondary) !important; color: white !important; }
.badge-status.bg-info { background: var(--color-info) !important; color: white !important; }
.badge-status.bg-pink { background: #e91e63 !important; color: white !important; }

/* Badges d'information - couleurs cohérentes */
.badge-info.bg-secondary { background: #e2e8f0 !important; color: #475569 !important; }
.badge-info.bg-primary { background: #556EB3 !important; color: white !important; }

/* Badge de base avec couleurs Bootstrap conservées */
.bg-pink { background: #e91e63 !important; color: white !important; }

/* DEPRECATED - REMPLACÉ PAR SYSTÈME .card-status 
   ===============================================
   Ces styles seront supprimés une fois la migration terminée vers .card-status
   =============================================== */

/* Styles de base pour toutes les cartes de composants avec arrondi adapté au contenu */
.component-card-success,
.component-card-danger,
.component-card-warning,
.component-card-secondary {
    border-radius: 0.8rem !important; /* Arrondi de contenu, comme les form-control */
}

/* Couleurs spécifiques pour chaque type de carte */
.component-card-success {
    background: rgba(40, 167, 69, 0.4) !important;
}

.component-card-success:hover {
    background: rgba(40, 167, 69, 0.5) !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3) !important;
    scale: 1.02 !important;
}

.component-card-danger {
    background: rgba(220, 53, 69, 0.4) !important;
}

.component-card-danger:hover {
    background: rgba(220, 53, 69, 0.5) !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3) !important;
    scale: 1.02 !important;
}

.component-card-warning {
    background: rgba(255, 193, 7, 0.4) !important;
}

.component-card-warning:hover {
    background: rgba(255, 193, 7, 0.5) !important;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3) !important;
    scale: 1.02 !important;
}

.component-card-secondary {
    background: white !important;
}

.component-card-secondary:hover {
    background: white !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.2) !important;
    scale: 1.02 !important;
}

/* ===============================================
   POSITIONNEMENT SPÉCIAL DES BADGES
   =============================================== */

/* Badge de statut dans le header - plus de positionnement absolu */
.component-status-badge {
    /* Supprimé - maintenant intégré dans le header */
}

/* Sélecteur de statut dans le header - utilise unified-select */

/* ===============================================
   SURCHARGES CONTEXTUELLES - CARTES DE COMPOSANTS
   =============================================== */

/* Seules les bordures changent selon le contexte, tout le reste est hérité du système unifié */
.component-card-success .form-control,
.component-card-success .form-select,
.component-card-success .component-comment-input,
.component-card-success .component-total-capacity-input {
    border-color: var(--status-success-solid) !important;
}

.component-card-danger .form-control,
.component-card-danger .form-select,
.component-card-danger .component-comment-input,
.component-card-danger .component-total-capacity-input {
    border-color: var(--status-danger-solid) !important;
}

.component-card-warning .form-control,
.component-card-warning .form-select,
.component-card-warning .component-comment-input,
.component-card-warning .component-total-capacity-input {
    border-color: var(--status-warning-solid) !important;
}

.component-card-secondary .form-control,
.component-card-secondary .form-select,
.component-card-secondary .component-comment-input,
.component-card-secondary .component-total-capacity-input {
    border-color: var(--status-secondary-solid) !important;
}

/* États focus avec couleurs contextuelles */
.component-card-success .form-control:focus,
.component-card-success .form-select:focus,
.component-card-success .component-comment-input:focus,
.component-card-success .component-total-capacity-input:focus {
    border-color: var(--status-success-solid) !important;
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.2) !important;
}

.component-card-danger .form-control:focus,
.component-card-danger .form-select:focus,
.component-card-danger .component-comment-input:focus,
.component-card-danger .component-total-capacity-input:focus {
    border-color: var(--status-danger-solid) !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.2) !important;
}

.component-card-warning .form-control:focus,
.component-card-warning .form-select:focus,
.component-card-warning .component-comment-input:focus,
.component-card-warning .component-total-capacity-input:focus {
    border-color: var(--status-warning-solid) !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.2) !important;
}

.component-card-secondary .form-control:focus,
.component-card-secondary .form-select:focus,
.component-card-secondary .component-comment-input:focus,
.component-card-secondary .component-total-capacity-input:focus {
    border-color: var(--status-secondary-solid) !important;
    box-shadow: 0 0 0 0.25rem rgba(107, 114, 128, 0.2) !important;
}

/* ====================================================================== */
/* BOUTONS - STYLE ULTRA-BASIQUE                                         */
/* ====================================================================== */

/* STYLE DE BASE POUR TOUS LES BOUTONS (sauf avatars et spéciaux) - EXCLUANT btn-filled */
html body .btn:not(.avatar-option):not(.avatar-option-create):not(.btn-filled) {
    background: white !important;
    border: 2px solid #e2e8f0 !important;
    color: #333 !important;
    padding: 8px 16px !important;
    border-radius: 0.75rem !important;
    font-weight: normal !important;
    /* Transition spécifique pour éviter conflit avec outlined buttons */
    transition: background-color var(--transition-fast), 
                border-color var(--transition-fast), 
                color var(--transition-fast), 
                box-shadow var(--transition-fast) !important;
}

/* HOVER GÉNÉRAL POUR TOUS LES BOUTONS - EXCLUANT btn-filled */
html body .btn:not(.avatar-option):not(.avatar-option-create):not(.btn-filled):hover {
    background: linear-gradient(90deg, rgba(85, 110, 179, 1) 25%, rgba(102, 107, 173, 1) 100%) !important;
    color: white !important;
    border-color: #556eb3 !important;
    box-shadow: 0 4px 12px rgba(85, 110, 179, 0.4) !important;
}

/* OVERRIDE SPÉCIFIQUE - Boutons danger ont hover rouge - SPÉCIFICITÉ RENFORCÉE */
html body .btn.btn-outline-danger:not(.avatar-option):not(.avatar-option-create):hover,
html body .btn-outline-danger:not(.avatar-option):not(.avatar-option-create):hover,
html body .table td .btn-sm.btn-outline-danger:hover {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    color: white !important;
    border-color: #dc3545 !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4) !important;
}

/* BOUTON DANGER REMPLI - Rouge vif */
html body .btn-danger,
html body .btn.btn-danger,
html body button.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    background-image: linear-gradient(135deg, #dc3545, #c82333) !important;
    background-color: #dc3545 !important;
    border: none !important;
    border-color: transparent !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 0.75rem !important;
    font-weight: normal !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
}

html body .btn-danger:hover,
html body .btn.btn-danger:hover,
html body button.btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #bd2130) !important;
    background-image: linear-gradient(135deg, #c82333, #bd2130) !important;
    background-color: #c82333 !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.5) !important;
    transform: translateY(-1px) !important;
}

/* BOUTONS TOGGLE FIXES - Largeur standardisée SEULEMENT pour le bouton toggle qui change d'icône */
.btn-toggle-fixed {
    min-width: 3rem !important; /* Largeur fixe pour que pause et play aient exactement la même taille */
    width: 3rem !important; /* Largeur fixe absolue */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* BOUTONS btn-sm - NORMALISER TOUS LES BOUTONS PETITS */
/* Tous les boutons btn-sm auront la même taille que les boutons normaux */
html body .btn-sm,
html body .btn.btn-sm,
html body button.btn-sm,
html body .table td .btn-sm,
html body table .btn-sm,
html body .table .btn-sm {
    padding: 8px 16px !important;          /* Même padding que les boutons normaux */
    font-size: 1rem !important;           /* Même taille de police que les boutons normaux */
    line-height: 1.5 !important;          /* Même hauteur de ligne */
    min-height: auto !important;
    border-radius: 0.75rem !important;    /* Même border-radius que les autres boutons */
    font-weight: normal !important;       /* Même font-weight */
}

/* Spécifique au bouton supprimer du tableau */
html body .table td .btn-sm.btn-outline-danger {
    padding: 0.625rem 1.25rem !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    font-weight: 600 !important;
    min-width: auto !important;
    height: auto !important;
}





/* BOUTONS FILLED - Dégradé bleu rempli - Style générique réutilisable avec spécificité maximale */
html body .btn-filled,
html body .btn.btn-filled,
html body button.btn-filled,
html body .btn-filled.btn,
html body .btn.btn-filled.btn,
html body button.btn-filled.btn {
    background: linear-gradient(90deg, rgba(85, 110, 179, 1) 25%, rgba(102, 107, 173, 1) 100%) !important;
    background-image: linear-gradient(90deg, rgba(85, 110, 179, 1) 25%, rgba(102, 107, 173, 1) 100%) !important;
    background-color: #556eb3 !important;
    border: none !important;
    border-color: transparent !important;
    color: white !important;
    box-sizing: border-box !important;
    background-clip: padding-box !important;
    border-radius: 0.75rem !important;
    box-shadow: inset 0 0 0 2px transparent !important;
    padding: 8px 16px !important;
    font-weight: normal !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
}

html body .btn-filled:hover,
html body .btn.btn-filled:hover,
html body button.btn-filled:hover,
html body .btn-filled.btn:hover,
html body .btn.btn-filled.btn:hover,
html body button.btn-filled.btn:hover,
html body .btn-filled:focus,
html body .btn.btn-filled:focus,
html body button.btn-filled:focus,
html body .btn-filled.btn:focus,
html body .btn.btn-filled.btn:focus,
html body button.btn-filled.btn:focus,
html body .btn-filled:active,
html body .btn.btn-filled:active,
html body button.btn-filled:active,
html body .btn-filled.btn:active,
html body .btn.btn-filled.btn:active,
html body button.btn-filled.btn:active,
html body .btn-filled:focus-visible,
html body .btn.btn-filled:focus-visible,
html body button.btn-filled:focus-visible,
html body .btn-filled.btn:focus-visible,
html body .btn.btn-filled.btn:focus-visible,
html body button.btn-filled.btn:focus-visible {
    background: linear-gradient(90deg, rgba(106, 130, 200, 1) 25%, rgba(123, 128, 194, 1) 100%) !important;
    background-image: linear-gradient(90deg, rgba(106, 130, 200, 1) 25%, rgba(123, 128, 194, 1) 100%) !important;
    background-color: #6a82c8 !important;
    border: none !important;
    border-color: transparent !important;
    outline: none !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(106, 130, 200, 0.4), inset 0 0 0 2px transparent !important;
    box-sizing: border-box !important;
    background-clip: padding-box !important;
}

/* Nouveau style btn-filled-toggle pour les boutons de recherche : sans translate, avec bordure */
html body .btn-filled-toggle,
html body .btn.btn-filled-toggle,
html body button.btn-filled-toggle,
html body .btn-filled-toggle.btn,
html body .btn.btn-filled-toggle.btn,
html body button.btn-filled-toggle.btn,
html body #toggleJsonEdit.btn-filled-toggle,
html body #showJsonBtn.btn-filled-toggle,
html body #search-comments-toggle.btn-filled-toggle,
html body #search-specifications-toggle.btn-filled-toggle,
html body #toggleJsonEdit.btn-filled-toggle:focus,
html body #toggleJsonEdit.btn-filled-toggle:active,
html body #toggleJsonEdit.btn-filled-toggle:hover {
    background: linear-gradient(90deg, rgba(85, 110, 179, 1) 25%, rgba(102, 107, 173, 1) 100%) !important;
    background-image: linear-gradient(90deg, rgba(85, 110, 179, 1) 25%, rgba(102, 107, 173, 1) 100%) !important;
    background-color: #556eb3 !important;
    border: 2px solid rgba(85, 110, 179, 0.3) !important;
    border-color: rgba(85, 110, 179, 0.3) !important;
    color: white !important;
    box-sizing: border-box !important;
    background-clip: padding-box !important;
    border-radius: 0.75rem !important;
    box-shadow: none !important;
    transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
}


html body .btn-filled-toggle:hover,
html body .btn.btn-filled-toggle:hover,
html body button.btn-filled-toggle:hover,
html body .btn-filled-toggle.btn:hover,
html body .btn.btn-filled-toggle.btn:hover,
html body button.btn-filled-toggle.btn:hover,
html body #showJsonBtn.btn-filled-toggle:hover,
html body #search-comments-toggle.btn-filled-toggle:hover,
html body #search-specifications-toggle.btn-filled-toggle:hover,
html body .btn-filled-toggle:focus,
html body .btn.btn-filled-toggle:focus,
html body button.btn-filled-toggle:focus,
html body .btn-filled-toggle.btn:focus,
html body .btn.btn-filled-toggle.btn:focus,
html body button.btn-filled-toggle.btn:focus,
html body .btn-filled-toggle:active,
html body .btn.btn-filled-toggle:active,
html body button.btn-filled-toggle:active,
html body .btn-filled-toggle.btn:active,
html body .btn.btn-filled-toggle.btn:active,
html body button.btn-filled-toggle.btn:active,
html body .btn-filled-toggle:focus-visible,
html body .btn.btn-filled-toggle:focus-visible,
html body button.btn-filled-toggle:focus-visible,
html body .btn-filled-toggle.btn:focus-visible,
html body .btn.btn-filled-toggle.btn:focus-visible,
html body button.btn-filled-toggle.btn:focus-visible {
    background: linear-gradient(90deg, rgba(106, 130, 200, 1) 25%, rgba(123, 128, 194, 1) 100%) !important;
    background-image: linear-gradient(90deg, rgba(106, 130, 200, 1) 25%, rgba(123, 128, 194, 1) 100%) !important;
    background-color: #6a82c8 !important;
    color: white !important;
    /* PAS de transform: translateY() pour éviter le mouvement */
}

/* ===============================================
   BOUTONS OUTLINED - SUPPRIMÉ - UTILISE LE SYSTÈME UNIFIÉ
   =============================================== */

/* Toutes les surcharges spécifiques ont été supprimées.
   Les boutons utilisent maintenant uniquement le système unifié :
   - .btn pour l'état normal
   - .btn-filled-toggle pour l'état actif
   Pas de surcharge Bootstrap nécessaire. */

/* ===============================================
   STYLES UNIFORMES POUR TOUS LES SELECTS - VERSION PARAMÈTRES
   =============================================== */

/* Classe réutilisable pour les selects uniformes */
.unified-select {
    border-radius: 0.75rem !important;
    border: 2px solid #e2e8f0 !important;
    transition: border-color var(--transition-fast) !important;
    width: 100% !important;
    min-width: 120px !important;
}

.unified-select:focus {
    border-color: #556eb3 !important;
    box-shadow: 0 0 0 0.25rem rgba(85, 110, 179, 0.25) !important;
}

/* Correction pour éviter que les selects soient coupés */
.settings-page .input-group,
.modal .input-group {
    overflow: visible !important;
}

/* Style outline-filled supprimé - utilisation du style Bootstrap btn-outline-secondary par défaut */

/* ===============================================
   ICÔNES ET ÉLÉMENTS SPÉCIAUX DES BADGES
   =============================================== */

/* Icônes dans les badges de statut */
.badge .status-icon {
    font-size: 0.875rem;
    color: inherit;
}

/* Cartes de statistiques - hauteur uniforme */
#stats-section .glass-card {
    min-height: 85px;
    height: auto;
    flex: 1 1 auto; /* Flex pour distribution équitable de l'espace */
}

/* Row stats avec distribution équitable - SUPPRIMÉ car conflit avec Bootstrap */

/* Responsive stats - écrans larges OK avec Bootstrap */

/* Responsive pour écrans moyens */
@media (max-width: 992px) {
    #stats-section .glass-card .card-body {
        padding: 1rem !important;
    }
}

/* Responsive pour petits écrans - correction complète */
@media (max-width: 576px) {
    .stats-card .card-title {
        font-size: 0.75rem !important;
    }
    
    .stats-card h3, .stats-card h4 {
        font-size: 1.1rem !important;
        max-width: 120px !important; /* Forcer la largeur pour la troncature */
    }
    
    .stat-icon {
        width: 3rem !important;
        height: 3rem !important;
        font-size: 1.25rem !important;
    }
    
    /* Troncature du texte pour éviter le débordement */
    .stats-card h4 {
        max-width: 200px !important;
    }
}

/* Padding pour cartes de filtres et résultats - sauf cartes de stats */
.glass-card:not(.stats-card) .card-body {
    padding: 0.8rem !important;
}

.glass-card .card-header {
    padding: 0.8rem 2rem 1rem 2rem !important;
}

/* Suppression du padding pour la carte des composants sans en-tête */
.glass-card:has(.card-body:first-child) .card-body {
    padding-top: 0.8rem !important;
}

/* Styles spécifiques pour la carte JSON pour corriger les paddings et l'alignement */
.glass-card .card-header:has(.d-flex.justify-content-between) {
    padding: 0.8rem !important;
}

.glass-card .card-body.json-display-card {
    padding: 0.8rem !important;
}

/* Pagination glassmorphisme - styles corrigés */
.pagination {
    margin: 0 !important;
    justify-content: flex-end;
    gap: 0.25rem;
}

.pagination .page-item {
    margin: 0 !important;
}

.pagination .page-link {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    color: #556eb3 !important;
    padding: 0.8rem 0.75rem !important;
    border-radius: 0.8rem !important;
    transition: var(--transition-fast) !important;
    backdrop-filter: blur(4px) !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 2.5rem !important;
    height: 2.5rem !important;
}

.pagination .page-link:hover {
    background: #f5f5f5 !important;
    color: #333 !important;
    border-color: #999 !important;
}

.pagination .page-item.disabled .page-link {
    background: rgba(255, 255, 255, 0.5) !important;
    color: #94a3b8 !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    cursor: not-allowed !important;
}

.pagination .page-item.disabled .page-link:hover {
    background: rgba(255, 255, 255, 0.5) !important;
    color: #94a3b8 !important;
    transform: none !important;
    box-shadow: none !important;
}

.pagination-info {
    color: #64748b;
    font-size: 0.875rem;
}

/* Icônes dans cartes statistiques - taille réduite */
.stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 0.8rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
        border-radius: 1rem;
        overflow-x: auto;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .pagination .page-link {
        padding: 0.375rem 0.8rem !important;
        min-width: 2rem !important;
        height: 2rem !important;
        font-size: 0.875rem !important;
    }
    
    .btn:not([class*="btn-outline-"]) {
        padding: 0.8rem 1rem;
        font-size: 0.875rem;
    }
    
    .stat-icon {
        width: 3rem;
        height: 3rem;
        font-size: 0.8rem;
    }
    
    /* Mobile - padding et centrage simplifiés */
    #stats-section .glass-card .card-body {
        padding: 1rem !important;
        min-height: 80px !important;
    }
}

/* Custom scrollbar glassmorphisme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 4px;
    transition: var(--transition-medium);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* Effet de focus pour accessibilité */
*:focus {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

/* Styles pour les pills de filtres avec hover et transitions */
.filter-badge {
    cursor: default !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.filter-badge:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Styles pour les boutons de fermeture des filtres avec hover */
.filter-close-btn {
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease !important;
}

.filter-close-btn:hover {
    background: rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    transform: scale(1.1) !important;
}

/* Styles pour le bouton clear de la recherche - style outlined simple */
#clear-search-btn {
    border-top: 2px solid #e2e8f0 !important;
    border-right: 2px solid #e2e8f0 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    border-left: none !important;
    background-color: white !important;
    transition: var(--transition-fast) !important;
}

#clear-search-btn:hover {
    background-color: #556eb3 !important;
    border-color: #556eb3 !important;
    border-left: none !important;
    color: white !important;
}

#clear-search-btn:hover i {
    color: white !important;
}

#clear-search-btn:focus {
    border-color: var(--field-border-focus) !important;
    outline: none !important;
}

/* Styles pour les boutons de test API - même comportement que clear-search-btn */
#test-sn-btn,
#test-oe-btn {
    border-top: 2px solid #e2e8f0 !important;
    border-right: 2px solid #e2e8f0 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    border-left: none !important;
    background-color: white !important;
    transition: var(--transition-fast) !important;
}

#test-sn-btn:hover,
#test-oe-btn:hover {
    background-color: #556eb3 !important;
    border-color: #556eb3 !important;
    border-left: none !important;
    color: white !important;
}

#test-sn-btn:hover i,
#test-oe-btn:hover i {
    color: white !important;
}

#test-sn-btn:focus,
#test-oe-btn:focus {
    border-color: var(--field-border-focus) !important;
    outline: none !important;
}

/* Focus sur les boutons de test déclenche aussi le focus unifié */
.input-group:has(#test-sn-btn:focus),
.input-group:has(#test-oe-btn:focus) {
    box-shadow: 0 0 0 0.25rem var(--field-shadow-focus) !important;
    border-radius: 0.75rem !important;
    transition: var(--transition-fast) !important;
}

.input-group:has(#test-sn-btn:focus) .form-control,
.input-group:has(#test-sn-btn:focus) .input-group-text:first-child,
.input-group:has(#test-oe-btn:focus) .form-control,
.input-group:has(#test-oe-btn:focus) .input-group-text:first-child {
    border-color: var(--field-border-focus) !important;
    transition: var(--transition-fast) !important;
}

/* Focus sur le bouton clear déclenche aussi le focus unifié */
.input-group:has(#clear-search-btn:focus) {
    box-shadow: 0 0 0 0.25rem var(--field-shadow-focus) !important;
    border-radius: 0.75rem !important;
    transition: var(--transition-fast) !important;
}

.input-group:has(#clear-search-btn:focus) .form-control,
.input-group:has(#clear-search-btn:focus) .input-group-text:first-child {
    border-color: var(--field-border-focus) !important;
    transition: var(--transition-fast) !important;
}

/* ========================================= */
/* FIN STYLES TABLES                        */
/* ========================================= */

/* Styles unifiés pour les champs de filtres avec bordures */
#filter-type-select,
#filter-value-input,
#date-from-input,
#date-to-input,
#status-select,
#grade-select {
    border: 2px solid #e2e8f0 !important;
    transition: border-color var(--transition-fast) !important;
}

#filter-type-select {
    border-radius: 0.75rem 0 0 0.75rem !important;
}

#filter-value-input,
#date-from-input,
#date-to-input {
    border-radius: 0 !important;
    margin-left: -2px !important;
    margin-right: -2px !important;
}

#status-select,
#grade-select {
    border-radius: 0 !important;
    margin-left: -2px !important;
}

#filter-type-select:focus,
#filter-value-input:focus,
#date-from-input:focus,
#date-to-input:focus,
#status-select:focus,
#grade-select:focus {
    border-color: #556eb3 !important;
    outline: none !important;
}

/* Styles pour le bouton d'ajout de filtre - Supprimé car géré par le système unifié */
/* Utilise maintenant uniquement .btn et .btn-filled-toggle selon l'état */

/* Styles pour édition d'appareil supprimés - section nettoyée */

/* JSON Display étendu - utilise maintenant le système unifié */
.json-pre-expanded {
    /* Styles de base hérités du système unifié via les variables */
    background: var(--field-bg) !important;
    backdrop-filter: blur(4px) !important;
    border: 2px solid var(--field-border) !important;
    border-radius: var(--border-radius-sm) !important;
    padding: var(--field-padding) !important;
    margin: 0 !important;
    font-size: var(--field-font-size) !important;
    line-height: 1.4 !important;
    color: var(--field-color) !important;
    font-weight: var(--field-font-weight) !important;
    transition: var(--field-transition) !important;
    
    /* Propriétés spécifiques au JSON */
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
    min-height: auto !important;
}

/* Carte contenant le JSON - redimensionnement automatique */
.json-display-card {
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
}

/* Assurer que la carte JSON elle-même n'est pas limitée en hauteur */
.card:has(.json-display-card) {
    height: auto !important;
    min-height: auto !important;
}

/* Si has() n'est pas supporté, utiliser une approche alternative */
.card .json-display-card {
    max-height: none !important;
}

.card .json-display-card .json-pre-expanded {
    max-height: none !important;
    height: auto !important;
}

.json-pre-expanded code {
    background: none !important;
    padding: 0 !important;
    font-size: inherit !important;
    color: inherit !important;
}

/* Styles pour l'édition des composants */
/* Supprimé - styles maintenant gérés par le système unifié */

/* ===============================================
   API DOCUMENTATION - EFFECTS HOVER
   =============================================== */

/* Effet hover pour les cartes GET API */
.api-documentation-page .glass-card .glass-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.api-documentation-page .glass-card .glass-card:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 12px 40px 0 rgba(85, 110, 179, 0.2) !important;
}

/* ===============================================
   SYSTÈME GÉNÉRAL - BOUTONS GÉNÉRIQUES
   =============================================== */

/* Bouton générique amélioré - réutilisable partout */
.btn-enhanced {
    border: 2px solid #e2e8f0 !important;
    background: white !important;
    color: #333 !important;
    font-size: 0.875rem !important;
    padding: 0.375rem 0.75rem !important;
    border-radius: 0.75rem !important;
    transition: background-color var(--transition-fast), 
                border-color var(--transition-fast), 
                color var(--transition-fast), 
                box-shadow var(--transition-fast) !important;
}

.btn-enhanced:hover {
    background: linear-gradient(90deg, rgba(85, 110, 179, 1) 25%, rgba(102, 107, 173, 1) 100%) !important;
    color: white !important;
    border-color: #556eb3 !important;
    box-shadow: 0 4px 12px rgba(85, 110, 179, 0.4) !important;
}

/* Variante pour boutons de sauvegarde */
.btn-enhanced.save {
    /* Hérite du style de base - aucune modification nécessaire */
}

/* DEPRECATED - REMPLACÉ PAR SYSTÈME .field-enhanced.textarea */
.component-comment-input {
    resize: vertical !important;
}

/* ===============================================
   GUIDE DE MIGRATION VERS CLASSES GÉNÉRIQUES
   ===============================================
   
   ANCIEN SYSTÈME → NOUVEAU SYSTÈME:
   
   1. IMAGES:
      .audit-photo           → .image-enhanced
      .audit-photos-container → .image-gallery
      
   2. CHAMPS DE SAISIE:
      .device-field                  → .field-enhanced
      .component-comment-input       → .field-enhanced textarea
      .component-total-capacity-input → .field-enhanced
      (Supprimé - utilise .unified-select)
      
   3. CARTES DE STATUT:
      .component-card-success  → .card-status success
      .component-card-danger   → .card-status danger
      .component-card-warning  → .card-status warning
      .component-card-secondary → .card-status secondary
      
   4. BOUTONS:
      .save-component-btn → .btn-enhanced save
      #toggleEditMode     → .btn-enhanced
      
   AVANTAGES DU NOUVEAU SYSTÈME:
   - Réutilisable dans toute l'application
   - Plus de doublons de code
   - Maintenance simplifiée
   - Cohérence visuelle garantie
   - Système modulaire et évolutif
   =============================================== */

/* DEPRECATED - REMPLACÉ PAR SYSTÈME .btn-enhanced
   Ces styles seront supprimés une fois la migration terminée
   =============================================== */
.save-component-btn {
    border: 2px solid #e2e8f0 !important;
    background: white !important;
    color: #333 !important;
    font-size: 0.875rem !important;
    padding: 0.375rem 0.75rem !important;
    border-radius: 0.75rem !important;
    transition: background-color var(--transition-fast), 
                border-color var(--transition-fast), 
                color var(--transition-fast), 
                box-shadow var(--transition-fast) !important;
}

.save-component-btn:hover {
    background: linear-gradient(90deg, rgba(85, 110, 179, 1) 25%, rgba(102, 107, 173, 1) 100%) !important;
    color: white !important;
    border-color: #556eb3 !important;
    box-shadow: 0 4px 12px rgba(85, 110, 179, 0.4) !important;
}

/* Masquer les éléments d'édition par défaut - géré par JavaScript pour un contrôle précis */
.edit-element {
    display: none;
}

/* Correction du conteneur table-responsive pour éviter les coupures */
.table-responsive {
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: auto;
    border-radius: 1rem;
    background: transparent;
}

.table td, .table th {
    padding: 12px 8px;
    vertical-align: middle;
}

/* S'assurer que les boutons d'actions ne déclenchent pas le clic sur la ligne */
.table td button, .table td a {
    z-index: 10;
    position: relative;
}

/* Notifications toast glassmorphisme */
.alert {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    color: #334155 !important;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9)) !important;
    color: white !important;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9)) !important;
    color: white !important;
}

.alert.show {
    transform: translateX(0);
    opacity: 1;
}

/* ===============================================
   STYLES KANBAN DOUBLE SCROLL
   =============================================== */

/* Barre de scroll horizontale en haut du Kanban */
.kanban-scroll-track {
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0.75rem;
    padding: 2px;
    margin: 0 1rem;
}

.kanban-scroll-content {
    height: 16px;
    background: transparent;
    /* La largeur sera définie dynamiquement par JavaScript */
}

/* Masquer la scrollbar sur la barre du haut pour un look plus propre */
.kanban-scroll-track::-webkit-scrollbar {
    height: 16px;
}

.kanban-scroll-track::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.kanban-scroll-track::-webkit-scrollbar-thumb {
    background: rgba(85, 110, 179, 0.4);
    border-radius: 8px;
    transition: var(--transition-medium);
}

.kanban-scroll-track::-webkit-scrollbar-thumb:hover {
    background: rgba(85, 110, 179, 0.6);
}

/* ==================== ANALYTICS PAGE STYLES ==================== */

/* Onglets Bootstrap personnalisés */
.nav-tabs {
    border-bottom: none !important;
}

.nav-tabs .nav-link {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #6b7280;
    border-radius: 0.75rem;
    padding: 0.75rem 0.8rem;
    margin-right: 0.8rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    transform: translateY(-2px);
}

.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.1));
    border-color: rgba(99, 102, 241, 0.4);
    color: #6366f1;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.nav-tabs .nav-link i {
    margin-right: 0.8rem;
}

/* Cartes de stats analytics */
.stats-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 48px 0 rgba(85, 110, 179, 0.25);
}

/* Icônes de stats avec gradients */
.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: white;
}

.stat-icon.gradient-green {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.stat-icon.gradient-blue {
    background: linear-gradient(135deg, #007bff, #17a2b8);
}

.stat-icon.gradient-purple {
    background: linear-gradient(135deg, #6f42c1, #6366f1);
}

.stat-icon.gradient-orange {
    background: linear-gradient(135deg, #fd7e14, #ffc107);
}

.stat-icon.gradient-pink {
    background: linear-gradient(135deg, #e83e8c, #ec4899);
}

/* Tableaux analytics */
#testers-ranking-table {
    background: transparent;
}

#testers-ranking-table thead th {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
    padding: 1rem 0.75rem;
}

#testers-ranking-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#testers-ranking-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: scale(1.01);
}

#testers-ranking-table tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

/* Graphiques - ajustements pour Chart.js */
canvas {
    max-height: 400px;
}

/* Responsive adjustments for analytics */
@media (max-width: 768px) {
    .nav-tabs .nav-link {
        padding: 0.8rem 1rem;
        font-size: 0.875rem;
        margin-right: 0.25rem;
        margin-bottom: 0.8rem;
    }
    
    .nav-tabs .nav-link i {
        display: none;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}



/* ===============================================
   SYSTÈME ONBOARDING - DESIGN CLEAN
   =============================================== */

/* Barre de progression fixe en haut */
.onboarding-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    padding: 0.8rem 2rem 1rem;
}

.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
    position: relative;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    z-index: 2;
    text-decoration: none;
    transition: transform 0.2s ease;
}

a.progress-step {
    cursor: pointer;
}

a.progress-step:hover {
    transform: translateY(-2px);
}

a.progress-step:hover .step-number {
    box-shadow: 0 4px 8px rgba(168, 85, 247, 0.2);
}

.progress-step .step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.progress-step.active .step-number {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: white;
    transform: scale(1.1);
}

.progress-step.completed .step-number {
    background: var(--color-success);
    color: white;
}

.progress-step .step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-align: center;
}

.progress-step.active .step-label {
    color: #a855f7;
}

.progress-step.completed .step-label {
    color: var(--color-success);
}

.progress-bar-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #a855f7, #ec4899);
    transition: width 0.5s ease;
    border-radius: 3px;
}

/* Container principal onboarding */
.onboarding-container {
    min-height: 100vh;
    padding: 140px 2rem 3rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.onboarding-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    padding: 3rem;
    max-width: 800px;
    width: 100%;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Éléments de contenu */
.onboarding-logo {
    text-align: center;
}

.onboarding-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    margin-bottom: 0.8rem;
}

.onboarding-subtitle {
    font-size: 1rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 2.5rem;
}

/* Liste de fonctionnalités (welcome) */
.onboarding-features {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 2rem 0;
    align-items: center;
    width: 100%;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.8rem;
    background: #f8fafc;
    border-radius: 12px;
    transition: var(--transition-fast);
    max-width: 500px;
    width: 100%;
}

.feature-item:hover {
    background: #f1f5f9;
    transform: translateX(5px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.feature-text h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.feature-text p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

/* Sections de formulaire */
.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.8rem;
    text-align: center;
}

.team-selection-section,
.team-creation-section {
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Liste d'équipes */
.team-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
}

.team-option {
    position: relative;
    cursor: pointer;
    display: block;
    width: 100%;
    max-width: 600px;
}

.team-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.team-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.8rem;
    transition: var(--transition-fast);
    position: relative;
}

.team-option input[type="radio"]:checked ~ .team-card {
    border-color: #a855f7;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.05), rgba(236, 72, 153, 0.05));
}

.team-card:hover {
    border-color: #cbd5e1;
}

.team-info h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.8rem;
}

.team-meta {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.team-check {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #a855f7;
    font-size: 0.8rem;
    opacity: 0;
    transition: var(--transition-fast);
}

.team-option input[type="radio"]:checked ~ .team-card .team-check {
    opacity: 1;
}

/* Nouvelle équipe */
.team-card.new-team {
    background: white;
}

.team-option input[type="radio"]:checked ~ .team-card.new-team {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.02), rgba(236, 72, 153, 0.02));
}

/* Divider */
.divider-text {
    text-align: center;
    position: relative;
    margin: 2rem 0;
}

.divider-text::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.divider-text span {
    background: white;
    padding: 0 1rem;
    position: relative;
    color: #64748b;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Clé API */
.api-key-display,
.api-key-generation {
    margin: 2rem auto;
    max-width: 600px;
}

.api-key-container {
    margin: 0.8rem 0;
}

.api-key-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
}

.api-key-box code {
    flex: 1;
    color: #a855f7;
    font-weight: 600;
    word-break: break-all;
}

.btn-copy {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.btn-copy.copied {
    background: var(--color-success);
}

.api-info-box,
.api-skip-info {
    background: #f8fafc;
    border-left: 4px solid #a855f7;
    border-radius: 8px;
    padding: 0.8rem;
    margin: 0.8rem auto;
    max-width: 600px;
}

.api-skip-info {
    border-left-color: var(--color-info);
}

.api-info-box .info-icon,
.api-skip-info .info-icon {
    font-size: 2rem;
    color: #a855f7;
    margin-bottom: 1rem;
}

.api-info-box h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.api-info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.api-info-box li {
    padding: 0.8rem 0;
    padding-left: 0.8rem;
    position: relative;
}

.api-info-box li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-success);
    font-weight: 700;
}

.api-documentation h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.code-example {
    background: #1e293b;
    color: #10b981;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
}

/* Tour des fonctionnalités */
.features-tour {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
    align-items: center;
    width: 100%;
}

.tour-feature {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    max-width: 600px;
    width: 100%;
}

.tour-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.tour-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.8rem;
}

.tour-content > p {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.tour-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tour-highlights li {
    font-size: 0.875rem;
    color: #475569;
    padding: 0.25rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.tour-highlights li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #a855f7;
    font-weight: 700;
}

/* Message de fin */
.onboarding-completion {
    text-align: center;
    margin: 2rem auto;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.05), rgba(236, 72, 153, 0.05));
    border-radius: 16px;
    max-width: 600px;
}

.completion-icon {
    font-size: 4rem;
    color: var(--color-success);
    margin-bottom: 1rem;
}

.onboarding-completion h2 {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.8rem;
}

.onboarding-completion p {
    font-size: 1rem;
    color: #64748b;
}

/* Boutons d'action */
.onboarding-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-onboarding-primary,
.btn-onboarding-secondary {
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    border: none;
    cursor: pointer;
}

.btn-onboarding-primary {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: white;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.btn-onboarding-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.4);
    color: white;
}

.btn-onboarding-secondary {
    background: white;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.btn-onboarding-secondary:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #475569;
}

/* Info utilisateur */
.onboarding-user-info {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.onboarding-user-info p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .onboarding-progress-bar {
        padding: 1rem;
    }

    .progress-steps {
        gap: 0.8rem;
    }

    .progress-step .step-label {
        display: none;
    }

    .progress-step .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .onboarding-container {
        padding: 100px 1rem 2rem;
    }

    .onboarding-card {
        padding: 2rem 0.8rem;
    }

    .onboarding-title {
        font-size: 0.8rem;
    }

    .onboarding-subtitle {
        font-size: 0.875rem;
    }

    .feature-item {
        flex-direction: column;
        text-align: center;
    }

    .tour-feature {
        flex-direction: column;
    }

    .onboarding-actions {
        flex-direction: column;
    }

    .btn-onboarding-primary,
    .btn-onboarding-secondary {
        width: 100%;
    }
}

/* ===============================================
   STYLES PANNEAU SUPER ADMIN
   =============================================== */

/* Admin Cards */
.admin-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 0.8rem;
    box-shadow: 0 8px 32px 0 rgba(85, 110, 179, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    transition: var(--transition-fast);
}

.admin-card:hover {
    box-shadow: 0 12px 40px 0 rgba(85, 110, 179, 0.18);
    transform: translateY(-2px);
}

/* Admin Stat Cards */
.admin-stat-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.admin-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.bg-primary-light {
    background: rgba(85, 110, 179, 0.1);
}

.bg-info-light {
    background: rgba(13, 202, 240, 0.1);
}

.bg-warning-light {
    background: rgba(255, 193, 7, 0.1);
}

.bg-danger-light {
    background: rgba(220, 53, 69, 0.1);
}

.admin-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.admin-stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-stat-sublabel {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Admin Tables */
.admin-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table thead th {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    padding: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
    color: #334155;
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: var(--transition-fast);
}

.admin-table tbody tr:hover {
    background: rgba(85, 110, 179, 0.05);
}

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

/* Admin Badges */
.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.admin-badge-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.admin-badge-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.admin-badge-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.admin-badge-info {
    background: rgba(13, 202, 240, 0.1);
    color: #0c9bb8;
}

.admin-badge-secondary {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.admin-badge-admin {
    background: rgba(85, 110, 179, 0.1);
    color: #556EB3;
}

.admin-badge-violet {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.1));
    color: #a855f7;
}

/* Breadcrumb personnalisé */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0.8rem;
}

.breadcrumb-item {
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #94a3b8;
}

.breadcrumb-item a {
    color: #556EB3;
    text-decoration: none;
    transition: var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: #3d4f8c;
}

.breadcrumb-item.active {
    color: #64748b;
}

/* Form Controls Admin */
.admin-card .form-control,
.admin-card .form-select {
    background: var(--field-bg);
    border: 1px solid var(--field-border);
    border-radius: 8px;
    padding: var(--field-padding);
    font-size: var(--field-font-size);
    font-weight: var(--field-font-weight);
    color: var(--field-color);
    transition: var(--field-transition);
}

.admin-card .form-control:focus,
.admin-card .form-select:focus {
    background: var(--field-bg-focus);
    border-color: var(--field-border-focus);
    box-shadow: 0 0 0 3px var(--field-shadow-focus);
    outline: none;
}

.admin-card .form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 0.8rem;
}

/* Buttons Admin */
.admin-card .btn-primary {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border: none;
    padding: 0.75rem 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition-fast);
}

.admin-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.4);
}

.admin-card .btn-outline-primary {
    border: 2px solid #556EB3;
    color: #556EB3;
    background: transparent;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition-fast);
}

.admin-card .btn-outline-primary:hover {
    background: #556EB3;
    color: white;
}

.admin-card .btn-outline-secondary {
    border: 2px solid #e2e8f0;
    color: #64748b;
    background: transparent;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition-fast);
}

.admin-card .btn-outline-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.admin-card .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Pagination Admin */
.pagination {
    gap: 0.8rem;
}

.pagination .page-item .page-link {
    border: 1px solid #e2e8f0;
    color: #556EB3;
    padding: 0.8rem 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition-fast);
    background: white;
}

.pagination .page-item .page-link:hover {
    background: rgba(85, 110, 179, 0.1);
    border-color: #556EB3;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-color: transparent;
    color: white;
}

.pagination .page-item.disabled .page-link {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
}

/* Alert boxes */
.alert-info {
    background: rgba(13, 202, 240, 0.1);
    border: 1px solid rgba(13, 202, 240, 0.3);
    border-radius: 12px;
    color: #0c9bb8;
}

/* Dashboard container */
.dashboard-container {
    width: 100%;
    padding: 2rem 0.8rem;
}

/* Responsive Admin */
@media (max-width: 768px) {
    .admin-stat-value {
        font-size: 0.8rem;
    }
    
    .admin-stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .admin-table {
        font-size: 0.75rem;
    }
    
    .admin-table thead th,
    .admin-table tbody td {
        padding: 0.75rem 0.8rem;
    }
    
    .admin-card {
        padding: 1rem;
    }
}

/* Super Admin Badge dans sidebar profile */
.sidebar-profile .profile-super-admin-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.15));
    color: #a855f7;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.8rem;
    border-radius: 6px;
    margin-top: 0.25rem;
}

.sidebar-profile .profile-super-admin-badge i {
    font-size: 0.625rem;
    margin-right: 0.25rem;
}

/* === MENU BURGER MOBILE === */
.burger-menu-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 1;
    visibility: visible;
}

.burger-menu-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

.burger-menu-btn i {
    color: #556EB3;
    font-size: 20px;
}

/* Cacher le bouton burger quand la sidebar est ouverte */
.burger-menu-btn.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* === CORRECTIONS AFFICHAGE MOBILE === */
@media (max-width: 768px) {
    /* Afficher le bouton burger */
    .burger-menu-btn {
        display: flex;
    }
    
    /* Sidebar cachée par défaut sur mobile */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1600 !important;
        padding-bottom: 100px; /* Espace pour les contrôles du téléphone */
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    /* Main content prend toute la largeur sur mobile */
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 0 !important;
        padding-top: 72px !important; /* Espace pour le bouton burger */
        position: relative;
        z-index: 1; /* Inférieur au dropdown utilisateur */
    }
    
    /* Dashboard container très compact sur mobile */
    .dashboard-container {
        padding: 0.8rem !important;
    }
    
    /* Augmenter z-index du glass-card des filtres */
    .glass-card {
        z-index: 10 !important;
        position: relative;
    }
    
    /* Filtres du dashboard - adaptation mobile */
    .glass-card .d-flex.align-items-center.gap-2 {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .glass-card .input-group {
        min-width: unset !important;
        width: 100% !important;
    }
    
    /* Boutons de recherche en pleine largeur sur mobile */
    .glass-card .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Stack vertical pour les éléments de filtre */
    .glass-card .d-flex.align-items-center[style*="gap: 8px"] {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    /* Boutons toggle recherche */
    #search-comments-toggle,
    #search-specifications-toggle {
        width: auto !important;
        flex: 1;
    }
    
    /* Conteneur des boutons de recherche */
    .glass-card .d-flex.align-items-center.gap-2 > .btn {
        width: auto !important;
    }
    
    /* Menu utilisateur en bas - ajuster z-index pour mobile */
    .user-menu-wrapper {
        z-index: 1700;
        position: relative;
    }
    
    /* S'assurer que le dropdown utilisateur passe par-dessus tout */
    .user-dropdown {
        z-index: 1700 !important;
    }
    
    /* Cards stats responsive */
    .stats-card {
        margin-bottom: 1rem;
    }
    
    /* Boutons d'action dashboard */
    .glass-card .d-flex.flex-wrap.gap-2 {
        gap: 0.8rem !important;
    }
    
    .glass-card .d-flex.flex-wrap.gap-2 .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    /* Sticky filter bar ajustement */
    .glass-card[style*="position: sticky"] {
        position: relative !important;
        top: 0 !important;
    }
    
    /* Afficher les cards et masquer le tableau sur mobile */
    #table-view {
        display: none !important;
    }
    
    #mobile-cards-view {
        display: block !important;
    }
    
    /* Glass cards plus compactes sur mobile */
    .glass-card {
        padding: 0.75rem;
        margin-bottom: 0.8rem;
    }
    
    /* Cards mobiles compactes */
    .mobile-device-card {
        padding: 8px;
        margin-bottom: 6px;
    }
    
    .mobile-device-card .card-header-mobile {
        margin-bottom: 6px;
        padding-bottom: 6px;
    }
    
    .mobile-device-card .card-info-row {
        margin-bottom: 3px;
        font-size: 13px;
    }
    
    .mobile-device-card .info-label {
        min-width: 70px;
    }
    
    .mobile-device-card .card-footer-mobile {
        margin-top: 6px;
        padding-top: 6px;
    }
}

/* === CARDS MOBILES POUR LA LISTE DES APPAREILS === */
.mobile-device-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-device-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.mobile-device-card .card-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mobile-device-card .device-model {
    font-weight: 600;
    font-size: 16px;
    color: #1e293b;
    margin-bottom: 4px;
}

.mobile-device-card .device-manufacturer {
    font-size: 12px;
    color: #64748b;
}

.mobile-device-card .card-info-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.mobile-device-card .info-label {
    color: #64748b;
    font-weight: 500;
    min-width: 80px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mobile-device-card .info-value {
    color: #1e293b;
    flex: 1;
}

.mobile-device-card .card-footer-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ===============================================
   MINI-CARTES D'ÉQUIPES - TEAM CHIPS
   =============================================== */

/* Grille de cartes d'équipes */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 0;
    margin: 0;
}

/* Carte d'équipe individuelle */
.team-chip {
    background: var(--team-chip-bg);
    border: 3px solid var(--team-chip-border);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--team-chip-shadow);
    min-height: 110px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.team-chip:hover {
    border-color: var(--team-chip-hover-border);
    transform: translateY(-2px);
    box-shadow: var(--team-chip-shadow-hover);
}

/* Carte d'équipe active */
.team-chip.active {
    background: var(--team-chip-active-bg);
    border-color: var(--team-chip-active-border);
    box-shadow: var(--team-chip-shadow-active);
    color: white;
}

.team-chip.active * {
    color: white !important;
}

/* En-tête de la carte d'équipe */
.team-chip__header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.team-chip__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    font-size: 1.4rem;
}

.team-chip:not(.active) .team-chip__icon {
    background: #e8eef7;
    color: #556EB3;
}

.team-chip.active .team-chip__icon {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.team-chip__info {
    flex: 1;
}

.team-chip__name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.team-chip:not(.active) .team-chip__name {
    color: #1a1a1a;
}

.team-chip__members {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0;
}

/* Pied de la carte d'équipe */
.team-chip__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 2px solid rgba(0, 0, 0, 0.08);
    margin-top: auto;
    font-size: 0.875rem;
    font-weight: 600;
}

.team-chip.active .team-chip__footer {
    border-top-color: rgba(255, 255, 255, 0.25);
}

.team-chip__role {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.team-chip__status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .teams-grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================================
   AFFICHAGE JSON RÉCURSIF - DESIGN PROGRESSIF
   =============================================== */

/* Liste imbriquée JSON avec bordure latérale progressive */
.json-nested-list {
    transition: var(--transition-fast);
    margin-top: 0.3rem;
}

/* Items JSON avec espacement harmonieux */
.json-item {
    position: relative;
    line-height: 1.6;
    transition: var(--transition-fast);
}

.json-item:hover {
    background: rgba(85, 110, 179, 0.05);
    border-radius: 0.25rem;
    padding-left: 0.5rem;
    margin-left: -0.5rem;
}

/* Clés JSON avec couleur progressive par profondeur */
.json-key {
    display: inline-block;
    margin-right: 0.5rem;
    font-family: 'Mulish', sans-serif;
    letter-spacing: 0.02em;
}

/* Valeurs JSON */
.json-value {
    font-family: 'Mulish', sans-serif;
    font-weight: 400;
    color: #000 !important;
}

/* Animation douce pour les niveaux profonds */
.json-depth-0 { animation: fadeInUp 0.2s ease-out; }
.json-depth-1 { animation: fadeInUp 0.25s ease-out; }
.json-depth-2 { animation: fadeInUp 0.3s ease-out; }
.json-depth-3 { animation: fadeInUp 0.35s ease-out; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================================
   ANDROID MDM - LAYOUT & NAVIGATION
   =============================================== */

/* Layout principal MDM */
.mdm-layout {
    padding: 0;
    min-height: calc(100vh - 60px);
}

/* Header MDM avec fil d'Ariane */
.mdm-header {
    background: linear-gradient(135deg, rgba(85, 110, 179, 0.08) 0%, rgba(102, 107, 173, 0.05) 100%);
    border-bottom: 1px solid rgba(85, 110, 179, 0.1);
    padding: 1.5rem 2rem;
    margin-bottom: 0;
}

.mdm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.mdm-breadcrumb-link {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mdm-breadcrumb-link:hover {
    color: #556eb3;
}

.mdm-breadcrumb-sep {
    color: #cbd5e1;
    font-size: 0.625rem;
}

.mdm-breadcrumb-current {
    color: #334155;
    font-weight: 500;
}

.mdm-header-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mdm-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3ddc84 0%, #2aa65b 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    box-shadow: 0 4px 16px rgba(61, 220, 132, 0.25);
}

.mdm-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
}

.mdm-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0.25rem 0 0 0;
}

/* Container principal */
.mdm-container {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 200px);
}

/* Sidebar MDM */
.mdm-sidebar {
    width: 280px;
    background: #f8fafc;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1.5rem 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.mdm-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 1rem;
}

.mdm-nav-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
}

.mdm-nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #556eb3, #3ddc84);
    border-radius: 2px;
    transition: height 0.2s ease;
}

.mdm-nav-item:hover {
    background: rgba(85, 110, 179, 0.06);
}

.mdm-nav-item:hover::before {
    height: 24px;
}

.mdm-nav-item.active {
    background: linear-gradient(135deg, rgba(85, 110, 179, 0.12) 0%, rgba(61, 220, 132, 0.08) 100%);
}

.mdm-nav-item.active::before {
    height: 32px;
}

.mdm-nav-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #64748b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mdm-nav-item:hover .mdm-nav-icon {
    color: #556eb3;
    box-shadow: 0 4px 12px rgba(85, 110, 179, 0.15);
}

.mdm-nav-item.active .mdm-nav-icon {
    background: linear-gradient(135deg, #556eb3, #3ddc84);
    color: white;
    box-shadow: 0 4px 16px rgba(85, 110, 179, 0.3);
}

.mdm-nav-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mdm-nav-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
}

.mdm-nav-item.active .mdm-nav-label {
    color: #1e293b;
}

.mdm-nav-desc {
    font-size: 0.8125rem;
    color: #94a3b8;
    line-height: 1.3;
}

/* Stats dans la sidebar */
.mdm-sidebar-stats {
    margin-top: auto;
    padding: 1.5rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    gap: 1rem;
}

.mdm-stat {
    flex: 1;
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mdm-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #556eb3;
    line-height: 1;
}

.mdm-stat-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Contenu principal */
.mdm-content {
    flex: 1;
    padding: 2rem;
    background: white;
    min-width: 0;
}

/* Navigation mobile - cachée par défaut sur desktop */
.mdm-mobile-nav {
    display: none;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mdm-mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    border-radius: 12px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mdm-mobile-nav-item i {
    font-size: 1.125rem;
}

.mdm-mobile-nav-item:hover {
    background: rgba(85, 110, 179, 0.1);
    color: #556eb3;
}

.mdm-mobile-nav-item.active {
    background: linear-gradient(135deg, #556eb3, #3ddc84);
    color: white;
}

/* Composants réutilisables MDM */
.mdm-card {
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.mdm-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafbfc;
}

.mdm-card-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mdm-card-title i {
    color: #556eb3;
}

.mdm-card-body {
    padding: 1.5rem;
}

/* Alertes MDM */
.mdm-alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.mdm-alert-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mdm-alert-info {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.mdm-alert-info .mdm-alert-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.mdm-alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.mdm-alert-warning .mdm-alert-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.mdm-alert-success {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.15);
}

.mdm-alert-success .mdm-alert-icon {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

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

.mdm-alert-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.mdm-alert-text {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0;
}

.mdm-alert-text a {
    color: #556eb3;
    font-weight: 500;
}

/* Responsive MDM */
@media (max-width: 991.98px) {
    .mdm-sidebar {
        display: none;
    }
    
    .mdm-mobile-nav {
        display: flex;
    }
    
    .mdm-content {
        padding: 1.5rem;
    }
    
    .mdm-header {
        padding: 1.25rem 1.5rem;
    }
    
    .mdm-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
        border-radius: 12px;
    }
    
    .mdm-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .mdm-header {
        padding: 1rem;
    }
    
    .mdm-header-title {
        gap: 0.75rem;
    }
    
    .mdm-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        border-radius: 10px;
    }
    
    .mdm-title {
        font-size: 1.25rem;
    }
    
    .mdm-subtitle {
        font-size: 0.8125rem;
    }
    
    .mdm-content {
        padding: 1rem;
    }
    
    .mdm-mobile-nav {
        padding: 0.5rem;
    }
    
    .mdm-mobile-nav-item {
        padding: 0.625rem 0.75rem;
        font-size: 0.6875rem;
    }
    
    .mdm-mobile-nav-item i {
        font-size: 1rem;
    }
    
    .mdm-card-body {
        padding: 1rem;
    }
}
