:root {
  /* Charte Ridearound (design/stitch_ridearound_branding_identity) */
  --brand-navy: #0B1326;
  --brand-navy-2: #131B2E;
  --brand-orange: #FF5500;
  --brand-orange-2: #FF9500;
  --brand-green: #10B981;
  --accent: #FF5500;
  --accent-2: #FF8A00;
  --accent-ink: #ffffff;
  --bg: #F8FAFC;
  --surface: #ffffff;
  --surface-2: #F1F5F9;
  --line: #E2E8F0;
  --ink: #0F172A;
  --muted: #5B6779;
  --up: #E5484D;
  --down: #2F80ED;
  --ok: #10B981;
  --warn: #D97706;
  --shadow: 0 10px 30px rgba(11, 19, 38, .14), 0 2px 6px rgba(11, 19, 38, .06);
  --radius: 18px;
  --tabs-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1326; --surface: #131B2E; --surface-2: #1C2640; --line: #28324C;
    --ink: #F8FAFC; --muted: #9AA6BC; --shadow: 0 10px 30px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1326; --surface: #131B2E; --surface-2: #1C2640; --line: #28324C;
  --ink: #F8FAFC; --muted: #9AA6BC; --shadow: 0 10px 30px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font: 17px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg);
  overscroll-behavior: none;
}
button, input, a { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
[hidden] { display: none !important; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.h2 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.pad-b { padding-bottom: 12px; }
.row { display: flex; align-items: center; }
.gap { gap: 10px; }
.end { justify-content: flex-end; }

#map { position: fixed; inset: 0; z-index: 0; background: var(--bg); }
.leaflet-control-attribution { font-size: 10px; }


/* ---------- barre du haut ---------- */
.top { position: fixed; z-index: 20; top: calc(10px + var(--safe-t)); left: 12px; right: 12px; }
.search {
  display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 6px 0 14px;
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow);
}
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; height: 100%; }
.search input::-webkit-search-cancel-button { display: none; }
.search > .ico { color: var(--muted); }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; }
.icon-btn:active { background: var(--surface-2); }
#locate { color: var(--accent); }
.suggest {
  list-style: none; margin: 8px 0 0; padding: 6px; background: var(--surface); border-radius: 16px;
  box-shadow: var(--shadow); max-height: 50dvh; overflow: auto;
}
.suggest li { padding: 12px; border-radius: 10px; cursor: pointer; }
.suggest li:active, .suggest li:hover { background: var(--surface-2); }
.suggest li small { display: block; color: var(--muted); }

.map-ctrls { position: fixed; z-index: 15; right: 12px; top: calc(12px + var(--safe-t)); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.fab {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow);
}
.layers { display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 4px; }
.layers button { padding: 10px 16px; border-radius: 10px; text-align: left; font-size: 15px; }
.layers button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* ---------- panneau ---------- */
.sheet {
  position: fixed; z-index: 10; left: 0; right: 0; bottom: calc(var(--tabs-h) + var(--safe-b));
  max-height: calc(100dvh - var(--tabs-h) - var(--safe-b) - 150px - var(--safe-t));
  background: var(--surface); border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 30px rgba(0,0,0,.12);
  display: flex; flex-direction: column;
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.sheet.collapsed { transform: translateY(calc(100% - 92px)); }
.grip { display: flex; justify-content: center; padding: 10px 0 6px; flex: none; width: 100%; }
.grip span { width: 42px; height: 5px; border-radius: 3px; background: var(--line); }
.view { overflow-y: auto; padding: 0 16px 16px; overscroll-behavior: contain; }

.start-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; margin: 2px 0 16px; border-radius: 16px; background: var(--surface-2); border: 2px solid transparent;
}
.start-row:active { border-color: var(--accent); }
.start-txt { flex: 1; min-width: 0; }
.start-edit { flex: none; color: var(--accent); font-weight: 700; font-size: 15px; }
.start-row .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); flex: none; }
.start-label { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.field { margin-bottom: 18px; }
.lbl { display: block; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }

.seg { display: grid; gap: 8px; }
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.seg button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 74px; border-radius: 16px; background: var(--surface-2); border: 2px solid transparent;
  font-weight: 600; font-size: 16px; transition: transform .1s;
}
.seg button .ico { width: 28px; height: 28px; }
.seg button small { font-weight: 400; font-size: 13px; color: var(--muted); }
.seg-sm button { min-height: 58px; font-size: 14px; }
.seg-sm button .ico { width: 22px; height: 22px; }
.seg button.on { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: var(--accent); color: var(--accent); }
.seg button.on small { color: inherit; opacity: .8; }
.seg button:active, .chips button:active { transform: scale(.97); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  padding: 11px 16px; border-radius: 16px; background: var(--surface-2); font-weight: 650; font-size: 16px; min-height: 48px;
  border: 2px solid transparent; text-align: left;
}
.chips button small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.chips button.on { background: var(--ink); color: var(--surface); }
.chips button.on small { color: inherit; opacity: .7; }

.stepper { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.step { width: 52px; height: 52px; border-radius: 50%; background: var(--surface-2); font-size: 28px; line-height: 1; font-weight: 500; }
.step:active { background: var(--line); }
.big { font-size: 44px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.big small { font-size: 20px; font-weight: 600; color: var(--muted); }

.range { width: 100%; height: 36px; -webkit-appearance: none; appearance: none; background: transparent; margin: 0; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--accent) var(--p, 50%), var(--line) var(--p, 50%)); }
.range::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--accent) var(--p, 50%), var(--line) var(--p, 50%)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }

.elev { margin-top: 10px; background: var(--surface-2); border-radius: 14px; padding: 6px 12px 10px; }
.elev-row { display: flex; align-items: center; gap: 10px; }
.elev-row output { min-width: 66px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.tag { font-size: 12px; font-weight: 800; padding: 3px 7px; border-radius: 6px; color: #fff; flex: none; }
.tag.up { background: var(--up); }
.tag.down { background: var(--down); }

.cta {
  width: 100%; height: 58px; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink);
  font-weight: 700; font-size: 18px; box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 40%, transparent);
  position: sticky; bottom: 0;
}
.cta:active { transform: scale(.985); }
.cta:disabled { opacity: .6; }
.btn {
  height: 50px; padding: 0 18px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: var(--surface); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn.sm { height: 38px; padding: 0 12px; font-size: 14px; }
.btn.sm .ico { width: 18px; height: 18px; }
.btn.ghost { background: var(--surface-2); color: var(--ink); }
.btn.danger { background: var(--up); color: #fff; }
.btn:active { transform: scale(.98); }

/* recherche */
.searching { display: flex; gap: 16px; align-items: center; padding: 14px 0 20px; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin .9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
#v-search .row .btn { flex: 1; }

/* résultats */
.res-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.res-head .h2 { flex: 1; }
.cards { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.cards::-webkit-scrollbar { display: none; }
.card {
  flex: 0 0 calc(100% - 28px); scroll-snap-align: center; background: var(--surface-2); border-radius: var(--radius);
  padding: 14px; border: 2px solid transparent;
}
.card.on { border-color: var(--accent); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.badge { font-size: 13px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.badge.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stat b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.stat.miss b { color: var(--warn); }
.surfbar { display: flex; height: 7px; border-radius: 4px; overflow: hidden; margin: 8px 0 4px; background: var(--line); }
.surfbar i { display: block; height: 100%; }
.surfbar .paved { background: #5d6470; }
.surfbar .unpaved { background: #b08850; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.profile { margin-top: 8px; touch-action: none; }
.profile svg { width: 100%; height: 58px; display: block; }
.miss-list { margin-top: 8px; font-size: 14px; color: var(--warn); }
.dots { display: flex; justify-content: center; gap: 6px; margin: 8px 0 12px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--accent); width: 18px; border-radius: 4px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.actions .cta { height: 54px; font-size: 17px; position: static; }
.actions .gmaps { height: 54px; background: #fff; color: #1a73e8; border: 2px solid #1a73e8; }
.actions3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.actions3 .btn { padding: 0 6px; font-size: 15px; height: 52px; }
.actions3 .ico { width: 18px; height: 18px; }
.note { margin: 12px 2px 0; }

/* onglets */
.tabs {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border-top: 1px solid var(--line);
}
.tabs button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 13px; font-weight: 650; color: var(--muted); }
.tabs button .ico { width: 26px; height: 26px; }
.tabs button.on { color: var(--accent); }
.tabs button.on::before { content: ''; position: absolute; top: 0; width: 36px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }

/* suivi */
.track { position: fixed; inset: 0; z-index: 40; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; }
.track > * { pointer-events: auto; }
.track-top {
  margin: calc(10px + var(--safe-t)) 12px 0; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr 1.3fr 1fr; padding: 12px 8px; text-align: center;
}
.tstat b { display: block; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tstat.main b { font-size: 36px; color: var(--accent); }
.tstat span { font-size: 13px; color: var(--muted); }
.tstat.sm { flex: 1; text-align: center; }
.tstat.sm b { font-size: 20px; }
.offroute {
  margin: 10px 12px 0; align-self: stretch; padding: 12px 16px; border-radius: 14px; background: var(--up); color: #fff;
  font-weight: 700; text-align: center; animation: pulse 1.4s infinite; box-shadow: var(--shadow);
}
@keyframes pulse { 50% { opacity: .75; } }
.track-bottom { margin-top: auto; background: var(--surface); border-radius: 24px 24px 0 0; padding: 12px 14px calc(14px + var(--safe-b)); box-shadow: 0 -8px 30px rgba(0,0,0,.12); }
.tprofile svg { width: 100%; height: 64px; display: block; margin-bottom: 8px; }
body.tracking .tabs, body.tracking .sheet, body.tracking .top, body.tracking .map-ctrls { display: none; }

.toast {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); top: calc(74px + var(--safe-t));
  background: var(--ink); color: var(--surface); padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center;
}

dialog { border: 0; border-radius: 20px; padding: 20px; width: min(92vw, 420px); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0,0,0,.4); }
dialog input[type=text] { width: 100%; height: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface-2); padding: 0 12px; margin: 14px 0; font-size: 16px; outline: 0; }
dialog input[type=text]:focus { border-color: var(--accent); }
dialog p { margin: 10px 0 16px; color: var(--muted); }

/* marqueurs carte */
.pin { width: 22px; height: 22px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.pin.start { background: var(--ok); }
.pin.end { background: var(--ink); }
.me { width: 20px; height: 20px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(26,115,232,.25), 0 2px 6px rgba(0,0,0,.3); }
.arrow { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 11px solid #fff; filter: drop-shadow(0 0 1px rgba(0,0,0,.6)); }
.cursor { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.4); }

/* ---------- grand écran : panneau latéral ---------- */
@media (min-width: 900px) {
  .sheet { left: 16px; right: auto; top: calc(16px + var(--safe-t)); bottom: 86px; width: 410px; max-height: none; border-radius: 22px; box-shadow: var(--shadow); }
  .sheet.collapsed { transform: none; }
  .grip { display: none; }
  .view { padding-top: 16px; }
  .picker { left: 16px; right: auto; top: 16px; bottom: 16px; width: 410px; border-radius: 22px; box-shadow: var(--shadow); }
  .tabs { left: 16px; right: auto; width: 410px; bottom: 16px; border-radius: 18px; border: 0; box-shadow: var(--shadow); height: 62px; padding: 0; }
  .card { flex-basis: 100%; }
  .track-top { width: 520px; margin-left: auto; margin-right: auto; }
  .track-bottom { width: 620px; margin-left: auto; margin-right: auto; border-radius: 24px; margin-bottom: 16px; }
}

.more-search { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--muted); vertical-align: middle; }
.mini-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }

/* ---------- pages plein écran (Mes parcours, Mon profil) ---------- */
.page {
  position: fixed; z-index: 25; left: 0; right: 0; top: 0; bottom: calc(var(--tabs-h) + var(--safe-b));
  background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
  padding: calc(18px + var(--safe-t)) 16px 28px;
}
body:not([data-tab="plan"]) .top,
body:not([data-tab="plan"]) .map-ctrls,
body:not([data-tab="plan"]) .sheet { display: none; }
.page-head { padding: 6px 2px 16px; }
.page-head h1 { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.page-sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.center { text-align: center; }

.filter { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 14px; scrollbar-width: none; }
.filter::-webkit-scrollbar { display: none; }
.filter button { flex: none; height: 42px; padding: 0 18px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 650; font-size: 15px; }
.filter button.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }

.saved { display: flex; flex-direction: column; gap: 12px; }
.saved-item {
  display: flex; gap: 14px; align-items: center; background: var(--surface); border-radius: 20px; padding: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06); border: 1px solid var(--line); cursor: pointer;
}
.saved-item:active { transform: scale(.99); }
.saved-item svg.thumb { width: 76px; height: 76px; border-radius: 14px; background: var(--surface-2); flex: none; }
.saved-item .info { flex: 1; min-width: 0; }
.saved-item .name { font-weight: 750; font-size: 17px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.saved-item .kpis { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 5px 0 3px; font-size: 16px; font-variant-numeric: tabular-nums; }
.saved-item .kpis .up { color: var(--up); }
.saved-item .meta { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.saved-item .meta .ico { width: 18px; height: 18px; }
.saved-item .meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-item .more { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; flex: none; color: var(--muted); }
.saved-item .more:active { background: var(--surface-2); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); font-size: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty > .ico { width: 56px; height: 56px; color: var(--accent); }
.empty-t { font-size: 20px; font-weight: 750; color: var(--ink); }
.empty .cta { margin-top: 16px; position: static; max-width: 340px; }

.profile-head { display: flex; align-items: center; gap: 16px; }
.avatar {
  width: 68px; height: 68px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 30px; font-weight: 800;
}
.group { background: var(--surface); border-radius: 20px; border: 1px solid var(--line); margin: 0 0 18px; overflow: hidden; }
.group-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 16px 16px 6px; }
.item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 8px 16px;
  border-top: 1px solid var(--line); font-size: 17px; width: 100%; text-align: left;
}
.group-title + .item { border-top: 0; }
.item > span { font-weight: 600; flex: none; }
.item input {
  flex: 1; min-width: 0; text-align: right; border: 0; outline: 0; background: transparent; font-size: 17px; height: 42px;
  color: var(--ink);
}
.item input::placeholder { color: var(--muted); opacity: .7; }
.item input:focus { color: var(--accent); }
.item.col { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 16px; }
.item.col small { font-size: 14px; line-height: 1.35; }
.item b { font-size: 18px; }
.seg-4 { grid-template-columns: repeat(4, 1fr); }
.group .seg button { min-height: 52px; font-size: 15px; flex-direction: row; gap: 6px; }
.group .seg button .ico { width: 20px; height: 20px; }
.danger-text { color: var(--up); font-weight: 650; justify-content: center; }
.danger-text:active { background: var(--surface-2); }

@media (min-width: 900px) {
  .page { left: 16px; right: auto; top: 16px; bottom: 90px; width: 410px; border-radius: 22px; box-shadow: var(--shadow); padding-top: 22px; }
}
.card:only-child { flex-basis: 100%; }

/* ---------- choix du départ ---------- */
.picker {
  position: fixed; z-index: 50; inset: 0; background: var(--surface); overflow-y: auto;
  padding: calc(10px + var(--safe-t)) 12px calc(20px + var(--safe-b));
}
.picker-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.picker .search {
  flex: 1; display: flex; align-items: center; gap: 8px; height: 54px; padding: 0 4px 0 14px;
  background: var(--surface-2); border-radius: 16px; border: 2px solid transparent;
}
.picker .search:focus-within { border-color: var(--accent); }
.picker .search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; height: 100%; }
.picker .search input::-webkit-search-cancel-button { display: none; }
.picker .search > .ico { color: var(--muted); }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; align-items: center; gap: 14px; padding: 12px 6px; min-height: 64px; border-radius: 14px; cursor: pointer; }
.plist li:active { background: var(--surface-2); }
.plist li > div { min-width: 0; flex: 1; }
.plist b { display: block; font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plist small { display: block; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plist li.none { color: var(--muted); justify-content: center; cursor: default; }
.pico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); flex: none; color: var(--muted); }
.pico.gps { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
#pickerQuick { border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 6px; }
.plist-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 6px 2px; }

.crosshair { position: fixed; z-index: 20; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.crosshair .pin { width: 28px; height: 28px; }
.crosshair::after { content: ''; position: absolute; left: 50%; top: 100%; width: 2px; height: 10px; background: var(--ink); transform: translateX(-50%); display: none; }
.mappick {
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b));
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); padding: 14px;
}
.mappick-t { font-weight: 700; font-size: 17px; text-align: center; margin-bottom: 12px; }
.mappick .row .btn { flex: none; height: 56px; }
.mappick .cta { flex: 1; position: static; height: 56px; }
body.mappicking .sheet, body.mappicking .tabs, body.mappicking .map-ctrls { display: none; }
@media (min-width: 900px) { .mappick { left: 50%; right: auto; width: 460px; transform: translateX(-50%); } }

/* ---------- dénivelé ---------- */
.presets { margin-top: 6px; }
.presets button { flex: 1; text-align: center; }
.presets button.on { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); border-color: var(--accent); }
.elev-hint { margin-top: 10px; line-height: 1.4; }
.elev-hint b { color: var(--ink); }
.warn-txt { display: block; margin-top: 4px; color: var(--warn); font-weight: 650; }

/* ---------- Marque ---------- */
.wordmark { font-weight: 800; letter-spacing: -.03em; margin: 0; line-height: 1; }
.wordmark b { font-weight: 800; color: inherit; }
.wordmark i { font-style: normal; color: var(--brand-orange); }
.wordmark.xl { font-size: 44px; color: #fff; }
.wordmark.sm { font-size: 14px; color: var(--ink); }

/* ---------- Connexion ---------- */
body.locked .tabs, body.locked .sheet, body.locked .map-ctrls, body.locked .page { visibility: hidden; }
.auth {
  position: fixed; inset: 0; z-index: 70; overflow-y: auto; color: #fff;
  background: radial-gradient(120% 70% at 50% 0%, #16213B 0%, var(--brand-navy) 55%, #070C17 100%);
  padding: calc(20px + var(--safe-t)) 16px calc(24px + var(--safe-b));
}
.auth-step { min-height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 22px; max-width: 440px; margin: 0 auto; }
.hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 8px; }
.hero-mark { width: 120px; height: auto; filter: drop-shadow(0 10px 30px rgba(255, 85, 0, .35)); }
.hero-tag { margin: 0; font-size: 19px; line-height: 1.35; color: #CBD5E1; max-width: 320px; }
.hero-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; text-align: left; font-size: 16px; color: #E2E8F0; }
.hero-list li { display: flex; align-items: center; gap: 12px; }
.hl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand-orange); box-shadow: 0 0 0 3px rgba(255,255,255,.9); flex: none; }
.hl-dot.green { background: var(--brand-green); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--brand-navy); }
.hl-dot.white { background: #fff; box-shadow: none; }
.auth-card {
  width: 100%; background: rgba(19, 27, 46, .92); border: 1px solid #26314D; border-radius: 24px; padding: 20px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.auth-card h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.auth-card .muted { color: #9AA6BC; margin: 0; }
.g-slot { display: flex; justify-content: center; min-height: 44px; }
.g-slot:empty { display: none; }
.auth-btn {
  height: 54px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: var(--brand-navy); font-weight: 700; font-size: 17px;
}
.auth-btn:active { transform: scale(.985); }
.auth-btn .ico { color: var(--brand-orange); }
.auth-note { margin: 0; font-size: 14px; color: #CBD5E1; text-align: center; min-height: 0; }
.auth-note:empty { display: none; }
.auth-link { color: #FFB27A; font-weight: 650; font-size: 15px; padding: 8px; text-decoration: underline; text-underline-offset: 3px; }
.auth-link.sm { font-size: 14px; padding: 4px 0; align-self: flex-end; }
.auth-legal { margin: 0; font-size: 13px; color: #94A3B8; text-align: center; line-height: 1.4; }
.auth-legal a, .form-hint a, .check a { color: #FFB27A; }
.auth-back { display: inline-flex; align-items: center; gap: 4px; color: #CBD5E1; font-weight: 600; align-self: flex-start; padding: 4px 0; }
.auth .field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; color: #CBD5E1; }
.auth .field input {
  height: 52px; border-radius: 14px; border: 2px solid #2A3654; background: #0B1326; color: #fff; padding: 0 14px; font-size: 17px; outline: 0;
}
.auth .field input:focus { border-color: var(--brand-orange); }
.auth form { display: flex; flex-direction: column; gap: 14px; }
.auth #em-pass-row { display: flex; flex-direction: column; }
.form-hint { margin: 0; font-size: 14px; color: #94A3B8; line-height: 1.4; font-weight: 400; }
.form-note { margin: 0; font-size: 15px; color: #FCA5A5; }
.form-note:empty { display: none; }
.form-note.ok { color: #6EE7B7; }
.auth .cta { position: static; }
.auth .seg button { background: #0B1326; color: #E2E8F0; border-color: #2A3654; min-height: 50px; }
.auth .seg button.on { background: rgba(255, 85, 0, .16); border-color: var(--brand-orange); color: #FFB27A; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-orange); }
.consent-list { margin: 0; padding-left: 20px; color: #E2E8F0; display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: #E2E8F0; line-height: 1.4; }
.check input { width: 24px; height: 24px; flex: none; accent-color: var(--brand-orange); margin: 0; }
.ob-mark { width: 44px; height: auto; }

/* ---------- Profil : compte ---------- */
.ph-txt { min-width: 0; }
.ph-txt .page-sub { overflow-wrap: anywhere; }
.avatar { background: var(--brand-navy); box-shadow: inset 0 0 0 3px var(--brand-orange); color: #fff; }
.admin-link {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 0 0 18px; border-radius: 20px; text-decoration: none;
  background: var(--brand-navy); color: #fff;
}
.admin-link .ico { color: var(--brand-orange); }
.admin-link span { flex: 1; }
.admin-link b { display: block; font-size: 17px; }
.admin-link small { color: #9AA6BC; font-size: 14px; }
.admin-link .chev { color: #9AA6BC; }
.item-val { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.link-item { color: var(--ink); font-weight: 600; }
.link-item:active { background: var(--surface-2); }
details.sec summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
details.sec summary::after { content: '›'; color: var(--muted); font-size: 22px; line-height: 1; transition: transform .2s; }
details.sec[open] summary::after { transform: rotate(90deg); }
.sec-form { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.sec-form .field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
.sec-form input, .group textarea {
  height: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface-2); padding: 0 12px; font-size: 16px; outline: 0; color: var(--ink);
}
.group textarea { height: auto; padding: 10px 12px; resize: vertical; font: inherit; }
.sec-form input:focus, .group textarea:focus { border-color: var(--accent); }
.sec .form-note { color: var(--up); }
.sec .form-note.ok { color: var(--ok); }
.fb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fb-row #fbSend { margin-left: auto; }
#fbPreview { display: inline-flex; align-items: center; gap: 8px; }
#fbImg { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.legal-links a { color: var(--muted); }

/* ---------- Carte aux couleurs du logo ---------- */
.pin.start { background: var(--brand-green); border-color: #fff; box-shadow: 0 0 0 3px var(--brand-navy), 0 2px 8px rgba(0,0,0,.35); }
.pin.end { background: var(--brand-orange); border-color: #fff; box-shadow: 0 0 0 2px rgba(11,19,38,.6), 0 2px 8px rgba(0,0,0,.35); }
.tabs button.on, .layers button.on { }
@media (min-width: 900px) {
  .auth-step { max-width: 460px; }
}
.item.confirm, button.confirm { color: #fff !important; background: var(--up) !important; }

/* ---------- Logo en haut à gauche ---------- */
.app-brand {
  position: fixed; z-index: 28; top: calc(12px + var(--safe-t)); left: 12px;
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px 0 12px;
  border-radius: 14px; text-decoration: none; background: var(--brand-navy); box-shadow: var(--shadow);
}
.app-brand img { width: 22px; height: auto; filter: drop-shadow(0 2px 6px rgba(255, 85, 0, .45)); }
.app-brand .wordmark { font-size: 21px; color: #fff; }
/* Sur les pages : le logo devient l'en-tête, sans fond */
body:not([data-tab="plan"]) .app-brand { background: transparent; box-shadow: none; padding-left: 4px; }
body:not([data-tab="plan"]) .app-brand .wordmark { color: var(--ink); }
.page { padding-top: calc(70px + var(--safe-t)); }
body.tracking .app-brand, body.mappicking .app-brand, body.locked .app-brand { display: none; }
@media (min-width: 900px) {
  .app-brand { top: 16px; left: 16px; }
  body[data-tab="plan"] .app-brand { left: 440px; }
  body:not([data-tab="plan"]) .app-brand { left: 28px; top: 28px; }
  .page { padding-top: 84px; }
}
