/* ===================================================================
   AlertCitoyen — identité visuelle unifiée (toutes les pages)
   =================================================================== */

:root {
  --navy: #0B1F3A;
  --canvas: #F2F5F9;
  --card: #FFFFFF;
  --line: rgba(11, 31, 58, .09);
  --line-strong: rgba(11, 31, 58, .18);

  --red: #C8102E;
  --red-soft: rgba(200, 16, 46, .10);
  --green: #178A66;
  --green-soft: rgba(23, 138, 102, .11);

  --gabon-green: #009639;
  --gabon-yellow: #FCD116;
  --gabon-blue: #3A75C4;

  --t1: #0B1F3A;
  --t2: #5A6E88;
  --t3: #9AABC2;

  --shadow-sm: 0 1px 2px rgba(11, 31, 58, .06), 0 1px 1px rgba(11, 31, 58, .04);
  --shadow-md: 0 8px 24px rgba(11, 31, 58, .10), 0 2px 6px rgba(11, 31, 58, .06);
  --shadow-lg: 0 24px 60px rgba(11, 31, 58, .20);

  /* Extensions nécessaires aux dashboards professionnels (hors maquette citoyenne) */
  --on-accent: #FFFFFF;
  --header-text: #FFFFFF;
  --header-text-soft: rgba(255, 255, 255, .68);
  --badge-blue: #1D4F8C;
  --badge-green: #1A7A33;
  --badge-red: #A10D26;
  --badge-amber: #8A6500;
  --cat-agression: #B5179E;
  --cat-accident: #F4A100;
  --cat-incendie: #FF7A00;
  --cat-inondation: #3A75C4;
  --cat-secours: #178A66;
  --cat-autre: #6B7C93;

  --radius: 16px;
  --radius-sm: 10px;
  --transition: .2s ease;

  --font-body: 'Inter', sans-serif;
  --font-display: 'Manrope', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--canvas);
  color: var(--t1);
  font-size: 16px;
}
.display { font-family: var(--font-display); }
.mono { font-family: var(--font-mono); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: transform var(--transition), background var(--transition), opacity var(--transition);
}
button:active { transform: scale(0.96); }
a { color: var(--gabon-blue); }
.hidden { display: none !important; }

/* ===================================================================
   Header institutionnel + bande tricolore (partagé) — toujours bleu marine
   =================================================================== */

.app-header {
  background: var(--navy);
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-content { display: flex; align-items: center; gap: 0.75rem; }

.app-header .mark { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; object-fit: cover; box-shadow: var(--shadow-sm); }
.app-header .word { display: flex; flex-direction: column; }
.app-header .word .name { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: #fff; line-height: 1.1; }
.app-header .word .sub { font-size: 9px; color: rgba(255, 255, 255, .6); letter-spacing: .06em; margin-top: 2px; }
.app-header .bell { position: relative; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .08); border: none; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.app-header .bell .ping { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid var(--navy); display: none; }
.app-header .bell.has-ping .ping { display: block; }

.logo-badge {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  background: var(--red);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--on-accent);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.logo-badge.has-image { background: #FFFFFF; padding: 3px; }
.logo-badge img { width: 100%; height: 100%; object-fit: contain; }

.header-text { display: flex; flex-direction: column; line-height: 1.15; }

.app-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--header-text);
  letter-spacing: -0.01em;
}

.app-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--header-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tricolor-band, .tricolor { display: flex; width: 100%; height: 4px; flex-shrink: 0; }
.tricolor-band span, .tricolor i { flex: 1; }
.tricolor-band .green, .tricolor i:nth-child(1) { background: var(--gabon-green); }
.tricolor-band .yellow, .tricolor i:nth-child(2) { background: var(--gabon-yellow); }
.tricolor-band .blue, .tricolor i:nth-child(3) { background: var(--gabon-blue); }

.header-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--header-text-soft);
}

/* Boutons pilule réutilisés à l'intérieur du header bleu marine (ex: déconnexion) */
.app-header .filter-btn {
  background: rgba(255, 255, 255, 0.12);
  color: var(--header-text);
  border-color: rgba(255, 255, 255, 0.2);
}
.app-header .filter-btn:hover { background: rgba(255, 255, 255, 0.2); }

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gabon-green);
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(0, 150, 57, 0.5);
  animation: pulse-dot 2s infinite;
}
.status-dot.offline { background: var(--red); animation: none; }

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(0, 150, 57, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(0, 150, 57, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 150, 57, 0); }
}

/* ===================================================================
   Page dispatcher (dispatch.html / entite.html / admin.html)
   =================================================================== */

body.page-dispatch { height: 100vh; margin: 0; display: flex; flex-direction: column; overflow: hidden; }
.dispatch-header { display: flex; align-items: center; justify-content: space-between; }

.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.stat-card {
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.stat-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--t1); }
.stat-label { font-size: 0.72rem; color: var(--t2); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }

.dispatch-layout { flex: 1; display: flex; min-height: 0; }
.dispatch-map { flex: 1; min-width: 0; }

.alertes-panel {
  width: 400px;
  flex-shrink: 0;
  background: var(--card);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel-header { padding: 1rem 1.1rem 0.75rem; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.panel-header h2 { font-family: var(--font-display); margin: 0 0 0.75rem; font-size: 1rem; color: var(--t1); font-weight: 700; }

.filter-buttons { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.filter-btn {
  background: var(--canvas);
  color: var(--t2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
}
.filter-btn.active { background: var(--gabon-blue); color: var(--on-accent); border-color: var(--gabon-blue); }

.alertes-list { list-style: none; margin: 0; padding: 0.75rem; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 0.65rem; }

.alerte-card {
  background: var(--canvas);
  border: 1px solid var(--line);
  border-left: 4px solid var(--t3);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), border-color var(--transition);
}
.alerte-card:hover { background: var(--card); box-shadow: var(--shadow-md); }

.alerte-card.priorite-haute { border-left-color: var(--red); }
.alerte-card.priorite-moyenne, .alerte-card.priorite-normale { border-left-color: var(--gabon-yellow); }
.alerte-card.priorite-basse, .alerte-card.priorite-faible { border-left-color: var(--gabon-green); }

.alerte-card.card-supervised { border-left-style: dashed; background: rgba(58, 117, 196, 0.05); }

.supervision-tag {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--badge-blue);
  background: rgba(58, 117, 196, 0.12);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  margin-bottom: 0.4rem;
  width: fit-content;
}

.alerte-card-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.alerte-type { font-family: var(--font-display); font-weight: 700; font-size: 0.88rem; flex: 1; color: var(--t1); }
.alerte-heure { font-family: var(--font-mono); font-size: 0.72rem; color: var(--t2); }

.priorite-badge.priorite-haute { background: var(--red-soft); color: var(--badge-red); }
.priorite-badge.priorite-moyenne, .priorite-badge.priorite-normale { background: rgba(252, 209, 22, 0.18); color: var(--badge-amber); }
.priorite-badge.priorite-basse, .priorite-badge.priorite-faible { background: rgba(0, 150, 57, 0.15); color: var(--badge-green); }

.alerte-adresse { font-size: 0.78rem; color: var(--t2); margin-bottom: 0.25rem; }
.alerte-description { font-size: 0.82rem; color: var(--t2); margin-bottom: 0.6rem; }

.alerte-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }

.entite-badge { background: rgba(11, 31, 58, 0.06); color: var(--t2); }

.alerte-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; width: 100%; }

.action-btn {
  background: var(--card);
  color: var(--t1);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
}
.action-btn:hover { background: var(--gabon-blue); border-color: var(--gabon-blue); color: var(--on-accent); }
.action-btn.resolved:hover { background: var(--gabon-green); border-color: var(--gabon-green); color: var(--on-accent); }
.action-btn.assign { position: relative; }

.entity-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  min-width: 160px;
  z-index: 10;
  overflow: hidden;
}
.entity-menu button { background: none; color: var(--t1); text-align: left; padding: 0.6rem 0.85rem; font-size: 0.8rem; font-weight: 600; }
.entity-menu button:hover { background: var(--canvas); }

.map-marker { display: block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid white; box-shadow: 0 0 6px rgba(11, 31, 58, 0.45); }

.leaflet-popup-content-wrapper { background: var(--card); color: var(--t1); }
.leaflet-popup-tip { background: var(--card); }

@media (max-width: 860px) {
  .dispatch-layout { flex-direction: column; }
  .alertes-panel { width: 100%; height: 45%; border-left: none; border-top: 1px solid var(--line); }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

/* ===================================================================
   Page de connexion pro (login.html)
   =================================================================== */

body.page-login { min-height: 100vh; display: flex; flex-direction: column; }
.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.75rem;
}

.login-card h2 { font-family: var(--font-display); margin: 0 0 0.4rem; font-size: 1.2rem; text-align: center; color: var(--t1); }
.login-card .login-subtitle { text-align: center; color: var(--t2); font-size: 0.85rem; margin-bottom: 1.5rem; }
.login-card label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 0.4rem; color: var(--t2); }

.login-card input {
  width: 100%;
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.95rem;
  color: var(--t1);
  margin-bottom: 1rem;
  font-family: var(--font-body);
}

.login-error {
  background: var(--red-soft);
  color: var(--badge-red);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.login-demo-accounts {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--t2);
  line-height: 1.6;
  font-family: var(--font-mono);
}
.login-demo-accounts strong { color: var(--t1); font-family: var(--font-body); }

/* ===================================================================
   Modale fiche alerteur (dispatch / entité)
   =================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 58, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.modal-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
}

.modal-close-btn { background: none; color: var(--t2); float: right; font-size: 1.1rem; }

.alerteur-card { text-align: center; margin-bottom: 1.25rem; }

.alerteur-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--gabon-blue);
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 0.85rem;
  overflow: hidden;
}
.alerteur-avatar img { width: 100%; height: 100%; object-fit: cover; }

.alerteur-card h3 { font-family: var(--font-display); margin: 0 0 0.2rem; color: var(--t1); }
.alerteur-card .alerteur-quartier { color: var(--t2); font-size: 0.85rem; }

.alerteur-contact-actions { display: flex; gap: 0.6rem; margin-bottom: 1.25rem; }

.alerteur-contact-actions a {
  flex: 1;
  text-decoration: none;
  text-align: center;
  border-radius: var(--radius-sm);
  padding: 0.7rem;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--on-accent);
}
.alerteur-call-btn { background: var(--gabon-blue); }
.alerteur-whatsapp-btn { background: var(--green); }

.alerteur-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; margin-bottom: 1rem; }
.alerteur-stats .stat-card { text-align: center; }

.alerteur-fiabilite {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(252, 209, 22, 0.15);
  color: var(--badge-amber);
}

.alerte-detail-section {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--t2);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.alerte-media-section { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }
.alerte-media-photo { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.alerte-media-video { width: 100%; max-height: 260px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #000; }

.accuracy-badge { font-family: var(--font-mono); display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; font-weight: 700; color: var(--badge-green); }
.accuracy-badge.imprecise { color: var(--badge-amber); }

.map-marker.live { animation: pulse-live 1.5s infinite; }
@keyframes pulse-live {
  0% { box-shadow: 0 0 0 0 rgba(252, 209, 22, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(252, 209, 22, 0); }
  100% { box-shadow: 0 0 0 0 rgba(252, 209, 22, 0); }
}

/* ===================================================================
   Dashboard super_admin (admin.html)
   =================================================================== */

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0 1.1rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  overflow-x: auto;
}

.admin-tab-btn {
  background: none;
  color: var(--t2);
  padding: 0.85rem 0.9rem;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.admin-tab-btn.active { color: var(--t1); border-bottom-color: var(--gabon-blue); }

.admin-main { flex: 1; overflow-y: auto; padding: 1.25rem; }
.admin-section { display: block; max-width: 1100px; margin: 0 auto; }
.admin-section.hidden { display: none; }
.admin-section h2 { font-family: var(--font-display); margin: 0 0 1rem; }

/* ===================================================================
   Onglets génériques des "4 pages" partagées (dispatch / entité / admin)
   =================================================================== */

.tabs-content { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.tab-panel { flex: 1; min-height: 0; overflow-y: auto; }
.tab-panel.hidden { display: none; }
.tab-panel.full-bleed { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.tab-panel.padded { max-width: 1200px; margin: 0 auto; padding: 1.25rem; width: 100%; }

.tab-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 300px;
  padding: 3rem 1rem;
  color: var(--t2);
  text-align: center;
}
.tab-placeholder i { font-size: 2.5rem; color: var(--gabon-blue); }

/* Journal */
.journal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: flex-end;
  margin-bottom: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.journal-filters input, .journal-filters select {
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  color: var(--t1);
  font-size: 0.85rem;
  font-family: var(--font-body);
}

.journal-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: var(--t2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.journal-filters .admin-btn-primary { height: 38px; }

.journal-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }

.journal-table-wrapper {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  max-height: 65vh;
  box-shadow: var(--shadow-sm);
}

table.journal-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
table.journal-table th, table.journal-table td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  color: var(--t1);
}
table.journal-table th {
  color: var(--t2);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  background: var(--card);
}
table.journal-table tr:last-child td { border-bottom: none; }

.journal-contact-cell { display: flex; gap: 0.4rem; }
.journal-contact-cell a { color: var(--gabon-blue); font-size: 0.85rem; }

.admin-toolbar { display: flex; justify-content: flex-end; margin-bottom: 1rem; }

.admin-btn-primary {
  background: var(--gabon-blue);
  color: var(--on-accent);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.1rem;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comptes-table-wrapper { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow-sm); }

table.comptes-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
table.comptes-table th, table.comptes-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  color: var(--t1);
}
table.comptes-table th { color: var(--t2); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.04em; }
table.comptes-table tr:last-child td { border-bottom: none; }

.role-badge { font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 999px; text-transform: uppercase; }
.role-badge.role-super_admin { background: var(--red-soft); color: var(--badge-red); }
.role-badge.role-dispatch { background: rgba(58, 117, 196, 0.15); color: var(--badge-blue); }
.role-badge.role-entite { background: rgba(0, 150, 57, 0.15); color: var(--badge-green); }
.role-badge.role-citoyen { background: rgba(252, 209, 22, 0.18); color: var(--badge-amber); }

.table-action-btn {
  background: var(--canvas);
  color: var(--t1);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  margin-right: 0.3rem;
}
.table-action-btn.danger:hover { background: var(--red); border-color: var(--red); color: var(--on-accent); }

.admin-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }

/* Graphiques (Chart.js) + carte de chaleur */
.stats-charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1rem; }

.chart-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow-sm); }
.chart-card h3 { font-family: var(--font-display); margin: 0 0 0.85rem; font-size: 0.95rem; color: var(--t1); }
.chart-card .chart-wrapper { position: relative; height: 240px; }
.chart-card.full-width { grid-column: 1 / -1; }
.chart-card.full-width .chart-wrapper { height: 300px; }

#heatmap-map, #unites-map { height: 420px; border-radius: var(--radius-sm); overflow: hidden; }

@media (max-width: 700px) {
  .stats-charts-grid { grid-template-columns: 1fr; }
}

.entite-supervision-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }

.entite-supervision-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow-sm); }
.entite-supervision-card h3 { font-family: var(--font-display); margin: 0 0 0.6rem; font-size: 0.95rem; display: flex; align-items: center; gap: 0.5rem; color: var(--t1); }
.entite-supervision-card .supervision-row { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--t2); padding: 0.25rem 0; }
.entite-supervision-card .supervision-row strong { color: var(--t1); }

.auth-guard-screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; color: var(--t2); }

/* ===================================================================
   Unités de police — carte admin de placement et tracé de zones
   =================================================================== */

.unites-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.75rem; }

.unite-coord-provisoire {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--badge-amber);
  background: rgba(252, 209, 22, 0.18);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  text-transform: uppercase;
}

.unites-layout { display: flex; gap: 1rem; align-items: flex-start; }

.unites-list-panel {
  width: 320px;
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

.unite-row { padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 0.85rem; }
.unite-row:last-child { border-bottom: none; }
.unite-row:hover, .unite-row.selected { background: var(--canvas); }
.unite-row .unite-nom { font-weight: 700; color: var(--t1); display: block; margin-bottom: 0.2rem; }
.unite-row .unite-meta { color: var(--t2); font-size: 0.75rem; }

.unites-map-wrapper { flex: 1; min-width: 0; }

/* ===================================================================
   Contacts d'urgence — gestion admin (tableau + modal)
   =================================================================== */

.contact-logo-thumb {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  background: var(--canvas); border: 1px solid var(--line);
}
.contact-logo-placeholder {
  width: 32px; height: 32px; border-radius: 50%; background: var(--canvas);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  color: var(--t3); font-size: 0.8rem;
}
.contact-logo-preview {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover; margin-bottom: 0.9rem;
  background: var(--canvas); border: 1px solid var(--line); display: none;
}
.contact-logo-preview.visible { display: block; }
.contact-logo-preview img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.statut-badge.statut-actif { background: var(--green-soft); color: var(--badge-green); }
.statut-badge.statut-inactif { background: var(--red-soft); color: var(--badge-red); }

/* ===================================================================
   Composants partagés génériques (panneaux/boutons réutilisés sur
   plusieurs pages pro : admin "gestion des comptes", rapports...)
   =================================================================== */

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.back-btn { background: none; color: var(--t2); font-size: 0.9rem; display: flex; align-items: center; gap: 0.4rem; padding: 0; margin-bottom: 0.9rem; font-weight: 600; }

.panel label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 0.4rem; color: var(--t2); }

.panel input, .panel select, .panel textarea {
  width: 100%;
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.7rem;
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--t1);
  margin-bottom: 0.9rem;
}
.panel textarea { resize: vertical; }

.send-btn {
  width: 100%;
  background: var(--navy);
  color: var(--on-accent);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.send-btn:disabled { opacity: 0.6; }

.secondary-btn {
  background: var(--canvas);
  color: var(--t1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.6rem;
  font-weight: 700;
}

.rapport-options { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.rapport-options .filter-btn { padding: 0.5rem 1rem; }

.empty-state { color: var(--t2); font-size: 0.9rem; text-align: center; padding: 1.25rem; }

.badge { font-size: 0.72rem; font-weight: 700; padding: 0.3rem 0.65rem; border-radius: 999px; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.02em; }
.statut-badge.statut-en_attente { background: rgba(252, 209, 22, 0.18); color: var(--badge-amber); }
.statut-badge.statut-en_cours { background: rgba(58, 117, 196, 0.15); color: var(--badge-blue); }
.statut-badge.statut-resolue { background: rgba(0, 150, 57, 0.15); color: var(--badge-green); }

/* ===================================================================
   Application citoyenne (index.html)
   =================================================================== */

.gps-strip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--t2);
}
.gps-strip .pin { color: var(--green); flex-shrink: 0; }
.gps-strip b { color: var(--t1); font-weight: 600; }
.gps-strip .acc { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.acc-bars { display: flex; gap: 2px; align-items: flex-end; height: 11px; }
.acc-bars i { width: 3px; background: var(--t3); border-radius: 1px; display: block; }
.acc-bars.good i { background: var(--green); }
.acc-bars i:nth-child(1) { height: 4px; } .acc-bars i:nth-child(2) { height: 7px; }
.acc-bars i:nth-child(3) { height: 9px; } .acc-bars i:nth-child(4) { height: 11px; }
.acc-label { font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--t2); }
.acc-label.good { color: var(--green); }

body { display: flex; flex-direction: column; min-height: 100dvh; overscroll-behavior: none; }
.content { flex: 1; overflow-y: auto; padding: 18px 18px 96px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 11px; }
.section-title h2 { font-family: var(--font-display); font-size: 13px; font-weight: 700; margin: 0; color: var(--t1); }
.content > .section-title:first-child { margin-top: 2px; }

.view { display: block; }
.view.hidden { display: none; }

/* Icônes des catégories d'incident — anneaux pulsés (même esprit que
   l'ancien bouton SOS), teintés à la couleur de chaque catégorie via
   currentColor (voir l'attribut style="color:..." posé sur chaque .ci). */
.cat .ci { position: relative; }
.cat .ci::before, .cat .ci::after {
  content: ''; position: absolute; inset: 0; border-radius: 11px;
  border: 1.5px solid currentColor; opacity: .45; pointer-events: none;
  animation: cat-pulse 2.4s ease-out infinite;
}
.cat .ci::after { animation-delay: 1.2s; }
@keyframes cat-pulse { 0% { transform: scale(.85); opacity: .5; } 100% { transform: scale(1.55); opacity: 0; } }

/* Voice */
.voice-btn {
  width: 100%; margin-top: 18px; border: none; cursor: pointer; text-align: left;
  background: linear-gradient(135deg, #1c9c75, var(--green)); border-radius: 16px; padding: 13px 15px;
  display: flex; align-items: center; gap: 12px; color: #fff;
  box-shadow: 0 10px 22px rgba(23, 138, 102, .28); transition: transform .12s ease;
}
.voice-btn:active { transform: scale(.985); }
.voice-btn .vicon { width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, .16); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.voice-btn .vtext { flex: 1; }
.voice-btn .vtext .t { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; }
.voice-btn .vtext .s { font-size: 10.5px; opacity: .88; margin-top: 1px; }
.voice-btn .bars { display: flex; align-items: center; gap: 2.5px; height: 18px; opacity: 0; transition: opacity .2s; }
.voice-btn.recording .bars { opacity: 1; }
.bars i { width: 2.5px; background: #fff; border-radius: 2px; animation: bar .9s ease-in-out infinite; }
.bars i:nth-child(1) { height: 6px; animation-delay: 0s; } .bars i:nth-child(2) { height: 14px; animation-delay: .15s; }
.bars i:nth-child(3) { height: 9px; animation-delay: .3s; } .bars i:nth-child(4) { height: 16px; animation-delay: .45s; }
.bars i:nth-child(5) { height: 7px; animation-delay: .6s; }
@keyframes bar { 0%, 100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }

.transcript {
  margin-top: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  font-size: 12.5px; line-height: 1.55; color: var(--t1); display: none; box-shadow: var(--shadow-sm);
}
.transcript.show { display: block; }
.transcript .tlabel { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--green); font-weight: 700; margin-bottom: 5px; display: flex; align-items: center; gap: 5px; }
.transcript .actions { display: flex; gap: 8px; margin-top: 11px; }
.transcript .actions button { flex: 1; border: none; border-radius: 10px; padding: 8px 0; font-family: var(--font-display); font-weight: 700; font-size: 11.5px; cursor: pointer; }
.transcript .actions .send { background: var(--navy); color: #fff; }
.transcript .actions .retry { background: var(--canvas); color: var(--t2); border: 1px solid var(--line-strong); }
.transcript select { width: 100%; margin-top: 9px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px; font-size: 12px; background: var(--canvas); }

/* Categories */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.cat { background: var(--card); border: 1px solid var(--line); border-radius: 15px; padding: 13px 6px 11px; display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .12s ease; }
.cat:active { transform: scale(.95); }
.cat .ci { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.cat span { font-size: 10.5px; font-weight: 600; color: var(--t1); text-align: center; line-height: 1.2; }
.cat[data-type="agression"] .ci { background: var(--cat-agression); color: #fff; }
.cat[data-type="accident"] .ci { background: var(--cat-accident); color: #fff; }
.cat[data-type="incendie"] .ci { background: var(--cat-incendie); color: #fff; }
.cat[data-type="inondation"] .ci { background: var(--cat-inondation); color: #fff; }
.cat[data-type="secours_medical"] .ci { background: var(--cat-secours); color: #fff; }
.cat[data-type="autre"] .ci { background: var(--cat-autre); color: #fff; }

/* Recent list */
.recent-list { display: flex; flex-direction: column; gap: 8px; }
.recent { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px; display: flex; align-items: center; gap: 11px; box-shadow: var(--shadow-sm); }
.recent .ri { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.recent .rtext { flex: 1; min-width: 0; }
.recent .rtitle { font-size: 12.5px; font-weight: 600; color: var(--t1); }
.recent .rtime { font-size: 10.5px; color: var(--t3); margin-top: 1px; font-family: var(--font-mono); }
.recent .ri[data-type="sos"] { background: var(--red-soft); color: var(--red); }
.recent .ri[data-type="agression"] { background: rgba(181, 23, 158, .12); color: var(--cat-agression); }
.recent .ri[data-type="accident"] { background: rgba(244, 160, 0, .14); color: #9a6300; }
.recent .ri[data-type="incendie"] { background: rgba(255, 122, 0, .14); color: #b35400; }
.recent .ri[data-type="inondation"] { background: rgba(58, 117, 196, .12); color: var(--gabon-blue); }
.recent .ri[data-type="secours_medical"] { background: var(--green-soft); color: var(--green); }
.recent .ri[data-type="autre"] { background: rgba(90, 110, 136, .12); color: var(--t2); }

.pill { font-size: 9.5px; font-weight: 700; padding: 4px 9px; border-radius: 99px; white-space: nowrap; letter-spacing: .02em; flex-shrink: 0; }
.pill.recue, .pill.recu { background: rgba(58, 117, 196, .12); color: var(--gabon-blue); }
.pill.en_cours, .pill.cours { background: rgba(217, 142, 18, .12); color: #9a6300; }
.pill.resolue, .pill.resolu { background: var(--green-soft); color: var(--green); }
.pill.haute { background: var(--red-soft); color: var(--red); }

/* Bottom nav */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: center;
  padding: 11px 0 max(11px, env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); z-index: 10;
}
.navitem { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--t3); cursor: pointer; background: none; border: none; }
.navitem.active { color: var(--red); }
.navitem span { font-size: 9.5px; font-weight: 600; }

/* Category sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(11, 31, 58, .42); opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 20; }
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-radius: 24px 24px 0 0;
  padding: 10px 20px max(22px, env(safe-area-inset-bottom)); transform: translateY(105%);
  transition: transform .32s cubic-bezier(.32, .72, 0, 1); z-index: 21; box-shadow: 0 -10px 30px rgba(11, 31, 58, .18);
  max-width: 480px; margin: 0 auto;
}
.sheet.open { transform: translateY(0); }
.sheet .grabber { width: 36px; height: 4px; background: var(--line-strong); border-radius: 99px; margin: 0 auto 16px; }
.sheet-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.sheet-head .si { width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sheet-head h3 { font-family: var(--font-display); font-size: 16px; margin: 0; }
.sheet-head p { font-size: 11px; color: var(--t2); margin: 2px 0 0; }
.sheet-desc-wrap { position: relative; }
.sheet textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 40px 11px 12px; font-family: var(--font-body); font-size: 12.5px; resize: none; height: 62px; color: var(--t1); background: var(--canvas); margin-bottom: 0; }
.sheet textarea:focus { outline: 2px solid var(--gabon-blue); outline-offset: 1px; }
.sheet-mic-btn {
  position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%;
  border: none; background: var(--gabon-blue); color: #fff; display: flex; align-items: center;
  justify-content: center; cursor: pointer; flex-shrink: 0;
}
.sheet-mic-btn.recording { background: var(--red); animation: sheet-mic-pulse 1.1s ease-in-out infinite; }
@keyframes sheet-mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(200,16,46,.45); } 50% { box-shadow: 0 0 0 7px rgba(200,16,46,0); } }
.sheet-error { color: var(--red); font-size: 11.5px; margin: 6px 0 0; display: none; }
.sheet-error.show { display: block; }
.sheet-media { display: flex; gap: 8px; margin-top: 10px; }
.sheet-media-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.4px dashed var(--line-strong); border-radius: 11px; padding: 9px 0;
  font-size: 12px; font-weight: 600; color: var(--t2); cursor: pointer;
}
.sheet-media-btn.has-file { border-style: solid; border-color: var(--green); color: var(--green); background: var(--green-soft); }
.sheet .gps-row { margin-top: 11px; display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--t2); background: var(--green-soft); border-radius: 11px; padding: 9px 12px; }
.sheet .gps-row b { color: var(--green); font-family: var(--font-mono); font-weight: 500; }
.sheet .send-btn { width: 100%; margin-top: 15px; }
.sheet .cancel { width: 100%; margin-top: 8px; border: none; background: none; color: var(--t2); font-size: 12px; padding: 6px 0; cursor: pointer; font-weight: 600; }

.toast {
  position: fixed; left: 18px; right: 18px; top: max(18px, env(safe-area-inset-top)); z-index: 40; max-width: 440px; margin: 0 auto;
  background: var(--navy); color: #fff; border-radius: 13px; padding: 11px 14px; display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg); transform: translateY(-14px); opacity: 0; transition: all .3s cubic-bezier(.32, .72, 0, 1); pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast .ticon { width: 26px; height: 26px; border-radius: 8px; background: var(--green); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toast .ttext { font-size: 11.5px; line-height: 1.4; }
.toast .ttext b { font-family: var(--font-mono); font-weight: 500; }

/* Inscription citoyenne obligatoire */
.onboard { position: fixed; inset: 0; background: var(--canvas); z-index: 50; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 24px 16px; }
.onboard .ob-wrap { width: 100%; max-width: 480px; margin: auto 0; background: var(--card); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); display: grid; grid-template-columns: 1fr; }
.onboard .ob-formside, .onboard .ob-loginside { display: none; }
.onboard .ob-wrap.step-login .ob-brand { display: none; }
.onboard .ob-wrap.step-login .ob-loginside { display: flex; }
.onboard .ob-wrap.step-form .ob-brand { display: none; }
.onboard .ob-wrap.step-form .ob-formside { display: flex; }
.onboard .ob-register-link {
  border: none; background: none; color: var(--t2); font-size: 12px; font-weight: 600;
  cursor: pointer; text-align: center; margin-top: 16px; padding: 0;
}
.onboard .ob-register-link b { color: var(--gabon-blue); }

.onboard .ob-brand { background: radial-gradient(560px 420px at 18% 0%, rgba(58,117,196,.35), transparent 60%), radial-gradient(420px 420px at 100% 100%, rgba(0,150,57,.22), transparent 55%), linear-gradient(165deg, var(--navy), #142C52 70%); color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.onboard .ob-tricolor { display: flex; height: 4px; flex-shrink: 0; }
.onboard .ob-tricolor i { flex: 1; }
.onboard .ob-tricolor i:nth-child(1) { background: var(--gabon-green); }
.onboard .ob-tricolor i:nth-child(2) { background: var(--gabon-yellow); }
.onboard .ob-tricolor i:nth-child(3) { background: var(--gabon-blue); }
.onboard .ob-brand-inner { position: relative; z-index: 2; padding: 28px 26px 24px; display: flex; flex-direction: column; height: 100%; }
.onboard .ob-brand-mark { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.onboard .ob-brand-mark img { width: 36px; height: 36px; border-radius: 10px; box-shadow: var(--shadow-sm); }
.onboard .ob-brand-mark .bn { font-family: var(--font-display); font-weight: 800; font-size: 14px; }
.onboard .ob-brand-mark .bs { font-size: 9px; color: #9AB0CE; letter-spacing: .05em; margin-top: 1px; }
.onboard .ob-brand h1 { font-family: var(--font-display); font-size: 21px; line-height: 1.25; font-weight: 700; margin: 0 0 10px; letter-spacing: -.01em; }
.onboard .ob-brand h1 span { color: var(--gabon-yellow); }
.onboard .ob-lead { font-size: 12.5px; line-height: 1.6; color: #B7C6DD; margin: 0 0 22px; }
.onboard .ob-perks { display: flex; flex-direction: column; gap: 14px; margin-bottom: auto; }
.onboard .ob-perk { display: flex; gap: 10px; align-items: flex-start; }
.onboard .ob-perk .pic { width: 24px; height: 24px; border-radius: 8px; background: rgba(255,255,255,.10); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.onboard .ob-perk p { margin: 0; font-size: 11.5px; color: #D7E1F0; line-height: 1.5; }
.onboard .ob-perk p b { color: #fff; font-weight: 600; }
.onboard .ob-next-btn {
  margin-top: 22px; border: none; border-radius: 13px; padding: 13px 0; width: 100%;
  background: var(--gabon-yellow); color: var(--navy); font-family: var(--font-display); font-weight: 700;
  font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.onboard .ob-back-btn {
  background: none; border: none; color: var(--t2); font-size: 12px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 5px; padding: 0; margin-bottom: 14px;
}
.onboard .ob-brand-trust { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.14); display: flex; align-items: center; gap: 8px; }
.onboard .ob-brand-trust img { height: 28px; width: auto; border-radius: 6px; background: #fff; padding: 2px; }
.onboard .ob-brand-trust p { font-size: 9px; color: #90A6C6; line-height: 1.4; margin: 0; }

.onboard .ob-formside, .onboard .ob-loginside { padding: 28px 24px 24px; flex-direction: column; overflow-y: auto; }
.onboard .ob-form-head { margin-bottom: 18px; }
.onboard .ob-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--gabon-blue); margin-bottom: 8px; }
.onboard .ob-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--gabon-blue); }
.onboard .ob-form-head h2 { font-family: var(--font-display); font-size: 19px; font-weight: 800; margin: 0 0 5px; letter-spacing: -.01em; color: var(--t1); }
.onboard .ob-form-head p { font-size: 11.5px; color: var(--t2); margin: 0; line-height: 1.5; }

.onboard form { display: flex; flex-direction: column; gap: 13px; }
.onboard .ob-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.onboard .ob-f { display: flex; flex-direction: column; gap: 5px; }
.onboard .ob-f label { font-size: 11px; font-weight: 600; color: var(--t1); }
.onboard .ob-f input, .onboard .ob-f select { width: 100%; border: 1.4px solid var(--line-strong); border-radius: 11px; padding: 10px 12px; font-size: 13px; font-family: var(--font-body); color: var(--t1); background: #fff; }
.onboard .ob-f input::placeholder { color: var(--t3); }
.onboard .ob-f input:focus, .onboard .ob-f select:focus { outline: none; border-color: var(--gabon-blue); box-shadow: 0 0 0 3px rgba(58,117,196,.14); }

.onboard .ob-input-wrap { position: relative; }
.onboard .ob-tel-prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 600; color: var(--t2); padding-right: 8px; border-right: 1px solid var(--line-strong); }
.onboard .ob-tel-input { padding-left: 58px !important; }

.onboard .ob-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--canvas); border-radius: 11px; padding: 9px 12px; border: 1px solid var(--line); }
.onboard .ob-switch-row span { font-size: 11.5px; color: var(--t2); font-weight: 500; }
.onboard .ob-switch { position: relative; width: 36px; height: 21px; flex-shrink: 0; }
.onboard .ob-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.onboard .ob-slider { position: absolute; inset: 0; background: var(--line-strong); border-radius: 99px; cursor: pointer; transition: .2s; }
.onboard .ob-slider::before { content: ""; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.onboard .ob-switch input:checked + .ob-slider { background: var(--green); }
.onboard .ob-switch input:checked + .ob-slider::before { transform: translateX(15px); }

.onboard .ob-wa-field { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .25s ease, opacity .2s ease; display: flex; flex-direction: column; gap: 5px; }
.onboard .ob-wa-field.open { max-height: 80px; opacity: 1; margin-top: 1px; }

.onboard .ob-error { color: var(--red); font-size: 11.5px; margin: -4px 0 0; display: none; }
.onboard .ob-error.show { display: block; }

.onboard .ob-consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 2px; }
.onboard .ob-consent input { margin-top: 2.5px; accent-color: var(--gabon-blue); }
.onboard .ob-consent p { font-size: 10.5px; color: var(--t2); line-height: 1.45; margin: 0; }

.onboard .ob-submit-btn { margin-top: 6px; border: none; border-radius: 13px; padding: 13px 0; background: linear-gradient(135deg, var(--navy), #142C52); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 12px 26px rgba(11,31,58,.28); }
.onboard .ob-submit-btn:disabled { opacity: .6; }
.onboard .ob-foot-note { text-align: center; font-size: 10px; color: var(--t3); margin-top: 12px; }

/* Profil citoyen */
.profile-card { background: var(--card); border: 1px solid var(--line); border-radius: 15px; padding: 20px; text-align: center; box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--gabon-blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; margin: 0 auto 10px; overflow: hidden; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-card h3 { font-family: var(--font-display); margin: 0 0 4px; font-size: 15px; color: var(--t1); }
.profile-card p { font-size: 11.5px; color: var(--t2); margin: 2px 0; }
.profile-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; }
.profile-stats .stat { background: var(--canvas); border-radius: 11px; padding: 10px; }
.profile-stats .stat b { display: block; font-family: var(--font-display); font-size: 17px; color: var(--t1); }
.profile-stats .stat span { font-size: 9.5px; color: var(--t2); text-transform: uppercase; letter-spacing: .03em; }
.profile-fiabilite { font-size: 11.5px; font-weight: 700; color: var(--green); background: var(--green-soft); border-radius: 10px; padding: 8px; margin-bottom: 10px; }
.profile-reset { width: 100%; background: none; border: 1px solid var(--line-strong); color: var(--t2); border-radius: 11px; padding: 10px 0; font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; }

/* ===================================================================
   Contacts d'urgence (vue citoyenne) — gérés depuis le dashboard admin,
   structure visuelle fixe (fond navy + bande tricolore) demandée au cahier
   des charges. Les marges négatives compensent le padding de .content pour
   que le fond s'étende bord à bord, indépendamment de la vue active.
   =================================================================== */

.contacts-page { background: var(--navy); margin: -18px -18px -96px; padding: 0 18px calc(96px + 18px); color: #fff; }
.contacts-page .empty-state { color: rgba(255, 255, 255, .55); }

.contacts-tricolor { display: flex; width: 100%; height: 4px; margin: 0 -18px 18px; }
.contacts-tricolor span { flex: 1; }
.contacts-tricolor .green { background: var(--gabon-green); }
.contacts-tricolor .yellow { background: var(--gabon-yellow); }
.contacts-tricolor .blue { background: var(--gabon-blue); }

.contacts-header { padding-top: 4px; margin-bottom: 18px; }
.contacts-header h2 { font-family: var(--font-display); font-size: 19px; margin: 0 0 4px; }
.contacts-header p { font-size: 12px; color: rgba(255, 255, 255, .65); margin: 0; }

.contacts-section { margin-bottom: 22px; }
.contacts-section h3 { font-family: var(--font-display); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: rgba(255, 255, 255, .55); margin: 0 0 10px; }

.contacts-grid-national { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.contact-card-national {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border-radius: 13px; padding: 14px 6px; text-decoration: none; text-align: center;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
}
.contact-card-national[data-couleur="red"] { background: rgba(200, 16, 46, .22); border-color: rgba(200, 16, 46, .4); }
.contact-card-national[data-couleur="orange"] { background: rgba(194, 84, 12, .22); border-color: rgba(194, 84, 12, .4); }
.contact-card-national[data-couleur="green"] { background: rgba(23, 138, 102, .22); border-color: rgba(23, 138, 102, .4); }
.contact-card-national.disabled { opacity: .45; pointer-events: none; }
.ccn-icon { font-size: 20px; color: #fff; }
.ccn-icon img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.ccn-nom { font-size: 11.5px; font-weight: 700; color: #fff; }
.ccn-tel { font-family: var(--font-mono); font-size: 12px; color: rgba(255, 255, 255, .85); }

.contacts-scroll {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 18px 6px; margin: 0 -18px;
  scroll-snap-type: x proximity;
}
.contacts-scroll::-webkit-scrollbar { display: none; }
.contacts-scroll:empty::after { content: 'Aucune unité renseignée.'; color: rgba(255, 255, 255, .5); font-size: .85rem; padding: 0.5rem; }

.contact-card {
  flex: 0 0 132px; scroll-snap-align: start;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px;
  padding: 12px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
}
.contact-card[data-couleur="blue"] { background: rgba(58, 117, 196, .20); border-color: rgba(58, 117, 196, .4); }
.contact-card[data-couleur="yellow"] { background: rgba(252, 209, 22, .18); border-color: rgba(252, 209, 22, .4); }
.cc-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .12); display: flex; align-items: center; justify-content: center; font-size: 17px; color: #fff; overflow: hidden; flex-shrink: 0; }
.cc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cc-nom { font-size: 12px; font-weight: 700; color: #fff; line-height: 1.25; }
.cc-tel { font-family: var(--font-mono); font-size: 10.5px; color: rgba(255, 255, 255, .7); }
.cc-call-btn {
  margin-top: 2px; display: flex; align-items: center; gap: 5px; background: #fff; color: var(--navy);
  border-radius: 999px; padding: 6px 12px; font-size: 11px; font-weight: 700; text-decoration: none;
}
.cc-call-btn.disabled { background: rgba(255, 255, 255, .18); color: rgba(255, 255, 255, .5); }

@media (prefers-reduced-motion: reduce) {
  .pulse, .sos-overlay .rings .r, .bars i { animation: none !important; }
}
