/* FF-CRM — feuille de style unique (aucune lib, aucune police distante).
   Design app-like iOS, mode sombre par défaut, accent fuchsia/violet discret. */

:root {
  /* Palette sombre */
  --bg:            #0e0b16;
  --bg-2:          #141020;
  --surface:       #1a1526;
  --surface-2:     #221a33;
  --surface-3:     #2a2140;
  --border:        #2e2740;
  --border-soft:   #241d34;

  /* Texte */
  --text:          #f3eefb;
  --text-2:        #b7add0;
  --text-3:        #8a7fa8;

  /* Accent fuchsia/violet */
  --accent:        #c026a9;
  --accent-2:      #a726c9;
  --accent-3:      #e0219b;
  --accent-soft:   rgba(192, 38, 169, 0.16);
  --accent-line:   rgba(192, 38, 169, 0.42);

  /* Sémantique */
  --ok:            #35c98a;
  --warn:          #e8b64a;
  --danger:        #f0555f;

  /* Type par contact */
  --ami:           #e0219b;
  --pro:           #4aa8e8;
  --famille:       #35c98a;

  /* Métriques iOS */
  --radius:        16px;
  --radius-sm:     11px;
  --radius-lg:     22px;
  --tabbar-h:      58px;
  --header-h:      52px;

  /* Safe areas iOS */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);

  --shadow:        0 10px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

body {
  /* léger halo d'accent en haut pour donner de la profondeur */
  background:
    radial-gradient(120% 55% at 85% -10%, rgba(167, 38, 201, 0.14), transparent 60%),
    radial-gradient(120% 40% at -10% -5%, rgba(224, 33, 155, 0.10), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a { color: var(--accent-3); text-decoration: none; }

/* ------------------------------------------------------------------ Boot */
.boot {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; gap: 22px;
  align-items: center; justify-content: center;
}
.boot-badge {
  width: 76px; height: 76px; border-radius: 20px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 30px; letter-spacing: -1px; color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  box-shadow: var(--shadow);
}
.boot-spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent-3);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------- Structure */
#app { min-height: 100%; }

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-left: var(--sal);
  padding-right: var(--sar);
}

/* En-tête collant */
.topbar {
  position: sticky; top: 0; z-index: 30;
  padding-top: calc(var(--sat) + 8px);
  padding-bottom: 10px;
  padding-left: 16px; padding-right: 16px;
  background: linear-gradient(180deg, rgba(14, 11, 22, 0.96), rgba(14, 11, 22, 0.78));
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: flex-end; gap: 10px;
}
.topbar h1 {
  margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.5px;
  flex: 1;
}
.topbar .top-actions { display: flex; gap: 8px; align-items: center; }

/* Zone scrollable */
.screen {
  flex: 1;
  padding: 14px 16px calc(var(--tabbar-h) + var(--sab) + 26px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ------------------------------------------------------------- Tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--tabbar-h) + var(--sab));
  padding-bottom: var(--sab);
  padding-left: var(--sal); padding-right: var(--sar);
  display: grid; grid-template-columns: repeat(6, 1fr);
  background: rgba(20, 16, 32, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
}
.tab {
  border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--text-3); font-size: 10px; font-weight: 600;
  padding: 6px 1px 2px; min-width: 0; white-space: nowrap;
  transition: color 0.15s;
}
.tab svg { width: 23px; height: 23px; }
.tab .badge {
  position: absolute; transform: translate(14px, -10px);
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--accent-3); color: #fff;
  font-size: 10px; font-weight: 700; display: grid; place-items: center;
}
.tab.active { color: var(--accent-3); }
.tab.active svg { filter: drop-shadow(0 2px 8px rgba(224, 33, 155, 0.35)); }

/* --------------------------------------------------------------- Cartes */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
}
.card.pad-0 { padding: 0; overflow: hidden; }
.card-title { font-size: 13px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.4px; margin: 2px 0 10px; }

.section-label {
  font-size: 12px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.6px;
  margin: 20px 4px 8px;
}
.section-label:first-child { margin-top: 4px; }

/* ------------------------------------------------------------- Boutons */
.btn {
  appearance: none; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-weight: 600; font-size: 15px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: transform 0.08s, background 0.15s, border-color 0.15s;
  user-select: none; text-align: center;
}
.btn:active { transform: scale(0.97); }
.btn.block { display: flex; width: 100%; }
.btn.sm { padding: 7px 11px; font-size: 13.5px; border-radius: 9px; }
.btn.primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 18px rgba(192, 38, 169, 0.32);
}
.btn.ghost { background: transparent; border-color: var(--border); color: var(--text-2); }
.btn.subtle { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-3); }
.btn.ok { background: rgba(53, 201, 138, 0.14); border-color: rgba(53, 201, 138, 0.4); color: var(--ok); }
.btn.danger { background: rgba(240, 85, 95, 0.12); border-color: rgba(240, 85, 95, 0.38); color: var(--danger); }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row.tight { gap: 6px; }
.icon-btn {
  width: 38px; height: 38px; padding: 0; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface-2);
  display: grid; place-items: center; cursor: pointer; color: var(--text-2);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:active { transform: scale(0.94); }

/* --------------------------------------------------------- Formulaires */
.field { margin-bottom: 12px; }
.field > label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); margin-bottom: 6px; padding-left: 2px;
}
.input, .select, .textarea {
  width: 100%; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px; color: var(--text); font-size: 16px;
  outline: none; transition: border-color 0.15s, background 0.15s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent-line);
  background: var(--surface-3);
}
.textarea { resize: vertical; min-height: 84px; line-height: 1.45; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%238a7fa8' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px;
}
.field-row { display: flex; gap: 10px; }
.field-row > .field { flex: 1; }

/* Interrupteur (toggle) */
.switch { position: relative; width: 50px; height: 30px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--surface-3); border: 1px solid var(--border); transition: background 0.18s;
}
.switch .knob {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; transition: transform 0.18s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}
.switch input:checked ~ .track { background: linear-gradient(135deg, var(--accent-2), var(--accent-3)); border-color: transparent; }
.switch input:checked ~ .knob { transform: translateX(20px); }

/* Ligne de réglage */
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-bottom: 1px solid var(--border-soft);
}
.row:last-child { border-bottom: 0; }
.row .row-main { flex: 1; min-width: 0; }
.row .row-title { font-size: 15px; font-weight: 600; }
.row .row-sub { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.row .row-value { color: var(--text-2); font-size: 15px; }
.row input.mini, .row select.mini {
  width: 74px; text-align: center; padding: 8px; font-size: 15px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; color: var(--text);
}
.row select.mini { width: auto; text-align: left; }

/* -------------------------------------------------------------- Chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-2); border-radius: 999px; padding: 7px 13px;
  font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: all 0.14s;
}
.chip.active {
  background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-3);
}

/* Barre de recherche */
.searchbar {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 9px 12px; margin-bottom: 12px;
}
.searchbar svg { width: 18px; height: 18px; color: var(--text-3); flex: 0 0 auto; }
.searchbar input { border: 0; background: transparent; outline: none; width: 100%; font-size: 16px; color: var(--text); }

/* ------------------------------------------------------------- Contacts */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 16px;
  letter-spacing: -0.5px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.avatar.lg { width: 66px; height: 66px; font-size: 24px; }

.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--border-soft);
  cursor: pointer; background: transparent; width: 100%; border: 0; text-align: left; color: inherit;
}
.list-item:last-child { border-bottom: 0; }
.list-item:active { background: var(--surface-2); }
.li-main { flex: 1; min-width: 0; }
.li-name { font-size: 15.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.li-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-chevron { color: var(--text-3); flex: 0 0 auto; }
.li-chevron svg { width: 18px; height: 18px; }

.type-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.type-dot.ami { background: var(--ami); }
.type-dot.pro { background: var(--pro); }
.type-dot.famille { background: var(--famille); }

.pill {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.pill.ami { background: rgba(224, 33, 155, 0.16); color: #f38cc7; }
.pill.pro { background: rgba(74, 168, 232, 0.16); color: #9ccdf3; }
.pill.famille { background: rgba(53, 201, 138, 0.16); color: #8fe3c1; }
.pill.warn { background: rgba(232, 182, 74, 0.18); color: var(--warn); }
.pill.due { background: rgba(240, 85, 95, 0.16); color: #f79aa0; }

/* ------------------------------------------------------------ Timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.tl-item { position: relative; padding: 4px 0 14px; }
.tl-item::before {
  content: ""; position: absolute; left: -22px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent-2);
}
.tl-head { display: flex; align-items: baseline; gap: 8px; }
.tl-kind { font-weight: 600; font-size: 14.5px; }
.tl-date { font-size: 12px; color: var(--text-3); margin-left: auto; }
.tl-notes { font-size: 13.5px; color: var(--text-2); margin-top: 3px; white-space: pre-wrap; }
.tl-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ------------------------------------------------------- Cartes relance */
.reminder-card { border: 1px solid var(--border-soft); }
.rc-top { display: flex; align-items: center; gap: 12px; }
.rc-reason {
  font-size: 12px; font-weight: 700; color: var(--accent-3);
  text-transform: uppercase; letter-spacing: 0.4px;
}
.rc-draft {
  margin-top: 10px; width: 100%; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 11px; padding: 11px;
  color: var(--text); font-size: 14.5px; line-height: 1.5; min-height: 74px; resize: vertical;
}
.rc-actions { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 8px; }
.send-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.send-links a.btn { text-decoration: none; }
.link-wa { background: rgba(37, 211, 102, 0.14); border-color: rgba(37, 211, 102, 0.4); color: #59e08a; }
.link-sms { background: rgba(74, 168, 232, 0.14); border-color: rgba(74, 168, 232, 0.4); color: #9ccdf3; }
.link-ig { background: rgba(224, 33, 155, 0.14); border-color: rgba(224, 33, 155, 0.4); color: #f38cc7; }
.link-tel { background: var(--surface-2); }
.link-mail { background: var(--surface-2); }

/* ----------------------------------------------------------- Récap KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: 13px 12px; text-align: center;
}
.kpi .kpi-num { font-size: 26px; font-weight: 800; letter-spacing: -1px; }
.kpi .kpi-lbl { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-lbl { width: 78px; font-size: 13px; color: var(--text-2); text-transform: capitalize; flex: 0 0 auto; }
.bar-track { flex: 1; height: 9px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-2), var(--accent-3)); }
.bar-val { width: 30px; text-align: right; font-size: 13px; color: var(--text-2); flex: 0 0 auto; }

.spark { width: 100%; height: 96px; display: block; }
.spark rect { transition: height 0.2s; }

/* --------------------------------------------------------------- Login */
.login-wrap {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--sat) + 24px) 24px calc(var(--sab) + 24px);
  text-align: center; gap: 8px;
}
.login-badge {
  width: 84px; height: 84px; border-radius: 22px; margin-bottom: 10px;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 34px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  box-shadow: var(--shadow);
}
.login-wrap h1 { margin: 0; font-size: 26px; letter-spacing: -0.5px; }
.login-wrap p { color: var(--text-3); margin: 2px 0 20px; }
.login-form { width: 100%; max-width: 340px; }

/* --------------------------------------------------------------- Divers */
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--border-soft); margin: 12px 0; }

.empty {
  text-align: center; padding: 44px 24px; color: var(--text-3);
}
.empty .emoji { font-size: 40px; display: block; margin-bottom: 10px; }
.empty .empty-title { color: var(--text-2); font-weight: 600; font-size: 15px; margin-bottom: 4px; }

.notice {
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13.5px;
  color: var(--text); margin-bottom: 12px; line-height: 1.5;
}
.notice.warn { background: rgba(232, 182, 74, 0.12); border-color: rgba(232, 182, 74, 0.36); }

.notif-item { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); }
.notif-item:last-child { border-bottom: 0; }
.notif-ico { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); }
.notif-main { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; font-size: 14.5px; }
.notif-body { font-size: 13px; color: var(--text-2); margin-top: 1px; }
.notif-time { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* ---------------------------------------------------------- Feuille modale */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade 0.18s ease;
}
.sheet {
  width: 100%; max-width: 640px;
  background: var(--bg-2);
  border-top-left-radius: var(--radius-lg); border-top-right-radius: var(--radius-lg);
  border: 1px solid var(--border); border-bottom: 0;
  max-height: 92vh; max-height: 92dvh; overflow-y: auto;
  padding: 8px 16px calc(var(--sab) + 20px);
  animation: slideup 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
}
.sheet .grabber { width: 40px; height: 5px; border-radius: 999px; background: var(--border); margin: 8px auto 12px; }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sheet-head h2 { margin: 0; font-size: 19px; font-weight: 700; flex: 1; }
@keyframes slideup { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Toasts */
.toast-zone {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--sab) + 16px);
  z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: 90vw;
}
.toast {
  background: var(--surface-3); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 11px 16px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow); animation: toastin 0.2s ease;
}
.toast.ok { border-color: rgba(53, 201, 138, 0.5); }
.toast.err { border-color: rgba(240, 85, 95, 0.5); }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ------------------------------------------------------------- Adresses */
.addr-add {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--accent-soft); color: var(--accent-3);
  border: 1px solid var(--accent-line); border-radius: 999px;
  padding: 5px 11px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.addr-add:active { transform: scale(0.96); }
.addr-row { align-items: flex-start; }
.addr-pin { display: inline-flex; width: 15px; height: 15px; }
.addr-pin svg { width: 15px; height: 15px; }
.addr-pin.on { color: var(--accent-3); }
.addr-pin.off { color: var(--text-3); }
.icon-btn.sm { width: 34px; height: 34px; flex: 0 0 auto; }
.icon-btn.sm svg { width: 17px; height: 17px; }
.icon-btn.danger-hover:active { color: var(--danger); }

/* ---------------------------------------------------------------- Carte */
.map-wrap {
  position: fixed; z-index: 5;
  left: var(--sal); right: var(--sar);
  top: calc(var(--sat) + var(--header-h));
  bottom: calc(var(--tabbar-h) + var(--sab));
  overflow: hidden;
}
.map { position: absolute; inset: 0; }
/* .map reçoit aussi la classe .leaflet-container : sélecteur composé => bat le CSS Leaflet (chargé après). */
.map.leaflet-container { background: var(--bg); }
.leaflet-container { font: inherit; }
.map-legend {
  position: absolute; top: 10px; right: 10px; z-index: 600;
  display: flex; flex-direction: column; gap: 5px;
  background: rgba(20, 16, 32, 0.82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 9px 11px; font-size: 12px; color: var(--text-2);
}
.map-legend .leg { display: flex; align-items: center; gap: 7px; }
.map-legend .leg-dot { width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.3); }
.map-empty {
  position: absolute; inset: 0; z-index: 550;
  display: grid; place-items: center;
  background: rgba(14, 11, 22, 0.66);
}
/* Popups Leaflet -> thème sombre */
.leaflet-popup-content-wrapper {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
}
.leaflet-popup-tip { background: var(--surface-2); box-shadow: none; }
.leaflet-popup-content { margin: 11px 13px; line-height: 1.4; }
.map-pop-name { font-weight: 700; font-size: 15px; letter-spacing: -0.2px; }
.map-pop-addr { font-size: 12.5px; color: var(--text-2); margin: 3px 0 9px; }
.map-open {
  background: var(--accent); color: #fff; border: 0; border-radius: 9px;
  padding: 6px 13px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.leaflet-container a.leaflet-popup-close-button { color: var(--text-3); }
.leaflet-control-attribution {
  background: rgba(20, 16, 32, 0.72) !important; color: var(--text-3) !important;
  border-radius: 8px 0 0 0;
}
.leaflet-control-attribution a { color: var(--text-2) !important; }
.leaflet-bar a {
  background: var(--surface-2); color: var(--text);
  border-bottom-color: var(--border);
}
.leaflet-bar a:hover { background: var(--surface-3); }

/* Réduction d'animation si demandé */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}
