/* =================================================================
   CRF URGENCE - Design System v3.0
   "Command Ready" — Outil de Gestion Opérationnelle CRF
   ================================================================= */

/* ----------------------------------------------------------------
   1. Design Tokens
   ---------------------------------------------------------------- */
:root {
  /* Brand */
  --crf-red:        #D6001C;
  --crf-red-hover:  #b8001a;
  --crf-red-light:  #fff1f2;
  --crf-red-mid:    #fde8ea;

  /* Dark UI (navbar, panels) */
  --crf-dark:       #0d1117;
  --crf-dark-2:     #161b22;
  --crf-dark-3:     #21262d;
  --crf-dark-4:     #30363d;

  /* App Background */
  --bg-app:         #edf0f7;
  --bg-card:        #ffffff;
  --bg-elevated:    #f8f9fb;
  --bg-inset:       #f2f4f8;

  /* Text */
  --text-primary:   #111827;
  --text-secondary: #374151;
  --text-muted:     #6b7280;
  --text-subtle:    #9ca3af;

  /* Borders */
  --border-color:   #e5e7eb;
  --border-soft:    #f0f1f5;
  --border-strong:  #d1d5db;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15,18,28,.05);
  --shadow-sm: 0 1px 4px rgba(15,18,28,.07), 0 1px 2px rgba(15,18,28,.04);
  --shadow-md: 0 4px 14px rgba(15,18,28,.09), 0 2px 4px rgba(15,18,28,.04);
  --shadow-lg: 0 12px 30px rgba(15,18,28,.11), 0 4px 8px rgba(15,18,28,.06);
  --shadow-glow-red: 0 0 0 3px rgba(214,0,28,.12);

  /* Radius */
  --radius-sm: 7px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  /* Transition */
  --transition:      0.15s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 0.28s cubic-bezier(0.4,0,0.2,1);

  /* Status Colors */
  --color-ur:        #dc2626;
  --color-ua:        #ea580c;
  --color-dcd:       #374151;
  --color-impliques: #2563eb;
}

/* ----------------------------------------------------------------
   2. Base
   ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----------------------------------------------------------------
   3. CRF Navbar
   ---------------------------------------------------------------- */
.crf-navbar {
  background: var(--crf-dark);
  background-image: linear-gradient(to right, var(--crf-dark) 0%, #131a27 60%, var(--crf-dark) 100%);
  min-height: 60px;
  padding: 0 1.5rem;
  border-bottom: 3px solid var(--crf-red);
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 20px rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.crf-navbar .navbar-brand {
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: .92;
  transition: opacity var(--transition);
}
.crf-navbar .navbar-brand:hover { opacity: 1; text-decoration: none; color: #fff; }

.crf-navbar .brand-logo {
  height: 28px;
  filter: brightness(0) invert(1);
}

.crf-navbar .mission-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  letter-spacing: .01em;
}

.crf-navbar .mission-sub {
  font-size: 0.68rem;
  color: rgba(255,255,255,.45);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.crf-navbar .nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Navbar buttons */
.btn-nav {
  color: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.10);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  background: rgba(255,255,255,.04);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: .01em;
}
.btn-nav:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.20);
  color: #fff;
  text-decoration: none;
}
.btn-nav-primary {
  background: var(--crf-red) !important;
  border-color: var(--crf-red) !important;
  color: #fff !important;
  font-weight: 600;
}
.btn-nav-primary:hover {
  background: var(--crf-red-hover) !important;
  border-color: var(--crf-red-hover) !important;
  box-shadow: 0 2px 10px rgba(214,0,28,.35);
}
.btn-nav-dropdown {
  background: transparent;
}

/* Nav user pill */
.nav-user {
  color: rgba(255,255,255,.40);
  font-size: 0.74rem;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
}

/* Status dropdown */
.status-dropdown-btn {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 999px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition);
}
.status-dropdown-btn.status-active  { background: #dcfce7; color: #15803d; }
.status-dropdown-btn.status-closed  { background: var(--crf-red-mid); color: var(--crf-red); }
.status-dropdown-btn.status-test    { background: #f3e8ff; color: #7c3aed; }

/* ----------------------------------------------------------------
   4. Info Bar
   ---------------------------------------------------------------- */
.crf-info-bar {
  background: var(--crf-dark-2);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 6px 1.5rem;
  font-size: 0.77rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.crf-info-bar::-webkit-scrollbar { display: none; }

.info-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 18px;
  color: rgba(255,255,255,.50);
}
.info-item strong { color: rgba(255,255,255,.88); font-weight: 600; }
.info-item i      { color: rgba(255,255,255,.30); font-size: 0.72rem; }
.info-sep         { color: rgba(255,255,255,.12); margin-right: 18px; }

/* ----------------------------------------------------------------
   5. Cards
   ---------------------------------------------------------------- */
.crf-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1rem;
  transition: box-shadow var(--transition);
}
.crf-card:hover { box-shadow: var(--shadow-md); }

.crf-card-header {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(to bottom, #f9fafb, #f4f5f8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.crf-card-title {
  margin: 0;
  font-weight: 800;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  display: flex;
  align-items: center;
  gap: 7px;
}

.crf-card-body { padding: 1rem 1.15rem; }

/* ----------------------------------------------------------------
   6. Locked Alert
   ---------------------------------------------------------------- */
.crf-alert-locked {
  background: linear-gradient(to right, #fffbeb, #fffcf0);
  border: none;
  border-top: 3px solid #f59e0b;
  border-bottom: 1px solid #fde68a;
  color: #78350f;
  padding: 9px 1.5rem;
  font-size: 0.82rem;
  margin: 0;
}

/* ----------------------------------------------------------------
   7. Bilan / Dénombrement Counters
   ---------------------------------------------------------------- */
.bilan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 575px) {
  .bilan-grid { grid-template-columns: repeat(2, 1fr); }
}

.bilan-counter {
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}
.bilan-counter:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Colored gradient backgrounds */
.bilan-ur       { background: linear-gradient(145deg,#fff1f2,#fde8e8); border-color: #fecdd3; }
.bilan-ua       { background: linear-gradient(145deg,#fff7ed,#fde8d0); border-color: #fed7aa; }
.bilan-dcd      { background: linear-gradient(145deg,#f1f5f9,#e8ecf4); border-color: #e2e8f0; }
.bilan-impliques { background: linear-gradient(145deg,#eff6ff,#dbeafe); border-color: #bfdbfe; }

.bilan-number {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 2px;
  letter-spacing: -0.03em;
}
.bilan-ur .bilan-number        { color: var(--color-ur); }
.bilan-ua .bilan-number        { color: var(--color-ua); }
.bilan-dcd .bilan-number       { color: var(--color-dcd); }
.bilan-impliques .bilan-number { color: var(--color-impliques); }

.bilan-label {
  font-size: 0.63rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Bilan input controls */
.bilan-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.bilan-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,.75);
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.bilan-btn:hover { background: #fff; box-shadow: var(--shadow-sm); }
.bilan-input {
  width: 52px;
  text-align: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 2px 4px;
  font-size: 1.5rem;
  font-weight: 800;
  background: rgba(255,255,255,.65);
  -moz-appearance: textfield;
  color: inherit;
}
.bilan-input::-webkit-inner-spin-button,
.bilan-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.bilan-input:focus {
  outline: 2px solid var(--crf-red);
  border-color: transparent;
  background: #fff;
}

/* ----------------------------------------------------------------
   8. Moyens (Resources)
   ---------------------------------------------------------------- */
.moyens-section-title {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.moyens-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}
.moyens-section-title .count-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.moyen-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 3px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
  flex-wrap: wrap;
}
.moyen-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.moyen-item.is-engage { border-left-color: #ef4444; background: #fffcfc; }
.moyen-item.is-dispo  { border-left-color: #22c55e; }

/* Type badges */
.moyen-type-badge {
  font-size: 0.63rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
}
.badge-vpsp      { background: #3b82f6; }
.badge-vl        { background: #0891b2; }
.badge-bspp      { background: #dc2626; }
.badge-samu      { background: #cac70b; }
.badge-cadre     { background: #d97706; }
.badge-benevole  { background: #d97706; }
.badge-etir      { background: #0891b2; }
.badge-minibus   { background: #059669; }
.badge-vpsp_pcps { background: #2563eb; }
.badge-default   { background: #64748b; }

.moyen-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  flex: 1;
  min-width: 60px;
}

.qual-pills { display: flex; flex-wrap: wrap; gap: 3px; }
.qual-pill {
  font-size: 0.63rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-inset);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  letter-spacing: .02em;
}

.moyen-actions { display: flex; gap: 5px; flex-shrink: 0; }

.btn-moyen {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  font-size: 0.82rem;
  background: var(--bg-elevated);
  color: var(--text-secondary);
}
.btn-moyen:hover { background: var(--border-color); box-shadow: var(--shadow-xs); }
.btn-moyen-engage {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}
.btn-moyen-engage:hover {
  background: #22c55e;
  color: #fff;
  border-color: #22c55e;
  box-shadow: 0 2px 8px rgba(34,197,94,.30);
}
.btn-moyen-dispo {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #ea580c;
}
.btn-moyen-dispo:hover {
  background: #ea580c;
  color: #fff;
  border-color: #ea580c;
  box-shadow: 0 2px 8px rgba(234,88,12,.30);
}
.btn-moyen-delete {
  background: var(--crf-red-light);
  border-color: #fecdd3;
  color: var(--crf-red);
}
.btn-moyen-delete:hover {
  background: var(--crf-red);
  color: #fff;
  border-color: var(--crf-red);
  box-shadow: 0 2px 8px rgba(214,0,28,.30);
}

/* Moyens stats bar */
.moyens-stats {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border-color);
  margin-top: 12px;
  padding-top: 10px;
}
.moyens-stat {
  flex: 1;
  text-align: center;
  padding: 4px 0;
  border-right: 1px solid var(--border-color);
}
.moyens-stat:last-child { border-right: none; }
.moyens-stat-value {
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.moyens-stat-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin-top: 2px;
  font-weight: 700;
}

/* ----------------------------------------------------------------
   9. Timeline (Main Courante)
   NOTE: Class names MUST match what dashboard.js creates dynamically
   via ajouterMessageAListe(). Do not rename these.
   ---------------------------------------------------------------- */
.timeline-container {
  position: relative;
  padding-left: 22px;
}
.timeline-line {
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(to bottom, var(--crf-red) 0%, var(--border-color) 100%);
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  margin-bottom: 10px;
  padding-left: 16px;
}
.timeline-bullet {
  position: absolute;
  left: -16px;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--crf-red);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--crf-red);
}
.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  transition: box-shadow var(--transition);
}
.timeline-content:hover { box-shadow: var(--shadow-sm); }
.timeline-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 5px;
}
.timeline-header strong.text-danger  { font-size: 0.82rem; }
.timeline-header strong.text-success { font-size: 0.82rem; }
.timeline-time {
  font-size: 0.68rem;
  color: var(--text-subtle);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--bg-inset);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
}
.timeline-message {
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.55;
}
.timeline-operator {
  font-size: 0.67rem;
  color: var(--text-subtle);
  margin-top: 5px;
}

/* ----------------------------------------------------------------
   10. Dashboard Layout
   ---------------------------------------------------------------- */

  
.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 1000px; /* 320px*/
  gap: 1rem;
  padding: 1rem 1.5rem;
  align-items: start;
}
@media (max-width: 1199px) {
  .dashboard-layout { grid-template-columns: 1fr 300px; }
}
@media (max-width: 991px) {
  .dashboard-layout { grid-template-columns: 1fr; padding: 0.75rem; }
}
@media (max-width: 575px) {
  .dashboard-layout { padding: 0.5rem; gap: 0.5rem; }
}

/* Mobile tabs */
.mobile-tab-bar {
  display: none;
  background: var(--crf-dark-2);
  border-bottom: 1px solid rgba(255,255,255,.07);
  position: sticky;
  top: 60px;
  z-index: 100;
}
@media (max-width: 767px) {
  .mobile-tab-bar { display: flex; }
}
.mobile-tab-btn {
  flex: 1;
  padding: 10px 8px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,.40);
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border-bottom: 2px solid transparent;
}
.mobile-tab-btn i { font-size: 1.05rem; }
.mobile-tab-btn.active {
  color: #fff;
  border-bottom-color: var(--crf-red);
}

@media (max-width: 767px) {
  .dash-col-left,
  .dash-col-right { display: none; }
  .dash-col-left.tab-active,
  .dash-col-right.tab-active { display: block; }
}

/* ----------------------------------------------------------------
   11. Add Moyen Form
   ---------------------------------------------------------------- */
.add-moyen-form {
  background: var(--bg-elevated);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 13px;
  margin-bottom: 12px;
}

/* ----------------------------------------------------------------
   12. Quick Message Form
   ---------------------------------------------------------------- */
.quick-msg-form {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 5px;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: var(--bg-card);
}

.preset-btn {
  text-align: left;
  font-size: 0.74rem;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.preset-btn.active {
  background-color: var(--crf-red) !important;
  color: #fff !important;
  border-color: var(--crf-red) !important;
}

/* ----------------------------------------------------------------
   13. History Page
   ---------------------------------------------------------------- */

/* Status badges in history table */
.crf-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: .02em;
}
.crf-badge-active {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.crf-badge-closed {
  background: var(--crf-red-mid);
  color: var(--crf-red);
  border: 1px solid #fecdd3;
}
.crf-badge-test {
  background: #f3e8ff;
  color: #7c3aed;
  border: 1px solid #e9d5ff;
}

.history-table thead th {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-subtle);
  font-weight: 800;
  border-bottom: 2px solid var(--border-color);
  padding: 11px 14px;
  background: var(--bg-elevated);
  white-space: nowrap;
}
.history-table tbody td {
  padding: 11px 14px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.875rem;
  transition: background var(--transition);
}
.history-table tbody tr:hover td { background: var(--bg-elevated); }
.history-table tbody tr:last-child td { border-bottom: none; }

/* ----------------------------------------------------------------
   14. Creation Form
   ---------------------------------------------------------------- */
.form-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.form-section:focus-within {
  box-shadow: var(--shadow-md);
}

.form-section-header {
  padding: 0.75rem 1.25rem;
  background: linear-gradient(to right, #f8f9fb, #f3f5f9);
  border-bottom: 1px solid var(--border-color);
  border-left: 4px solid var(--crf-red);
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-section-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--crf-red-mid);
  color: var(--crf-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.form-section-title {
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0;
}

.form-section-body { padding: 1.25rem; }

/* Form controls */
.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.form-control, .form-select {
  border-color: var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: all var(--transition);
  background: var(--bg-card);
}
.form-control:hover, .form-select:hover {
  border-color: var(--border-strong);
}
.form-control:focus, .form-select:focus {
  border-color: var(--crf-red);
  box-shadow: var(--shadow-glow-red);
  outline: none;
}

/* Checkbox red */
.form-check-input:checked {
  background-color: var(--crf-red);
  border-color: var(--crf-red);
}
.form-check-input:focus {
  border-color: var(--crf-red);
  box-shadow: 0 0 0 0.22rem rgba(214,0,28,.18);
}

/* ----------------------------------------------------------------
   15. Landing Page (index.php)
   ---------------------------------------------------------------- */
.hero-section {
  background: var(--crf-dark);
  background-image:
    radial-gradient(ellipse at 18% 55%, rgba(214,0,28,.13) 0%, transparent 55%),
    radial-gradient(ellipse at 82% 18%, rgba(59,130,246,.07) 0%, transparent 50%),
    linear-gradient(145deg, #0d1117 0%, #131e30 55%, #070c12 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero-content-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 3rem 0;
}

.hero-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--crf-red);
  margin-bottom: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(214,0,28,.08);
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid rgba(214,0,28,.18);
}

.hero-title {
  font-size: clamp(1.9rem, 4.5vw, 3.1rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1.1rem;
  letter-spacing: -0.02em;
}
.hero-title span { color: var(--crf-red); }

.hero-subtitle {
  color: rgba(255,255,255,.52);
  font-size: 0.95rem;
  line-height: 1.72;
  margin-bottom: 2rem;
  max-width: 440px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-cta .btn {
  padding: 12px 28px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  letter-spacing: .01em;
  transition: all var(--transition);
}
.hero-cta .btn-danger {
  box-shadow: 0 4px 18px rgba(214,0,28,.35);
}
.hero-cta .btn-danger:hover {
  box-shadow: 0 6px 24px rgba(214,0,28,.45);
  transform: translateY(-1px);
}
.hero-cta .btn-outline-light {
  border-color: rgba(255,255,255,.18);
  color: rgba(255,255,255,.82);
}
.hero-cta .btn-outline-light:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.32);
  color: #fff;
}

.hero-features {
  list-style: none;
  padding: 0;
  margin: 0;
}
.hero-features li {
  padding: 10px 0;
  color: rgba(255,255,255,.68);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.hero-features li:last-child { border-bottom: none; }
.hero-features li i {
  color: var(--crf-red);
  font-size: 0.95rem;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.hero-card {
  background: rgba(255,255,255,.055);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.05);
}
.hero-card-head {
  background: linear-gradient(135deg, var(--crf-red) 0%, #e8001e 100%);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hero-card-head-title { font-weight: 700; font-size: 0.88rem; color: #fff; letter-spacing: .01em; }
.hero-card-head-sub   { font-size: 0.68rem; color: rgba(255,255,255,.68); letter-spacing: .07em; text-transform: uppercase; }
.hero-card-body       { padding: 22px; }

/* ----------------------------------------------------------------
   16. Footer
   ---------------------------------------------------------------- */
.crf-footer {
  background: rgba(0,0,0,.28);
  padding: 14px 1.5rem;
  font-size: 0.74rem;
  color: rgba(255,255,255,.28);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid rgba(255,255,255,.05);
}
.crf-footer a { color: rgba(255,255,255,.38); text-decoration: none; }
.crf-footer a:hover { color: rgba(255,255,255,.65); }

/* ----------------------------------------------------------------
   17. Misc Utilities
   ---------------------------------------------------------------- */
.text-crf  { color: var(--crf-red) !important; }
.bg-crf    { background: var(--crf-red) !important; }

.bg-purple    { background-color: #7c3aed !important; }
.text-purple  { color: #7c3aed !important; }
.btn-purple   { background-color: #7c3aed; border-color: #7c3aed; color: #fff; }
.btn-purple:hover { background-color: #6d28d9; border-color: #6d28d9; color: #fff; }

/* Page padding */
.page-body { padding: 1.25rem 1.5rem; }
@media (max-width: 767px) { .page-body { padding: 0.75rem; } }

/* Page header */
.page-header { margin-bottom: 1.25rem; margin-top: 0.25rem; }
.page-header-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-header-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 3px 0 0;
}

/* Hero stats (landing page) */
.hero-stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--crf-red);
  line-height: 1;
  letter-spacing: -0.02em;
}
.hero-stat-label {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,.42);
  margin-top: 2px;
  font-weight: 700;
}

/* Scrollable box */
.scroll-box {
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}
.scroll-box::-webkit-scrollbar { width: 4px; }
.scroll-box::-webkit-scrollbar-track { background: transparent; }
.scroll-box::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }

/* Equipage collapse */
.equipage-detail {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 6px;
  font-size: 0.82rem;
  width: 100%;
  border: 1px solid var(--border-color);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-subtle);
  font-size: 0.875rem;
}
.empty-state i {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 10px;
  opacity: .35;
}

/* ----------------------------------------------------------------
   18. Responsive Tweaks
   ---------------------------------------------------------------- */
@media (max-width: 575px) {
  .crf-navbar   { padding: 8px 0.75rem; }
  .crf-info-bar { padding: 5px 0.75rem; font-size: 0.73rem; }
  .bilan-number { font-size: 2rem; }
  .hero-cta     { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}

@media (max-width: 767px) {
  .btn-moyen      { width: 40px; height: 40px; }
  .moyen-item     { padding: 11px 12px; }
  .bilan-counter  { padding: 12px 6px; }
}

/* ----------------------------------------------------------------
   19. Main Courante Advanced Page
   ---------------------------------------------------------------- */
.mc-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1rem;
  padding: 1rem 1.5rem;
  align-items: start;
}
@media (max-width: 991px) {
  .mc-layout { grid-template-columns: 1fr; padding: 0.75rem; }
}

/* Quick texts panel */
.quick-texts-panel {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.quick-tab-btns {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-elevated);
}
.quick-tab-btn {
  flex: 1;
  padding: 8px 4px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-subtle);
  cursor: pointer;
  transition: all var(--transition);
}
.quick-tab-btn.active { color: var(--crf-red); border-bottom-color: var(--crf-red); }
.quick-text-item {
  padding: 9px 13px;
  font-size: 0.8rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-soft);
  transition: background var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.quick-text-item:hover { background: var(--crf-red-light); }
.quick-text-item:last-child { border-bottom: none; }
.quick-text-title   { font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.quick-text-content { font-size: 0.7rem; color: var(--text-subtle); line-height: 1.3; }
