@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("vendor/fonts/atkinson-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("vendor/fonts/atkinson-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* ============ Couleurs système (inspirées d'iOS) ============ */
:root {
  --bg: #F2F2F7;             /* fond groupé */
  --surface: #FFFFFF;        /* cartes, cellules */
  --material: rgba(249, 249, 251, .84);  /* feuilles translucides */
  --text: #1C1C1E;
  --muted: #6E6E73;
  --tertiary: #AEAEB2;
  --line: rgba(60, 60, 67, .16);
  --fill: rgba(118, 118, 128, .12);      /* champ de recherche, pistes */
  --fill-strong: rgba(118, 118, 128, .2);
  --accent: #007AFF;
  --accent-soft: rgba(0, 122, 255, .12);
  --on-accent: #FFFFFF;
  --ok: #34C759;
  --fav: #FF9F0A;
  --danger: #FF3B30;
  --shadow-float: 0 2px 12px rgba(0, 0, 0, .12), 0 0 1px rgba(0, 0, 0, .2);
  --shadow-sheet: 0 -1px 0 rgba(0, 0, 0, .04), 0 -8px 30px rgba(0, 0, 0, .12);
  --map-bg: #F2EFE9;
  --rdv: #8944AB;
  --ok-text: #1E7B34;
  --warn-text: #A34700;
  --warn-bg: rgba(255, 149, 0, .16);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --top-zone: calc(var(--safe-top) + 64px);
}
html[data-theme="dark"] {
  --bg: #000000;
  --surface: #1C1C1E;
  --material: rgba(30, 30, 32, .86);
  --text: #F5F5F7;
  --muted: #98989F;
  --tertiary: #636366;
  --line: rgba(84, 84, 88, .55);
  --fill: rgba(118, 118, 128, .24);
  --fill-strong: rgba(118, 118, 128, .34);
  --accent: #0A84FF;
  --accent-soft: rgba(10, 132, 255, .2);
  --ok: #30D158;
  --fav: #FFD60A;
  --danger: #FF453A;
  --shadow-float: 0 2px 14px rgba(0, 0, 0, .5), 0 0 1px rgba(255, 255, 255, .12);
  --shadow-sheet: 0 -8px 30px rgba(0, 0, 0, .5);
  --map-bg: #1A1A1C;
  --rdv: #BF5AF2;
  --ok-text: #30D158;
  --warn-text: #FFB340;
  --warn-bg: rgba(255, 159, 10, .2);
}
html[data-theme="dark"] #map.invert-tiles .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.55); }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Atkinson Hyperlegible", -apple-system, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: .01em;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.sm { width: 18px; height: 18px; }
.ico.fill { fill: currentColor; stroke: none; }
.material { background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }

/* ============ Carte ============ */
#map { position: fixed; inset: 0; background: var(--map-bg); touch-action: none; }
.leaflet-container { font: inherit; background: var(--map-bg); }
.leaflet-top { top: var(--top-zone); }
.leaflet-top.leaflet-right { top: calc(var(--safe-top) + 12px); right: 66px; }
.leaflet-control-attribution { font-size: 10px; background: transparent !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--muted); }
.leaflet-gl-layer { z-index: 1; }

/* Éléments flottants (ville, commandes) */
.float {
  position: fixed; z-index: 600;
  background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow-float); color: var(--text); border: 0;
}
.city-pill {
  top: calc(var(--safe-top) + 10px); left: 12px;
  display: inline-flex; align-items: center; gap: 4px;
  height: 44px; padding: 0 12px 0 16px; border-radius: 22px;
  font-weight: 700; font-size: 19px;
}
.city-pill .ico { color: var(--muted); }
.ctrl {
  top: calc(var(--safe-top) + 10px); right: 12px;
  display: flex; flex-direction: column; border-radius: 14px; overflow: hidden;
}
.ctrl button { width: 46px; height: 46px; border: 0; background: none; display: flex; align-items: center; justify-content: center; color: var(--accent); }
.ctrl button.on .ico { fill: var(--accent); }
.ctrl-sep { height: 1px; background: var(--line); margin: 0 8px; }

/* ============ Feuille du bas (comme Plans) ============ */
.home {
  position: fixed; z-index: 500; left: 0; right: 0; bottom: 0;
  background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border-radius: 16px 16px 0 0; box-shadow: var(--shadow-sheet);
  padding: 0 0 calc(var(--safe-bottom) + 10px);
}
.floats-above { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 10px); display: flex; gap: 8px; pointer-events: none; }
.floats-above > * { pointer-events: auto; }
.chip-float {
  position: static; display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 14px; border-radius: 20px; font-weight: 700; font-size: 15px;
}
.chip-float .ico { color: var(--accent); }
.count-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--on-accent); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.grabber { display: block; width: 100%; height: 18px; border: 0; background: none; padding: 0; }
.grabber span { display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--tertiary); opacity: .6; margin: 6px auto 0; }
.home-head { display: flex; align-items: center; gap: 10px; padding: 2px 14px 10px; }
.search {
  flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0;
  background: var(--fill); color: var(--muted); border-radius: 12px; padding: 0 12px; height: 44px;
}
.search input { border: 0; outline: 0; flex: 1; min-width: 0; background: transparent; color: var(--text); font-size: 17px; padding: 0; }
.search input::placeholder { color: var(--muted); }
.round-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0;
  display: flex; align-items: center; justify-content: center; background: var(--fill); color: var(--accent);
}
.round-btn.accent { background: var(--accent); color: var(--on-accent); }
.round-btn.accent .ico { stroke-width: 2.4; }

.chips-row { display: flex; gap: 8px; padding: 0 14px; overflow-x: auto; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
#cuisines { margin-top: 8px; }
.mood {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 13px; border-radius: 18px; border: 0;
  background: var(--fill); color: var(--text); font-weight: 700; font-size: 15px; white-space: nowrap;
}
.mood .ico { width: 17px; height: 17px; color: var(--muted); }
.mood[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.mood[aria-pressed="true"] .ico { color: var(--on-accent); }
.mood.small { height: 32px; padding: 0 11px; font-size: 14px; }
.mood .n { opacity: .65; font-weight: 400; margin-left: 2px; }
.chip-sep { flex: none; width: 1px; background: var(--line); margin: 6px 2px; }

#homeBody { display: none; }
.home.expanded #homeBody { display: block; }
.shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px 14px 4px; }
.shortcuts button {
  display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: var(--surface);
  border-radius: 14px; padding: 12px 6px 10px; font-weight: 700; font-size: 14px; color: var(--text);
}
.sc-ico { width: 40px; height: 40px; border-radius: 50%; background: var(--c); color: #fff; display: flex; align-items: center; justify-content: center; }
.home-title { font-size: 19px; font-weight: 700; color: var(--text); margin: 14px 18px 8px; }
.cards { display: flex; gap: 10px; padding: 0 14px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.cards::-webkit-scrollbar { display: none; }
.card {
  flex: none; width: 240px; scroll-snap-align: start; border: 0; border-radius: 14px; overflow: hidden;
  background: var(--surface); text-align: left; padding: 10px; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.card-top {
  flex: none; width: 44px; height: 44px; border-radius: 10px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: var(--c); color: #fff;
}
.card-top .ico { width: 22px; height: 22px; stroke-width: 2; }
.card-top img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-txt { display: flex; flex-direction: column; min-width: 0; }
.card-txt .t { display: block; font-weight: 700; font-size: 16px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-txt .s { display: block; font-size: 15px; line-height: 1.3; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .note { background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 12px; padding: 0 6px; border-radius: 8px; }
.card.more { width: auto; justify-content: center; padding: 0 16px; font-weight: 700; font-size: 15px; color: var(--accent); }
.empty-cards { margin: 0 18px; color: var(--muted); font-size: 15px; }

/* ============ Marqueurs ============ */
.pin {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--c, #8E8E93); color: #fff; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35); position: relative;
}
.pin .ico { width: 17px; height: 17px; stroke-width: 2.1; }
.pin.done { opacity: .55; }
.pin.big { width: 38px; height: 38px; }
.pin.big .ico { width: 20px; height: 20px; }
.pin .badge {
  position: absolute; right: -5px; top: -5px; width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; border: 1.5px solid #fff; color: #fff;
}
.pin .badge .ico { width: 10px; height: 10px; stroke-width: 3; }
.pin .badge.ok { background: #34C759; }
.pin .badge.fav { background: #FF9F0A; }
.pin .badge.veg { background: #248A3D; top: auto; right: auto; left: -5px; bottom: -5px; }
.pin .badge.veg .ico { stroke-width: 2.6; }
.list .pin .badge.veg { display: none; }
/* Feuille verte à côté du nom : lieu végétarien */
.veg-mark { display: inline-flex; vertical-align: -0.12em; margin-left: .3em; color: #248A3D; }
.veg-mark .ico { width: .9em; height: .9em; stroke-width: 2.6; }
html[data-theme="dark"] .veg-mark { color: #30D158; }
.pin.selected { transform: scale(1.35); box-shadow: 0 2px 10px rgba(0, 0, 0, .35); z-index: 1000; }
.leaflet-marker-icon.pin-wrap { background: none; border: 0; }
.cluster {
  border-radius: 50%; background: #fff; color: #1C1C1E; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .3); border: 3px solid var(--accent);
}
html[data-theme="dark"] .cluster { background: #2C2C2E; color: #F5F5F7; }
.step-pin {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff;
  border: 2px solid #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #007AFF; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(0, 122, 255, .2), 0 1px 4px rgba(0, 0, 0, .3); }

/* ============ Viseur ============ */
.crosshair { position: fixed; z-index: 450; left: 50%; top: 50%; transform: translate(-50%, -100%); pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.crosshair svg { display: block; }
.placebar {
  position: fixed; z-index: 950; left: 12px; right: 12px; bottom: calc(var(--safe-bottom) + 12px);
  background: var(--material); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-radius: 16px; box-shadow: var(--shadow-float); padding: 14px 16px;
}
.placebar p { margin: 0 0 12px; font-weight: 700; }
body.placing .home, body.placing .ctrl { display: none; }

/* ============ Feuilles (fiche, journée, carnet…) ============ */
.backdrop { position: fixed; z-index: 700; inset: 0; background: rgba(0, 0, 0, .2); }
.sheet {
  position: fixed; z-index: 800; left: 0; right: 0; bottom: 0;
  max-height: calc(100vh - var(--safe-top) - 24px);
  max-height: calc(100dvh - var(--safe-top) - 24px);
  background: var(--bg); border-radius: 14px 14px 0 0; box-shadow: var(--shadow-sheet);
  display: flex; flex-direction: column; overflow: hidden;
  animation: up .28s cubic-bezier(.2, .9, .3, 1);
}
@keyframes up { from { transform: translateY(60px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet::before { content: ""; display: block; flex: none; height: 52px; }
.sheet.has-hero::before { display: none; }
.sheet.half:not(.has-hero)::before { height: 24px; }
.sheet-grabber { position: absolute; z-index: 3; top: 6px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--tertiary); opacity: .6; cursor: pointer; }
.sheet-grabber::after { content: ""; position: absolute; inset: -12px -30px; } /* zone de toucher plus grande */
/* Fiche d'un lieu à mi-hauteur : la carte reste visible au-dessus */
.sheet.half { max-height: 56vh; max-height: 56dvh; transition: max-height .25s ease; }
.sheet { transition: max-height .25s ease; }
.sheet-close {
  position: absolute; right: 14px; top: 12px; z-index: 3;
  width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: var(--fill-strong); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.sheet.has-hero .sheet-close { background: rgba(0, 0, 0, .45); color: #fff; }
.sheet-close .ico { width: 16px; height: 16px; stroke-width: 2.4; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 16px calc(var(--safe-bottom) + 28px); }
.sheet-title { position: absolute; left: 18px; top: 14px; margin: 0; font-size: 22px; font-weight: 700; }
@media (min-width: 720px) {
  .sheet.half { max-height: none; }
  .sheet { left: auto; right: 16px; top: calc(var(--safe-top) + 16px); bottom: 16px; width: 420px; max-height: none; border-radius: 14px; }
}

h2 { font-size: 24px; line-height: 1.25; margin: 0 0 4px; }
h3, .group-title { font-size: 19px; font-weight: 700; margin: 24px 4px 8px; color: var(--text); }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }

/* --- Fiche d'un lieu --- */
.hero { position: relative; margin: 0 -16px 14px; height: 240px; background: #2C2C2E; overflow: hidden; }
.hero button { display: block; width: 100%; height: 100%; border: 0; padding: 0; background: none; }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero .hero-n { position: absolute; left: 12px; bottom: 10px; background: rgba(0, 0, 0, .5); color: #fff; font-size: 15px; font-weight: 700; padding: 3px 10px; border-radius: 10px; pointer-events: none; }
.place-head { padding: 0 44px 0 2px; }
.sheet.has-hero .place-head { padding-right: 2px; }
.place-title { font-size: 26px; line-height: 1.2; margin: 0; }
.place-sub { margin: 4px 0 0; color: var(--muted); font-size: 16px; }
.place-sub .cat { color: var(--c); font-weight: 700; }
html[data-theme="dark"] .place-sub .cat { color: color-mix(in srgb, var(--c) 70%, white); }
.reco { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 15px; color: var(--text); background: var(--fill); border-radius: 10px; padding: 5px 10px; }
.reco .ico { width: 15px; height: 15px; color: var(--fav); fill: currentColor; stroke: none; }
.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 6px; }
.action {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 54px; padding: 8px 4px; border-radius: 12px; border: 0; flex-direction: row; gap: 6px;
  background: var(--surface); color: var(--accent); font-weight: 700; font-size: 15px; text-decoration: none; text-align: center; line-height: 1.15;
}
.action.primary { background: var(--accent); color: var(--on-accent); }
.action.on { background: var(--accent-soft); }
.action .ico { width: 22px; height: 22px; }
.travel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.travel a.primary { background: var(--accent); color: var(--on-accent); }
.travel a.primary .ico, .travel a.primary span { color: var(--on-accent); }
.travel a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px;
  background: var(--surface); color: var(--text); text-decoration: none; text-align: center; line-height: 1.2;
}
.travel .ico { width: 20px; height: 20px; color: var(--accent); }
.travel b { font-size: 16px; white-space: nowrap; }
.travel span { font-size: 15px; color: var(--muted); }
.travel-from { font-size: 15px; color: var(--muted); margin: 8px 4px 0; line-height: 1.35; }

/* Listes groupées (style Réglages / Plans) */
.group { background: var(--surface); border-radius: 12px; overflow: hidden; }
.group.pad { padding: 14px; }
.group + .group { margin-top: 10px; }
.cell { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; position: relative; }
.cell + .cell::before { content: ""; position: absolute; top: 0; left: 48px; right: 0; height: 1px; background: var(--line); }
.cell > .ico { color: var(--muted); margin-top: 1px; }
.cell .val { flex: 1; min-width: 0; word-break: break-word; }
.cell a { color: var(--accent); text-decoration: none; }
.cell .small { display: block; font-size: 15px; color: var(--muted); margin-top: 2px; }
.cell .small a { font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--fill); border-radius: 8px; padding: 2px 9px; font-size: 15px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 700; padding: 2px 9px; border-radius: 8px; }
.pill.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.pill.warn { color: #C93400; background: rgba(255, 149, 0, .16); }
html[data-theme="dark"] .pill.warn { color: #FF9F0A; }
.reco-line { display: none; }

/* Contrôle segmenté (iOS) */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; border-radius: 10px; background: var(--fill); }
.seg button {
  min-height: 40px; border-radius: 8px; border: 0; background: transparent; color: var(--text);
  font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.seg button .ico { width: 17px; height: 17px; }
.seg button .ic { font-size: 15px; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
html[data-theme="dark"] .seg button[aria-pressed="true"] { background: #636366; }
.seg button[data-status="fait"][aria-pressed="true"] { color: var(--ok); }
.seg button[data-status="favori"][aria-pressed="true"] { color: var(--fav); }
.seg button[data-status="favori"][aria-pressed="true"] .ico { fill: currentColor; }

/* Note sur 10 */
.rating { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rating .value { font-size: 30px; font-weight: 700; text-align: center; flex: 1; }
.rating .value small { font-size: 17px; color: var(--muted); font-weight: 400; }
.round { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--fill); color: var(--accent); font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* Boutons */
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 0; }
.stack { display: grid; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 10px 16px; border-radius: 12px; border: 0;
  background: var(--surface); font-weight: 700; font-size: 17px; text-decoration: none; color: var(--accent); text-align: center;
}
.btn:active, .action:active, .mood:active, .card:active { opacity: .7; }
.btn .ico { width: 20px; height: 20px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-danger { color: var(--danger); }
.btn-small { min-height: 40px; font-size: 15px; padding: 6px 12px; }
.linkish { background: none; border: 0; color: var(--accent); font-weight: 700; font-size: 15px; padding: 8px 0; text-decoration: none; }

/* Champs */
label.field { display: block; margin-top: 16px; }
label.field > span, .field-label { display: block; font-weight: 700; margin: 0 4px 6px; font-size: 15px; color: var(--muted); }
input[type=text], input[type=url], input[type=date], input[type=time], .sheet input[type=search], select.input, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px;
  border: 0; background: var(--surface); color: var(--text); font-size: 17px;
}
.group input[type=date], .group textarea, .group input[type=text] { background: var(--fill); }
html[data-theme="dark"] input[type=date], html[data-theme="dark"] input[type=time] { color-scheme: dark; }
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
details.more-fields { margin-top: 18px; }
details.more-fields summary { font-weight: 700; color: var(--accent); min-height: 44px; display: flex; align-items: center; cursor: pointer; }

.dishes { list-style: none; padding: 0; margin: 0 0 10px; }
.dishes li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.dishes li span { flex: 1; }
.dishes button { border: 0; background: none; width: 40px; height: 40px; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.add-line { display: flex; gap: 8px; }
.add-line input { flex: 1; min-width: 0; }
.add-line .btn { flex: none; }

/* Grilles de choix */
.chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chip {
  display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 8px 12px; border-radius: 12px;
  border: 2px solid transparent; background: var(--surface); color: var(--text); font-weight: 700; font-size: 15px; text-align: left;
}
.cats3 .chip { flex-direction: column; justify-content: center; gap: 4px; text-align: center; padding: 8px 4px; font-size: 14px; }
.chip .ico { width: 20px; height: 20px; color: var(--c, var(--accent)); }
.chip .n { margin-left: auto; color: var(--muted); font-weight: 400; }
.chip[aria-pressed="true"] { border-color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 10%, var(--surface)); }
.chips .chip[aria-pressed="false"] { opacity: .55; }

/* Listes */
.list { list-style: none; padding: 0; margin: 10px 0 0; background: var(--surface); border-radius: 12px; overflow: hidden; }
.list:empty { display: none; }
.list li > button {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; color: var(--text);
  padding: 10px 14px; border: 0; background: none; position: relative;
}
.list li + li > button::before { content: ""; position: absolute; top: 0; left: 58px; right: 0; height: 1px; background: var(--line); }
.list .pin { flex: none; width: 32px; height: 32px; border-width: 0; box-shadow: none; }
.list .t { font-weight: 700; display: block; line-height: 1.3; }
.list .s { color: var(--muted); font-size: 15px; display: block; }
.results { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 12px; overflow: hidden; }
.results li + li { border-top: 1px solid var(--line); }
.results button { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; border: 0; background: none; padding: 12px 14px; color: var(--text); }
.results .ico { color: var(--c, var(--muted)); }
.results .t { display: block; font-size: 17px; font-weight: 700; line-height: 1.3; }
.results .s { display: block; font-size: 15px; color: var(--muted); }

/* Ma journée */
.steps { list-style: none; margin: 8px 0 0; padding: 0; }
.step { display: flex; gap: 12px; }
.step-rail { display: flex; flex-direction: column; align-items: center; }
.step-num { width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; flex: none; }
.step-line { flex: 1; width: 2px; background: var(--line); margin: 4px 0; }
.step-card { flex: 1; min-width: 0; background: var(--surface); border-radius: 12px; padding: 10px 12px; margin-bottom: 4px; }
.step-card .t { font-size: 17px; font-weight: 700; line-height: 1.3; }
.step-card .s { font-size: 15px; color: var(--muted); }
.step-tools { display: flex; gap: 6px; margin-top: 8px; }
.step-tools button { width: 40px; height: 34px; border-radius: 8px; border: 0; background: var(--fill); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.step-tools .ico { width: 18px; height: 18px; }
.walk { padding: 2px 0 8px 42px; font-size: 15px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.walk .ico { width: 16px; height: 16px; }

/* Carnet */
.city-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.city-card { text-align: left; border: 0; background: var(--surface); color: var(--text); border-radius: 12px; padding: 12px 14px; }
.city-card[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.city-card .t { display: block; font-size: 19px; font-weight: 700; }
.city-card .s { display: block; font-size: 14px; opacity: .8; }
.top3 { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 12px; overflow: hidden; }
.top3 li + li { border-top: 1px solid var(--line); }
.top3 button { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 0; background: none; color: var(--text); text-align: left; }
.top3 .rk { font-size: 20px; font-weight: 700; width: 22px; color: var(--fav); }
.top3 .t { flex: 1; font-weight: 700; }
.month { font-size: 16px; font-weight: 700; color: var(--muted); margin: 14px 4px 6px; }
.note-box { background: var(--surface); border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.note-box p { display: flex; align-items: center; gap: 8px; }
.note-box .ico { color: var(--muted); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand svg { width: 60px; height: 60px; border-radius: 14px; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }

/* Critères en étoiles */
.crits { margin-top: 8px; }
.crit { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.crit-label { font-weight: 700; font-size: 15px; }
.stars { display: flex; gap: 0; }
.stars button { width: 36px; height: 40px; border: 0; background: none; padding: 0; color: var(--tertiary); display: flex; align-items: center; justify-content: center; }
.stars button .ico { width: 24px; height: 24px; }
.stars button[aria-pressed="true"] { color: var(--fav); }
.stars button[aria-pressed="true"] .ico { fill: currentColor; }

/* Photos */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photos .muted { grid-column: 1 / -1; margin: 0; }
.thumb { aspect-ratio: 1; border: 0; padding: 0; border-radius: 10px; overflow: hidden; background: var(--fill); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.viewer { position: fixed; inset: 0; z-index: 1000; background: #000; display: flex; align-items: center; justify-content: center; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-top { position: absolute; top: calc(var(--safe-top) + 12px); left: 16px; right: 16px; display: flex; align-items: center; justify-content: space-between; }
.viewer-n { color: #fff; font-weight: 700; background: rgba(255, 255, 255, .15); padding: 5px 12px; border-radius: 12px; }
.viewer-bar { position: absolute; left: 12px; right: 12px; bottom: calc(var(--safe-bottom) + 14px); display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 8px; }
.viewer-bar .btn { padding: 10px 6px; font-size: 16px; background: rgba(255, 255, 255, .15); color: #fff; }
.viewer-bar .btn-danger { color: #FF453A; }
.viewer-bar .btn:disabled { opacity: .35; }
.viewer .round { background: rgba(255, 255, 255, .15); color: #fff; width: 40px; height: 40px; }

.toast {
  position: fixed; z-index: 1100; left: 50%; transform: translateX(-50%);
  top: calc(var(--safe-top) + 64px);
  background: var(--material); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  color: var(--text); padding: 10px 18px; border-radius: 22px;
  font-weight: 700; font-size: 15px; box-shadow: var(--shadow-float); max-width: calc(100% - 32px); text-align: center;
}

/* ============ Horaires d'ouverture ============ */
.oh { font-weight: 700; }
.oh.open { color: var(--ok); }
html:not([data-theme="dark"]) .oh.open { color: #248A3D; }
.oh.closing { color: #C93400; }
html[data-theme="dark"] .oh.closing { color: #FF9F0A; }
.oh.closed { color: var(--danger); }
html:not([data-theme="dark"]) .oh.closed { color: #D70015; }
.place-oh { margin: 6px 0 0; font-size: 16px; color: var(--muted); }
.oh-details summary { cursor: pointer; list-style: none; color: var(--muted); }
.oh-details summary::-webkit-details-marker { display: none; }
.oh-details summary::after { content: " Voir la semaine"; color: var(--accent); font-weight: 700; font-size: 15px; }
.oh-details[open] summary::after { content: " Masquer"; }
.week { border-collapse: collapse; margin: 8px 0 2px; font-size: 16px; }
.week th { text-align: left; font-weight: 400; color: var(--muted); padding: 2px 14px 2px 0; vertical-align: top; }
.week td { padding: 2px 0; }
.week tr.today th, .week tr.today td { font-weight: 700; color: var(--text); }
.step-oh { margin-top: 6px; font-size: 15px; color: var(--muted); }
.hint { margin: 12px 4px 0; font-size: 15px; color: var(--muted); }
.mood.open-now .ico { color: var(--ok); }
.mood.open-now[aria-pressed="true"] { background: #248A3D; }
html[data-theme="dark"] .mood.open-now[aria-pressed="true"] { background: #30D158; color: #000; }
.mood.open-now[aria-pressed="true"] .ico { color: inherit; }
.card-txt .s .oh { font-weight: 700; }
.save-chip { margin-left: auto; color: var(--accent); }

/* Noms des lieux à côté des points, quand on est zoomé de près */
.pin-label { display: none; }
#map.labels .pin-label {
  display: block; position: absolute; left: calc(100% + 5px); top: 50%; transform: translateY(-50%);
  white-space: nowrap; font-size: 14px; font-weight: 700; color: #1C1C1E; pointer-events: none;
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff, 0 0 4px #fff;
}
html[data-theme="dark"] #map.labels .pin-label { color: #F5F5F7; text-shadow: 0 0 2px #000, 0 0 2px #000, 0 0 3px #000, 0 0 4px #000; }
.pin.done .pin-label, .pin.ended .pin-label { opacity: 1; }
.pin.ended { filter: grayscale(1); opacity: .45; }
.oh.soon { color: var(--accent); }
.oh.ended { color: var(--muted); }
.oh.last { color: #C93400; }
html[data-theme="dark"] .oh.last { color: #FF9F0A; }
.oh.running { color: var(--text); font-weight: 400; }
.action { gap: 5px; padding: 8px 2px; }
.action span { white-space: nowrap; }
.chip-float { white-space: nowrap; }
.btn.cur8 { margin-top: 10px; width: 100%; text-decoration: none; background: var(--surface); color: var(--text); }
.btn.cur8 .ico { color: #5856D6; }

/* ============ Mon séjour ============ */
.trip-legs .lbl, .card2 .lbl { display: block; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.trip-legs strong { display: block; font-size: 17px; margin-top: 2px; }
.trip-legs .pill .ico { width: 14px; height: 14px; }
.list.days .dnum { flex: none; width: 44px; text-align: center; line-height: 1.1; }
.list.days .dw { display: block; font-size: 13px; font-weight: 700; color: #C93400; }
.list.days .dd { display: block; font-size: 22px; font-weight: 700; }
.list.days li > button > .ico { color: var(--tertiary); width: 18px; height: 18px; }
.list .warn-txt { color: var(--warn-text); font-weight: 700; }
.list .go-day { flex: none; font-size: 14px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 6px 10px; border-radius: 14px; }
.dayseg { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-top: 10px; }
.dayseg::-webkit-scrollbar { display: none; }
.dayseg button { flex: 1 0 auto; min-width: 76px; min-height: 46px; border-radius: 12px; border: 0; background: var(--surface); color: var(--text); font-weight: 700; font-size: 16px; }
.dayseg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.tl { list-style: none; margin: 14px 0 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 50px 14px minmax(0, 1fr); column-gap: 10px; }
.tl .tm { text-align: right; font-weight: 700; font-size: 16px; padding-top: 12px; font-variant-numeric: tabular-nums; }
.tl .tm.none { color: var(--muted); font-weight: 400; font-size: 14px; }
.tl .rail { display: flex; flex-direction: column; align-items: center; }
.tl .ln { flex: 1; width: 2px; background: var(--line); }
.tl .ln.top { flex: none; height: 16px; }
.tl .ln.off { visibility: hidden; }
.tl .dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--accent)); }
.tl .dot.sq { border-radius: 3px; }
.tl .card2 { background: var(--surface); border-radius: 12px; padding: 10px 12px; margin: 4px 0; min-width: 0; }
.tl .card2.plain { background: none; padding: 9px 0; }
.tl .card2.rdv { background: color-mix(in srgb, var(--rdv) 12%, var(--surface)); }
.tl .rdv-lbl { color: var(--rdv); display: flex; align-items: center; gap: 5px; margin-bottom: 2px; }
.tl .rdv-lbl .ico { width: 14px; height: 14px; }
.tl .t-btn { all: unset; cursor: pointer; display: block; }
.tl .t { display: block; font-size: 17px; font-weight: 700; line-height: 1.3; }
.tl .s { display: block; font-size: 15px; color: var(--muted); }
.tl li.gap .gtxt { font-size: 15px; color: var(--muted); display: flex; align-items: center; gap: 6px; padding: 6px 0; }
.tl li.gap .gtxt .ico { width: 16px; height: 16px; flex: none; }
.tl .step-tools { flex-wrap: wrap; }
.tl .shift { display: block; margin-top: 8px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 20px; font-weight: 700; font-size: 15px; color: var(--warn-text); background: var(--warn-bg); }
.plan-head { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: 12px; padding: 12px; }
.plan-head .pin { flex: none; border-width: 0; box-shadow: none; }
.plan-head .t { display: block; font-weight: 700; font-size: 17px; line-height: 1.3; }
.plan-head .s { display: block; font-size: 15px; color: var(--muted); }
.chk { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: 15px; font-weight: 700; color: var(--muted); }
.chk .ico { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.chk.ok { color: var(--ok-text); }
.chk.warn { color: var(--warn-text); }
#ppCheck .chk { font-size: 16px; }
