/* Cleaning Sellers - app mobile terrain (bottom nav) */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: #F5F6F4;
  color: #111827;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  overflow: hidden;
}
#app { height: 100%; display: flex; flex-direction: column; min-height: 0; }

/* ─── Transition slide entre onglets ─────────────────────── */
@keyframes slideInFromRight { from { opacity: 0; transform: translate3d(28px,0,0); } to { opacity: 1; transform: none; } }
@keyframes slideInFromLeft  { from { opacity: 0; transform: translate3d(-28px,0,0); } to { opacity: 1; transform: none; } }
#screen.slide-fwd  { animation: slideInFromRight .3s cubic-bezier(.22,1,.36,1) both; }
#screen.slide-back { animation: slideInFromLeft  .3s cubic-bezier(.22,1,.36,1) both; }
@media (prefers-reduced-motion: reduce) {
  #screen.slide-fwd, #screen.slide-back { animation: none; }
}
:root {
  --brand: #F0AF02; --brand-light: #FFD24D; --brand-dark: #C99202;
  --ink: #0b1220; --muted: #6b7280; --line: #e5e7eb; --bg: #F5F6F4;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* ─── HEADER ─────────────────────────────────────────────── */
.appbar {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 12px;
  padding: calc(12px + var(--safe-t)) 16px 12px;
  background: #FFFFFF;
  box-shadow: 0 1px 0 rgba(15,23,42,0.05);
  z-index: 10;
}
.appbar .brand {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #000; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; box-shadow: 0 4px 12px rgba(240,175,2,0.32);
}
.appbar .titles { flex: 1; min-width: 0; line-height: 1.15; }
.appbar .titles h1 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.appbar .titles .sub { font-size: 11px; color: var(--muted); font-weight: 500; }
.appbar .count-pill {
  font-size: 11px; font-weight: 700; color: var(--muted);
  background: var(--bg); border-radius: 999px; padding: 4px 10px;
}
.icon-btn {
  background: var(--bg); color: var(--muted); border: none;
  border-radius: 10px; width: 36px; height: 36px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon-btn:hover { background: #ebedea; color: var(--ink); }
.icon-btn.danger { color: #dc2626; }
.icon-btn.danger:hover { background: #fee2e2; }
.icon-btn .svg-ico { width: 18px; height: 18px; }

/* ─── TOOLBAR (recherche + segments) ─────────────────────── */
.toolbar {
  flex-shrink: 0; background: #fff; padding: 0 14px 12px;
  display: flex; flex-direction: column; gap: 10px;
  border-bottom: 1px solid #f1f2f0;
}
.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border-radius: 12px; padding: 0 12px;
}
.search .svg-ico { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.search input {
  flex: 1; border: none; background: transparent; padding: 11px 0;
  font-size: 15px; color: var(--ink); outline: none; min-width: 0;
}
.search input::placeholder { color: #9ca3af; }
.search .clear { background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; }

.segments { display: flex; gap: 6px; }
.segment {
  flex: 1; background: var(--bg); border: none; color: var(--muted);
  font-size: 13px; font-weight: 700; padding: 9px 8px; border-radius: 10px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .15s ease;
}
.segment.active { background: var(--ink); color: #fff; }
.segment .svg-ico { width: 15px; height: 15px; }

/* chips (facettes leads) */
.chips { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip-btn {
  flex-shrink: 0; background: var(--bg); border: 1px solid transparent; color: #4b5563;
  font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  white-space: nowrap; transition: all .15s ease;
}
.chip-btn .n { opacity: .6; margin-left: 4px; }
.chip-btn.active { background: #FFF7E0; color: #8a6500; border-color: var(--brand); }

/* ─── CONTENT ────────────────────────────────────────────── */
.content {
  flex: 1 1 0; min-height: 0; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: var(--bg);
}
.list { padding: 12px; display: flex; flex-direction: column; gap: 10px; }

/* ─── CARDS (client / lead) ──────────────────────────────── */
.row-card {
  background: #fff; border-radius: 14px; padding: 13px 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 4px 14px rgba(15,23,42,0.04);
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
  display: flex; align-items: flex-start; gap: 12px;
}
.row-card:active { transform: scale(0.99); }
.row-card .avatar {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #000; font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.row-card .avatar.lead { background: linear-gradient(135deg, #1a73e8, #4c9aff); color: #fff; }
.row-card .rc-main { flex: 1; min-width: 0; }
.row-card .rc-title {
  font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-card .rc-sub {
  font-size: 12px; color: var(--muted); margin-top: 3px;
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center;
}
.row-card .rc-sub .svg-ico { width: 12px; height: 12px; vertical-align: -1px; margin-right: 2px; }
.row-card .rc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.dist-pill {
  font-size: 11px; font-weight: 800; color: #065f46; background: #d1fae5;
  padding: 3px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.score-pill {
  font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.score-hot { background: #fee2e2; color: #b91c1c; }
.score-warm { background: #fef3c7; color: #92400e; }
.score-cold { background: #e5e7eb; color: #4b5563; }
.tag {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 5px; background: #f3f4f6; color: #4b5563;
}
.tag.status-active { background: #d1fae5; color: #065f46; }
.tag.status-prospect { background: #dbeafe; color: #1e40af; }

/* ─── MAP ────────────────────────────────────────────────── */
.map-wrap { position: relative; flex: 1 1 0; min-height: 0; }
#map, .leaflet-container { width: 100%; height: 100%; background: #e8eaed; }
.map-fab {
  position: absolute; z-index: 500; right: 14px; bottom: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.fab {
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: #fff; color: var(--ink); cursor: pointer;
  box-shadow: 0 4px 14px rgba(15,23,42,0.22);
  display: flex; align-items: center; justify-content: center;
}
.fab.brand { background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #000; }
.fab .svg-ico { width: 20px; height: 20px; }
.map-hint {
  position: absolute; z-index: 500; left: 14px; top: 14px; right: 70px;
  background: rgba(11,18,32,0.82); color: #fff; font-size: 12px; font-weight: 600;
  padding: 8px 12px; border-radius: 10px; backdrop-filter: blur(6px);
}

/* pins Leaflet (style Google-like, repris de l'admin) */
.map-pin-wrapper { background: transparent !important; border: none !important; }
.map-pin { position: relative; width: 30px; height: 40px; --pin-color: var(--brand); }
.map-pin-body {
  position: absolute; top: 0; left: 50%; width: 26px; height: 26px;
  background: var(--pin-color); border-radius: 50% 50% 50% 0;
  transform: translateX(-50%) rotate(-45deg); border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
}
.map-pin-num { transform: rotate(45deg); color: #111; font-weight: 800; font-size: 12px; line-height: 1; }
.map-pin.me { --pin-color: #1a73e8; }
.map-pin.me .map-pin-num { color: #fff; }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.leaflet-popup-content { margin: 10px 14px; font-size: 13px; }
.popup-title { font-weight: 800; color: var(--ink); margin-bottom: 2px; }
.popup-sub { color: var(--muted); font-size: 12px; }
.popup-actions { display: flex; gap: 6px; margin-top: 8px; }
.popup-actions a {
  flex: 1; text-align: center; text-decoration: none; font-size: 12px; font-weight: 700;
  padding: 6px 8px; border-radius: 8px; background: var(--bg); color: var(--ink);
}
.popup-actions a.brand { background: var(--brand); }

/* ─── EMPTY / LOADING ────────────────────────────────────── */
.empty { text-align: center; color: #9ca3af; padding: 60px 24px; font-size: 14px; }
.empty .em-icon {
  width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 50%;
  background: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(15,23,42,0.06);
}
.empty .em-icon .svg-ico { width: 30px; height: 30px; color: #cbd0d6; }
.spinner {
  width: 34px; height: 34px; margin: 60px auto; display: block;
  border: 3px solid #e5e7eb; border-top-color: var(--brand); border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.inline-spin {
  width: 15px; height: 15px; display: inline-block; vertical-align: -2px;
  border: 2px solid rgba(0,0,0,.25); border-top-color: #000; border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ─── BOTTOM NAV ─────────────────────────────────────────── */
.bottom-nav {
  flex-shrink: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-top: 1px solid #eceeec;
  padding-bottom: var(--safe-b);
  box-shadow: 0 -2px 12px rgba(15,23,42,0.05);
}
.nav-item {
  position: relative;
  appearance: none; background: none; border: none; cursor: pointer;
  padding: 9px 4px 10px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #9aa0a8; transition: color .15s ease;
}
.nav-item .svg-ico { width: 23px; height: 23px; }
.nav-item .nav-lbl { font-size: 11px; font-weight: 700; }
.nav-item.active { color: var(--brand-dark); }
.nav-item.active .nav-lbl { color: var(--brand-dark); }
.nav-item:active { transform: scale(0.94); }
.nav-badge {
  position: absolute; top: 4px; left: calc(50% + 8px);
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: #ef4444; color: #fff; font-size: 10px; font-weight: 800; line-height: 17px;
  text-align: center; box-shadow: 0 0 0 2px #fff;
}

/* ─── ALERTES ────────────────────────────────────────────── */
.row-card .avatar.alert { background: linear-gradient(135deg, #ef4444, #f87171); color: #fff; }
.row-card .avatar.alert .svg-ico { width: 20px; height: 20px; }
.row-card.unread { box-shadow: 0 1px 2px rgba(239,68,68,0.10), 0 4px 14px rgba(239,68,68,0.10); }
.row-card.unread .rc-title { color: #b91c1c; }
.dot-new {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #ef4444; margin-left: 7px; vertical-align: middle;
}
.row-card .rc-right .ago { font-size: 11px; font-weight: 600; color: #9ca3af; white-space: nowrap; }
.status-pill {
  font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px;
  background: #e5e7eb; color: #4b5563;
}
.status-pill.st-new { background: #fee2e2; color: #b91c1c; }
.status-pill.st-seen { background: #e0e7ff; color: #3730a3; }
.status-pill.st-in_progress { background: #fef3c7; color: #92400e; }
.status-pill.st-quoted { background: #dbeafe; color: #1e40af; }
.status-pill.st-won { background: #d1fae5; color: #065f46; }
.status-pill.st-lost { background: #f3f4f6; color: #6b7280; }
.sheet-status {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 18px 16px;
}
.sheet-status .st-btn {
  flex: 1 1 40%; appearance: none; border: 1px solid #e5e7eb; background: #fff;
  border-radius: 10px; padding: 10px 8px; font-size: 13px; font-weight: 700; color: #4b5563; cursor: pointer;
}
.sheet-status .st-btn.on { background: var(--brand); border-color: var(--brand); color: #000; }
.sheet-status .st-btn:active { transform: scale(0.97); }

/* ─── LOGIN ──────────────────────────────────────────────── */
.login {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(240,175,2,0.16), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(240,175,2,0.10), transparent 60%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 370px; background: #fff; border-radius: 20px; padding: 30px 26px;
  text-align: center; box-shadow: 0 14px 44px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.03);
}
.login-card .brand-big {
  width: 62px; height: 62px; border-radius: 18px; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #000;
  font-weight: 800; font-size: 22px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(240,175,2,0.36);
}
.login-card h2 { margin: 0 0 6px; font-size: 21px; color: var(--ink); letter-spacing: -0.01em; }
.login-card p { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.login-card label { font-size: 11px; color: #4b5563; text-align: left; display: block; margin-bottom: 5px; font-weight: 700; }
.login-card input {
  width: 100%; background: var(--bg); border: none; border-radius: 11px;
  padding: 12px 14px; font-size: 15px; color: var(--ink); margin-bottom: 13px;
}
.login-card input:focus { outline: none; box-shadow: 0 0 0 3px rgba(240,175,2,0.30); background: #fff; }
.login-card .btn-primary {
  width: 100%; background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #000;
  border: none; border-radius: 11px; padding: 14px; font-size: 15px; font-weight: 800; cursor: pointer;
  box-shadow: 0 8px 20px rgba(240,175,2,0.32);
}
.login-card .btn-primary:disabled { opacity: 0.55; cursor: wait; }
.login-card .btn-ghost { width: 100%; margin-top: 10px; background: none; border: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.login-card .err { color: #b91c1c; font-size: 12px; margin-top: 10px; min-height: 16px; }

/* ─── DETAIL SHEET ───────────────────────────────────────── */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(15,23,42,0.5); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadein .22s ease;
}
.sheet-overlay.out { animation: fadeout .25s ease forwards; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeout { from { opacity: 1; } to { opacity: 0; } }
.sheet {
  width: 100%; max-width: 540px; background: #fff;
  border-radius: 22px 22px 0 0; max-height: 88vh; display: flex; flex-direction: column;
  padding-bottom: var(--safe-b);
  animation: sheetup .32s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes sheetup { from { transform: translateY(60px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.sheet-grip { width: 40px; height: 4px; border-radius: 999px; background: #d1d5db; margin: 10px auto 4px; flex-shrink: 0; }
.sheet-head {
  display: flex; align-items: flex-start; gap: 12px; padding: 10px 18px 14px;
  border-bottom: 1px solid #f3f4f6;
}
.sheet-head .avatar {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #000;
  font-weight: 800; font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.sheet-head .avatar.lead { background: linear-gradient(135deg, #1a73e8, #4c9aff); color: #fff; }
.sheet-head .sh-main { flex: 1; min-width: 0; }
.sheet-head h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.sheet-head .sh-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 16px 18px; background: #FBFCFA; }
.info-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f1f2f0;
}
.info-row:last-child { border-bottom: none; }
.info-row .ir-ico {
  width: 34px; height: 34px; border-radius: 10px; background: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: var(--brand-dark);
  box-shadow: 0 1px 2px rgba(15,23,42,0.06);
}
.info-row .ir-ico .svg-ico { width: 17px; height: 17px; }
.info-row .ir-main { flex: 1; min-width: 0; }
.info-row .ir-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: #9ca3af; font-weight: 700; }
.info-row .ir-val { font-size: 14px; color: var(--ink); font-weight: 600; word-break: break-word; }
.info-row a.ir-val { color: #1a73e8; text-decoration: none; }
.sheet-actions {
  flex-shrink: 0; display: flex; gap: 8px; padding: 12px 16px calc(12px + var(--safe-b));
  background: #fff; border-top: 1px solid #f3f4f6;
}
.sheet-btn {
  flex: 1; border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 12px; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none;
}
.sheet-btn .svg-ico { width: 17px; height: 17px; }
.sheet-btn.brand { background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #000; border-color: transparent; }
.sheet-btn.green { background: #059669; color: #fff; border-color: transparent; }
.sheet-btn:active { transform: scale(0.98); }

/* ─── ROUTES ─────────────────────────────────────────────── */
.panel { background: #fff; border-radius: 14px; padding: 14px; margin: 12px; box-shadow: 0 1px 2px rgba(15,23,42,0.04); }
.panel h3 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; }
.start-row { display: flex; gap: 8px; }
.start-row input {
  flex: 1; min-width: 0; background: var(--bg); border: none; border-radius: 11px;
  padding: 11px 13px; font-size: 14px; color: var(--ink); outline: none;
}
.start-row input:focus { box-shadow: 0 0 0 3px rgba(240,175,2,0.22); background: #fff; }
.mini-btn {
  border: none; border-radius: 11px; padding: 0 14px; font-size: 13px; font-weight: 700; cursor: pointer;
  background: var(--ink); color: #fff; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.mini-btn.ghost { background: var(--bg); color: var(--ink); }
.mini-btn .svg-ico { width: 15px; height: 15px; }
.opt-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; color: #374151; }
.opt-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.stop-list { display: flex; flex-direction: column; gap: 8px; }
.stop {
  display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 11px; padding: 9px 10px;
}
.stop .num {
  width: 24px; height: 24px; border-radius: 50%; background: #1a73e8; color: #fff;
  font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stop .st-main { flex: 1; min-width: 0; }
.stop .st-name { font-size: 13px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stop .st-addr { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stop .st-move { display: flex; flex-direction: column; }
.stop .st-move button { background: none; border: none; color: #9ca3af; cursor: pointer; font-size: 11px; line-height: 1; padding: 1px; }
.stop .st-move button:disabled { opacity: .3; }
.stop .st-del { background: none; border: none; color: #dc2626; cursor: pointer; padding: 4px; }
.stop .st-del .svg-ico { width: 15px; height: 15px; }
.add-result {
  padding: 10px 12px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; gap: 8px;
}
.add-result:active { background: var(--bg); }
.add-result .svg-ico { width: 15px; height: 15px; color: var(--brand-dark); flex-shrink: 0; }
.add-result .ar-main { flex: 1; min-width: 0; }
.add-result .ar-name { font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-result .ar-addr { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.route-summary {
  display: flex; gap: 8px; padding: 12px; margin: 0 12px 12px;
  background: #fff; border-radius: 14px; box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.route-stat { flex: 1; text-align: center; }
.route-stat .rs-val { font-size: 18px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.route-stat .rs-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.big-btn {
  width: calc(100% - 24px); margin: 0 12px 12px; border: none; border-radius: 14px; padding: 15px;
  font-size: 15px; font-weight: 800; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #000;
  box-shadow: 0 8px 20px rgba(240,175,2,0.32);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.big-btn:disabled { opacity: .5; box-shadow: none; }
.big-btn.ghost { background: var(--bg); color: var(--ink); box-shadow: none; }
/* ─── PWA : bandeau d'installation & toast maj ───────────── */
.install-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(72px + var(--safe-b));
  z-index: 1300; display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 16px; padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.18), 0 2px 8px rgba(15,23,42,0.08);
  animation: sheetup .34s cubic-bezier(0.16,1,0.3,1);
}
.install-banner .ib-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #000;
  display: flex; align-items: center; justify-content: center;
}
.install-banner .ib-icon .svg-ico { width: 21px; height: 21px; }
.install-banner .ib-main { flex: 1; min-width: 0; }
.install-banner .ib-title { font-size: 14px; font-weight: 800; color: var(--ink); }
.install-banner .ib-sub { font-size: 12px; color: var(--muted); margin-top: 1px; display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.install-banner .ib-sub .svg-ico { width: 13px; height: 13px; vertical-align: -2px; }
.install-banner .ib-btn {
  flex-shrink: 0; appearance: none; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #000;
  font-weight: 800; font-size: 13px; padding: 9px 16px; border-radius: 10px;
  box-shadow: 0 4px 12px rgba(240,175,2,0.30);
}
.install-banner .ib-btn:active { transform: scale(0.96); }
.install-banner .ib-close {
  flex-shrink: 0; appearance: none; border: none; background: #f3f4f6; cursor: pointer;
  width: 30px; height: 30px; border-radius: 50%; color: #6b7280;
  display: flex; align-items: center; justify-content: center;
}
.install-banner .ib-close .svg-ico { width: 16px; height: 16px; }

.update-toast {
  position: fixed; left: 50%; top: calc(10px + var(--safe-t, 0px)); transform: translateX(-50%);
  z-index: 1400; display: flex; align-items: center; gap: 12px;
  background: #0b1220; color: #fff; border-radius: 999px; padding: 8px 8px 8px 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3); font-size: 13px; font-weight: 600;
  animation: fadein .25s ease;
}
.update-toast .svg-ico { width: 15px; height: 15px; vertical-align: -2px; margin-right: 5px; }
.update-toast button {
  appearance: none; border: none; cursor: pointer; background: var(--brand); color: #000;
  font-weight: 800; font-size: 12px; padding: 6px 14px; border-radius: 999px;
}

/* ─── Navigation Waze étape par étape ────────────────────── */
.waze-legs { margin-top: 10px; background: #fff; border-radius: 14px; padding: 12px 12px 8px; box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 4px 14px rgba(15,23,42,0.04); }
.waze-legs-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.waze-badge { display: inline-flex; align-items: center; gap: 5px; background: #33ccff; color: #05263b; font-weight: 800; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.waze-badge .svg-ico { width: 15px; height: 15px; }
.waze-legs-sub { font-size: 11px; color: #9ca3af; font-weight: 600; }
.waze-list { display: flex; flex-direction: column; gap: 6px; }
.waze-leg { display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 10px; background: #F5FBFE; border: 1px solid #dcf1fb; text-decoration: none; color: var(--ink); transition: transform .12s ease, background .12s ease; }
.waze-leg:active { transform: scale(0.985); background: #e9f7fe; }
.waze-leg .wl-num { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: #33ccff; color: #05263b; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.waze-leg .wl-label { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.waze-leg .wl-go { flex-shrink: 0; color: #0aa5d8; display: flex; }
.waze-leg .wl-go .svg-ico { width: 18px; height: 18px; }
.big-btn .svg-ico { width: 18px; height: 18px; }
.route-map-wrap { height: 300px; margin: 0 12px 12px; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(15,23,42,0.06); }
.route-map-wrap .leaflet-container { height: 100%; }
.banner-err { margin: 0 12px 12px; background: #fee2e2; color: #b91c1c; font-size: 13px; font-weight: 600; padding: 10px 12px; border-radius: 10px; }

/* ─── SVG ─────────────────────────────────────────────────── */
.svg-ico { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex-shrink: 0; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ─── WORKERS : pool de travailleurs ─────────────────────── */
.bottom-nav { grid-template-columns: repeat(2, 1fr); }
.row-card .avatar.worker { background: linear-gradient(135deg, #0ea5e9, #38bdf8); color: #04263a; }
.ws-pill {
  font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px;
  background: #e5e7eb; color: #4b5563; white-space: nowrap;
}
.ws-pill.ws-nouveau   { background: #dbeafe; color: #1d4ed8; }
.ws-pill.ws-en_revue  { background: #fef3c7; color: #92400e; }
.ws-pill.ws-entretien { background: #ede9fe; color: #6d28d9; }
.ws-pill.ws-retenu    { background: #d1fae5; color: #065f46; }
.ws-pill.ws-vivier    { background: #FFF7E0; color: #8a6500; }
.ws-pill.ws-refuse    { background: #f3f4f6; color: #6b7280; }

/* Section titre (onglet Vivier) */
.section-head { padding: 12px 14px 4px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* Bloc détail groupé dans la sheet */
.sheet-group { margin-top: 10px; }
.sheet-group-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-dark); margin: 6px 2px 2px; }

/* Notation par étoiles */
.rate-row { display: flex; align-items: center; gap: 4px; padding: 4px 18px 2px; }
.rate-row .rstar { font-size: 26px; line-height: 1; color: #d1d5db; cursor: pointer; background: none; border: none; padding: 0 2px; }
.rate-row .rstar.on { color: var(--brand); }
.rate-row .rate-clear { margin-left: 8px; font-size: 12px; color: var(--muted); background: none; border: none; cursor: pointer; text-decoration: underline; }
.sheet-notes { padding: 0 18px 12px; }
.sheet-notes textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font-size: 14px; font-family: inherit; resize: vertical; min-height: 64px; color: var(--ink); outline: none;
}
.sheet-notes textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(240,175,2,0.18); }
.sheet-save {
  flex-shrink: 0; display: flex; padding: 10px 16px calc(12px + var(--safe-b)); background: #fff; border-top: 1px solid #f3f4f6;
}
.sheet-save button {
  flex: 1; border: none; border-radius: 12px; padding: 13px; font-size: 15px; font-weight: 800; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #000;
}
.sheet-save button:disabled { opacity: .55; }
