/**
 * Styles SecoursLife - CTA CODIS
 * Design moderne et professionnel pour système pompier
 */

/* ========================================
   VARIABLES CSS
======================================== */
:root {
    --color-primary: #E53935;
    --color-primary-dark: #C62828;
    --color-primary-light: #EF5350;
    --color-secondary: #1E88E5;
    --color-success: #43A047;
    --color-warning: #FB8C00;
    --color-danger: #E53935;
    --color-info: #00ACC1;
    
    --color-bg: #F5F7FA;
    --color-bg-dark: #E8EBF0;
    --color-surface: #FFFFFF;
    --color-text: #2C3E50;
    --color-text-light: #546E7A;
    --color-border: #CFD8DC;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    
    --spacing: 1rem;
}

/* ========================================
   RESET & BASE
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   PAGE DE CONNEXION
======================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo {
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 5px;
}

.login-header .subtitle {
    color: var(--color-text-light);
    font-size: 14px;
}

.login-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.help-text {
    font-size: 12px;
    color: var(--color-text-light);
    margin: 4px 0;
}

/* ========================================
   FORMULAIRES
======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
    font-size: 13px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--color-surface);
    color: var(--color-text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-inline {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.form-inline .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* ========================================
   BOUTONS
======================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--color-secondary);
    color: white;
}

.btn-secondary:hover {
    background: #1976D2;
}

.btn-success {
    background: var(--color-success);
    color: white;
}

.btn-success:hover {
    background: #388E3C;
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}

.btn-danger:hover {
    background: #C62828;
}

.btn-warning {
    background: var(--color-warning);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   ALERTES
======================================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.alert svg {
    flex-shrink: 0;
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    border-left: 4px solid var(--color-danger);
}

.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    border-left: 4px solid var(--color-success);
}

.alert-warning {
    background: #FFF3E0;
    color: #E65100;
    border-left: 4px solid var(--color-warning);
}

.alert-info {
    background: #E1F5FE;
    color: #01579B;
    border-left: 4px solid var(--color-info);
}

/* ========================================
   LAYOUT DASHBOARD
======================================== */
.dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    padding: 0 30px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
}

.navbar-brand svg {
    width: 35px;
    height: 35px;
}

.navbar-nav {
    display: flex;
    gap: 5px;
    list-style: none;
    align-items: center;
}

.nav-link {
    padding: 10px 18px;
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

.nav-link.active {
    background: var(--color-primary);
    color: white;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    text-align: right;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
}

.user-role {
    font-size: 12px;
    color: var(--color-text-light);
    text-transform: uppercase;
}

/* ========================================
   CONTENU PRINCIPAL
======================================== */
.main-content {
    flex: 1;
    padding: 30px;
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--color-text-light);
    font-size: 14px;
}

.page-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* ========================================
   GRILLE DASHBOARD
======================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 350px 1fr 320px;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1400px) {
    .dashboard-grid {
        grid-template-columns: 300px 1fr 280px;
    }
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   CARTES
======================================== */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 25px;
}

.card-footer {
    padding: 15px 25px;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

/* ========================================
   TABLEAUX
======================================== */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
}

thead {
    background: var(--color-bg);
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--color-border);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

tr:hover {
    background: var(--color-bg);
}

.table-actions {
    display: flex;
    gap: 8px;
}

/* ========================================
   BADGES & STATUTS
======================================== */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-success {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge-danger {
    background: #FFEBEE;
    color: #C62828;
}

.badge-warning {
    background: #FFF9C4;
    color: #F57F17;
}

.badge-info {
    background: #E1F5FE;
    color: #01579B;
}

.badge-secondary {
    background: #ECEFF1;
    color: #546E7A;
}

.badge-orange {
    background: #FFE0B2;
    color: #E65100;
}

.badge-purple {
    background: #E1BEE7;
    color: #6A1B9A;
}

.badge-dark-red {
    background: #B71C1C;
    color: #FFFFFF;
}

/* Statuts spécifiques engins */
.statut-disponible {
    background: #E8F5E9;
    color: #2E7D32;
}

.statut-en-alerte {
    background: #FFF9C4;
    color: #F57F17;
}

.statut-en-route {
    background: #FFE0B2;
    color: #E65100;
}

.statut-sur-lieux {
    background: #FFCDD2;
    color: #C62828;
}

.statut-transport-hopital {
    background: #B71C1C;
    color: #FFFFFF;
}

.statut-quitte-hopital {
    background: #B71C1C;
    color: #FFFFFF;
}

.statut-disponible-radio {
    background: #E3F2FD;
    color: #1565C0;
}

.statut-retour-indispo {
    background: #E1BEE7;
    color: #6A1B9A;
}

.statut-hors-service {
    background: #ECEFF1;
    color: #546E7A;
}

/* État sélectionné CTA */
.selected-cta {
    background: #FFFFFF !important;
    color: #E53935 !important;
    border: 3px solid #E53935 !important;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(229, 57, 53, 0.3);
}

/* Section headers */
.section-header {
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--color-primary);
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0;
}

/* Engin cards */
.engin-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
}

.engin-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.engin-card.selected-cta {
    background: white;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.engin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.engin-code {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
}

.engin-card.selected-cta .engin-code {
    color: var(--color-primary);
}

.engin-info {
    font-size: 13px;
    color: var(--color-text-light);
    margin-top: 2px;
}

.engin-details {
    font-size: 13px;
    color: var(--color-text);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
}

.engin-details > div {
    margin: 4px 0;
}

/* Personnel cards */
.personnel-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
}

.personnel-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.personnel-card.selected-cta {
    background: white;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.personnel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.personnel-matricule {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-light);
    text-transform: uppercase;
}

.personnel-nom {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
    margin-top: 3px;
}

.personnel-card.selected-cta .personnel-nom {
    color: var(--color-primary);
}

.personnel-details {
    font-size: 13px;
    color: var(--color-text);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
}

.personnel-details > div {
    margin: 4px 0;
}

/* Engin cards pompier avec barre de statut */
.engin-card-pompier {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.engin-card-pompier:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.engin-card-pompier.selected-cta {
    box-shadow: 0 0 20px rgba(229, 57, 53, 0.4);
}

.engin-status-bar {
    padding: 8px 15px;
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

/* Statuts engins - barre colorée */
.engin-status-bar.statut-disponible {
    background: #43A047;
}

.engin-status-bar.statut-en-alerte {
    background: #FDD835;
    color: #000;
}

.engin-status-bar.statut-en-route {
    background: #FB8C00;
}

.engin-status-bar.statut-sur-les-lieux {
    background: #E53935;
}

.engin-status-bar.statut-transport-hopital {
    background: #B71C1C;
}

.engin-status-bar.statut-quitte-hopital {
    background: #B71C1C;
}

.engin-status-bar.statut-disponible-radio {
    background: #00ACC1;
}

.engin-status-bar.statut-retour-indispo {
    background: #9C27B0;
}

.engin-status-bar.statut-hors-service {
    background: #757575;
}

/* Bordures colorées selon statut */
.engin-card-pompier.statut-disponible {
    border: 3px solid #43A047;
}

.engin-card-pompier.statut-en-alerte {
    border: 3px solid #FDD835;
}

.engin-card-pompier.statut-en-route {
    border: 3px solid #FB8C00;
}

.engin-card-pompier.statut-sur-les-lieux {
    border: 3px solid #E53935;
}

.engin-card-pompier.statut-transport-hopital {
    border: 3px solid #B71C1C;
}

.engin-card-pompier.statut-disponible-radio {
    border: 3px solid #00ACC1;
}

.engin-card-pompier.statut-retour-indispo {
    border: 3px solid #9C27B0;
}

.engin-card-pompier.statut-hors-service {
    border: 3px solid #757575;
}

.engin-card-pompier .engin-header,
.engin-card-pompier .engin-details {
    padding: 15px;
}

/* Personnel cards pompier avec barre de statut */
.personnel-card-pompier {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.personnel-card-pompier:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.personnel-card-pompier.selected-cta {
    box-shadow: 0 0 20px rgba(229, 57, 53, 0.4);
}

.personnel-status-bar {
    padding: 8px 15px;
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

/* Statuts personnels - barre colorée */
.personnel-status-bar.statut-personnel-disponible {
    background: #43A047;
}

.personnel-status-bar.statut-personnel-en-garde {
    background: #00ACC1;
}

.personnel-status-bar.statut-personnel-en-intervention {
    background: #E53935;
}

.personnel-status-bar.statut-personnel-indisponible {
    background: #757575;
}

/* Bordures colorées selon statut personnel */
.personnel-card-pompier.statut-personnel-disponible {
    border: 3px solid #43A047;
}

.personnel-card-pompier.statut-personnel-en-garde {
    border: 3px solid #00ACC1;
}

.personnel-card-pompier.statut-personnel-en-intervention {
    border: 3px solid #E53935;
}

.personnel-card-pompier.statut-personnel-indisponible {
    border: 3px solid #757575;
}

.personnel-card-pompier .personnel-header,
.personnel-card-pompier .personnel-details {
    padding: 15px;
}

.personnel-card-pompier .personnel-header {
    padding-bottom: 10px;
}

/* ========================================
   BOUTONS SÉLECTION ENGINS - Dashboard CTA
======================================== */
.engin-select-button {
    background: white;
    border: 3px solid #FB8C00;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
    text-align: center;
}

.engin-select-button:hover {
    background: #FB8C00;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(251, 140, 0, 0.4);
}

.engin-select-button:hover .engin-select-code {
    color: white;
}

.engin-select-button:hover .engin-select-info,
.engin-select-button:hover .engin-select-comp {
    color: rgba(255, 255, 255, 0.9);
}

.engin-select-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(251, 140, 0, 0.3);
}

.engin-select-code {
    font-size: 16px;
    font-weight: 800;
    color: #E65100;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.engin-select-info {
    font-size: 12px;
    font-weight: 600;
    color: #424242;
    margin-bottom: 4px;
}

.engin-select-comp {
    font-size: 11px;
    color: #757575;
    font-weight: 500;
}

/* ========================================
   BADGES ENGINS - Dashboard Pompier
======================================== */
.engin-badge {
    background: white;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.engin-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    transition: all 0.3s ease;
}

.engin-badge:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.engin-badge .badge-icon {
    font-size: 32px;
    margin-bottom: 8px;
    filter: grayscale(0.3);
}

.engin-badge .badge-name {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.engin-badge .badge-status {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
    letter-spacing: 0.3px;
}

/* Couleurs engins selon statut */
.engin-badge.statut-disponible::before { background: #43A047; }
.engin-badge.statut-disponible .badge-name { color: #2E7D32; }
.engin-badge.statut-disponible .badge-status { background: #E8F5E9; color: #2E7D32; }

.engin-badge.statut-en-alerte::before { background: #FDD835; }
.engin-badge.statut-en-alerte .badge-name { color: #F57F17; }
.engin-badge.statut-en-alerte .badge-status { background: #FFFDE7; color: #F57F17; }

.engin-badge.statut-en-route::before { background: #FB8C00; }
.engin-badge.statut-en-route .badge-name { color: #E65100; }
.engin-badge.statut-en-route .badge-status { background: #FFF3E0; color: #E65100; }

.engin-badge.statut-sur-les-lieux::before { background: #E53935; }
.engin-badge.statut-sur-les-lieux .badge-name { color: #C62828; }
.engin-badge.statut-sur-les-lieux .badge-status { background: #FFEBEE; color: #C62828; }

.engin-badge.statut-transport-hopital::before { background: #B71C1C; }
.engin-badge.statut-transport-hopital .badge-name { color: #B71C1C; }
.engin-badge.statut-transport-hopital .badge-status { background: #FFCDD2; color: #B71C1C; }

.engin-badge.statut-disponible-radio::before { background: #00ACC1; }
.engin-badge.statut-disponible-radio .badge-name { color: #00838F; }
.engin-badge.statut-disponible-radio .badge-status { background: #E0F7FA; color: #00838F; }

.engin-badge.statut-retour-indispo::before { background: #9C27B0; }
.engin-badge.statut-retour-indispo .badge-name { color: #7B1FA2; }
.engin-badge.statut-retour-indispo .badge-status { background: #F3E5F5; color: #7B1FA2; }

.engin-badge.statut-hors-service::before { background: #757575; }
.engin-badge.statut-hors-service .badge-name { color: #616161; }
.engin-badge.statut-hors-service .badge-status { background: #F5F5F5; color: #616161; }

/* Effet engagé - Blanc/Rouge */
.engin-badge.is-engaged {
    background: white !important;
    border: 4px solid #E53935;
    box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.2), 0 8px 24px rgba(229, 57, 53, 0.3);
    animation: pulse-engaged 2s ease-in-out infinite;
}

.engin-badge.is-engaged::before {
    background: #E53935 !important;
    height: 6px;
}

.engin-badge.is-engaged .badge-name {
    color: #E53935 !important;
    font-weight: 900;
}

.engin-badge.is-engaged .badge-status {
    background: #E53935 !important;
    color: white !important;
}

.engin-badge.is-engaged .badge-icon {
    filter: grayscale(0);
    animation: shake 0.5s ease-in-out infinite;
}

/* ========================================
   BADGES PERSONNELS - Dashboard Pompier
======================================== */
.personnel-badge {
    background: white;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.personnel-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    transition: all 0.3s ease;
}

.personnel-badge:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.personnel-badge .badge-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.personnel-badge .badge-name {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

.personnel-badge .badge-status {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 10px;
    display: inline-block;
    letter-spacing: 0.3px;
}

/* Couleurs personnels selon statut */
.personnel-badge.statut-personnel-disponible::before { background: #43A047; }
.personnel-badge.statut-personnel-disponible .badge-name { color: #2E7D32; }
.personnel-badge.statut-personnel-disponible .badge-status { background: #E8F5E9; color: #2E7D32; }

.personnel-badge.statut-personnel-en-garde::before { background: #00ACC1; }
.personnel-badge.statut-personnel-en-garde .badge-name { color: #00838F; }
.personnel-badge.statut-personnel-en-garde .badge-status { background: #E0F7FA; color: #00838F; }

.personnel-badge.statut-personnel-en-intervention::before { background: #E53935; }
.personnel-badge.statut-personnel-en-intervention .badge-name { color: #C62828; }
.personnel-badge.statut-personnel-en-intervention .badge-status { background: #FFEBEE; color: #C62828; }

.personnel-badge.statut-personnel-indisponible::before { background: #757575; }
.personnel-badge.statut-personnel-indisponible .badge-name { color: #616161; }
.personnel-badge.statut-personnel-indisponible .badge-status { background: #F5F5F5; color: #616161; }

/* Effet engagé - Blanc/Rouge */
.personnel-badge.is-engaged {
    background: white !important;
    border: 4px solid #E53935;
    box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.2), 0 8px 24px rgba(229, 57, 53, 0.3);
    animation: pulse-engaged 2s ease-in-out infinite;
}

.personnel-badge.is-engaged::before {
    background: #E53935 !important;
    height: 6px;
}

.personnel-badge.is-engaged .badge-name {
    color: #E53935 !important;
    font-weight: 900;
}

.personnel-badge.is-engaged .badge-status {
    background: #E53935 !important;
    color: white !important;
}

/* Animations */
@keyframes pulse-engaged {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.2), 0 8px 24px rgba(229, 57, 53, 0.3);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(229, 57, 53, 0.3), 0 8px 32px rgba(229, 57, 53, 0.5);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* ========================================
   CARTES SÉLECTION ENGINS - Dashboard CTA
======================================== */
.engin-select-card {
    display: block;
    cursor: pointer;
    position: relative;
}

.engin-checkbox-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.engin-card-content {
    background: white;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.25s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.engin-select-card:hover .engin-card-content {
    border-color: #FB8C00;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(251, 140, 0, 0.15);
}

.engin-checkbox-hidden:checked + .engin-card-content {
    background: white;
    border: 3px solid #E53935;
    box-shadow: 0 4px 16px rgba(229, 57, 53, 0.25);
    transform: scale(1.02);
}

.engin-card-left {
    flex: 1;
}

.engin-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #212121;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.engin-checkbox-hidden:checked + .engin-card-content .engin-card-name {
    color: #E53935;
    font-weight: 800;
}

.engin-card-details {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #757575;
    font-weight: 500;
}

.engin-checkbox-hidden:checked + .engin-card-content .engin-card-details {
    color: #E53935;
}

.detail-separator {
    color: #BDBDBD;
}

.engin-checkbox-hidden:checked + .engin-card-content .detail-separator {
    color: #E53935;
}

.engin-card-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #BDBDBD;
    transition: all 0.25s ease;
}

.engin-checkbox-hidden:checked + .engin-card-content .engin-card-check {
    color: #E53935;
}

.check-mark {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.engin-checkbox-hidden:checked + .engin-card-content .check-mark {
    opacity: 1;
}

.engin-checkbox-hidden:checked + .engin-card-content .engin-card-check circle {
    fill: #E53935;
    stroke: #E53935;
}

/* ========================================
   CARTES VÉHICULES - Dashboard Pompier MODERNE
======================================== */
.modern-vehicle-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.modern-vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.vehicle-card-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #F5F5F5;
}

.vehicle-status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.vehicle-status-text {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vehicle-card-body {
    padding: 16px;
}

.vehicle-title {
    font-size: 16px;
    font-weight: 700;
    color: #212121;
    margin-bottom: 6px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.vehicle-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: #757575;
    margin-bottom: 12px;
}

.vehicle-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #9E9E9E;
    font-weight: 500;
}

/* Couleurs selon statut */
.modern-vehicle-card.statut-disponible .vehicle-status-indicator { background: #43A047; }
.modern-vehicle-card.statut-disponible .vehicle-status-text { color: #2E7D32; }

.modern-vehicle-card.statut-en-alerte .vehicle-status-indicator { background: #FDD835; }
.modern-vehicle-card.statut-en-alerte .vehicle-status-text { color: #F57F17; }

.modern-vehicle-card.statut-en-route .vehicle-status-indicator { background: #FB8C00; }
.modern-vehicle-card.statut-en-route .vehicle-status-text { color: #E65100; }

.modern-vehicle-card.statut-sur-les-lieux .vehicle-status-indicator { background: #E53935; }
.modern-vehicle-card.statut-sur-les-lieux .vehicle-status-text { color: #C62828; }

.modern-vehicle-card.statut-transport-hopital .vehicle-status-indicator { background: #B71C1C; }
.modern-vehicle-card.statut-transport-hopital .vehicle-status-text { color: #B71C1C; }

.modern-vehicle-card.statut-hors-service .vehicle-status-indicator { background: #757575; }
.modern-vehicle-card.statut-hors-service .vehicle-status-text { color: #616161; }

/* Effet engagé - Blanc/Rouge */
.modern-vehicle-card.engaged {
    background: white;
    border: 3px solid #E53935;
    box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.15), 0 8px 24px rgba(229, 57, 53, 0.25);
    animation: pulse-glow 2s ease-in-out infinite;
}

.modern-vehicle-card.engaged .vehicle-card-header {
    background: #E53935;
    border-bottom: none;
}

.modern-vehicle-card.engaged .vehicle-status-indicator {
    background: white;
}

.modern-vehicle-card.engaged .vehicle-status-text {
    color: white;
}

.modern-vehicle-card.engaged .vehicle-title,
.modern-vehicle-card.engaged .vehicle-subtitle {
    color: #E53935;
    font-weight: 800;
}

/* ========================================
   CARTES PERSONNELS - Dashboard Pompier MODERNE
======================================== */
.modern-personnel-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.modern-personnel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.personnel-card-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #F5F5F5;
}

.personnel-status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.personnel-status-text {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.personnel-card-body {
    padding: 16px;
}

.personnel-title {
    font-size: 15px;
    font-weight: 700;
    color: #212121;
    margin-bottom: 6px;
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.personnel-grade {
    font-size: 12px;
    font-weight: 600;
    color: #757575;
}

/* Couleurs selon statut personnel */
.modern-personnel-card.statut-personnel-disponible .personnel-status-indicator { background: #43A047; }
.modern-personnel-card.statut-personnel-disponible .personnel-status-text { color: #2E7D32; }

.modern-personnel-card.statut-personnel-en-garde .personnel-status-indicator { background: #00ACC1; }
.modern-personnel-card.statut-personnel-en-garde .personnel-status-text { color: #00838F; }

.modern-personnel-card.statut-personnel-en-intervention .personnel-status-indicator { background: #E53935; }
.modern-personnel-card.statut-personnel-en-intervention .personnel-status-text { color: #C62828; }

.modern-personnel-card.statut-personnel-indisponible .personnel-status-indicator { background: #757575; }
.modern-personnel-card.statut-personnel-indisponible .personnel-status-text { color: #616161; }

/* Effet engagé - Blanc/Rouge */
.modern-personnel-card.engaged {
    background: white;
    border: 3px solid #E53935;
    box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.15), 0 8px 24px rgba(229, 57, 53, 0.25);
    animation: pulse-glow 2s ease-in-out infinite;
}

.modern-personnel-card.engaged .personnel-card-header {
    background: #E53935;
    border-bottom: none;
}

.modern-personnel-card.engaged .personnel-status-indicator {
    background: white;
}

.modern-personnel-card.engaged .personnel-status-text {
    color: white;
}

.modern-personnel-card.engaged .personnel-title,
.modern-personnel-card.engaged .personnel-grade {
    color: #E53935;
    font-weight: 800;
}

/* Animation pulse */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.15), 0 8px 24px rgba(229, 57, 53, 0.25);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(229, 57, 53, 0.25), 0 8px 32px rgba(229, 57, 53, 0.35);
    }
}

/* ========================================
   CARTES VÉHICULES - Dashboard Pompier
======================================== */
.vehicle-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
}

.vehicle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
}

.vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.vehicle-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.vehicle-name {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.3;
}

.vehicle-code {
    font-size: 12px;
    font-weight: 600;
    color: #757575;
    margin-bottom: 8px;
}

.vehicle-status {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 12px;
    display: inline-block;
    letter-spacing: 0.5px;
}

/* Couleurs véhicules */
.vehicle-card.statut-disponible::before { background: #43A047; }
.vehicle-card.statut-disponible .vehicle-name { color: #2E7D32; }
.vehicle-card.statut-disponible .vehicle-status { background: #E8F5E9; color: #2E7D32; }

.vehicle-card.statut-en-alerte::before { background: #FDD835; }
.vehicle-card.statut-en-alerte .vehicle-name { color: #F57F17; }
.vehicle-card.statut-en-alerte .vehicle-status { background: #FFFDE7; color: #F57F17; }

.vehicle-card.statut-en-route::before { background: #FB8C00; }
.vehicle-card.statut-en-route .vehicle-name { color: #E65100; }
.vehicle-card.statut-en-route .vehicle-status { background: #FFF3E0; color: #E65100; }

.vehicle-card.statut-sur-les-lieux::before { background: #E53935; }
.vehicle-card.statut-sur-les-lieux .vehicle-name { color: #C62828; }
.vehicle-card.statut-sur-les-lieux .vehicle-status { background: #FFEBEE; color: #C62828; }

.vehicle-card.statut-transport-hopital::before { background: #B71C1C; }
.vehicle-card.statut-transport-hopital .vehicle-name { color: #B71C1C; }
.vehicle-card.statut-transport-hopital .vehicle-status { background: #FFCDD2; color: #B71C1C; }

.vehicle-card.statut-hors-service::before { background: #757575; }
.vehicle-card.statut-hors-service .vehicle-name { color: #616161; }
.vehicle-card.statut-hors-service .vehicle-status { background: #F5F5F5; color: #616161; }

/* Effet engagé - Blanc/Rouge */
.vehicle-card.is-engaged {
    background: white !important;
    border: 4px solid #E53935 !important;
    box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.2), 0 8px 24px rgba(229, 57, 53, 0.4) !important;
    animation: pulse-engaged 2s ease-in-out infinite;
}

.vehicle-card.is-engaged::before {
    background: #E53935 !important;
    height: 8px;
}

.vehicle-card.is-engaged .vehicle-name,
.vehicle-card.is-engaged .vehicle-code {
    color: #E53935 !important;
    font-weight: 900;
}

.vehicle-card.is-engaged .vehicle-status {
    background: #E53935 !important;
    color: white !important;
}

/* ========================================
   CARTES PERSONNELS - Dashboard Pompier (refonte)
======================================== */
.personnel-card-pompier {
    background: white;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
}

.personnel-card-pompier::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
}

.personnel-card-pompier:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.personnel-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.personnel-fullname {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.3;
}

.personnel-grade-label {
    font-size: 11px;
    font-weight: 600;
    color: #757575;
    margin-bottom: 8px;
}

.personnel-status-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 12px;
    display: inline-block;
    letter-spacing: 0.5px;
}

/* Couleurs personnels */
.personnel-card-pompier.statut-personnel-disponible::before { background: #43A047; }
.personnel-card-pompier.statut-personnel-disponible .personnel-fullname { color: #2E7D32; }
.personnel-card-pompier.statut-personnel-disponible .personnel-status-badge { background: #E8F5E9; color: #2E7D32; }

.personnel-card-pompier.statut-personnel-en-garde::before { background: #00ACC1; }
.personnel-card-pompier.statut-personnel-en-garde .personnel-fullname { color: #00838F; }
.personnel-card-pompier.statut-personnel-en-garde .personnel-status-badge { background: #E0F7FA; color: #00838F; }

.personnel-card-pompier.statut-personnel-en-intervention::before { background: #E53935; }
.personnel-card-pompier.statut-personnel-en-intervention .personnel-fullname { color: #C62828; }
.personnel-card-pompier.statut-personnel-en-intervention .personnel-status-badge { background: #FFEBEE; color: #C62828; }

.personnel-card-pompier.statut-personnel-indisponible::before { background: #757575; }
.personnel-card-pompier.statut-personnel-indisponible .personnel-fullname { color: #616161; }
.personnel-card-pompier.statut-personnel-indisponible .personnel-status-badge { background: #F5F5F5; color: #616161; }

/* Effet engagé - Blanc/Rouge */
.personnel-card-pompier.is-engaged {
    background: white !important;
    border: 4px solid #E53935 !important;
    box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.2), 0 8px 24px rgba(229, 57, 53, 0.4) !important;
    animation: pulse-engaged 2s ease-in-out infinite;
}

.personnel-card-pompier.is-engaged::before {
    background: #E53935 !important;
    height: 8px;
}

.personnel-card-pompier.is-engaged .personnel-fullname,
.personnel-card-pompier.is-engaged .personnel-grade-label {
    color: #E53935 !important;
    font-weight: 900;
}

.personnel-card-pompier.is-engaged .personnel-status-badge {
    background: #E53935 !important;
    color: white !important;
}

/* ========================================
   LISTES
======================================== */
.list-group {
    list-style: none;
}

.list-item {
    padding: 15px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s ease;
}

.list-item:hover {
    background: var(--color-bg);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
}

.list-item-subtitle {
    font-size: 12px;
    color: var(--color-text-light);
}

.list-item-actions {
    display: flex;
    gap: 8px;
}

/* ========================================
   INTERVENTIONS
======================================== */
.intervention-card {
    background: var(--color-surface);
    border-left: 4px solid var(--color-primary);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.intervention-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(3px);
}

.intervention-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.intervention-numero {
    font-weight: 700;
    font-size: 16px;
    color: var(--color-text);
}

.intervention-type {
    font-size: 13px;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.intervention-adresse {
    font-size: 14px;
    color: var(--color-text);
    margin-bottom: 8px;
}

.intervention-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--color-text-light);
    margin-top: 10px;
}

.intervention-engins {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.engin-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    margin-right: 6px;
    margin-top: 6px;
}

/* ========================================
   ENGINS
======================================== */
.engin-item {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.engin-item:hover {
    border-color: var(--color-primary);
}

.engin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.engin-code {
    font-weight: 700;
    font-size: 15px;
    color: var(--color-text);
}

.engin-info {
    font-size: 12px;
    color: var(--color-text-light);
}

/* ========================================
   PRIORITÉS INTERVENTIONS
======================================== */
.priorite-p1 {
    border-left-color: #C62828 !important;
}

.priorite-p2 {
    border-left-color: #F57C00 !important;
}

.priorite-p3 {
    border-left-color: #FBC02D !important;
}

.priorite-p4 {
    border-left-color: #7CB342 !important;
}

/* ========================================
   UTILITAIRES
======================================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--color-text-light);
}

.empty-state svg {
    width: 60px;
    height: 60px;
    opacity: 0.3;
    margin-bottom: 15px;
}

/* ========================================
   PERSONNEL CARDS
======================================== */
.personnel-card {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.personnel-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.personnel-card.selected-cta {
    background: #FFFFFF;
    color: #E53935;
    border: 3px solid #E53935;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(229, 57, 53, 0.3);
}

.personnel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.personnel-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--color-text);
}

.personnel-matricule {
    font-size: 11px;
    color: var(--color-text-light);
    text-transform: uppercase;
}

.personnel-grade {
    font-size: 12px;
    margin-top: 4px;
}

/* ========================================
   SECTION HEADERS
======================================== */
.section-header {
    background: var(--color-primary);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header svg {
    flex-shrink: 0;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
    .navbar {
        padding: 0 15px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }
    
    .page-actions {
        flex-direction: column;
    }
    
    .btn-block-mobile {
        width: 100%;
    }
}
