/* Track'Bordeaux — bus, trams et cars en direct.  Palette : pierre blonde, bordeaux, or de la Bourse, Garonne. */
:root {
  --bg: #f3eee4; --bg-2: #ebe4d6; --surface: #fffdf8; --surface-2: #f8f4ec; --line: #e3dbcb; --line-2: #d6ccb8;
  --ink: #1f1a1d; --ink-2: #4a4246; --muted: #7a716c;
  --vin: #8c1c3f; --vin-2: #a8274f; --vin-soft: #f6e4e9; --or: #b98c2c; --or-soft: #f6ecd2;
  --garonne: #1d5a6e; --garonne-soft: #dcebef;
  --ok: #1f7a4d; --ok-soft: #e0f1e7; --warn: #b5651d; --warn-soft: #fbeadb; --bad: #b3261e; --bad-soft: #fbe3e1;
  --shadow: 0 1px 2px rgba(40, 25, 20, .06), 0 8px 28px rgba(40, 25, 20, .10);
  --shadow-lg: 0 2px 6px rgba(40, 25, 20, .08), 0 24px 60px rgba(40, 25, 20, .18);
  --r: 16px; --r-sm: 10px;
  --ease: cubic-bezier(.22, .9, .25, 1);
  --top: 64px;
  --panel-w: 430px;
  --ff-title: 'Plus Jakarta Sans', system-ui, sans-serif; --ff-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #231e2b; --bg-2: #2b2534; --surface: #2d2738; --surface-2: #362f42; --line: #463d53; --line-2: #574c66;
    --ink: #f7f2ea; --ink-2: #ddd4de; --muted: #ada2b4;
    --vin: #ef6a91; --vin-2: #f78aa9; --vin-soft: #4d2539; --or: #f0c461; --or-soft: #4a3c1d;
    --garonne: #72bfd6; --garonne-soft: #1f3e4a;
    --ok: #5ad696; --ok-soft: #1c3d2b; --warn: #f6ad5f; --warn-soft: #4a321b; --bad: #ff7b70; --bad-soft: #4d211f;
    --shadow: 0 1px 2px rgba(10, 5, 20, .25), 0 8px 28px rgba(10, 5, 20, .3);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 24px 60px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #231e2b; --bg-2: #2b2534; --surface: #2d2738; --surface-2: #362f42; --line: #463d53; --line-2: #574c66;
  --ink: #f7f2ea; --ink-2: #ddd4de; --muted: #ada2b4;
  --vin: #ef6a91; --vin-2: #f78aa9; --vin-soft: #4d2539; --or: #f0c461; --or-soft: #4a3c1d;
  --garonne: #72bfd6; --garonne-soft: #1f3e4a;
  --ok: #5ad696; --ok-soft: #1c3d2b; --warn: #f6ad5f; --warn-soft: #4a321b; --bad: #ff7b70; --bad-soft: #4d211f;
  --shadow: 0 1px 2px rgba(10, 5, 20, .25), 0 8px 28px rgba(10, 5, 20, .3);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 24px 60px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/1.45 var(--ff-body); -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tnum { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--ff-title); }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Barre du haut ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 30;
  display: flex; align-items: center; gap: 18px; padding: 0 18px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .mark { width: 36px; height: 36px; color: var(--vin); }
.brand b { font-family: var(--ff-title); font-size: 23px; font-weight: 600; letter-spacing: -.01em; line-height: 1; }
.brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }
.nav { display: flex; gap: 2px; margin-left: 10px; }
.nav a {
  white-space: nowrap;
  display: flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px;
  color: var(--ink-2); font-weight: 600; font-size: 14px; position: relative; transition: color .2s, background .2s;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.on { color: var(--vin); background: var(--vin-soft); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.clock { font-weight: 700; font-size: 15px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); border: 1px solid var(--line); background: var(--surface); transition: transform .2s var(--ease), background .2s; }
.icon-btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; font-weight: 700; font-size: 14px;
  background: var(--surface); border: 1px solid var(--line); transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.primary { background: var(--vin); color: #fff; border-color: transparent; }
:root[data-theme="dark"] .btn.primary { color: #1a0d12; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #1a0d12; } }
.btn.small { padding: 6px 11px; font-size: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Carte + panneau ---------- */
#map { position: fixed; inset: var(--top) 0 0 0; z-index: 1; background: var(--bg-2); }
.maplibregl-ctrl-group { border-radius: 12px !important; box-shadow: var(--shadow) !important; overflow: hidden; }
.maplibregl-ctrl-attrib { font-size: 10px; }
.panel {
  position: fixed; z-index: 20; top: calc(var(--top) + 14px); left: 14px; bottom: 14px; width: var(--panel-w);
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
  transition: width .45s var(--ease), transform .45s var(--ease);
}
.panel.wide { --panel-w: min(640px, calc(100vw - 120px)); }
.panel-handle { display: none; }
#view { flex: 1; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.view-in { animation: viewIn .45s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: itemIn .5s var(--ease) both; animation-delay: calc(min(var(--i, 0), 18) * 28ms); }
@keyframes itemIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.v-head { padding: 20px 20px 14px; position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); }
.v-head h1 { margin: 0; font-family: var(--ff-title); font-weight: 600; font-size: 26px; letter-spacing: -.015em; line-height: 1.15; }
.v-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; font-size: 13px; margin-bottom: 10px; padding: 4px 8px 4px 2px; border-radius: 8px; }
.back:hover { color: var(--vin); }
.sec { padding: 6px 20px 18px; }
.sec h2 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 14px 0 10px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.sec h2 .count { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; font-size: 11px; letter-spacing: 0; color: var(--ink-2); }

/* ---------- Recherche ---------- */
.search { position: relative; }
.search input {
  width: 100%; padding: 13px 14px 13px 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2);
  outline: none; transition: border-color .2s, box-shadow .2s, background .2s; font-weight: 600;
}
.search input:focus { border-color: var(--vin); box-shadow: 0 0 0 4px var(--vin-soft); background: var(--surface); }
.search > svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.results { margin-top: 8px; }
.res {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 12px; transition: background .15s;
}
.res:hover, .res:focus-visible { background: var(--surface-2); outline: none; }
.res .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; border: 1px solid var(--line); }
.res .t { font-weight: 700; }
.res .s { font-size: 12.5px; color: var(--muted); }
.res .grow { flex: 1; min-width: 0; }

/* ---------- Pastilles de ligne ---------- */
.badge {
  --c: #777; --t: #fff;
  display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 7px; border-radius: 7px;
  background: var(--c); color: var(--t); font-weight: 800; font-size: 13.5px; letter-spacing: -.01em; line-height: 1; white-space: nowrap;
}
.badge.tram { border-radius: 50%; min-width: 26px; width: 26px; padding: 0; }
.badge.car { border-radius: 4px; }
.badge.lg { height: 46px; min-width: 52px; font-size: 22px; border-radius: 12px; padding: 0 12px; }
.badge.lg.tram { width: 46px; min-width: 46px; border-radius: 50%; }
.badge.xs { height: 20px; min-width: 22px; font-size: 11px; padding: 0 5px; border-radius: 5px; }
.badge.xs.tram { width: 20px; min-width: 20px; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; transition: all .2s var(--ease); }
button.chip:hover { border-color: var(--line-2); }
.chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.theo { background: var(--garonne-soft); color: var(--garonne); border-color: transparent; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }

/* ---------- Vue d'ensemble ---------- */
.hero { margin: 0 20px; padding: 18px; border-radius: 18px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, #b33a5e 0%, #8c1c3f 45%, #5a1028 100%); }
.hero::after { content: ""; position: absolute; right: -30px; top: -30px; width: 170px; height: 170px; opacity: .16; background: url("lune.svg") center/contain no-repeat; filter: brightness(0) invert(1); animation: spin 90s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero .big { font-family: var(--ff-title); font-size: 46px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.hero .lbl { opacity: .85; font-size: 13.5px; font-weight: 600; margin-top: 4px; }
.hero .row { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .pill { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); border-radius: 12px; padding: 7px 11px; display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; backdrop-filter: blur(4px); }
.hero .pill b { font-size: 16px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; transition: transform .25s var(--ease), box-shadow .25s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.punct { height: 10px; border-radius: 999px; overflow: hidden; display: flex; background: var(--line); margin: 10px 0 6px; }
.punct i { display: block; height: 100%; transition: width .8s var(--ease); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); margin-right: 6px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; transition: transform .25s var(--ease), box-shadow .25s, border-color .2s; }
a.card:hover, button.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.list { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Info trafic ---------- */
.alert { display: block; position: relative; padding: 14px 14px 14px 18px; overflow: hidden; }
.alert::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--sev, var(--garonne)); }
.alert.grave { --sev: var(--bad); } .alert.attention { --sev: var(--warn); } .alert.info { --sev: var(--garonne); }
.alert h3 { margin: 6px 0 2px; font-size: 15px; line-height: 1.3; }
.alert .meta { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.alert .body { font-size: 13.5px; color: var(--ink-2); white-space: pre-line; max-height: 0; overflow: hidden; transition: max-height .4s var(--ease), margin .3s; }
.alert.open .body { max-height: 600px; margin-top: 8px; }
.alert .more { font-size: 12.5px; font-weight: 700; color: var(--vin); margin-top: 6px; display: inline-block; }

.report { padding: 13px 14px; }
.report .top { display: flex; gap: 10px; align-items: flex-start; }
.report .emoji { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; background: var(--or-soft); flex: none; }
.report h4 { margin: 0; font-size: 14.5px; }
.report p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); white-space: pre-line; }
.report .foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.report .votes { margin-left: auto; display: flex; gap: 6px; }
.role { font-weight: 800; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: var(--garonne-soft); color: var(--garonne); }
.role.conducteur { background: var(--vin-soft); color: var(--vin); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: 1; padding: 8px 10px; border-radius: 10px; font-weight: 700; font-size: 13px; color: var(--muted); white-space: nowrap; transition: all .25s var(--ease); }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

/* ---------- Lignes ---------- */
.net-title { display: flex; align-items: center; gap: 10px; margin: 18px 0 4px; }
.net-title .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.net-title b { font-family: var(--ff-title); font-size: 19px; font-weight: 600; }
.fam { margin: 12px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.line-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.line-tile { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; min-width: 0; }
.line-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.line-tile .nm { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line-tile .on { font-size: 12px; font-weight: 800; color: var(--ok); display: flex; align-items: center; gap: 4px; }
.line-tile .on.zero { color: var(--muted); font-weight: 600; }
.line-tile .warn-ic { color: var(--warn); margin-left: auto; }
.line-grid.compact { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); }
.line-grid.compact .line-tile { justify-content: center; padding: 8px 4px; position: relative; }
.line-grid.compact .line-tile .n { position: absolute; top: -5px; right: -5px; background: var(--ok); color: #fff; border-radius: 999px; font-size: 10px; font-weight: 800; padding: 1px 5px; border: 2px solid var(--surface); }
.line-grid.compact .line-tile .a { position: absolute; bottom: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--warn); border: 2px solid var(--surface); }

/* Schéma de ligne (arrêts + véhicules) */
.diagram { position: relative; padding: 4px 0 4px 0; }
.diagram .rail { position: absolute; left: 27px; top: 18px; bottom: 18px; width: 6px; border-radius: 6px; background: var(--c); opacity: .9; }
.d-stop { position: relative; display: flex; align-items: center; gap: 14px; min-height: 40px; padding: 0 6px 0 18px; border-radius: 10px; }
.d-stop:hover { background: var(--surface-2); }
.d-stop .knob { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 4px solid var(--c); flex: none; z-index: 1; transition: transform .2s; }
.d-stop.term .knob { width: 22px; height: 22px; margin-left: -2px; border-width: 5px; }
.d-stop.term .nm { font-weight: 800; }
.d-stop .nm { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; }
.d-stop .tm { font-size: 13px; font-weight: 700; color: var(--muted); }
.d-stop.passed .nm, .d-stop.passed .tm { color: var(--muted); opacity: .65; }
.d-stop.passed .knob { background: var(--c); }
.d-stop.skip .nm { text-decoration: line-through; color: var(--bad); }
.d-stop.next .knob { transform: scale(1.25); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 25%, transparent); }
.d-veh {
  position: absolute; left: 6px; right: 4px; z-index: 3; height: 36px; display: flex; align-items: center; gap: 6px; pointer-events: none;
  transform: translateY(-50%); transition: top 1.2s var(--ease);
}
.d-veh .pin, .d-veh .tag { pointer-events: auto; }
.d-veh .tag { margin-left: auto; }
.d-veh .pin { width: 36px; height: 36px; border-radius: 50%; background: var(--c); color: var(--t); display: grid; place-items: center; box-shadow: 0 0 0 3px var(--surface), var(--shadow); }
.d-veh .tag { background: var(--ink); color: var(--surface); border-radius: 8px; padding: 3px 7px; font-size: 11.5px; font-weight: 800; white-space: nowrap; box-shadow: var(--shadow); transition: transform .2s var(--ease); }
.d-veh:hover .tag { transform: translateX(3px); }
.d-veh .tag.late { background: var(--warn); color: #fff; }
.d-veh .tag.theo { background: var(--garonne); color: #fff; }
.d-veh.ghost { opacity: .9; }
.diagram-wrap { padding-left: 46px; margin-left: -46px; }

/* ---------- Tableau des départs ---------- */
.board { background: #0e0c10; color: #fff; border-radius: 18px; padding: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.dep { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 12px; transition: background .2s; }
.dep + .dep { border-top: 1px solid rgba(255, 255, 255, .07); }
.dep:hover { background: rgba(255, 255, 255, .05); }
.dep .dest { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dep .sub { font-size: 12px; color: rgba(255, 255, 255, .55); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.dep .when { text-align: right; font-family: "DotGothic16", monospace; font-size: 22px; color: #ffb547; line-height: 1; text-shadow: 0 0 10px rgba(255, 181, 71, .45); min-width: 64px; }
.dep .when small { font-size: 13px; }
.dep .when.theo { color: #9ecfe0; text-shadow: none; }
.dep .when.now { animation: blink 1.1s steps(2) infinite; }
.dep.skip .dest, .dep.skip .when { text-decoration: line-through; opacity: .5; }
@keyframes blink { 50% { opacity: .25; } }
.rt-ic { display: inline-block; width: 10px; height: 10px; position: relative; }
.rt-ic::before, .rt-ic::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #ffb547; border-color: #ffb547 #ffb547 transparent transparent; transform: rotate(-45deg); animation: rt 1.6s infinite; }
.rt-ic::after { inset: 3px; animation-delay: .25s; }
@keyframes rt { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* ---------- Girouette aux couleurs de la ligne ---------- */
.giro {
  --c: #5b4a52; --t: #fff;
  background: var(--c); color: var(--t); border-radius: 14px; padding: 10px 14px 10px 10px; display: flex; align-items: center; gap: 14px; overflow: hidden; position: relative;
  box-shadow: 0 8px 20px -10px var(--c), inset 0 1px 0 rgba(255, 255, 255, .18); transition: background-color .5s, color .5s;
}
.giro::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .16) 45%, transparent 60%); transform: translateX(-100%); animation: giro-shine 7s ease-in-out infinite; }
@keyframes giro-shine { 0%, 70% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.giro .ln { background: var(--t); color: var(--c); font-weight: 900; font-size: 26px; letter-spacing: -.03em; line-height: 1; min-width: 52px; height: 46px; padding: 0 10px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.giro .ln:empty { display: none; }
.giro .ds { flex: 1; overflow: hidden; white-space: nowrap; font-weight: 800; font-size: 19px; letter-spacing: .01em; text-transform: uppercase; }
.giro .ds span { display: inline-block; padding-left: 0; }
.giro .ds span::before { content: "→ "; opacity: .7; }
.giro .ds.scroll span { animation: marquee 12s linear infinite; padding-left: 100%; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Véhicule ---------- */
.v-num { display: flex; align-items: baseline; gap: 10px; }
.v-num b { font-family: var(--ff-title); font-size: 34px; font-weight: 600; letter-spacing: -.02em; }
.kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.kv > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.kv span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.kv b { font-size: 15px; }
.heat { display: grid; grid-template-columns: repeat(15, 1fr); gap: 4px; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: var(--line); position: relative; }
.heat i[data-n] { background: color-mix(in srgb, var(--vin) calc(var(--v) * 100%), var(--line)); }
.hist-day { font-size: 12px; font-weight: 800; color: var(--muted); margin: 12px 0 6px; text-transform: capitalize; }
.hist-row { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.hist-row .tm { color: var(--muted); font-weight: 700; font-size: 12.5px; min-width: 92px; }

/* ---------- Parc ---------- */
.fleet { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.veh-tile { padding: 10px 11px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 6px; transition: transform .2s var(--ease), box-shadow .2s; position: relative; }
.veh-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.veh-tile b { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.veh-tile .st { position: absolute; right: 10px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.veh-tile.on .st { background: var(--ok); animation: pulse 2s infinite; }
.veh-tile small { color: var(--muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 800; color: var(--ink-2); }
.field input, .field select, .field textarea { padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); outline: none; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--vin); box-shadow: 0 0 0 4px var(--vin-soft); }
.field textarea { min-height: 90px; resize: vertical; }
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cat { padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; text-align: center; transition: all .2s var(--ease); }
.cat .e { font-size: 20px; }
.cat.on { border-color: var(--vin); background: var(--vin-soft); color: var(--vin); transform: scale(1.03); }
.seg { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; padding: 9px; border-radius: 9px; font-weight: 700; font-size: 13.5px; color: var(--muted); transition: all .2s var(--ease); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

/* ---------- Divers ---------- */
.empty { text-align: center; color: var(--muted); padding: 26px 10px; font-size: 14px; }
.empty .e { font-size: 30px; display: block; margin-bottom: 6px; }
.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 12px; height: 54px; margin-bottom: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 13px; font-size: 13px; background: var(--garonne-soft); color: var(--garonne); font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); opacity: 0; z-index: 100; background: var(--ink); color: var(--surface); padding: 11px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow-lg); transition: all .35s var(--ease); pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.fab { position: fixed; right: 20px; bottom: 24px; z-index: 25; display: none; }
.map-filters { position: fixed; z-index: 15; top: calc(var(--top) + 14px); right: 60px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.map-filters .chip { box-shadow: var(--shadow); background: var(--surface); }
.map-filters .chip.on { background: var(--ink); }
.map-filters .chip .sw { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.tip { position: fixed; z-index: 40; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; box-shadow: var(--shadow-lg); font-size: 13px; display: flex; gap: 9px; align-items: center; transform: translate(-50%, calc(-100% - 16px)); white-space: nowrap; animation: viewIn .2s var(--ease); }
.tip b { font-weight: 800; }
.loader { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg); transition: opacity .6s var(--ease), visibility .6s; }
.loader.off { opacity: 0; visibility: hidden; }
.loader .mk { display: block; margin: 0 auto; width: 84px; height: 84px; color: var(--vin); animation: spin 6s linear infinite; }
.loader p { text-align: center; color: var(--muted); font-weight: 700; margin-top: 14px; }
.tabbar { display: none; }
kbd { font: 700 11px var(--ff-body); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--muted); }

@media (max-width: 1180px) and (min-width: 821px) {
  .nav a span { display: none; }
  .nav a { padding: 9px 11px; }
  .brand small { display: none; }
}
/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  :root { --top: 56px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .nav, .clock span.txt, .top-right .btn { display: none; }
  .brand small { display: none; }
  #map { bottom: 64px; }
  .panel {
    left: 0; right: 0; width: auto; top: auto; bottom: 64px; height: calc(100dvh - var(--top) - 64px - 8px);
    border-radius: 22px 22px 0 0; border-bottom: 0;
    transform: translateY(calc(100% - var(--peek, 46%)));
  }
  .panel.wide { --panel-w: auto; }
  .panel[data-snap="full"] { --peek: 100%; }
  .panel[data-snap="half"] { --peek: 52%; }
  .panel[data-snap="low"] { --peek: 112px; }
  .panel.dragging { transition: none; }
  .panel-handle { display: block; padding: 9px 0 3px; cursor: grab; touch-action: none; flex: none; }
  .panel-handle::before { content: ""; display: block; width: 42px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 0 auto; }
  .v-head { padding-top: 8px; }
  .v-head h1 { font-size: 22px; }
  .tabbar {
    display: flex; position: fixed; inset: auto 0 0 0; height: 64px; z-index: 30; background: var(--surface);
    border-top: 1px solid var(--line); padding: 0 4px env(safe-area-inset-bottom);
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--muted); transition: color .2s; }
  .tabbar a svg { width: 22px; height: 22px; transition: transform .3s var(--ease); }
  .tabbar a.on { color: var(--vin); }
  .tabbar a.on svg { transform: translateY(-2px) scale(1.08); }
  .map-filters { right: 10px; left: 10px; justify-content: flex-start; top: calc(var(--top) + 10px); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .maplibregl-ctrl-top-right { top: 46px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .hero .big { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Service véhicule ---------- */
.svc-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; }
.svc-row .tm { width: 44px; flex: none; font-weight: 800; font-size: 13px; }
.svc-row .grow { flex: 1; min-width: 0; }
.svc-row .t { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-row .s { font-size: 12px; color: var(--muted); }
.svc-row.done { opacity: .5; }
.svc-row.current { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--vin); }
.svc-row.end { border-top: 1px dashed var(--line); margin-top: 4px; }
/* ---------- Retours dépôt ---------- */
.dep-eta { width: 66px; flex: none; display: flex; flex-direction: column; line-height: 1.15; }
.dep-eta b { font-size: 16px; font-weight: 800; }
.dep-eta small { font-size: 11px; color: var(--muted); font-weight: 600; }
.dh { display: flex; gap: 3px; align-items: flex-end; height: 86px; }
.dh-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; }
.dh-bar { flex: 1; width: 100%; display: flex; flex-direction: column-reverse; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.dh-bar i { display: block; width: 100%; transition: height .6s ease; }
.dh .r, .dh-leg .r { background: var(--vin); }
.dh .p, .dh-leg .p { background: var(--or); }
.dh-col.now .dh-bar { box-shadow: 0 0 0 2px var(--muted); }
.dh-col small { font-size: 10px; color: var(--muted); height: 12px; }
.dh-leg { display: flex; gap: 14px; margin-top: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.dh-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- Statut d'un arrêt (perturbations) ---------- */
.stop-st { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); animation: item .45s var(--ease) both; }
.stop-st .i { font-size: 22px; line-height: 1; }
.stop-st b { display: block; font-size: 15px; }
.stop-st small { display: block; font-size: 12.5px; margin-top: 2px; }
.stop-st.st-non_desservi { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.stop-st.st-non_desservi b { color: var(--bad); }
.stop-st.st-reporte { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.stop-st.st-reporte b { color: var(--warn); }
.stop-st.st-report_ici { background: var(--garonne-soft); border-color: color-mix(in srgb, var(--garonne) 35%, transparent); }
.stop-st.st-report_ici b { color: var(--garonne); }
.chip.st-non_desservi { background: var(--bad-soft); color: var(--bad); }
.chip.st-reporte { background: var(--warn-soft); color: var(--warn); }
.chip.st-report_ici { background: var(--garonne-soft); color: var(--garonne); }
.icon-btn[hidden] { display: none; }
#adm.on { color: var(--or); border-color: color-mix(in srgb, var(--or) 50%, var(--line)); }

/* ---------- Bandeau « nouvelle perturbation » ---------- */
#alert-banner { position: fixed; z-index: 60; top: calc(var(--top) + 10px); left: 50%; transform: translate(-50%, -20px); opacity: 0; width: min(560px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--bad) 45%, var(--line)); border-left: 5px solid var(--bad); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px 40px 6px 6px; transition: transform .45s var(--ease), opacity .35s; }
#alert-banner.in { transform: translate(-50%, 0); opacity: 1; }
#alert-banner.out { transform: translate(-50%, -20px); opacity: 0; }
#alert-banner .ab-item { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; }
#alert-banner .ab-item:hover { background: var(--surface-2); }
#alert-banner .ab-ic { font-size: 20px; animation: blink 1.2s ease-in-out 3; }
#alert-banner .ab-lines { display: flex; gap: 3px; flex: none; }
#alert-banner .ab-t { min-width: 0; font-size: 13.5px; line-height: 1.3; }
#alert-banner .ab-t b { display: block; color: var(--bad); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
#alert-banner .ab-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
#alert-banner .ab-x:hover { background: var(--surface-2); }

/* ---------- Panneau rangé : carte entière ---------- */
body { --panel-w: 430px; }
body.panel-wide { --panel-w: min(640px, calc(100vw - 120px)); }
.panel-toggle { position: fixed; z-index: 21; top: calc(var(--top) + 40px); left: calc(14px + var(--panel-w) - 1px);
  display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 10px 0 6px; border-radius: 0 14px 14px 0;
  background: var(--surface); border: 1px solid var(--line); border-left: 0; box-shadow: var(--shadow); color: var(--ink-2);
  font-weight: 700; font-size: 12.5px; cursor: pointer; transition: left .45s var(--ease), background .2s, color .2s; }
.panel-toggle span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .35s var(--ease); }
.panel-toggle:hover span, body.panel-off .panel-toggle span { max-width: 160px; }
.panel-toggle:hover { color: var(--vin); }
.panel-toggle svg { width: 18px; height: 18px; flex: none; }
body.panel-off .panel { transform: translateX(calc(-100% - 30px)); }
body.panel-off .panel-toggle { left: 0; padding-left: 10px; background: var(--vin); color: #fff; border-color: var(--vin); }
@media (max-width: 820px) {
  .panel-toggle { top: auto; border-radius: 999px; border: 1px solid var(--line); padding: 0 14px; height: 40px; }
  .panel-toggle span { max-width: 160px; }
  .panel-toggle { display: none; }
  body.panel-off .panel { transform: translateY(100%); }
  body.panel-off .panel-toggle { display: flex; left: 50%; right: auto; transform: translateX(-50%); bottom: 76px; }
}

/* ================= Finitions de l'interface ================= */
/* Indicateur glissant sous l'onglet actif */
.has-glide { isolation: isolate; }
.has-glide:not(.tabbar) { position: relative; }
.has-glide > .glide { position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none; border-radius: 10px; opacity: 0;
  transition: transform .42s var(--ease), width .42s var(--ease), height .42s var(--ease), opacity .2s; }
.tabs.has-glide > .glide, .seg.has-glide > .glide { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 1px var(--line); }
.tabs.has-glide button.on, .seg.has-glide button.on { background: transparent; box-shadow: none; }
.seg.has-glide > .glide { border-radius: 9px; }
.nav.has-glide > .glide { background: var(--vin-soft); border-radius: 999px; }
.nav.has-glide a.on { background: transparent; }
.tabbar.has-glide > .glide { background: var(--vin-soft); border-radius: 14px; }
.tabbar.has-glide a.on { background: transparent; }

/* Sortie de page avant l'arrivée de la suivante */
.view-in.out { opacity: 0; transform: translateY(-6px); transition: opacity .12s ease, transform .12s ease; animation: none; }

/* En-tête : léger trait quand on défile */
.v-head { transition: box-shadow .25s; }
.v-head.scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 18px -16px rgba(0, 0, 0, .35); }

/* Filtres de la carte : jamais sous le panneau */
@media (min-width: 821px) {
  .map-filters { left: calc(14px + var(--panel-w) + 64px); transition: left .45s var(--ease); }
  body.panel-off .map-filters { left: 220px; }
}

/* Listes et cartes : survol plus vivant, appui net */
.res { transition: background .15s, transform .2s var(--ease); }
.res:hover { transform: translateX(2px); }
.res:active, .card:active, .line-tile:active, .veh-tile:active { transform: scale(.985); }
.card { will-change: transform; }
a.card:hover, .card[data-alert]:hover, .line-tile:hover, .veh-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.chip:active, .icon-btn:active { transform: scale(.94); }

/* Focus clavier visible et cohérent */
:focus-visible { outline: 2px solid var(--vin); outline-offset: 2px; border-radius: 8px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }

/* Barres de défilement fines aux couleurs du site */
#view::-webkit-scrollbar { width: 8px; }
#view::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 2px solid var(--surface); }
#view::-webkit-scrollbar-track { background: transparent; }
#view { scrollbar-color: var(--line-2) transparent; }

/* Titres de section : petit filet doré */
.sec h2::before { content: ""; width: 14px; height: 2px; border-radius: 2px; background: var(--or); opacity: .8; }

@media (prefers-reduced-motion: reduce) {
  .has-glide > .glide, .view-in.out, .res, .map-filters { transition: none !important; }
}
/* En-tête véhicule : numéro jamais coupé, infos qui passent proprement à la ligne */
.v-num { align-items: center; flex-wrap: wrap; row-gap: 4px; }
.v-num b { white-space: nowrap; line-height: 1.05; }
.v-num > .muted { flex: 1 1 140px; min-width: 0; font-size: 13px; line-height: 1.3; }
.v-num > .chip { flex: none; }

/* ================= Une interface plus humaine ================= */
/* Titres de section : ton éditorial (serif italique), plus de petites majuscules grises */
.sec h2 { font-family: var(--ff-title); font-style: italic; font-weight: 500; font-size: 19px; letter-spacing: -.01em; text-transform: none; color: var(--ink); margin: 26px 0 10px; }
.sec h2::before { display: none; }
.sec h2 .count { font-family: var(--ff-body); font-style: normal; font-weight: 700; }

/* États vides : une phrase, pas un émoji géant */
.empty { text-align: left; padding: 6px 2px 2px; font-family: var(--ff-title); font-style: italic; font-size: 15px; color: var(--muted); }
.empty .e { display: none; }

/* Matière : léger grain papier sur le panneau (pierre de Bordeaux) */
.panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: .06; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3  0 0 0 0 .22  0 0 0 0 .15  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .panel::after { opacity: .09; mix-blend-mode: soft-light; } }
:root[data-theme="dark"] .panel::after { opacity: .09; mix-blend-mode: soft-light; }

/* ---------- Accueil ---------- */
.home-head .kicker { margin: 0 0 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.home-head h1 { font-size: 34px; font-weight: 500; letter-spacing: -.025em; }
.squiggle { position: relative; white-space: nowrap; color: var(--vin); }
.squiggle::after { content: ""; position: absolute; left: -2px; right: -4px; bottom: -6px; height: 9px; background: no-repeat center / 100% 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6 C 18 1, 30 9, 46 5 S 76 2, 92 6 S 112 7, 118 3' fill='none' stroke='%23b98c2c' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  stroke-dasharray: 1; animation: squiggle 1.1s .35s var(--ease) both; clip-path: inset(0 100% 0 0); }
@keyframes squiggle { to { clip-path: inset(0 0 0 0); } }

.bulletin { display: flex; gap: 14px; align-items: center; padding: 14px 16px 14px 12px; border-radius: 18px; margin-top: 6px;
  background: linear-gradient(135deg, var(--or-soft), color-mix(in srgb, var(--or-soft) 40%, var(--surface))); border: 1px solid color-mix(in srgb, var(--or) 25%, var(--line));
  transform: rotate(-.4deg); animation: itemIn .6s var(--ease) both; }
.bulletin[data-sky="rain"], .bulletin[data-sky="cloud"] { background: linear-gradient(135deg, var(--garonne-soft), color-mix(in srgb, var(--garonne-soft) 40%, var(--surface))); border-color: color-mix(in srgb, var(--garonne) 25%, var(--line)); }
.bulletin[data-sky="moon"] { background: linear-gradient(135deg, color-mix(in srgb, var(--vin-soft) 70%, var(--surface)), var(--surface-2)); border-color: var(--line); }
.bu-sky { width: 58px; height: 58px; flex: none; }
.bu-sky svg { width: 100%; height: 100%; overflow: visible; }
.bu-sky .sun { fill: #f3b63f; }
.bu-sky .rays line { stroke: #f3b63f; stroke-width: 3; stroke-linecap: round; }
.bu-sky .rays { transform-origin: 32px 32px; animation: spin 24s linear infinite; }
.bu-sky .cloud { fill: var(--surface); stroke: color-mix(in srgb, var(--ink) 30%, transparent); stroke-width: 1.5; animation: drift 6s ease-in-out infinite alternate; }
.bu-sky .drops line { stroke: var(--garonne); stroke-width: 2.5; stroke-linecap: round; animation: rain 1.1s linear infinite; }
.bu-sky .drops line:nth-child(2) { animation-delay: .35s; } .bu-sky .drops line:nth-child(3) { animation-delay: .7s; }
.bu-sky .moon { fill: #f1d98a; }
.bu-sky .star { fill: #f1d98a; animation: blink 2.4s ease-in-out infinite; }
.bu-sky .star:nth-child(3) { animation-delay: .8s; } .bu-sky .star:nth-child(4) { animation-delay: 1.6s; }
@keyframes drift { from { transform: translateX(-2px); } to { transform: translateX(3px); } }
@keyframes rain { from { transform: translateY(-4px); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(6px); opacity: 0; } }
.bu-tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bu-txt h3 { margin: 1px 0 2px; font-family: var(--ff-title); font-weight: 600; font-size: 21px; letter-spacing: -.01em; }
.bu-txt p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

.lede { font-family: var(--ff-title); font-size: 18px; line-height: 1.45; margin: 18px 0 10px; color: var(--ink); }
.lede b { font-family: var(--ff-body); font-weight: 800; }
.lede .num { font-size: 30px; font-weight: 600; color: var(--vin); letter-spacing: -.02em; line-height: 1; }
.punct.slim { height: 7px; border-radius: 7px; }
.punct-say { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-2); }
.links-line { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.links-line a { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 25%, transparent); text-underline-offset: 3px; }
.links-line a:hover { text-decoration-color: var(--vin); color: var(--vin); }
.links-line a.hot { color: var(--bad); }

/* Le fil du réseau : une frise, pas des cartes */
.fil { position: relative; margin-top: 4px; }
.fil::before { content: ""; position: absolute; left: 53px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.fil-item { display: grid; grid-template-columns: 42px 22px 1fr; align-items: start; gap: 0; padding: 7px 6px 7px 0; border-radius: 12px; transition: background .15s; }
.fil-item:hover { background: var(--surface-2); }
.fil-t { font-size: 12px; font-weight: 800; color: var(--muted); text-align: right; padding-top: 2px; }
.fil-dot { width: 10px; height: 10px; border-radius: 50%; margin: 5px auto 0; background: var(--surface); border: 2.5px solid var(--or); position: relative; z-index: 1; }
.fil-item.coupure .fil-dot { border-color: var(--bad); background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }
.fil-item.voix .fil-dot { border-color: var(--garonne); }
.fil-body { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13.5px; line-height: 1.35; }
.fil-txt { flex-basis: 100%; color: var(--ink); }
.fil-tag { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.fil-item.coupure .fil-tag { color: var(--bad); }
.more-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-weight: 700; font-size: 13.5px; color: var(--vin); }
.more-link svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.more-link:hover svg { transform: translateX(3px); }
.credits { margin-top: 26px; font-size: 12px; line-height: 1.5; color: var(--muted); font-style: italic; }

@media (prefers-reduced-motion: reduce) {
  .squiggle::after { animation: none; clip-path: none; }
  .bu-sky * { animation: none !important; }
  .bulletin { transform: none; }
}

/* ================= Itinéraire ================= */
.it-form { position: relative; margin-top: 14px; display: flex; flex-direction: column; gap: 8px; padding-right: 46px; }
.it-field { position: relative; display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 0 6px 0 12px; transition: border-color .2s, box-shadow .2s; }
.it-field:focus-within { border-color: var(--vin); box-shadow: 0 0 0 3px var(--vin-soft); }
.it-field input { flex: 1; min-width: 0; border: 0; background: none; padding: 12px 0; font: inherit; font-size: 14.5px; color: var(--ink); outline: none; }
.it-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.it-dot.from { border: 3px solid #1f7a4d; }
.it-dot.to { background: var(--vin); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.it-form::before { content: ""; position: absolute; left: 17px; top: 30px; bottom: 30px; border-left: 2px dotted var(--line-2); }
.icon-btn.small { width: 30px; height: 30px; border: 0; background: none; }
.icon-btn.small svg { width: 16px; height: 16px; }
.it-swap { position: absolute; right: 0; top: 50%; transform: translateY(-50%); transition: transform .35s var(--ease); }
.it-swap:hover { transform: translateY(-50%) rotate(180deg); }
.it-sug { position: absolute; z-index: 30; left: -1px; right: -1px; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 4px; max-height: 340px; overflow: auto; }
.it-sug:empty { display: none; }
.it-sug .res { width: 100%; text-align: left; }
.it-opt .t { font-weight: 700; color: var(--vin); }
.it-opt svg { width: 18px; height: 18px; color: var(--vin); margin: 0 8px 0 6px; }
.it-when { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.it-when .seg { flex: none; }
.it-when .seg button { padding: 7px 12px; font-size: 13px; }
.it-when input { border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 7px 10px; font: inherit; font-size: 13.5px; color: var(--ink); }
.it-hint p { font-family: var(--ff-title); font-style: italic; font-size: 16px; color: var(--muted); margin: 6px 0; line-height: 1.45; }
body.picking #map, body.picking #map canvas { cursor: crosshair !important; }

.it-list { display: flex; flex-direction: column; gap: 8px; }
.it-card { text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.it-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.it-card:active { transform: scale(.99); }
.it-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.it-top b { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.it-top .arrow { color: var(--muted); font-weight: 600; }
.it-dur { font-family: var(--ff-title); font-size: 17px; font-weight: 600; color: var(--vin); }
.it-legs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 8px 0 6px; }
.it-w { display: inline-flex; align-items: center; gap: 1px; font-size: 12px; font-weight: 800; color: var(--muted); }
.it-w svg { width: 15px; height: 15px; }
.it-sep { color: var(--line-2); font-weight: 800; margin: 0 1px; }
.it-sub { font-size: 12.5px; color: var(--muted); }
.it-sub b { color: var(--ink); }
.it-walkonly { margin: 12px 2px 0; font-size: 13.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.it-walkonly svg { width: 17px; height: 17px; }

.it-dh { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.it-sum { display: flex; align-items: baseline; justify-content: space-between; margin: 16px 0 8px; gap: 8px; }
.it-sum b { font-size: 22px; font-weight: 800; }
.it-sum span { color: var(--muted); font-size: 13px; }
.it-notice { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--ink); font-size: 13.5px; border-left: 4px solid var(--warn); animation: itemIn .4s var(--ease) both; }

.timeline { position: relative; }
.tl-row { display: grid; grid-template-columns: 50px 22px 1fr; gap: 0 6px; align-items: start; position: relative; min-height: 34px; }
.tl-t { text-align: right; font-size: 13px; font-weight: 800; padding-top: 1px; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.tl-t .late { color: var(--warn); } .tl-t .rt { color: var(--ok); }
.tl-t s { font-size: 11px; font-weight: 600; color: var(--muted); }
.tl-n { position: relative; align-self: stretch; }
.tl-n::before { content: ""; position: absolute; left: 50%; top: 4px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink-2); z-index: 1; }
.tl-n.start::before { border-color: #1f7a4d; }
.tl-n.stop::before { background: var(--vin); border-color: var(--vin); }
.tl-n.board::before, .tl-n.alight::before { border-color: var(--c); }
.tl-n.walk::before { width: 6px; height: 6px; margin-left: -3px; top: 8px; border: 0; background: var(--muted); }
.tl-ride .tl-n.board::after { content: ""; position: absolute; left: 50%; margin-left: -3px; top: 10px; bottom: -14px; width: 6px; background: var(--c); border-radius: 3px; }
.tl-walk .tl-n::after { content: ""; position: absolute; left: 50%; top: -10px; bottom: -10px; border-left: 2px dotted var(--line-2); margin-left: -1px; }
.tl-row > div { padding-bottom: 14px; font-size: 14px; min-width: 0; }
.tl-row a { color: inherit; }
.tl-row a:hover b { color: var(--vin); }
.tl-walk > div { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.tl-walk svg { width: 16px; height: 16px; flex: none; }
.tl-line { display: flex; align-items: center; gap: 8px; margin: 6px 0 3px; font-size: 13.5px; }
.tl-meta { font-size: 12.5px; }
.tl-meta a { text-decoration: underline; }
.tl-stops { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.tl-stops summary { cursor: pointer; font-weight: 700; color: var(--ink-2); }
.tl-stops div { padding: 2px 0 2px 2px; }
.tl-stops .skip { text-decoration: line-through; color: var(--bad); }
.tl-alert { margin: 0 0 12px 78px; padding: 8px 10px; border-radius: 10px; font-size: 13px; font-weight: 600; background: var(--warn-soft); }
.tl-alert.ratee { background: var(--bad-soft); color: var(--bad); }
.it-quick { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- Mode suivi d'un itinéraire ---------- */
body.following .map-filters { display: none; }
#guide { position: fixed; z-index: 40; top: calc(var(--top) + 14px); left: calc(14px + var(--panel-w) + 56px); right: 70px; max-width: 560px;
  display: flex; gap: 12px; align-items: center; padding: 12px 12px 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); transform: translateY(-14px); opacity: 0; transition: transform .45s var(--ease), opacity .3s; }
#guide.in { transform: none; opacity: 1; }
body.panel-off #guide { left: 220px; }
#guide .gd-ic { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--vin-soft); color: var(--vin); font-size: 22px; }
#guide .gd-ic svg { width: 24px; height: 24px; }
#guide .gd-txt { flex: 1; min-width: 0; }
#guide .gd-t { font-size: 15.5px; line-height: 1.3; }
#guide .gd-s { margin-top: 3px; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
#guide .gd-w { margin-top: 5px; font-size: 12.5px; font-weight: 700; color: var(--warn); }
#guide .gd-btns { display: flex; gap: 6px; flex: none; }
@media (max-width: 820px) {
  #guide { left: 10px; right: 10px; top: calc(var(--top) + 8px); max-width: none; }
}

/* ================= Identité Track'Bordeaux ================= */
.brand { gap: 11px; }
.mark-wrap, .ld-mark { position: relative; display: inline-grid; place-items: center; flex: none; }
.mark-wrap .mark { width: 36px; height: 36px; color: var(--vin); transition: transform .8s var(--ease); }
.brand:hover .mark-wrap .mark { transform: rotate(120deg); }
.live-core { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--or); box-shadow: 0 0 0 0 color-mix(in srgb, var(--or) 60%, transparent); animation: core 2.4s ease-out infinite; }
@keyframes core { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--or) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
.wm { display: inline-flex; align-items: baseline; line-height: 1; white-space: nowrap; letter-spacing: -.02em; }
.wm-t { font-family: var(--ff-body); font-weight: 800; font-size: 21px; color: var(--ink); }
.wm-ap { width: 8px; height: 13px; margin: 0 2px 0 1px; align-self: flex-start; transform: translateY(-1px); fill: var(--or); }
.wm-ap circle { fill: var(--surface); }
.wm-b { font-family: var(--ff-title); font-style: italic; font-weight: 600; font-size: 23px; color: var(--vin); }
.brand small { margin-top: 4px; letter-spacing: .06em; }

/* Écran de chargement */
.ld { text-align: center; }
.ld-mark .mk { width: 92px; height: 92px; color: var(--vin); animation: spin 6s linear infinite; }
.ld-mark .live-core { width: 12px; height: 12px; }
.ld-wm { margin-top: 18px; animation: itemIn .7s .15s var(--ease) both; }
.ld-wm .wm-t { font-size: 30px; } .ld-wm .wm-b { font-size: 33px; } .ld-wm .wm-ap { width: 11px; height: 18px; }
.ld-say { margin: 14px 0 0; font-family: var(--ff-title); font-style: italic; font-size: 16px; color: var(--ink-2); transition: opacity .25s, transform .25s; }
.ld-say.swap { opacity: 0; transform: translateY(4px); }
.ld-msg { margin: 4px 0 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }

@media (max-width: 820px) {
  .wm-t { font-size: 18px; } .wm-b { font-size: 20px; } .wm-ap { width: 7px; height: 11px; }
  .mark-wrap .mark { width: 30px; height: 30px; }
}
@media (max-width: 380px) {
  .wm-t { font-size: 16px; } .wm-b { font-size: 18px; }
}

/* ================= Logo « repère de la Lune » ================= */
:root { --pin: #8c1c3f; --cres: #f1cf7a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --pin: #b8325b; } }
:root[data-theme="dark"] { --pin: #b8325b; }
.tb-pin { fill: var(--pin); }
.tb-cres { fill: var(--cres); }
.tb-dot { fill: #fff; }
.mark-wrap .mark { width: 29px; height: 37px; color: inherit; transition: transform .45s var(--ease); transform-origin: 50% 100%; }
.brand:hover .mark-wrap .mark { transform: translateY(-2px) rotate(-6deg); }
.mark-wrap .live-core { top: 39.2%; left: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; }
/* Chargement : l'épingle flotte, les croissants tournent */
.ld-mark { display: grid; justify-items: center; }
.ld-pin { width: 74px; height: 94px; animation: pinFloat 2.4s ease-in-out infinite; }
.ld-shadow { width: 34px; height: 7px; margin-top: 6px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 18%, transparent); animation: pinShadow 2.4s ease-in-out infinite; }
@keyframes pinFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes pinShadow { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.7); opacity: .55; } }
@media (max-width: 820px) { .mark-wrap .mark { width: 25px; height: 32px; } }
@media (prefers-reduced-motion: reduce) { .ld-pin, .ld-shadow { animation: none; } }
.mark-wrap .live-core { background: transparent; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; animation: coreSm 2.4s ease-out infinite; }
@keyframes coreSm { 0% { box-shadow: 0 0 0 0 rgba(241, 207, 122, .7); } 70%, 100% { box-shadow: 0 0 0 5px rgba(241, 207, 122, 0); } }

/* ================= Bandeau des grands événements ================= */
:root { --bar: 64px; }
.topbar { height: var(--bar); }
body.has-ribbon { --top: calc(var(--bar) + 42px); }
#ribbon { position: fixed; z-index: 29; top: var(--bar); left: 0; right: 0; height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 18px;
  background: var(--vin); color: #fff; box-shadow: 0 4px 14px -8px rgba(0, 0, 0, .5); animation: rbIn .5s var(--ease) both; }
#ribbon.rb-info { background: var(--garonne); }
#ribbon.rb-attention { background: #b5651d; }
#ribbon.swap .rb-main { opacity: 0; transform: translateY(-6px); }
@keyframes rbIn { from { transform: translateY(-100%); } to { transform: none; } }
#ribbon .rb-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: inherit; transition: opacity .2s, transform .2s; }
#ribbon .rb-ic { font-size: 17px; animation: blink 1.6s ease-in-out 3; }
#ribbon .rb-k { flex: none; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .18); }
#ribbon .rb-t { min-width: 0; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ribbon a.rb-main[href]:hover .rb-t { text-decoration: underline; }
#ribbon .rb-n { font-size: 12px; font-weight: 800; opacity: .8; }
#ribbon .rb-x { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; opacity: .85; flex: none; }
#ribbon .rb-x:hover { background: rgba(255, 255, 255, .16); opacity: 1; }
#ribbon .rb-x svg { width: 16px; height: 16px; }
@media (max-width: 820px) {
  :root { --bar: 56px; }
  body.has-ribbon { --top: calc(var(--bar) + 40px); }
  #ribbon { height: 40px; padding-left: 12px; gap: 6px; }
  #ribbon .rb-k { display: none; }
  #ribbon .rb-t { font-size: 13px; }
}

/* ================= Page Paramètres ================= */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.kpi { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.kpi b { display: block; font-family: var(--ff-title); font-size: 26px; font-weight: 600; color: var(--vin); line-height: 1.1; }
.kpi span { font-size: 12px; color: var(--muted); font-weight: 600; }
.bars { display: flex; gap: 4px; align-items: flex-end; height: 110px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.bar i { display: block; width: 100%; background: var(--vin); border-radius: 4px 4px 2px 2px; opacity: .85; transition: height .6s var(--ease); }
.bar:last-child i { background: var(--or); opacity: 1; }
.bar small { font-size: 10px; color: var(--muted); }
.st-row { display: flex; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.st-row .t { font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.st-row .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--muted); }
.st-dot.ok { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); } .st-dot.warn { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); } .st-dot.bad { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }
.sw-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 0; cursor: pointer; }
.sw-row b { display: block; font-size: 14.5px; } .sw-row small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: background .25s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .3s var(--ease); }
.switch:checked { background: var(--vin); } .switch:checked::after { transform: translateX(18px); }
.setf input[type="range"] { width: 100%; accent-color: var(--vin); }
.set-save { position: sticky; bottom: 0; display: flex; gap: 12px; align-items: center; padding: 12px 0; margin-top: 10px; background: linear-gradient(transparent, var(--surface) 30%); }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.adm-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); transition: transform .2s var(--ease), border-color .2s; }
.adm-card:hover { transform: translateY(-2px); border-color: var(--vin); }
.adm-card svg { width: 20px; height: 20px; color: var(--vin); }
.adm-card small { color: var(--muted); font-size: 12px; }
.adm-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.log-row { display: grid; grid-template-columns: 92px 1fr; gap: 2px 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.log-row span.muted { grid-column: 2; font-size: 12.5px; }
.bar { max-width: 34px; } .bars { justify-content: flex-start; }

/* Alertes : résumé + texte complet lisible ici */
.alert .sum { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.alert.open .sum { display: none; }
.alert .body { white-space: normal; line-height: 1.5; }
.alert.open .body { max-height: 4000px; }
.alert .body.short { max-height: none; margin-top: 6px; }
.alert .body p { margin: 0 0 6px; }
.alert .body .ab-h { display: block; margin: 10px 0 4px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
.alert .body .ab-h:first-child { margin-top: 0; }
.alert.focus { box-shadow: 0 0 0 3px var(--vin-soft), var(--shadow); border-color: var(--vin); }

/* Accueil : mes arrêts */
.fav-grid { display: grid; gap: 8px; }
.fav-card { display: block; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; animation: itemIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.fav-card:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow); }
.fav-n { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.fav-n svg { width: 15px; height: 15px; color: var(--or); fill: var(--or); }
.fav-n b { font-size: 14.5px; }
.fav-dep { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13.5px; }
.fav-h { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-w { font-size: 13px; color: var(--muted); }
.fav-w b { font-size: 15px; color: var(--ink); }
.fav-w.rt b { color: var(--ok); }
.fav-w .now { color: var(--vin); }
.fav-none { font-size: 12.5px; color: var(--muted); font-style: italic; }

/* Lignes à plusieurs branches */
.seg.dirs button { white-space: normal; line-height: 1.25; font-size: 12.5px; }
.branches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 12.5px; }
.branches .chip .muted { font-weight: 600; }
.branches .chip.on .muted { color: inherit; opacity: .75; }

/* Lignes sans service aujourd'hui */
.line-tile.off { opacity: .55; }
.line-tile.off:hover { opacity: 1; }

/* ================= Actualités ================= */
.news-list { display: grid; gap: 10px; }
.news-card { display: block; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); transition: transform .25s var(--ease), box-shadow .25s, border-color .2s; }
.news-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.news-card.pinned { border-color: color-mix(in srgb, var(--or) 45%, var(--line)); background: linear-gradient(135deg, var(--or-soft), var(--surface) 60%); }
.news-card h3 { margin: 6px 0 4px; font-family: var(--ff-title); font-weight: 600; font-size: 20px; letter-spacing: -.01em; line-height: 1.2; }
.news-card p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.nc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; }
.nc-tag { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--vin); }
.nc-pin { font-size: 12px; font-weight: 700; color: var(--or); }
.nc-more { display: inline-flex; align-items: center; gap: 3px; margin-top: 8px; font-weight: 700; font-size: 13px; color: var(--vin); }
.nc-more svg { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.news-card:hover .nc-more svg { transform: translateX(3px); }
.article { max-width: 620px; }
.article h1 { font-family: var(--ff-title); font-weight: 600; font-size: 32px; line-height: 1.15; letter-spacing: -.02em; margin: 8px 0 10px; }
.article .lede { font-family: var(--ff-title); font-style: italic; font-size: 18px; color: var(--ink-2); line-height: 1.5; margin: 0 0 18px; }
.article-body { font-size: 15.5px; line-height: 1.7; color: var(--ink); }
.article-body p { margin: 0 0 14px; }
.article-body h2 { font-family: var(--ff-title); font-weight: 600; font-style: normal; font-size: 22px; margin: 24px 0 8px; letter-spacing: -.01em; text-transform: none; color: var(--ink); }
.article-body h3 { font-size: 16px; margin: 18px 0 6px; }
.article-body ul { margin: 0 0 14px; padding-left: 22px; }
.article-body li { margin: 4px 0; }
.article-body li::marker { color: var(--vin); }
.article-body blockquote { margin: 0 0 14px; padding: 8px 14px; border-left: 3px solid var(--or); border-radius: 0; background: var(--surface-2); font-family: var(--ff-title); font-style: italic; }
.article-body a { color: var(--vin); text-decoration: underline; text-underline-offset: 3px; }
.article-sign { font-family: var(--ff-title); font-style: italic; color: var(--muted); margin: 20px 0 14px; }
.article.preview { border: 1px dashed var(--line-2); border-radius: 16px; padding: 16px; }
.md-bar { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.md-bar button { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.md-bar button:hover { border-color: var(--vin); color: var(--vin); }
.news-editor textarea#n-body { font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; line-height: 1.55; }

/* ================= Le Vélo et parcs-relais ================= */
.kicker-sm { margin: 0 0 2px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mob-big { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.mob-n b { display: block; font-family: var(--ff-title); font-size: 44px; font-weight: 600; line-height: 1; letter-spacing: -.03em; }
.mob-n span { font-size: 13px; color: var(--muted); font-weight: 600; }
.mob-n.ok b { color: var(--ok); } .mob-n.warn b { color: var(--warn); } .mob-n.bad b { color: var(--bad); }
.gauge { height: 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin-top: 12px; }
.gauge i { display: block; height: 100%; border-radius: 10px; background: var(--ok); transition: width .8s var(--ease); }
.gauge.pr i { background: linear-gradient(90deg, #2b6fb5, #c0392b); }

/* ================= Info trafic : résumé par mode et par ligne ================= */
.mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; margin-bottom: 12px; }
.mode-tile { position: relative; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; overflow: hidden; }
.mode-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ok); }
.mode-tile.warn::before { background: var(--warn); } .mode-tile.bad::before { background: var(--bad); }
.mode-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mode-tile.on { border-color: var(--vin); box-shadow: 0 0 0 2px var(--vin-soft); }
.mode-tile .mt-ic { font-size: 16px; line-height: 1; color: var(--ink-2); } .mode-tile .mt-ic svg { width: 18px; height: 18px; }
.mode-tile b { font-size: 14px; }
.mode-tile .mt-n { font-size: 12.5px; color: var(--ink-2); } .mode-tile .mt-n b { font-size: 15px; }
.mode-tile.ok .mt-n { color: var(--ok); }
.mode-tile .mt-of { font-size: 11.5px; color: var(--muted); }
.by-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; font-size: 12.5px; }
.by-line .bl { position: relative; padding: 2px; border-radius: 9px; border: 2px solid transparent; transition: transform .15s; }
.by-line .bl:hover { transform: translateY(-1px); }
.by-line .bl.on { border-color: var(--vin); }
.by-line .bl i { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 10px; font-style: normal; font-weight: 800; display: grid; place-items: center; }

.gen-note { display: block; width: 100%; text-align: left; margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--surface-2); font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gen-note:hover { border-color: var(--vin); color: var(--ink); }

/* ================= Bouton « Calques » de la carte ================= */
.map-filters { left: auto !important; right: 56px; flex-wrap: nowrap; }
.layers-btn { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 700; font-size: 13px; color: var(--ink); cursor: pointer; transition: transform .2s var(--ease), border-color .2s; }
.layers-btn:hover { transform: translateY(-1px); border-color: var(--line-2); }
.layers-btn svg { width: 18px; height: 18px; color: var(--vin); }
.lb-dots { display: flex; }
.lb-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); border: 2px solid var(--surface); margin-left: -3px; }
.lb-dots i:first-child { margin-left: 0; }
.lb-dots i.d { background: transparent; border: 2px dashed var(--c); }
.lb-n { font-size: 11.5px; color: var(--muted); }
.layers-pop { position: absolute; top: calc(100% + 8px); right: 0; width: 270px; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
.map-filters.open .layers-pop { opacity: 1; transform: none; pointer-events: auto; }
.lp-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 11px; cursor: pointer; }
.lp-row:hover { background: var(--surface-2); }
.lp-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.lp-dot.d { background: transparent; border: 2px dashed var(--c); box-shadow: none; }
.lp-t { flex: 1; min-width: 0; } .lp-t b { display: block; font-size: 13.5px; } .lp-t small { font-size: 11.5px; color: var(--muted); }
.lp-row .switch { transform: scale(.85); }
@media (max-width: 820px) {
  .map-filters { right: 10px !important; left: auto !important; overflow: visible !important; }
  .layers-btn span:not(.lb-dots) { display: none; } .layers-btn { padding: 0 10px; }
}
/* Familles de lignes : intertitres éditoriaux */
.fam { margin: 18px 0 8px; font-family: var(--ff-title); font-style: italic; font-weight: 500; font-size: 17px; letter-spacing: -.005em; text-transform: none; color: var(--ink); }
.fam .muted { font-family: var(--ff-body); font-style: normal; font-size: 12.5px; }
/* Petits écrans : l'horloge laisse la place au nom et aux boutons (le téléphone affiche déjà l'heure) */
@media (max-width: 430px) { .topbar .clock { display: none; } .top-right { gap: 6px; } }

/* ================= Fiche mobile : ranger d'un geste ================= */
.sheet-hide { display: none; }
@media (max-width: 820px) {
  .sheet-hide { display: flex; align-items: center; gap: 3px; position: absolute; z-index: 6; top: 6px; right: 10px; height: 28px; padding: 0 10px 0 7px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 700; }
  .sheet-hide svg { width: 15px; height: 15px; }
  .sheet-hide:active { transform: scale(.95); }
  .panel-handle { padding: 11px 0 6px; }
  .panel-handle::before { width: 48px; }
  #view .v-head { touch-action: pan-y; }
  body.panel-off .panel-toggle { box-shadow: var(--shadow-lg); }
  body.panel-off .panel-toggle span { max-width: 160px; }
}

/* ================= Accueil : raccourcis voyageurs ================= */
.quick { display: grid; gap: 10px; margin: 2px 0 18px; }
.q-card { display: block; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); padding: 14px; transition: border-color .2s, box-shadow .25s, transform .25s var(--ease); }
.q-go { background: linear-gradient(160deg, color-mix(in srgb, var(--vin) 10%, var(--surface)), var(--surface) 70%); border-color: color-mix(in srgb, var(--vin) 25%, var(--line)); }
.q-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.q-h b { display: block; font-family: var(--ff-title); font-size: 20px; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }
.q-h small, .q-mini small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.q-ic { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--vin-soft); color: var(--vin); }
.q-ic svg { width: 19px; height: 19px; }
.q-field { position: relative; }
.q-field input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14.5px; outline: none; transition: border-color .2s, box-shadow .2s; }
.q-field input:focus { border-color: var(--vin); box-shadow: 0 0 0 3px var(--vin-soft); }
.q-sug { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 4px; }
.q-sug:empty { display: none; }
.q-sug button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 10px; font-size: 14px; color: var(--ink); }
.q-sug button:hover { background: var(--surface-2); }
.q-sug svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.q-when { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 12px; }
.q-when button { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 700; color: var(--ink-2); transition: all .2s var(--ease); }
.q-when button.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.q-cta { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px 10px 18px; border-radius: 999px; background: var(--vin); color: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 8px 18px -10px var(--vin); transition: transform .2s var(--ease), box-shadow .2s; }
.q-cta svg { width: 17px; height: 17px; transition: transform .2s var(--ease); }
.q-cta:hover { transform: translateY(-1px); } .q-cta:hover svg { transform: translateX(3px); }
.q-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.q-mini { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; cursor: pointer; }
.q-mini:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.q-mini > div { flex: 1; min-width: 0; } .q-mini b { display: block; font-size: 13.5px; line-height: 1.2; }
.q-mini > svg:last-child { width: 16px; height: 16px; color: var(--muted); flex: none; }
.q-select select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.q-traffic { border-radius: 16px; border: 1px dashed var(--line-2); padding: 10px 12px; }
.qt-h { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.qt-h svg { width: 17px; height: 17px; color: var(--warn); }
.qt-h .muted { margin-left: auto; font-size: 12.5px; font-weight: 600; }
.qt-lines { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 2px; }
.qt-b { position: relative; transition: transform .15s; } .qt-b:hover { transform: translateY(-2px); }
.qt-b i { position: absolute; top: -6px; right: -6px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 9.5px; font-style: normal; font-weight: 800; display: grid; place-items: center; }
.qt-more { align-self: center; font-size: 12.5px; font-weight: 700; }
@media (max-width: 380px) { .q-row { grid-template-columns: 1fr; } }

/* ================= Page d'accueil pleine page ================= */
body.page-full #map, body.page-full .map-filters, body.page-full .panel-toggle, body.page-full #guide { visibility: hidden; }
body.page-full .panel { left: 0 !important; right: 0; top: var(--top); bottom: 0; width: auto !important; height: auto !important; border-radius: 0; border: 0; box-shadow: none; transform: none !important; translate: none !important; background: var(--bg); }
body.page-full .panel::after { opacity: .04; }
body.page-full .panel-handle, body.page-full .sheet-hide { display: none !important; }
@media (max-width: 820px) { body.page-full .panel { bottom: 64px; } }
.lp { max-width: 1120px; margin: 0 auto; padding: 28px 28px 10px; }
.lp-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center; padding: 18px 0 30px; }
.lp-hero .kicker { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.lp-hero h1 { margin: 0; font-family: var(--ff-title); font-weight: 500; font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -.035em; }
.lp-sub { margin: 14px 0 0; font-size: 17px; color: var(--ink-2); max-width: 30em; line-height: 1.5; }
.lp-live { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 9px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); transition: border-color .2s, transform .2s var(--ease); }
.lp-live:hover { border-color: var(--vin); transform: translateY(-1px); }
.lp-live b { font-family: var(--ff-title); font-size: 20px; color: var(--vin); }
.lp-live span { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; color: var(--vin); margin-left: 4px; }
.lp-live svg { width: 15px; height: 15px; }
.lp-go { position: relative; padding: 20px; border-radius: 24px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--vin) 25%, var(--line)); box-shadow: 0 22px 50px -30px color-mix(in srgb, var(--vin) 60%, transparent), var(--shadow); }
.lp-go::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; border-radius: 24px 24px 0 0; background: linear-gradient(90deg, var(--vin), var(--or)); }
.lp-go-h, .lp-card-h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.lp-go-h b { display: block; font-family: var(--ff-title); font-size: 26px; font-weight: 600; letter-spacing: -.015em; line-height: 1.05; }
.lp-go-h small, .lp-card-h small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.lp-go .q-field input { padding: 14px 16px; font-size: 15.5px; border-radius: 14px; }
.lp-go-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lp-go-f .muted { font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.lp-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); transition: transform .25s var(--ease), box-shadow .25s, border-color .2s; }
.lp-card:hover { box-shadow: var(--shadow); border-color: var(--line-2); }
a.lp-card:hover { transform: translateY(-3px); }
.lp-card-h b { display: block; font-size: 16px; }
.lp-link { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-size: 13.5px; font-weight: 700; color: var(--vin); }
.lp-link svg { width: 16px; height: 16px; }
.lp-favs { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-favs .chip svg { width: 13px; height: 13px; color: var(--or); }
.lp-select { position: relative; display: block; }
.lp-select select { width: 100%; appearance: none; padding: 12px 40px 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 14.5px; cursor: pointer; }
.lp-select select:focus { outline: none; border-color: var(--vin); box-shadow: 0 0 0 3px var(--vin-soft); }
.lp-select svg { position: absolute; right: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%) rotate(90deg); color: var(--muted); pointer-events: none; }
.lp-map-art { flex: 1; min-height: 70px; border-radius: 14px; background: var(--surface-2); overflow: hidden; display: grid; place-items: center; }
.lp-map-art svg { width: 100%; height: 90px; }
.lp-dot.a { offset-path: path("M6 70 C 50 20, 90 80, 130 40 S 200 10, 234 30"); animation: lpRide 6s linear infinite; }
.lp-dot.b { offset-path: path("M10 25 C 60 40, 110 10, 150 55 S 210 80, 232 70"); animation: lpRide 8s linear infinite reverse; }
@keyframes lpRide { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.lp-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 38px 0 12px; }
.lp-sec-h h2 { margin: 0; font-family: var(--ff-title); font-style: italic; font-weight: 500; font-size: 28px; letter-spacing: -.015em; }
.lp-tr-sum { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px; }
.lp-tr-sum .qt-lines { margin: 0; }
.lp-tr-n { font-size: 14px; font-weight: 700; color: var(--warn); white-space: nowrap; } .lp-tr-n b { font-size: 20px; }
.lp-tr-n.ok { color: var(--ok); }
.lp-alerts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lp-alerts .card { margin: 0; }
.lp-mob { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px; }
.lp-mob-c { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); transition: transform .2s var(--ease), box-shadow .2s; }
.lp-mob-c:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.lp-mob-ic { font-size: 26px; }
.lp-mob-c b { display: block; font-family: var(--ff-title); font-size: 30px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.lp-mob-c.velo b { color: var(--ok); } .lp-mob-c.pr b { color: #2b6fb5; } .lp-mob-c.tr b { color: var(--warn); }
.lp-mob-c small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.lp-news-g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lp-foot { margin: 48px 0 20px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 10px; color: var(--muted); font-size: 13px; }
.lp-foot-b { display: flex; align-items: center; gap: 10px; } .lp-foot-b .mark { width: 22px; height: 28px; }
.lp-foot-b .wm-t { font-size: 17px; } .lp-foot-b .wm-b { font-size: 19px; margin-left: 3px; }
.lp-foot nav { display: flex; flex-wrap: wrap; gap: 14px; } .lp-foot nav a { font-weight: 700; color: var(--ink-2); } .lp-foot nav a:hover { color: var(--vin); }
@media (max-width: 980px) {
  .lp-hero { grid-template-columns: 1fr; gap: 20px; }
  .lp-grid3, .lp-alerts, .lp-news-g { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .lp { padding: 18px 16px 6px; }
  .lp-grid3, .lp-alerts, .lp-news-g, .lp-mob { grid-template-columns: 1fr; }
  .lp-sec-h h2 { font-size: 23px; }
  .lp-go { padding: 16px; } .lp-go-h b { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .lp-dot { animation: none !important; } }

/* ================= Mentions légales ================= */
.legal { max-width: 860px; }
.legal-head { padding: 14px 0 8px; }
.legal-head .kicker { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--vin); }
.legal-head h1 { margin: 0 0 10px; font-family: var(--ff-title); font-weight: 500; font-size: clamp(34px, 5vw, 52px); letter-spacing: -.03em; }
.legal-head .lede { font-family: var(--ff-title); font-style: italic; font-size: 18px; color: var(--ink-2); line-height: 1.5; margin: 0 0 8px; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 8px; }
.legal-toc a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 700; color: var(--ink-2); transition: border-color .2s, color .2s; }
.legal-toc a:hover { border-color: var(--vin); color: var(--vin); }
.legal-sec { padding: 6px 0 4px; border-top: 1px solid var(--line); margin-top: 18px; scroll-margin-top: 16px; }
.legal-sec h2 { font-size: 21px !important; }
.legal-body li { margin: 6px 0; }
.legal-todo { padding: 1px 6px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); font-weight: 700; }

/* ================= Mode édition ================= */
#adm-edit.on { color: #fff; background: var(--vin); border-color: var(--vin); }
body.editing .editable { outline: 2px dashed color-mix(in srgb, var(--or) 80%, transparent); outline-offset: 3px; border-radius: 6px; cursor: text; transition: outline-color .2s, background .2s; }
body.editing .editable:hover { background: color-mix(in srgb, var(--or) 12%, transparent); }
body.editing .editable:focus { outline: 2px solid var(--vin); background: var(--surface); }
#edit-bar { position: fixed; z-index: 70; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px); padding: 9px 10px 9px 14px; border-radius: 999px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow-lg); font-size: 13px; animation: itemIn .4s var(--ease) both; }
#edit-bar .eb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--or); animation: blink 1.4s ease-in-out infinite; flex: none; }
#edit-bar .eb-t { opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#edit-bar .btn { background: var(--surface); color: var(--ink); }
@media (max-width: 820px) { #edit-bar { bottom: 76px; } #edit-bar .eb-t { display: none; } }

/* Paramètres : contenu et apparence */
.ct-row { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.ct-row p { margin: 3px 0; font-size: 13px; color: var(--ink-2); }
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.col-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.col-row input[type="color"] { width: 46px; height: 46px; border: 0; padding: 0; border-radius: 12px; background: none; cursor: pointer; }
.col-row b { display: block; font-size: 13.5px; } .col-row small { font-size: 12px; color: var(--muted); }

.site-f { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 4px 14px; }
.site-f .field:has(textarea), .site-f .set-save { grid-column: 1 / -1; }

/* Choix de la police des titres */
.font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.font-card { text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.font-card:hover { transform: translateY(-2px); }
.font-card.on { border-color: var(--vin); box-shadow: 0 0 0 3px var(--vin-soft); }
.font-card .fc-s { font-size: 24px; font-weight: 700; color: var(--vin); margin-bottom: 6px; line-height: 1.1; }
.font-card b { font-size: 13.5px; } .font-card small { font-size: 12px; color: var(--muted); }
/* Police arrondie : on redresse ce qui était en italique et on resserre un peu */
body.font-alt h1, body.font-alt h2, body.font-alt .lede, body.font-alt .wm-b, body.font-alt .fam, body.font-alt .sec h2, body.font-alt .lp-sec-h h2, body.font-alt .empty, body.font-alt .credits, body.font-alt .article-sign { font-style: normal !important; letter-spacing: -.01em; }
body.font-alt .home-head h1, body.font-alt .lp-hero h1 { font-weight: 700; letter-spacing: -.02em; }

/* ================= Accueil plus vivant et coloré ================= */
.lp-hero { position: relative; isolation: isolate; }
.lp-hero::before { content: ""; position: absolute; z-index: -1; inset: -60px -80px -30px -80px; pointer-events: none; filter: blur(48px); opacity: .55;
  background:
    radial-gradient(38% 55% at 12% 35%, color-mix(in srgb, var(--vin) 55%, transparent), transparent 70%),
    radial-gradient(32% 45% at 88% 20%, color-mix(in srgb, var(--or) 50%, transparent), transparent 70%),
    radial-gradient(35% 50% at 62% 95%, color-mix(in srgb, var(--garonne) 45%, transparent), transparent 70%);
  animation: lpGlow 14s ease-in-out infinite alternate; }
@keyframes lpGlow { from { transform: translate(-10px, 0) scale(1); } to { transform: translate(14px, -8px) scale(1.06); } }
/* chaque bloc a sa couleur : passages = Garonne, ligne = or, carte = bordeaux */
.lp-grid3 .lp-card { --acc: var(--vin); position: relative; overflow: hidden; border-top: 4px solid var(--acc); }
.lp-grid3 .lp-card:nth-child(1) { --acc: var(--garonne); }
.lp-grid3 .lp-card:nth-child(2) { --acc: var(--or); }
.lp-grid3 .lp-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: color-mix(in srgb, var(--acc) 14%, transparent); pointer-events: none; }
.lp-grid3 .lp-card .q-ic { background: color-mix(in srgb, var(--acc) 20%, transparent); color: var(--acc); }
.lp-grid3 .lp-card .lp-link { color: var(--acc); }
.lp-go .q-ic { background: var(--vin); color: #fff; }
/* compteurs teintés */
.lp-mob-c { position: relative; overflow: hidden; }
.lp-mob-c.velo { background: linear-gradient(135deg, var(--ok-soft), var(--surface) 75%); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.lp-mob-c.pr { background: linear-gradient(135deg, color-mix(in srgb, #2b6fb5 22%, var(--surface)), var(--surface) 75%); border-color: color-mix(in srgb, #2b6fb5 40%, var(--line)); }
.lp-mob-c.tr { background: linear-gradient(135deg, var(--warn-soft), var(--surface) 75%); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.lp-mob-c .lp-mob-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); font-size: 24px; }
/* bande info trafic : fond chaud */
.lp-tr-sum { background: linear-gradient(120deg, var(--warn-soft), var(--surface) 55%); border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); }
/* titres de section : petit trait coloré */
.lp-sec-h h2 { position: relative; padding-left: 16px; }
.lp-sec-h h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px; border-radius: 4px; background: linear-gradient(var(--vin), var(--or)); }
/* actualités : cartes un peu plus vivantes */
.lp-news-g .news-card { border-top: 4px solid var(--or); }
@media (prefers-reduced-motion: reduce) { .lp-hero::before { animation: none; } }

/* ================= Listes de recherche sur téléphone ================= */
.res .t-city { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 1px; }
.res .t { overflow-wrap: anywhere; }
.res .badges { flex-wrap: wrap; row-gap: 3px; }
.q-sug, .it-sug { max-height: min(340px, 52vh); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.q-sug button { min-height: 46px; }
.q-sug .qs-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.q-sug .qs-t > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-sug .qs-t small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.q-sug .badges { flex: none; max-width: 45%; flex-wrap: wrap; justify-content: flex-end; row-gap: 3px; }
.qs-none { padding: 12px; font-size: 13.5px; color: var(--muted); }
.results { overscroll-behavior: contain; }
.it-sug .res, .results .res { min-height: 52px; }
@media (max-width: 820px) {
  /* évite le zoom automatique d'iOS sur les champs (police < 16 px) */
  input, select, textarea { font-size: 16px !important; }
  .it-sug { left: -6px; right: -6px; }
  .q-sug { left: -4px; right: -4px; }
  .it-sug .res, .q-sug button { padding-top: 10px; padding-bottom: 10px; }
}

/* ================= Remplacement de textes (dictionnaire) ================= */
.dico-f { display: grid; grid-template-columns: 1fr auto 1fr auto auto; gap: 8px; align-items: center; margin: 10px 0 12px; }
.dico-f input:not([type=checkbox]) { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; }
.dico-arrow { color: var(--muted); font-weight: 800; }
.dd-chk { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.dico-q { width: 100%; margin-bottom: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; }
.dico-ft { margin: 0; overflow-wrap: anywhere; } .dico-ft s { color: var(--muted); } .dico-ft span { color: var(--vin); font-weight: 800; }
.dico-row .btn + .btn { margin-left: 6px; }
@media (max-width: 720px) { .dico-f { grid-template-columns: 1fr; } .dico-arrow { display: none; } .dico-row { flex-wrap: wrap; } }
.dico-dlg { position: fixed; inset: 0; z-index: 9000; background: rgba(20, 10, 25, .45); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; animation: ddIn .18s ease-out; }
@keyframes ddIn { from { opacity: 0; } }
.dd-card { width: min(480px, 100%); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.dd-card h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; font-size: 18px; } .dd-card h3 svg { width: 20px; height: 20px; color: var(--vin); }
.dd-card > label:not(.dd-chk) { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dd-from { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-weight: 600; overflow-wrap: anywhere; }
.dd-card textarea { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; resize: vertical; }
.dd-card textarea:focus { outline: 2px solid var(--vin); outline-offset: 1px; }
.dd-card p { margin: 2px 0; font-size: 12.5px; }
.dd-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
/* pipette : on vise un texte */
body.dico-pick, body.dico-pick * { cursor: crosshair !important; }
body.dico-pick #view :is(button, a, label, span, b, small, p, h1, h2, h3, li, input):hover, body.dico-pick header :is(button, a, span, small):hover, body.dico-pick #ribbon *:hover, body.dico-pick .tabbar a:hover { outline: 2px dashed var(--or); outline-offset: 2px; border-radius: 6px; }
#edit-bar #eb-pick.primary { background: var(--or); border-color: var(--or); color: #2a1a00; }
#edit-bar .btn { white-space: nowrap; flex: none; }
@media (max-width: 820px) {
  #edit-bar { left: 12px; right: 12px; transform: none; max-width: none; justify-content: space-between; border-radius: 18px; padding: 8px 8px 8px 12px; }
  #edit-bar > b { flex: 1; min-width: 0; font-size: 12.5px; }
  #edit-bar .btn { padding: 7px 10px; font-size: 12.5px; }
}
/* téléphone : l'en-tête collant de la fiche est opaque (le texte ne transparaît plus dessous) */
@media (max-width: 820px) { #view .v-head.scrolled { background: var(--surface); } }
