:root {
  --night: #08111c;
  --night2: #0f2233;
  --cream: #fbf6ec;
  --paper: #fffdf8;
  --ink: #15241d;
  --muted: #5f6b63;
  --line: #e9dfca;
  --green: #1f4d3a;
  --green2: #2f6e52;
  --red: #c8452b;
  --sun: #e9b23a;
  --sun-ink: #3a2a00;
  --hud-h: 98px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "DejaVu Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--night);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--green2); }
svg { display: block; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ ciel */
#sky {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at 50% 38%, #16324a 0%, #0b1a29 45%, #060d16 100%);
}
#sky::after {
  content: ""; position: absolute; inset: 0; opacity: .7;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 85% 34%, #ffeebb 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 72%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 88%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 8% 55%, #cfe8ff 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 70%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 44% 6%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 22% 92%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 48%, #fff 50%, transparent 51%);
}
#globe { position: fixed; left: 0; right: 0; top: 0; height: 100dvh; touch-action: none; }

/* ------------------------------------------------------------- top bar */
.topbar {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(var(--safe-t) + 10px) 14px 10px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand {
  border: 0; background: rgba(8, 17, 28, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-radius: 14px; padding: 7px 12px; text-align: left; color: #fff;
  display: flex; flex-direction: column; line-height: 1.15;
}
.brand-title { font-family: var(--serif); font-weight: 700; font-size: 19px; letter-spacing: .01em; }
.brand-sub { font-size: 11.5px; color: #c7d6cf; }
.topbar-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 13px; border: 0;
  display: grid; place-items: center;
  background: rgba(8, 17, 28, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.icon-btn svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 2; stroke-linecap: round; fill: #fff; }
.icon-btn svg path, .icon-btn svg circle[fill="none"] { fill: none; }
.icon-btn.dark { background: #efe7d6; }
.icon-btn.dark svg { stroke: var(--ink); }
.icon-btn:active { transform: scale(.95); }

/* --------------------------------------------------------------- toast */
.toast {
  position: fixed; z-index: 60; left: 50%; top: calc(var(--safe-t) + 66px); transform: translate(-50%, -8px);
  background: rgba(8, 17, 28, .86); color: #fff; padding: 8px 14px; border-radius: 12px; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ----------------------------------------------------------------- pins */
.pin { position: relative; pointer-events: auto; cursor: pointer; transform: translate(-50%, -50%); }
.pin-dot {
  width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2.5px solid var(--green);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}
.pin[data-region="sud"] .pin-dot { border-color: var(--red); }
.pin[data-region="centre"] .pin-dot { border-color: #b98710; }
.pin[data-region="nord"] .pin-dot { border-color: var(--green2); }
.pin.current .pin-dot { background: var(--sun); width: 16px; height: 16px; box-shadow: 0 0 0 5px rgba(233, 178, 58, .35); }
.pin-label {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  white-space: nowrap; font-size: 12.5px; font-weight: 650; color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 8px rgba(0, 0, 0, .6);
  padding: 1px 4px; transition: opacity .2s;
}
.pin.current .pin-label { font-size: 14px; color: #ffe39a; }
.pin.nolabel .pin-label { opacity: 0; }
.pin.hidden { display: none; }
/* zone de toucher élargie */
.pin::before { content: ""; position: absolute; left: -16px; top: -16px; width: 44px; height: 44px; }

.place-pin { transform: translate(-50%, -100%); pointer-events: auto; cursor: pointer; }
.place-pin .pp {
  min-width: 28px; height: 28px; padding: 0 6px; border-radius: 14px 14px 14px 3px; transform: rotate(-45deg);
  background: var(--red); border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .4);
  display: grid; place-items: center;
}
.place-pin .pp span { transform: rotate(45deg); color: #fff; font-weight: 800; font-size: 12.5px; }
.place-pin[data-kind="dormir"] .pp { background: #2b6fa8; }
.place-pin[data-kind="manger"] .pp, .place-pin[data-kind="sortir"] .pp { background: #b5631e; }
.place-pin[data-kind="nature"] .pp, .place-pin[data-kind="plage"] .pp, .place-pin[data-kind="route"] .pp { background: var(--green2); }
.place-pin[data-kind="moto"] .pp { background: #3a3a3a; }
.place-pin.active .pp { background: var(--sun); transform: rotate(-45deg) scale(1.2); }
.place-pin.active .pp span { color: var(--sun-ink); }
.place-pin .pp-name {
  position: absolute; left: 50%; bottom: 38px; transform: translateX(-50%);
  background: var(--paper); color: var(--ink); font-size: 12.5px; font-weight: 650; white-space: nowrap;
  padding: 4px 9px; border-radius: 10px; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); display: none;
}
.place-pin.active .pp-name { display: block; }
.place-pin.hidden { display: none; }
.me-pin { transform: translate(-50%, -50%); width: 18px; height: 18px; border-radius: 50%; background: #2f8cff; border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(47, 140, 255, .25); }

/* ------------------------------------------------------------- véhicule */
.vehicle {
  position: fixed; z-index: 15; left: 0; top: 0; width: 46px; height: 46px; margin: -38px 0 0 -23px;
  pointer-events: none; will-change: transform; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .55));
  transition: opacity .3s;
}
.vehicle .v-inner { width: 100%; height: 100%; transition: transform .2s; }
.vehicle.flip .v-inner { transform: scaleX(-1); }
.vehicle svg { width: 100%; height: 100%; }
.vehicle.idle { animation: bob 2.4s ease-in-out infinite; }
.vehicle.away { visibility: hidden; }
@keyframes bob { 50% { margin-top: -41px; } }

/* ---------------------------------------------------------------- sheet */
.sheet {
  position: fixed; z-index: 25; left: 0; right: 0; bottom: 0;
  height: calc(100dvh - var(--safe-t) - 64px);
  background: var(--cream); border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .35);
  display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
  padding-bottom: calc(var(--hud-h) + 20px + var(--safe-b));
}
.sheet[data-state="half"] { transform: translateY(calc(100% - var(--half-h, 56dvh))); }
.sheet[data-state="full"] { transform: translateY(0); }
.sheet.dragging { transition: none; }
.sheet-grip { padding: 10px 0 4px; display: grid; place-items: center; touch-action: none; cursor: grab; }
.sheet-grip span { width: 44px; height: 5px; border-radius: 3px; background: #cdbfa3; }
.sheet-head { padding: 2px 18px 8px; touch-action: none; }
.sh-kicker { font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.sh-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sh-title { font-family: var(--serif); font-size: 25px; line-height: 1.1; color: var(--green); margin: 2px 0 0; }
.sh-close { flex: none; }
.facts { display: flex; gap: 6px; overflow-x: auto; padding: 8px 18px 2px; margin: 0 -18px; scrollbar-width: none; }
.facts::-webkit-scrollbar { display: none; }
.fact { flex: none; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 5px 10px; font-size: 12px; line-height: 1.25; }
.fact b { display: block; color: var(--green); font-size: 13px; }
.fact span { color: var(--muted); }

.tabs { display: flex; gap: 4px; padding: 4px 14px 8px; border-bottom: 1px solid var(--line); }
.tabs button {
  flex: 1; border: 0; background: transparent; padding: 9px 4px; border-radius: 12px; font-weight: 650; font-size: 14px; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.tabs button[aria-selected="true"] { background: var(--green); color: #fff; }
.badge { background: var(--sun); color: var(--sun-ink); font-size: 11px; font-weight: 800; border-radius: 10px; padding: 0 6px; line-height: 17px; }
.badge:empty { display: none; }
.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 14px 30px; overscroll-behavior: contain; }

.intro { font-size: 15px; margin: 0 4px 14px; color: #2c3a33; }
.section-title { font-family: var(--serif); color: var(--green); font-size: 18px; margin: 18px 4px 8px; }
.section-title:first-child { margin-top: 2px; }

/* cartes lieux */
.place {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 12px;
  scroll-margin-top: 10px; transition: box-shadow .2s, border-color .2s;
}
.place.active { border-color: var(--sun); box-shadow: 0 0 0 3px rgba(233, 178, 58, .35); }
.place-media { position: relative; height: 150px; background: #e4ddcc; overflow: hidden; }
.place-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.place-media.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.place-media .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.place-media .ph svg { width: 56px; height: 56px; opacity: .85; }
.place-media .credit { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 6px; }
.place-num {
  position: absolute; left: 10px; top: 10px; min-width: 28px; height: 28px; border-radius: 14px; padding: 0 8px;
  background: var(--red); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; border: 2px solid #fff;
}
.place-body { padding: 11px 14px 13px; }
.place h3 { margin: 0 0 2px; font-family: var(--serif); font-size: 17.5px; color: var(--green); line-height: 1.2; }
.kind { font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.place p { margin: 6px 0 0; font-size: 14.2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.chip { font-size: 12.5px; border-radius: 10px; padding: 3px 9px; background: #eef3ec; color: var(--green); font-weight: 600; }
.chip.price { background: #fbefd0; color: #6b4a00; }
.chip.warn { background: #f3ece0; color: var(--muted); font-weight: 500; }
.tip { margin-top: 9px; background: #f4f0e4; border-radius: 11px; padding: 8px 10px; font-size: 13.4px; display: flex; gap: 8px; }
.tip svg { width: 17px; height: 17px; flex: none; margin-top: 1px; stroke: #b98710; fill: none; stroke-width: 2; stroke-linecap: round; }
.place-actions { display: flex; gap: 8px; margin-top: 11px; }
.btn {
  border: 0; border-radius: 12px; padding: 9px 13px; font-weight: 650; font-size: 13.5px; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: #ece4d2; color: var(--ink);
}
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { background: var(--green); color: #fff; }
.btn.sun { background: var(--sun); color: var(--sun-ink); }
.btn.danger { background: #f6ddd5; color: #8e2a17; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; }

/* pratique */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; }
.card h4 { margin: 0 0 4px; font-family: var(--serif); font-size: 16px; color: var(--green); }
.card p { margin: 4px 0 0; font-size: 14px; }
.card .mine { display: inline-block; font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; background: var(--sun); color: var(--sun-ink); padding: 1px 7px; border-radius: 8px; margin-left: 4px; vertical-align: 2px; }
.contact-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; margin: 10px 0 2px; }
.contact-photos img { width: 100%; height: 130px; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.food { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.food div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: 13px; color: var(--muted); }
.food b { display: block; color: var(--red); font-family: var(--serif); font-size: 14.5px; }
ul.list { margin: 0; padding: 0; list-style: none; }
ul.list li { position: relative; padding: 0 0 0 16px; margin: 6px 0; font-size: 14px; }
ul.list li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--green2); }
.prices { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.prices td { padding: 7px 0; border-top: 1px solid var(--line); vertical-align: top; }
.prices tr:first-child td { border-top: 0; }
.prices td:last-child { text-align: right; font-weight: 650; color: var(--green); padding-left: 10px; }
.sources { font-size: 12.5px; color: var(--muted); margin: 14px 4px 0; }
.sources a { color: var(--green2); }
.leg-card { display: flex; gap: 12px; align-items: center; }
.leg-card .leg-ico { width: 42px; height: 42px; border-radius: 12px; background: #f4ecd6; display: grid; place-items: center; flex: none; }
.leg-card .leg-ico svg { width: 30px; height: 30px; }

/* souvenirs */
.souv { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px; margin-bottom: 14px; }
.souv h4 { margin: 0; font-family: var(--serif); font-size: 17px; color: var(--green); }
.souv-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.souv-story { white-space: pre-wrap; font-size: 14.3px; margin: 8px 0 0; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 10px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: zoom-in; background: #e4ddcc; }
.gallery.one { grid-template-columns: 1fr; }
.gallery.one img { aspect-ratio: 4 / 3; }
.gallery.two { grid-template-columns: 1fr 1fr; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; font-size: 14px; }
.empty svg { width: 46px; height: 46px; margin: 0 auto 8px; stroke: #b9ab8c; fill: none; stroke-width: 1.6; }

/* ---------------------------------------------------------------- drawer */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(4, 9, 15, .5); }
.drawer {
  position: fixed; z-index: 45; top: 0; right: 0; bottom: 0; width: min(440px, 100vw);
  background: var(--cream); transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  display: flex; flex-direction: column; padding-top: var(--safe-t);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-family: var(--serif); color: var(--green); font-size: 22px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 14px calc(30px + var(--safe-b)); overscroll-behavior: contain; }
.reg { margin: 16px 0 6px; display: flex; align-items: baseline; justify-content: space-between; }
.reg:first-child { margin-top: 2px; }
.reg h3 { margin: 0; font-family: var(--serif); font-size: 18px; }
.reg span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stop-row {
  width: 100%; border: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px;
  display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; text-align: left;
}
.stop-row .dot { width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid var(--green2); background: #fff; }
.stop-row.current { border-color: var(--sun); box-shadow: 0 0 0 2px rgba(233, 178, 58, .4); }
.stop-row.current .dot { background: var(--sun); border-color: #b98710; }
.stop-row b { font-family: var(--serif); color: var(--green); font-size: 16px; display: block; }
.stop-row small { color: var(--muted); font-size: 12px; }
.stop-row .n { font-size: 12px; color: var(--muted); }
.leg-row { display: flex; align-items: center; gap: 8px; padding: 4px 0 4px 16px; font-size: 12.5px; color: var(--muted); border-left: 2px dashed #d5c7a8; margin-left: 17px; min-height: 34px; }
.leg-row svg { width: 24px; height: 24px; flex: none; }
.info-block { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; }
.info-block h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 17px; color: var(--green); }

/* -------------------------------------------------------------- lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(3, 6, 10, .94); display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.lightbox img { max-width: 100vw; max-height: 86dvh; object-fit: contain; }
.lb-close { position: absolute; top: calc(var(--safe-t) + 12px); right: 12px; }
.lb-close, .lb-nav { z-index: 2; border: 0; background: rgba(0, 0, 0, .5); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.lb-close svg, .lb-nav svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lb-nav { position: absolute; top: 50%; margin-top: -22px; }
.lb-nav.prev { left: 10px; } .lb-nav.next { right: 10px; }
.lb-cap { position: absolute; left: 0; right: 0; bottom: calc(14px + var(--safe-b)); text-align: center; color: #dfe7e2; font-size: 13px; margin: 0; padding: 0 20px; }

/* ---------------------------------------------------------------- loader */
.loader { position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; color: #cfdcd5; background: var(--night); transition: opacity .5s; }
.loader p { margin: 14px 0 0; font-size: 14px; }
.loader-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--sun); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.6); opacity: .5; } }
body:not(.is-loading) .loader { opacity: 0; pointer-events: none; }

@media (min-width: 900px) {
  .sheet { left: auto; right: 16px; width: 440px; bottom: 16px; top: 76px; height: auto; border-radius: 22px; padding-bottom: 20px; }
  .sheet[data-state="half"], .sheet[data-state="full"] { transform: none; }
  .sheet[data-state="closed"] { transform: translateX(calc(100% + 40px)); }
}

/* ------------------------------------------------------------------ admin */
.admin-page { overflow: auto; background: var(--cream); }
.admin-wrap { max-width: 760px; margin: 0 auto; padding: calc(var(--safe-t) + 18px) 16px calc(60px + var(--safe-b)); }
.admin-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.admin-top .btn { white-space: nowrap; }
.admin-top h1 { margin: 0; font-family: var(--serif); color: var(--green); font-size: 24px; line-height: 1.15; }
.admin-top p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; font-weight: 650; color: var(--green); margin-bottom: 4px; }
.field small { color: var(--muted); font-weight: 400; }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid #d9ccb0; background: #fff; border-radius: 12px; padding: 11px 12px; font: inherit; font-size: 16px; color: var(--ink);
}
textarea.input { min-height: 150px; resize: vertical; line-height: 1.45; }
.input:focus { outline: 2px solid var(--sun); border-color: var(--sun); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drop {
  border: 2px dashed #cdbd99; border-radius: 14px; padding: 16px; text-align: center; color: var(--muted); background: #fffaf0;
  display: block; cursor: pointer;
}
.drop b { color: var(--green); }
.drop input { display: none; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; margin-top: 10px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #e4ddcc; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); display: grid; place-items: center; }
.thumb button svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3; stroke-linecap: round; }
.thumb.removed img { opacity: .25; }
.thumb.removed::after { content: "retirée"; position: absolute; inset: auto 0 6px; text-align: center; font-size: 11px; font-weight: 700; color: #8e2a17; }
.progress { height: 6px; border-radius: 3px; background: #eadfc6; overflow: hidden; margin-top: 10px; }
.progress div { height: 100%; width: 0; background: var(--green2); transition: width .2s; }
.admin-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; }
.admin-item img, .admin-item .noimg { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #e4ddcc; }
.admin-item h4 { margin: 0; }
.admin-item small { color: var(--muted); }
.msg { padding: 10px 12px; border-radius: 12px; font-size: 14px; margin: 10px 0; }
.msg.err { background: #f6ddd5; color: #8e2a17; }
.msg.ok { background: #e3efe5; color: var(--green); }
.confirm { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ------------------------------------------------- ligne des destinations */
.destbar {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  padding: 8px 0 calc(10px + var(--safe-b));
  background: linear-gradient(to top, rgba(6, 13, 22, .92), rgba(6, 13, 22, .6) 70%, transparent);
}
.db-head { display: flex; align-items: center; justify-content: space-between; padding: 0 14px 6px; gap: 10px; }
.seg { display: inline-flex; background: rgba(255, 255, 255, .14); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: transparent; color: #dfe9e3; font-size: 12.5px; font-weight: 650; padding: 5px 11px; border-radius: 9px; }
.seg button[aria-selected="true"] { background: var(--paper); color: var(--green); }
.db-hint { color: #c7d6cf; font-size: 12px; font-weight: 600; }
.db-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 14px 2px; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.db-strip::-webkit-scrollbar { display: none; }
.dchip {
  flex: none; scroll-snap-align: center; border: 0; border-radius: 14px; background: rgba(255, 253, 248, .95);
  padding: 7px 12px 7px 14px; text-align: left; display: flex; flex-direction: column; min-width: 98px; position: relative; overflow: hidden;
}
.dchip::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--green2); }
.dchip[data-region="sud"]::before { background: var(--red); }
.dchip[data-region="centre"]::before { background: var(--sun); }
.dchip b { font-family: var(--serif); color: var(--green); font-size: 15px; white-space: nowrap; }
.dchip small { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.dchip.current { background: var(--sun); box-shadow: 0 0 0 2px #fff3c4; }
.dchip.current b, .dchip.current small { color: var(--sun-ink); }
.dchip.empty { background: var(--sun); min-width: 0; }
.dchip.empty b, .dchip.empty small { color: var(--sun-ink); }
.dchip:active { transform: scale(.97); }
body.sheet-open .destbar { background: var(--cream); border-top: 1px solid var(--line); }
body.sheet-open .seg { background: #ece4d2; }
body.sheet-open .seg button { color: var(--muted); }
body.sheet-open .seg button[aria-selected="true"] { background: var(--green); color: #fff; }
body.sheet-open .db-hint { color: var(--muted); }
body.sheet-open .dchip { background: var(--paper); border: 1px solid var(--line); }
body.sheet-open .dchip.current { background: var(--sun); border-color: var(--sun); }
.pin.dim { opacity: .35 !important; }

/* ------------------------------------------------------------ assistant */
.fab {
  position: fixed; z-index: 31; right: 14px; bottom: calc(var(--hud-h) + 14px + var(--safe-b));
  border: 0; border-radius: 22px; background: var(--green); color: #fff; padding: 11px 16px 11px 13px;
  display: flex; align-items: center; gap: 8px; font-weight: 700; box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.fab svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.sheet-open .fab, body.agent-open .fab, body.traveling .fab { display: none; }
.agent {
  position: fixed; z-index: 50; inset: 0; background: var(--cream); display: flex; flex-direction: column;
  padding-top: var(--safe-t);
}
.agent-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.agent-head h2 { margin: 0; font-family: var(--serif); color: var(--green); font-size: 22px; }
.agent-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.agent-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.amsg { max-width: 88%; border-radius: 16px; padding: 10px 13px; font-size: 14.5px; }
.amsg p { margin: 0 0 6px; } .amsg p:last-child { margin-bottom: 0; }
.amsg.me { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.amsg.bot { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.amsg.err { background: #f6ddd5; color: #8e2a17; }
.amsg .list { margin: 4px 0; }
.amsg.typing { display: flex; gap: 5px; padding: 14px; }
.amsg.typing span { width: 7px; height: 7px; border-radius: 50%; background: #b9ab8c; animation: blink 1.2s infinite; }
.amsg.typing span:nth-child(2) { animation-delay: .2s; } .amsg.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .25; } }
.aplaces { display: grid; gap: 8px; margin-top: 10px; }
.aplace { background: #f6f1e4; border-radius: 12px; padding: 9px 11px; }
.aplace b { color: var(--green); font-family: var(--serif); font-size: 15px; }
.aplace small { color: var(--muted); margin-left: 6px; }
.aplace p { margin: 3px 0 0; font-size: 13.5px; }
.aplace .place-actions { margin-top: 8px; }
.codeform { display: grid; gap: 8px; }
.agent-quick { display: flex; gap: 6px; overflow-x: auto; padding: 4px 14px 8px; scrollbar-width: none; }
.agent-quick::-webkit-scrollbar { display: none; }
.agent-form { border-top: 1px solid var(--line); padding: 8px 12px calc(10px + var(--safe-b)); background: var(--paper); }
.agent-geo { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 0 2px 6px; }
.agent-row { display: flex; gap: 8px; align-items: flex-end; }
.agent-row textarea { flex: 1; resize: none; border: 1px solid #d9ccb0; border-radius: 14px; padding: 10px 12px; font: inherit; font-size: 16px; max-height: 120px; background: #fff; }
.agent-row textarea:focus { outline: 2px solid var(--sun); border-color: var(--sun); }
.agent-row .btn { height: 44px; width: 48px; padding: 0; }
.agent-row .btn svg { width: 20px; height: 20px; }
.agent-pin { transform: translate(-50%, -100%); pointer-events: auto; cursor: pointer; }
.agent-pin .ap {
  width: 26px; height: 26px; border-radius: 50%; background: #7a3c9e; color: #fff; font-weight: 800; font-size: 12px;
  display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .4);
}
.agent-pin .pp-name { position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%); background: var(--paper); color: var(--ink); font-size: 12.5px; font-weight: 650; white-space: nowrap; padding: 4px 9px; border-radius: 10px; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); display: none; }
.agent-pin.active .pp-name { display: block; }
.agent-pin.active .ap { background: var(--sun); color: var(--sun-ink); }

/* ------------------------------------------------------- fiche : conseils */
.advice { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.adv { font-size: 12.5px; background: #e3efe5; color: var(--green); border-radius: 10px; padding: 4px 9px; }
.adv.warn { background: #fbefd0; color: #6b4a00; }
.btn.small { padding: 6px 10px; font-size: 12.5px; border-radius: 10px; }
.btn.small svg { width: 14px; height: 14px; }
.advice .btn { margin-left: auto; }
.btn.ask { background: #ede3f3; color: #5b2a7a; margin-bottom: 12px; }
.chip.dur { background: #e8eef7; color: #1f4a73; }
.muted { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.warnline { display: flex; gap: 6px; align-items: flex-start; color: #8e4a00; font-size: 13px; margin: 6px 0 0; }
.warnline svg { width: 16px; height: 16px; flex: none; stroke: #c27a00; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.programme .day { border-top: 1px solid var(--line); padding: 8px 0 4px; }
.programme .day:first-of-type { border-top: 0; }
.programme .day > b { font-size: 13px; color: var(--red); }
.programme .day a { color: var(--green); font-weight: 650; text-decoration: none; }
.facts { margin: -4px -14px 10px; padding: 0 14px 4px; }

/* -------------------------------------------------------- planificateur */
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.chip-btn { flex: none; border: 1px solid #d9ccb0; background: #fff; border-radius: 12px; padding: 7px 11px; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.chip-btn.on { background: var(--green); border-color: var(--green); color: #fff; }
.summary { background: var(--green); color: #e9f2ec; border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; display: grid; gap: 4px; font-size: 13.5px; }
.summary b { font-family: var(--serif); font-size: 17px; color: #fff; }
.summary.bad { background: #8e2a17; }
.summary .warnline { color: #ffe39a; }
.summary .warnline svg { stroke: #ffe39a; }
.pcard { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 11px 13px; position: relative; overflow: hidden; }
.pcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--green2); }
.pcard[data-region="sud"]::before { background: var(--red); }
.pcard[data-region="centre"]::before { background: var(--sun); }
.pcard.current { box-shadow: 0 0 0 2px rgba(233, 178, 58, .6); }
.pc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pc-name { font-family: var(--serif); color: var(--green); font-size: 17px; display: block; }
.pc-top small { color: var(--muted); font-size: 12px; }
.pc-adv { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 6px; background: #f2ebdb; border-radius: 12px; padding: 3px; }
.stepper b { font-size: 13px; min-width: 56px; text-align: center; }
.stepper button { width: 32px; height: 32px; border: 0; border-radius: 9px; background: #fff; display: grid; place-items: center; }
.stepper button svg { width: 16px; height: 16px; stroke: var(--green); stroke-width: 2.6; stroke-linecap: round; fill: none; }
.stepper button:disabled { opacity: .4; }
.prog { margin-top: 8px; }
.prog summary { cursor: pointer; font-size: 13px; font-weight: 650; color: var(--green2); }
.prog .card { margin: 8px 0 0; background: #fbf8f0; }
.pc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.addlist { display: grid; gap: 8px; margin-bottom: 14px; }
.addrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px; }
.addrow b { font-family: var(--serif); color: var(--green); display: block; }
.addrow small { color: var(--muted); font-size: 12px; }
.place-actions.wrap { flex-wrap: wrap; margin-bottom: 8px; }
#drawerBody .leg-row { margin-top: 2px; margin-bottom: 2px; }

@media (min-width: 900px) {
  .destbar { background: linear-gradient(to top, rgba(6, 13, 22, .9), transparent); }
  body.sheet-open .destbar { right: 470px; }
  body.sheet-open .destbar { background: linear-gradient(to top, rgba(6, 13, 22, .9), transparent); border: 0; }
  body.sheet-open .dchip { background: rgba(255, 253, 248, .95); border: 0; }
  body.sheet-open .seg { background: rgba(255, 255, 255, .14); }
  body.sheet-open .seg button { color: #dfe9e3; }
  body.sheet-open .db-hint { color: #c7d6cf; }
  .agent { inset: 16px 16px 16px auto; width: 420px; border-radius: 22px; box-shadow: 0 10px 40px rgba(0, 0, 0, .4); padding-top: 0; overflow: hidden; }
  body.sheet-open:not(.agent-open) .fab { display: flex; right: 486px; }
}
