:root {
  --bg: #e9ecee;
  --surface: #ffffff;
  --surface-2: #f4f6f7;
  --ink: #0f1a24;
  --ink-2: #4a5865;
  --ink-3: #7b8793;
  --line: #d3d9de;
  --accent: #d9480f;
  --accent-ink: #ffffff;
  --accent-soft: #fde8dc;
  --have: #17734f;
  --have-soft: #dcf2e8;
  --want: #3550c8;
  --want-soft: #e1e7fb;
  --shadow: 0 1px 2px rgba(15, 26, 36, .08), 0 6px 20px rgba(15, 26, 36, .10);
  --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ja: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --header-h: 58px;
  --sidebar-w: 340px;
  --drawer-w: 420px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11181f;
    --surface: #18222b;
    --surface-2: #1f2b36;
    --ink: #eef2f5;
    --ink-2: #aab6c1;
    --ink-3: #7f8c98;
    --line: #2b3946;
    --accent: #ff7a3d;
    --accent-ink: #1a0b03;
    --accent-soft: #3a2316;
    --have: #5fd3a2;
    --have-soft: #15382b;
    --want: #8fa6ff;
    --want-soft: #1e2a52;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }
/* La page elle-même ne défile jamais : seuls la colonne de gauche, la liste, les vues et la fiche défilent.
   Sur iPad et iPhone, overflow: hidden sur body ne suffit pas à bloquer le défilement si un bloc déborde. */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
[hidden] { display: none !important; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ja { font-family: var(--font-ja); }

/* ---------- header ---------- */
.top {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 1200;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--accent); }
.brand .lid { width: 34px; height: 34px; flex: none; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.brand:hover .lid { transform: rotate(90deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; color: var(--ink); }
.brand-text b { font: 700 19px/1.05 var(--font-display); letter-spacing: -.01em; }
.brand-text small { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.tabs { display: flex; gap: 4px; margin-left: 12px; background: var(--surface-2); padding: 3px; border-radius: 999px; }
.tabs button {
  border: 0; background: none; padding: 7px 16px; border-radius: 999px; font-weight: 500; color: var(--ink-2);
}
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--surface); }
.tabs button svg { display: none; width: 22px; height: 22px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; position: relative;
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; font-weight: 500;
}
.icon-btn svg { width: 18px; height: 18px; }
#btn-about { width: 36px; padding: 0; justify-content: center; }
.badge {
  min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  font: 600 11px/18px var(--font-body); text-align: center; font-style: normal; padding: 0 5px;
}
#btn-filters { display: none; }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; color: var(--ink-2); font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.seg.wide { display: flex; }
.seg.wide button { flex: 1; padding: 6px 4px; font-size: 13px; }

/* ---------- shell ---------- */
.shell {
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  position: relative;
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
/* Les filtres et la liste se partagent la hauteur de la colonne : sans cela le bloc prend la hauteur de ses
   1 368 lignes et fait déborder toute la page. */
.side-filters { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.side-head { padding: 12px 14px; display: flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--line); }
.search {
  flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 40px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
}
.search:focus-within { border-color: var(--accent); }
.search svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; height: 100%; }
.close-sheet { display: none; border: 0; background: none; font-size: 28px; line-height: 1; padding: 0 6px; color: var(--ink-2); }
.side-scroll { overflow: auto; padding: 4px 14px 12px; flex: 0 1 auto; max-height: 52%; border-bottom: 1px solid var(--line); }
.group { padding: 12px 0 4px; }
.group h3 { margin: 0 0 8px; font: 600 13px/1.2 var(--font-body); color: var(--ink-2); }
.hint { margin: -4px 0 8px; font-size: 12px; color: var(--ink-3); }
select {
  width: 100%; height: 38px; padding: 0 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 13px; line-height: 1.2;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.chip img { width: 16px; height: 16px; }
.chip small { color: var(--ink-3); font-size: 11px; }
.chip[aria-pressed="true"] small { color: inherit; opacity: .7; }
.themes .chip img { filter: none; }
@media (prefers-color-scheme: dark) { .themes .chip img { background: #fff; border-radius: 4px; padding: 1px; } }
.checks { display: grid; gap: 8px; padding-top: 14px; }
.checks label { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.checks input { width: 16px; height: 16px; accent-color: var(--accent); }
.link-btn { border: 0; background: none; color: var(--accent); font-weight: 600; padding: 10px 0 4px; }

.sheet-foot { display: none; }
.results { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.results-head b { font: 700 15px var(--font-display); white-space: nowrap; }
.results-head select { width: auto; height: 32px; font-size: 13px; }
.result-list { list-style: none; margin: 0; padding: 0 8px 12px; overflow: auto; flex: 1; }
.result-list li { margin: 0; }
.row {
  display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 6px; border: 0; background: none; border-radius: 10px;
}
.row:hover, .row[aria-current="true"] { background: var(--surface-2); }
.row img { width: 40px; height: 40px; border-radius: 50%; flex: none; background: var(--surface-2); }
.row .t { min-width: 0; flex: 1; }
.row .t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t span { display: block; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .d { font-size: 12px; color: var(--ink-3); flex: none; }
.state-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.state-dot.have { background: var(--have); }
.state-dot.want { background: var(--want); }

/* ---------- stage / views ---------- */
.stage { position: relative; min-width: 0; min-height: 0; }
.view { position: absolute; inset: 0; }
.map-view #map { position: absolute; inset: 0; background: #dfe6ea; }
.cards-view, .saved-view { overflow: auto; padding: 16px 20px 40px; }
.shell[data-view="cards"] .results,
.shell[data-view="saved"] .results { display: none; }
.shell[data-view="cards"] .side-scroll,
.shell[data-view="saved"] .side-scroll { max-height: none; flex: 1; border-bottom: 0; }

.map-ui { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; pointer-events: none; z-index: 800; }
.map-ui > * { pointer-events: auto; }
.map-mode { background: var(--surface); box-shadow: var(--shadow); border: 0; }
.fab {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow);
  display: grid; place-items: center;
}
.fab svg { width: 20px; height: 20px; }
.map-note {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 800; max-width: calc(100% - 24px);
  background: var(--ink); color: var(--surface); padding: 8px 14px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow);
}

/* ---------- grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 14px; }
.tile { position: relative; text-align: left; border: 0; background: none; padding: 0; border-radius: 10px; }
.tile .card-img {
  display: block; width: 100%; aspect-ratio: 116 / 160; object-fit: cover; border-radius: 6px; background: var(--surface-2);
  box-shadow: 0 1px 2px rgba(15, 26, 36, .15), 0 4px 14px rgba(15, 26, 36, .12);
  transition: transform .18s ease, box-shadow .18s ease;
}
.tile:hover .card-img { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(15, 26, 36, .18), 0 12px 24px rgba(15, 26, 36, .18); }
.tile.dim .card-img { filter: grayscale(.9) opacity(.55); }
.tile .cap { padding: 8px 2px 0; }
.tile .cap b { display: block; font-weight: 600; line-height: 1.2; }
.tile .cap span { display: block; font-size: 12px; color: var(--ink-2); margin-top: 1px; }
.tile .tag {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.tile .tag.have { background: var(--have); }
.tile .tag.want { background: var(--want); }
.sentinel { height: 1px; }
.empty { text-align: center; color: var(--ink-2); padding: 60px 20px; }
.empty .lid { width: 72px; height: 72px; color: var(--line); margin: 0 auto 12px; display: block; }
.empty b { display: block; color: var(--ink); font: 700 18px var(--font-display); margin-bottom: 4px; }

/* ---------- map markers ---------- */
.lid-marker { background: none; border: 0; }
.lid-marker .m {
  width: 100%; height: 100%; border-radius: 50%; background: #fff center / cover no-repeat; border: 2px solid var(--c, #fff);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}
.lid-marker.have .m { border-color: var(--have); }
.lid-marker.have::after, .lid-marker.want::after {
  content: ""; position: absolute; right: -2px; top: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff;
}
.lid-marker.have::after { background: var(--have); }
.lid-marker.want::after { background: var(--want); }
.lid-marker.pickup .m { border-radius: 10px; border-width: 3px; border-color: var(--accent); }
.lid-marker.active .m { transform: scale(1.35); box-shadow: 0 0 0 4px rgba(217, 72, 15, .35), 0 2px 8px rgba(0, 0, 0, .5); }
.lid-dot { background: none; border: 0; }
.lid-dot span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--c); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.lid-dot.pickup span { border-radius: 4px; background: var(--accent); }
.cluster { background: none; border: 0; }
.cluster span {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: #16222d; color: #fff;
  font: 700 13px var(--font-display); border: 2px dashed rgba(255, 255, 255, .55); box-shadow: 0 0 0 3px #16222d, 0 2px 8px rgba(0, 0, 0, .4);
}
.cluster.pickup span { background: var(--accent); box-shadow: 0 0 0 3px var(--accent), 0 2px 8px rgba(0, 0, 0, .4); }
.leaflet-tooltip.tip { font: 600 13px var(--font-body); border: 0; border-radius: 8px; padding: 5px 9px; box-shadow: var(--shadow); }
.me-dot { width: 16px; height: 16px; border-radius: 50%; background: #2b6cff; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(43, 108, 255, .25); }
.leaflet-control-zoom a { color: #0f1a24; }
@media (prefers-color-scheme: dark) { .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88); } .map-view #map { background: #1d2327; } }
.leaflet-container { font-family: var(--font-body); }

/* ---------- drawer ---------- */
.drawer {
  position: absolute; z-index: 1000; top: 0; bottom: 0; right: 0; width: var(--drawer-w); max-width: 100%;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: -8px 0 30px rgba(15, 26, 36, .12);
  overflow: auto; overscroll-behavior: contain; animation: slide-in .22s ease-out;
}
@keyframes slide-in { from { transform: translateX(24px); } to { transform: none; } }
.d-close {
  position: sticky; top: 10px; float: right; margin: 10px 10px 0 0; z-index: 3; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 22px; line-height: 1;
}
.d-hero { background: var(--surface-2); padding: 22px 20px 18px; display: flex; justify-content: center; }
.d-hero img { width: min(58%, 230px); aspect-ratio: 116/160; object-fit: cover; border-radius: 8px; box-shadow: 0 3px 8px rgba(15, 26, 36, .25), 0 18px 40px rgba(15, 26, 36, .22); background: var(--surface); }
.d-body { padding: 16px 20px 28px; }
.d-title { margin: 0; font: 700 26px/1.1 var(--font-display); letter-spacing: -.015em; }
.d-sub { margin: 4px 0 0; color: var(--ink-2); }
.d-ja { margin: 2px 0 0; color: var(--ink-3); font-size: 14px; }
.d-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.d-facts li { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; }
.d-facts li.rare { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.d-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border-radius: 10px; padding: 0 12px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 600; text-decoration: none; text-align: center;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.have[aria-pressed="true"] { background: var(--have); border-color: var(--have); color: #fff; }
.btn.want[aria-pressed="true"] { background: var(--want); border-color: var(--want); color: #fff; }
.btn.full { grid-column: 1 / -1; }
.btn.small { height: 32px; font-size: 13px; padding: 0 10px; border-radius: 8px; }
.d-sec { margin-top: 24px; }
.d-sec h4 { margin: 0 0 10px; font: 700 16px var(--font-display); }
.d-themes { display: flex; flex-wrap: wrap; gap: 6px; }
.d-themes .chip { cursor: pointer; }
.d-themes .chip img { width: 20px; height: 20px; background: #fff; border-radius: 4px; padding: 1px; }
.place { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: var(--surface); }
.place h5 { margin: 0; font: 600 15px/1.3 var(--font-ja); }
.place p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); }
.place .hours { color: var(--ink); }
.place .closed { color: var(--ink-2); }
.place .row-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.place .orig { font-family: var(--font-ja); font-size: 12.5px; color: var(--ink-3); }
.note { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }
.nearby { display: flex; gap: 10px; overflow: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.nearby button { flex: none; width: 92px; border: 0; background: none; text-align: left; scroll-snap-align: start; padding: 0; }
.nearby img { width: 92px; aspect-ratio: 116/160; object-fit: cover; border-radius: 6px; box-shadow: 0 1px 6px rgba(15, 26, 36, .25); background: var(--surface-2); }
.nearby b { display: block; font-size: 12.5px; line-height: 1.2; margin-top: 5px; }
.nearby span { font-size: 11.5px; color: var(--ink-3); }

/* ---------- saved ---------- */
.saved-wrap { max-width: 980px; margin: 0 auto; }
.hero-stat { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 8px; }
.ring { width: 120px; height: 120px; position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .pct { position: absolute; inset: 0; display: grid; place-items: center; font: 700 26px var(--font-display); }
.hero-stat h2 { margin: 0; font: 700 30px/1.1 var(--font-display); letter-spacing: -.02em; }
.hero-stat p { margin: 4px 0 0; color: var(--ink-2); }
.bars { display: grid; gap: 8px; margin: 22px 0 6px; }
.bar { display: grid; grid-template-columns: 130px 1fr 70px; gap: 12px; align-items: center; font-size: 13.5px; }
.bar .track { height: 10px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 5px; }
.bar .n { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.saved-h { margin: 30px 0 12px; font: 700 20px var(--font-display); }
.tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- modal / toast ---------- */
.modal { position: fixed; inset: 0; z-index: 3000; background: rgba(8, 14, 20, .55); display: grid; place-items: center; padding: 16px; }
.modal-card { position: relative; background: var(--surface); border-radius: 16px; max-width: 560px; width: 100%; max-height: 88dvh; overflow: auto; padding: 26px 26px 22px; box-shadow: var(--shadow); }
.modal-card .close-sheet { display: block; position: absolute; top: 10px; right: 12px; }
.modal-card h2 { margin: 0 0 10px; font: 700 26px/1.1 var(--font-display); letter-spacing: -.015em; }
.modal-card h3 { margin: 20px 0 6px; font: 700 15px var(--font-display); }
.modal-card p, .modal-card li { color: var(--ink-2); font-size: 14.5px; }
.modal-card ul { padding-left: 18px; margin: 6px 0; }
.modal-card a { color: var(--accent); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 4000;
  background: var(--ink); color: var(--surface); padding: 9px 16px; border-radius: 999px; font-size: 14px; transition: .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  :root { --header-h: 54px; }
  .top { gap: 8px; padding: 0 12px; }
  .brand-text b { font-size: 17px; white-space: nowrap; }
  .brand .lid { width: 30px; height: 30px; }
  .top-actions { gap: 6px; }
  .seg button { padding: 5px 10px; }
  .sheet-foot { display: block; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
  .sheet-foot .btn { width: 100%; }
  .map-mode button { padding: 7px 14px; }
  .brand-text small { display: none; }
  .tabs {
    position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); margin: 0; z-index: 1500;
    background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); justify-content: space-between; padding: 4px;
  }
  .tabs button { flex: 1; padding: 6px 2px 5px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; border-radius: 14px; }
  .tabs button svg { display: block; }
  .tabs { border-radius: 20px; }
  #btn-filters { display: inline-flex; }
  .icon-btn span { display: none; }
  .badge { position: absolute; top: -4px; right: -4px; }
  .shell { grid-template-columns: 1fr; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); }
  .sidebar {
    position: fixed; inset: 0; z-index: 2500; border: 0; transform: translateY(100%); transition: transform .25s ease; visibility: hidden;
  }
  .sidebar.open { transform: none; visibility: visible; }
  .side-scroll, .shell[data-view] .side-scroll { max-height: none; flex: 1; border-bottom: 0; }
  .results { display: none !important; }
  .close-sheet { display: block; }
  .cards-view, .saved-view { padding: 12px 14px 96px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px 10px; }
  .map-ui { bottom: auto; }
  .leaflet-bottom { bottom: 64px; }
  .drawer {
    top: auto; height: 84dvh; width: 100%; border-left: 0; border-radius: 18px 18px 0 0; z-index: 2000;
    animation: sheet-up .25s ease-out; padding-bottom: 80px;
  }
  @keyframes sheet-up { from { transform: translateY(40px); } to { transform: none; } }
  .shell[data-view="map"] .drawer { height: 60dvh; padding-bottom: 80px; }
  .d-hero { padding: 14px 20px 10px; }
  .d-hero img, .d-hero .ph.big { width: min(34%, 140px); }
  .shell:has(.drawer:not([hidden])) .map-note { display: none; }
  .bar { grid-template-columns: 96px 1fr 56px; }
  .map-note { bottom: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- visuel manquant ---------- */
.ph-thumb { width: 40px; height: 40px; border-radius: 50%; flex: none; background: var(--surface-2) center / cover; border: 1px dashed var(--line); }
.ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 10px;
  background: var(--surface-2); border: 1px dashed var(--line); color: var(--ink-3);
}
.ph i { display: block; width: 38%; max-width: 64px; }
.ph i svg { width: 100%; height: auto; color: var(--line); }
.ph em { font: normal 11.5px/1.25 var(--font-body); }
.tile .card-img.ph { aspect-ratio: 116 / 160; width: 100%; border-radius: 6px; box-shadow: none; }
.tile:hover .card-img.ph { transform: none; box-shadow: none; }
.d-hero .ph.big { width: min(58%, 230px); aspect-ratio: 116/160; border-radius: 8px; }
.nearby .ph { width: 92px; aspect-ratio: 116/160; border-radius: 6px; padding: 4px; }

/* la vue « ma collection » ignore les filtres */
.shell[data-view="saved"] { grid-template-columns: minmax(0, 1fr); }
.shell[data-view="saved"] .sidebar { display: none; }
body:has(.shell[data-view="saved"]) #btn-filters { display: none; }

/* ---------- carte : commandes ---------- */
.map-ui-left { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pill-toggle {
  border: 0; background: var(--surface); box-shadow: var(--shadow); border-radius: 999px; padding: 7px 14px; font-weight: 500; color: var(--ink-2);
}
.pill-toggle[aria-pressed="true"] { background: var(--have); color: #fff; }
.pill-toggle[aria-pressed="true"]::before { content: "✓ "; }
#map.trip-on .leaflet-marker-pane .lid-marker, #map.trip-on .leaflet-marker-pane .cluster { opacity: .3 !important; }
.shell[data-view="trip"] .map-ui-left { display: none; }
.stop-marker { background: none; border: 0; }
.stop-marker span {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--accent); color: #fff;
  font: 700 14px var(--font-display); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}
.stop-marker.done span { background: var(--have); }
.start-dot { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 5px solid var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }

/* ---------- tournée ---------- */
.trip-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.trip-scroll { overflow: auto; padding: 16px 16px 24px; }
.trip-h { margin: 0 0 6px; font: 700 22px/1.15 var(--font-display); letter-spacing: -.01em; }
.trip-panel .group h3 { margin-bottom: 6px; }
.group.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn.full-w { width: 100%; margin-top: 16px; height: 44px; font-size: 15px; }
.link-btn.inline { padding: 0; font-size: inherit; }
.trip-sum { margin: 18px 0 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); display: grid; gap: 6px; }
.trip-sum b { font: 600 14.5px/1.35 var(--font-body); }
.trip-sum small { color: var(--ink-2); font-size: 12.5px; }
.prog { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; display: block; }
.prog span { display: block; height: 100%; background: var(--have); border-radius: 3px; }
.stops { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.stops li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); position: relative; }
.stops .num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font: 700 13px var(--font-display); }
.stops .num.done { background: var(--have); }
.stop-card { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 2px 0; border-radius: 8px; }
.stop-card:hover b { text-decoration: underline; }
.stop-card img, .stop-card .ph-thumb { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.stop-card b { display: block; font-weight: 600; font-size: 14px; }
.stop-card small { color: var(--ink-2); font-size: 12px; }
.stops .where { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-2); }
.stops .leg { margin: 2px 0 0; font-size: 11.5px; color: var(--ink-3); }
.trip-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 6px; }

/* ---------- fiches : badge nouveau ---------- */
.tile .new {
  position: absolute; top: 6px; left: 6px; padding: 2px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font: 600 11px/1.5 var(--font-body); box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.place.hl { outline: 2px solid var(--accent); }
.d-hero .ph-big { width: min(58%, 230px); aspect-ratio: 116/160; border-radius: 8px; }
.nearby .nb-img { width: 92px; aspect-ratio: 116/160; object-fit: cover; border-radius: 6px; box-shadow: 0 1px 6px rgba(15, 26, 36, .25); background: var(--surface-2); display: flex; }
.nearby .nb-img.ph { padding: 4px; box-shadow: none; }
.nearby .nb-img.ph em { display: none; }
.d-actions { grid-template-columns: 1fr 1fr auto; }
.d-sec .row-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---------- collection : mosaïque et préfectures ---------- */
.saved-h small { color: var(--ink-3); font: 500 14px var(--font-body); }
.legend { display: inline-flex; gap: 6px; align-items: center; margin-left: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: inline-block; margin-left: 6px; }
.legend i.have { background: var(--have); }
.legend i.want { background: var(--want); }
.mosaic { display: grid; gap: 14px; margin-top: 10px; }
.mos-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 6px; }
.mos-head .dot { width: 10px; height: 10px; border-radius: 50%; }
.mos-head span { margin-left: auto; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mos { display: flex; flex-wrap: wrap; gap: 3px; }
.mos i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); cursor: pointer; transition: transform .12s; }
.mos i:hover { transform: scale(1.6); }
.mos i.have { background: var(--have); }
.mos i.want { background: var(--want); }
.mos i.pend { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.prefs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.pref {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; text-align: left; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
}
.pref:hover { border-color: var(--ink-3); }
.pref .pn b { display: block; font-weight: 600; font-size: 14px; }
.pref .pn span { font: 12px var(--font-ja); color: var(--ink-3); }
.pref .pc { font: 700 18px var(--font-display); align-self: start; }
.pref .pc small { font: 500 12px var(--font-body); color: var(--ink-3); }
.pref .track { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; display: block; }
.pref .fill { display: block; height: 100%; border-radius: 3px; }
.pref.done { border-color: var(--have); background: var(--have-soft); }

@media (max-width: 860px) {
  .map-ui { flex-wrap: wrap; }
  .pill-toggle { padding: 6px 12px; font-size: 13px; }
  .shell[data-view="trip"] .sidebar {
    top: auto; height: 52dvh; transform: none; visibility: visible; border-radius: 18px 18px 0 0; z-index: 1100;
    box-shadow: 0 -8px 30px rgba(15, 26, 36, .18); padding-bottom: 80px;
  }
  .shell[data-view="trip"] #btn-filters { display: none; }
  body:has(.shell[data-view="trip"]) #btn-filters { display: none; }
  .d-actions { grid-template-columns: 1fr 1fr; }
  .d-actions [data-act="share"] { grid-column: 1 / -1; }
  .mos i { width: 12px; height: 12px; }
}

@media (max-width: 400px) {
  .brand-text { display: none; }
  .top-actions { margin-left: auto; }
}

.lid-marker.nopick .m { filter: grayscale(.85) opacity(.6); }
.btn.ask { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.phrase { padding: 14px 0; border-bottom: 1px solid var(--line); }
.phrase .ja-big { margin: 0; font: 500 26px/1.4 var(--font-ja); color: var(--ink); }
.phrase .ro { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); font-style: italic; }
.phrase .tr { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }
