/* ============================================
   CARNET DE VOYAGE / TRAVEL BOOK
   Base « Lagon classique », palette Océan (bleu)
   Plus Jakarta Sans · photo de couverture + bandeau vert
   ============================================ */

:root {
  color-scheme: light;
  --green: #1D5FA8;
  --green-dark: #174C87;
  --green-ink: #0E2E54;
  --tint: #EBF2FA;
  --tint-strong: #D5E4F5;
  --on-brand-2: #CFE0F5;   /* texte secondaire sur le bandeau */
  --route-dash: #A9C3E2;
  --focus-ring: rgba(29,95,168,.15);
  --fab-shadow: rgba(23,76,135,.35);
  --ochre: #E0A93B;
  --ochre-ink: #3B2606;
  --coral: #E8613C;
  --bg: #F6F8FA;
  --card: #FFFFFF;
  --text: #1C2530;
  --text-2: #3D4855;
  --text-3: #556170;
  --border: #E1E6EC;
  --danger: #C2412D;
  --radius: 14px;
  --radius-sm: 10px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --page-w: 680px;
  /* Neutres des Lieux et de la Carte */
  --raised: #F1F4F8;
  --hairline: rgba(28, 37, 48, .08);
  --hairline-strong: rgba(28, 37, 48, .14);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.sheet-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- Boutons et champs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--card);
  font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: var(--tint-strong); background: var(--tint); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-dark); }
.btn.danger { color: var(--danger); border-color: #F1D3CC; }
.btn.danger:hover { background: #FBEDEA; }
.btn.link { border: none; background: none; color: var(--green); min-height: 36px; padding: 0 8px; }
.btn.link:hover { text-decoration: underline; }
.btn.small { min-height: 36px; font-size: 13px; padding: 0 12px; }
.btn.google { gap: 10px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); transition: background .15s;
}
.icon-btn:hover { background: var(--tint); }
.icon-btn.glass { background: rgba(255,255,255,.9); color: var(--green-ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.icon-btn.glass:hover { background: #fff; }

.mini-btn {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 32px; padding: 0 10px; border-radius: 999px;
  background: var(--tint); color: var(--green-ink);
  font-size: 12.5px; font-weight: 600; text-decoration: none;
}
.mini-btn:hover { background: var(--tint-strong); }
.mini-btn.on { background: var(--green); color: #fff; }

.input {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; font-size: 16px; /* 16px : pas de zoom auto sur iPhone */
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--focus-ring); }
textarea.input { resize: vertical; min-height: 80px; line-height: 1.4; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2355635B' stroke-width='2'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-error { color: var(--danger); font-size: 13px; margin-top: 4px; }
.form-hint { color: var(--text-3); font-size: 12.5px; margin-top: 4px; }

/* ---------- Connexion ---------- */
.auth-screen {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: calc(24px + var(--safe-top)) 16px calc(24px + var(--safe-bottom));
  background: var(--tint);
}
.auth-card {
  width: 100%; max-width: 380px; background: #fff; border-radius: 20px;
  padding: 32px 24px 20px; text-align: center; border: 1px solid var(--border);
}
.auth-logo { margin: 0 auto 14px; border-radius: 16px; }
.auth-title { font-size: 24px; font-weight: 700; color: var(--green-ink); }
.auth-subtitle { color: var(--text-2); margin: 6px 0 22px; font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12px; margin: 4px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.lang-switch { margin-top: 14px; font-size: 12px; color: var(--text-3); padding: 6px 10px; border-radius: 8px; }
.lang-switch:hover { background: var(--tint); }

/* ---------- Structure ---------- */
.app { min-height: 100vh; padding-bottom: calc(96px + var(--safe-bottom)); }
.page { max-width: var(--page-w); margin: 0 auto; padding: 16px; }
.demo-banner { background: var(--ochre); color: var(--ochre-ink); text-align: center; font-size: 13px; font-weight: 600; padding: 8px 16px; padding-top: calc(8px + var(--safe-top)); }
.demo-banner a { margin-left: 8px; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: rgba(246,248,250,.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  max-width: var(--page-w); margin: 0 auto;
}
.demo-banner + .topbar { padding-top: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--green-ink); }
.brand img { border-radius: 8px; }
.page-title { font-size: 26px; font-weight: 700; margin: 4px 0 16px; letter-spacing: -.01em; }

/* ---------- Accueil : cartes de voyage ---------- */
.trip-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.trip-card {
  display: block; background: var(--card); border-radius: 18px; overflow: hidden; text-decoration: none;
  border: 1px solid var(--border); transition: transform .15s, box-shadow .15s;
}
.trip-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(28,37,48,.08); }
.trip-card-cover { width: 100%; height: 150px; object-fit: cover; background: var(--tint-strong); }
.cover-empty { display: flex; align-items: center; justify-content: center; color: var(--green); background: var(--tint-strong); }
.trip-card-band { position: relative; background: var(--green); color: #fff; padding: 12px 16px; }
.trip-card-title { font-weight: 700; font-size: 18px; padding-right: 80px; }
.trip-card-sub { font-size: 13px; color: var(--on-brand-2); }
.trip-card-band .chip-status { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }
.trip-card-shared { display: flex; align-items: center; gap: 6px; padding: 10px 16px; font-size: 12.5px; color: var(--text-2); }
.chip-status { display: inline-block; background: var(--ochre); color: var(--ochre-ink); font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }

.empty { text-align: center; padding: 48px 16px; color: var(--text-2); }
.empty img { margin: 0 auto 16px; border-radius: 14px; }
.empty h2 { color: var(--text); font-size: 20px; margin-bottom: 6px; }
.empty p { max-width: 340px; margin: 0 auto 18px; }
.empty.small { padding: 28px 8px; }
.kind-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* ---------- Voyage : couverture + bandeau ---------- */
.hero { position: relative; max-width: var(--page-w); margin: 0 auto; }
.hero-img { width: 100%; height: clamp(180px, 34vh, 280px); object-fit: cover; background: var(--tint-strong); }
@media (min-width: 700px) { .hero-img { border-radius: 0 0 0 0; } }
.hero-actions { position: absolute; inset: 0 0 auto 0; display: flex; justify-content: space-between; padding: calc(12px + var(--safe-top)) 12px 0; }
.demo-banner ~ .trip-side .hero-actions { padding-top: 12px; }
.hero-right { display: flex; gap: 8px; }
.hero-credit { position: absolute; right: 8px; bottom: 6px; font-size: 10.5px; color: #fff; background: rgba(0,0,0,.35); padding: 2px 6px; border-radius: 6px; max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.band {
  max-width: var(--page-w); margin: 0 auto;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
}
.band h1 { font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.band-sub { font-size: 13.5px; color: var(--on-brand-2); margin-top: 2px; }
.band-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.avatars { display: flex; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tint); color: var(--green-ink); font-size: 12px; font-weight: 700;
  border: 2px solid var(--green); margin-left: -6px;
}
.avatars .avatar:first-child { margin-left: 0; }

.tabs {
  position: sticky; top: 0; z-index: 15;
  max-width: var(--page-w); margin: 0 auto;
  display: flex; background: #fff; border-bottom: 1px solid var(--border);
  padding-top: var(--safe-top);
}
.tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--text-3);
  border-bottom: 3px solid transparent;
}
.tab.active { color: var(--green); border-bottom-color: var(--green); }

/* ---------- Cartes (vols, hôtels…) ---------- */
.section { margin-bottom: 22px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--green-ink); margin: 6px 0 10px; }
.section-title .ic { color: var(--green); }
.count { font-size: 12px; font-weight: 600; color: var(--text-3); background: var(--tint); border-radius: 999px; padding: 1px 8px; }

.card {
  background: var(--tint); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px;
  cursor: pointer; transition: background .15s;
}
.card:hover { background: var(--tint-strong); }
.card-kicker { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.card-title { font-size: 16px; font-weight: 700; }
.card-meta { font-size: 13.5px; color: var(--text-2); margin-top: 2px; }
.card-notes { font-size: 13.5px; margin-top: 8px; white-space: pre-wrap; color: var(--text); }
.route { display: flex; align-items: center; gap: 10px; margin: 2px 0; }
.route-end { font-size: 18px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; flex: 0 1 auto; }
.route-end.right { text-align: right; }
.route.small .route-end { font-size: 15px; }
.route-line { flex: 1; min-width: 28px; height: 0; border-top: 2px dashed var(--route-dash); position: relative; display: flex; justify-content: center; }
.route-line .ic { position: absolute; top: -9px; background: var(--tint); color: var(--green); padding: 0 2px; width: 20px; }
.card:hover .route-line .ic { background: var(--tint-strong); }
.route-times { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; color: var(--green-ink); }
.route-times sup { color: var(--coral); font-size: 11px; }
.ref-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.ref-label { color: var(--text-3); }
.ref-row code { font-family: ui-monospace, Menlo, monospace; font-weight: 700; letter-spacing: .04em; background: #fff; padding: 2px 8px; border-radius: 6px; }
.ref-row .mini-btn { min-height: 28px; padding: 0 8px; background: #fff; }
.link-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pill-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--green); text-decoration: none; background: #fff; padding: 6px 10px; border-radius: 999px; }
.pill-link:hover { background: var(--card); text-decoration: underline; }

/* ---------- Lieux ---------- */
/* Version « unslop » : cartes blanches à filet fin, couleur de catégorie seulement sur la pastille */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 16px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; min-height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--hairline-strong); background: var(--card); font-size: 13px; font-weight: 500; color: var(--text-2); transition: background-color .15s var(--ease), color .15s var(--ease); }
.chip:hover { background: var(--raised); }
.chip.on { background: var(--text); border-color: var(--text); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

.place-list { display: grid; gap: 8px; }
.place {
  display: flex; gap: 12px; background: var(--card); border: 1px solid var(--hairline); border-radius: 16px;
  padding: 8px; cursor: pointer; transition: border-color .15s var(--ease);
}
.place:hover { border-color: var(--hairline-strong); }
.place-img { width: 88px; height: 88px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--raised); }
.place-img-empty { display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.place-body { min-width: 0; flex: 1; display: flex; flex-direction: column; padding: 4px 4px 0 0; }
.place-cat { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); }
.place-name { font-size: 15px; font-weight: 600; margin: 2px 0; }
.place-notes { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.place-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.place .mini-btn, .popup .mini-btn {
  border-radius: 8px; border: 1px solid var(--hairline); background: var(--card); color: var(--text-2);
  font-weight: 500; font-size: 13px; padding: 0 8px;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.place .mini-btn:hover, .popup .mini-btn:hover { background: var(--raised); color: var(--text); }
.place .mini-btn.on { background: var(--tint); border-color: transparent; color: var(--green-ink); }
.place.is-done .place-name { color: var(--text-3); text-decoration: line-through; }
.place.is-done .place-img { opacity: .55; }
@media (min-width: 640px) { .place-img { width: 112px; height: 96px; } }

/* ---------- Carte ---------- */
/* Harmonisée avec les Lieux : filet fin, pins plus fins, popups sobres */
.map-page { padding-bottom: 0; }
.trip-map { height: calc(100vh - 232px); height: calc(100dvh - 200px); min-height: 360px; border-radius: 16px; overflow: hidden; border: 1px solid var(--hairline); background: var(--raised); z-index: 0; }
.map-empty { text-align: center; color: var(--text-3); font-size: 13px; margin-top: 12px; }
.pin-wrap { background: none; border: none; }
.pin { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.pin .ic { width: 14px; height: 14px; }
.pin.square { border-radius: 8px; }
.leaflet-container { font-family: inherit; }
.leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.leaflet-popup-content { margin: 12px; min-width: 180px; }
.popup strong { font-size: 15px; font-weight: 600; }
.popup-sub { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.popup p { margin: 4px 0 !important; font-size: 13px; color: var(--text-2); }
.popup-actions { display: flex; gap: 8px; margin-top: 8px; }

/* ---------- Bouton flottant ---------- */
.fab {
  position: fixed; z-index: 30; right: max(16px, calc(50vw - var(--page-w) / 2 + 16px)); bottom: calc(18px + var(--safe-bottom));
  display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px 0 16px; border-radius: 26px;
  background: var(--green); color: #fff; font-weight: 700; font-size: 14.5px;
  box-shadow: 0 6px 18px var(--fab-shadow);
}
.fab:hover { background: var(--green-dark); }
.fab:active { transform: scale(.97); }

/* ---------- Feuilles ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(14,25,40,.45); z-index: 900; }
.sheet {
  position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 600px;
  max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border-radius: 20px 20px 0 0; padding: 0 16px calc(20px + var(--safe-bottom));
  transform: translateY(100%); transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.sheet.open { transform: translateY(0); }
@media (min-width: 700px) { .sheet { bottom: 50%; border-radius: 20px; transform: translateY(60%); opacity: 0; transition: transform .2s, opacity .2s; } .sheet.open { transform: translateY(50%); opacity: 1; } }
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--border); margin: 8px auto 0; }
.sheet-head { position: sticky; top: 0; background: #fff; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.sheet-head h2 { font-size: 18px; font-weight: 700; }
.sheet-text { color: var(--text-2); font-size: 14px; margin-bottom: 14px; }

.form .fields { display: flex; flex-wrap: wrap; gap: 12px; }
.field { width: 100%; }
.field.half { width: calc(50% - 6px); }
.field > label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.form > .field { margin-top: 14px; }
.form-actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 20px; position: sticky; bottom: calc(-20px - var(--safe-bottom)); background: #fff; padding: 12px 0 calc(4px + var(--safe-bottom)); }
.form-actions .btn.primary { flex: 1; }

.cat-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cat-opt span { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-2); }
.cat-opt span .ic { color: var(--c); }
.cat-opt input:checked + span { background: var(--c); border-color: var(--c); color: #fff; }
.cat-opt input:checked + span .ic { color: #fff; }
.cat-opt input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }

.loc-search { display: flex; gap: 8px; }
.loc-search .btn { flex-shrink: 0; }
.loc-results { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.loc-result { display: flex; gap: 8px; align-items: flex-start; text-align: left; padding: 8px 10px; border-radius: 10px; background: var(--tint); font-size: 13px; }
.loc-result:hover { background: var(--tint-strong); }
.loc-result .ic { color: var(--green); margin-top: 1px; }
.mini-map { height: 190px; border-radius: 12px; margin-top: 8px; border: 1px solid var(--border); z-index: 0; cursor: crosshair; }

.photo-preview { width: 100%; max-height: 200px; object-fit: cover; border-radius: 12px; margin-bottom: 8px; }
.photo-preview.wide { max-height: 160px; }
.photo-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.img-picker { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.file-btn { cursor: pointer; }
.img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.img-cell { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--tint); }
.img-cell img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.img-cell:hover img { transform: scale(1.05); }

.kind-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: 6px; }
.kind-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 10px; border-radius: 14px; background: var(--tint); font-weight: 700; color: var(--green-ink); }
.kind-btn:hover { background: var(--tint-strong); }
.kind-btn .ic { color: var(--green); }

.members { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.members li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--tint); }
.members .avatar { margin: 0; border-color: #fff; background: #fff; }
.member-email { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.member-email em { color: var(--text-3); font-style: normal; }
.tag { font-size: 11.5px; font-weight: 700; color: var(--ochre-ink); background: #F6E2B8; padding: 2px 8px; border-radius: 999px; }
.members .mini-btn { background: #fff; min-height: 30px; padding: 0 8px; }
.share-add { display: flex; gap: 8px; }

.menu-user { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13.5px; padding: 4px 0 12px; overflow-wrap: anywhere; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 0 8px; border-radius: 12px; font-weight: 600; text-align: left; }
.menu-item:hover { background: var(--tint); }

.toast {
  position: fixed; z-index: 2000; left: 50%; bottom: calc(86px + var(--safe-bottom)); transform: translateX(-50%);
  background: var(--green-ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
  max-width: calc(100vw - 32px); box-shadow: 0 6px 18px rgba(0,0,0,.2);
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Mentions du fond de carte plus discrètes */
.leaflet-control-attribution { font-size: 10px; line-height: 1.4; }

/* Filtre par ville : ligne au-dessus des catégories, sélection en bleu */
.chips + .chips { margin-top: -8px; }
.chips-area .chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.chips-area .chip .ic { width: 16px; height: 16px; }

/* Vols proposés (pas encore réservés) */
.tag-option { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--ochre-ink); background: #F6E2B8; padding: 1px 8px; border-radius: 999px; }
.price-row { margin-top: 8px; font-size: 16px; font-weight: 700; color: var(--green); }
.is-options .card { background: var(--card); border: 1px dashed var(--route-dash); }

/* Favoris personnels */
.fav-btn.on, .place .mini-btn.fav-btn.on { background: #FDECEC; color: #C2364A; border-color: transparent; }
.fav-btn .ic { color: #C2364A; }
.fav-others { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-3); align-self: center; }
.fav-others .ic { color: #E07A8A; }
.chips-fav .chip .ic { color: #C2364A; width: 16px; height: 16px; }
.chips-fav .chip.on { background: #C2364A; border-color: #C2364A; color: #fff; }
.chips-fav .chip.on .ic { color: #fff; }
.pin { position: relative; }
.pin-fav { position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%; background: #fff; color: #C2364A; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.pin-fav .ic { width: 10px; height: 10px; }

/* Note Google sur les cartes de lieux */
.rating { margin-left: auto; font-size: 12.5px; font-weight: 700; color: #B7791F; white-space: nowrap; }
.rating small { font-size: 11.5px; font-weight: 500; color: var(--text-3); }

/* Tri des lieux */
.sort-bar { display: flex; align-items: center; gap: 4px; margin: -4px 0 12px; font-size: 13px; color: var(--text-3); }
.sort-bar span { margin-right: 4px; }
.seg { min-height: 30px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.seg:hover { background: var(--raised); }
.seg.on { background: var(--tint); color: var(--green-ink); }

/* Vols compacts */
.flight-sum { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 4px; }
.flight-sum .card-meta { margin: 0; }
.flight-sum .price-row { margin: 0; font-size: 15px; text-align: right; }
.flight-details { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--route-dash); }
.flight-details .pill-link { border: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; }
.details-toggle { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.details-toggle .ic { transform: rotate(-90deg); transition: transform .15s var(--ease); }
.flight-card.is-open .details-toggle .ic { transform: rotate(90deg); }

/* ---------- Barre de filtres : pastilles déroulantes ---------- */
.filter-bar { display: flex; align-items: center; gap: 8px; overflow-x: auto; margin: 0 -16px 16px; padding: 2px 16px; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.fpill {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  height: 36px; padding: 0 10px 0 12px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--hairline-strong);
  box-shadow: 0 1px 2px rgba(28,37,48,.06);
  font-size: 13.5px; font-weight: 600; color: var(--text);
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.fpill:hover { border-color: var(--route-dash); }
.fpill > .ic:first-child { color: var(--text-3); }
.fpill > .ic:last-child { transform: rotate(-90deg); color: var(--text-3); margin-left: -2px; }
.fpill span { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fpill.on { background: var(--tint); border-color: var(--green); color: var(--green-ink); }
.fpill.on > .ic { color: var(--green); }
.fpill-fav.on > .ic:first-child { color: #C2364A; }
.fclear { flex-shrink: 0; height: 36px; padding: 0 8px; font-size: 13.5px; font-weight: 600; color: var(--green); }
.fclear:hover { text-decoration: underline; }

.opt-list { display: flex; flex-direction: column; padding-bottom: 8px; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 8px; border-radius: 12px; text-align: left; font-size: 15px; }
.opt + .opt { border-top: 1px solid var(--hairline); border-radius: 0; }
.opt:hover { background: var(--raised); }
.opt .dot { width: 10px; height: 10px; }
.opt > .ic { color: #C2364A; }
.opt-label { flex: 1; }
.opt-n { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.opt-check { width: 18px; color: var(--green); display: flex; }
.opt.on .opt-label { font-weight: 700; color: var(--green-ink); }

/* ---------- Essentiel : sous-onglets Vols / Hôtels / Transferts / Notes ---------- */
.ess-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; margin-bottom: 16px; background: var(--raised); border-radius: 14px; }
.ess-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 6px 4px; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--text-2); position: relative; transition: background-color .15s var(--ease), color .15s var(--ease); }
.ess-tab .ic { color: var(--text-3); }
.ess-tab:hover { background: rgba(255,255,255,.6); }
.ess-tab.on { background: var(--card); color: var(--green-ink); box-shadow: 0 1px 3px rgba(28,37,48,.12); }
.ess-tab.on .ic { color: var(--green); }
.ess-n { position: absolute; top: 4px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--tint-strong); color: var(--green-ink); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ess-tab.on .ess-n { background: var(--green); color: #fff; }

/* ---------- Hébergements : galerie photo en tête de carte ---------- */
.card { position: relative; }
.stay-gallery { display: flex; gap: 2px; overflow-x: auto; scroll-snap-type: x mandatory; margin: -16px -16px 12px; border-radius: 14px 14px 0 0; scrollbar-width: none; cursor: grab; }
.is-options .stay-gallery { margin: -16px -16px 12px; }
.stay-gallery::-webkit-scrollbar { display: none; }
.stay-gallery img { flex: 0 0 100%; width: 100%; height: 180px; object-fit: cover; scroll-snap-align: start; background: var(--raised); }
.gallery-count { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 10px; background: rgba(0,0,0,.5); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; }

/* Hôtels par île */
.booked-badge { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; font-size: 12px; font-weight: 700; color: var(--green); background: var(--tint); padding: 2px 8px; border-radius: 10px; }
.section > .is-options > .card { margin-bottom: 8px; }

/* Hôtels : note, favoris, carte */
.score-badge { display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 1px 6px; border-radius: 6px 6px 6px 0; background: var(--green-ink); color: #fff; font-size: 12px; font-weight: 700; }
.fav-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fav-row .mini-btn { border-radius: 8px; border: 1px solid var(--hairline); background: var(--card); color: var(--text-2); font-weight: 600; font-size: 13px; padding: 0 8px; }
.fav-row .fav-btn.on { background: #FDECEC; color: #C2364A; border-color: transparent; }
.fav-agree { font-size: 12px; font-weight: 700; color: #C2364A; background: #FDECEC; padding: 2px 8px; border-radius: 10px; }
.popup-img { display: block; width: calc(100% + 24px); margin: -12px -12px 8px; height: 110px; object-fit: cover; border-radius: 12px 12px 0 0; }

/* ---------- Jours : frise et programme ---------- */
@media (max-width: 420px) { .tab { gap: 4px; font-size: 13px; } }
.dsegs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 16px; background: var(--raised); border-radius: 14px; }
.dseg { min-height: 40px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.dseg.on { background: var(--card); color: var(--green-ink); box-shadow: 0 1px 3px rgba(28,37,48,.12); }

.fr-seg { margin-bottom: 20px; }
.fr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 14px; border-radius: 12px; background: var(--c); color: #fff; }
.fr-head h2 { font-size: 16px; font-weight: 700; }
.fr-head span { font-size: 13px; white-space: nowrap; }
.fr-stay { display: flex; align-items: center; gap: 6px; padding: 8px 14px 4px; font-size: 13px; color: var(--text-2); }
.fr-day { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 8px 8px 0; text-align: left; border-radius: 10px; }
.fr-day:hover { background: var(--raised); }
.fr-date { width: 44px; flex-shrink: 0; text-align: center; font-size: 12px; line-height: 1.2; color: var(--text-2); }
.fr-date b { display: block; font-size: 17px; color: var(--text); }
.fr-day.today .fr-date, .fr-day.today .fr-date b, .st-day.today:not(.on) b { color: var(--danger); }
.fr-day::before { content: ''; position: absolute; left: 62px; top: 0; bottom: 0; width: 2px; background: var(--c); opacity: .35; }
.fr-node { position: relative; width: 14px; height: 14px; flex-shrink: 0; border-radius: 50%; border: 3px solid var(--c); background: var(--bg); }
.fr-node.full { background: var(--c); }
.fr-body { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; }
.fr-act { display: inline-flex; align-items: center; gap: 6px; }
.fr-act.star { font-weight: 700; }
.fr-act.star .ic, .star-btn.on { color: var(--ochre); }
.fr-more, .fr-free, .fr-idea { color: var(--text-2); }
.fr-idea { font-style: italic; }
.fr-icons { display: flex; gap: 6px; color: var(--c); }

.strip { display: flex; gap: 4px; overflow-x: auto; margin: 0 -16px 12px; padding: 2px 16px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.st-day { flex: 0 0 46px; padding: 6px 0 0; border-radius: 10px; overflow: hidden; background: var(--card); border: 1px solid var(--hairline); text-align: center; color: var(--text-2); }
.st-day span { display: block; font-size: 11.5px; }
.st-day b { display: block; font-size: 16px; color: var(--text); }
.st-day i { display: block; height: 5px; margin-top: 4px; background: var(--c); opacity: .35; }
.st-day i.full { opacity: 1; }
.st-day.on { background: var(--c); border-color: var(--c); color: #fff; }
.st-day.on b { color: #fff; }
.day-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.day-head .next .ic { transform: rotate(180deg); }
.day-title { min-width: 0; text-align: center; }
.day-title small { display: block; font-size: 13px; color: var(--text-2); }
.day-title strong { font-size: 20px; color: var(--c); }
.day-title .ic { display: inline; }
.day-notes { margin-bottom: 12px; padding: 10px 14px; border-radius: 12px; background: #FBF1DA; font-size: 14px; white-space: pre-wrap; }
.day-empty { padding: 8px 0; font-size: 14px; color: var(--text-2); }

.tl-row { position: relative; display: flex; gap: 10px; padding-bottom: 10px; }
.tl-row:not(:last-child)::before { content: ''; position: absolute; left: 83px; top: 32px; bottom: 0; width: 2px; background: var(--border); }
.tl-time { width: 58px; flex-shrink: 0; padding-top: 6px; font-size: 13.5px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.tl-time.word { font-size: 11.5px; font-weight: 600; color: var(--text-2); padding-top: 8px; line-height: 1.2; }
.tl-ic { position: relative; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
.tl-body { position: relative; flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--tint); }
.tl-body.is-plan { background: var(--card); border: 1px solid var(--hairline-strong); }
.tl-main { display: block; width: 100%; text-align: left; overflow-wrap: anywhere; }
.tl-main strong { display: block; font-size: 15px; }
.tl-main small { display: block; font-size: 13px; color: var(--text-2); }
.tl-notes { display: block; margin-top: 4px; font-size: 13px; white-space: pre-wrap; }
.star-btn { position: absolute; top: 2px; right: 4px; color: var(--text-3); }
.tl-body .ref-row { flex-wrap: wrap; }
.tl-row.night .tl-ic { background: var(--raised); color: var(--text-2); }
.tl-row.night .tl-body { background: none; padding: 5px 0 0 4px; }
.opt-hint { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; margin-bottom: 8px; padding: 0 14px; border: 1px dashed var(--route-dash); border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--green); text-align: left; }

.ideas { margin-top: 20px; }
.ideas .section-title { justify-content: space-between; }
.ideas-sub { margin: 8px 0 4px; font-size: 13px; color: var(--text-2); }
.idea { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hairline); }
.idea-col { flex: 1; min-width: 0; }
.idea-main { display: block; width: 100%; text-align: left; }
.idea-main strong { display: block; font-size: 14.5px; }
.idea-main small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; color: var(--text-2); }

/* Lieu recommandé par quelqu'un */
.reco { display: inline-flex; align-items: center; gap: 4px; flex: none; margin-left: auto; padding: 2px 8px; border-radius: 6px; background: #F6E2B8; color: var(--ochre-ink); font-size: 12px; font-weight: 700; }

/* ---------- Liste / Carte ---------- */
.view-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.view-left { flex: 1; min-width: 0; }
.view-bar .filter-bar { margin: 0 0 0 -16px; padding-right: 8px; }
.view-bar .dsegs { margin: 0; }
.vt { display: flex; flex: none; gap: 2px; padding: 4px; border-radius: 14px; background: var(--raised); }
.vt-btn { width: 44px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--text-2); }
.vt-btn.on { background: var(--card); color: var(--green-ink); box-shadow: 0 1px 3px rgba(28,37,48,.12); }
@media (max-width: 699px) { .hero.compact .hero-img { height: 84px; } }
.hero.compact .hero-credit { display: none; }
.map-wrap { position: relative; }
.trip-map { height: calc(100vh - 420px); height: calc(100dvh - 420px); min-height: 280px; }
.map-over { position: absolute; z-index: 1; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--card); font-size: 13px; font-weight: 600; box-shadow: 0 1px 4px rgba(28,37,48,.25); }
.map-over.on { background: var(--green); color: #fff; }
.pin-tag { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; padding: 4px 9px; border-radius: 999px; border: 2px solid #fff; color: #fff; font: 700 12px 'Plus Jakarta Sans', sans-serif; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.pin-tag.city { transform: translate(-50%, -190%); }
.pin-tag.is-opt { color: #0E2E54; border-color: #1D5FA8; }
.pin b { font: 700 12px 'Plus Jakarta Sans', sans-serif; }
.pin.faded, .pin-tag.faded { opacity: .6; }
.sel .pin, .sel .pin-tag { opacity: 1; outline: 3px solid #D9962B; }
.map-strip { display: flex; gap: 10px; overflow-x: auto; margin: 12px -16px 0; padding: 3px 16px 8px; scroll-snap-type: x proximity; scroll-padding: 16px; }
.mc { flex: none; width: 268px; display: flex; gap: 10px; padding: 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--hairline-strong); scroll-snap-align: start; cursor: pointer; }
.mc.on { border-color: #D9962B; box-shadow: 0 0 0 2px #D9962B; }
.mc > img, .mc-ic { flex: none; width: 72px; height: 92px; border-radius: 10px; object-fit: cover; background: var(--raised); display: flex; align-items: center; justify-content: center; }
.mc-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mc-body strong, .mc-body small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.mc-body strong { font-size: 14px; line-height: 1.25; }
.mc-body small { font-size: 12px; color: var(--text-2); line-height: 1.3; }
.mc-num { display: inline-block; min-width: 20px; padding: 0 5px; border-radius: 10px; color: #fff; font-size: 12px; text-align: center; }
.mc-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; }
.map-missing { margin-top: 10px; font-size: 13px; color: var(--text-2); }
.map-missing summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; }
.map-missing .idea-main { display: block; min-height: 40px; }

/* ---------- Idée → Choisi → Réservé ---------- */
.tag-st { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.tag-st.idea { color: var(--ochre-ink); background: #F6E2B8; }
.tag-st.chosen { color: #fff; background: #0F7568; }
.tag-st.booked { color: #fff; background: #0E2E54; }
.st-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.others summary, .pick summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border: 1px dashed var(--route-dash); border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--green); cursor: pointer; list-style: none; }
.others summary::-webkit-details-marker, .pick summary::-webkit-details-marker { display: none; }
.others summary::after, .pick summary::after { content: '+'; margin-left: auto; font-size: 18px; }
.others[open] summary::after, .pick[open] summary::after { content: '−'; }
.others[open] summary { margin-bottom: 8px; }
.pick { margin-bottom: 8px; }
.is-options > .card { margin-bottom: 8px; }
.pk { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 4px 6px 14px; border-bottom: 1px solid var(--hairline); }
.pk-main { flex: 1; min-width: 0; text-align: left; }
.pk-main strong, .pk-main small { display: block; }
.pk-main strong { font-size: 14px; }
.pk-main small { font-size: 12.5px; color: var(--text-2); }
.fr-todo { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border: 1px dashed var(--route-dash); border-radius: 8px; font-size: 13px; color: var(--text-2); }
.vw { display: flex; flex-direction: column; gap: 10px; }
.vw .stay-gallery { margin: 0; border-radius: 12px; }
.vw .tag-st { margin: 0; align-self: flex-start; font-size: 13px; padding: 3px 10px; }
.vw-row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.vw-row span { color: var(--text-2); }
.vw-row b { font-weight: 600; text-align: right; }

/* ---------- Voyage, dans l'ordre ---------- */
.vr-count { margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.vd { display: flex; gap: 8px; padding: 4px 0; }
.vd-date { flex: none; width: 52px; min-height: 44px; padding-top: 6px; text-align: left; align-self: flex-start; }
.vd-date b { display: block; font-size: 16px; line-height: 1.2; white-space: nowrap; }
.vd-date small { font-size: 12px; color: var(--text-2); }
.vd.today .vd-date b { color: var(--c); text-decoration: underline; }
.vd-body { flex: 1; min-width: 0; }
.vr { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin-bottom: 6px; padding: 6px 10px; border: 1px solid #C2CBD5; border-radius: 12px; background: var(--card); text-align: left; font-size: 14.5px; color: var(--text); }
.vr.todo { border: 2px dashed #17508F; background: #EEF5FC; }
.vr.idea-line { border-color: transparent; background: none; }
.vr > .ic, .vr-main > .ic { flex: none; color: #17508F; }
.vr-ic { flex: none; display: flex; }
.vr-t { flex: 1; min-width: 0; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.idea-line .vr-t { font-weight: 500; }
.vr-t small { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.vr-n { flex: none; font-size: 13px; font-weight: 600; }
.vr-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; text-align: left; color: inherit; }
.vr .tag-st { margin: 0; flex: none; }
.vr-ch { flex: none; min-height: 44px; padding: 0 2px; font-size: 13px; font-weight: 600; text-decoration: underline; color: var(--text); }
.vr-opts { margin: -2px 0 10px; }
@media (max-width: 420px) { .vr, .vr.todo { gap: 0 10px; } .vr.todo { flex-wrap: wrap; } .vr.todo .vr-t { flex-basis: calc(100% - 34px); } .vr.todo .vr-n { margin-left: 30px; } div.vr { flex-wrap: wrap; } div.vr .vr-main { flex-basis: 100%; } div.vr .tag-st { margin-left: 30px; } .vr-ch { min-height: 40px; } }
.fab.mini span { display: none; }
.fab.mini { width: 56px; padding: 0; justify-content: center; }

/* ---------- Cartes plus compactes ---------- */
.tl-top, .place-top { display: flex; align-items: flex-start; gap: 8px; }
.tl-top .tl-main { flex: 1; width: auto; min-width: 0; min-height: 28px; }
.place-top .place-name { flex: 1; min-width: 0; }
.place-top .reco { margin-top: 2px; }
.tl-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.tl-foot .tl-notes { flex: 1; min-width: 0; min-height: 36px; margin: 0; text-align: left; color: var(--text-2); overflow-wrap: anywhere; }
.tl-foot .link-row { margin: 0; flex: none; }
.tl-foot .mini-btn { min-height: 36px; }
.tl-foot .pill-link { background: var(--raised); min-height: 36px; }
.vr.hl { border-left: 4px solid var(--c, #17508F); }
.vw .reco { margin: 0; align-self: flex-start; }
.vr .reco, .idea .reco { font-size: 11.5px; padding: 2px 7px; }
.place .mini-btn { min-height: 40px; min-width: 40px; justify-content: center; }
.place-actions { gap: 6px; }

/* ---------- Monter / descendre une carte ---------- */
.mv-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.mv-bar .mini-btn { min-height: 44px; padding: 0 14px; }
.mv { flex: none; display: flex; flex-direction: column; gap: 4px; align-self: center; }
.mv-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid #C2CBD5; border-radius: 10px; background: var(--card); color: #17508F; }
.mv-btn.up .ic { transform: rotate(90deg); }
.mv-btn.down .ic { transform: rotate(-90deg); }
.mv-btn:disabled { opacity: .35; }

/* Mobile : ces enveloppes n'existent que pour le PC */
.trip-side, .gal { display: contents; }
.gal-nav { display: none; }

/* ============================================
   PC (≥ 1000 px) : rien ci-dessous ne touche le mobile
   ============================================ */
@media (min-width: 1000px) {
  html { scrollbar-gutter: stable; }
  :root { --side-w: 272px; }
  .app { padding-bottom: 0; }

  /* Accueil */
  .topbar, .app:not(.in-trip) > .page { max-width: 1200px; padding-left: 32px; padding-right: 32px; }
  .app:not(.in-trip) > .page { padding-top: 24px; padding-bottom: 64px; }
  .page-title { font-size: 32px; margin-bottom: 24px; min-height: 52px; }
  .trip-grid { gap: 24px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
  .trip-card-cover { height: 220px; }
  .app:not(.in-trip) > .fab { position: absolute; top: 88px; bottom: auto; right: max(32px, calc(50% - 568px)); height: 48px; box-shadow: none; }
  .demo-banner ~ .fab { margin-top: 35px; }

  /* Voyage : menu à gauche, contenu à droite */
  .app.in-trip { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .in-trip > .demo-banner { grid-column: 1 / -1; }
  .trip-side { display: flex; flex-direction: column; position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; background: var(--card); border-right: 1px solid var(--border); }
  .in-trip .hero, .in-trip .band, .in-trip .tabs { width: 100%; margin: 0; flex: none; }
  .in-trip .hero .hero-img, .in-trip .hero.compact .hero-img { height: 176px; }
  .in-trip .hero.compact .hero-credit { display: block; }
  .in-trip .band { flex-direction: column; align-items: stretch; padding: 16px 20px; }
  .in-trip .band h1 { font-size: 21px; line-height: 1.25; overflow-wrap: anywhere; }
  .in-trip .band-side { flex-direction: row; align-items: center; justify-content: space-between; }
  .in-trip .tabs { position: static; flex-direction: column; gap: 4px; padding: 12px; border: 0; }
  .in-trip .tab { flex: none; justify-content: flex-start; gap: 12px; padding: 0 12px; border: 0; border-radius: 10px; font-size: 15px; }
  .in-trip .tab:hover { background: var(--raised); }
  .in-trip .tab.active { background: var(--tint); }
  .in-trip > .fab, .in-trip > .fab.mini { left: 16px; right: auto; bottom: 16px; width: calc(var(--side-w) - 33px); height: 48px; border-radius: 12px; padding: 0 12px; justify-content: center; box-shadow: none; }
  .in-trip > .fab.mini span { display: inline; }
  .in-trip > .fab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .in-trip > .tab-page { width: 100%; max-width: 1180px; margin: 0; padding: 24px 32px 64px; }
  .ess-tabs { max-width: 620px; margin-bottom: 20px; }
  .ess-tab { flex-direction: row; gap: 8px; min-height: 44px; font-size: 14px; }
  .ess-n { position: static; }
  .filter-bar, .view-bar .filter-bar { flex-wrap: wrap; overflow: visible; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .view-bar .dsegs { max-width: 360px; }
  .strip { flex-wrap: wrap; overflow: visible; margin: 0 0 16px; padding: 0; }
  .section { margin-bottom: 32px; }
  .section-title { font-size: 17px; margin-bottom: 12px; }

  /* Vols, hôtels, transferts, notes : plusieurs colonnes */
  .tab-page .section:has(> .card, > .is-options, > .others) { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; align-items: start; }
  .section > .section-title, .section > .others { grid-column: 1 / -1; margin: 0; }
  .section > .is-options { display: contents; }
  .section .card, .section > .is-options > .card { margin: 0; }
  .others .is-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; align-items: start; }
  .place-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 12px; }

  /* Galerie : flèches à la souris */
  .gal { display: block; position: relative; }
  .gal-nav { position: absolute; top: 50%; margin-top: -18px; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.94); color: var(--green-ink); box-shadow: 0 1px 4px rgba(0,0,0,.25); opacity: 0; transition: opacity .15s; }
  .gal:hover .gal-nav, .gal-nav:focus-visible { opacity: 1; }
  .gal-nav.prev { left: -8px; } .gal-nav.next { right: -8px; } .gal-nav.next .ic { transform: rotate(180deg); }
  .vw .gal-nav.prev { left: 8px; } .vw .gal-nav.next { right: 8px; }
  .vw .stay-gallery img { height: 280px; }

  /* Carte seule (1000 à 1199 px) */
  .map-page .trip-map { height: calc(100vh - 340px); }
  .map-strip { margin-left: 0; margin-right: 0; padding-left: 3px; }

  /* Liste et carte côte à côte (≥ 1200 px, posé par app.js) */
  .in-trip > .tab-page.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: none; padding: 0; }
  .split-list { min-width: 0; padding: 24px 24px 64px; }
  .split-map { position: sticky; top: 0; align-self: start; height: 100vh; }
  .split-map .map-wrap, .split-map .trip-map { height: 100%; min-height: 0; border-radius: 0; border-width: 0 0 0 1px; }
  .split .vt { display: none; }
  .hover .pin, .hover .pin-tag { opacity: 1; outline: 3px solid var(--ochre); }
  .flash { outline: 2px solid var(--ochre); outline-offset: 2px; border-radius: 12px; }

  /* Fenêtres et menus déroulants */
  .sheet { max-width: 640px; padding-left: 24px; padding-right: 24px; }
  .sheet-handle { display: none; }
  .sheet-head { padding-top: 16px; }
  .sheet.popover, .sheet.popover.open { left: var(--px); top: var(--py); right: auto; bottom: auto; margin: 0; width: 320px; max-height: calc(100vh - var(--py) - 16px); padding: 0 12px 8px; border-radius: 14px; transform: none; box-shadow: 0 10px 32px rgba(14,25,40,.2); }
  .sheet.popover .sheet-head { padding: 8px; }
  .sheet.popover .sheet-head h2 { font-size: 15px; }
  .sheet.popover .opt { min-height: 44px; }
  .sheet-backdrop.clear { background: none; }
}
@media (min-width: 1700px) { .in-trip > .tab-page.split { grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); } }
@media (min-width: 1000px) {
  .demo-banner ~ .tab-page .split-map { height: calc(100vh - 36px); }
  /* Trajets à une seule carte : côte à côte */
  .tab-page:not(.split):not(.map-page):has(> .section > .card) { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 20px; align-content: start; align-items: start; }
  .tab-page:not(.split):not(.map-page):has(> .section > .card) > * { grid-column: 1 / -1; }
  .tab-page:not(.split):not(.map-page) > .section:has(> .card):not(:has(> .card ~ .card, > .is-options, > .others)) { grid-column: auto; }
}
@media (min-width: 1000px) { .section > .section-title:has(+ .place-list) { margin-bottom: 12px; } }
.mv-bar { justify-content: flex-end; margin-bottom: 4px; }
.mv-link { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 4px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.mv-link .ic { width: 14px; height: 14px; }

/* ---------- Idées : à part du programme décidé ---------- */
.idea-strip { display: block; width: 100%; min-height: 44px; margin: 14px 0 8px; padding: 4px 12px; border-left: 3px dotted #8A96A3; text-align: left; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.idea-strip b { display: block; font-size: 12px; font-weight: 600; }
.idea-strip span { display: block; font-style: italic; overflow-wrap: anywhere; }
.ideas.maybe { margin-top: 40px; padding: 14px; border: 1px dashed #8A96A3; border-radius: 14px; background: var(--raised); }

.mv-bar { align-items: center; min-height: 44px; }
.mv-bar .section-title { margin: 0 auto 0 0; }

/* ---------- Carte d'hôtel ---------- */
.sc-ph { position: relative; margin: -16px -16px 12px; }
.sc .sc-ph .stay-gallery { margin: 0; }
.sc-ph .tag-st { position: absolute; top: 12px; left: 12px; margin: 0; padding: 3px 10px; z-index: 1; }
.sc-fav { position: absolute; top: 6px; right: 8px; z-index: 1; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.94); color: #3D4855; }
.sc-fav.on { color: #C2364A; }
.sc-ph .gallery-count { top: auto; bottom: 10px; }
.sc-ph.none { display: flex; align-items: center; justify-content: space-between; margin: 0 0 4px; }
.sc-ph.none .tag-st, .sc-ph.none .sc-fav { position: static; }
.sc-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sc-row + .sc-row { margin-top: 6px; }
.sc-row .card-title { flex: 1; min-width: 0; line-height: 1.25; }
.sc-score { flex: none; text-align: right; }
.sc-score b { display: inline-block; padding: 1px 8px; border-radius: 6px 6px 6px 0; background: var(--green-ink); color: #fff; font-size: 13px; }
.sc-score small, .sc-price small { display: block; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.sc-where { flex: 1; min-width: 0; font-size: 13px; color: var(--text-2); }
.sc-where span { display: block; }
.sc-price { flex: none; text-align: right; }
.sc-price b { display: block; font-size: 18px; line-height: 1.2; color: var(--text); white-space: nowrap; }
.sc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sc-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 8px; background: var(--raised); font-size: 12.5px; font-weight: 500; color: var(--text); }
.sc-chip.ok { background: #DDF0E9; color: #0B4F46; }
.sc .fav-others { margin-top: 8px; color: var(--text-2); }
.sc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.sc-foot .st-row { margin: 0; flex: 1; }
.sc-foot .btn { min-height: 44px; }
.sc-links { flex: none; display: flex; gap: 6px; margin-left: auto; }
.sc-ic { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid #C2CBD5; border-radius: 10px; color: #17508F; background: var(--card); }

/* Vols : aller-retour et formulaire court */
.seg { display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 10px; background: var(--raised); }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.seg input:checked + span { background: #fff; color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.seg input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.flight-form .form-sub { margin: 20px 0 10px; font-size: 16px; font-weight: 600; }
.flight-form .after-legs { margin-top: 12px; }
.flight-form .link-existing { margin-bottom: 12px; }
.flight-form .field { position: relative; }
.form-more { margin-top: 16px; border-top: 1px solid var(--border); }
.form-more summary { min-height: 48px; display: flex; align-items: center; font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.form-more summary::-webkit-details-marker { display: none; }
.form-more summary::after { content: '+'; margin-left: auto; font-size: 18px; }
.form-more[open] summary::after { content: '−'; }
.form-more > .fields + .fields { margin-top: 12px; }
.ap-list { position: absolute; z-index: 5; top: 100%; left: 0; width: max-content; min-width: 100%; max-width: 78vw; margin-top: 4px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); overflow: hidden; }
.field.half:has(> input[name^=to]) .ap-list { left: auto; right: 0; }
.ap-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 12px; border: 0; background: none; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.ap-opt small { display: block; color: var(--text-3); font-size: 12px; }
.ap-opt.on, .ap-opt:hover { background: var(--raised); }
.leg + .leg { margin-top: 14px; }
.leg-head { font-size: 13.5px; color: var(--text-2); }
.leg-head b { color: var(--text); font-weight: 600; margin-right: 4px; }
