/**
 * OPFIELD v3 — CSS Commun
 * ========================
 * Thème militaire sci-fi
 * Variables globales, composants partagés, utilitaires
 */

/* ================================================================
   VARIABLES CSS GLOBALES
   ================================================================ */
:root {
  /* Couleurs principales */
  --bg-primary:     #0D1117;
  --bg-secondary:   #161B22;
  --bg-tertiary:    #1C2128;
  --bg-card:        #21262D;
  --bg-hover:       #2D333B;
  --bg-active:      #388BFD1A;

  /* Accent militaire */
  --accent-green:   #3FB950;
  --accent-green-d: #2EA043;
  --accent-green-l: #56D364;
  --accent-blue:    #388BFD;
  --accent-blue-d:  #1F6FEB;
  --accent-orange:  #D29922;
  --accent-red:     #F85149;
  --accent-purple:  #8957E5;
  --accent-cyan:    #39C5CF;

  /* Texte */
  --text-primary:   #E6EDF3;
  --text-secondary: #8B949E;
  --text-muted:     #484F58;
  --text-link:      #388BFD;

  /* Bordures */
  --border-default: #30363D;
  --border-muted:   #21262D;
  --border-accent:  #3FB95066;

  /* Statuts op */
  --status-planned:   #8B949E;
  --status-briefing:  #3FB950;
  --status-combat:    #F85149;
  --status-suspended: #D29922;
  --status-closed:    #484F58;

  /* Équipes */
  --team-red:     #E53935;
  --team-blue:    #1E88E5;
  --team-green:   #43A047;
  --team-yellow:  #FDD835;
  --team-cyan:    #00ACC1;
  --team-orange:  #FB8C00;
  --team-purple:  #8E24AA;
  --team-white:   #F5F5F5;

  /* Typographie */
  --font-mono:    'Courier New', 'Courier', monospace;
  --font-ui:      -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Espacements */
  --space-xs:     4px;
  --space-sm:     8px;
  --space-md:     16px;
  --space-lg:     24px;
  --space-xl:     32px;
  --space-2xl:    48px;

  /* Rayons */
  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    12px;
  --radius-full:  9999px;

  /* Ombres */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:    0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg:    0 8px 24px rgba(0,0,0,0.6);
  --shadow-glow:  0 0 12px rgba(63,185,80,0.3);

  /* Transitions */
  --transition:   all 0.2s ease;
  --transition-slow: all 0.4s ease;

  /* Sidebar */
  --sidebar-width: 220px;
  --sidebar-collapsed: 60px;

  /* Header */
  --header-height: 56px;

  /* Z-index */
  --z-base:     1;
  --z-dropdown: 100;
  --z-modal:    200;
  --z-toast:    300;
  --z-overlay:  400;
}

/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-ui);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a:hover { color: var(--accent-blue-d); }

img { max-width: 100%; }

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  transition: var(--transition);
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  transition: var(--transition);
  outline: none;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(63,185,80,0.15);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

select option {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* ================================================================
   SCROLLBAR PERSONNALISÉE
   ================================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-default); }

/* ================================================================
   TYPOGRAPHIE
   ================================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 { font-size: 1.71rem; }
h2 { font-size: 1.43rem; }
h3 { font-size: 1.21rem; }
h4 { font-size: 1.07rem; }

.mono { font-family: var(--font-mono); }
.text-sm { font-size: 0.857rem; }
.text-xs { font-size: 0.786rem; }
.text-muted { color: var(--text-secondary); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.text-orange { color: var(--accent-orange); }
.text-blue { color: var(--accent-blue); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 600; }
.font-mono { font-family: var(--font-mono); }

/* ================================================================
   BOUTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.857rem;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: var(--transition);
  user-select: none;
  min-height: 32px;
}

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

/* Variantes */
.btn-primary {
  background: var(--accent-green-d);
  color: #fff;
  border-color: var(--accent-green-d);
}
.btn-primary:hover {
  background: var(--accent-green);
  border-color: var(--accent-green);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-default);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--text-secondary);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-icon {
  padding: var(--space-sm);
  min-width: 32px;
  justify-content: center;
}

/* Tailles */
.btn-sm {
  padding: 4px var(--space-sm);
  font-size: 0.786rem;
  min-height: 26px;
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
  min-height: 44px;
}

/* Gros bouton terrain (compatible gants) */
.btn-xl {
  padding: var(--space-lg) var(--space-2xl);
  font-size: 1.14rem;
  min-height: 56px;
  border-radius: var(--radius-md);
}

/* ================================================================
   FORMULAIRES
   ================================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

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

.form-label.required::after {
  content: ' *';
  color: var(--accent-red);
}

.form-hint {
  font-size: 0.786rem;
  color: var(--text-muted);
}

.form-error {
  font-size: 0.786rem;
  color: var(--accent-red);
}

.input-group {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.input-group input {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group .btn {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-left: none;
}

/* Champ en erreur / conflit fréquence */
.input-conflict {
  border-color: var(--accent-red) !important;
  background: rgba(248,81,73,0.05) !important;
}

.input-conflict:focus {
  box-shadow: 0 0 0 3px rgba(248,81,73,0.2) !important;
}

/* ================================================================
   CARDS
   ================================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-muted);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body { /* Pas de styles supplémentaires par défaut */ }

.card-footer {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-muted);
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
}

/* ================================================================
   BADGES & TAGS
   ================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px var(--space-sm);
  border-radius: var(--radius-full);
  font-size: 0.714rem;
  font-weight: 600;
  white-space: nowrap;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-green  { background: rgba(63,185,80,0.15);  color: var(--accent-green-l); border: 1px solid rgba(63,185,80,0.3); }
.badge-blue   { background: rgba(56,139,253,0.15);  color: var(--accent-blue);   border: 1px solid rgba(56,139,253,0.3); }
.badge-red    { background: rgba(248,81,73,0.15);   color: var(--accent-red);    border: 1px solid rgba(248,81,73,0.3); }
.badge-orange { background: rgba(210,153,34,0.15);  color: var(--accent-orange); border: 1px solid rgba(210,153,34,0.3); }
.badge-gray   { background: rgba(139,148,158,0.15); color: var(--text-secondary);border: 1px solid rgba(139,148,158,0.3); }
.badge-purple { background: rgba(137,87,229,0.15);  color: var(--accent-purple); border: 1px solid rgba(137,87,229,0.3); }
.badge-cyan   { background: rgba(57,197,207,0.15);  color: var(--accent-cyan);   border: 1px solid rgba(57,197,207,0.3); }

/* Badge statut op */
.badge-planned   { background: rgba(139,148,158,0.15); color: var(--text-secondary); border: 1px solid var(--border-default); }
.badge-briefing  { background: rgba(63,185,80,0.15);   color: var(--accent-green);   border: 1px solid rgba(63,185,80,0.3); }
.badge-combat    { background: rgba(248,81,73,0.15);   color: var(--accent-red);     border: 1px solid rgba(248,81,73,0.3); }
.badge-suspended { background: rgba(210,153,34,0.15);  color: var(--accent-orange);  border: 1px solid rgba(210,153,34,0.3); }
.badge-closed    { background: rgba(72,79,88,0.3);     color: var(--text-muted);     border: 1px solid var(--border-muted); }

/* ================================================================
   MODALES
   ================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.2s ease;
  box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-sm { max-width: 380px; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 960px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-default);
}

.modal-title {
  font-size: 1.07rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-close {
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  transition: var(--transition);
}
.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-default);
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
}

/* Modale de confirmation critique (fond coloré) */
.modal-status-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  animation: fadeIn 0.15s ease;
}

.modal-status {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  max-width: 400px;
  width: 100%;
  border: 2px solid;
  box-shadow: var(--shadow-lg);
}

/* ================================================================
   DRAWER (panneau latéral glissant)
   ================================================================ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: calc(var(--z-modal) - 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 480px;
  max-width: 95vw;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-default);
  z-index: var(--z-modal);
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer.active { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-tertiary);
  flex-shrink: 0;
}

.drawer-title {
  font-family: var(--font-mono);
  font-size: 0.857rem;
  color: var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
}

.drawer-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-default);
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  flex-shrink: 0;
  background: var(--bg-tertiary);
}

/* ================================================================
   ACCORDÉON
   ================================================================ */
.accordion-item {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  overflow: hidden;
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  cursor: pointer;
  background: var(--bg-card);
  transition: var(--transition);
  user-select: none;
}

.accordion-header:hover { background: var(--bg-hover); }

.accordion-header.active { background: var(--bg-active); }

.accordion-chevron {
  color: var(--text-secondary);
  transition: transform 0.2s ease;
  font-size: 0.857rem;
}

.accordion-header.active .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  display: none;
  padding: var(--space-md);
  border-top: 1px solid var(--border-muted);
  background: var(--bg-secondary);
}

.accordion-body.active { display: block; }

/* ================================================================
   TOASTS
   ================================================================ */
#toast-container {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-sm);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-md);
  font-size: 0.857rem;
  max-width: 360px;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.25s ease;
  pointer-events: auto;
}

.toast.toast-visible {
  opacity: 1;
  transform: translateX(0);
}

.toast-success { border-color: var(--accent-green);  }
.toast-error   { border-color: var(--accent-red);    }
.toast-warning { border-color: var(--accent-orange); }
.toast-info    { border-color: var(--accent-blue);   }

.toast-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.toast-success .toast-icon { color: var(--accent-green); }
.toast-error   .toast-icon { color: var(--accent-red); }
.toast-warning .toast-icon { color: var(--accent-orange); }
.toast-info    .toast-icon { color: var(--accent-blue); }

/* ================================================================
   PASTILLE GPS (CE / CdG)
   ================================================================ */
.gps-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

.gps-dot-green  { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); }
.gps-dot-yellow { background: #FDD835; box-shadow: 0 0 6px #FDD835; }
.gps-dot-orange { background: var(--accent-orange); box-shadow: 0 0 6px var(--accent-orange); }
.gps-dot-red    { background: var(--accent-red); box-shadow: 0 0 6px var(--accent-red); }

/* Mode économie batterie → triangle */
.gps-dot-eco {
  width: 0;
  height: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid var(--accent-orange);
}

/* ================================================================
   BARRES DE PROGRESSION
   ================================================================ */
.progress-bar {
  height: 4px;
  background: var(--bg-hover);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-green);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.progress-fill-orange { background: var(--accent-orange); }
.progress-fill-red    { background: var(--accent-red); }
.progress-fill-blue   { background: var(--accent-blue); }

/* ================================================================
   TABLEAUX
   ================================================================ */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.857rem;
}

thead tr {
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-default);
}

th {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.786rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-muted);
  color: var(--text-primary);
}

tr:last-child td { border-bottom: none; }

tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: var(--bg-hover); }

/* ================================================================
   BARRE DE CHARGEMENT 3S (délai statut objectif)
   ================================================================ */
.pending-bar {
  height: 3px;
  background: var(--bg-hover);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: var(--space-xs);
}

.pending-bar-fill {
  height: 100%;
  background: var(--accent-orange);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 3s linear;
}

.pending-bar-fill.running { width: 100%; }

/* ================================================================
   ÉTAT VIDE
   ================================================================ */
.empty-state {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.empty-state-desc {
  font-size: 0.857rem;
  color: var(--text-muted);
}

/* ================================================================
   LOADING / SPINNER
   ================================================================ */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-default);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: var(--z-overlay);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.loading-text {
  font-family: var(--font-mono);
  font-size: 0.857rem;
  color: var(--accent-green);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ================================================================
   BADGE SOS / ALERTE (clignotant)
   ================================================================ */
.alert-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.alert-badge-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: var(--accent-red);
  border-radius: var(--radius-full);
  font-size: 0.643rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  animation: pulse-red 1.5s ease-in-out infinite;
  border: 2px solid var(--bg-primary);
}

/* ================================================================
   PICKER FRÉQUENCES (tableau canal × CTCSS)
   ================================================================ */
.freq-picker {
  font-family: var(--font-mono);
  font-size: 0.786rem;
}

.freq-picker-table {
  border-collapse: collapse;
  width: 100%;
}

.freq-picker-table th,
.freq-picker-table td {
  border: 1px solid var(--border-muted);
  padding: 3px 5px;
  text-align: center;
  cursor: pointer;
  transition: background 0.1s ease;
  font-size: 0.714rem;
  white-space: nowrap;
}

.freq-picker-table th {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.643rem;
  text-transform: uppercase;
  cursor: default;
  position: sticky;
  top: 0;
}

.freq-picker-table td:hover {
  background: var(--bg-active);
  color: var(--accent-green);
}

.freq-picker-table td.selected {
  background: var(--accent-green-d);
  color: #fff;
  font-weight: 700;
}

.freq-picker-table td.used {
  background: rgba(56,139,253,0.1);
  color: var(--accent-blue);
}

.freq-picker-table td.conflict {
  background: rgba(248,81,73,0.1);
  color: var(--accent-red);
}

.freq-picker-table td.blocked {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.5;
}

.freq-picker-preview {
  margin-top: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.857rem;
  color: var(--accent-green);
  border: 1px solid var(--border-accent);
}

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-red {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.15); opacity: 0.8; }
}

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

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

@keyframes wave {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%       { transform: scale(1.8); opacity: 0; }
}

/* Animation ondulation (marqueurs carte) */
.marker-wave::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid currentColor;
  animation: wave 1.5s ease-out infinite;
  pointer-events: none;
}

/* Scan radar (écran de veille) */
@keyframes radar-sweep {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes glitch {
  0%, 95%, 100% { transform: none; opacity: 1; clip-path: none; }
  96% { transform: translate(-2px, 1px); clip-path: inset(20% 0 60% 0); }
  97% { transform: translate(2px, -1px); clip-path: inset(60% 0 10% 0); }
  98% { transform: translate(-1px, 0); clip-path: inset(40% 0 30% 0); }
}

/* Iris militaire (entrée/sortie veille) */
@keyframes iris-open {
  from { clip-path: circle(0% at 50% 50%); }
  to   { clip-path: circle(150% at 50% 50%); }
}

@keyframes iris-close {
  from { clip-path: circle(150% at 50% 50%); }
  to   { clip-path: circle(0% at 50% 50%); }
}

.iris-open  { animation: iris-open  0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.iris-close { animation: iris-close 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.iris-fast  { animation-duration: 0.15s !important; }

/* ================================================================
   UTILITAIRES
   ================================================================ */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.gap-xs  { gap: var(--space-xs); }
.gap-sm  { gap: var(--space-sm); }
.gap-md  { gap: var(--space-md); }
.gap-lg  { gap: var(--space-lg); }
.flex-1  { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.w-full  { width: 100%; }
.hidden  { display: none !important; }
.invisible { visibility: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rounded  { border-radius: var(--radius-md); }
.border   { border: 1px solid var(--border-default); }
.cursor-pointer { cursor: pointer; }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.p-md  { padding: var(--space-md); }
.p-lg  { padding: var(--space-lg); }

/* Couleurs d'équipe dynamiques */
.team-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  :root { --sidebar-width: 100%; }
  .drawer { width: 100%; }
  #toast-container {
    bottom: var(--space-md);
    right: var(--space-md);
    left: var(--space-md);
  }
  .toast { max-width: 100%; }
}
