/* Styles spécifiques au module Gestion des Cibles */
.target-management-module {
    padding: 1.25rem;
    height: 100%;
    overflow-y: auto;
}

/* Wrapper du tableau avec scroll horizontal */
.table-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.targets-table {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
    background: white;
}

.target-row-clickable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.target-row-clickable:hover {
    background-color: #f8f9fa;
}

.targets-stats {
    margin: 1rem 0;
    display: none; /* Masqué - remplacé par la modale */
}

.targets-stats .stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
}

.targets-stats .stat-item {
    flex: 0 1 auto;
    min-width: 80px;
    max-width: 120px;
    padding: 0.5rem 0.65rem;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.targets-stats .stat-label {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.targets-stats .stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: bold;
    color: #212529;
}

.connection-status-bar {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem 20px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.connection-status-bar.connected {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.connection-status-bar.connecting {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.connection-status-bar.disconnected {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.connection-status-bar.error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.monitoring-interface {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: calc(100vh - 200px);
    min-height: 600px;
}

.monitoring-panels {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    flex: 1;
    min-height: 0;
}

.monitoring-panel {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    resize: both;
    overflow: auto;
    min-width: 300px;
    min-height: 400px;
}

.monitoring-panel h3 {
    color: #333;
    margin: 0 0 15px 0;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.info-notice {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #495057;
    border-left: 4px solid #007bff;
}

.selected-list {
    margin-bottom: 15px;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.selected-list h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1em;
    font-weight: 600;
}

.no-selection {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9em;
}

.selected-item {
    display: inline-flex;
    align-items: center;
    background: #007bff;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 15px;
    margin: 3px;
    font-size: 0.9em;
    font-weight: 500;
}

.remove-btn {
    background: none;
    border: none;
    color: white;
    margin-left: 8px;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
    padding: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.remove-btn:hover {
    background: rgba(255,255,255,0.2);
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
    flex: 1;
    padding: 5px;
}

.selection-item {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

.selection-item:hover:not(.unavailable) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.selection-item.selected {
    background: linear-gradient(135deg, #007bff 60%, #0056b3 100%);
    color: white;
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.selection-item.available {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.selection-item.unavailable {
    background: #f1f1f1;
    border-color: #cccccc;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.selection-item .target-icon {
    font-size: 1.5em;
    margin-bottom: 2px;
}

.selection-item.bib {
    font-size: 1em;
    width: 50px;
    height: 50px;
}

.events-panel {
    display: flex;
    flex-direction: column;
}

.events-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.event-counter {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 500;
}

.event-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    padding-right: 5px;
}

.event-list::-webkit-scrollbar {
    width: 6px;
}

.event-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.event-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.event-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.event-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    margin-bottom: 10px;
    border-left: 4px solid #007bff;
    padding: 0.75rem;
    transition: box-shadow 0.2s;
}

.event-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.event-item.ARRIVAL { border-left-color: #28a745; }
.event-item.DEPARTURE { border-left-color: #dc3545; }
.event-item.shot_detected { border-left-color: #6f42c1; }

.event-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.event-type {
    display: inline-flex;
    align-items: center;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    white-space: nowrap;
}

.event-type.ARRIVAL {
    background: #d4edda;
    color: #155724;
}

.event-type.DEPARTURE {
    background: #f8d7da;
    color: #721c24;
}

.event-type.shot_detected {
    background: #e2e3f7;
    color: #4c63d2;
}

.event-icon {
    margin-right: 5px;
}

.event-time {
    font-size: 0.8em;
    color: #6c757d;
    margin-left: auto;
}

.event-details {
    font-size: 0.9em;
    color: #495057;
}

.loading-message, .status-message {
    text-align: center;
    padding: 1.25rem;
    color: #6c757d;
    font-style: italic;
}

.navigation-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.nav-card {
    background: rgba(255, 255, 255, 0.95);
    margin: 4px;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
}

.nav-card h4 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 1.3em;
}

.nav-card p {
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.btn-large {
    padding: 0.938rem 30px;
    font-size: 1.1em;
    min-width: 250px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

@media (max-width: 1200px) {
    .monitoring-panels {
        grid-template-columns: 1fr 1fr;
    }
    
    .events-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .target-management-module {
        padding: 0.625rem;
    }
    
    .monitoring-panels {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .monitoring-panel {
        padding: 0.938rem;
        min-width: auto;
        resize: vertical;
    }
    
    .selection-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }
    
    .selection-item {
        width: 50px;
        height: 50px;
        font-size: 1em;
    }
    
    .selection-item.bib {
        width: 45px;
        height: 45px;
        font-size: 0.9em;
    }
    
    .nav-card {
        padding: 1.25rem;
    }
    
    .btn-large {
        min-width: 200px;
        padding: 0.75rem 25px;
    }
    
    /* Améliorer l'affichage du tableau sur tablette */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .targets-table {
        min-width: 600px;
    }
}

/* Responsive pour les boutons d'action dans les tableaux */
@media (max-width: 992px) {
    .action-buttons {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
        justify-content: flex-start;
    }
    
    .action-buttons button {
        font-size: 0.8rem;
        padding: 0.4rem 0.65rem;
        white-space: nowrap;
        flex: 0 1 auto;
    }
}

@media (max-width: 768px) {
    .action-buttons {
        gap: 3px;
    }
    
    .action-buttons button {
        font-size: 0.75rem;
        padding: 0.35rem 0.5rem;
    }
    
    .action-buttons button i {
        font-size: 1em;
        margin-right: 3px;
    }
}

@media (max-width: 480px) {
    /* Sur très petits écrans: ICÔNES SEULEMENT */
    .action-buttons {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 2px;
        width: 100%;
    }
    
    .action-buttons button {
        padding: 0.5rem;
        min-height: 36px;
        min-width: 36px;
        justify-content: center;
        position: relative;
    }
    
    /* Masquer le texte, garder icônes */
    .action-buttons button span {
        display: none;
    }
    
    .action-buttons button i {
        font-size: 1.2em;
        margin-right: 0;
    }
    
    /* Masquer certaines colonnes du tableau sur très petits écrans */
    .targets-table td:nth-child(3),  /* IP Address */
    .targets-table th:nth-child(3) {
        display: none;
    }
    
    .targets-table td:nth-child(5),  /* Last Activity */
    .targets-table th:nth-child(5) {
        display: none;
    }
    
    /* Rendre le tableau plus compact */
    .targets-table {
        font-size: 0.85rem;
    }
    
    .targets-table td,
    .targets-table th {
        padding: 0.5rem 0.3rem;
    }
    
    /* Afficher tooltip au hover/press sur mobile */
    .action-buttons button::after {
        content: attr(title);
        position: absolute;
        bottom: calc(100% + 4px);
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.9);
        color: white;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.7rem;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s;
        z-index: 1000;
    }
    
    .action-buttons button:active::after {
        opacity: 1;
    }
}

/* === STYLES POUR L'INTERFACE D'ADMINISTRATION === */

.administration-interface {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem;
}

.admin-panel {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-panel h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
}

.connection-panel .form-group {
    margin-bottom: 15px;
}

.auth-panel .form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #495057;
}

.form-control {
    width: 100%;
    padding: 0.625rem 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #007bff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn {
    padding: 0.625rem 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-outline {
    background-color: #f8f9fa;
    color: #495057;
    border: 2px solid #6c757d;
}

.btn-outline:hover {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.hidden {
    display: none !important;
}

.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 0.625rem;
    border-radius: 4px;
    margin: 10px 0;
}

/* Onglets d'administration */
.admin-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.admin-tab-btn {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    border-bottom: none;
    padding: 0.75rem 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 8px 8px 0 0;
}

.admin-tab-btn:hover {
    background: #e9ecef;
    color: #007bff;
}

.admin-tab-btn.active {
    background: #ffffff;
    color: #007bff;
    border-color: #007bff #007bff #ffffff #007bff;
    position: relative;
    z-index: 1;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

/* Messages d'administration */
.admin-message {
    padding: 0.75rem 20px;
    border-radius: 4px;
    margin: 15px 0;
    font-weight: 600;
}

.admin-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.admin-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.admin-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.admin-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Formulaires d'administration */
.admin-form-panel {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 20px;
}

.admin-form-panel h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
}

.warning-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 0.938rem;
    margin-bottom: 20px;
}

.warning-notice p {
    margin: 0;
    color: #856404;
}

/* Panneau de liste des cibles */
.admin-targets-panel {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem;
}

.targets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.targets-header h4 {
    margin: 0;
    color: #2c3e50;
}

.admin-targets-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.admin-targets-table th,
.admin-targets-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.admin-targets-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

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

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

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

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

.status-badge.unknown {
    background-color: #e2e3e5;
    color: #6c757d;
}

/* Badge position Standing / Prone */
.position-badge {
    display: inline-block;
    padding: 0.2rem 0.45rem;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.position-badge.position-standing {
    background-color: #cce5ff;
    color: #004085;
}

.position-badge.position-prone {
    background-color: #fff3cd;
    color: #856404;
}

.position-badge.position-unknown {
    background-color: #e2e3e5;
    color: #6c757d;
}

.loading {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 1.25rem;
}

.error {
    text-align: center;
    color: #721c24;
    padding: 1.25rem;
}

.info {
    text-align: center;
    color: #0c5460;
    padding: 1.25rem;
}

/* Responsive pour l'administration */
@media (max-width: 768px) {
    .administration-interface {
        padding: 0.625rem;
    }
    
    .admin-tabs {
        flex-wrap: wrap;
    }
    
    .admin-tab-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    .targets-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .admin-targets-table {
        font-size: 14px;
    }
    
    .admin-targets-table th,
    .admin-targets-table td {
        padding: 8px;
    }
}

/* Styles supplémentaires pour les nouveaux statuts */
.stat-item.warning .stat-value { 
    color: #ffc107; 
}

.status-maintenance {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Message aucune cible */
.no-targets {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.no-targets p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* ========================================
   MODE SOMBRE - GESTION DES CIBLES
   ======================================== */

body.dark-mode .target-management-module {
    background-color: #1A1A1A !important;
    color: #C5C5C5;
}

/* Forcer le fond sombre sur toute la zone */
body.dark-mode #target-management-content,
body.dark-mode .module-content {
    background-color: #1A1A1A !important;
}

/* Barre de statut de connexion */
body.dark-mode .connection-status-bar {
    background: #242424;
    border-color: #333333;
    color: #C5C5C5;
}

body.dark-mode .connection-status-bar.connected {
    background: rgba(102, 187, 106, 0.2);
    color: #66BB6A;
    border-color: #66BB6A;
}

body.dark-mode .connection-status-bar.connecting {
    background: rgba(66, 165, 245, 0.2);
    color: #42A5F5;
    border-color: #42A5F5;
}

body.dark-mode .connection-status-bar.disconnected,
body.dark-mode .connection-status-bar.error {
    background: rgba(239, 83, 80, 0.2);
    color: #EF5350;
    border-color: #EF5350;
}

/* Panneaux de monitoring */
body.dark-mode .monitoring-panel {
    background: #242424;
    border-color: #333333;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

body.dark-mode .monitoring-panel h3 {
    color: #D0D0D0;
    border-bottom-color: #333333;
}

/* Notice d'information */
body.dark-mode .info-notice {
    background: #2D2D2D;
    color: #A0A0A0;
    border-left-color: #42A5F5;
}

/* Liste sélectionnée */
body.dark-mode .selected-list {
    background: #2D2D2D;
    border-color: #333333;
}

/* En-tête du module */
body.dark-mode .module-header {
    background: #242424;
    border-bottom: 1px solid #333333;
}

body.dark-mode .module-header h2 {
    color: #D0D0D0;
}

/* Sections de contenu */
body.dark-mode .targets-section {
    background: #242424;
    border-color: #333333;
}

body.dark-mode .targets-section h3 {
    color: #D0D0D0;
}

/* Tableaux */
body.dark-mode .targets-table,
body.dark-mode table {
    background-color: #242424;
    color: #C5C5C5;
}

body.dark-mode .targets-table thead,
body.dark-mode table thead {
    background-color: #2D2D2D;
}

body.dark-mode .targets-table th,
body.dark-mode table th {
    color: #D0D0D0;
    border-color: #333333;
}

body.dark-mode .targets-table td,
body.dark-mode table td {
    color: #C5C5C5;
    border-color: #333333;
}

body.dark-mode .targets-table tbody tr:hover,
body.dark-mode table tbody tr:hover {
    background-color: #2A2A2A;
}

/* Badges de statut */
body.dark-mode .status-badge {
    background-color: #2D2D2D;
    border: 1px solid #404040;
}

body.dark-mode .status-badge.online {
    background-color: rgba(102, 187, 106, 0.2);
    color: #66BB6A;
    border-color: #66BB6A;
}

body.dark-mode .status-badge.offline {
    background-color: rgba(144, 144, 144, 0.2);
    color: #909090;
    border-color: #606060;
}

/* Onglets de statut */
body.dark-mode .status-tabs {
    background: #242424;
    border-color: #333333;
}

body.dark-mode .status-tab {
    background: #2D2D2D;
    color: #C5C5C5;
    border-color: #404040;
}

body.dark-mode .status-tab.active {
    background: #9ACD32 !important;
    color: #1A1A1A !important;
    border: 2px solid #9ACD32 !important;
    font-weight: 600 !important;
    box-shadow: 0 0 8px rgba(154, 205, 50, 0.4) !important;
}

body.dark-mode .status-tab:hover {
    background: #383838;
}

/* Boutons d'action */
body.dark-mode .action-buttons button {
    background-color: #2D2D2D;
    color: #C5C5C5;
    border: 1px solid #404040;
}

body.dark-mode .action-buttons button:hover {
    background-color: #383838;
}

body.dark-mode .action-buttons button.primary {
    background-color: #42A5F5;
    color: #1A1A1A;
    border-color: #42A5F5;
}

body.dark-mode .action-buttons button.success {
    background-color: #66BB6A;
    color: #1A1A1A;
    border-color: #66BB6A;
}

body.dark-mode .action-buttons button.danger {
    background-color: #EF5350;
    color: #FFFFFF;
    border-color: #EF5350;
}

body.dark-mode .action-buttons button.warning {
    background-color: #FFA726;
    color: #1A1A1A;
    border-color: #FFA726;
}

/* Inputs et formulaires */
body.dark-mode input[type="text"],
body.dark-mode input[type="number"],
body.dark-mode select {
    background-color: #2D2D2D;
    color: #C5C5C5;
    border: 1px solid #404040;
}

body.dark-mode input:focus,
body.dark-mode select:focus {
    background-color: #333333;
    border-color: #9ACD32;
}

/* Messages d'alerte */
body.dark-mode .alert-success {
    background-color: rgba(102, 187, 106, 0.15);
    color: #66BB6A;
    border-color: #66BB6A;
}

body.dark-mode .alert-warning {
    background-color: rgba(255, 167, 38, 0.15);
    color: #FFA726;
    border-color: #FFA726;
}

body.dark-mode .alert-danger {
    background-color: rgba(239, 83, 80, 0.15);
    color: #EF5350;
    border-color: #EF5350;
}

body.dark-mode .alert-info {
    background-color: rgba(66, 165, 245, 0.15);
    color: #42A5F5;
    border-color: #42A5F5;
}

/* Message aucune cible */
body.dark-mode .no-targets {
    color: #A0A0A0;
}

/* Colonnes de statistiques */
body.dark-mode .stats-row {
    background: #2D2D2D;
    border-color: #333333;
}

body.dark-mode .stat-label {
    color: #A0A0A0;
}

body.dark-mode .stat-value {
    color: #D0D0D0;
}

/* Zones de contenu principales */
body.dark-mode .targets-content,
body.dark-mode .management-content,
body.dark-mode .content-area,
body.dark-mode .main-content {
    background-color: #1A1A1A !important;
}

/* Conteneurs et wrappers */
body.dark-mode .content-wrapper,
body.dark-mode .targets-wrapper,
body.dark-mode .management-wrapper {
    background-color: #1A1A1A !important;
}

/* Sections de la page */
body.dark-mode .page-section,
body.dark-mode .content-section {
    background-color: #242424 !important;
    border-color: #333333 !important;
}

/* Forcer tous les backgrounds blancs */
body.dark-mode .target-management-module * {
    scrollbar-color: #404040 #1A1A1A;
}

body.dark-mode .event-list::-webkit-scrollbar-track {
    background: #2D2D2D;
}

body.dark-mode .event-list::-webkit-scrollbar-thumb {
    background: #404040;
}

body.dark-mode .event-list::-webkit-scrollbar-thumb:hover {
    background: #505050;
}

/* === RESPONSIVE POUR PETITS ÉCRANS === */
@media (max-width: 480px) {
    /* Gestion des Cibles - titre complet visible */
    .targets-container h3,
    .targets-header h3 {
        font-size: 1rem !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        max-width: none !important;
        word-wrap: break-word;
    }
    
    .targets-header {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .targets-actions {
        display: flex;
        gap: 0.5rem;
        width: 100%;
    }
    
    .targets-actions .btn {
        flex: 1;
        font-size: 0.85rem;
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }
    
    /* Table responsive - enlever scroll horizontal, empiler les colonnes */
    .table-container {
        overflow-x: visible;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .targets-table {
        min-width: 100%;
        font-size: 0.85rem;
    }
    
    /* Réduire le padding des cellules */
    .targets-table th,
    .targets-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    /* Masquer la colonne IP sur très petits écrans si nécessaire */
    .targets-table th:nth-child(3),
    .targets-table td:nth-child(3) {
        display: none;
    }
    
    /* Status badge plus compact */
    .status-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        white-space: nowrap;
    }
    
    /* Stats en grille 2x2 au lieu de ligne */
    .targets-stats .stat-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .targets-stats .stat-item {
        min-width: auto;
        max-width: none;
    }
}

/* Pour écrans encore plus petits (< 375px) */
@media (max-width: 375px) {
    .targets-container h3,
    .targets-header h3 {
        font-size: 0.95rem !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }
    
    .targets-actions .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.2rem;
    }
    
    .targets-actions .btn i {
        display: none; /* Masquer les icônes pour gagner de l'espace */
    }
    
    .targets-table {
        font-size: 0.75rem;
    }
    
    .targets-table th,
    .targets-table td {
        padding: 0.4rem 0.2rem;
    }
}

