/**
 * MaxZero AppShell 2026 — couche visuelle /app
 * Ne remplace pas la logique métier : IDs stables, overlay des styles hérités.
 */

/* ── Cadre ───────────────────────────────────────────────────────────── */
:root.dark {
  --mz-bg: #0B0F17;
  --mz-bg-deep: #070A10;
  --mz-surface: #151B26;
  --mz-paper: #0B0F17;
  --mz-sidebar: #101623;
  --mz-ink: #F4F6FA;
  --mz-ink-2: #E2E8F0;
  --mz-muted: #C5D0E0;
  --mz-hint: #B4C0D0;
  --bg: #0B0F17;
  --card: #151B26;
  --text: #F4F6FA;
  --muted: #C5D0E0;
}
html, body.app-shell {
  background: var(--mz-bg, #F7F8FA);
  color: var(--mz-ink, #0F172A);
}
:root.dark html,
:root.dark body.app-shell {
  background: #0B0F17 !important;
  color: #F4F6FA !important;
}
body.modal-open .mz-bottom-nav {
  visibility: hidden;
  pointer-events: none;
}
body.modal-open #toastContainer { display: none !important; }
.modal-overlay:not(.hidden) { z-index: 11000; }
#alertModal [hidden] { display: none !important; }
#toastContainer { z-index: 400; }
.toast-info { background: #151B26; color: #F4F6FA; }
body.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  height: auto !important;
  overflow-x: hidden;
  overflow-y: auto;
}
body.app-shell .layout.mz-app-frame {
  flex: 1 0 auto;
  min-height: 0;
  height: auto !important;
  max-height: none !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: visible !important;
}
body.app-shell.tab-planner .layout.mz-app-frame {
  display: flex;
  flex-direction: column;
  overflow: visible !important;
  height: auto !important;
}
body.app-shell.tab-planner .sidebar,
body.app-shell.tab-planner .sidebar.mz-search-hero {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
body.app-shell.tab-planner .sidebar-scroll {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}
body.app-shell.tab-planner .main,
body.app-shell.tab-planner #mainContent {
  flex: 1 0 auto;
  min-height: 50vh;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
body.app-shell.tab-planner .mz-search-hero,
body.app-shell.tab-planner #sidebar,
body.app-shell.tab-planner #daySearchBtn,
body.app-shell.tab-planner #mainContent {
  visibility: visible;
}

/* ── Topbar ──────────────────────────────────────────────────────────── */
.mz-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  /* Au-dessus du contenu (filtres 20, onglets 30, suggestions 40),
     sous toasts (70), feuille Compte (80) et Filtres mobile (85). */
  z-index: 50;
  flex: 0 0 auto;
  min-height: var(--mz-topbar-offset, calc(60px + env(safe-area-inset-top, 0px)));
  padding: 8px 16px;
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  background-color: var(--mz-surface, #fff);
  background-image: none;
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--mz-border);
  transition: box-shadow .2s ease, background-color .2s ease;
}
.mz-topbar.is-scrolled {
  box-shadow: 0 1px 0 rgba(255, 106, 0, 0.32), 0 8px 22px rgba(28, 16, 8, 0.08);
}
.mz-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.mz-topbar-brand img {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(255, 106, 0, 0.28);
}
.mz-topbar-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--mz-ink);
}
.mz-top-nav.main-tabs {
  display: flex;
  flex: 1 1 auto;
  gap: 4px;
  margin: 0;
  padding: 4px;
  background: var(--mz-bg);
  border: 1px solid var(--mz-border);
  border-radius: 16px;
  box-shadow: none;
  position: static;
  max-width: 720px;
}
.mz-top-nav .main-tab {
  flex: 1;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--mz-muted);
  font-size: 13px;
  font-weight: 700;
}
.mz-top-nav .main-tab.active {
  background: var(--mz-surface);
  color: var(--mz-electric-text, #2A3FBF);
  box-shadow: var(--mz-shadow);
}
.mz-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.mz-product-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--mz-electric-soft);
  color: var(--mz-electric-text);
  font-size: 12px;
  font-weight: 800;
}
.mz-icon-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  border: 1px solid var(--mz-border-strong);
  background: var(--mz-surface);
  color: var(--mz-ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mz-icon-btn:hover { background: var(--mz-hover-tint); }
.sidebar-theme-btn .mz-theme-icon { width: 20px; height: 20px; display: block; }
.sidebar-theme-btn .mz-theme-sun { display: none; }
:root.dark .sidebar-theme-btn .mz-theme-moon { display: none; }
:root.dark .sidebar-theme-btn .mz-theme-sun { display: block; }
#mzNotifBtn { position: relative; }
.mz-notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--mz-accent, #ff6a00);
  color: #1c1008;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.mz-notif-badge.hidden { display: none; }
.account-chip-initial {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.account-chip-glyph[hidden],
.account-chip-initial[hidden] { display: none !important; }
/* Connecté : une seule marque, l’initiale. Le SVG ne respecte pas toujours [hidden]. */
.account-chip.logged .account-chip-glyph { display: none !important; }
.account-chip.logged .account-chip-icon { opacity: 1; }
.account-chip.logged .account-chip-initial:not([hidden]) {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--mz-accent-soft);
  color: var(--mz-ink);
}
.account-chip-photo {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  background: var(--mz-accent-soft, #ffe4cc);
}
.account-chip.has-photo .account-chip-glyph,
.account-chip.has-photo .account-chip-initial { display: none !important; }
.account-chip.has-photo .account-chip-icon { opacity: 1; }
@media (max-width: 700px) {
  .mz-topbar .account-chip.has-photo { overflow: hidden; }
  .mz-topbar .account-chip.has-photo .account-chip-photo {
    width: 44px;
    height: 44px;
  }
}
.user-inbox-btn { position: relative; }
.user-inbox-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--mz-electric, #3D5AFE);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.user-inbox-badge.hidden { display: none; }
.user-inbox { display: flex; flex-direction: column; gap: .65rem; margin: 0 0 1rem; }
.user-inbox-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.user-inbox-item {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  justify-content: space-between;
  align-items: flex-start;
  border: 1px solid var(--mz-border, rgba(17, 24, 39, .12));
  border-radius: 12px;
  padding: .7rem .85rem;
  background: var(--mz-surface, #fff);
}
.user-inbox-item.is-unread { box-shadow: inset 3px 0 0 var(--mz-electric, #3D5AFE); }
.user-inbox-copy p { margin: .2rem 0 0; }
.user-inbox-meta { font-size: 12px; color: var(--mz-muted, #5c6570); }
.user-inbox-actions { display: flex; gap: .75rem; align-items: center; }
.mz-topbar .account-chip {
  min-height: 44px;
  border-radius: 12px;
  background: var(--mz-bg);
  color: var(--mz-ink);
  border: 1px solid var(--mz-border-strong);
}
.mz-topbar .admin-nav,
.mz-topbar .admin-nav-btn,
.mz-topbar [data-mz-admin-only],
#adminNav,
#adminNavBtn,
#backofficeNavBtn {
  display: none !important;
}
.mz-topbar .browser-status { margin-top: 0; }
body.app-shell #browserStatus { display: none !important; }
body.app-shell.is-ops-admin #browserStatus,
body.app-shell [data-mz-admin-only] { display: none !important; }

/* Chip résumé après recherche — une ligne, le formulaire disparaît. */
.mz-search-summary-chip {
  display: none;
  width: 100%;
  max-width: 960px;
  margin: 0 auto 8px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px 8px 14px;
  border: 1px solid var(--mz-border);
  border-radius: 16px;
  background: var(--mz-surface);
  color: var(--mz-ink);
  box-shadow: var(--mz-shadow);
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.mz-search-summary-text {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mz-search-summary-edit {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  color: var(--mz-electric-text, #2A3FBF);
}

/* ── Search card (sidebar restylée) ──────────────────────────────────── */
body.app-shell .sidebar {
  width: auto;
  min-width: 0;
  height: auto !important;
  max-height: none !important;
  background-color: #fff;
  color: #202631;
  border-right: none;
  overflow: visible !important;
  display: flex;
  flex-direction: column;
}
body.app-shell .sidebar-scroll {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  padding: 16px 16px 8px;
  scrollbar-color: rgba(15, 23, 42, 0.18) transparent;
}
body.app-shell .sidebar-block {
  margin: 0 0 12px;
  padding: 16px;
  border-radius: 20px;
  background: var(--mz-surface);
  border: 1px solid var(--mz-border);
  box-shadow: var(--mz-shadow);
}
body.app-shell .sidebar-od-card { padding-bottom: 12px; }
body.app-shell .sidebar .section-label,
body.app-shell .sidebar .od-field-label {
  color: var(--mz-muted) !important;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
body.app-shell .place-search-field {
  background: var(--mz-bg) !important;
  border: 1px solid var(--mz-border-strong) !important;
  border-radius: 14px !important;
  color: var(--mz-ink) !important;
  min-height: 52px;
}
body.app-shell .place-search-field .station-search-input {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--mz-ink) !important;
  min-height: 48px;
}
body.app-shell .place-search-field:focus-within {
  outline: 2px solid var(--mz-accent, #FF6A00);
  outline-offset: 2px;
  box-shadow: none;
}
body.app-shell .place-search-field:focus-within .station-search-input:focus,
body.app-shell .place-search-field:focus-within .station-search-input:focus-visible {
  outline: none;
  box-shadow: none;
}
body.app-shell .station-search-input::placeholder {
  color: var(--mz-placeholder) !important;
}
body.app-shell .swap-btn#odSwapBtn {
  min-height: 44px;
  min-width: 44px;
  background: var(--mz-surface);
  border: 1px solid var(--mz-border-strong);
  color: var(--mz-electric-text);
  border-radius: 14px;
}
body.app-shell .explore-origin-chip {
  display: inline-flex;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--mz-electric-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
body.app-shell .od-empty-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--mz-muted);
}
body.app-shell .trip-type-toggle,
body.app-shell .time-window-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--mz-bg);
  border-radius: 14px;
  padding: 4px;
}
body.app-shell .trip-type-btn,
body.app-shell .time-window-btn,
body.app-shell .date-preset-btn,
body.app-shell .product-btn,
body.app-shell .date-leg-btn {
  min-height: 44px;
  border: 1px solid var(--mz-border) !important;
  background: var(--mz-bg) !important;
  color: var(--mz-muted) !important;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 12px;
}
body.app-shell .trip-type-btn.active,
body.app-shell .time-window-btn.active,
body.app-shell .date-preset-btn.is-active,
body.app-shell .date-preset-btn.active,
body.app-shell .product-btn.active,
body.app-shell .date-leg-btn.active {
  background: var(--mz-surface) !important;
  color: var(--mz-ink) !important;
  border-color: var(--mz-electric) !important;
  box-shadow: var(--mz-shadow);
}
body.app-shell .trip-type-btn:hover,
body.app-shell .time-window-btn:hover {
  color: var(--mz-ink) !important;
}
body.app-shell .date-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
body.app-shell .date-preset-btn {
  background: var(--mz-bg);
  border: 1px solid var(--mz-border);
}
body.app-shell .date-preset-btn.is-active {
  border-color: var(--mz-electric);
  color: var(--mz-electric-text);
}
body.app-shell .trip-type-hint,
body.app-shell .date-pick-hint,
body.app-shell .day-search-hint,
body.app-shell .product-hint,
body.app-shell .load-scope-hint {
  color: var(--mz-muted) !important;
}
body.app-shell .day-search-hint.is-blocking {
  color: var(--mz-ink) !important;
  font-weight: 600;
}
body.app-shell .day-search-cta-actions .mz-btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}
body.app-shell .sidebar-mini-cal-wrap,
body.app-shell .agenda-card {
  background: var(--mz-bg);
  border: 1px solid var(--mz-border);
  border-radius: 16px;
  color: var(--mz-ink);
}
body.app-shell .sidebar-mini-cal-wrap.is-collapsed { display: none; }
body.app-shell .smc-month,
body.app-shell .agenda-title,
body.app-shell .smc-day {
  color: var(--mz-ink) !important;
}
body.app-shell .smc-day {
  background: var(--mz-surface);
  border-color: var(--mz-border);
}
body.app-shell .smc-day.picked {
  background: var(--mz-electric-soft);
  border-color: var(--mz-electric);
  color: var(--mz-electric-text) !important;
}
body.app-shell .smc-month-block + .smc-month-block { margin-top: 14px; }
body.app-shell .smc-day.is-out-of-plan { opacity: 0.55; }
body.app-shell .smc-day.is-free-horizon { box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.45); }
body.app-shell .date-plan-limit { font-weight: 600; }
body.app-shell .smc-wd {
  color: var(--mz-muted);
  font-size: 12px;
  text-transform: lowercase;
}
body.app-shell .mz-product-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
body.app-shell .mz-product-bar .product-btn { min-height: 44px; }
body.app-shell .mz-senior-dow { font-weight: 600; }
body.app-shell .mz-app-footer {
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  color: var(--mz-muted);
  font-size: 13px;
}
body.app-shell .mz-app-footer a,
body.app-shell .mz-app-footer button {
  color: var(--mz-ink-2);
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (max-width: 700px) {
  body.app-shell .mz-app-footer {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
}
body.app-shell .mz-active-slot {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--mz-muted);
}
body.app-shell .date-plan-limit {
  color: var(--mz-electric-text);
  font-weight: 700;
}
body.app-shell .sidebar-dock {
  background: transparent !important;
  border-top: 0;
  box-shadow: none;
  padding: 8px 16px 16px;
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  transform: none;
  inset: auto;
  overflow: hidden;
  isolation: isolate;
}
body.app-shell .day-search-btn,
body.app-shell .sidebar-dock .mz-btn-primary {
  width: 100%;
  min-height: 52px;
  border-radius: 16px !important;
  font-size: 16px;
  font-weight: 800;
}
body.app-shell .advanced-search {
  background: var(--mz-surface);
  border: 1px solid var(--mz-border);
  border-radius: 16px;
  padding: 4px 14px 12px;
  margin: 0 0 16px;
}
body.app-shell .advanced-search > summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 700;
  color: var(--mz-ink);
  list-style: none;
}
body.app-shell .advanced-search > summary::-webkit-details-marker { display: none; }
body.app-shell .sidebar-legal,
body.app-shell .sidebar-legal a,
body.app-shell .mz-sncf-note {
  color: var(--mz-muted) !important;
  font-size: 12px;
}
body.app-shell .search-recents {
  margin-top: 8px;
}
body.app-shell .search-recents-list,
body.app-shell .search-recents-list.mz-chip-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}
body.app-shell .search-recent-row {
  display: contents;
}
body.app-shell .search-recent-chip {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--mz-border);
  background: var(--mz-surface);
  color: var(--mz-ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.app-shell .search-recent-chip.is-fav { border-color: var(--mz-accent); }
body.app-shell .search-recent-replay {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--mz-electric-text, var(--mz-electric));
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.app-shell .search-recent-fav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--mz-border);
  background: var(--mz-surface);
  color: var(--mz-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
body.app-shell .search-recent-fav.is-on {
  color: var(--mz-accent);
  border-color: var(--mz-accent);
}

/* Hors Recherche : le moteur reste dans le DOM mais n’occupe pas l’écran */
body.app-shell:not(.tab-planner) .sidebar,
body.app-shell:not(.tab-planner) #sidebarToggle,
body.app-shell:not(.tab-planner) #sidebarOverlay {
  display: none !important;
}
body.app-shell:not(.tab-planner) .layout.mz-app-frame {
  grid-template-columns: 1fr;
}

/* ── Main ────────────────────────────────────────────────────────────── */
body.app-shell .main {
  background: transparent;
  padding: 20px 24px 32px;
  overflow: visible;
  min-width: 0;
  height: auto;
}
body.app-shell .mz-page-brand { display: none; }
body.app-shell .welcome {
  max-width: 640px;
  margin: 8px auto 24px;
  text-align: left;
  padding: 24px;
  background: var(--mz-surface);
  border: 1px solid var(--mz-border);
  border-radius: 20px;
  box-shadow: var(--mz-shadow);
}
body.app-shell .welcome h1,
body.app-shell .welcome h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
body.app-shell .welcome-kicker {
  color: var(--mz-electric-text);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 11px;
  margin-bottom: 6px;
}
body.app-shell .welcome-lead { color: var(--mz-muted); }

/* Résultats — panneau toujours visible, jamais clipé par un flex 100dvh */
body.app-shell .mz-results-panel {
  display: block;
  width: 100%;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: visible;
  padding-bottom: 24px;
}
body.app-shell .mz-results-panel .journeys-list,
body.app-shell .mz-results-panel .detail-card {
  overflow: visible;
  max-height: none;
}
body.app-shell.has-results .search-recents { display: none; }
body.app-shell.has-results .mz-sncf-note { display: none; }
body.app-shell.has-results .sidebar-scroll { padding-bottom: 4px; }
body.app-shell.has-results .mz-search-modes,
body.app-shell.has-results .explore-origin-chip,
body.app-shell.has-results .od-empty-hint,
body.app-shell.has-results .trip-type-hint,
body.app-shell.has-results #advancedSearch {
  display: none !important;
}
/* Desktop : le formulaire reste ouvert. Chip + collapse = mobile uniquement. */
body.app-shell.has-results #mzSearchSummaryChip {
  display: none;
}
@media (max-width: 700px) {
  body.app-shell.has-results:not(.search-form-open) .mz-od-bar,
  body.app-shell.has-results:not(.search-form-open) #mzOdBar,
  body.app-shell.has-results:not(.search-form-open) .mz-search-when,
  body.app-shell.has-results:not(.search-form-open) .mz-search-cta,
  body.app-shell.has-results:not(.search-form-open) #daySearchSection,
  body.app-shell.has-results:not(.search-form-open) #sidebarDock {
    display: none !important;
  }
  body.app-shell.has-results #mzSearchSummaryChip {
    display: flex !important;
    position: sticky;
    top: var(--mz-topbar-offset, calc(60px + env(safe-area-inset-top, 0px)));
    z-index: 40;
  }
  body.app-shell.has-results.search-form-open #mzSearchSummaryChip {
    margin-bottom: 10px;
  }
}
body.app-shell.has-results .sidebar-block {
  padding: 10px 14px;
  margin-bottom: 8px;
}
body.app-shell .mz-results-header {
  position: relative;
  top: auto;
  z-index: 1;
  isolation: isolate;
  background: var(--mz-surface, #fff);
  backdrop-filter: none;
  padding: 8px 0 12px;
  margin-bottom: 8px;
}
body.app-shell .journey-card {
  background: var(--mz-surface);
  border: 1px solid var(--mz-border);
  border-radius: 18px;
  box-shadow: var(--mz-shadow);
  padding: 14px 16px;
  margin-bottom: 10px;
  overflow: hidden;
  max-width: 100%;
  transition: transform 180ms var(--mz-ease), box-shadow 180ms var(--mz-ease);
}
body.app-shell .journey-card:hover {
  box-shadow: var(--mz-shadow-md);
  transform: translateY(-1px);
}
body.app-shell .j-dep,
body.app-shell .j-arr {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
}
body.app-shell .mz-result-card .mz-result-compact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
body.app-shell .mz-result-times {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
body.app-shell .mz-result-ellipsis {
  font-weight: 700;
  color: var(--mz-muted);
  letter-spacing: 0.12em;
}
body.app-shell .mz-result-od {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--mz-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
body.app-shell .mz-result-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 13px;
  color: var(--mz-muted);
}
body.app-shell .mz-result-badge { margin-top: 6px; }
body.app-shell .mz-place-max-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
body.app-shell .mz-result-status .mz-place-max-badge {
  font-size: 14px;
  min-height: 36px;
}
body.app-shell .mz-place-max-badge .mz-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
body.app-shell .mz-result-cta {
  position: relative;
  z-index: 2;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: auto;
}
body.app-shell .mz-result-cta .j-book-btn {
  pointer-events: auto;
}
body.app-shell .day-search-btn.is-same-city,
body.app-shell .day-search-btn.is-blocked.is-same-city {
  opacity: 0.45;
  background: var(--mz-bg);
  color: var(--mz-muted);
  box-shadow: none;
}
body.app-shell .mz-filter-bar .mz-btn.active,
body.app-shell .mz-filter-sheet .mz-btn.active {
  background: var(--mz-electric, #3D5AFE);
  color: #fff;
  border-color: var(--mz-electric, #3D5AFE);
}
body.app-shell .mz-result-cta .j-book-btn.sncf {
  width: 100%;
  max-width: 320px;
}
body.app-shell .mz-result-detail {
  margin-top: 8px;
  font-size: 13px;
}
body.app-shell .mz-result-detail summary {
  cursor: pointer;
  color: var(--mz-electric-text, var(--mz-electric));
  font-weight: 600;
  list-style: none;
}
body.app-shell .mz-result-detail summary::-webkit-details-marker { display: none; }
body.app-shell .mz-results-day-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 68px;
  min-height: 72px;
  padding: 8px 10px 6px;
  border-radius: 20px;
  border: 1px solid var(--mz-border);
  background: var(--mz-surface);
  color: var(--mz-ink);
}
body.app-shell .mz-rdc-dow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: var(--mz-muted);
}
body.app-shell .mz-rdc-num {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
body.app-shell .mz-results-day-chip.active {
  border-color: var(--mz-electric);
  background: var(--mz-electric);
  color: #fff;
  box-shadow: 0 0 0 3px var(--mz-electric-soft);
}
body.app-shell .mz-results-day-chip.active .mz-rdc-dow,
body.app-shell .mz-results-day-chip.active .mz-rdc-count {
  color: rgba(255, 255, 255, 0.86);
}
body.app-shell .mz-results-day-chip.is-empty { opacity: 0.85; }
body.app-shell .mz-rdc-dot {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}
body.app-shell .mz-rdc-dot.is-on { color: var(--mz-success); }
body.app-shell .mz-rdc-dot.is-off { color: var(--mz-muted); }
body.app-shell .mz-results-day-chip.is-avail .mz-rdc-count { color: var(--mz-success); font-weight: 700; }
body.app-shell .mz-results-day-chip.is-empty .mz-rdc-count { color: var(--mz-muted); }
body.app-shell .mz-rdc-pct {
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--mz-amber-ink, #B45309);
}
body.app-shell .mz-results-day-chip.is-best-forecast {
  border-color: rgba(22, 163, 106, 0.55);
  box-shadow: 0 0 0 2px rgba(22, 163, 106, 0.18);
}
body.app-shell .mz-rdc-pct.is-listed { color: var(--mz-success, #15803d); }
body.app-shell .mz-status-ok { background: var(--mz-success-soft); color: var(--mz-success); }
body.app-shell .mz-status-confirm { background: var(--mz-success-soft); color: var(--mz-success); }
body.app-shell .mz-status-pending { background: var(--mz-warning-soft); color: var(--mz-amber-ink, #B45309); }
body.app-shell .mz-status-none { background: rgba(142, 142, 147, 0.14); color: var(--mz-muted); }

.mz-skeleton-stack { display: grid; gap: 10px; }
.mz-skeleton-card {
  height: 88px;
  border-radius: 18px;
}

/* Alertes / pages */
body.app-shell .page-panel,
body.app-shell .alerts-page,
body.app-shell .account-page {
  max-width: 760px;
}
body.app-shell .alert-item,
body.app-shell .alerts-list > article,
body.app-shell .alert-card {
  background: var(--mz-surface);
  border: 1px solid var(--mz-border);
  border-radius: 16px;
  box-shadow: var(--mz-shadow);
}

@media (max-width: 360px) {
  body.app-shell .mz-topbar {
    gap: 4px;
    padding-left: 8px;
    padding-right: 8px;
    overflow: hidden;
    max-width: 100%;
  }
  body.app-shell .mz-topbar-brand { min-width: 0; flex: 0 1 auto; }
  body.app-shell .mz-topbar-name { display: none; }
  body.app-shell .mz-topbar-actions {
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
  }
  body.app-shell .mz-topbar .mz-icon-btn { width: 40px; height: 40px; }
  body.app-shell .mz-topbar .account-chip { max-width: 38vw; }
}
@media (max-width: 430px) {
  .mz-topbar-name { display: none; }
  body.mz-has-plan-cta .mz-topbar .account-chip.logged #accountChipLabel { display: none; }
}

/* Bottom nav — native-like, safe area */
@media (max-width: 700px) {
  .mz-top-nav.main-tabs { display: none !important; }
  .mz-product-badge { display: none; }
  .mz-topbar-name { font-size: 16px; }
  body.app-shell {
    height: auto !important;
    min-height: 100dvh;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  body.app-shell .mz-topbar { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .mz-topbar-actions { gap: 4px; min-width: 0; }
  .mz-topbar .mz-icon-btn { width: 44px; height: 44px; flex: 0 0 auto; }
  .mz-topbar .account-chip {
    width: auto;
    max-width: min(52vw, 210px);
    margin-top: 0;
    padding: 4px 8px;
    min-height: 36px;
    flex: 0 1 auto;
    min-width: 0;
  }
  .mz-topbar #accountChipLabel { max-width: 72px; }
  .mz-topbar .account-plan-badge { flex: 0 0 auto; margin-left: 4px; }
  body.app-shell .layout.mz-app-frame {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr;
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
  }
  body.app-shell .sidebar,
  body.app-shell.tab-planner .sidebar {
    position: relative !important;
    z-index: auto !important;
    transform: none !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    display: block !important;
    visibility: visible !important;
  }
  body.app-shell .sidebar-scroll {
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
    flex: none !important;
    padding: 12px 12px 4px;
  }
  body.app-shell .sidebar-block { padding: 14px; margin-bottom: 10px; }
  body.app-shell .sidebar .welcome-kicker { display: none; }
  body.app-shell .od-empty-hint { font-size: 12px; }
  body.app-shell .main {
    padding: 8px 16px 16px;
    height: auto !important;
    overflow: visible !important;
  }
  body.app-shell .sidebar-dock,
  body.app-shell .sidebar-dock.mz-search-cta,
  body.app-shell.tab-planner .sidebar-dock {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 1;
    background: transparent !important;
    padding: 4px 12px 12px;
    display: block !important;
    visibility: visible !important;
  }
  body.app-shell .time-window-toggle {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
  body.app-shell .advanced-search {
    position: relative;
    z-index: 1;
  }
  body.app-shell #daySearchBtn,
  body.app-shell .mz-search-cta .day-search-btn {
    position: relative;
    bottom: auto;
    z-index: 1;
  }
  .mz-bottom-nav {
    display: grid !important;
    position: fixed !important;
    z-index: 950 !important;
    grid-template-columns: repeat(4, 1fr);
    left: 16px;
    right: 16px;
    bottom: 0;
    border-radius: 24px;
    background: var(--mz-surface);
    color: var(--mz-ink);
    pointer-events: auto;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }
  :root.dark .mz-bottom-nav {
    background: var(--mz-surface);
    color: var(--mz-ink);
    border-color: rgba(244, 246, 250, 0.22);
  }
  :root.dark .mz-bottom-nav-btn { color: var(--mz-ink); }
  :root.dark .mz-bottom-nav-btn.active { color: var(--mz-accent-text); }
  #mzNotifBtn { display: none !important; }
  .mz-topbar #accountChipLabel,
  .mz-topbar #accountPlanBadge,
  .mz-topbar .mz-product-badge { display: none !important; }
  .mz-topbar .account-chip {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 999px;
    justify-content: center;
  }
  .mz-topbar .account-chip-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
  }
  body.app-shell.tab-planner .welcome.mz-empty {
    padding: 16px;
    margin-top: 4px;
  }
}
@media (min-width: 1024px) {
  .mz-bottom-nav { display: none !important; }
}
@media (max-width: 1023px) {
  body.app-shell .mz-bottom-nav {
    z-index: 950 !important;
    pointer-events: auto;
  }
  #acctDelete,
  .acct-delete-btn {
    scroll-margin-bottom: calc(var(--mz-bottom-nav-h, 68px) + 168px);
  }
  /* L’arrivée et la feuille MAX laissent la barre du bas cliquable. */
  body.mz-onb-open .mz-onb {
    bottom: calc(var(--mz-bottom-nav-h, 68px) + env(safe-area-inset-bottom, 0px));
  }
  body.app-shell .layout.mz-app-frame {
    padding-bottom: calc(var(--mz-bottom-nav-h, 68px) + 24px);
  }
}
@media (max-width: 1023px) {
  body.app-shell .mz-top-nav.main-tabs { display: none !important; }
}
@media (min-width: 701px) {
  body.app-shell .sidebar-toggle,
  body.app-shell #sidebarOverlay { display: none !important; }
  /* Même reset que mobile : un leftover fixed/sticky agrandissait la hitbox. */
  body.app-shell .sidebar-dock,
  body.app-shell .sidebar-dock.mz-search-cta,
  body.app-shell.tab-planner .sidebar-dock,
  body.app-shell #sidebarDock {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    inset: auto !important;
  }
}

body.map-fullscreen .mz-topbar,
body.map-fullscreen .mz-bottom-nav { display: none !important; }

body.share-view:has(.share-landing) .mz-topbar .mz-top-nav,
body.share-view:has(.share-landing) .mz-bottom-nav { display: none !important; }

/* Auth moderne */
.auth-modal {
  border-radius: 20px !important;
}
.auth-hero-title { letter-spacing: -0.03em; }

/* Wizard alertes 3 étapes */
#alertModal .modal {
  max-height: min(92dvh, 760px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#alertModal .modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}
.mz-alert-steps {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.mz-alert-steps li {
  flex: 1;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--mz-border);
  background: var(--mz-bg);
  color: var(--mz-muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 4px 8px;
}
.mz-alert-steps li.is-active {
  background: var(--mz-accent-soft);
  color: var(--mz-accent-text);
  border-color: var(--mz-accent);
}
.mz-alert-steps li.is-done {
  color: var(--mz-success);
  border-color: var(--mz-success);
}
.mz-alert-step[hidden] { display: none !important; }
.notify-channel {
  border: 0;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.notify-channel .modal-label { margin-bottom: 2px; }
.notify-channel-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--mz-border);
  border-radius: 12px;
  background: var(--mz-bg);
  cursor: pointer;
}
.notify-channel-opt:has(input:checked) {
  border-color: var(--mz-accent);
  background: var(--mz-accent-soft);
}
.notify-channel-opt input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  flex: 0 0 auto;
  accent-color: var(--mz-accent);
}
.notify-channel-opt span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.notify-channel-opt small {
  color: var(--mz-muted);
  font-size: 13px;
  line-height: 1.35;
}
.notify-channel-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--mz-warning-soft, rgba(245, 158, 11, 0.16));
  color: var(--mz-amber-ink, #9a3412);
  font-size: 14px;
  line-height: 1.4;
}
:root.dark .notify-channel-note { color: #FDE68A; }
.mz-alert-wizard-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
:root.dark #alertModal .modal {
  background: var(--mz-surface);
  color: var(--mz-ink);
}
:root.dark .mz-result-od { color: #F4F6FA; }
:root.dark .mz-result-meta,
:root.dark .mz-rdc-dot.is-off,
:root.dark .mz-results-day-chip.is-empty .mz-rdc-count {
  color: #C5D0E0;
}
:root.dark body.app-shell .mz-status-ok,
:root.dark body.app-shell .mz-status-confirm { color: #86EFAC; background: rgba(22, 163, 106, 0.28); }
:root.dark body.app-shell .mz-status-pending { color: #FDE68A; background: rgba(245, 158, 11, 0.28); }
:root.dark body.app-shell .mz-status-error { color: #FECACA; background: rgba(220, 60, 77, 0.28); }
:root.dark body.app-shell .mz-status-none { color: #E2E8F0; background: rgba(148, 163, 184, 0.24); }
:root.dark .mz-place-max-badge.mz-status-ok { color: #4ADE80; background: rgba(22, 163, 106, 0.22); }
:root.dark .mz-place-max-badge.mz-status-pending { color: #FBBF24; background: rgba(245, 158, 11, 0.2); }
:root.dark .mz-place-max-badge.mz-status-none { color: #CBD5E1; background: rgba(148, 163, 184, 0.18); }
:root.dark .mz-rdc-dot.is-on,
:root.dark .mz-results-day-chip.is-avail .mz-rdc-count { color: #4ADE80; }
:root.dark .search-recent-replay { color: #8DA2FF; }
:root.dark .mz-result-detail summary { color: #8DA2FF; }

@media (prefers-reduced-motion: reduce) {
  body.app-shell .journey-card { transition: none; }
}

/* ── Parcours type SNCF Connect : OD + date + CTA, options ensuite ── */
body.app-shell .mz-when-primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
body.app-shell .mz-date-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
body.app-shell .mz-trip-secondary {
  margin-left: auto;
  padding: 3px;
}
body.app-shell .mz-trip-secondary .trip-type-btn {
  min-height: 36px;
  padding: 0 10px;
  font-size: 13px;
}
body.app-shell .sidebar-dock.mz-search-cta {
  position: relative;
  background: transparent !important;
  border-top: 0;
  box-shadow: none;
  padding: 4px 16px 12px;
}
body.app-shell .sidebar-dock.mz-search-cta .day-search-btn {
  width: 100%;
  min-height: 52px;
  border-radius: 16px !important;
  font-size: 16px;
  font-weight: 800;
}

/* #sidebarDock ne doit jamais voler le hit-test du CTA.
   Le dock héritait d’un ancrage bas (left/right/bottom, z-index 3/20)
   plus large que le bouton : elementFromPoint / Playwright.click
   retombaient sur le parent au lieu de #daySearchBtn. */
body.app-shell #sidebarDock,
body.app-shell .sidebar-dock.mz-search-cta {
  pointer-events: none;
  max-width: 100%;
  z-index: 1;
}
body.app-shell #sidebarDock .day-search-btn,
body.app-shell #sidebarDock button,
body.app-shell #sidebarDock a,
body.app-shell #sidebarDock .mz-btn,
body.app-shell #daySearchBtn:not(.is-working):not(.is-loading) {
  pointer-events: auto;
  position: relative;
  z-index: 2;
}
body.app-shell .mz-search-cta .progress-wrap:not(.visible):not(.active) {
  display: none;
}
body.app-shell .mz-chance-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  max-width: 16rem;
}
body.app-shell .mz-chance-disclaimer {
  font-size: 10px;
  line-height: 1.3;
  color: var(--mz-muted, #64748b);
  text-align: right;
}
body.app-shell .mz-chance-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
body.app-shell .mz-chance-badge.is-high {
  background: var(--mz-success-soft, rgba(22, 163, 106, 0.14));
  color: var(--mz-success, #15803d);
}
body.app-shell .mz-chance-badge.is-mid {
  background: var(--mz-warning-soft, rgba(245, 158, 11, 0.16));
  color: var(--mz-amber-ink, #B45309);
}
body.app-shell .mz-chance-badge.is-low {
  background: rgba(142, 142, 147, 0.14);
  color: var(--mz-muted, #64748b);
}
body.app-shell .mz-chance-badge.is-best {
  box-shadow: 0 0 0 2px rgba(22, 163, 106, 0.35);
}
body.app-shell .mz-chance-badge.is-listed {
  background: var(--mz-success-soft, rgba(22, 163, 106, 0.14));
  color: var(--mz-success, #15803d);
}
body.app-shell .mz-search-forecast {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--mz-border);
  background: var(--mz-bg, #f8fafc);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body.app-shell .mz-search-forecast-line {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--mz-ink, #161A22);
}
body.app-shell .mz-search-forecast .mz-forecast-horizon {
  margin: 0;
  font-weight: 600;
}
body.app-shell .mz-search-forecast .mz-btn {
  align-self: flex-start;
}
body.app-shell .mz-forecast-horizon {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--mz-ink, #161A22);
}
body.app-shell .mz-forecast-disclaimer {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(180, 83, 9, 0.22);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--mz-amber-ink, #92400e);
  position: relative;
  z-index: 1;
  isolation: isolate;
}
body.app-shell .mz-empty-forecast {
  margin: 4px auto 16px;
  max-width: 440px;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 106, 0, 0.32);
  background: var(--mz-accent-soft, rgba(255, 106, 0, 0.12));
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body.app-shell .mz-empty-forecast-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mz-accent-text, #B34700);
}
body.app-shell .mz-empty-forecast-score {
  margin: 0;
  font-size: 28px;
  font-weight: 850;
  line-height: 1.15;
  color: var(--mz-ink, #161A22);
}
body.app-shell .mz-empty-forecast-score.is-high { color: var(--mz-success, #15803d); }
body.app-shell .mz-empty-forecast-score.is-mid { color: var(--mz-accent, #FF6A00); }
body.app-shell .mz-empty-forecast-score.is-low,
body.app-shell .mz-empty-forecast-score.is-empty { color: var(--mz-muted, #64748b); }
body.app-shell .mz-empty-forecast-score.is-listed { color: var(--mz-success, #15803d); }
body.app-shell .mz-empty-forecast-score.is-teaser { color: var(--mz-accent, #FF6A00); }
body.app-shell .mz-empty-forecast-line {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--mz-ink, #161A22);
}
body.app-shell .mz-empty-forecast-adj-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
body.app-shell .mz-empty-forecast-adj {
  border: 1px solid var(--mz-border, #e2e8f0);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--mz-ink, #161A22);
  cursor: pointer;
}
body.app-shell .mz-empty-forecast .mz-btn {
  align-self: stretch;
}
body.app-shell .mz-empty-forecast .mz-forecast-disclaimer {
  margin: 0;
}
body.app-shell .mz-result-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
@media (max-width: 700px) {
  body.app-shell .mz-when-primary {
    flex-direction: column;
    align-items: stretch;
  }
  body.app-shell .mz-trip-secondary { margin-left: 0; }
  body.app-shell .mz-date-primary .date-preset-btn {
    flex: 1 1 auto;
    min-height: 44px;
  }
}
:root.dark .mz-chance-badge.is-high { color: #4ADE80; background: rgba(22, 163, 106, 0.22); }
:root.dark .mz-chance-badge.is-mid { color: #FBBF24; background: rgba(245, 158, 11, 0.2); }
:root.dark .mz-chance-badge.is-low { color: #CBD5E1; background: rgba(148, 163, 184, 0.18); }

/* Barre OD horizontale desktop — méthode SNCF (pas la marque) */
body.app-shell .mz-od-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body.app-shell .mz-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 56px;
  padding: 8px 14px;
  border-radius: 16px;
  text-align: left;
}
body.app-shell .mz-today-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
}
body.app-shell .mz-slot-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mz-muted);
}
body.app-shell .mz-slot-hint {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
body.app-shell .mz-slot-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--mz-ink);
}
body.app-shell .mz-slot-return {
  min-height: 48px;
}
body.app-shell .mz-trip-secondary #tripOnewayBtn {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
body.app-shell .mz-hour-fold-toggle {
  display: none;
}
body.app-shell .mz-hour-chips {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: visible;
  padding: 10px 0 4px;
}
@media (max-width: 1023px) {
  body.app-shell .mz-hour-fold-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--mz-border);
    background: var(--mz-surface);
    color: var(--mz-ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }
  body.app-shell #mzHourChips:not(.is-open) {
    display: flex;
  }
}
body.app-shell .mz-hour-chip {
  flex: 0 0 auto;
  min-width: 52px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--mz-border);
  background: var(--mz-surface);
  color: var(--mz-ink);
  font-weight: 700;
  cursor: pointer;
}
body.app-shell .mz-hour-chip.is-active {
  border-color: var(--mz-electric);
  background: var(--mz-electric-soft);
  color: var(--mz-electric-text);
}
body.app-shell .mz-agenda-confirm-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 8px;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--mz-surface, #fff);
}
body.app-shell #mzAgendaConfirm {
  position: relative;
  z-index: 6;
  pointer-events: auto;
}
body.app-shell .mz-lazy-fail {
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--mz-surface, #fff);
  border: 1px solid var(--mz-border, #e5e7eb);
  color: var(--mz-ink, #161A22);
  font-weight: 700;
}
body.app-shell .mz-result-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
body.app-shell .mz-result-legs { min-width: 0; flex: 1; }
body.app-shell .mz-result-leg {
  display: grid;
  grid-template-columns: 4.2em minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
body.app-shell .mz-result-od {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
body.app-shell .mz-result-station {
  font-size: 14px;
  font-weight: 600;
  color: var(--mz-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.app-shell .mz-result-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
}
body.app-shell .mz-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--mz-bg);
  border: 1px solid var(--mz-border);
  font-size: 12px;
  font-weight: 700;
  color: var(--mz-muted);
}
body.app-shell .mz-result-status {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
body.app-shell .mz-results-summary {
  background: var(--mz-surface);
  border: 1px solid var(--mz-border);
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: var(--mz-shadow);
}
body.app-shell .mz-results-summary-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 16px;
  position: relative;
  z-index: 1;
}
body.app-shell .rh-badges {
  margin-left: auto;
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
}
body.app-shell .mz-results-panes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  position: relative;
  z-index: 1;
}
body.app-shell .mz-results-pane-tab {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--mz-border);
  background: var(--mz-bg);
  font-size: 13px;
  font-weight: 700;
  color: var(--mz-ink-2, #2C3340);
  cursor: pointer;
}
body.app-shell .mz-results-pane-tab.is-active {
  background: var(--mz-ink, #161A22);
  color: #fff;
  border-color: transparent;
}
body.app-shell .mz-predictions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background-color: #fff;
  border: 1px solid var(--mz-line, #e2e6eb);
  border-radius: 16px;
}
body.app-shell .mz-predictions-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}
body.app-shell .mz-predictions-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
body.app-shell .mz-predictions-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: none;
  color: var(--mz-ink, #202631);
}
body.app-shell .mz-predictions-included {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--mz-accent-soft, #fff0e4);
  color: var(--mz-accent-text, #9e4100);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
body.app-shell .mz-predictions-lead,
body.app-shell .mz-predictions-empty {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--mz-ink-2, #2C3340);
}
body.app-shell .mz-predictions-days,
body.app-shell .mz-predictions-trajets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body.app-shell .mz-predictions-trajets + .mz-predictions-trajets {
  margin-top: 8px;
}
body.app-shell .mz-predictions-day-btn,
body.app-shell .mz-predictions-trajet-btn {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto auto;
  gap: 2px 12px;
  text-align: left;
  min-height: 56px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--mz-border);
  background: var(--mz-surface);
  cursor: pointer;
}
body.app-shell .mz-predictions-day.is-best .mz-predictions-day-btn,
body.app-shell .mz-predictions-trajet.is-best .mz-predictions-trajet-btn,
body.app-shell .mz-predictions-trajet.is-current .mz-predictions-trajet-btn {
  box-shadow: 0 0 0 2px rgba(22, 163, 106, 0.35);
}
body.app-shell .mz-predictions-od {
  font-weight: 800;
  grid-column: 1;
}
body.app-shell .mz-predictions-pct {
  font-weight: 800;
  justify-self: end;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}
body.app-shell .mz-predictions-when {
  grid-column: 1;
  font-weight: 600;
  font-size: 12px;
  color: var(--mz-muted, #6b7280);
}
body.app-shell .mz-predictions-publish {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 600;
  color: var(--mz-ink-2, #2C3340);
}
body.app-shell .mz-predictions-hint {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--mz-muted, #6b7280);
}
body.app-shell .mz-predictions-trajets {
  gap: 10px;
}
body.app-shell .mz-prediction-card {
  width: 100%;
  border-left: 4px solid #d97706;
  background:
    linear-gradient(180deg, rgba(254, 243, 199, 0.55), transparent 88px),
    var(--mz-surface, #fff);
}
body.app-shell .mz-predictions-kind {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  color: #92400e;
}
body.app-shell .mz-prediction-route {
  display: block;
  margin: 2px 0 0;
  width: 100%;
}
body.app-shell .mz-prediction-route-od {
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: var(--mz-ink, #161A22);
}
body.app-shell .mz-prediction-route-clock,
body.app-shell .mz-prediction-times {
  display: block;
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--mz-ink, #161A22);
}
body.app-shell .mz-prediction-card .j-date-badge {
  display: none;
}
body.app-shell .mz-prediction-also {
  margin: -2px 0 8px;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
  color: #6d28d9;
}
body.app-shell .mz-prediction-via,
body.app-shell .mz-prediction-legs {
  margin: -2px 0 8px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  color: #92400e;
}
body.app-shell .mz-prediction-card .j-dep,
body.app-shell .mz-prediction-card .j-arr {
  font-size: 1.35rem;
}
body.app-shell .mz-prediction-card .mz-result-station {
  font-size: 1rem;
  font-weight: 800;
}
body.app-shell .mz-prediction-score {
  display: block;
  margin-top: 2px;
  font-size: 2.15rem;
  font-weight: 850;
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--mz-ink, #161A22);
}
body.app-shell .mz-prediction-blur {
  display: inline-block;
  filter: blur(6px);
  -webkit-filter: blur(6px);
  user-select: none;
  pointer-events: none;
  letter-spacing: 0.04em;
}
body.app-shell .mz-prediction-card.is-gated .mz-prediction-score,
body.app-shell .mz-predictions.is-locked .mz-prediction-score {
  font-size: 1.35rem;
}
body.app-shell .mz-predictions-unlock {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--mz-line, #e2e6eb);
  background: var(--mz-accent-soft, #fff0e4);
  color: var(--mz-ink, #202631);
}
body.app-shell .mz-predictions-lock-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  color: var(--mz-accent, #ff6b00);
}
body.app-shell .mz-predictions-unlock-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
body.app-shell .mz-predictions-unlock .mz-btn {
  min-height: 44px;
}
body.app-shell .mz-prediction-score.is-vivid,
body.app-shell .mz-prediction-score.is-high { color: var(--mz-accent, #FF6A00); }
body.app-shell .mz-prediction-score.is-mid { color: var(--mz-accent-text, #B34700); }
body.app-shell .mz-prediction-score.is-soft { color: #9A3412; }
body.app-shell .mz-prediction-score.is-low { color: var(--mz-muted, #64748b); }
body.app-shell .mz-prediction-score.is-locked {
  filter: blur(7px);
  user-select: none;
  pointer-events: none;
}
body.app-shell .mz-prediction-why {
  margin: 8px 0 0;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--mz-ink-2, #2C3340);
}
body.app-shell .mz-prediction-confidence {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--mz-bg, #f4f6f8);
  font-size: 12px;
  font-weight: 800;
  color: var(--mz-ink-2, #2C3340);
}
body.app-shell .mz-prediction-why {
  flex: 1 0 100%;
  margin: 0;
  max-width: 16rem;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--mz-muted, #6b7280);
}
body.app-shell .mz-predictions-empty[data-mz-prediction-empty] {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--mz-bg, #f4f6f8);
  border: 1px solid var(--mz-border, #e5e7eb);
}
body.app-shell .mz-predictions-empty-why {
  margin: -4px 0 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--mz-ink-2, #2C3340);
}
body.app-shell .mz-prediction-fact-secondary {
  font-size: 13px;
  color: var(--mz-muted, #6b7280);
}
:root.dark body.app-shell .mz-prediction-card,
body.app-shell.dark .mz-prediction-card {
  border-left-color: #fbbf24;
  background:
    linear-gradient(180deg, rgba(63, 46, 18, 0.65), transparent 88px),
    var(--mz-surface, #161A22);
}
:root.dark body.app-shell .mz-predictions-kind,
body.app-shell.dark .mz-predictions-kind {
  color: #fcd34d;
}
body.app-shell .mz-prediction-card .mz-predictions-publish,
body.app-shell .mz-prediction-card .mz-predictions-hint {
  display: block;
  margin-top: 6px;
}
body.app-shell .mz-prediction-prob-null strong {
  font-weight: 550;
  color: var(--mz-muted, #6b7280);
}
body.app-shell .mz-prediction-alert {
  margin-top: 10px;
}
body.app-shell .mz-prediction-day-probs {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-self: stretch;
  margin: 0;
}
body.app-shell .mz-prediction-open-day-list {
  display: grid;
  /* Date, « N % des ouvertures », « N détections », pastille. Chaque phrase a sa colonne. */
  grid-template-columns: max-content max-content max-content max-content;
  column-gap: 8px;
  row-gap: 2px;
  align-items: baseline;
  justify-items: start;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
body.app-shell .mz-prediction-open-day {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: baseline;
  justify-items: start;
  column-gap: 8px;
  width: auto;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 1px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
}
body.app-shell .mz-prediction-open-day.is-primary {
  background: transparent;
  border: 0;
  font-weight: 800;
}
body.app-shell .mz-prediction-open-when {
  min-width: 0;
  overflow-wrap: break-word;
}
body.app-shell .mz-prediction-open-pct {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  white-space: nowrap;
  min-width: max-content;
}
body.app-shell .mz-prediction-open-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--mz-accent-text, #B34700);
  white-space: nowrap;
}
:root.dark body.app-shell .mz-prediction-open-day,
body.app-shell.dark .mz-prediction-open-day,
:root.dark body.app-shell .mz-prediction-open-day.is-primary,
body.app-shell.dark .mz-prediction-open-day.is-primary {
  background: transparent;
  border-color: transparent;
}
body.app-shell .mz-prediction-facts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--mz-bg, #f4f6f8);
}
body.app-shell .mz-prediction-fact {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}
body.app-shell .mz-prediction-k {
  flex: 0 0 9.5rem;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mz-muted, #6b7280);
}
body.app-shell .mz-prediction-fact strong {
  font-weight: 800;
}
body.app-shell .mz-prediction-pattern {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--mz-ink, #161A22);
}
body.app-shell .mz-prediction-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #FEF3C7;
  color: #92400E;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
:root.dark body.app-shell .mz-prediction-badge,
body.app-shell.dark .mz-prediction-badge {
  background: #3f2e12;
  color: #FCD34D;
}
body.app-shell .mz-prediction-badge-weak {
  background: rgba(100, 116, 139, 0.16);
  color: #475569;
}
:root.dark body.app-shell .mz-prediction-badge-weak,
body.app-shell.dark .mz-prediction-badge-weak {
  background: rgba(148, 163, 184, 0.18);
  color: #CBD5E1;
}
body.app-shell .mz-prediction-card.is-weak {
  border-left-color: #94a3b8;
}
body.app-shell .mz-predictions-weak-heading {
  margin: 10px 0 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--mz-muted, #64748b);
}
body.app-shell .mz-predictions-weak-heading.is-low {
  color: #64748b;
}
:root.dark body.app-shell .mz-predictions-weak-heading,
:root.dark body.app-shell .mz-predictions-weak-heading.is-low,
body.app-shell.dark .mz-predictions-weak-heading,
body.app-shell.dark .mz-predictions-weak-heading.is-low {
  color: #cbd5e1;
}
body.app-shell .mz-prediction-card .mz-rail-times {
  margin: 8px 0 2px;
}
body.app-shell .mz-prediction-card .mz-prediction-legs {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-self: stretch;
  margin: 8px 0 0;
  color: var(--mz-ink, #161A22);
}
body.app-shell .mz-prediction-card .mz-prediction-leg {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) auto 3.25rem minmax(0, 1fr) auto;
  column-gap: 6px;
  row-gap: 0;
  align-items: baseline;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--mz-ink, #161A22);
}
body.app-shell .mz-prediction-leg-time {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  white-space: nowrap;
}
body.app-shell .mz-prediction-leg-station {
  min-width: 0;
  overflow-wrap: break-word;
}
body.app-shell .mz-prediction-leg-arrow {
  color: var(--mz-muted, #64748b);
}
body.app-shell .mz-prediction-leg-train {
  white-space: nowrap;
  color: var(--mz-muted, #64748b);
  font-weight: 700;
}
body.app-shell .mz-prediction-wait {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
}
body.app-shell .mz-prediction-status {
  background: rgba(255, 106, 0, 0.12);
  color: var(--mz-accent-text, #B34700);
}
body.app-shell .mz-results-date-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 2px 2px 6px;
}
body.app-shell .mz-results-date-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid var(--mz-border, #e5e7eb);
  background: var(--mz-surface, #fff);
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
body.app-shell .mz-results-date-tab .mz-rdc-dow {
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
  color: inherit;
}
body.app-shell .mz-results-date-tab.is-active {
  background: var(--mz-ink, #161A22);
  color: #fff;
  border-color: transparent;
}
body.app-shell .mz-results-date-tab:focus-visible {
  outline: 2px solid var(--mz-electric, #3D5AFE);
  outline-offset: 2px;
}
body.app-shell .mz-results-date-panel {
  position: relative;
  display: block;
  width: 100%;
}
body.app-shell .mz-empty-predictions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
body.app-shell .mz-predictions-selected,
body.app-shell .mz-predictions-coverage,
body.app-shell .mz-predictions-freshness,
body.app-shell .mz-predictions-history {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--mz-ink, #161A22);
}
body.app-shell .mz-predictions-coverage,
body.app-shell .mz-predictions-history {
  color: var(--mz-muted, #6b7280);
  font-size: 13px;
}
body.app-shell .mz-predictions-freshness {
  color: var(--mz-ink, #161A22);
  font-size: 15px;
  font-weight: 800;
}

/* Accordéon jours : le panneau déplié pousse les frères, jamais en superposition. */
body.app-shell .mz-results-day-list,
body.app-shell .mz-results-days.mz-results-day-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  isolation: isolate;
}
body.app-shell .mz-results-day-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
body.app-shell .mz-results-day-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
body.app-shell .mz-results-day-item {
  position: relative;
  z-index: 0;
  display: block;
  background: var(--mz-surface, #fff);
  border: 1px solid var(--mz-border, #e5e7eb);
  border-radius: 16px;
  overflow: visible;
}
body.app-shell .mz-results-day-item.is-expanded {
  z-index: 1;
}
body.app-shell .mz-results-day-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 2px 12px;
  text-align: left;
  min-height: 56px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
body.app-shell .mz-results-day-when,
body.app-shell .mz-results-day-when.mz-rdc-dow {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  color: inherit;
}
body.app-shell .mz-results-day-status {
  font-weight: 800;
  justify-self: end;
}
body.app-shell .mz-results-day-status.is-listed {
  color: var(--mz-success, #15803d);
}
body.app-shell .mz-results-day-hint {
  grid-column: 2 / -1;
  font-size: 12px;
  color: var(--mz-muted, #6b7280);
}
body.app-shell .mz-results-day-row .mz-rdc-dot {
  grid-row: 1 / span 2;
  align-self: center;
}
body.app-shell .mz-results-day-expand {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  overflow: visible;
  margin: 0;
  padding: 0 12px 14px;
  background: var(--mz-surface, #fff);
  border-top: 1px solid var(--mz-border, #e5e7eb);
}
body.app-shell .mz-results-day-expand-body {
  position: relative;
  display: block;
  height: auto;
  overflow: visible;
}
body.app-shell .mz-result-city {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--mz-muted, #6b7280);
  line-height: 1.25;
}
body.app-shell .mz-results-leg-tag {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mz-electric-text);
}
body.app-shell .mz-results-when { font-weight: 700; }

@media (min-width: 901px) {
  body.app-shell.tab-planner .sidebar-scroll { padding: 16px 24px 8px; }
  body.app-shell.tab-planner .mz-od-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 22px 16px;
    border-radius: 24px;
    background: var(--mz-surface);
    border: 1px solid var(--mz-border);
    box-shadow: var(--mz-shadow-md);
  }
  body.app-shell.tab-planner .mz-od-bar .sidebar-block,
  body.app-shell.tab-planner .mz-od-bar .sidebar-dock {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  body.app-shell.tab-planner .od-stack {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 8px;
  }
  body.app-shell.tab-planner .swap-row { margin: 0; }
  body.app-shell.tab-planner .swap-btn#odSwapBtn {
    border-radius: 50%;
    width: 44px;
    min-width: 44px;
    padding: 0;
  }
  body.app-shell.tab-planner .swap-btn-label { display: none; }
  body.app-shell.tab-planner .mz-when-primary {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
  }
  body.app-shell.tab-planner .mz-date-primary,
  body.app-shell.tab-planner .mz-trip-secondary {
    margin: 0;
    flex: 1 1 0;
    min-width: 0;
  }
  body.app-shell.tab-planner .mz-slot-date,
  body.app-shell.tab-planner .mz-slot-return {
    width: 100%;
    min-height: 56px;
  }
  body.app-shell.tab-planner .mz-od-bar .mz-search-when,
  body.app-shell.tab-planner .mz-od-bar .mz-search-cta {
    border-left: 0;
    padding-left: 0;
  }
  body.app-shell.tab-planner .welcome-kicker { display: none; }
  body.app-shell.tab-planner .date-preset-btn:not(.mz-slot):not(.mz-today-chip) { display: none; }
  body.app-shell.tab-planner .sidebar-dock.mz-search-cta .day-search-btn {
    width: 100% !important;
    min-height: 56px;
    min-width: 0;
    border-radius: 16px !important;
    white-space: nowrap;
    padding: 0 22px;
    font-size: 16px;
    overflow: visible;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }
  body.app-shell.tab-planner .sidebar-dock.mz-search-cta {
    padding: 4px 0 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    max-width: none;
  }
  body.app-shell.tab-planner .day-search-hint {
    display: block;
    margin: 0;
    text-align: left;
    white-space: normal;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
  }
  body.app-shell.tab-planner .day-search-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  body.app-shell.tab-planner .mz-search-when { position: relative; }
  body.app-shell.tab-planner #sidebarMiniCalWrap:not(.is-collapsed) {
    position: fixed;
    z-index: 220;
    top: 72px;
    right: 24px;
    display: block;
    width: min(640px, calc(100vw - 48px));
    max-height: none;
    overflow: visible;
    padding: 14px 16px 16px;
    border-radius: 22px;
    background: var(--mz-surface);
    border: 1px solid var(--mz-border);
    box-shadow: var(--mz-shadow-lg);
  }
  body.app-shell #sidebarMiniCal,
  body.app-shell .sidebar-mini-cal {
    overflow: visible;
    max-height: none;
  }
}

body.app-shell .mz-agenda-backdrop { display: none; }
body.app-shell.mz-agenda-open .pwa-install-banner,
body.app-shell.tab-planner .pwa-install-banner {
  display: none !important;
}
body.app-shell.mz-agenda-open #sidebar {
  position: relative;
  z-index: 10040;
  isolation: isolate;
}
body.app-shell.mz-agenda-open .mz-agenda-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: rgba(15, 23, 42, 0.32);
}
body.app-shell.mz-agenda-open #sidebarMiniCalWrap:not(.is-collapsed) {
  z-index: 10050 !important;
}
body.app-shell .journey-card.mz-result-card {
  background: var(--mz-surface);
  border: 1px solid var(--mz-border-strong, var(--mz-border));
  box-shadow: var(--mz-shadow-md);
}
body.app-shell .agenda-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
body.app-shell .mz-agenda-close {
  flex-shrink: 0;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--mz-electric-text);
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 1023px) {
  body.app-shell.mz-agenda-open .mz-agenda-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10040;
    background: rgba(15, 23, 42, 0.42);
  }
  body.app-shell.mz-agenda-open .mz-bottom-nav {
    z-index: 30 !important;
    pointer-events: none;
  }
  body.app-shell #sidebarMiniCalWrap.mz-agenda-sheet:not(.is-collapsed) {
    position: fixed;
    z-index: 10050;
    inset: 0;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 100vw;
    height: 100dvh;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    display: block;
    margin: 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: 0;
    background: var(--mz-surface);
    border: 0;
    box-shadow: none;
  }
  body.app-shell .mz-agenda-confirm-row {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  body.app-shell .mz-agenda-confirm-row .mz-btn {
    width: 100%;
    min-height: 48px;
    border-radius: 999px;
  }
  body.app-shell .mz-when-primary {
    flex-direction: column;
    align-items: stretch;
  }
  body.app-shell .mz-trip-secondary { margin-left: 0; }
  body.app-shell .mz-slot-return {
    width: 100%;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    border-radius: 999px;
  }
}

@media (max-width: 1023px) {
  body.app-shell .mz-od-bar .mz-slot-date { width: 100%; }
  body.app-shell .mz-search-cta .day-search-btn {
    width: 100%;
    border-radius: 999px !important;
  }
}

/* Recherche au repos : pas de carte sous le formulaire. */
body.app-shell.tab-planner:not(.has-results) #mainContent:empty {
  display: none !important;
  min-height: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
  overflow: hidden !important;
}

/* ── V2 search modes + MAX-first results ───────────────────────── */
.mz-search-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 4px;
  background: var(--mz-bg);
  border-radius: 14px;
}
.mz-search-mode {
  flex: 1 1 0;
  min-height: 40px;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--mz-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.mz-search-mode.active {
  background: var(--mz-surface);
  color: var(--mz-ink);
  box-shadow: var(--mz-shadow);
}
.mz-search-mode:focus-visible {
  outline: var(--mz-focus);
  outline-offset: 2px;
}
body.app-shell .day-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.02em;
}
body.app-shell .day-search-btn .svg-icon,
body.app-shell .day-search-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
body.app-shell #plannerSavedRoutes,
body.app-shell .planner-saved-routes {
  display: none !important;
}
body.app-shell .search-recents {
  max-width: 960px;
  margin: 8px auto 0;
  padding: 0 4px;
}
body.app-shell .mz-place-max-badge.mz-status-ok {
  background: var(--mz-success-soft);
  color: var(--mz-success);
}
body.app-shell .mz-place-max-badge.mz-status-none {
  background: rgba(15, 23, 42, 0.06);
  color: var(--mz-ink-2);
}
body.app-shell .mz-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 12px;
}
body.app-shell .mz-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
body.app-shell .mz-filter-sheet-toggle {
  display: none;
}
body.app-shell .mz-filter-sheet {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}
body.app-shell .mz-filter-bar .mz-select {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--mz-border-strong);
  background: var(--mz-surface);
  color: var(--mz-ink);
  padding: 0 10px;
  font-weight: 600;
}
body.app-shell .mz-sticky-alert-cta {
  position: sticky;
  bottom: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--mz-surface);
  border: 1px solid var(--mz-border);
  box-shadow: var(--mz-shadow-md);
}
body.app-shell .mz-sticky-alert-cta p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
body.app-shell .mz-result-cta .j-booking-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
body.app-shell .mz-results-day-chip {
  min-width: 76px;
}
body.app-shell .mz-trips-page {
  max-width: 760px;
  margin: 0 auto;
}
@media (max-width: 700px) {
  .mz-search-mode { font-size: 12px; min-height: 44px; }
  body.app-shell .mz-top-nav.main-tabs { display: none !important; }
}

/* Kill-switch accueil : pas de clip 100vh tant qu’il n’y a pas de résultats. */
html:has(body.app-shell),
body.app-shell:not(.has-results) {
  height: auto !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}
body.app-shell:not(.has-results) .layout,
body.app-shell:not(.has-results) .layout.mz-app-frame,
body.app-shell:not(.has-results) .sidebar,
body.app-shell:not(.has-results) .sidebar.mz-search-hero,
body.app-shell:not(.has-results) .sidebar-scroll,
body.app-shell:not(.has-results) .main,
body.app-shell:not(.has-results) #mainContent {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Résultats : le document défile. Le formulaire part, le bandeau et les filtres restent collés. */
body.app-shell.has-results {
  height: auto !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}
body.app-shell.has-results .layout,
body.app-shell.has-results .layout.mz-app-frame {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: visible;
}
@media (max-width: 700px) {
  body.app-shell.has-results .layout,
  body.app-shell.has-results .layout.mz-app-frame {
    display: flex;
    flex-direction: column;
  }
  body.app-shell.has-results .sidebar,
  body.app-shell.has-results .sidebar.mz-search-hero,
  body.app-shell.has-results .sidebar.mz-search-card {
    width: 100%;
  }
}
body.app-shell.has-results .sidebar,
body.app-shell.has-results .sidebar.mz-search-hero,
body.app-shell.has-results .sidebar.mz-search-card {
  flex: 0 0 auto;
  height: auto;
  max-height: none;
  overflow: visible;
}
@media (min-width: 701px) {
  body.app-shell.has-results:not(.search-form-open) .sidebar,
  body.app-shell.has-results:not(.search-form-open) .sidebar-scroll {
    overflow: visible !important;
    max-height: none !important;
  }
}
body.app-shell.has-results .sidebar-scroll {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
body.app-shell.has-results .main,
body.app-shell.has-results #mainContent {
  flex: 1 1 auto !important;
  min-height: 58vh !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  -webkit-overflow-scrolling: touch;
}
body.app-shell.has-results .mz-results-panel,
body.app-shell.has-results .mz-results-panel .journeys-list,
body.app-shell.has-results .mz-results-panel .detail-card {
  display: block !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  min-height: 0;
}
body.app-shell.has-results .mz-results-panel {
  min-height: 0;
  padding-bottom: 24px;
}
body.app-shell.has-results .mz-results-day-expand .mz-results-panel {
  min-height: 0;
  padding-bottom: 8px;
}
body.app-shell.has-results .mz-results-header {
  padding: 4px 0 8px;
  margin-bottom: 4px;
}
body.app-shell.has-results .mz-query-summary,
body.app-shell.has-results .mz-results-trust,
body.app-shell.has-results .mz-freshness-disclaimer,
body.app-shell.has-results .mz-freshness-why {
  display: none;
}
body.app-shell.has-results .mz-results-days {
  position: relative;
  top: auto;
  z-index: 1;
  padding: 0;
  margin: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
body.app-shell.has-results .mz-results-day-chip {
  min-width: 56px;
  min-height: 52px;
  padding: 4px 8px;
}
@media (max-width: 700px) {
  body.app-shell.has-results.search-form-open .sidebar,
  body.app-shell.has-results.search-form-open .sidebar.mz-search-hero {
    max-height: min(46vh, 420px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  body.app-shell.has-results .sidebar,
  body.app-shell.has-results .sidebar.mz-search-hero {
    max-height: none !important;
  }
  body.app-shell.has-results:not(.search-form-open) .sidebar,
  body.app-shell.has-results:not(.search-form-open) .sidebar.mz-search-hero,
  body.app-shell.has-results:not(.search-form-open) .sidebar-scroll {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
  }
  body.app-shell.has-results {
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  body.app-shell.has-results .layout,
  body.app-shell.has-results .layout.mz-app-frame,
  body.app-shell.has-results .main,
  body.app-shell.has-results #mainContent {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  body.app-shell.has-results .mz-filter-sheet-toggle {
    display: inline-flex;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--mz-border-strong);
    background: var(--mz-surface);
    color: var(--mz-ink);
    font-weight: 700;
  }
  body.app-shell.has-results:not(.filters-open) .mz-filter-sheet {
    display: none;
    position: static;
    top: auto;
    z-index: auto;
  }
  body.app-shell.has-results.filters-open .mz-filter-sheet {
    display: flex;
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    z-index: 80;
    width: auto;
    max-height: min(56vh, 420px);
    overflow-y: auto;
    padding: 14px;
    border-radius: 20px 20px 16px 16px;
    background: var(--mz-surface);
    border: 1px solid var(--mz-border);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
  }
  body.app-shell.has-results .mz-filter-sheet-close {
    display: inline-flex;
  }
  body.app-shell .mz-result-row {
    flex-direction: column;
    align-items: stretch;
  }
  body.app-shell .mz-result-status {
    align-items: flex-start;
    order: -1;
  }
}
body.app-shell .mz-filter-sheet-close { display: none; }

/* Première alerte — parcours court, chrome clair */
#firstAlertFlow.modal-overlay { z-index: 13000; }
#firstAlertFlow .first-alert-dialog { max-width: 440px; }
#firstAlertFlow .first-alert-other { margin-top: 4px; }
#firstAlertFlow .modal-body { gap: 8px; }
#firstAlertFlow .first-alert-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mz-muted, #64748b);
}
#firstAlertFlow h2 {
  margin: 8px 0 6px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
#firstAlertFlow .modal-body p { margin: 0 0 12px; color: var(--mz-ink-2, #334155); }
#firstAlertFlow .first-alert-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border-radius: 14px;
  text-align: left;
  max-width: 100%;
}
#firstAlertFlow .first-alert-chip-hint {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.8;
}
#firstAlertFlow .first-alert-recap {
  border: 1px solid var(--mz-border, #e2e8f0);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 12px;
  background: var(--mz-bg, #f7f8fa);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#firstAlertFlow .first-alert-recap strong { font-size: 1.05rem; }
#firstAlertFlow .first-alert-success {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mz-ink, #0f172a);
}
#firstAlertFlow .first-alert-note {
  font-size: 13px;
  color: var(--mz-muted, #64748b);
  margin: 0;
}
#firstAlertFlow .modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
:root.dark #firstAlertFlow .first-alert-recap { background: #101623; }
:root.dark #firstAlertFlow .first-alert-success { color: #f4f6fa; }
@media (min-width: 1280px) {
  body.app-shell .mz-filter-sheet-close { display: none !important; }
}

/* ── Onboarding + plan header ───────────────────────────────────────── */
.mz-plan-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--mz-border, #d5dbe3);
  background: var(--mz-surface, #fff);
  color: var(--mz-ink, #0f172a);
  font: 800 13px/1 var(--mz-font);
  cursor: pointer;
}
.mz-plan-cta[hidden] { display: none !important; }
.mz-plan-cta:focus-visible,
.mz-onb :focus-visible,
.mz-max-card :focus-visible {
  outline: var(--mz-focus);
  outline-offset: var(--mz-focus-offset);
  box-shadow: var(--mz-focus-ring);
}
.mz-onb {
  position: fixed;
  inset: 0;
  z-index: 9000;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-color: #16324f;
  background-image: url('/media/hero-atmosphere.webp?v=20260924uxf2');
  background-position: center 42%;
  background-size: cover;
  background-repeat: no-repeat;
}
.mz-onb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--mz-hero-veil);
}
.mz-onb > * {
  position: relative;
  z-index: 1;
}
.mz-onb[hidden] { display: none !important; }
body.mz-onb-open { overflow: hidden; }
.mz-onb-hero {
  color: #fff;
  padding: 28px 20px 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.mz-onb-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffe1c7;
}
.mz-onb-title {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.mz-onb-hero .mz-onb-title { color: #fff; }
.mz-onb-lead {
  margin: 0;
  max-width: 36rem;
  font-size: 16px;
  line-height: 1.45;
  color: #f4f7fb;
}
.mz-onb-panel {
  background: var(--mz-surface, #fff);
  color: var(--mz-ink, #0f172a);
  border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  max-height: 78dvh;
  overflow: auto;
}
.mz-onb-wizard { justify-content: center; }
.mz-onb-wizard .mz-onb-panel {
  max-height: 92dvh;
  margin: 12px;
  border-radius: 20px;
}
.mz-onb-progress { margin: 0 0 12px; }
.mz-onb-progress-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mz-muted, #5c6b80);
}
.mz-onb-progress-track {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--mz-border);
  overflow: hidden;
}
.mz-onb-progress-fill {
  display: block;
  height: 100%;
  background-color: var(--mz-accent);
  background-image: linear-gradient(135deg, var(--mz-accent-bright), var(--mz-accent));
}
.mz-onb-back,
.mz-onb-btn,
.mz-onb-input,
.mz-onb-choice,
.mz-onb-city,
.mz-onb-link,
.mz-onb-tab {
  min-height: 44px;
}
.mz-onb-back {
  display: inline-flex;
  align-items: center;
  margin: 0 0 8px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--mz-accent-text);
  font: 700 15px/1 var(--mz-font);
  cursor: pointer;
}
.mz-onb-label {
  display: block;
  margin: 10px 0 4px;
  font-size: 14px;
  font-weight: 700;
}
.mz-onb-optional { font-weight: 500; color: var(--mz-muted, #5c6b80); }
.mz-onb-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--mz-border, #d5dbe3);
  background: var(--mz-bg, #fff);
  color: inherit;
  font: 500 16px/1.3 var(--mz-font);
}
.mz-onb-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.4;
}
.mz-onb-check input { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--mz-accent); }
.mz-onb-check a { color: var(--mz-accent-text); }
.mz-onb-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  font: 800 16px/1.2 var(--mz-font);
  cursor: pointer;
}
.mz-onb-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.mz-onb-btn-primary {
  background-color: var(--mz-accent);
  background-image: linear-gradient(135deg, var(--mz-accent-bright), var(--mz-accent));
  color: var(--mz-on-accent);
  box-shadow: 0 2px 8px rgba(255, 106, 0, 0.28);
}
.mz-onb-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--mz-accent), var(--mz-accent-press));
}
.mz-onb-btn-primary:disabled {
  opacity: 1;
  color: var(--mz-ink);
  background: var(--mz-accent-soft);
  box-shadow: none;
}
.mz-onb-btn-secondary {
  background: var(--mz-surface);
  color: var(--mz-ink);
  border-color: var(--mz-border-strong);
}
.mz-onb-btn-hint { display: block; font-size: 13px; font-weight: 600; opacity: 0.85; }
.mz-onb-choices { display: flex; flex-direction: column; gap: 8px; }
.mz-onb-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid var(--mz-border, #d5dbe3);
  background: var(--mz-bg, #fff);
  color: inherit;
  font: 800 16px/1.2 var(--mz-font);
  cursor: pointer;
  text-align: left;
}
.mz-onb-choice.is-on {
  border-color: var(--mz-accent);
  background: var(--mz-accent-soft);
  color: var(--mz-ink);
}
.mz-onb-none {
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.45;
}
.mz-onb-link {
  display: inline-flex;
  align-items: center;
  color: var(--mz-accent-text);
  font-weight: 700;
}
.mz-onb-row { display: flex; gap: 8px; }
.mz-onb-row .mz-onb-btn { flex: 1; }
.mz-onb-cities { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.mz-onb-city {
  text-align: left;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--mz-border, #d5dbe3);
  background: var(--mz-bg, #fff);
  color: inherit;
  font: 700 15px/1.2 var(--mz-font);
  cursor: pointer;
}
.mz-onb-perks { margin: 8px 0 12px; padding-left: 1.1rem; }
.mz-onb-perks li { margin: 6px 0; }
.mz-onb-perks li::marker { color: var(--mz-accent); }
.mz-onb-error { color: var(--mz-danger); font-weight: 700; margin: 0 0 8px; }
.mz-onb-auth .mz-onb-error:not(.is-on) { margin: 0; }
.mz-onb-error.is-on {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--mz-danger) 42%, transparent);
  background: var(--mz-danger-soft);
  color: var(--mz-danger);
  font-size: 14px;
  line-height: 1.4;
}
.mz-onb-error-text { margin: 0; }
.mz-onb-error-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 8px 8px 0 0;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--mz-danger) 50%, transparent);
  background: var(--mz-surface, #fff);
  color: var(--mz-danger);
  font: 700 14px/1 var(--mz-font);
  cursor: pointer;
}
.mz-onb-duplicate-actions { display: flex; flex-direction: column; gap: 8px; margin: 0 0 10px; }
.mz-onb-duplicate-actions[hidden] { display: none !important; }
#mzMaxCardError[hidden] { display: none !important; }
.mz-onb-note { margin: 8px 0 0; font-size: 13px; color: var(--mz-muted, #5c6b80); }
.mz-onb-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 12px;
  padding: 4px;
  border-radius: 14px;
  background: var(--mz-bg, #f4f6f8);
  border: 1px solid var(--mz-border, #d5dbe3);
}
.mz-onb-tab {
  flex: 1 1 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--mz-ink, #0f172a);
  font: 700 15px/1.2 var(--mz-font);
  cursor: pointer;
}
.mz-onb-tab.is-on,
.mz-onb-tab[aria-selected="true"] {
  background: var(--mz-surface, #fff);
  color: var(--mz-accent-text);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--mz-ink, #0f172a) 12%, transparent);
}
.mz-onb-auth[hidden] { display: none !important; }
.mz-onb-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.mz-onb-brand img { width: 28px; height: 28px; border-radius: 8px; }
.mz-onb-trial { margin: 10px 0 0; font-weight: 800; color: #ffe1c7; }
.mz-max-card-lead {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--mz-muted, #5c6b80);
}
html.mz-auth-locked body.app-shell .layout,
html.mz-auth-locked body.app-shell .layout.mz-app-frame,
html.mz-auth-locked body.app-shell .sidebar,
html.mz-auth-locked #mzBottomNav,
html.mz-auth-locked #mzTopNav,
html.mz-auth-locked #mzAppFooter,
html.mz-auth-locked #appUpdateBanner {
  display: none !important;
}
html.mz-auth-locked body.mz-onb-open .mz-onb {
  bottom: 0;
}
/* Une recherche en cours reste lisible : la question MAX ne la recouvre pas. */
body.has-results .mz-max-card {
  display: none !important;
}
.mz-max-card {
  position: fixed;
  z-index: 450;
  left: 12px;
  right: 12px;
  bottom: calc(var(--mz-bottom-nav-h, 68px) + 12px + env(safe-area-inset-bottom, 0px));
  padding: 14px;
  border-radius: 16px;
  background: var(--mz-surface, #fff);
  color: var(--mz-ink, #0f172a);
  border: 1px solid var(--mz-border, #d5dbe3);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
}
.mz-max-card-title { margin: 0 0 8px; font-weight: 800; }
.mz-max-card-actions { display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 800px) {
  .mz-onb { justify-content: center; align-items: center; padding: 32px 16px; }
  .mz-onb-hero,
  .mz-onb-panel { width: min(480px, 100%); }
  .mz-onb-hero { text-align: left; padding: 0 0 16px; }
  .mz-onb-panel {
    border-radius: 20px;
    max-height: min(80dvh, 740px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  }
  .mz-onb-wizard .mz-onb-panel { margin: 0; }
  .mz-max-card { left: auto; right: 24px; width: min(380px, calc(100% - 48px)); bottom: 24px; }
}
@media (max-width: 700px) {
  .mz-plan-cta { padding: 0 8px; font-size: 12px; }
}
:root.dark .mz-onb-panel,
:root.dark .mz-max-card,
:root.dark .mz-plan-cta {
  background: var(--mz-surface);
  color: var(--mz-ink);
}
:root.dark .mz-onb-input,
:root.dark .mz-onb-choice,
:root.dark .mz-onb-city,
:root.dark .mz-onb-btn-secondary {
  background: var(--mz-bg);
  color: var(--mz-ink);
  border-color: var(--mz-border-strong);
}
:root.dark .mz-onb-choice.is-on {
  background: var(--mz-accent-soft);
  border-color: var(--mz-accent);
  color: var(--mz-ink);
}
:root.dark .mz-onb-btn-primary {
  color: var(--mz-on-accent);
}
:root.dark .mz-onb-back,
:root.dark .mz-onb-link,
:root.dark .mz-onb-check a,
:root.dark .mz-onb-tab.is-on,
:root.dark .mz-onb-tab[aria-selected="true"] {
  color: var(--mz-accent-text);
}
:root.dark .mz-onb-tabs {
  background: var(--mz-bg);
  border-color: var(--mz-border-strong);
}
:root.dark .mz-onb-tab.is-on,
:root.dark .mz-onb-tab[aria-selected="true"] {
  background: var(--mz-surface);
}

/* La barre colle au viewport. overflow:hidden/auto sur html ou body
   crée un scrollport plus grand que l’écran : sticky part avec le document. */
html:has(body.app-shell) {
  --mz-topbar-offset: calc(60px + env(safe-area-inset-top, 0px));
  scroll-padding-top: calc(var(--mz-topbar-offset) + 8px);
  overflow-x: clip !important;
  overflow-y: visible !important;
  height: auto !important;
  max-height: none !important;
}
body.app-shell,
body.app-shell:not(.has-results),
body.app-shell.has-results {
  overflow-x: clip !important;
  overflow-y: visible !important;
}
@media (max-width: 700px) {
  html:has(body.app-shell),
  body.app-shell,
  body.app-shell.has-results {
    overflow-x: clip !important;
    overflow-y: visible !important;
  }
}

/* Tri compact + filtres repliables. Même typo et mêmes pastilles que le reste de l’app. */
body.app-shell .mz-predictions,
body.app-shell .mz-predictions-trajets,
body.app-shell .mz-predictions-panel,
body.app-shell .result-order-controls,
body.app-shell .result-order-group {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
body.app-shell .result-order-controls {
  font-family: var(--mz-font, inherit);
  color: var(--mz-ink);
  background: var(--mz-surface);
  padding: 10px 12px;
  border: 1px solid var(--mz-border);
  border-radius: 16px;
  margin: 4px 0 12px;
  box-shadow: var(--mz-shadow, 0 1px 2px rgba(28, 16, 8, 0.04));
}
body.app-shell .result-order-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
body.app-shell .result-order-toolbar label {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 320px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--mz-ink);
}
body.app-shell .result-filter-fields label {
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  min-width: 0;
  color: var(--mz-ink);
}
body.app-shell .result-order-controls input,
body.app-shell .result-order-controls select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--mz-border-strong);
  border-radius: 12px;
  padding: 0 12px;
  background: var(--mz-surface);
  color: var(--mz-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  box-sizing: border-box;
}
body.app-shell .result-order-controls label:has(select) { position: relative; }
body.app-shell .result-order-controls select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  cursor: pointer;
}
body.app-shell .result-order-controls label:has(select)::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 15px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--mz-ink);
  border-bottom: 2px solid var(--mz-ink);
  transform: rotate(45deg);
  pointer-events: none;
}
body.app-shell .result-order-toolbar button[data-result-filters],
body.app-shell .result-filter-fields button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--mz-border-strong);
  background: var(--mz-surface);
  color: var(--mz-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
}
body.app-shell .result-order-toolbar button[data-result-filters] {
  flex: 0 0 auto;
}
body.app-shell .result-order-toolbar button[data-result-filters][aria-expanded="true"] {
  background: var(--mz-ink);
  color: var(--mz-on-night, #F4F6FA);
  border-color: transparent;
}
body.app-shell .result-filter-fields [data-result-reset] {
  grid-column: 1 / -1;
  justify-self: stretch;
  background: var(--mz-ink);
  /* --mz-on-accent est l’encre prévue pour l’orange : sur --mz-ink elle disparaît. */
  color: var(--mz-on-night, #F4F6FA);
  border-color: transparent;
}
/* Sombre : --mz-ink et --mz-on-night valent tous les deux #F4F6FA. */
:root.dark body.app-shell .result-order-toolbar button[data-result-filters][aria-expanded="true"],
:root.dark body.app-shell .result-filter-fields [data-result-reset] {
  color: #0F172A;
}
body.app-shell .result-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 2px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--mz-accent, #FF6A00);
  color: var(--mz-on-accent, #1C1008);
  font-size: 11px;
  font-weight: 800;
}
body.app-shell .result-filter-layer[hidden] { display: none; }
body.app-shell .result-filter-backdrop { display: none; }
body.app-shell .result-filter-title {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--mz-ink);
}
body.app-shell .result-filter-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 10px;
  margin-top: 10px;
  min-width: 0;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--mz-border);
  background: var(--mz-bg, #FFF8F3);
}
body.app-shell .result-filter-close { display: none; }
body.app-shell .result-order-empty {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--mz-ink-2, #2C3340);
}
body.app-shell .result-order-group {
  margin: 10px 0;
  padding: 12px 14px;
  background: var(--mz-surface);
  border: 1px solid var(--mz-border);
  border-radius: 16px;
  color: var(--mz-ink);
  box-shadow: var(--mz-shadow, 0 1px 2px rgba(28, 16, 8, 0.04));
}
body.app-shell .result-order-group summary {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  min-height: 44px;
  min-width: 0;
  list-style: none;
  padding: 2px 0;
}
body.app-shell .result-order-group summary::-webkit-details-marker { display: none; }
body.app-shell .result-order-group summary::marker { content: ""; font-size: 0; }
body.app-shell .result-order-copy { flex: 1 1 auto; min-width: 0; }
body.app-shell .result-order-group summary strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
body.app-shell .result-order-group summary .result-order-copy > span {
  display: block;
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--mz-muted, #64748b);
  overflow-wrap: anywhere;
}
body.app-shell .result-order-chevron {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}
body.app-shell .result-order-group[open] > summary .result-order-chevron {
  margin-top: 4px;
  transform: rotate(45deg);
}
body.app-shell .result-order-group h3 {
  font-size: 15px;
  font-weight: 800;
  margin: 14px 0 8px;
}
body.app-shell .result-order-exact {
  font-size: 13px;
  font-weight: 700;
  color: var(--mz-muted, #64748b);
  margin: 10px 0 4px;
  overflow-wrap: anywhere;
}
@media (max-width: 800px) {
  /* La barre mobile est à 950. Le bloc résultats crée son propre contexte (z-index 1) : on le hisse avec la feuille, sinon « Fermer » reste dessous. */
  body.app-shell:has(.result-filter-layer:not([hidden])) .mz-results-days {
    z-index: 960;
  }
  body.app-shell .result-filter-layer:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 960;
    display: flex;
    align-items: flex-end;
    margin: 0;
  }
  body.app-shell .result-filter-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(28, 16, 8, 0.45);
  }
  body.app-shell .result-filter-fields {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: min(72vh, 560px);
    overflow: auto;
    margin: 0;
    padding: 16px 16px calc(var(--mz-bottom-nav-h, 68px) + 16px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-radius: 20px 20px 0 0;
    background: var(--mz-surface);
    box-shadow: 0 -12px 32px rgba(28, 16, 8, 0.18);
    grid-template-columns: 1fr 1fr;
    scroll-padding-bottom: calc(var(--mz-bottom-nav-h, 68px) + env(safe-area-inset-bottom, 0px));
  }
  body.app-shell .result-filter-close {
    display: inline-flex;
    grid-column: 1 / -1;
  }
}

/* ── Création d’alerte : parcours en 5 étapes, marque MaxZero ── */
#alertModal .mz-alert-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: min(92dvh, 820px);
  border-radius: 20px;
  border: 1px solid var(--mz-border);
  background: var(--mz-surface);
  color: var(--mz-ink);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}
#alertModal .mz-alert-head {
  align-items: flex-start;
  gap: 12px;
}
#alertModal .mz-alert-kicker {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mz-accent-text);
}
#alertModal .mz-alert-head .modal-title {
  margin: 0;
  letter-spacing: -0.03em;
}
#alertModal .mz-alert-close {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--mz-border);
  background: var(--mz-bg);
  color: var(--mz-ink);
  font: inherit;
  font-weight: 700;
}
#alertModal .mz-alert-close:focus-visible,
#alertModal .mz-alert-swap:focus-visible,
#alertModal .station-search-input:focus-visible,
#alertModal .modal-input:focus-visible,
#alertModal .alert-daypart-chip:focus-visible,
#alertModal .notify-channel-opt input:focus-visible {
  outline: 2px solid var(--mz-accent);
  outline-offset: 2px;
}
#alertModal .notify-channel-opt input,
#alertModal .modal-check input,
#alertModal .modal-check-row input,
#alertModal input[type="checkbox"],
#alertModal input[type="radio"] {
  accent-color: var(--mz-accent);
}
#alertModal .alert-daypart-chip[aria-pressed="true"] {
  background: var(--mz-accent);
  border-color: var(--mz-accent);
  color: var(--mz-on-accent);
}
#alertModal .mz-alert-lead,
#alertModal .mz-alert-step .modal-hint {
  color: var(--mz-ink-2);
}
#alertModal .mz-alert-step-title {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: -0.03em;
  color: var(--mz-ink);
}
#alertModal .mz-alert-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
#alertModal .mz-alert-steps li {
  flex-direction: column;
  gap: 2px;
  min-height: 48px;
  border-radius: 14px;
  font-size: 11px;
  line-height: 1.15;
  padding: 6px 4px;
}
#alertModal .mz-alert-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--mz-bg-deep);
  color: var(--mz-ink);
  font-size: 11px;
}
#alertModal .mz-alert-steps li.is-active {
  background: var(--mz-accent-soft);
  color: var(--mz-accent-text);
  border-color: var(--mz-accent);
}
#alertModal .mz-alert-steps li.is-active .mz-alert-step-num {
  background: var(--mz-accent);
  color: var(--mz-on-accent);
}
#alertModal .mz-alert-steps li.is-done {
  color: var(--mz-success);
  border-color: color-mix(in srgb, var(--mz-success) 55%, var(--mz-border));
  background: var(--mz-success-soft);
}
#alertModal .mz-alert-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #9F1239;
  background: var(--mz-danger-soft);
  color: #9F1239;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
}
:root.dark #alertModal .mz-alert-error {
  color: #FECDD3;
  border-color: #FECDD3;
}
#alertModal .mz-alert-od {
  display: grid;
  gap: 8px;
}
#alertModal .alert-od-swap {
  display: flex;
  justify-content: center;
  margin: 2px 0;
}
#alertModal .mz-alert-field { position: relative; }
#alertModal .mz-alert-field .station-suggest {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 240px;
  overflow: auto;
  background: var(--mz-surface);
  color: var(--mz-ink);
  border: 1px solid var(--mz-border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}
#alertModal .station-suggest-item {
  color: var(--mz-ink);
}
#alertModal .station-suggest-item small,
#alertModal .notify-channel-opt small {
  color: var(--mz-muted);
}
#alertModal .mz-alert-swap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 0;
  min-height: 36px;
  height: auto;
  margin: 0;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transform: none;
}
#alertModal .mz-alert-swap:hover,
#alertModal .mz-alert-swap:focus {
  transform: none;
}
#alertModal .mz-alert-swap-icon {
  display: block;
  flex: 0 0 auto;
}
#alertModal .mz-alert-city-store { display: none !important; }
#alertModal .mz-alert-recap-dl {
  display: grid;
  gap: 8px;
  margin: 0;
}
#alertModal .mz-alert-recap-dl div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--mz-bg);
  border: 1px solid var(--mz-border);
}
#alertModal .mz-alert-recap-dl dt {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--mz-muted);
}
#alertModal .mz-alert-recap-dl dd {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--mz-ink);
  overflow-wrap: anywhere;
}
#alertModal .mz-alert-success {
  display: grid;
  gap: 10px;
  padding: 8px 0 4px;
}
#alertModal .mz-alert-success-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mz-success);
}
#alertModal .mz-alert-success h3 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.03em;
}
#alertModal #alertSuccessCopy {
  margin: 0;
  color: var(--mz-ink-2);
  line-height: 1.45;
}
#alertModal .mz-alert-wizard-nav .mz-btn-primary,
#alertModal .mz-alert-success .mz-btn-primary {
  min-height: 48px;
}
@media (max-width: 520px) {
  #alertModal .mz-alert-dialog {
    width: calc(100vw - 16px);
    border-radius: 16px;
  }
  #alertModal .mz-alert-step-label { font-size: 10px; }
  #alertModal .mz-alert-wizard-nav {
    justify-content: stretch;
  }
  #alertModal .mz-alert-wizard-nav .mz-btn,
  #alertModal .mz-alert-wizard-nav .modal-submit,
  #alertModal .mz-alert-wizard-nav .modal-cancel {
    flex: 1 1 auto;
  }
}

.mz-support-banner {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: min(1344px, calc(100% - 32px));
  margin: 8px auto 12px;
  padding: 12px 14px;
  border: 1px solid #e2e6eb;
  border-radius: 16px;
  background: #fff;
  color: #202631;
  box-shadow: 0 8px 28px rgba(32, 38, 49, 0.06);
}
.mz-support-banner[hidden] { display: none; }
.mz-support-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.mz-support-banner-inner p {
  display: block;
  margin: 0;
  flex: 1 1 200px;
  min-width: 0;
  color: #202631;
  font-size: 14px;
  line-height: 1.4;
}
.mz-support-banner .mz-btn { flex: 0 0 auto; min-height: 44px; }
@media (max-width: 700px) {
  .mz-support-banner { width: calc(100% - 24px); }
  .mz-support-banner-inner { align-items: stretch; }
  .mz-support-banner-inner p { flex: 1 1 100%; }
  .mz-support-banner .mz-btn { align-self: flex-start; }
}
.mz-support-box { margin: 0 0 16px; max-width: 720px; }
.mz-support-box h2 { margin: 0 0 8px; }
.mz-support-lead, .mz-support-empty, .mz-support-note { color: var(--mz-muted, #596371); }
.mz-support-list, .mz-support-card { display: flex; flex-direction: column; gap: 8px; }
.mz-support-card {
  border: 1px solid var(--mz-border, #e2e6eb);
  border-radius: 16px;
  padding: 12px;
  background: var(--mz-surface, #fff);
  max-width: 100%;
}
.mz-support-card.is-unread { box-shadow: inset 3px 0 0 var(--mz-accent, #ff6a00); }
.mz-support-card-hit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.mz-support-kicker, .mz-support-when { font-size: 13px; color: var(--mz-muted, #596371); }
.mz-support-body { margin-top: 8px; overflow-wrap: anywhere; }
.mz-support-body a, .mz-support-banner a { color: var(--mz-accent, #ff6a00); }
.mz-support-actions, .mz-support-reply { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.mz-support-reply textarea, .mz-support-box .mz-btn { min-height: 44px; max-width: 100%; box-sizing: border-box; }
.mz-support-bell { left: 2px; right: auto; }
body.mz-support-open .mz-max-card,
body.mz-support-open .mz-cookie-banner,
body.mz-support-open .mz-consent-prompt {
  display: none !important;
}

.mz-bilan { display: flex; flex-direction: column; gap: 14px; }
.mz-bilan-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.mz-bilan-stats p, .mz-bilan-balance {
  margin: 0;
  padding: 12px;
  border-radius: 16px;
  background: var(--mz-surface, #fff);
  color: var(--mz-ink, #0f172a);
  border: 1px solid var(--mz-border, rgba(15, 23, 42, 0.08));
}
.mz-bilan-stats span, .mz-bilan-meta { color: var(--mz-muted, #5b6578); }
.mz-bilan-stats strong {
  display: block;
  margin-top: 4px;
  color: var(--mz-ink, #0f172a);
  font-size: 1.25rem;
}
.mz-bilan-balance.is-negative { box-shadow: inset 3px 0 0 #9f1239; }
.mz-bilan-status:empty { display: none; }
.mz-bilan-status {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--mz-accent-soft, rgba(255, 106, 0, 0.12));
  color: var(--mz-ink, #0f172a);
}
.mz-bilan-status[data-kind="error"],
.mz-bilan-status[data-kind="conflict"] { background: rgba(159, 18, 57, 0.08); }
.mz-bilan-list, .mz-bilan-places, .mz-bilan-candidates {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mz-bilan-trip, .mz-bilan-candidates li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: var(--mz-surface, #fff);
  border: 1px solid var(--mz-border, rgba(15, 23, 42, 0.08));
}
.mz-bilan-trip h3, .mz-bilan h3 { margin: 0; color: var(--mz-ink, #0f172a); }
.mz-bilan-form { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.mz-bilan-form input {
  min-height: 44px;
  width: 100%;
  max-width: 280px;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid var(--mz-border, rgba(15, 23, 42, 0.16));
  background: var(--mz-surface, #fff);
  color: var(--mz-ink, #0f172a);
  padding: 8px 12px;
}
.mz-bilan :focus-visible {
  outline: 2px solid var(--mz-accent, #ff6a00);
  outline-offset: 2px;
}
.mz-bilan .mz-btn { min-height: 44px; }
@media (max-width: 720px) {
  .mz-bilan-stats { grid-template-columns: 1fr; }
  .mz-bilan-form input { max-width: none; }
}

/* Barre du haut : thème, alertes, boîte et compte sur une seule ligne, même hauteur.
   style.css ajoute des marges (sidebar) au bouton thème et à la pastille compte. */
.mz-topbar-actions { align-items: center; gap: 8px; }
.mz-topbar-actions > .mz-icon-btn,
.mz-topbar-actions > .account-chip {
  --mz-topbar-ctl: 44px;
  box-sizing: border-box;
  margin: 0;
  align-self: center;
}
.mz-topbar .mz-icon-btn.sidebar-theme-btn {
  padding: 0;
  gap: 0;
  border-radius: 12px;
  font-size: inherit;
}
.mz-topbar .account-chip {
  width: auto;
  height: var(--mz-topbar-ctl, 44px);
  min-height: var(--mz-topbar-ctl, 44px);
  padding: 0 12px 0 8px;
  margin: 0;
  line-height: 1;
}
.mz-topbar .account-chip .account-chip-icon { display: inline-flex; align-items: center; }
@media (max-width: 700px) {
  .mz-topbar-actions { gap: 8px; }
  .mz-topbar .account-chip { padding: 0 8px; }
}
