/* ─────────────────────────────────────────────────────────────────────
   cockpit.css
   Visual layer for the OpenTrip Builder V2 / Trip Cockpit.
   Notebook-first. Calm whitespace. The map is a sidekick.

   Milestone 5.1.10: cockpit palette is now aligned with the homepage and
   "Prêts à partir" page so the user feels the same product across surfaces.
   - Background: cool slate (--bg: #f8fafc) — matches homepage.
   - Brand blue + coral accent — matches homepage logo and CTA.
   - Nav: white sticky bar (was dark navy in earlier milestones).
   - Buttons: 10px radius for primary actions, with subtle blue shadow.
   ───────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Aligned with the homepage / ready-trip palette (5.1.10). */
  --bg:         #f8fafc;            /* cool slate (matches homepage) */
  --surface:    #FFFFFF;
  --surface-2:  #F1F5F9;            /* slate-100 */
  --line:       #E5E7EB;            /* gray-200, matches homepage --border */
  --line-soft:  #EFF2F6;

  --ink-900:    #111827;            /* matches homepage --text */
  --ink-800:    #1F2937;
  --ink-700:    #374151;
  --ink-600:    #4B5563;
  --ink-500:    #6B7280;            /* matches homepage --muted */
  --ink-400:    #9CA3AF;
  --ink-300:    #C7CCD3;
  --ink-200:    #DDE2EA;

  --brand:      #2563EB;            /* matches homepage --blue */
  --brand-2:    #1D4ED8;            /* matches homepage --blue-dark */
  --brand-bg:   #EFF6FF;            /* matches homepage --blue-light */
  --brand-line: #C7D7FE;
  --accent:     #F97316;            /* coral — matches homepage --coral */
  --indigo:     #4F46E5;            /* matches homepage --indigo */

  --gold:       #B68A2E;
  --gold-bg:    #FBF6E8;

  --ok:         #10B981;
  --ok-bg:      #ECFDF5;
  --warn:       #D97706;
  --warn-bg:    #FFF7E6;
  --danger:     #DC2626;
  --danger-bg:  #FEF2F2;

  --radius-sm:  8px;
  --radius:     12px;
  --radius-lg:  14px;                /* matches homepage --radius */
  --radius-xl:  18px;

  --shadow-sm:  0 1px 2px rgba(15,23,42,.04);
  --shadow:     0 4px 24px rgba(15,23,42,.08);   /* matches homepage --shadow */
  --shadow-lg:  0 20px 60px rgba(15,23,42,.14);  /* matches homepage --shadow-lg */
  --shadow-brand: 0 4px 14px rgba(37,99,235,.25);

  --t: .18s cubic-bezier(.4, 0, .2, 1);
}

html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink-800);
  font-size: 14px;
  line-height: 1.55;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Top nav — shared product shell (Milestone 5.1.10) ────────────────
   Visual language taken from index.html / prets-a-partir.html: white bar,
   blurred-glass backdrop, blue+coral logo, slate-muted links with an
   active blue underline. Cockpit can't fixed-position (the layout fills
   the viewport), so we keep it as a normal flex item but mirror the
   homepage palette/typography so the user sees one product.
   ─────────────────────────────────────────────────────────────────── */
nav.top-nav {
  height: 64px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 4px;
  flex-shrink: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
}
nav.top-nav .nav-brand {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -.02em;
  margin-right: 18px;
}
nav.top-nav .nav-brand span { color: var(--accent); }
nav.top-nav a {
  color: var(--ink-500);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  transition: background var(--t), color var(--t);
}
nav.top-nav a:hover { color: var(--ink-900); }
nav.top-nav a.active {
  color: var(--brand);
  font-weight: 600;
  background: var(--brand-bg);
}
nav.top-nav .nav-cta {
  margin-left: auto;
  background: var(--brand);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-brand);
  font-weight: 600;
}
nav.top-nav .nav-cta:hover { background: var(--brand-2); color: #fff; }
nav.top-nav .nav-badge {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  text-transform: uppercase;
}

/* ── Cockpit root ──────────────────────────────────────────────────── */
#cockpit { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }

/* ── Trip summary header ───────────────────────────────────────────── */
.trip-summary { background: var(--surface); border-bottom: 1px solid var(--line); padding: 18px 28px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; flex-shrink: 0; }
.trip-summary-left { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.trip-summary-title { font-size: 22px; font-weight: 800; letter-spacing: -.025em; color: var(--ink-900); }
.trip-summary-title span:focus { outline: none; background: var(--surface-2); padding: 0 4px; border-radius: 4px; }
.trip-summary-sub { font-size: 13px; color: var(--ink-500); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.trip-summary-sub .sep { color: var(--ink-300); }
.trip-summary-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.summary-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 22px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-700); }
.summary-chip.profile { background: var(--brand-bg); border-color: var(--brand-line); color: var(--brand-2); }
.summary-chip.budget  { background: var(--gold-bg); border-color: #EBD9A8; color: var(--gold); }
.summary-chip.feas-ok     { background: var(--ok-bg);     border-color: #BBF7D0; color: #065F46; }
.summary-chip.feas-warn   { background: var(--warn-bg);   border-color: #FDE68A; color: #92400E; }
.summary-chip.feas-danger { background: var(--danger-bg); border-color: #FECACA; color: #991B1B; }

/* ── Tabs row ──────────────────────────────────────────────────────── */
.cockpit-tabs { background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 28px; display: flex; gap: 6px; flex-shrink: 0; overflow-x: auto; scrollbar-width: none; }
.cockpit-tabs::-webkit-scrollbar { display: none; }
.cockpit-tab { position: relative; background: none; border: none; padding: 14px 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-500); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; border-bottom: 2px solid transparent; transition: color var(--t), border-color var(--t); font-family: inherit; }
.cockpit-tab:hover { color: var(--ink-800); }
.cockpit-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.cockpit-tab .tab-count { background: var(--ink-200); color: var(--ink-700); font-size: 11px; padding: 1px 7px; border-radius: 10px; font-weight: 700; }
.cockpit-tab.active .tab-count { background: var(--brand-bg); color: var(--brand-2); }
.cockpit-tab.has-warn .tab-count { background: var(--warn-bg); color: #92400E; }
.cockpit-tab.has-danger .tab-count { background: var(--danger-bg); color: #991B1B; }

/* ── Insight strip ────────────────────────────────────────────────── */
.insight-strip { background: transparent; padding: 10px 28px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--ink-600); flex-shrink: 0; }
.insight-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-weight: 500; }
.insight-pill.ok     { color: #065F46; border-color: #BBF7D0; background: var(--ok-bg); }
.insight-pill.warn   { color: #92400E; border-color: #FDE68A; background: var(--warn-bg); }
.insight-pill.danger { color: #991B1B; border-color: #FECACA; background: var(--danger-bg); }
.insight-pill.brand  { color: var(--brand-2); background: var(--brand-bg); border-color: var(--brand-line); }

/* ── Main content (per tab) ───────────────────────────────────────── */
.tab-body { flex: 1; display: flex; min-height: 0; overflow: hidden; }

/* Carnet tab: notebook (left) + side panel (right) ─────────────────── */
.carnet-layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); min-height: 0; overflow: hidden; }
.notebook { padding: 22px 28px 36px; overflow-y: auto; }
.side-panel { border-left: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }

/* ── Notebook toolbar ────────────────────────────────────────────── */
.notebook-toolbar { display: flex; gap: 8px; margin-bottom: 18px; align-items: center; position: relative; }
.toolbar-spacer { flex: 1; }

/* Generic button — aligned with homepage / prets-a-partir style (5.1.10) */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid transparent; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all var(--t); white-space: nowrap; letter-spacing: -.005em; background: var(--surface); color: var(--ink-700); font-family: inherit; }
.btn:hover { background: var(--surface-2); border-color: var(--line); }
.btn.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: var(--shadow-brand); }
.btn.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); box-shadow: 0 6px 20px rgba(37,99,235,.4); }
.btn.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-700); }
.btn.btn-ghost:hover { background: var(--surface-2); border-color: var(--line-soft); }
.btn.btn-outline { background: transparent; border-color: var(--ink-200); color: var(--ink-700); }
.btn.btn-outline:hover { background: var(--surface-2); border-color: var(--ink-300); color: var(--ink-900); }
.btn.btn-danger-soft { background: var(--danger-bg); color: var(--danger); border-color: #FECACA; }
.btn.btn-danger-soft:hover { background: #FEE2E2; }
.btn.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.btn-xs { padding: 4px 9px; font-size: 11.5px; border-radius: 6px; }
.btn.btn-icon { padding: 6px 10px; min-width: 34px; justify-content: center; font-size: 16px; }

/* Popover menus (notebook ⋯, day ⋯) */
.notebook-menu-wrap, .day-menu-wrap { position: relative; }
.popover-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 300; display: flex; flex-direction: column; gap: 1px; }
.popover-menu button { background: none; border: none; text-align: left; padding: 8px 10px; font-size: 13px; font-family: inherit; color: var(--ink-800); border-radius: 7px; cursor: pointer; transition: background var(--t); }
.popover-menu button:hover { background: var(--surface-2); }
.popover-menu button.danger { color: var(--danger); }
.popover-menu button.danger:hover { background: var(--danger-bg); }
.popover-menu hr { border: none; border-top: 1px solid var(--line-soft); margin: 4px 0; }
.popover-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-400); padding: 6px 10px 2px; }

/* ── Day card (travel bubble) ─────────────────────────────────────── */
/* Radius/shadow aligned with ready-trip cards on prets-a-partir.html so
   day cards read as the same product surface (Milestone 5.1.10). */
.day-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.day-card:hover { box-shadow: var(--shadow); }
.day-card.expanded { box-shadow: var(--shadow); border-color: var(--line); }

.day-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px 14px; }
.day-index { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: #fff; flex-shrink: 0; box-shadow: inset 0 -1px 0 rgba(0,0,0,.10); }
.day-head-text { flex: 1; min-width: 0; }
.day-title { font-size: 18px; font-weight: 800; letter-spacing: -.018em; color: var(--ink-900); padding: 0 4px; border-radius: 4px; outline: none; cursor: text; }
.day-title:focus { background: var(--surface-2); }
.day-area { font-size: 13px; color: var(--ink-500); margin-top: 2px; padding: 0 4px; }
.day-head-chips { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.day-menu-wrap { flex-shrink: 0; }

.pace-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 14px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-700); border: 1px solid var(--line-soft); }
.pace-badge.pace-easy   { background: var(--ok-bg);     color: #065F46; border-color: #BBF7D0; }
.pace-badge.pace-ok     { background: var(--brand-bg);  color: var(--brand-2); border-color: var(--brand-line); }
.pace-badge.pace-warn   { background: var(--warn-bg);   color: #92400E; border-color: #FDE68A; }
.pace-badge.pace-danger { background: var(--danger-bg); color: #991B1B; border-color: #FECACA; }

.day-body { padding: 4px 22px 14px; }
.day-empty { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.day-empty p { color: var(--ink-500); font-size: 13px; }

.stop-list { display: flex; flex-direction: column; gap: 2px; }
.stop-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; transition: background var(--t); }
.stop-row:hover { background: var(--surface-2); }
.stop-row-risk { background: #FFF7ED; }
.stop-row-risk:hover { background: #FEF3C7; }
.stop-badge { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 15px; background: var(--surface-2); flex-shrink: 0; }
.stop-info { flex: 1; min-width: 0; }
.stop-name { font-size: 14px; font-weight: 600; color: var(--ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop-risk-note { font-size: 11px; font-weight: 500; color: #92400E; background: #FEF3C7; border-radius: 4px; padding: 1px 5px; margin-left: 6px; white-space: nowrap; }
.stop-meta { font-size: 11.5px; color: var(--ink-500); display: flex; gap: 10px; margin-top: 1px; }
.stop-tools { display: flex; gap: 2px; flex-shrink: 0; opacity: 0; transition: opacity var(--t); }
.stop-row:hover .stop-tools { opacity: 1; }
.stop-tool { width: 28px; height: 28px; border: none; background: transparent; color: var(--ink-400); border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--t), color var(--t); font-size: 13px; }
.stop-tool:hover { background: var(--surface-2); color: var(--ink-700); }
.stop-tool.delete:hover { background: var(--danger-bg); color: var(--danger); }

.stop-overflow { color: var(--ink-500); font-style: italic; font-size: 12.5px; cursor: pointer; padding: 8px 10px; border-radius: 10px; }
.stop-overflow:hover { background: var(--brand-bg); color: var(--brand-2); }

.night-stop { display: flex; align-items: flex-start; gap: 12px; padding: 11px 14px; margin: 12px 0 0; background: var(--gold-bg); border: 1px solid #EBD9A8; border-radius: 12px; font-size: 13px; color: #6B4F12; }
.night-stop-icon { font-size: 18px; flex-shrink: 0; line-height: 1.3; }
.night-stop-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.night-stop-text b { color: var(--ink-900); font-weight: 700; }
.night-stop-headline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.night-stop-zone { font-size: 11.5px; color: var(--ink-600); font-weight: 500; }
.night-stop-sub { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 11px; }
.night-stop-source { color: #6B4F12; opacity: .85; }
.night-stop-confidence { font-weight: 600; border-radius: 4px; padding: 1px 6px; }
.night-stop-confidence.med { color: #92400E; background: #FEF3C7; }
.night-stop-confidence.low { color: #991B1B; background: #FEE2E2; }
.night-stop-warn { color: #92400E; background: #FEF3C7; border-radius: 4px; padding: 1px 6px; font-weight: 600; }
.night-stop-warning { font-size: 11.5px; color: #92400E; background: rgba(254, 243, 199, .55); border-radius: 8px; padding: 6px 9px; margin-top: 2px; }
.night-stop-missing { background: var(--surface-2); border-color: var(--line); color: var(--ink-500); }
.night-stop-risky { border-color: #F59E0B; background: #FFFBEB; }

/* ── Final-day & arrival-day banners ────────────────────────────── */
.final-day-banner { display: flex; align-items: center; gap: 10px; padding: 9px 14px; margin-bottom: 12px; background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: 12px; font-size: 13px; color: #1D4ED8; font-weight: 600; }
.final-day-icon { font-size: 16px; flex-shrink: 0; }
.arrival-day-note { display: flex; align-items: center; gap: 10px; padding: 9px 14px; margin-bottom: 12px; background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: 12px; font-size: 13px; color: #166534; }

.day-advice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; margin-top: 12px; background: var(--brand-bg); border-radius: 12px; font-size: 13px; color: var(--brand-2); line-height: 1.5; }
.day-advice .advice-pin { font-size: 14px; flex-shrink: 0; }

.day-feas { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.feas-issue { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 7px 11px; border-radius: 10px; }
.feas-issue.ok     { color: #065F46; background: var(--ok-bg); }
.feas-issue.warn   { color: #92400E; background: var(--warn-bg); }
.feas-issue.danger { color: #991B1B; background: var(--danger-bg); }

.day-recs { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.day-recs-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-500); margin-bottom: 10px; }
.day-recs-group { margin-top: 10px; }
.day-recs-group:first-of-type { margin-top: 0; }
.day-recs-subtitle { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-400); margin: 6px 0 6px; }
.rec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .rec-grid { grid-template-columns: 1fr; } }
.rec-card { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: var(--surface-2); border-radius: 11px; }
.rec-card-head { display: flex; align-items: center; gap: 6px; }
.rec-emoji { font-size: 14px; }
.rec-type { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-500); }
.rec-name { font-size: 13px; font-weight: 700; color: var(--ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-short { font-size: 11.5px; color: var(--ink-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-actions { display: flex; gap: 4px; margin-top: 6px; }
.rec-actions .btn { padding: 4px 8px; font-size: 11px; }

.add-stop-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1.5px dashed var(--line); border-radius: 10px; color: var(--ink-400); font-size: 13px; font-weight: 500; cursor: pointer; transition: all var(--t); margin-top: 6px; }
.add-stop-row:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-bg); }

.day-foot { display: flex; padding: 10px 18px 16px; }

/* Empty state */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 24px; text-align: center; color: var(--ink-500); }
.empty-state-icon { font-size: 50px; margin-bottom: 14px; opacity: .65; }
.empty-state h3 { font-size: 17px; font-weight: 700; color: var(--ink-700); margin-bottom: 6px; }
.empty-state p { font-size: 13.5px; line-height: 1.6; max-width: 460px; }
.notebook-empty { background: var(--surface); border-radius: var(--radius-lg); border: 1px dashed var(--line); padding: 50px 24px; }

/* ── Side panel ──────────────────────────────────────────────────── */
.side-block-title { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-500); padding: 14px 18px 0; display: flex; align-items: center; gap: 6px; }

.side-map-wrap { position: relative; height: 320px; flex-shrink: 0; }
#cockpit-map { position: absolute; inset: 0; }
.side-map-wrap.pick-mode #cockpit-map { cursor: crosshair !important; }

.map-layers { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 400; display: flex; gap: 6px; flex-wrap: wrap; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); padding: 6px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.layer-toggle { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 11.5px; font-weight: 600; color: var(--ink-600); cursor: pointer; transition: all var(--t); font-family: inherit; }
.layer-toggle:hover { border-color: var(--brand-line); color: var(--brand-2); }
.layer-toggle.on { background: var(--brand-bg); border-color: var(--brand-line); color: var(--brand-2); }

.map-tools { position: absolute; top: 56px; right: 10px; z-index: 400; display: flex; flex-direction: column; gap: 6px; }
.map-tool { width: 36px; height: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; transition: all var(--t); }
.map-tool:hover { background: var(--brand-bg); border-color: var(--brand-line); }

.map-hint { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 400; background: rgba(15,23,42,.90); color: #fff; padding: 7px 14px; border-radius: 16px; font-size: 12.5px; font-weight: 500; pointer-events: none; opacity: 0; transition: opacity .2s; white-space: nowrap; }
.map-hint.show { opacity: 1; }

/* Suggestions panel — grouped Dormir/Manger/Faire */
.suggestions-panel { padding: 4px 0 18px; flex: 1; overflow-y: auto; min-height: 0; }
.suggestions-empty { font-size: 13px; color: var(--ink-400); padding: 18px 20px; text-align: center; line-height: 1.5; }
.suggestion-section { margin-top: 8px; padding: 0 18px; }
.suggestion-section:first-child { margin-top: 4px; }
.suggestion-section-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; color: var(--ink-800); margin: 12px 0 8px; }
.suggestion-section-count { font-size: 11px; color: var(--ink-400); font-weight: 600; background: var(--surface-2); padding: 1px 8px; border-radius: 10px; }
.suggestion-item { display: flex; gap: 10px; padding: 10px; border-radius: 11px; margin-bottom: 6px; background: var(--surface-2); transition: background var(--t); }
.suggestion-item:hover { background: var(--brand-bg); }
.suggestion-emoji { font-size: 18px; flex-shrink: 0; line-height: 1.2; }
.suggestion-body { flex: 1; min-width: 0; }
.suggestion-name { font-size: 13.5px; font-weight: 700; color: var(--ink-900); margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestion-meta { font-size: 11.5px; color: var(--ink-500); display: flex; gap: 8px; flex-wrap: wrap; }
.suggestion-meta .fit-badge { background: var(--gold-bg); color: var(--gold); padding: 0 7px; border-radius: 4px; font-weight: 700; font-size: 10.5px; letter-spacing: .03em; }
.suggestion-reason { font-size: 12px; color: var(--ink-600); margin-top: 4px; line-height: 1.4; }
.suggestion-actions { display: flex; gap: 4px; margin-top: 7px; flex-wrap: wrap; }
.voir-plus { margin-top: 4px; width: 100%; justify-content: center; }
.select-xs { padding: 4px 8px; font-size: 11.5px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-700); font-family: inherit; cursor: pointer; }
.select-xs:hover { border-color: var(--ink-300); }

/* Search */
.search-zone { padding: 12px 18px; border-bottom: 1px solid var(--line); position: relative; }
.search-wrap { position: relative; }
.search-input { width: 100%; padding: 10px 14px 10px 38px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 13.5px; font-family: inherit; background: var(--surface); color: var(--ink-800); outline: none; transition: border-color var(--t), box-shadow var(--t); }
.search-input::placeholder { color: var(--ink-400); }
.search-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-400); font-size: 14px; pointer-events: none; }
.search-dropdown { position: absolute; left: 18px; right: 18px; top: calc(100% - 2px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 240px; overflow-y: auto; z-index: 200; display: none; }
.search-dropdown.show { display: block; }
.search-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; transition: background var(--t); }
.search-item:hover { background: var(--brand-bg); }
.search-item-emoji { width: 28px; height: 28px; border-radius: 7px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.search-item-name { font-size: 13px; font-weight: 600; color: var(--ink-800); }
.search-item-sub { font-size: 11.5px; color: var(--ink-500); }

/* ── Recommendations tab ─────────────────────────────────────────── */
.recs-tab { padding: 24px 30px 40px; overflow-y: auto; flex: 1; }

.premium-cta { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 22px; background: linear-gradient(135deg, #FFFBEA 0%, #F2F8FF 100%); border: 1px solid var(--gold-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.premium-cta-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.premium-cta-text b { font-size: 14px; color: var(--ink-900); font-weight: 800; }
.premium-cta-text span { font-size: 12.5px; color: var(--ink-600); }

.rec-section { margin-bottom: 26px; }
.rec-section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.rec-section-head h3 { font-size: 16px; font-weight: 800; color: var(--ink-900); letter-spacing: -.015em; }
.rec-section-count { font-size: 11.5px; color: var(--ink-400); font-weight: 600; }
.rec-section-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.rec-card-big { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; transition: box-shadow var(--t), border-color var(--t); }
.rec-card-big:hover { box-shadow: var(--shadow); border-color: var(--line); }
.rec-card-big .rec-card-head { gap: 8px; }
.rec-card-big .rec-badge { margin-left: auto; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 8px; background: var(--brand-bg); color: var(--brand-2); }
.rec-card-big .rec-name { font-size: 14px; white-space: normal; }
.rec-card-big .rec-short { font-size: 12.5px; white-space: normal; line-height: 1.5; }
.rec-card-big .rec-actions { margin-top: 8px; }

/* ── Budget tab ──────────────────────────────────────────────────── */
.budget-tab { padding: 24px 30px 40px; overflow-y: auto; flex: 1; }
.budget-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 14px; }
.budget-card-title { font-size: 12px; font-weight: 700; margin-bottom: 14px; color: var(--ink-700); text-transform: uppercase; letter-spacing: .05em; }
.budget-card-note { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--ink-500); }
.budget-card-note .sep { color: var(--ink-300); }
.budget-amount { font-size: 36px; font-weight: 800; letter-spacing: -.03em; color: var(--ink-900); line-height: 1; }
.budget-sub { font-size: 13px; color: var(--ink-500); margin-top: 6px; }
.budget-source { display: inline-block; margin-top: 10px; padding: 3px 9px; border-radius: 12px; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--ink-600); }
.budget-card h3 { font-size: 13.5px; font-weight: 700; margin-bottom: 10px; color: var(--ink-700); }

/* Hero card (total + user budget input + gauge) */
.budget-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 14px; }
.budget-hero-left, .budget-hero-right { min-width: 0; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.budget-hero-right { gap: 12px; }
.budget-input-row { display: flex; flex-direction: column; gap: 6px; }
.budget-input-label { font-size: 11px; font-weight: 700; color: var(--ink-500); text-transform: uppercase; letter-spacing: .05em; }
.budget-input-group { display: flex; align-items: center; gap: 6px; max-width: 240px; }
.budget-input-group input { flex: 1; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; font-family: inherit; background: var(--surface); color: var(--ink-900); outline: none; transition: border-color var(--t), box-shadow var(--t); }
.budget-input-group input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.budget-input-suffix { font-size: 13px; font-weight: 600; color: var(--ink-500); }

/* Gauge */
.budget-gauge { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: var(--radius); }
.budget-gauge.ok    { background: var(--ok-bg); }
.budget-gauge.tight { background: var(--warn-bg); }
.budget-gauge.over  { background: var(--danger-bg); }
.budget-gauge-track { height: 8px; background: rgba(15,23,42,.08); border-radius: 999px; overflow: hidden; }
.budget-gauge-fill  { height: 100%; border-radius: 999px; transition: width .35s ease; }
.budget-gauge.ok    .budget-gauge-fill { background: var(--ok); }
.budget-gauge.tight .budget-gauge-fill { background: var(--warn); }
.budget-gauge.over  .budget-gauge-fill { background: var(--danger); }
.budget-gauge-text  { font-size: 12px; color: var(--ink-700); }
.budget-gauge-empty { font-size: 12px; color: var(--ink-400); padding: 8px 0; }
.gauge-over { color: var(--danger); font-weight: 700; }
.gauge-ok   { color: var(--ok); font-weight: 700; }

/* Category bars */
.budget-cat-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.budget-cat-row:last-child { margin-bottom: 0; }
.budget-cat-head { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; }
.budget-cat-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-700); }
.budget-cat-amount { font-weight: 700; color: var(--ink-900); }
.budget-bar-track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.budget-bar-fill  { height: 100%; border-radius: 999px; transition: width .35s ease; }

/* Per-day rows */
.budget-day-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.budget-day-row:last-child { border-bottom: none; }
.budget-day-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.budget-day-title { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.budget-day-segs { display: flex; flex-wrap: wrap; gap: 4px; }
.budget-day-seg { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.budget-day-total { font-size: 14px; font-weight: 800; color: var(--ink-900); white-space: nowrap; }
.budget-disclaimer { font-size: 12px; color: var(--ink-500); padding: 4px 4px; line-height: 1.5; }

.budget-breakdown-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.budget-breakdown-row:last-child { border-bottom: none; }

/* ── Alerts tab ──────────────────────────────────────────────────── */
.alerts-tab { padding: 24px 30px 40px; overflow-y: auto; flex: 1; }
.alert-card { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); margin-bottom: 10px; font-size: 13.5px; line-height: 1.5; border: 1px solid; }
.alert-icon { font-size: 18px; flex-shrink: 0; }
.alert-body { flex: 1; min-width: 0; }
.alert-card.ok     { background: var(--ok-bg);     border-color: #BBF7D0; color: #065F46; }
.alert-card.warn   { background: var(--warn-bg);   border-color: #FDE68A; color: #92400E; }
.alert-card.danger { background: var(--danger-bg); border-color: #FECACA; color: #991B1B; }
.alert-day { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .8; margin-bottom: 2px; }
.alerts-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-400); margin: 18px 0 8px; }

/* ── Map tab (full map + suggestions side) ───────────────────────── */
.map-tab { flex: 1; display: flex; min-height: 0; }
.map-tab .side-map-wrap { flex: 1; height: auto; min-height: 0; }
.map-tab .suggestions-panel { width: 380px; flex-shrink: 0; border-left: 1px solid var(--line); background: var(--surface); }

/* ── Modal (add point) ───────────────────────────────────────────── */
.modal-veil { position: fixed; inset: 0; z-index: 1000; background: rgba(15,23,42,.40); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-veil.show { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-title { font-size: 16px; font-weight: 800; color: var(--ink-900); }
.modal-close { width: 32px; height: 32px; border: none; background: transparent; color: var(--ink-400); cursor: pointer; border-radius: 8px; transition: background var(--t); display: flex; align-items: center; justify-content: center; font-size: 17px; }
.modal-close:hover { background: var(--surface-2); color: var(--ink-700); }
.modal-body { padding: 18px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 11.5px; font-weight: 700; color: var(--ink-500); text-transform: uppercase; letter-spacing: .05em; }
.field input, .field select, .field textarea { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 14px; font-family: inherit; background: var(--surface); color: var(--ink-800); outline: none; transition: border-color var(--t), box-shadow var(--t); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.field textarea { resize: vertical; min-height: 64px; line-height: 1.5; }

/* Type selector — chip grid (no native dropdown) */
.kind-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; }
.kind-chip { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; transition: all var(--t); font-size: 12.5px; color: var(--ink-700); position: relative; }
.kind-chip input { position: absolute; opacity: 0; pointer-events: none; }
.kind-chip:has(input:checked) { border-color: var(--brand); background: var(--brand-bg); color: var(--brand-2); font-weight: 600; }
.kind-chip .kind-emoji { font-size: 14px; }
.kind-chip:hover { border-color: var(--ink-300); }

/* ── Toasts ──────────────────────────────────────────────────────── */
#toast-host { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 1100; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.toast { background: var(--ink-900); color: #fff; padding: 10px 18px; border-radius: 22px; font-size: 13px; box-shadow: var(--shadow-lg); animation: toastIn .25s ease-out; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Leaflet overrides ──────────────────────────────────────────── */
.leaflet-popup-content-wrapper { border-radius: 12px !important; box-shadow: var(--shadow-lg) !important; border: none !important; }
.leaflet-popup-content { margin: 0 !important; padding: 0; }
.cockpit-marker { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 800; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.25); font-family: 'Inter', sans-serif; }
.cockpit-poi { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; font-size: 11px; }
.cockpit-village { width: 24px; height: 24px; border-radius: 50%; background: rgba(37,99,235,.85); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.20); cursor: pointer; font-size: 11px; }
.cockpit-custom { width: 26px; height: 26px; background: var(--gold); color: #fff; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25); font-size: 12px; }

.popup-inner { padding: 10px 14px; min-width: 160px; }
.popup-name { font-size: 13px; font-weight: 700; color: var(--ink-900); margin-bottom: 4px; }
.popup-sub { font-size: 11.5px; color: var(--ink-500); margin-bottom: 6px; }
.popup-actions { display: flex; gap: 4px; }
.popup-actions .btn { padding: 4px 8px; font-size: 11px; }

/* ── Scrollbar ──────────────────────────────────────────────────── */
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: 4px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ── Milestone 5.1.5 — Generated trip notebook ─────────────────────── */
/* Trip summary additions: "Voyage généré" lead, rhythm/budget-level chips,
   intent chip distinct from style. */
.trip-summary-lead { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin-bottom: 2px; }
.summary-chip.intent { background: #F5F3FF; border-color: #DDD6FE; color: #5B21B6; }
.summary-chip.rhythm { background: var(--surface-2); border-color: var(--line); color: var(--ink-700); }
.summary-chip.budget-level { background: #FEF3C7; border-color: #FDE68A; color: #92400E; }

/* Carnet layout tweak: carnet column wider so the notebook reads as the
   primary surface. Side panel slimmed accordingly. */
.carnet-layout { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); }

/* Compact side-panel map — taller than before, but POI toggles removed. */
.side-map-wrap.compact { height: 360px; }
.map-toolbar-row { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 400; display: flex; gap: 6px; align-items: center; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); padding: 6px 8px; border-radius: var(--radius); box-shadow: var(--shadow-sm); pointer-events: auto; }
.map-toolbar-spacer { flex: 1; }
.layer-toggle { background: none; border: 1px solid var(--line); padding: 4px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-600); cursor: pointer; transition: all var(--t); font-family: inherit; }
.layer-toggle:hover { background: var(--surface-2); color: var(--ink-800); }
.layer-toggle.on { background: var(--brand-bg); border-color: var(--brand-line); color: var(--brand-2); }
.map-tool { width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.map-tool:hover { background: var(--surface-2); }

/* Honest "this is not a real route" legend. */
.map-legend { position: absolute; bottom: 10px; left: 10px; z-index: 400; font-size: 11px; padding: 4px 9px; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 6px; color: var(--ink-500); font-style: italic; pointer-events: auto; }

/* Side context block — explains what the map is centred on. Compact and
   premium: an eyebrow, a single bold "Jour N — Title" line, then quiet
   stats/night/phase lines. Milestone 5.1.9. */
.side-context { padding: 14px 18px 16px; border-top: 1px solid var(--line-soft); background: var(--surface); font-size: 12.5px; color: var(--ink-600); display: flex; flex-direction: column; gap: 4px; }
.side-context-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-context-eyebrow { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-400); }
.side-context-title-row { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 2px; min-width: 0; }
.side-context-day-index { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: var(--brand-bg); color: var(--brand-2); letter-spacing: .02em; flex-shrink: 0; }
.side-context-day-title { font-size: 14px; font-weight: 700; color: var(--ink-900); letter-spacing: -.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-context-line { font-size: 12.5px; color: var(--ink-600); }
.side-context-stats { color: var(--ink-700); }
.side-context-phase { color: var(--ink-500); font-style: italic; }
.side-context-hint { font-size: 11.5px; color: var(--ink-400); font-style: italic; margin-top: 2px; }

/* Day-area chips: zone + warning hint */
.day-area { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.day-zone-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--ink-700); background: var(--surface-2); border: 1px solid var(--line-soft); padding: 2px 8px; border-radius: 10px; }
.day-warn-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; border: 1px solid; cursor: help; }
.day-warn-chip.warn { background: var(--warn-bg); color: #92400E; border-color: #FDE68A; }
.day-warn-chip.danger { background: var(--danger-bg); color: #991B1B; border-color: #FECACA; }

/* Day card footer — Milestone 5.1.9.
   Two-zone layout: stats on the left, actions on the right, both wrap
   cleanly. Distance/time stays readable on every viewport because the
   stats zone has its own row when the actions row wraps below. The
   "Réduire" (collapse) button is a quiet ghost icon — never dominates. */
.day-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 22px 14px;
  border-top: 1px dashed transparent;
}
.day-card.expanded .day-foot { border-top-color: var(--line-soft); padding-top: 12px; }
.day-foot-stats { flex: 1 1 140px; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.day-foot-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.day-foot-actions .btn { white-space: nowrap; }
.day-foot-edit { font-weight: 600; }
.day-foot-collapse { color: var(--ink-500); padding: 6px 9px; }
.day-foot-collapse:hover { color: var(--ink-800); background: var(--surface-2); }
.day-foot-collapse .caret { display: inline-block; font-size: 13px; line-height: 1; transform: translateY(-1px); }
.day-foot-collapse-label { margin-left: 4px; }
.day-foot-icon { font-size: 13px; }
.day-estimate { font-size: 11.5px; color: var(--ink-500); cursor: help; white-space: nowrap; }
@media (max-width: 640px) {
  .day-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .day-foot-stats { order: 2; }
  .day-foot-actions { order: 1; justify-content: flex-start; }
  .day-foot-collapse-label { display: none; }
}

/* Day card highlighted when its map focus is active */
.day-card.focused-on-map { border-color: var(--brand-line); box-shadow: 0 0 0 2px var(--brand-bg), var(--shadow); }

/* Hotel rec card — visually distinct from itinerary stops */
.rec-card-hotel, .rec-card-big.rec-card-hotel { background: #F0F9FF; border-color: #BAE6FD; }
.btn.btn-disabled, .btn.btn-disabled:hover { background: var(--surface-2); color: var(--ink-400); border-color: var(--line); cursor: not-allowed; opacity: .7; font-style: italic; }

/* Inline search input (used only on demand) */
.search-zone.inline { padding: 0; border-bottom: none; flex: 1; min-width: 200px; max-width: 380px; }
.toolbar-search { flex: 1; display: flex; min-width: 0; max-width: 380px; }
.toolbar-search .search-wrap { flex: 1; min-width: 0; }
.toolbar-search .search-input { width: 100%; }

/* Insight strip: link variant */
.insight-pill-link { background: transparent; border: 1px dashed var(--line); color: var(--brand-2); font-weight: 600; cursor: pointer; font-family: inherit; }
.insight-pill-link:hover { background: var(--brand-bg); border-color: var(--brand-line); }

/* Milestone 5.1.7 — critical-night + final-day adjustments */
.night-stop-critical { background: var(--danger-bg); border-color: #FECACA; color: #991B1B; }
.night-stop-critical .night-stop-text b { color: #7F1D1D; }
.night-stop-warn.critical { background: var(--danger-bg); color: #991B1B; }
.night-stop-warning.critical { background: rgba(254, 226, 226, .75); color: #991B1B; }
.night-stop-fallback { font-size: 11.5px; font-style: italic; color: var(--ink-500); margin-top: 2px; }
.final-day-banner.warn { background: var(--warn-bg); border-color: #FDE68A; color: #92400E; }
.final-day-banner.critical { background: var(--danger-bg); border-color: #FECACA; color: #991B1B; }
.final-day-detail { font-size: 11.5px; margin-top: 4px; opacity: .9; }
.alert-card.critical { background: var(--danger-bg); border-color: #FECACA; color: #991B1B; }
.alert-source { font-size: 11px; color: var(--ink-500); background: var(--surface-2); padding: 1px 8px; border-radius: 8px; margin-left: 6px; }
.alert-head { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }

/* New map markers */
.cockpit-night { width: 26px; height: 26px; background: #B45309; color: #fff; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); font-size: 13px; }
.cockpit-night.dim { opacity: .55; }
.cockpit-anchor { width: 28px; height: 28px; background: var(--ink-900); color: #fff; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.30); font-size: 14px; }
.cockpit-anchor.cockpit-anchor-loop { width: 34px; height: 34px; background: linear-gradient(135deg, var(--brand) 0%, #1e40af 100%); font-size: 16px; }
.cockpit-marker.dim { opacity: .65; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .carnet-layout { grid-template-columns: 1fr; }
  .side-panel { border-left: none; border-top: 1px solid var(--line); max-height: 60vh; }
  .side-map-wrap.compact { height: 280px; }
  .trip-summary { padding: 14px 16px; }
  .cockpit-tabs { padding: 0 16px; }
  .insight-strip { padding: 10px 16px; }
  .notebook { padding: 16px; }
  .recs-tab, .budget-tab, .alerts-tab { padding: 18px 16px; }
  .map-tab { flex-direction: column; }
  .map-tab .suggestions-panel { width: 100%; border-left: none; border-top: 1px solid var(--line); max-height: 40vh; }
  .day-head { padding: 14px 16px; }
  .day-body { padding: 4px 16px 14px; }
  .day-foot { padding: 8px 14px 14px; }
  .budget-hero { grid-template-columns: 1fr; padding: 18px; }
  .budget-amount { font-size: 30px; }
  .budget-input-group { max-width: none; }
}
