
/* ==========================================================================
   1. BASE & LAYOUT
   ========================================================================== */
* { box-sizing: border-box; }
:root {
  --brand-navy-solid: #02122e;
  --brand-navy-mid: #031a42;
  --brand-navy-gradient: linear-gradient(180deg, #031a42 0%, #02122e 100%);
  --brand-navy-border: rgba(255, 255, 255, 0.82);
  --brand-navy-shadow: 0 4px 14px rgba(2, 18, 46, 0.45);
  --brand-navy-shadow-strong: 0 6px 18px rgba(2, 18, 46, 0.55);
  --map-float-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  --map-float-bottom-chip: calc(118px + env(safe-area-inset-bottom, 0px));
  --map-float-bottom-chip-open: calc(196px + env(safe-area-inset-bottom, 0px));
}
body { margin: 0; font-family: Arial, sans-serif; overflow: hidden; }
#app { display: flex; height: 100vh; width: 100%; }
#map {
    width: 100%;
    height: 100vh; /* Utilise 100% de la hauteur de la fenêtre */
    display: block;
    z-index: 1;    /* Assure-toi que la carte est derrière la sidebar */
}
#map.map-start-view-pending {
    /* Ne pas masquer entièrement la carte — évite écran blanc si le GPS tarde */
    opacity: 1;
}
.leaflet-container { z-index: 1; }

.leaflet-div-icon.urbex-spot-marker {
  background: transparent;
  border: none;
}

.leaflet-bottom.leaflet-left .leaflet-control-zoom {
  display: none !important;
}

.leaflet-bottom.leaflet-left .leaflet-control-zoom a {
  width: 36px;
  height: 36px;
  line-height: 36px;
  font-size: 20px;
  color: #1e293b;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.leaflet-bottom.leaflet-left .leaflet-control-zoom a:last-child {
  border-bottom: none;
}

.leaflet-bottom.leaflet-left .leaflet-control-zoom a:hover {
  background: #f8fafc;
  color: #0077ff;
}

body.dark-mode .leaflet-bottom.leaflet-left .leaflet-control-zoom a {
  background: #1e293b;
  color: #e2e8f0;
  border-bottom-color: #334155;
}

body.dark-mode .leaflet-bottom.leaflet-left .leaflet-control-zoom a:hover {
  background: #334155;
  color: #93c5fd;
}

body.dark-mode #map .leaflet-tile-pane {
  filter: brightness(0.68) saturate(0.9);
}

body.basemap-native-dark #map .leaflet-tile-pane,
body.dark-mode.basemap-native-dark #map .leaflet-tile-pane {
  filter: none;
}

/* ==========================================================================
   2. UI ELEMENTS (Overlays, Banners, Toasts)
   ========================================================================== */
#mapStatusBanner {
  display: none;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(60px + 8px + env(safe-area-inset-bottom, 0px));
  top: auto;
  z-index: 6098;
  max-width: min(calc(100vw - 20px), 400px);
  width: max-content;
  pointer-events: none;
}
#mapStatusBanner.open { display: block; pointer-events: auto; }
.map-status-banner-inner {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; justify-content: center;
  padding: 8px 12px; border-radius: 999px; background: rgba(15, 23, 42, 0.94);
  color: #fff; backdrop-filter: blur(10px); box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22); pointer-events: auto;
}
.map-status-chip { display: inline-flex; align-items: center; gap: 8px; padding: 2px 4px; border-radius: 999px; background: transparent; font-size: 12px; font-weight: 700; white-space: nowrap; }
.map-status-separator { width: 1px; height: 18px; background: rgba(255, 255, 255, 0.2); flex-shrink: 0; }
.map-status-reset {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border: none; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 13px; cursor: pointer; transition: background 0.2s ease; flex-shrink: 0;
}
body.friend-view-chip-visible #mapStatusBanner.open,
body.road-trip-chip-visible #mapStatusBanner.open {
  bottom: calc(118px + env(safe-area-inset-bottom, 0px));
}
body.friend-view-chip-visible.spot-bottom-card-open #mapStatusBanner.open,
body.road-trip-chip-visible.spot-bottom-card-open #mapStatusBanner.open {
  bottom: calc(176px + env(safe-area-inset-bottom, 0px));
}
.map-status-reset:hover { background: rgba(255, 255, 255, 0.24); }

.map-status-reset.nav-btn--edit {
  background: #ffb74d;
}

.map-status-reset.nav-btn--edit:hover {
  background: #ffa726;
}

.settings-map-icon-btn.nav-btn--edit.is-editing {
  background: #fb8c00;
}

.edit-sheet-btn-edit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#appToast {
  display: none; position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 10000; max-width: min(92vw, 420px); padding: 12px 16px; border-radius: 14px;
  background: rgba(15, 23, 42, 0.88); color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25); backdrop-filter: blur(10px); text-align: center;
}
#appToast.show { display: block; }

/* ==========================================================================
   3. DASHBOARD LAYOUT & COMPONENTS
   ========================================================================== */
#dashboardView {
  display: none; height: 100vh; width: 100%; overflow-y: auto;
  background: radial-gradient(circle at top left, rgba(0, 119, 255, 0.12), transparent 26%), linear-gradient(180deg, #f7fafc 0%, #eef3f8 100%);
  padding: 24px 24px calc(88px + env(safe-area-inset-bottom, 0px)) 24px;
}
#dashboardView.open { display: block; }

#adminConsoleView {
  display: none;
  height: 100vh;
  width: 100%;
  overflow-y: auto;
  background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.1), transparent 28%), linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  padding: 24px 24px calc(88px + env(safe-area-inset-bottom, 0px)) 24px;
}
#adminConsoleView.open { display: block; }

#subscriptionView {
  display: none;
  height: 100vh;
  width: 100%;
  overflow-y: auto;
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 32%), linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%);
  padding: 24px 24px calc(88px + env(safe-area-inset-bottom, 0px)) 24px;
}
#subscriptionView.open { display: block; }

.subscription-page-shell { max-width: 1200px; margin: 0 auto; }
.subscription-page-header {
  margin-bottom: 18px;
  position: sticky;
  top: 0;
  z-index: 8;
  padding: 10px 0 12px 0;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(248, 250, 252, 0.88) 78%, rgba(248, 250, 252, 0) 100%);
  backdrop-filter: blur(8px);
}
.subscription-page-title { margin: 0; font-size: 28px; color: #162131; }
.subscription-page-subtitle { margin: 6px 0 0 0; color: #5b6b7c; font-size: 14px; }

.subscription-page-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 8px;
}

.subscription-page-section {
  padding: 18px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.subscription-page-section-head { margin-bottom: 14px; }
.subscription-page-section-title {
  margin: 0 0 6px 0;
  font-size: 20px;
  color: #162131;
}
.subscription-page-section-hint {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.subscription-page-hero {
  background:
    var(--brand-navy-gradient),
    url("../assets/urbex-banner-hero.png") center / cover no-repeat;
  border: none;
  color: #f8fafc;
}
.subscription-page-hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.subscription-page-hero-logo {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 0 6px 0;
  border-radius: 14px;
  mix-blend-mode: screen;
  flex-shrink: 0;
}
.subscription-page-hero-text {
  min-width: 0;
}
@media (min-width: 760px) {
  .subscription-page-hero {
    flex-direction: row;
    align-items: center;
  }
  .subscription-page-hero-logo {
    max-width: 240px;
    margin: 0;
  }
}
.subscription-page-eyebrow {
  margin: 0 0 8px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
}
.subscription-page-hero-title {
  margin: 0 0 10px 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.15;
  color: #ffffff;
}
.subscription-page-hero-lead {
  margin: 0;
  max-width: 760px;
  font-size: 16px;
  line-height: 1.6;
  color: #dbeafe;
}
.subscription-page-hero-bullets {
  margin: 16px 0 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.subscription-page-hero-bullets li {
  position: relative;
  padding-left: 22px;
  color: #eff6ff;
  font-size: 14px;
}
.subscription-page-hero-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #86efac;
  font-weight: bold;
}

.subscription-page-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.subscription-page-plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100%;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.subscription-page-plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.subscription-page-plan-card--highlight {
  border-color: #2563eb;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}
.subscription-page-plan-card--current {
  border-color: #16a34a;
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
}
.subscription-page-plan-badge {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.subscription-page-plan-card--current .subscription-page-plan-badge {
  background: #dcfce7;
  color: #15803d;
}
.subscription-page-plan-name {
  margin: 0;
  font-size: 22px;
  color: #0f172a;
}
.subscription-page-plan-tagline {
  margin: 0;
  min-height: 40px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}
.subscription-page-plan-price-main {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}
.subscription-page-plan-price-sub {
  font-size: 12px;
  color: #64748b;
}
.subscription-page-plan-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
}
.subscription-page-plan-bullets li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  color: #334155;
}
.subscription-page-plan-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #2563eb;
}
.subscription-page-plan-promo {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 12px;
  line-height: 1.45;
}
.subscription-page-plan-cta {
  margin-top: auto;
  width: 100%;
  padding: 11px 12px;
  border: none;
  border-radius: 12px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}
.subscription-page-plan-cta:hover:not(:disabled) { background: #1d4ed8; }
.subscription-page-plan-cta--disabled,
.subscription-page-plan-cta:disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: default;
}

.subscription-page-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.subscription-page-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 13px;
}
.subscription-page-table th,
.subscription-page-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
  vertical-align: middle;
}
.subscription-page-table thead th {
  background: #f1f5f9;
  color: #0f172a;
  font-size: 12px;
}
.subscription-page-table tbody th {
  text-align: left;
  background: #fafafa;
  color: #334155;
  font-weight: 600;
}
.subscription-page-table thead th:first-child,
.subscription-page-table tbody th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 1px 0 0 #e2e8f0;
}
.subscription-page-table thead th:first-child {
  z-index: 3;
}
.subscription-page-col--current {
  background: rgba(37, 99, 235, 0.08);
}

.subscription-page-trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.subscription-page-trust-card {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}
.subscription-page-trust-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #dbeafe;
  font-size: 18px;
  margin-bottom: 8px;
}
.subscription-page-trust-card h4 {
  margin: 0 0 6px 0;
  font-size: 15px;
  color: #0f172a;
}
.subscription-page-trust-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}

.subscription-donation-card {
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 70%);
  border-color: #fdba74;
  scroll-margin-top: 80px;
}
.subscription-donation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.subscription-donation-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 12px;
  border: 1px solid #fdba74;
  border-radius: 14px;
  background: #ffffff;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.subscription-donation-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.16);
  border-color: #f97316;
}
.subscription-donation-btn--disabled,
.subscription-donation-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.subscription-donation-emoji { font-size: 28px; }
.subscription-donation-label {
  font-size: 14px;
  font-weight: 600;
  color: #9a3412;
  text-align: center;
}
.subscription-donation-amount {
  font-size: 18px;
  font-weight: 800;
  color: #ea580c;
}
.subscription-donation-custom-row {
  margin-top: 12px;
  text-align: center;
}
.subscription-donation-custom {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: #ea580c;
  text-decoration: none;
}
.subscription-donation-custom:hover { text-decoration: underline; }
.subscription-donation-custom--disabled {
  color: #9ca3af;
  font-weight: 600;
}
.subscription-donation-thanks {
  margin: 14px 0 0 0;
  font-size: 13px;
  font-style: italic;
  color: #9a3412;
}

.subscription-page-footnote {
  margin: 0;
  padding: 0 4px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

/* Carrousel « Découvrir » (1re ouverture) */
.discover-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
}
.discover-overlay[hidden] { display: none; }
body.discover-open { overflow: hidden; }

.discover-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid #334155;
  border-radius: 20px;
  padding: 26px 22px 20px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  color: #f1f5f9;
}
.discover-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.discover-close:hover { background: rgba(255, 255, 255, 0.16); }
.discover-title {
  margin: 0 0 16px 0;
  text-align: center;
  font-size: 20px;
  color: #ffffff;
}
.discover-track-wrap {
  overflow: hidden;
  border-radius: 14px;
}
.discover-track {
  display: flex;
  transition: transform 0.32s ease;
}
.discover-slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 10px 8px 10px;
}
.discover-slide-icon {
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(37, 99, 235, 0.35), rgba(37, 99, 235, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.4);
  margin-bottom: 16px;
}
.discover-slide-title {
  margin: 0 0 8px 0;
  font-size: 19px;
  color: #ffffff;
}
.discover-slide-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #cbd5e1;
  max-width: 320px;
}
.discover-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 16px 0;
}
.discover-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #475569;
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}
.discover-dot.active {
  width: 22px;
  border-radius: 5px;
  background: #2563eb;
}
.discover-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.discover-skip {
  border: none;
  background: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 10px 6px;
}
.discover-skip:hover { color: #cbd5e1; }
.discover-prev {
  border: 1px solid #334155;
  background: transparent;
  color: #cbd5e1;
  font-weight: 600;
  border-radius: 12px;
  padding: 11px 14px;
  cursor: pointer;
}
.discover-next {
  margin-left: auto;
  border: none;
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  border-radius: 12px;
  padding: 11px 20px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.discover-next:hover { background: #1d4ed8; }
.subscription-page-soon-banner {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 14px;
}

#subscriptionView .subscription-card,
#subscriptionView .settings-card {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
#subscriptionView .subscription-launch-promo {
  margin: 0;
}

.admin-console-shell { max-width: 1200px; margin: 0 auto; }
.admin-console-header {
  margin-bottom: 18px;
  position: sticky;
  top: 0;
  z-index: 8;
  padding: 10px 0 12px 0;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(248, 250, 252, 0.88) 78%, rgba(248, 250, 252, 0) 100%);
  backdrop-filter: blur(8px);
}
.admin-console-header.dashboard-page-header {
  display: block;
  text-align: center;
  padding-right: 52px;
  padding-left: 52px;
  box-sizing: border-box;
}
.admin-console-title { margin: 0; font-size: 28px; color: #162131; }
.admin-console-subtitle { margin: 6px 0 0 0; color: #5b6b7c; font-size: 14px; }

.settings-section-btn--launch {
  justify-content: space-between;
}
.settings-launch-hint {
  font-size: 14px;
  color: #64748b;
  font-weight: 700;
}

.dashboard-shell { max-width: 1200px; margin: 0 auto; }
.dashboard-header {
  margin-bottom: 18px;
  position: sticky;
  top: 0;
  z-index: 8;
  padding: 10px 0 12px 0;
  background: linear-gradient(180deg, rgba(247, 250, 252, 0.96) 0%, rgba(247, 250, 252, 0.88) 78%, rgba(247, 250, 252, 0) 100%);
  backdrop-filter: blur(8px);
}
.dashboard-page-header {
  position: relative;
  display: block;
  text-align: center;
  padding-right: 52px;
  padding-left: 52px;
  box-sizing: border-box;
}
.dashboard-page-header-body {
  max-width: 640px;
  margin: 0 auto;
}
.dashboard-title { margin: 0; font-size: 28px; color: #162131; }
.dashboard-subtitle { margin: 6px 0 0 0; color: #5b6b7c; font-size: 14px; }
.view-return-vignette {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 0;
  z-index: 120;
  width: 44px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--brand-navy-border);
  border-right: none;
  border-radius: 999px 0 0 999px;
  background: var(--brand-navy-solid);
  box-shadow: var(--brand-navy-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffffff;
  transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.view-return-vignette:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: var(--brand-navy-shadow-strong);
}
.view-return-vignette-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-view-top-actions {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 0;
  z-index: 6200;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
}

#dashboardView.open > .page-view-top-actions,
#subscriptionView.open > .page-view-top-actions,
#adminConsoleView.open > .page-view-top-actions {
  display: flex;
}

.page-view-top-actions .view-return-vignette {
  position: static;
  pointer-events: auto;
}

.dashboard-cards-settings-card {
  width: min(92vw, 520px);
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
}

.dashboard-cards-settings-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 4px;
  padding-right: 2px;
}

.dashboard-cards-settings-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.dashboard-cards-settings-row.is-enabled {
  border-color: #c7d2fe;
  background: #f5f7ff;
}

.dashboard-cards-settings-toggle {
  display: inline-flex;
  margin-top: 2px;
  cursor: pointer;
}

.dashboard-cards-settings-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #4f46e5;
}

.dashboard-cards-settings-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-cards-settings-title {
  font-size: 14px;
  color: #0f172a;
}

.dashboard-cards-settings-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e2e8f0;
}

.dashboard-cards-settings-desc {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.dashboard-cards-settings-map-select {
  margin-top: 8px;
  font-size: 13px;
}

.dashboard-cards-settings-order {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboard-cards-settings-actions {
  margin-top: 10px;
}

.dashboard-top-grid:not(.dashboard-top-grid--has-hero) {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-template-rows: none;
}

.dashboard-top-grid:not(.dashboard-top-grid--has-hero) .dashboard-hero-card {
  grid-row: auto;
  grid-column: auto;
  min-height: 180px;
}

body.dark-mode .dashboard-cards-settings-row {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .dashboard-cards-settings-row.is-enabled {
  background: #1e1b4b;
  border-color: #4338ca;
}

body.dark-mode .dashboard-cards-settings-title {
  color: #f1f5f9;
}

body.dark-mode .dashboard-cards-settings-type {
  background: #334155;
  color: #cbd5e1;
}

.dashboard-section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}
.dashboard-section-content.open { overflow: visible; }

.dashboard-section-sticky-bar {
  position: sticky;
  top: 10px;
  z-index: 22;
  display: flex;
  justify-content: center;
  margin: 0 0 12px;
  padding: 0 12px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.dashboard-section-sticky-bar.visible {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.dashboard-section-sticky-bar[hidden] {
  display: none !important;
}

.dashboard-section-sticky-bar:not([hidden]).visible {
  display: flex;
}

.dashboard-section-sticky-bar-inner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: min(92vw, 440px);
  min-height: 44px;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0b1220 0%, #132238 48%, #172554 100%);
  border: 1px solid rgba(96, 165, 250, 0.38);
  box-shadow:
    0 10px 28px rgba(2, 6, 23, 0.42),
    inset 0 1px 0 rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(12px);
}

.dashboard-section-sticky-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

.dashboard-section-sticky-icon .ui-icon {
  display: block;
}

.dashboard-section-sticky-label {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-section-sticky-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.dashboard-section-sticky-close:hover {
  background: rgba(248, 113, 113, 0.22);
  color: #fecaca;
}

/* --- Grille haute : hero (2 lignes) + 6 cartes stats --- */
.dashboard-top-grid {
  display: grid;
  grid-template-columns: minmax(200px, 0.95fr) repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(108px, auto));
  gap: 12px;
  margin-bottom: 20px;
}

.dashboard-hero-card {
  grid-row: 1 / span 2;
  grid-column: 1;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 228px;
  cursor: pointer;
  background: var(--brand-navy-gradient);
  box-shadow: var(--brand-navy-shadow-strong);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  isolation: isolate;
}

.dashboard-hero-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse 70% 55% at 12% 18%, rgba(96, 165, 250, 0.22), transparent 58%),
    radial-gradient(ellipse 55% 45% at 88% 82%, rgba(167, 139, 250, 0.18), transparent 52%);
  mix-blend-mode: soft-light;
}

.dashboard-hero-card--random_photo .dashboard-hero-deco {
  background:
    radial-gradient(ellipse 65% 50% at 85% 15%, rgba(251, 191, 36, 0.2), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(56, 189, 248, 0.18), transparent 50%);
}

.dashboard-hero-card--spot_of_day .dashboard-hero-deco {
  background:
    radial-gradient(ellipse 60% 50% at 20% 25%, rgba(52, 211, 153, 0.2), transparent 55%),
    radial-gradient(ellipse 45% 40% at 90% 75%, rgba(99, 102, 241, 0.16), transparent 50%);
}

.dashboard-hero-card:hover {
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.2);
}

.dashboard-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dashboard-hero-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: rgba(255, 255, 255, 0.35);
  background:
    radial-gradient(ellipse 80% 60% at 25% 20%, rgba(99, 102, 241, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 55% at 80% 85%, rgba(14, 165, 233, 0.18), transparent 50%),
    var(--brand-navy-gradient);
  z-index: 0;
}

.dashboard-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.28) 52%, rgba(0, 0, 0, 0.06) 100%);
  color: #fff;
  pointer-events: none;
  z-index: 2;
}

.dashboard-hero-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.88;
  margin-bottom: 6px;
}

.dashboard-hero-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 4px;
}

.dashboard-hero-meta {
  font-size: 12px;
  opacity: 0.9;
}

.dashboard-stat-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
  border: 1px solid rgba(214, 222, 231, 0.95);
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 108px;
}

.dashboard-stat-card-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.dashboard-stat-card-watermark {
  position: absolute;
  right: 8px;
  bottom: 2px;
  z-index: 0;
  opacity: 0.1;
  pointer-events: none;
  color: #64748b;
  transform: rotate(-8deg);
}

.dashboard-stat-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 108px;
  padding: 14px 16px;
}

.dashboard-stat-card--theme-time .dashboard-stat-card-deco {
  background:
    radial-gradient(ellipse 85% 75% at 100% 100%, rgba(59, 130, 246, 0.16), transparent 58%),
    radial-gradient(ellipse 55% 45% at 0% 0%, rgba(147, 197, 253, 0.2), transparent 52%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.95) 0%, rgba(239, 246, 255, 0.82) 100%);
}
.dashboard-stat-card--theme-time .dashboard-stat-card-watermark { color: #3b82f6; }

.dashboard-stat-card--theme-agenda .dashboard-stat-card-deco {
  background:
    radial-gradient(ellipse 80% 70% at 100% 90%, rgba(139, 92, 246, 0.15), transparent 55%),
    radial-gradient(ellipse 50% 40% at 8% 10%, rgba(216, 180, 254, 0.18), transparent 50%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 243, 255, 0.84) 100%);
}
.dashboard-stat-card--theme-agenda .dashboard-stat-card-watermark { color: #7c3aed; }

.dashboard-stat-card--theme-route .dashboard-stat-card-deco {
  background:
    radial-gradient(ellipse 80% 70% at 100% 100%, rgba(249, 115, 22, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 45% at 0% 0%, rgba(253, 186, 116, 0.16), transparent 48%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 247, 237, 0.85) 100%);
}
.dashboard-stat-card--theme-route .dashboard-stat-card-watermark { color: #ea580c; }

.dashboard-stat-card--theme-map .dashboard-stat-card-deco {
  background:
    radial-gradient(ellipse 80% 70% at 100% 95%, rgba(16, 185, 129, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 42% at 5% 8%, rgba(110, 231, 183, 0.16), transparent 48%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.95) 0%, rgba(236, 253, 245, 0.84) 100%);
}
.dashboard-stat-card--theme-map .dashboard-stat-card-watermark { color: #059669; }

.dashboard-stat-card--theme-star .dashboard-stat-card-deco {
  background:
    radial-gradient(ellipse 75% 65% at 100% 100%, rgba(245, 158, 11, 0.16), transparent 55%),
    radial-gradient(ellipse 45% 40% at 10% 15%, rgba(252, 211, 77, 0.18), transparent 48%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 251, 235, 0.86) 100%);
}
.dashboard-stat-card--theme-star .dashboard-stat-card-watermark { color: #d97706; }

.dashboard-stat-card--theme-photo .dashboard-stat-card-deco {
  background:
    radial-gradient(ellipse 78% 68% at 100% 92%, rgba(14, 165, 233, 0.14), transparent 54%),
    radial-gradient(ellipse 48% 42% at 6% 12%, rgba(125, 211, 252, 0.17), transparent 48%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 249, 255, 0.85) 100%);
}
.dashboard-stat-card--theme-photo .dashboard-stat-card-watermark { color: #0284c7; }

.dashboard-stat-card--theme-pulse .dashboard-stat-card-deco {
  background:
    radial-gradient(ellipse 78% 68% at 100% 100%, rgba(244, 63, 94, 0.12), transparent 54%),
    radial-gradient(ellipse 48% 40% at 8% 8%, rgba(148, 163, 184, 0.14), transparent 48%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.88) 100%);
}
.dashboard-stat-card--theme-pulse .dashboard-stat-card-watermark { color: #64748b; }

.dashboard-stat-card--theme-neutral .dashboard-stat-card-deco {
  background:
    radial-gradient(ellipse 70% 60% at 100% 100%, rgba(100, 116, 139, 0.1), transparent 55%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 250, 252, 0.9) 100%);
}

.dashboard-stat-card:hover {
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.11);
  border-color: rgba(0, 119, 255, 0.28);
}

.dashboard-stat-card:hover .dashboard-stat-card-watermark {
  opacity: 0.14;
}

.dashboard-stat-label {
  font-size: 12px;
  color: #607080;
  margin-bottom: 6px;
  font-weight: 600;
}

.dashboard-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: #162131;
  line-height: 1.15;
}

.dashboard-stat-value--text {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dashboard-stat-note {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 5px;
  line-height: 1.35;
}

/* --- Sections repliables --- */
.dashboard-section {
  margin-bottom: 10px;
}

.dashboard-section-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(214, 222, 231, 0.95);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: background 0.18s ease, border-radius 0.18s ease;
  text-align: left;
  margin-bottom: 0;
}

.dashboard-section-header:hover {
  background: rgba(255, 255, 255, 0.96);
}

.dashboard-section-header.active {
  border-radius: 16px 16px 0 0;
  border-bottom-color: transparent;
  background: rgba(255, 255, 255, 0.96);
}

.dashboard-section-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.dashboard-section-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #eef4fb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.dashboard-section-title-wrap {
  min-width: 0;
  flex: 1;
}

.dashboard-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #162131;
}

.dashboard-section-preview {
  margin-top: 8px;
}

.dashboard-section-arrow {
  font-size: 12px;
  color: #94a3b8;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.dashboard-panel {
  border: 1px solid rgba(214, 222, 231, 0.95);
  border-top: none;
  border-radius: 0 0 16px 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.dashboard-preview-thumbs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.dashboard-preview-thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  background: #e5e7eb;
  flex-shrink: 0;
  border: 1px solid rgba(214, 222, 231, 0.8);
}

.dashboard-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dashboard-preview-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #94a3b8;
}

.dashboard-preview-item {
  font-size: 11px;
  color: #94a3b8;
}

.dashboard-empty {
  padding: 24px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.dashboard-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-gallery-toolbar {
  margin-bottom: 16px;
}

.dashboard-filter-btn--layout {
  min-width: 36px;
  padding-left: 10px;
  padding-right: 10px;
}

.dashboard-gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #64748b;
  background: #cbd5e1;
}

.dashboard-filter-btn {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.dashboard-filter-btn.active {
  background: #0077ff;
  border-color: #0077ff;
  color: #fff;
}

.dashboard-year-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.dashboard-year-select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d7dee7;
  background: #fff;
  font-size: 13px;
  min-width: 180px;
}

.dashboard-gallery-grid,
.dashboard-year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.dashboard-gallery-item,
.dashboard-year-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #e5e7eb;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.dashboard-gallery-item img,
.dashboard-year-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Dashboard Agenda --- */
.dashboard-agenda-view-toolbar {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
}

.dashboard-agenda-select {
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 600;
}

.dashboard-agenda-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.dashboard-agenda-add-btn.roadtrip-mini-btn--text {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  gap: 6px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}
.dashboard-agenda-add-btn.roadtrip-mini-btn--text:hover {
  background: #1e293b;
}
.dashboard-agenda-add-btn .ui-icon {
  color: currentColor;
}

body.dark-mode .dashboard-agenda-add-btn.roadtrip-mini-btn--text {
  background: #1e293b;
  color: #f1f5f9;
}
body.dark-mode .dashboard-agenda-add-btn.roadtrip-mini-btn--text:hover {
  background: #334155;
}

.dashboard-agenda-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-agenda-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.dashboard-agenda-row-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}

.dashboard-agenda-row-main:hover {
  background: rgba(0, 119, 255, 0.04);
}

.dashboard-agenda-card-list {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.dashboard-agenda-row-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 12px 10px 8px 4px;
  background: transparent;
  flex-shrink: 0;
  align-self: flex-start;
}

.dashboard-agenda-row-actions .note-icon-btn {
  flex-shrink: 0;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.dashboard-agenda-row-actions .note-icon-btn:hover {
  border-color: #94a3b8;
  background: #fff;
}

.dashboard-agenda-thumb {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 12px;
  overflow: hidden;
  background: #eef4ff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-agenda-thumb-fallback {
  font-size: 20px;
}

.dashboard-agenda-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dashboard-agenda-body {
  flex: 1;
  min-width: 0;
}

.dashboard-agenda-row-title {
  font-size: 14px;
  font-weight: 700;
  color: #162131;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-agenda-row-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-agenda-body .agenda-tag-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow: hidden;
  margin-top: 8px;
}

.dashboard-agenda-body .agenda-tag-pill {
  white-space: nowrap;
  flex-shrink: 0;
}

.dashboard-agenda-action {
  width: 32px;
  height: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.dashboard-agenda-calendar {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.dashboard-agenda-calendar-head,
.dashboard-agenda-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.dashboard-agenda-weekday {
  padding: 8px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.dashboard-agenda-day {
  min-height: 72px;
  padding: 6px;
  border-right: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
}

.dashboard-agenda-day.is-outside {
  background: #fafafa;
  opacity: 0.5;
}

.dashboard-agenda-day-number {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}

.dashboard-agenda-day-event,
.dashboard-agenda-year-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 4px 6px;
  margin-bottom: 4px;
  border: none;
  border-radius: 6px;
  background: #eef4fb;
  color: #0b3d91;
  font-size: 10px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-agenda-day-event-meta {
  display: block;
  font-size: 9px;
  opacity: 0.8;
}

.dashboard-agenda-year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.dashboard-agenda-year-month {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.dashboard-agenda-year-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #162131;
}

/* Limite globale : les photos dans fiches/listes ne dépassent jamais */
.app-bound-photo,
.app-bound-photo img,
.note-photo-thumb,
.note-photo-thumb img,
.note-photo-grid-item,
.note-photo-grid-item img,
#noteViewPhoto img,
.agenda-photo-preview img,
.spot-photo-preview img,
.note-photo-editor-grid img,
.spot-photo-editor-grid img {
  max-width: 100%;
}

.spot-photo-editor-grid,
.note-photo-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 8px;
  width: 100%;
  max-width: none;
  margin-top: 8px;
}

.spot-form-photos-section {
  margin-bottom: 12px;
}

.spot-form-header-row {
  margin-bottom: 12px;
}

.spot-form-location-status {
  font-size: 12px;
  color: #526173;
  margin-top: 6px;
}

.spot-form-address-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.spot-form-address-input {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.spot-form-address-locate-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
  color: #2563eb;
  background: #f8fafc;
}

.spot-form-address-locate-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

#formBox .spot-form-footer-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0 0;
  margin-top: 8px;
  border-top: 1px solid #eef2f7;
}

.spot-form-footer-actions-start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.spot-form-footer-actions-end {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.spot-form-private-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.spot-form-private-pill:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.spot-form-private-check {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.spot-form-private-pill-icon {
  display: inline-flex;
  color: #94a3b8;
  flex-shrink: 0;
}

.spot-form-private-pill:has(.spot-form-private-check:checked) {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.spot-form-private-pill:has(.spot-form-private-check:checked) .spot-form-private-pill-icon {
  color: #2563eb;
}

.spot-form-footer-nav-btns {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.spot-form-footer-nav-btns .note-icon-btn.nav-btn--google,
.spot-form-footer-nav-btns .note-icon-btn.nav-btn--waze {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #cbd5e1;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.spot-form-footer-nav-btns .note-icon-btn.nav-btn--google .nav-brand-icon {
  width: 16px;
  height: 16px;
}

.spot-form-footer-nav-btns .note-icon-btn.nav-btn--waze .nav-brand-img--waze {
  width: 20px;
  height: 20px;
}

#formBox .note-icon-btn--danger,
#formBox .note-icon-btn--save {
  border: 1px solid #cbd5e1;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
}

#formBox .note-icon-btn--save {
  background: #f8fafc;
}

#formBox .note-icon-btn--danger:hover {
  border-color: #fca5a5;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.08);
}

#formBox .note-icon-btn--save:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1);
}

body.dark-mode #formBox .spot-form-footer-actions {
  border-top-color: #334155;
}

body.dark-mode .spot-form-private-pill {
  background: #0f172a;
  border-color: #475569;
  color: #cbd5e1;
}

body.dark-mode .spot-form-private-pill:hover {
  background: #1e293b;
  border-color: #64748b;
}

body.dark-mode .spot-form-private-pill:has(.spot-form-private-check:checked) {
  background: #172554;
  border-color: #3b82f6;
  color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

body.dark-mode .spot-form-private-pill:has(.spot-form-private-check:checked) .spot-form-private-pill-icon {
  color: #60a5fa;
}

body.dark-mode .spot-form-address-locate-btn,
body.dark-mode #formBox .note-icon-btn--danger,
body.dark-mode #formBox .note-icon-btn--save,
body.dark-mode .spot-form-footer-nav-btns .note-icon-btn.nav-btn--google,
body.dark-mode .spot-form-footer-nav-btns .note-icon-btn.nav-btn--waze {
  border-color: #475569;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35);
}

body.dark-mode .spot-form-location-status {
  color: #94a3b8;
}

.spot-form-photos-label {
  margin-bottom: 6px;
}

.spot-form-photos-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spot-photo-add-more-btn {
  width: 44px;
  height: 44px;
  font-size: 22px;
  font-weight: 700;
}

.spot-photo-editor-item,
.note-photo-editor-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: #e5e7eb;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.spot-photo-editor-item img,
.note-photo-editor-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.spot-photo-remove-btn,
.note-photo-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  cursor: pointer;
  line-height: 22px;
  font-size: 16px;
  font-weight: 700;
  z-index: 5;
  padding: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.spot-photo-remove-btn:hover,
.note-photo-remove-btn:hover {
  background: #b91c1c;
}

.spot-photo-quota-hint {
  display: block;
  width: 100%;
  margin: 8px 0 0;
  font-size: 0.78rem;
  clear: both;
}

.lightbox-gallery-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 8px 0;
}

.lightbox-gallery-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.note-photo-thumb {
  width: 56px;
  height: 56px;
  min-width: 56px;
  max-width: 56px;
  max-height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #e5e7eb;
}

.note-photo-thumb img {
  width: 100%;
  height: 100%;
  max-width: 56px;
  max-height: 56px;
  object-fit: cover;
  display: block;
}

.note-photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.note-photo-grid-item {
  width: 88px;
  height: 88px;
  max-width: 88px;
  max-height: 88px;
  border-radius: 10px;
  overflow: hidden;
  background: #e5e7eb;
  flex-shrink: 0;
}

.note-photo-grid-item img {
  width: 100%;
  height: 100%;
  max-width: 88px;
  max-height: 88px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.agenda-photo-preview--modal {
  width: 100%;
  max-height: 120px;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 10px;
}

.agenda-photo-preview--modal img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

#agendaEventPanel.agenda-panel-view {
  width: min(92vw, 640px);
  padding: 0;
  overflow: hidden;
}

.agenda-view-sheet {
  display: flex;
  flex-direction: column;
  max-height: min(85vh, 820px);
}

.agenda-view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.agenda-view-header-text {
  min-width: 0;
  flex: 1;
}

.agenda-view-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.agenda-view-title {
  margin: 6px 0 0;
  font-size: 22px;
  line-height: 1.25;
  color: #162131;
}

.agenda-view-close {
  flex-shrink: 0;
}

.agenda-view-photo {
  display: block;
  width: 100%;
  max-height: 240px;
  overflow: hidden;
  border: none;
  padding: 0;
  background: #e2e8f0;
  cursor: zoom-in;
}

.agenda-view-photo img {
  width: 100%;
  height: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
}

.agenda-view-body {
  padding: 16px 18px;
  overflow-y: auto;
}

.agenda-view-meta-grid {
  display: grid;
  gap: 10px;
}

.agenda-view-meta-grid--2col {
  grid-template-columns: 1fr 1fr;
}

.agenda-view-linked-spot {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0c4a6e;
  font-size: 12px;
  font-weight: 600;
}

.agenda-view-description-block {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agenda-view-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.agenda-view-link-chip:hover {
  background: #dbeafe;
}

.agenda-view-link-chip-icon {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1;
}

.agenda-view-link-chip-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-view-footer--icons {
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 8px;
}

.agenda-view-footer--icons .note-icon-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
}

.agenda-view-footer--icons .note-icon-btn.nav-btn--google,
.agenda-view-footer--icons .note-icon-btn.nav-btn--waze {
  padding: 0;
}

.agenda-view-footer--icons .note-icon-btn.nav-btn--google .nav-brand-icon {
  width: 16px;
  height: 16px;
}

.agenda-view-footer--icons .note-icon-btn.nav-btn--waze .nav-brand-img--waze {
  width: 20px;
  height: 20px;
}

.agenda-view-footer--icons .note-icon-btn.nav-btn--google .nav-brand-icon {
  width: 18px;
  height: 18px;
}

.note-icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.note-icon-btn.is-favorite {
  color: #d97706;
  border-color: #fcd34d;
  background: #fffbeb;
}

.spot-photo-actions.note-header-actions {
  flex-direction: row;
  align-items: center;
  gap: 4px;
}

.agenda-nav-btn {
  padding: 0;
}

.nav-btn {
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-btn svg,
.nav-brand-icon {
  display: block;
  width: 18px;
  height: 18px;
}

.nav-btn--google {
  background: #fff;
  border: 1px solid #e2e8f0;
}

.nav-btn--google:hover {
  background: #f8fafc;
}

.nav-btn--waze,
.agenda-nav-btn--waze,
.roadtrip-mini-btn.nav-btn--waze,
.spot-popup-nav-btn.nav-btn--waze,
.spot-nav-btn.nav-btn--waze {
  background: #33ccff;
  border: none;
  color: #fff;
  padding: 0;
  overflow: hidden;
}

.nav-brand-img--waze {
  width: 22px;
  height: 22px;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

.roadtrip-mini-btn.nav-btn--waze .nav-brand-img--waze,
.spot-nav-btn.nav-btn--waze .nav-brand-img--waze {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.spot-popup-nav-btn.nav-btn--waze .nav-brand-img--waze {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.nav-btn--waze:hover,
.agenda-nav-btn--waze:hover,
.roadtrip-mini-btn.nav-btn--waze:hover,
.spot-popup-nav-btn.nav-btn--waze:hover,
.spot-nav-btn.nav-btn--waze:hover {
  background: #22b8e8;
}

.spot-nav-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
}

.spot-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  cursor: pointer;
}

.spot-popup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.spot-popup-title {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.25;
  color: #111;
  min-width: 0;
  flex: 1;
}

.spot-popup-title-star {
  color: #fbc02d;
}

.spot-popup-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.spot-popup-head-actions .note-icon-btn {
  border: 1px solid #cbd5e1;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.spot-popup-head-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.spot-popup-head-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.spot-popup-fav-btn {
  color: #334155;
}

.spot-popup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eef2f7;
}

.spot-popup-footer--friend {
  justify-content: flex-end;
}

.spot-popup-private-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.spot-popup-private-pill:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.spot-popup-private-check {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.spot-popup-private-pill-icon {
  display: inline-flex;
  color: #94a3b8;
  flex-shrink: 0;
}

.spot-popup-private-pill:has(.spot-popup-private-check:checked) {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.spot-popup-private-pill:has(.spot-popup-private-check:checked) .spot-popup-private-pill-icon {
  color: #2563eb;
}

.spot-popup-footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.spot-popup-action-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
  background: #fff;
  padding: 0;
}

.spot-popup-action-btn.nav-btn--google,
.spot-popup-action-btn.nav-btn--waze {
  padding: 0;
}

.spot-popup-action-btn.nav-btn--google .nav-brand-icon {
  width: 16px;
  height: 16px;
}

.spot-popup-action-btn.nav-btn--waze .nav-brand-img--waze {
  width: 20px;
  height: 20px;
}

.spot-popup-nav {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.spot-popup-nav-btn {
  flex: 1;
  min-width: 56px;
  min-height: 40px;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.spot-popup-nav-btn.nav-btn--google {
  background: #fff;
  border: 1px solid #cbd5e1;
}

.spot-popup-nav-btn.nav-btn--coords {
  background: #fff;
  color: #475569;
}

.nav-btn--edit,
.edit-icon-btn,
.spot-photo-action.nav-btn--edit,
.settings-map-icon-btn.nav-btn--edit {
  background: #ffb74d;
  border: none;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nav-btn--edit:hover,
.edit-icon-btn:hover,
.spot-photo-action.nav-btn--edit:hover,
.settings-map-icon-btn.nav-btn--edit:hover {
  background: #ffa726;
}

.nav-brand-icon--edit {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.roadtrip-mini-btn.nav-btn--edit {
  background: #ffb74d;
}

.roadtrip-mini-btn.nav-btn--edit:hover {
  background: #ffa726;
}

.roadtrip-mini-btn.nav-btn--share {
  background: #42a5f5;
}

.roadtrip-mini-btn.nav-btn--share:hover {
  background: #1e88e5;
}

.roadtrip-participants-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.roadtrip-participant-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef4fb;
  color: #1e3a5f;
  font-size: 12px;
  font-weight: 600;
}

.roadtrip-participant-chip.is-pending {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fdba74;
}

.roadtrip-participant-chip.is-accepted {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.roadtrip-shared-banner {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eef4fb;
  color: #1e3a5f;
  font-size: 13px;
  font-weight: 600;
}

body.dark-mode .roadtrip-participant-chip {
  background: #273449;
  color: #cbd5e1;
}

body.dark-mode .roadtrip-participant-chip.is-pending {
  background: rgba(251, 146, 60, 0.18);
  color: #fdba74;
  border-color: rgba(251, 146, 60, 0.35);
}

body.dark-mode .roadtrip-participant-chip.is-accepted {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
}

body.dark-mode .roadtrip-shared-banner {
  background: rgba(37, 99, 235, 0.12);
  color: #bfdbfe;
}

.roadtrip-step-editor-top {
  margin: 0 0 12px;
  padding: 12px;
  border: 2px solid #0077ff;
  border-radius: 14px;
  background: #f0f7ff;
  box-shadow: 0 4px 14px rgba(0, 119, 255, 0.12);
}

.roadtrip-step-editor-top-head {
  font-size: 13px;
  font-weight: 700;
  color: #005bcc;
  margin-bottom: 10px;
}

.roadtrip-route-item--draft {
  opacity: 0.55;
}

.roadtrip-route-item--draft .roadtrip-route-summary {
  font-style: italic;
}

body.dark-mode .roadtrip-step-editor-top {
  background: rgba(37, 99, 235, 0.12);
  border-color: #2563eb;
}

body.dark-mode .roadtrip-step-editor-top-head {
  color: #bfdbfe;
}

.roadtrip-share-mode-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.roadtrip-share-mode-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.35;
  width: 100%;
  box-sizing: border-box;
}

.roadtrip-share-mode-option input[type="radio"] {
  margin-top: 3px;
  flex: 0 0 auto;
  width: auto;
  min-width: 16px;
  padding: 0;
  border: none;
  background: transparent;
}

.roadtrip-share-mode-option span {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.roadtrip-share-preview-day {
  padding: 10px 0;
  border-top: 1px solid #eef2f7;
}

.roadtrip-share-preview-day:first-child {
  border-top: none;
  padding-top: 0;
}

.roadtrip-share-preview-day-title {
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.roadtrip-share-preview-spots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.roadtrip-share-preview-notes {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.roadtrip-actions .roadtrip-mini-btn.nav-btn--share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 0 10px;
}

.nav-brand-icon--share {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.nav-brand-icon--duplicate {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.roadtrip-mini-btn.nav-btn--duplicate,
.edit-sheet-btn-duplicate {
  background: #94a3b8;
  color: #fff;
}

.roadtrip-mini-btn.nav-btn--duplicate:hover,
.edit-sheet-btn-duplicate:hover {
  background: #64748b;
}

.roadtrip-modal-unified-footer .edit-sheet-btn-duplicate {
  width: 40px;
  flex: 0 0 40px;
  padding: 0;
}

.friend-message-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.friend-message-modal-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
}

.friend-message-filter-btn {
  border: 1px solid #fde68a;
  background: #fff;
  color: #92400e;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.friend-message-filter-btn:hover {
  background: #fffbeb;
}

.friend-message-filter-btn.is-active {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #b45309;
}

.friend-message-modal-head .friend-modal-title {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.friend-message-clear-btn {
  flex-shrink: 0;
  border: 1px solid #fecaca;
  background: #fff;
  color: #dc2626;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.friend-message-clear-btn:hover:not(:disabled) {
  background: #fef2f2;
}

.friend-message-clear-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.friend-message-row-inner {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  max-width: 100%;
}

.friend-message-actions {
  display: flex;
  flex-direction: row;
  flex-shrink: 0;
  gap: 4px;
}

.friend-message-pin-btn {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
  transition: background 0.15s ease, color 0.15s ease;
}

.friend-message-pin-btn.is-pinned {
  opacity: 1;
  color: #f59e0b;
  background: #fffbeb;
}

.friend-message-row:hover .friend-message-pin-btn,
.friend-message-pin-btn:focus-visible,
.friend-message-pin-btn.is-pinned {
  opacity: 1;
}

.friend-message-pin-btn:hover {
  background: #fef3c7;
  color: #d97706;
}

.friend-message-row--pinned .friend-message-bubble {
  box-shadow: inset 0 0 0 1px #fde68a;
}

.friend-message-pin-label {
  font-size: 10px;
  font-weight: 700;
  color: #d97706;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.friend-message-row--mine .friend-message-row-inner {
  flex-direction: row;
}

.friend-message-delete-btn {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
  transition: background 0.15s ease, color 0.15s ease;
}

.friend-message-delete-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

.friend-message-modal-card {
  width: min(440px, calc(100vw - 24px));
  max-height: min(85vh, 640px);
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}

.friend-message-thread {
  flex: 1;
  min-height: 200px;
  max-height: min(50vh, 420px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 14px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.friend-message-empty {
  margin: auto;
  text-align: center;
  font-size: 13px;
  color: #64748b;
  padding: 24px 12px;
}

.friend-message-empty--error {
  color: #dc2626;
}

.friend-message-row {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}

.friend-message-row--mine {
  align-self: flex-end;
  align-items: flex-end;
}

.friend-message-row--theirs {
  align-self: flex-start;
  align-items: flex-start;
}

.friend-message-bubble {
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}

.friend-message-row--mine .friend-message-bubble {
  background: #2563eb;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.friend-message-row--theirs .friend-message-bubble {
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
}

.friend-message-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.friend-message-row--mine .friend-message-meta {
  justify-content: flex-end;
}

.friend-message-time {
  font-size: 10px;
  color: #94a3b8;
}

.friend-message-read-status {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
}

.friend-message-read-status--seen {
  color: #22c55e;
}

.friend-message-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.friend-message-compose {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.friend-message-input-wrap {
  position: relative;
}

.friend-message-emoji-toggle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.friend-message-emoji-toggle:hover,
.friend-message-emoji-toggle.is-open {
  background: #e2e8f0;
}

.friend-message-emoji-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.friend-message-emoji-bar[hidden] {
  display: none !important;
}

.friend-message-emoji-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.friend-message-emoji-btn:hover {
  background: #e2e8f0;
}

.friend-message-emoji-btn:active {
  transform: scale(0.92);
}

.friend-message-input {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  padding: 10px 44px 10px 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  background: #fff;
  box-sizing: border-box;
}

.friend-message-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.friend-message-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

body.dark-mode .friend-message-thread {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .friend-message-row--theirs .friend-message-bubble {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}

body.dark-mode .friend-message-input {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .friend-message-emoji-bar {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .friend-message-emoji-btn:hover {
  background: #334155;
}

body.dark-mode .friend-message-emoji-toggle:hover,
body.dark-mode .friend-message-emoji-toggle.is-open {
  background: #334155;
}

body.dark-mode .friend-message-pin-btn {
  background: #334155;
  color: #cbd5e1;
}

body.dark-mode .friend-message-delete-btn {
  background: #334155;
  color: #cbd5e1;
}

body.dark-mode .friend-message-clear-btn {
  background: #1e293b;
  border-color: #7f1d1d;
  color: #fca5a5;
}

body.dark-mode .friend-message-clear-btn:hover:not(:disabled) {
  background: #450a0a;
}

body.dark-mode .friend-message-filter-btn {
  background: #1e293b;
  border-color: #854d0e;
  color: #fcd34d;
}

body.dark-mode .friend-message-filter-btn.is-active {
  background: #422006;
  border-color: #f59e0b;
  color: #fde68a;
}

body.dark-mode .friend-message-delete-btn:hover {
  background: #450a0a;
  color: #fca5a5;
}

body.dark-mode .friend-message-pin-btn.is-pinned {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
}

body.dark-mode .friend-message-pin-btn:hover {
  background: rgba(251, 191, 36, 0.22);
  color: #fcd34d;
}

.friend-gallery-modal-card {
  width: min(920px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.friend-gallery-grid-wrap {
  max-height: min(60vh, 640px);
  overflow: auto;
  margin-top: 10px;
}

.friend-gallery-grid {
  margin-top: 0;
}

.edit-icon-btn--sm {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 8px;
  cursor: pointer;
}

.edit-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffb74d;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.edit-action-btn:hover {
  background: #ffa726;
}

.edit-action-btn .nav-brand-icon--edit {
  width: 15px;
  height: 15px;
}

.note-header-actions .nav-btn--edit {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.agenda-nav-btn svg {
  display: block;
  width: 16px;
  height: 16px;
}

.roadtrip-mini-btn.is-favorite {
  background: #fef3c7;
  color: #d97706;
}

.roadtrip-mini-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.agenda-view-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.agenda-view-meta-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.agenda-view-meta-value {
  font-size: 13px;
  font-weight: 600;
  color: #223;
  line-height: 1.4;
}

.agenda-view-note {
  margin-top: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.agenda-view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.agenda-view-action-btn {
  flex: 1 1 calc(50% - 4px);
  min-width: 130px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  color: #223;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.agenda-view-action-btn--primary {
  background: #0077ff;
  border-color: #0077ff;
  color: #fff;
}

.agenda-view-footer {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 12px 18px 18px;
  border-top: 1px solid #e2e8f0;
  background: #fafbfd;
}

.dashboard-year-photo {
  width: 100%;
  height: 140px;
  background: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.dashboard-year-card .dashboard-year-photo {
  height: 120px;
}

.dashboard-year-body {
  padding: 10px 12px 12px;
  background: #fff;
}

.dashboard-year-card-title,
.dashboard-gallery-title {
  font-size: 13px;
  font-weight: 700;
  color: #162131;
  line-height: 1.3;
}

.dashboard-year-card-meta,
.dashboard-gallery-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 3px;
  line-height: 1.35;
}

.dashboard-year-card-note {
  font-size: 11px;
  color: #475569;
  margin-top: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dashboard-gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, transparent 58%);
  color: #fff;
  pointer-events: none;
}

.dashboard-gallery-overlay button {
  pointer-events: auto;
}

.roadtrip-image-title,
.roadtrip-image-link {
  background: transparent;
  border: none;
  color: #fff;
  text-align: left;
  padding: 0;
  font-size: 12px;
  cursor: pointer;
}

.roadtrip-image-title {
  font-weight: 700;
  font-size: 13px;
}

.roadtrip-image-link {
  margin-top: 4px;
  opacity: 0.88;
  text-decoration: underline;
}

.dashboard-timeline {
  padding: 0 20px 20px;
}

.timeline-year,
.timeline-month {
  margin-bottom: 8px;
}

.dashboard-group-year-title {
  font-size: 18px;
  font-weight: 800;
  color: #162131;
  margin: 16px 0 10px;
}

.dashboard-group-month-title {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 10px 0 8px;
}

.dashboard-timeline-item {
  margin-bottom: 10px;
}

.dashboard-timeline-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  transition: box-shadow 0.18s ease;
}

.dashboard-timeline-card:hover {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.dashboard-timeline-photo {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: #e5e7eb;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.dashboard-timeline-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-timeline-body {
  min-width: 0;
  flex: 1;
}

.dashboard-timeline-title {
  font-size: 14px;
  font-weight: 700;
  color: #162131;
  margin-bottom: 4px;
}

.dashboard-timeline-meta {
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

.dashboard-timeline-note {
  font-size: 12px;
  color: #475569;
  margin-top: 6px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Legacy alias */
.dashboard-stats { display: grid; grid-template-columns: minmax(280px, 1.15fr) repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }

/* ==========================================================================
   4. SIDEBAR & NAVIGATION
   ========================================================================== */
/* Définition unique — conteneur hors écran pour les panneaux téléportés vers les sheets */
#appPanelsRoot {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  visibility: hidden;
}

#appPanelsRoot .sidebar-header,
#appPanelsRoot .sidebar-search,
#appPanelsRoot .sidebar-nav,
#appPanelsRoot #sidebarListView > .sidebar-view-head,
#appPanelsRoot #sidebarFriendsView > .sidebar-view-head,
#appPanelsRoot #sidebarFiltersView,
#appPanelsRoot #sidebarAgendaView {
  display: none !important;
}

#toggleSidebar {
  display: none !important;
}

body #sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    height: 100dvh;
    background: #fcfcfd;
    padding: 14px;
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    transform: translateX(0);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Gestion de l'état "fermé" que ton JavaScript utilise probablement */
#sidebar.closed {
    transform: translateX(-100%);
}

#toggleSidebar {
    position: fixed;
    top: 20px;
    left: 298px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 0 12px 12px 0;
    background: #0077ff;
    color: white;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3001;
    font-size: 20px;
    transition: left 0.3s ease;
}

#mapsPanel, #roadTripsPanel, #notesPanel, #filtersPanel,
#agendaPanel, #listPanel, #friendsPanel,
.sidebar-nest-panel,
#agendaFilterPanel { display: none; }

#mapsPanel.open, #roadTripsPanel.open, #notesPanel.open,
#filtersPanel.open, #agendaPanel.open, #listPanel.open, #friendsPanel.open,
.sidebar-nest-panel.open,
#agendaFilterPanel.open { display: block; }

.settings-manager-panel { display: none; }
#settingsPanel .settings-group .settings-manager-panel.open { display: flex !important; }

/* ==========================================================================
   SIDEBAR — layout harmonisé
   ========================================================================== */
#sidebar h3 {
  margin: 0 0 4px;
  font-size: 17px;
  color: #162131;
}

.sidebar-header {
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.sidebar-brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.sidebar-brand-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #162131;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.sidebar-subtitle {
  font-size: 11px;
  color: #64748b;
  margin: 0;
  line-height: 1.35;
}

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sidebar-search-input {
  flex: 1;
  min-width: 0;
  margin: 0 !important;
  border-radius: 12px;
  border: 1px solid #dbe3ee;
  padding: 10px 12px;
  font-size: 13px;
  background: #fff;
}

.sidebar-search-input:focus {
  outline: none;
  border-color: #0077ff;
  box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.12);
}

.sidebar-search-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #0088ff 0%, #006ee6 100%);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 119, 255, 0.26);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.sidebar-search-btn:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 16px rgba(0, 119, 255, 0.34);
}

.sidebar-search-btn:active {
  transform: translateY(1px);
}

.sidebar-user-card {
  margin-top: auto;
  flex-shrink: 0;
  padding: 12px;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-user-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0077ff 0%, #005bcc 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 119, 255, 0.22);
  overflow: hidden;
  position: relative;
}

.sidebar-user-avatar.has-photo {
  background: #e2e8f0;
}

.sidebar-user-avatar-img,
.settings-account-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-user-avatar.has-photo .sidebar-user-avatar-img,
.settings-account-avatar.has-photo .settings-account-avatar-img {
  display: block;
}

.sidebar-user-avatar.has-photo #userAvatarSidebarInitial,
.settings-account-avatar.has-photo #accountAvatarInitial {
  display: none;
}

.sidebar-user-text {
  min-width: 0;
  flex: 1;
}

.sidebar-user-name {
  font-size: 14px;
  font-weight: 700;
  color: #162131;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-logout-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff5f5;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.sidebar-logout-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.sidebar-logout-btn:active {
  transform: translateY(1px);
}

.sidebar-logout-icon {
  font-size: 15px;
  line-height: 1;
  opacity: 0.9;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
}

.sidebar-block {
  margin: 0;
}

#sidebar hr {
  display: none;
}

#sidebar .section-title,
#sidebar button.section-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

#sidebar .section-title:hover,
#sidebar button.section-title:hover {
  background: #f8fafc;
}

#sidebar button.section-title.sidebar-feature-locked {
  opacity: 0.72;
  border-style: dashed;
  border-color: #cbd5e1;
}

#sidebar button.section-title.sidebar-feature-locked span:first-child::after {
  content: " 🔒";
  font-size: 11px;
  opacity: 0.85;
}

#sidebar .section-title.active,
#sidebar button.section-title.active {
  border-color: #cbd5e1;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: #f8fafc;
}

#sidebar .sidebar-panel {
  margin-top: 0;
  padding: 10px 12px 12px;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: #fafbfc;
}

#sidebar .sidebar-panel-label,
#sidebar .sidebar-field-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin: 10px 0 6px;
}

#sidebar .sidebar-panel-label:first-child {
  margin-top: 0;
}

#sidebar .sidebar-action-btn,
#sidebar .sidebar-link-btn {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

#sidebar .sidebar-action-btn {
  border: 1px solid #dbeafe;
  background: #eef4fb;
  color: #0b3d91;
  margin-bottom: 8px;
}

#sidebar .sidebar-link-btn {
  border: 1px dashed #cbd5e1;
  background: #fff;
  color: #475569;
  margin-top: 8px;
}

#sidebar .roadtrip-all-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  color: #0b3d91;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

#sidebar .sidebar-action-btn--icon,
#sidebar .sidebar-link-btn--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#sidebar .roadtrip-all-link-btn .sidebar-link-btn-icon {
  color: inherit;
}

#sidebar .roadtrip-all-link-btn:hover {
  background: linear-gradient(180deg, #eef4fb 0%, #e3edf9 100%);
  border-color: #93c5fd;
}

body.dark-mode #sidebar .roadtrip-all-link-btn {
  border-color: #334155;
  background: linear-gradient(180deg, #1e293b 0%, #172033 100%);
  color: #bfdbfe;
  box-shadow: none;
}

body.dark-mode #sidebar .roadtrip-all-link-btn:hover {
  background: linear-gradient(180deg, #243044 0%, #1a2438 100%);
  border-color: #475569;
}

#sidebar .sidebar-list-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-map-count {
  font-weight: 700;
  color: #64748b;
  margin-left: 2px;
}

body.dark-mode .sidebar-map-count {
  color: #94a3b8;
}

#sidebar .sidebar-filter-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

#sidebar .sidebar-nest {
  margin-top: 8px;
}

#sidebar .sidebar-nest-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
}

#sidebar .sidebar-nest-btn-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#sidebar .sidebar-nest-btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef4fb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #334155;
}

#sidebar .sidebar-nest-btn-icon .ui-icon {
  display: block;
}

#mapFiltersPanelHost .sidebar-nest-btn-icon,
.map-filters-sheet-body .sidebar-nest-btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef4fb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #334155;
}

#sidebar .sidebar-nest-btn--solo {
  justify-content: flex-start;
}

#sidebar .sidebar-nest-btn.active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: #f8fafc;
}

#sidebar .sidebar-nest-panel {
  padding: 8px 0 4px;
  border: none;
  border-radius: 0;
  background: transparent;
}

#sidebar #filters,
#sidebar #statusFilters,
#sidebar #stateFilters,
#sidebar #spotTagFilters,
#sidebar #agendaQuickFilters,
#sidebar #agendaTagFilters,
#mapFiltersPanelHost #filters,
#mapFiltersPanelHost #statusFilters,
#mapFiltersPanelHost #stateFilters,
#mapFiltersPanelHost #spotTagFilters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  margin: 0;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.filter-pill:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.filter-pill:active:not(:disabled) {
  transform: scale(0.98);
}

.filter-pill.is-active {
  background: var(--filter-pill-accent, #dbeafe);
  border-color: var(--filter-pill-accent-border, #3b82f6);
  color: var(--filter-pill-accent-text, #1d4ed8);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.14);
}

.filter-pill--primary.is-active {
  --filter-pill-accent: #2563eb;
  --filter-pill-accent-border: #2563eb;
  --filter-pill-accent-text: #ffffff;
}

.filter-pill--favorites.is-active {
  --filter-pill-accent: #fef3c7;
  --filter-pill-accent-border: #f59e0b;
  --filter-pill-accent-text: #92400e;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.18);
}

.filter-pill--private.is-active {
  --filter-pill-accent: #64748b;
  --filter-pill-accent-border: #475569;
  --filter-pill-accent-text: #ffffff;
  box-shadow: 0 1px 4px rgba(71, 85, 105, 0.2);
}

.filter-pill:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.filter-pill .filter-chip-icon {
  display: inline-flex;
  vertical-align: middle;
  margin-right: 0;
}

.filter-pill .filter-chip-icon .ui-icon {
  display: block;
}

#sidebar .sidebar-reset-eye {
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #ffe7c2;
  font-size: 13px;
  color: #c2410c;
}

#sidebar .sidebar-reset-eye.visible {
  display: inline-flex;
}

#dashboardBtn .dashboard-exit-eye {
  display: none;
}

#dashboardBtn.active .dashboard-exit-eye {
  display: inline-flex;
}

#sidebar #filters button:not(.filter-pill),
#sidebar #statusFilters button:not(.filter-pill),
#sidebar #stateFilters button:not(.filter-pill),
#sidebar #spotTagFilters button:not(.filter-pill),
#sidebar #agendaQuickFilters button:not(.filter-pill),
#sidebar #agendaTagFilters button:not(.filter-pill) {
  font-size: 11px;
  padding: 6px 9px;
  margin: 0 4px 4px 0;
  border-radius: 999px;
}

.notes-compact-add {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

.notes-compact-add .notes-name-input,
.notes-compact-add .form-control {
  margin-top: 0 !important;
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important;
  min-height: 38px;
  font-size: 13px;
}

.notes-compact-add .notes-add-btn {
  flex: 0 0 auto;
  min-width: 76px;
  min-height: 38px;
  height: auto;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
}

.notes-compact-add .notes-add-btn--icon {
  min-width: 38px;
  width: 38px;
  padding: 0;
}

.notes-add-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.note-card {
  padding: 12px;
  margin: 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.note-card--compact {
  padding: 10px 12px;
  margin: 0;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.note-card:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.note-card-body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.note-card-content {
  flex: 1;
  min-width: 0;
}

.note-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #222;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-card-compact {
  font-size: 13px;
  font-weight: 600;
  color: #5f6b7a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-card-cats {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

.note-card-cats-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: #94a3b8;
}

.note-header-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  align-self: flex-start;
}

.note-icon-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.note-icon-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

.note-icon-btn.note-pin-active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #2563eb;
}

.note-icon-btn--edit:hover {
  background: #fff7ed;
  border-color: #fdba74;
  color: #ea580c;
}

.note-icon-btn--danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.note-meta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  margin-top: 6px;
  color: #64748b;
}

.note-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.note-meta-item .ui-icon {
  color: #94a3b8;
}

.note-meta-link-btn {
  border: none;
  background: none;
  padding: 0;
  color: #2563eb;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.notes-all-link-btn {
  width: 100%;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.notes-all-link-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.notes-all-link-btn-icon {
  display: inline-flex;
  color: #2563eb;
}

.notes-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  z-index: 10006;
}

.notes-modal-overlay[hidden] {
  display: none !important;
}

.notes-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 620px);
  max-height: 85vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
  z-index: 10007;
}

.notes-modal[hidden] {
  display: none !important;
}

.notes-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.notes-modal-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  color: #0f172a;
}

.notes-modal-title-icon {
  display: inline-flex;
  color: #2563eb;
}

.notes-modal-close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.notes-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.notes-compact-add--modal {
  margin-top: 0;
}

.notes-modal-search {
  margin-top: 10px !important;
}

.notes-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.notes-toolbar-select {
  margin-top: 0 !important;
  min-height: 38px;
  font-size: 13px;
}

.notes-reset-btn {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.notes-reset-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.notes-reset-btn-icon {
  display: inline-flex;
  color: #64748b;
}

.note-card-preview {
  font-size: 12px;
  color: #5f6b7a;
  margin-top: 6px;
}

.note-card-links {
  font-size: 11px;
  margin-top: 6px;
  color: #4a90e2;
}

.note-card--modal .note-card-body {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.note-card--modal .note-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.note-card--modal .note-card-head-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.note-card--modal .note-card-head-text {
  flex: 1;
  min-width: 0;
}

.note-card--modal .note-card-title {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-card--modal .note-card-cats {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-card--modal .note-card-preview {
  width: 100%;
  margin-top: 0;
  line-height: 1.45;
  word-break: break-word;
}

.note-card--modal .note-card-links {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin-top: 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.note-card--modal .note-card-links-label {
  flex-shrink: 0;
  color: #64748b;
}

.note-card--modal .note-card-links-values {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #4a90e2;
}

.note-card--modal .note-card-meta-links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
  color: #64748b;
}

.note-card--modal .note-card-meta-links .note-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-card--modal .note-header-actions {
  flex-shrink: 0;
}

#sidebar .notes-compact-add .notes-add-btn {
  width: auto;
  margin-bottom: 0;
}

/* Modale agenda */
#agendaEventPanel.open {
  display: block;
}

.agenda-form-scroll {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: min(62vh, 520px);
  overflow-y: auto;
  padding-right: 4px;
}

.agenda-form-scroll .field-label {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.agenda-form-scroll .form-control {
  margin-top: 4px;
}

.agenda-photo-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.agenda-photo-preview img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
}

.agenda-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.agenda-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.agenda-tag-pill--editable {
  padding-right: 6px;
}

.agenda-tag-pill-remove {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #64748b;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.spot-tags-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.spot-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 10px;
  border-radius: 999px;
  background: #eef4fb;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.chip-remove-btn {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #64748b;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip-remove-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.done-date-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

.done-date-select {
  flex: 1;
  min-width: 0;
  margin-top: 0 !important;
}

.done-date-remove-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  -webkit-appearance: none;
  appearance: none;
}

#formBox .chip-remove-btn,
#formBox .done-date-remove-btn,
#formBox .spot-tag-chip-remove {
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
}

.agenda-ongoing-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ccfbf1;
  color: #0f766e;
  font-size: 10px;
  font-weight: 800;
}

.agenda-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  margin: 0 4px 4px 0;
  border-radius: 999px;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 11px;
}

.agenda-extra-date-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.agenda-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

.agenda-btn-save {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: #0077ff;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

/* Pied de fiche d'édition uniforme (spot, note, agenda) */
.edit-sheet-footer {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.edit-sheet-footer-sticky {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin-top: 16px;
  margin-bottom: -18px;
  padding: 12px 0 18px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.edit-sheet-btn {
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 45px;
  font-size: 14px;
}

.edit-sheet-btn-delete {
  width: 45px;
  flex: 0 0 45px;
  background: #e53935;
  color: #fff;
  font-size: 18px;
}

.edit-sheet-btn-save {
  flex: 1;
  background: #2ecc71;
  color: #fff;
}

.edit-sheet-btn-edit {
  flex: 1;
  background: #ffb74d;
  color: #fff;
  gap: 8px;
}

.edit-sheet-btn-close {
  width: 88px;
  flex: 0 0 88px;
  background: #bdbdbd;
  color: #fff;
}

.edit-sheet-btn-save {
  gap: 8px;
}

.edit-sheet-btn-delete .ui-icon,
.edit-sheet-btn-save .ui-icon {
  display: block;
}

/* Fiche d'édition unifiée — spot, agenda, road trip */
.entity-edit-sheet {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  font-size: 14px;
  color: #1e293b;
}

.entity-edit-sheet--inline {
  min-height: 0;
}

.entity-edit-sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.entity-edit-sheet__head-main {
  flex: 1 1 auto;
  min-width: 0;
}

.entity-edit-sheet__head-tools {
  flex-shrink: 0;
}

.entity-edit-sheet__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #162131;
  line-height: 1.25;
}

.entity-edit-sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}

.entity-edit-sheet__label,
.entity-edit-sheet .field-label,
.entity-edit-sheet .spot-form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 12px 0 6px;
}

.entity-edit-sheet__body > .entity-edit-sheet__label:first-child,
.entity-edit-sheet__body > .field-label:first-child,
.entity-edit-sheet__body > .spot-form-label:first-of-type {
  margin-top: 0;
}

.entity-edit-sheet__sublabel {
  display: block;
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.entity-edit-sheet__hint {
  margin: 8px 0 0;
}

.entity-edit-sheet__input,
.entity-edit-sheet .form-control,
.entity-edit-sheet .spot-form-input {
  margin-top: 0;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

.entity-edit-sheet__coords-row {
  display: flex;
  gap: 8px;
}

.entity-edit-sheet__coords-row .entity-edit-sheet__input {
  flex: 1 1 0;
  min-width: 0;
}

.entity-edit-sheet__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0 4px;
}

.entity-edit-sheet__actions--icons {
  border-top: 1px solid #e5e7eb;
}

.entity-edit-sheet__body.agenda-form-scroll {
  max-height: none;
  gap: 0;
}

#formBox.entity-edit-sheet .entity-edit-sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

#formBox.entity-edit-sheet {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10002;
  flex-direction: column;
  overflow: hidden;
  width: min(92vw, 560px);
  max-height: 85vh;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid #dfe7f0;
  background: #fcfdff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.24);
  box-sizing: border-box;
}

#agendaEventPanel.open.agenda-panel-edit {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#agendaEventPanel.open.agenda-panel-edit .entity-edit-sheet--inline {
  flex: 1 1 auto;
  min-height: 0;
}

#roadTripDetailPanel.open .entity-edit-sheet.roadtrip-modal-shell {
  flex: 1 1 auto;
  min-height: 0;
}

.roadtrip-modal-unified-footer.edit-sheet-footer {
  margin-top: 0;
}

.roadtrip-modal-unified-footer .edit-sheet-btn-save,
.roadtrip-modal-unified-footer .roadtrip-footer-save {
  flex: 1;
  min-width: 0;
}

body.dark-mode .entity-edit-sheet__title {
  color: #f8fafc;
}

body.dark-mode .entity-edit-sheet__label,
body.dark-mode .entity-edit-sheet .field-label,
body.dark-mode .entity-edit-sheet .spot-form-label,
body.dark-mode .entity-edit-sheet__sublabel {
  color: #94a3b8;
}

body.dark-mode .entity-edit-sheet__input,
body.dark-mode .entity-edit-sheet .form-control,
body.dark-mode .entity-edit-sheet .spot-form-input {
  background: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}

body.dark-mode .entity-edit-sheet__actions--icons {
  border-top-color: #334155;
}

body.dark-mode #formBox.entity-edit-sheet {
  background: #162131;
  border-color: #334155;
}

body.dark-mode .edit-sheet-footer-sticky {
  background: #162131;
  border-top-color: #334155;
}

.agenda-form-scroll .agenda-note-field {
  min-height: 110px;
  resize: vertical;
}

.notes-modal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  max-height: min(50vh, 420px);
  overflow-y: auto;
}

#noteFormBox {
  z-index: 10003;
}

#noteFormBox.entity-edit-sheet,
#noteViewBox.entity-edit-sheet {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10003;
  flex-direction: column;
  overflow: hidden;
  width: min(92vw, 560px);
  max-height: 85vh;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid #dfe7f0;
  background: #fcfdff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.24);
  box-sizing: border-box;
}

#noteFormBox.entity-edit-sheet .entity-edit-sheet__body {
  padding-bottom: 4px;
}

#noteViewBox.entity-edit-sheet {
  z-index: 10005;
}

#noteFormBox .entity-edit-sheet__body,
#noteViewBox .entity-edit-sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  gap: 10px;
}

#noteFormBox .spot-form-pills-box,
#noteViewBox .spot-form-pills-box {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 118px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px;
  background: #fafafa;
}

#noteFormBox .cat-pill {
  font-size: 11px;
  padding: 4px 8px;
  gap: 4px;
}

.note-view-photos {
  margin: 0 0 4px;
}

.note-view-photos .note-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

.note-view-photos img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  cursor: zoom-in;
}

#noteViewBox .spot-form-pills-box.note-view-cats-box {
  max-height: 96px;
  pointer-events: none;
}

#noteViewBox .spot-form-pills-box .cat-pill {
  cursor: default;
}

.note-view-text {
  font-size: 14px;
  line-height: 1.55;
  color: #1e293b;
  white-space: pre-wrap;
  word-break: break-word;
}

#noteViewBox .note-view-footer-actions {
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid #eef2f7;
}

.note-form-pin-check {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.note-form-pin-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.note-form-pin-pill:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.note-form-pin-pill-icon {
  display: inline-flex;
  color: #94a3b8;
  flex-shrink: 0;
}

.note-form-pin-pill:has(.note-form-pin-check:checked) {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.note-form-pin-pill:has(.note-form-pin-check:checked) .note-form-pin-pill-icon {
  color: #2563eb;
}

.note-form-pin-pill-label {
  line-height: 1.2;
}

#noteFormBox .note-form-footer-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0 0;
  margin-top: 8px;
  border-top: 1px solid #eef2f7;
}

.note-form-footer-actions-end {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

#noteFormBox .note-icon-btn--danger,
#noteFormBox .note-icon-btn--save {
  border: 1px solid #cbd5e1;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
}

#noteFormBox .note-icon-btn--save {
  background: #f8fafc;
}

#noteFormBox .note-icon-btn--danger:hover {
  border-color: #fca5a5;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.08);
}

#noteFormBox .note-icon-btn--save:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1);
}

body.dark-mode #noteFormBox .note-form-footer-actions {
  border-top-color: #334155;
}

body.dark-mode .note-form-pin-pill {
  background: #0f172a;
  border-color: #475569;
  color: #cbd5e1;
}

body.dark-mode .note-form-pin-pill:hover {
  background: #1e293b;
  border-color: #64748b;
}

body.dark-mode .note-form-pin-pill-icon {
  color: #64748b;
}

body.dark-mode .note-form-pin-pill:has(.note-form-pin-check:checked) {
  background: #172554;
  border-color: #3b82f6;
  color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

body.dark-mode .note-form-pin-pill:has(.note-form-pin-check:checked) .note-form-pin-pill-icon {
  color: #60a5fa;
}

body.dark-mode #noteFormBox .note-icon-btn--danger,
body.dark-mode #noteFormBox .note-icon-btn--save {
  border-color: #475569;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35);
}

.spot-share-friend-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: min(42vh, 280px);
  overflow-y: auto;
  margin: 10px 0 14px;
  padding: 2px;
}

.spot-share-friend-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 5px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.spot-share-friend-badge:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.spot-share-friend-badge.is-selected {
  border-color: #6366f1;
  background: #eef2ff;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.spot-share-friend-badge-avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.spot-share-friend-badge-label {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dark-mode #noteFormBox.entity-edit-sheet,
body.dark-mode #noteViewBox.entity-edit-sheet {
  background: #162131;
  border-color: #334155;
}

body.dark-mode #noteFormBox .spot-form-pills-box {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .note-view-text {
  color: #e2e8f0;
}

body.dark-mode #noteViewBox .spot-form-pills-box {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .spot-share-friend-badge {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .spot-share-friend-badge.is-selected {
  background: #312e81;
  border-color: #6366f1;
}

.edit-sheet-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 520px);
  max-height: 85vh;
  overflow: auto;
  background: white;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  z-index: 10003;
}

.edit-sheet-title {
  margin-top: 0;
  margin-bottom: 12px;
}

.edit-sheet-footer--view .edit-sheet-btn-edit {
  flex: 1;
}

body.dark-mode .edit-sheet-modal,
body.dark-mode #noteViewBox {
  background: #162131;
  border: 1px solid #334155;
}

.agenda-sidebar-row {
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.agenda-sidebar-row:hover {
  background: #f8fafc;
}

.agenda-sidebar-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.agenda-photo-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  background: #e5e7eb;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.agenda-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agenda-sidebar-name {
  font-size: 13px;
  font-weight: 700;
  color: #162131;
  line-height: 1.25;
}

.agenda-sidebar-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* Marqueurs agenda sur la carte */
.agenda-marker-wrap {
  background: transparent;
  border: none;
}

.agenda-marker {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb74d, #f57c00);
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}

.agenda-popup {
  min-width: 180px;
}

.agenda-popup-title {
  font-size: 14px;
  font-weight: 700;
  color: #162131;
  margin-bottom: 4px;
}

.agenda-popup-meta,
.agenda-popup-place {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.agenda-popup-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.agenda-popup-actions button {
  flex-shrink: 0;
}

.agenda-popup-meta,
.agenda-popup-place {
  display: flex;
  align-items: center;
  gap: 6px;
}

.agenda-popup-meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.agenda-filter-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.agenda-filter-toggle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-size: 15px;
}

.agenda-filter-toggle.active {
  background: #eef4fb;
  border-color: #93c5fd;
}

/* Paramètres modal */
#settingsPanel .settings-nav-toggle[aria-expanded="true"] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #3b82f6;
  color: #1e3a8a;
  box-shadow: 0 1px 0 rgba(59, 130, 246, 0.12);
}

#settingsPanel .settings-nav-block:has(.settings-nav-toggle[aria-expanded="true"]) .settings-nav-items {
  margin-top: 0;
  padding: 8px;
  background: #eff6ff;
  border: 1px solid #3b82f6;
  border-top: none;
  border-radius: 0 0 14px 14px;
}

#settingsPanel .settings-section-btn.active,
#settingsPanel .settings-section-btn--nested.active {
  border-color: #3b82f6;
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e3a8a;
  box-shadow: 0 1px 0 rgba(59, 130, 246, 0.12);
}

#settingsPanel .settings-section-btn.active:hover,
#settingsPanel .settings-section-btn--nested.active:hover {
  background: linear-gradient(180deg, #bfdbfe 0%, #93c5fd 100%);
  border-color: #2563eb;
  color: #1e3a8a;
}

#settingsPanel .settings-section-btn--nested:not(.active) {
  background: #fff;
  border-color: #bfdbfe;
}

#settingsPanel .settings-group {
  margin-bottom: 8px;
}

#settingsPanel .settings-nav-block {
  margin-bottom: 8px;
}

#settingsPanel .settings-nav-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

#settingsPanel .settings-nav-items[hidden] {
  display: none !important;
}

#settingsPanel .settings-section-btn--nested {
  margin-left: 0;
  border-radius: 12px;
  font-size: 12.5px;
}

#settingsPanel.open {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#settingsPanel.subpanel-open {
  overflow: hidden;
}

#settingsPanel.subpanel-open .settings-modal-head {
  position: sticky;
  top: 0;
  z-index: 6;
  flex-shrink: 0;
  margin-bottom: 0;
  padding-bottom: 12px;
  background: #fcfdff;
  border-bottom: 1px solid #eef2f7;
}

.settings-modal-head-main {
  flex: 1;
  min-width: 0;
}

.settings-modal-breadcrumb {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #162131;
  line-height: 1.3;
}

.settings-modal-breadcrumb-sep {
  color: #94a3b8;
  font-weight: 600;
  margin: 0 4px;
}

#settingsMainContent.hidden {
  display: none !important;
}

#settingsSubpanelContainer {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

#settingsSubpanelContainer.open {
  display: flex;
}

#settingsSubpanelContainer.open > .settings-manager-panel {
  display: flex !important;
  flex: 1 1 auto;
  min-height: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 12px 0 0;
  max-height: none;
  overflow: hidden;
}

#settingsSubpanelContainer.open .settings-manager-head {
  display: none;
}

#settingsSubpanelContainer.open .settings-manager-body {
  padding-top: 4px;
}

#settingsSubpanelContainer.open .settings-gestion-nav-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  min-height: 0;
}

#settingsSubpanelContainer.open .settings-help-body {
  overflow-y: auto;
  min-height: 0;
}

.settings-manager-actions--icons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  margin-top: auto;
  border-top: 1px solid #eef2f7;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  background: #fcfdff;
  z-index: 2;
}

.settings-manager-actions--icons .note-icon-btn--save {
  border: 1px solid #cbd5e1;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
  background: #f8fafc;
}

body.dark-mode #settingsPanel.subpanel-open .settings-modal-head,
body.dark-mode .settings-manager-actions--icons {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .settings-modal-breadcrumb {
  color: #f8fafc;
}

body.dark-mode #settingsSubpanelContainer.open > .settings-manager-panel {
  background: transparent;
}

body.dark-mode .roadtrip-all-row-actions .note-icon-btn,
body.dark-mode .roadtrip-sidebar-card-actions .note-icon-btn,
body.dark-mode .roadtrip-modal-icon-footer .note-icon-btn,
body.dark-mode .settings-map-icon-btn {
  border-color: #475569;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35);
}

#settingsPanel .settings-group:has(.settings-manager-panel.open) > .settings-section-btn.active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

#settingsPanel .settings-nav-items:not([hidden]) + .settings-group-panel,
#settingsPanel .settings-nav-block .settings-group:last-child {
  margin-bottom: 0;
}

.settings-admin-divider {
  margin-top: 4px;
}

.settings-data-section {
  padding: 12px;
  border: 1px solid #dfe7f0;
  border-radius: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-data-section + .settings-data-section {
  margin-top: 4px;
}

.settings-data-section--admin {
  border-color: #fcd34d;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
}

.settings-data-section-title {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #334155;
}

.settings-data-section--admin .settings-data-section-title {
  color: #92400e;
}

.settings-data-section-hint {
  margin: -4px 0 4px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.45;
}

.settings-data-admin-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-data-inline-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.orphan-spots-map-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 10px;
}

.orphan-spots-map-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.orphan-spots-map-choice:has(input:checked) {
  border-color: #3b82f6;
  background: #eff6ff;
}

.orphan-spots-map-choice input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
}

.orphan-spots-action-btn {
  width: 100%;
  margin-top: 4px;
}

body.dark-mode .orphan-spots-map-choice {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}

body.dark-mode .orphan-spots-map-choice:has(input:checked) {
  border-color: #60a5fa;
  background: #1e3a5f;
}

.settings-data-select {
  flex: 1 1 180px;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  background: #fff;
}

.subscription-orphan-hint,
.subscription-desync-hint {
  color: #b45309;
}

body.dark-mode .settings-data-select {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}

.settings-tag-add-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.settings-tag-add-row .form-control {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  min-height: 42px;
}

.settings-data-btn--compact {
  width: auto;
  min-width: 108px;
  flex-shrink: 0;
}

.settings-data-btn--add {
  margin-top: 4px;
}

.settings-manager-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #dfe7f0;
  border-radius: 12px;
}

.settings-icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #dfe7f0;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.settings-icon-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.settings-icon-btn--save {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #047857;
}

.settings-icon-btn--danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.settings-icon-btn .ui-icon,
.roadtrip-mini-btn .ui-icon,
.dashboard-agenda-thumb-fallback .ui-icon {
  display: block;
  color: #64748b;
}

.settings-icon-btn--save .ui-icon {
  color: #047857;
}

.settings-icon-btn--danger .ui-icon {
  color: #b91c1c;
}

.dashboard-agenda-thumb-fallback .ui-icon {
  color: #64748b;
}

.agenda-view-meta-icon {
  display: inline-flex;
  align-items: center;
  vertical-align: -2px;
  margin-right: 4px;
  color: #64748b;
}

.add-menu-section-icon .ui-icon,
.add-menu-locate-btn .ui-icon {
  display: block;
}

.add-menu-locate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 13050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
}

.app-dialog-overlay[hidden] {
  display: none !important;
}

.app-dialog-card {
  width: min(100%, 420px);
  padding: 18px 18px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #dfe7f0;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.app-dialog-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.app-dialog-message {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #334155;
  white-space: pre-wrap;
}

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

body.dark-mode .settings-data-section {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .settings-data-section--admin {
  background: linear-gradient(180deg, #422006 0%, #1e293b 100%);
  border-color: #92400e;
}

body.dark-mode .settings-manager-list-row {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .settings-icon-btn {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}

body.dark-mode .app-dialog-card {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .app-dialog-title {
  color: #f8fafc;
}

body.dark-mode .app-dialog-message {
  color: #cbd5e1;
}

#settingsPanel .settings-manager-panel {
  flex-direction: column;
  border: 1px solid #dfe7f0;
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: #f8fafc;
  padding: 12px;
  max-height: 50vh;
  overflow: hidden;
}

#settingsPanel .settings-manager-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

#settingsPanel .settings-manager-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 2;
  background: inherit;
  padding-bottom: 2px;
}

#settingsPanel .settings-manager-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#settingsPanel .settings-manager-close:hover {
  background: #e2e8f0;
  color: #1e293b;
}

#settingsPanel #settingsAdminOnboardingPanel.open {
  display: flex !important;
  flex-direction: column;
  max-height: min(72vh, 720px);
}

#settingsPanel #settingsAdminOnboardingPanel.open .settings-manager-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

#settingsPanel .settings-manager-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #162131;
}

#settingsPanel .settings-divider-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 8px;
}

#settingsPanel .field-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings-nav-items--inline {
  padding-top: 4px;
}

.settings-nav-items--inline .settings-display-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-display-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-display-select {
  margin-top: 6px;
}

.settings-display-preview-btn {
  margin-top: 10px;
  width: 100%;
}

.settings-display-preview-btn + .settings-display-preview-btn {
  margin-top: 8px;
}

.settings-display-subfield {
  margin-top: 12px;
}

.settings-display-subfield .settings-card-label {
  margin-bottom: 0;
}

.settings-display-nest {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.settings-display-nest-btn {
  width: 100%;
  justify-content: space-between;
  text-align: left;
  background: #fff;
  border-color: #e2e8f0;
  color: #334155;
}

.settings-display-nest-btn .settings-section-btn-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.settings-display-nest-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.settings-display-nest-btn.active {
  background: #f8fafc;
  border-color: #bfdbfe;
  color: #1e3a8a;
}

.settings-display-nest-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 2px 2px;
}

.settings-display-nest-panel[hidden] {
  display: none !important;
}

.settings-quick {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.settings-card {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.settings-card-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 10px;
}

.settings-segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.settings-segment {
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.settings-segment:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.settings-segment.active {
  background: #0077ff;
  border-color: #0077ff;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 119, 255, 0.28);
}

.settings-segment-icon {
  font-size: 16px;
  line-height: 1;
}

.settings-range-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.settings-range-label .settings-card-label {
  margin-bottom: 0;
}

.settings-range-value {
  font-size: 13px;
  font-weight: 700;
  color: #0077ff;
}

.settings-range-input {
  width: 100%;
  margin: 0;
  accent-color: #0077ff;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.settings-toggle-copy .settings-card-label {
  margin-bottom: 0;
}

.settings-toggle-hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

/* ——— Notifications (Paramètres → Compte) ——— */
.settings-notifications-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-notifications-intro {
  margin: 0 0 4px;
}

.settings-notifications-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 12px;
  padding-bottom: 8px;
}

.settings-notifications-section-title {
  margin-bottom: 2px;
}

.settings-notifications-section-hint {
  margin: 0 0 8px;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
}

.settings-notifications-section-hint--spaced {
  margin-top: 12px;
}

.settings-notifications-push-status {
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.settings-notifications-enable-btn {
  width: 100%;
  margin-bottom: 4px;
}

.notif-settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 2px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e8eef4;
  cursor: pointer;
  user-select: none;
}

.notif-settings-row--last {
  border-bottom: none;
  padding-bottom: 4px;
}

.notif-settings-row-copy {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.notif-settings-row-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
}

.notif-settings-row-hint {
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}

.notif-settings-check {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: #0077ff;
  cursor: pointer;
}

body.dark-mode .notif-settings-row {
  border-bottom-color: #334155;
}

body.dark-mode .notif-settings-row-title {
  color: #f1f5f9;
}

body.dark-mode .notif-settings-row-hint,
body.dark-mode .settings-notifications-section-hint {
  color: #94a3b8;
}

body.dark-mode .settings-notifications-push-status {
  color: #cbd5e1;
  background: #1e293b;
  border-color: #334155;
}

.darkmode-toggle {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.darkmode-track {
  position: relative;
  width: 74px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  box-sizing: border-box;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.darkmode-icon {
  position: relative;
  z-index: 1;
  font-size: 15px;
  line-height: 1;
  opacity: 0.38;
  transition: opacity 0.25s ease, transform 0.25s ease;
  user-select: none;
}

.darkmode-thumb {
  position: absolute;
  top: 4px;
  left: calc(100% - 32px);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  transition: left 0.25s ease, background 0.25s ease;
  z-index: 2;
}

.darkmode-toggle:not(.is-dark) .darkmode-sun {
  opacity: 1;
  transform: scale(1.08);
}

.darkmode-toggle.is-dark .darkmode-track {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-color: #334155;
}

.darkmode-toggle.is-dark .darkmode-thumb {
  left: 4px;
  background: #475569;
}

.darkmode-toggle.is-dark .darkmode-moon {
  opacity: 1;
  transform: scale(1.08);
}

#settingsAccountPanelHome {
  display: none !important;
}

#settingsPanel .settings-section-btn-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

#settingsPanel .settings-section-btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #eef4fb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #334155;
}

#settingsPanel .settings-section-btn-icon .ui-icon,
#settingsPanel .settings-data-btn-icon .ui-icon,
#settingsPanel .settings-launch-hint .ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  max-width: none;
  max-height: none;
  flex-shrink: 0;
  pointer-events: none;
}

#settingsPanel .settings-data-btn-icon .ui-icon {
  width: 16px;
  height: 16px;
}

#settingsPanel .settings-launch-hint .ui-icon {
  width: 14px;
  height: 14px;
}

#settingsPanel .settings-section-btn-icon,
#settingsPanel .settings-data-btn-icon {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

#settingsPanel .settings-launch-hint.ui-icon-host {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex-shrink: 0;
}

.settings-data-btn-icon.ui-icon-host .ui-icon {
  display: block;
}

.map-profile-action-btn--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.map-profile-action-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
}

.section-title--icon .section-title-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

body.dark-mode #settingsPanel .settings-section-btn-icon {
  background: #1e293b;
  color: #e2e8f0;
}

#settingsPanel .settings-section-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #dfe7f0;
  border-radius: 14px;
  background: #fff;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

#settingsPanel .settings-section-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.settings-data-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subscription-settings-body {
  gap: 10px;
}

.subscription-settings-body .settings-data-section {
  margin: 0;
}

.subscription-settings-body .subscription-card {
  margin: 0;
  border: none;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.settings-data-intro {
  margin: 0 0 4px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

.settings-data-hint {
  margin: -2px 0 8px;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
}

.settings-data-btn--backup {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
}

.settings-data-btn--backup .settings-data-btn-icon {
  background: #dbeafe;
}

.settings-data-btn--backup:hover {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
}

.settings-data-btn {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dfe7f0;
  border-radius: 12px;
  background: #fff;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.settings-data-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.settings-data-btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef4fb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.settings-data-btn--danger {
  border-color: #fecaca;
  background: #fff5f5;
  color: #b91c1c;
}

.settings-data-btn--danger .settings-data-btn-icon {
  background: #fee2e2;
}

.settings-data-btn--danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

#settingsPanel .settings-tag-add-row .settings-data-btn.settings-data-btn--compact {
  width: auto;
  min-width: 104px;
  max-width: 42%;
  flex: 0 0 auto;
  align-self: stretch;
  min-height: 42px;
  margin-top: 0;
}

.settings-data-btn--disabled,
.settings-data-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.settings-data-btn--ready:not(:disabled) {
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.45);
}

.settings-update-hint {
  margin: 8px 0 0;
}

.subscription-card {
  margin-bottom: 4px;
}

.subscription-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.subscription-plan-badge {
  display: inline-flex;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 600;
}

.subscription-plan-badge[data-plan="tier2"],
.subscription-plan-badge[data-plan="beta"] {
  background: #fef3c7;
  color: #b45309;
}

.subscription-status-pill {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
}

.subscription-usage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.subscription-usage-item {
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.subscription-usage-label {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}

.subscription-usage-value {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.subscription-soon-hint code {
  font-size: 11px;
}

body.dark-mode #settingsPanel .subscription-usage-item {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode #settingsPanel .subscription-usage-value {
  color: #f8fafc;
}

body.dark-mode #settingsPanel .subscription-plan-badge {
  background: #1e3a8a;
  color: #dbeafe;
}

body.dark-mode #settingsPanel .subscription-status-pill {
  background: #334155;
  color: #cbd5e1;
}

.subscription-plans-table-wrap {
  margin-top: 16px;
}

.subscription-plans-table-title {
  margin-bottom: 8px;
}

.subscription-plans-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.subscription-plans-table th,
.subscription-plans-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.subscription-plans-table th {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.subscription-plan-row--current {
  background: #eff6ff;
}

.subscription-mapstr-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 600;
}

.subscription-plans-footnote {
  margin-top: 8px;
}

.subscription-plans-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}

.subscription-plans-table--wide {
  min-width: 920px;
}

.subscription-plans-table--wide th,
.subscription-plans-table--wide td {
  white-space: nowrap;
}

.subscription-plans-table--wide td:first-child {
  white-space: normal;
  min-width: 110px;
}

.subscription-feature-yes {
  color: #16a34a;
  font-weight: 700;
}

.subscription-feature-no {
  color: #94a3b8;
}

.subscription-launch-promo {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff 0%, #fef3c7 100%);
  border: 1px solid #bfdbfe;
}

.subscription-launch-promo-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 4px;
}

.subscription-launch-promo-text {
  margin: 0;
}

.subscription-trial-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.subscription-trial-intro {
  margin-bottom: 12px;
}

.subscription-trial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 520px) {
  .subscription-trial-grid {
    grid-template-columns: 1fr;
  }
}

.subscription-trial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.subscription-trial-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.12);
}

.subscription-trial-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.subscription-trial-card-price {
  font-size: 12px;
  color: #64748b;
}

.subscription-trial-card-features {
  font-size: 11px;
  color: #475569;
  line-height: 1.35;
}

.subscription-trial-card-cta {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
}

.subscription-trial-footnote,
.subscription-canceled-hint {
  margin-top: 10px;
  font-size: 12px;
}

body.dark-mode #settingsPanel .subscription-trial-card {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode #settingsPanel .subscription-trial-card-title {
  color: #f1f5f9;
}

body.dark-mode #settingsPanel .subscription-trial-section {
  border-top-color: #334155;
}

.subscription-trial-card--current {
  border-color: #94a3b8;
  opacity: 0.92;
}

.subscription-trial-card--current .subscription-trial-card-cta {
  color: #64748b;
}

.subscription-admin-guide {
  margin-top: 12px;
}

#pwaInstallBtn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.subscription-admin-assign-card {
  margin-top: 16px;
  margin-bottom: 16px;
}

.subscription-admin-assign-card .settings-field-label {
  display: block;
  margin: 10px 0 4px;
  font-size: 12px;
  color: #64748b;
}

.subscription-admin-beta-row {
  margin-top: 8px;
}

.subscription-guide-link {
  text-decoration: none;
  display: inline-flex;
  width: 100%;
}

.subscription-scenarios-wrap {
  margin-top: 20px;
}

.subscription-soon-user-hint {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.subscription-card-head--simple {
  margin-bottom: 0;
}

body.dark-mode #settingsPanel .subscription-soon-user-hint {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

.subscription-soon-hint--admin {
  margin-top: 10px;
  padding: 8px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.subscription-price-hint {
  margin-top: 4px;
}

body.dark-mode #settingsPanel .subscription-plans-table th,
body.dark-mode #settingsPanel .subscription-plans-table td {
  border-color: #334155;
}

body.dark-mode #settingsPanel .subscription-plan-row--current {
  background: #1e3a8a;
}

body.dark-mode #settingsPanel .subscription-launch-promo {
  background: linear-gradient(135deg, #1e3a8a 0%, #78350f 100%);
  border-color: #334155;
}

body.dark-mode #settingsPanel .subscription-launch-promo-title {
  color: #93c5fd;
}

body.dark-mode #settingsPanel .subscription-feature-yes {
  color: #4ade80;
}

body.dark-mode #settingsPanel .subscription-feature-no {
  color: #64748b;
}

.settings-manager-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.settings-manager-actions .edit-sheet-btn-save,
.settings-manager-actions .edit-sheet-btn-close {
  flex: 1;
  width: auto;
  height: 42px;
}

#settingsNotificationsPanel .settings-manager-actions .edit-sheet-btn-save {
  background: #2563eb;
  color: #fff;
}

#settingsNotificationsPanel .settings-manager-actions .edit-sheet-btn-save:hover {
  background: #1d4ed8;
}

#agendaEventPanel .edit-sheet-btn-save {
  background: #16a34a;
}

.settings-maps-list {
  margin-top: 10px;
}

.settings-manager-close-btn {
  width: 100%;
}

.settings-map-card {
  padding: 12px;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}

.settings-map-card.is-active {
  background: #fff;
  border-color: #e2e8f0;
}

.settings-map-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.settings-map-card-title {
  flex: 1;
  min-width: 0;
}

.settings-map-card-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-map-startup-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #166534;
  font-size: 11px;
  font-weight: 700;
}

.settings-map-spot-badge {
  background: #eff6ff;
  color: #1d4ed8;
  margin-left: 6px;
}

.settings-map-card-tools {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.settings-map-icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.settings-map-icon-btn.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #2563eb;
}

.settings-map-icon-btn.is-editing {
  background: #fff7ed;
  border-color: #fdba74;
  color: #ea580c;
}

.settings-map-icon-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

.settings-map-icon-btn.settings-map-icon-btn--edit:hover {
  background: #fff7ed;
  border-color: #fdba74;
  color: #ea580c;
}

.settings-map-edit {
  margin-top: 12px;
}

.settings-map-name-input {
  margin: 0 !important;
}

.settings-map-default-open {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  cursor: pointer;
  user-select: none;
}

.settings-map-default-open + .settings-map-default-open {
  margin-top: 14px;
}

.settings-map-default-open input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: #0077ff;
  cursor: pointer;
}

.settings-map-default-open span {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
}

.settings-map-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.settings-map-actions .edit-sheet-btn-save {
  flex: 1;
  height: 42px;
}

.settings-map-actions .edit-sheet-btn-delete {
  flex: 0 0 48px;
  width: 48px;
  height: 42px;
}

.settings-map-actions .edit-sheet-btn-save,
.settings-map-actions .edit-sheet-btn-delete {
  border: 1px solid #e2e8f0;
}

.settings-map-actions .edit-sheet-btn-save {
  background: #fff;
  color: #334155;
}

.settings-map-actions .edit-sheet-btn-save:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.settings-map-actions .edit-sheet-btn-delete {
  background: #fff;
  color: #dc2626;
}

.settings-map-actions .edit-sheet-btn-delete:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.settings-account-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-account-avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.settings-account-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0077ff 0%, #005bcc 100%);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 119, 255, 0.22);
}

.settings-account-avatar.has-photo {
  background: #e2e8f0;
}

.settings-account-avatar-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.settings-account-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #dbe3ee;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.settings-account-upload-btn:hover {
  background: #f8fafc;
}

.settings-account-remove-photo {
  border: none;
  background: transparent;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.settings-account-section {
  margin-top: 8px;
}

.settings-account-google-notice {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e40af;
  font-size: 13px;
  line-height: 1.45;
}

.settings-account-actions {
  display: flex;
  gap: 8px;
}

.settings-account-actions .edit-sheet-btn-save,
.settings-account-actions .edit-sheet-btn-close {
  flex: 1;
  height: 42px;
  width: auto;
}

.settings-account-intro {
  margin: 0 0 8px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.settings-account-readonly {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-account-readonly-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-account-readonly-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.settings-account-readonly-value {
  font-size: 13px;
  color: #162131;
  text-align: right;
  word-break: break-word;
}

.settings-account-save {
  display: none;
}

body.dark-mode #settingsPanel .settings-map-card {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode #settingsPanel .settings-map-card.is-active {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode #settingsPanel .settings-map-card-name,
body.dark-mode #settingsPanel .settings-map-default-open span {
  color: #e2e8f0;
}

body.dark-mode #settingsPanel .settings-map-icon-btn {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode #settingsPanel .settings-map-icon-btn:hover {
  background: #1e293b;
  border-color: #475569;
  color: #f8fafc;
}

body.dark-mode #settingsPanel .settings-map-icon-btn.is-active {
  background: #172554;
  border-color: #3b82f6;
  color: #bfdbfe;
}

body.dark-mode #settingsPanel .settings-map-icon-btn.is-editing {
  background: #3b2413;
  border-color: #c2410c;
  color: #fdba74;
}

body.dark-mode #settingsPanel .settings-card {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode #settingsPanel .settings-segment {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode #settingsPanel .settings-segment.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

body.dark-mode #settingsPanel .settings-data-btn {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode #settingsPanel .settings-data-btn-icon {
  background: #0f172a;
}

body.dark-mode #settingsPanel .settings-data-btn--danger {
  background: #2a1215;
  border-color: #7f1d1d;
  color: #fecaca;
}

body.dark-mode #settingsPanel .settings-toggle-hint,
body.dark-mode #settingsPanel .settings-data-intro {
  color: #94a3b8;
}

body.dark-mode #sidebar .section-title,
body.dark-mode #sidebar button.section-title {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode #sidebar .section-title.active,
body.dark-mode #sidebar button.section-title.active {
  background: linear-gradient(180deg, #1e3a8a 0%, #1e293b 100%);
  border-color: #3b82f6;
  color: #eff6ff;
}

body.dark-mode #sidebar .sidebar-panel,
body.dark-mode #sidebar .sidebar-nest-panel {
  background: transparent;
  border-color: transparent;
}

body.dark-mode #sidebar .sidebar-filter-box {
  background: transparent;
  border-color: transparent;
}

body.dark-mode .filter-pill {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode .filter-pill:hover:not(:disabled) {
  background: #243044;
  border-color: #475569;
}

body.dark-mode .filter-pill.is-active {
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.35);
}

body.dark-mode .filter-pill--primary.is-active {
  --filter-pill-accent: #2563eb;
  --filter-pill-accent-border: #3b82f6;
  --filter-pill-accent-text: #eff6ff;
}

body.dark-mode .filter-pill--favorites.is-active {
  --filter-pill-accent: #78350f;
  --filter-pill-accent-border: #f59e0b;
  --filter-pill-accent-text: #fef3c7;
}

body.dark-mode .filter-pill--private.is-active {
  --filter-pill-accent: #475569;
  --filter-pill-accent-border: #64748b;
  --filter-pill-accent-text: #f8fafc;
}

body.dark-mode #settingsPanel .settings-section-btn {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode #settingsPanel .settings-nav-toggle[aria-expanded="true"] {
  background: linear-gradient(180deg, #1e3a8a 0%, #1d4ed8 100%);
  border-color: #60a5fa;
  color: #eff6ff;
}

body.dark-mode #settingsPanel .settings-nav-block:has(.settings-nav-toggle[aria-expanded="true"]) .settings-nav-items {
  background: #172554;
  border-color: #3b82f6;
}

body.dark-mode #settingsPanel .settings-section-btn.active {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #60a5fa;
  color: #f8fafc;
}

body.dark-mode #settingsPanel .settings-section-btn--nested.active {
  background: linear-gradient(180deg, #1e3a5f 0%, #172554 100%);
  border-color: #3b82f6;
  color: #dbeafe;
}

body.dark-mode #settingsPanel .settings-section-btn--nested:not(.active) {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode #settingsPanel .settings-group .settings-manager-panel.open {
  background: #0f172a;
  border-color: #3b82f6;
}

body.dark-mode #settingsPanel .settings-manager-panel {
  background: #0f172a;
  border-color: #334155;
}

/* Sidebar — mode nuit aligné sur Paramètres */
body.dark-mode #sidebar .sidebar-panel-label,
body.dark-mode #sidebar .sidebar-field-label {
  color: #94a3b8;
}

body.dark-mode #sidebar .sidebar-action-btn {
  border-color: #3b82f6;
  background: linear-gradient(180deg, #1e3a8a 0%, #1d4ed8 100%);
  color: #eff6ff;
  box-shadow: 0 1px 0 rgba(96, 165, 250, 0.15) inset;
}

body.dark-mode #sidebar .sidebar-action-btn:hover {
  background: linear-gradient(180deg, #2563eb 0%, #1e40af 100%);
  border-color: #60a5fa;
}

body.dark-mode #sidebar .sidebar-link-btn {
  border-color: #334155;
  background: #1e293b;
  color: #cbd5e1;
}

body.dark-mode #sidebar .sidebar-link-btn:hover {
  background: #243044;
  border-color: #475569;
  color: #e2e8f0;
}

body.dark-mode #sidebar .sidebar-nest-btn {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode #sidebar .sidebar-nest-btn:hover {
  background: #243044;
  border-color: #475569;
}

body.dark-mode #sidebar .sidebar-nest-btn.active {
  background: linear-gradient(180deg, #1e3a8a 0%, #1d4ed8 100%);
  border-color: #60a5fa;
  color: #eff6ff;
}

body.dark-mode #sidebar .cat-pill {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode #sidebar .cat-pill:hover {
  background: #243044;
  border-color: #475569;
}

body.dark-mode #sidebar .cat-pill.active {
  border-color: #60a5fa;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #f8fafc;
}

body.dark-mode #mapFiltersPanelHost .sidebar-nest-panel {
  background: transparent;
  border: none;
}

body.dark-mode #sidebar .notes-compact-add .notes-add-btn {
  border-color: #3b82f6;
  background: linear-gradient(180deg, #1e3a8a 0%, #1d4ed8 100%);
  color: #eff6ff;
}

body.dark-mode #sidebar .notes-compact-add .notes-add-btn:hover {
  background: linear-gradient(180deg, #2563eb 0%, #1e40af 100%);
  border-color: #60a5fa;
}

body.dark-mode .agenda-sidebar-row {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .agenda-sidebar-row:hover {
  background: #243044;
}

body.dark-mode .agenda-sidebar-name {
  color: #e2e8f0;
}

body.dark-mode .agenda-sidebar-meta {
  color: #94a3b8;
}

body.dark-mode .agenda-filter-toggle {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .agenda-filter-toggle.active {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #60a5fa;
  color: #f8fafc;
}

body.dark-mode .note-card,
body.dark-mode #sidebar #notesList .note-card,
body.dark-mode #sidebar #allNotesList .note-card,
body.dark-mode #notesList .note-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: none;
}

body.dark-mode .note-card--compact {
  background: #172033;
}

body.dark-mode .note-card:hover,
body.dark-mode #sidebar #notesList .note-card:hover,
body.dark-mode #notesList .note-card:hover {
  background: #243044;
  border-color: #475569;
}

body.dark-mode .notes-all-link-btn {
  background: linear-gradient(180deg, #1e293b 0%, #172033 100%);
  border-color: #334155;
  color: #93c5fd;
}

body.dark-mode .notes-all-link-btn:hover {
  background: #243044;
  border-color: #475569;
}

body.dark-mode .notes-modal {
  background: #0f172a;
  border: 1px solid #334155;
}

body.dark-mode .notes-modal-title {
  color: #f1f5f9;
}

body.dark-mode .notes-modal-close,
body.dark-mode .note-icon-btn,
body.dark-mode .notes-reset-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode .notes-compact-add .notes-add-btn {
  background: #1e293b;
  border-color: #3b82f6;
  color: #93c5fd;
}

body.dark-mode .notes-compact-add .notes-add-btn:hover {
  background: #243044;
}

body.dark-mode .note-card-title {
  color: #e2e8f0;
}

body.dark-mode .note-card-preview,
body.dark-mode .note-card-compact {
  color: #94a3b8;
}

body.dark-mode .note-card-cats {
  color: #94a3b8;
}

body.dark-mode .note-card-links {
  color: #93c5fd;
}

body.dark-mode .note-meta-links {
  color: #94a3b8;
}

body.dark-mode .note-meta-links button {
  color: #93c5fd;
}

body.dark-mode .friend-map-sidebar-item {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .friend-map-sidebar-item:hover,
body.dark-mode .my-map-sidebar-item:hover {
  background: #243044;
  border-color: #60a5fa;
}

body.dark-mode .friend-map-sidebar-item.is-active {
  border-color: #60a5fa;
  background: linear-gradient(180deg, #1e3a8a 0%, #172554 100%);
  color: #eff6ff;
}

body.dark-mode .friend-map-sidebar-count {
  color: #94a3b8;
}

body.dark-mode .friend-map-sidebar-item.is-active .friend-map-sidebar-count {
  color: #bfdbfe;
}

body.dark-mode .friend-maps-sidebar-label,
body.dark-mode .sidebar-list-hint {
  color: #94a3b8;
}

body.dark-mode .roadtrip-sidebar-card.is-visible {
  border-color: #3b82f6;
  background: linear-gradient(180deg, #172554 0%, #1e293b 100%);
}

body.dark-mode .roadtrip-sidebar-card.is-editing {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #451a03 0%, #1e293b 100%);
}

body.dark-mode .roadtrip-status-badge.todo {
  background: linear-gradient(180deg, #78350f 0%, #92400e 100%);
  border: 1px solid #d97706;
  color: #fef3c7;
}

body.dark-mode .roadtrip-status-badge.done {
  background: linear-gradient(180deg, #14532d 0%, #166534 100%);
  border: 1px solid #22c55e;
  color: #dcfce7;
}

body.dark-mode #sidebar .roadtrip-add-btn {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body.dark-mode .agenda-share-inbox-head {
  color: #93c5fd;
}

body.dark-mode .agenda-share-invite-card {
  background: #172554;
  border-color: #3b82f6;
}

body.dark-mode .agenda-share-from {
  color: #bfdbfe;
}

body.dark-mode .agenda-share-invite-meta,
body.dark-mode .agenda-share-invite-date {
  color: #cbd5e1;
}


#plusBtn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
#geoBtn {
  position: fixed;
  right: 25px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
}
#geoBtn {
  bottom: 90px;
  background: #0f172a;
}
#geoBtn .geo-btn-icon {
  width: 38px;
  height: 38px;
  display: block;
  pointer-events: none;
}

#overlay,
#overlayAdd {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

#overlay { z-index: 10001; }
#overlayAdd { z-index: 7099; }

#addMenu {
  display: none;
  position: fixed;
  left: 50%;
  right: auto;
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 7100 !important;
  width: min(92vw, 320px);
  max-height: min(68vh, 520px);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.22);
  box-sizing: border-box;
}

.add-menu-panel {
  padding: 14px;
}

.add-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.add-menu-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #1e293b;
}

.add-menu-close {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.add-menu-section {
  border-radius: 14px;
  padding: 12px;
}

.add-menu-section--spot {
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
  border: 1px solid #bfdbfe;
}

.add-menu-section--temp {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  padding: 0;
  overflow: hidden;
}

.add-menu-section-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.add-menu-section-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.add-menu-section-icon--spot {
  background: #dbeafe;
}

.add-menu-section-icon--temp {
  background: #ffedd5;
}

.temp-marker-glyph {
  color: #c2410c;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.add-menu-section-title {
  display: block;
  font-size: 14px;
  color: #0f172a;
}

.add-menu-section-desc {
  margin: 2px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

.add-menu-field-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.add-menu-input {
  margin: 0 !important;
  flex: 1;
  min-width: 0;
}

.add-menu-locate-btn {
  width: 42px;
  min-width: 42px;
  height: 42px;
  margin: 0;
  border: none;
  border-radius: 10px;
  background: #0077ff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 119, 255, 0.28);
}

.add-menu-status {
  font-size: 12px;
  color: #526173;
  margin-top: 6px;
  min-height: 16px;
}

.add-menu-hint {
  margin: 8px 0 0;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
}

.add-menu-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 14px 0;
}

.add-menu-accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.add-menu-accordion-btn.active {
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
}

.add-menu-accordion-text {
  flex: 1;
  min-width: 0;
}

.add-menu-accordion-text small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}

.add-menu-accordion-arrow {
  color: #94a3b8;
  font-size: 14px;
  flex-shrink: 0;
}

.add-menu-field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin: 10px 0 6px;
}

.add-menu-field-label:first-child {
  margin-top: 0;
}

.temporary-point-form {
  display: none;
  padding: 0 12px 12px;
}

.temporary-point-form.open {
  display: block;
}

.add-menu-temp-actions {
  margin-top: 12px;
}

.add-menu-temp-submit {
  width: 100%;
  height: 42px;
}

.temporary-points-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 12px 12px;
}

.temporary-points-list:empty {
  display: none;
}

.temporary-points-list:not(:empty) {
  border-top: 1px solid #e5e7eb;
  padding-top: 10px;
  margin-top: 2px;
}

.temporary-point-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.temporary-point-row strong {
  font-size: 13px;
  color: #0f172a;
}

.temporary-point-row-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.temporary-point-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.temporary-point-action-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.temporary-point-action-btn--focus {
  background: #eef4fb;
  color: #1d4ed8;
}

.temporary-point-action-btn--delete {
  background: #fee2e2;
  color: #dc2626;
}

.temporary-point-popup-actions {
  margin-top: 8px;
}

.route-step-preview-popup {
  min-width: 210px;
}

.route-step-preview-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #526173;
}

.route-step-preview-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.route-step-preview-actions .edit-sheet-btn {
  width: 100%;
  justify-content: center;
}

.route-step-preview-marker-pin {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff7ed;
  border: 3px solid #f97316;
  color: #7c2d12;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  font-weight: 800;
  font-size: 16px;
}

.temporary-point-popup-delete {
  width: 100%;
  height: 36px;
  font-size: 13px;
}

.spot-photo-tools {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-shrink: 0;
}

.spot-photo-add-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: #eef4fb;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.spot-form-footer-nav {
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.spot-nav-actions-btns {
  display: flex;
  gap: 6px;
  align-items: center;
}

.spot-form-private-row--inline {
  margin: 0;
  padding: 8px 10px;
  max-width: calc(100% - 96px);
}

.spot-form-private-row--inline .spot-form-private-text {
  white-space: normal;
  font-size: 12px;
}

.agenda-form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.agenda-form-header .agenda-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #162131;
}

#formBox .spot-form-add-date-btn,
.agenda-form-scroll .spot-form-add-date-btn {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px dashed #93c5fd;
  border-radius: 10px;
  background: #f0f9ff;
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  cursor: pointer;
}

#formBox .spot-form-add-date-btn:hover,
.agenda-form-scroll .spot-form-add-date-btn:hover {
  background: #dbeafe;
  border-color: #60a5fa;
}

body.dark-mode .agenda-form-header .agenda-modal-title {
  color: #f8fafc;
}

body.dark-mode #formBox .spot-form-add-date-btn,
body.dark-mode .agenda-form-scroll .spot-form-add-date-btn {
  background: #172554;
  border-color: #3b82f6;
  color: #bfdbfe;
}

.spot-photo-preview-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spot-photo-preview {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: #e5e7eb;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.spot-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.spot-photo-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spot-photo-action {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: #f1f5f9;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spot-photo-action.nav-btn--edit {
  background: #ffb74d;
}

.spot-photo-action.nav-btn--edit:hover {
  background: #ffa726;
}

#catsBox {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

/* ==========================================================================
   LIGHTBOX (popup photo plein écran)
   ========================================================================== */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20000;
  align-items: center;
  justify-content: center;
}

#lightbox.open {
  display: flex;
}

#lightboxBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

#lightboxClose {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

#lightboxClose:hover {
  background: rgba(255, 255, 255, 0.3);
}

#lightboxContent {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 960px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

#lightboxImage {
  max-width: 100%;
  max-height: calc(88vh - 56px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}

#lightboxCaption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-align: center;
  max-width: min(92vw, 960px);
  padding: 0 56px;
  pointer-events: auto;
}

.lightbox-caption-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

.lightbox-map-btn {
  border: none;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.lightbox-map-btn:hover {
  background: #1d4ed8;
}

/* ==========================================================================
   SPOT FORM — pills, sections compactes
   ========================================================================== */
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.2;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cat-pill input {
  display: none;
}

.cat-pill.active {
  border-color: #0077ff;
  background: #eef4fb;
  color: #0b3d91;
}

.spot-form-header-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.spot-form-add-event-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
  background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.spot-form-add-event-btn:hover {
  transform: translateY(-1px);
  border-color: #a5b4fc;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.18);
}

.spot-form-add-event-btn-icon {
  font-size: 14px;
  line-height: 1;
}

.friends-spot-share-list {
  margin-bottom: 10px;
}

.friends-share-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin: 8px 0 6px;
}

.friends-pending-sub {
  font-size: 11px;
  color: #64748b;
}

.spot-share-friend-list .friends-search-item.is-selected {
  border-color: #6366f1;
  background: #eef2ff;
}

.spot-share-status {
  margin: 0 0 10px;
}

.spot-share-status--error {
  color: #b91c1c;
}

body.dark-mode .spot-form-add-event-btn {
  border-color: #4338ca;
  background: linear-gradient(180deg, #312e81 0%, #3730a3 100%);
  color: #e0e7ff;
}

#formBox .spot-form-input {
  margin-top: 0;
}

#formBox .spot-form-pills-box {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 118px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px;
  background: #fafafa;
}

#formBox .spot-form-states-box {
  max-height: 132px;
}

#formBox .cat-pill {
  font-size: 11px;
  padding: 4px 8px;
  gap: 4px;
}

#formBox #statusChoices .cat-pill {
  font-size: 11px;
}

#formBox .spot-form-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.spot-status-pill-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.spot-status-pill-label .ui-icon {
  flex-shrink: 0;
  opacity: 0.92;
}

#formBox .spot-form-done-wrap {
  margin-top: 8px;
}

#formBox .spot-form-add-date-btn {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 12px;
  color: #475569;
}

#formBox .spot-form-tags-row,
.agenda-tag-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

#formBox .spot-form-tag-add-btn,
.agenda-tag-add-btn {
  flex-shrink: 0;
  min-height: 38px;
  min-width: fit-content;
  padding: 0 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.12);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.spot-form-tag-add-btn-label {
  line-height: 1;
}

.spot-form-tag-add-btn--agenda {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  gap: 6px;
  box-shadow: none;
}

.agenda-tag-add-btn {
  min-width: 44px;
  width: 44px;
  padding: 0;
  font-size: 22px;
}

#formBox .spot-form-tag-add-btn:hover,
.agenda-tag-add-btn:hover {
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.spot-form-tag-add-btn--agenda:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
  transform: none;
}

#formBox .spot-form-accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  text-align: left;
}

.spot-form-accordion-btn-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.spot-form-accordion-btn-icon {
  display: inline-flex;
  color: #64748b;
  flex-shrink: 0;
}

.spot-form-accordion-arrow {
  flex-shrink: 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1;
}

#formBox .spot-form-accordion-btn.active .spot-form-accordion-btn-icon {
  color: #2563eb;
}

#formBox .spot-form-accordion-btn.active {
  border-color: #cbd5e1;
  background: #eef4fb;
  color: #0b3d91;
}

#formBox .spot-form-accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

#formBox .spot-form-accordion-panel.open {
  max-height: 160px;
  overflow-y: auto;
  padding-top: 8px;
}

#formBox #spotMapsPanel.spot-form-accordion-panel.open {
  max-height: min(280px, 42vh);
}

#formBox .spot-form-maps-box {
  display: block;
  padding: 0;
  border: none;
  background: transparent;
}

.spot-form-maps-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(240px, 38vh);
  overflow-y: auto;
  padding-right: 2px;
}

.spot-map-select-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.spot-map-select-row:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.spot-map-select-row.is-active {
  border-color: #60a5fa;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e3a8a;
}

.spot-map-select-row input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
}

.spot-map-select-label {
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

#formBox .spot-form-maps-box .cat-pill {
  margin-bottom: 0 !important;
  font-size: 10px;
  padding: 3px 7px;
}

#formBox .spot-form-select-compact {
  font-size: 13px;
  padding: 7px 8px;
}

#formBox hr {
  margin: 14px 0 8px;
  border: none;
  border-top: 1px solid #e5e7eb;
}

body.dark-mode #formBox .spot-form-pills-box {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode #formBox .spot-form-accordion-btn {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode #formBox .spot-form-accordion-btn.active {
  background: #1e3a5f;
  border-color: #3b82f6;
}

#sidebar.closed + #toggleSidebar {
    left: 0;
}

#sidebarMainView {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
}

#sidebarListView,
#sidebarFiltersView,
#sidebarAgendaView,
#sidebarFriendsView {
    display: none;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

#sidebar.list-mode #sidebarMainView,
#sidebar.filter-mode #sidebarMainView,
#sidebar.agenda-mode #sidebarMainView,
#sidebar.friends-mode #sidebarMainView {
    display: none;
}

#sidebar.list-mode #sidebarListView,
#sidebar.filter-mode #sidebarFiltersView,
#sidebar.agenda-mode #sidebarAgendaView,
#sidebar.friends-mode #sidebarFriendsView {
    display: flex;
}

.sidebar-view-head,
.sidebar-list-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.sidebar-view-head-main {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
    min-width: 0;
    flex: 1;
}

.sidebar-view-title {
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

.sidebar-view-head-badges {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.sidebar-view-back,
.sidebar-list-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 12px;
    color: #475569;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-view-back:hover,
.sidebar-list-back:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    transform: translateX(-1px);
}

.sidebar-view-back:active,
.sidebar-list-back:active {
    transform: translateX(-2px) scale(0.97);
}

.sidebar-view-back-icon {
    display: block;
    width: 20px;
    height: 20px;
}

.sidebar-list-body,
.sidebar-filters-body,
.sidebar-agenda-body,
.sidebar-friends-body,
#sidebarFiltersPanelHost,
#sidebarAgendaPanelHost {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.sidebar-friends-body #friendsPanel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 0;
    background: transparent;
    border: none;
    padding: 0;
}

.list-item {
  padding: 9px 10px;
  margin: 6px 0;
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid #e3e3e3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.list-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.list-item-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.list-item-photo,
.list-item-photo-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  flex: 0 0 58px;
  overflow: hidden;
  background: #e5e7eb;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.list-item-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.list-item-photo-placeholder {
  background: #eef2f7;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: inset 0 0 0 1px #dbe2ea;
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item-status-wrap {
  margin-bottom: 6px;
}

.list-item-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
}

.list-item-status--todo {
  background: #f1f1f1;
  color: #b45309;
}

.list-item-status--check {
  background: #fff3e0;
  color: #1d4ed8;
}

.list-item-status--done {
  background: #e8f5e9;
  color: #15803d;
}

.list-item-status--verified {
  background: #e8f0ff;
  color: #1d4ed8;
}

.list-item-name {
  font-weight: 700;
  font-size: 13px;
  color: #222;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.list-item-name-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-item-favorite {
  color: #fbc02d;
}

.list-item-cats {
  font-size: 12px;
  color: #666;
  line-height: 1.3;
}

.list-item-distance {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
}

.list-more-hint {
  text-align: center;
  padding: 10px;
  color: #64748b;
  font-size: 12px;
}

body.dark-mode .list-item {
  background: #1e293b;
  border-color: #334155;
  box-shadow: none;
}

body.dark-mode .list-item:hover {
  background: #243044;
  border-color: #475569;
}

body.dark-mode .list-item-name {
  color: #e2e8f0;
}

body.dark-mode .list-item-cats,
body.dark-mode .list-item-distance {
  color: #94a3b8;
}

body.dark-mode .list-item-photo-placeholder {
  background: #0f172a;
  color: #64748b;
  box-shadow: inset 0 0 0 1px #334155;
}

.list-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.list-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.list-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 10px;
}
.list-search-icon {
  display: inline-flex;
  color: #94a3b8;
  flex-shrink: 0;
}
.list-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: #0f172a;
}
.list-filter-open-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.list-filter-open-btn:hover {
  background: #f8fafc;
  color: #334155;
}
.list-sort-select {
  width: 100%;
}
.map-status-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}
.list-item-photo-placeholder .ui-icon-host {
  display: inline-flex;
  color: #94a3b8;
}

.list-filter-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.list-filter-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.list-filter-empty {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    color: #64748b;
}

.list-filter-edit-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #bfdbfe;
    background: #fff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.list-filter-edit-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.list-reference-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.list-reference-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.list-reference-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #92400e;
}

.list-reference-active {
    font-size: 12px;
    font-weight: 600;
    color: #b45309;
}

.list-reference-empty {
    font-size: 12px;
    color: #92400e;
    line-height: 1.35;
}

.list-reference-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.list-reference-btn {
    border: 1px solid #fcd34d;
    background: #fff;
    color: #92400e;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.list-reference-btn:hover {
    background: #fef3c7;
}

.list-reference-btn--muted {
    border-color: #e2e8f0;
    color: #64748b;
    background: #f8fafc;
}

.list-reference-btn--muted:hover {
    background: #f1f5f9;
}

.filter-reference-box {
    margin-bottom: 10px;
}

.filter-distance-hint {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #64748b;
}

.filter-distance-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-distance-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.filter-distance-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.filter-distance-btn.is-active {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.filter-distance-options.is-applying {
    opacity: 0.65;
    pointer-events: none;
    position: relative;
}

.filter-distance-options.is-applying::after {
    content: "Application…";
    display: block;
    width: 100%;
    margin-top: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #2563eb;
    text-align: center;
}

#map.reference-pick-mode,
#map.reference-pick-mode .leaflet-container {
    cursor: crosshair !important;
}

.sidebar-list-body #listPanel,
#sidebarFiltersPanelHost #filtersPanel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    margin-top: 0;
    background: transparent;
    border: none;
    padding: 0;
}

.sidebar-list-body #listContent,
#sidebarFiltersPanelHost #filtersPanel,
#sidebarAgendaPanelHost #agendaPanel {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#sidebarAgendaPanelHost #agendaPanel {
    display: block;
    flex: 1;
    min-height: 0;
    max-height: none;
    margin-top: 0;
    background: transparent;
    border: none;
    padding: 0;
}

.sidebar-list-back { background: #fff; border: 1px solid #e8edf3; border-radius: 12px; padding: 0; width: 38px; height: 38px; color: #223; }

body.dark-mode .sidebar-view-title {
  color: #e2e8f0;
}

body.dark-mode .sidebar-view-back,
body.dark-mode .sidebar-list-back {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
  box-shadow: none;
}

body.dark-mode .sidebar-view-back:hover,
body.dark-mode .sidebar-list-back:hover {
  background: #334155;
  border-color: #475569;
  color: #f8fafc;
  box-shadow: none;
}

body.dark-mode .list-filter-summary {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .list-filter-badge {
  background: #1e3a5f;
  color: #93c5fd;
}

body.dark-mode .list-filter-empty {
  color: #94a3b8;
}

body.dark-mode .list-filter-edit-btn {
  background: #1e293b;
  border-color: #334155;
  color: #93c5fd;
}

body.dark-mode .list-filter-edit-btn:hover {
  background: #1e3a5f;
}
body.dark-mode .list-search {
  background: #1e293b;
  border-color: #334155;
}
body.dark-mode .list-search-input {
  color: #f1f5f9;
}
body.dark-mode .list-filter-open-btn {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

body.dark-mode .list-reference-box {
  background: #422006;
  border-color: #854d0e;
}

body.dark-mode .list-reference-title,
body.dark-mode .list-reference-empty {
  color: #fcd34d;
}

body.dark-mode .list-reference-active {
  color: #fde68a;
}

body.dark-mode .list-reference-btn {
  background: #1e293b;
  border-color: #854d0e;
  color: #fde68a;
}

body.dark-mode .list-reference-btn:hover {
  background: #334155;
}

body.dark-mode .list-reference-btn--muted {
  background: #0f172a;
  border-color: #334155;
  color: #94a3b8;
}

body.dark-mode .filter-distance-hint {
  color: #94a3b8;
}

body.dark-mode .filter-distance-btn {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}

body.dark-mode .filter-distance-btn:hover {
  background: #334155;
  border-color: #64748b;
}

body.dark-mode .filter-distance-btn.is-active {
  background: #1e3a8a;
  border-color: #3b82f6;
  color: #bfdbfe;
}

/* Anciennes règles section-title globales — désactivées au profit du bloc sidebar ci-dessus */

/* Force le bloc utilisateur en bas de la sidebar — styles détaillés dans .sidebar-user-card */
#sidebar-user-info {
  margin-top: auto;
  flex-shrink: 0;
}

/* ==========================================================================
   5. OVERLAYS, MODALS & SETTINGS PANELS
   ========================================================================== */
/* Overlays */
#settingsOverlay, #settingsSubpanelOverlay, #roadTripDetailOverlay, #roadTripSummaryOverlay, #roadTripSharePreviewOverlay, #agendaEventOverlay {
  display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.42); z-index: 9999;
}
#settingsSubpanelOverlay { z-index: 9999; }

/* Login modal */
.login-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10050;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

.login-overlay.open {
  display: flex;
}

.login-card {
  width: min(92vw, 400px);
  max-width: 100%;
  max-height: min(calc(100dvh - 32px), calc(100vh - 32px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 28px 24px 24px;
  border-radius: 22px;
  border: 1px solid #dfe7f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  animation: login-card-in 0.28s ease;
  box-sizing: border-box;
}

@keyframes login-card-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-head {
  text-align: center;
  margin-bottom: 22px;
}

.login-brand {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0077ff 0%, #005bcc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 119, 255, 0.28);
  overflow: hidden;
}

.login-brand-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
}

.login-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  color: #162131;
  letter-spacing: -0.02em;
}

.login-subtitle {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-field-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-top: 6px;
}

.login-field-label:first-child {
  margin-top: 0;
}

.login-input {
    width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  font-size: 14px;
  color: #162131;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input:focus {
  outline: none;
  border-color: #0077ff;
  box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.12);
}

.login-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-password-input {
  padding-right: 46px;
}

.login-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: transparent;
    cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: #64748b;
}

.login-password-toggle:hover {
  background: #f1f5f9;
}

.login-forgot-password {
  align-self: flex-start;
  margin: 4px 0 0;
  padding: 0;
  border: none;
  background: none;
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-forgot-password:hover {
  color: #1d4ed8;
}

.login-forgot-password:disabled {
  opacity: 0.6;
  cursor: wait;
}

.login-form-success {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #166534;
  font-size: 13px;
  line-height: 1.4;
}

.login-form-success[hidden] {
  display: none !important;
}

.login-actions {
    display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.login-btn {
  width: 100%;
  display: inline-flex;
    align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}

.login-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.login-btn:disabled {
  opacity: 0.72;
  cursor: wait;
}

.login-btn-primary {
  background: linear-gradient(180deg, #0088ff 0%, #006ee6 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 119, 255, 0.32);
}

.login-btn-primary:hover:not(:disabled) {
  filter: brightness(1.05);
  box-shadow: 0 8px 22px rgba(0, 119, 255, 0.38);
}

.login-btn-secondary {
  background: #fff;
  color: #334155;
  border: 1px solid #dbe3ee;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.login-btn-secondary:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 16px;
  color: #94a3b8;
  font-size: 12px;
    font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.login-btn-google {
  background: #fff;
  color: #1f2937;
  border: 1px solid #dadce0;
  box-shadow: 0 2px 8px rgba(60, 64, 67, 0.08);
}

.login-btn-google:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #c6c9cc;
  box-shadow: 0 4px 12px rgba(60, 64, 67, 0.12);
}

.login-google-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.login-google-icon svg {
  display: block;
}

.login-btn-label {
  line-height: 1.2;
}

.login-register-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.login-username-wrap {
  display: flex;
  align-items: stretch;
}

.login-username-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #dbe3ee;
  border-right: none;
  border-radius: 12px 0 0 12px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
}

.login-username-input {
  border-radius: 0 12px 12px 0 !important;
}

.login-field-hint {
  margin: 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}

.login-form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.35;
}

.login-mode-toggle {
    width: 100%;
  margin-top: 4px;
  padding: 0;
  border: none;
  background: none;
  color: #0077ff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.login-mode-toggle--danger {
  color: #b91c1c;
}

.username-setup-overlay {
  z-index: 10050;
}

body.username-setup-open #sidebar,
body.username-setup-open #map,
body.username-setup-open #toggleSidebar {
  pointer-events: none;
}

.field-required {
  color: #dc2626;
}

.settings-account-danger-zone {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #fecaca;
}

.settings-account-danger-title {
  margin: 0 0 6px;
  font-size: 14px;
  color: #b91c1c;
}

.settings-account-delete-btn {
  width: 100%;
  margin-top: 10px;
  padding: 11px 14px;
  border: 1px solid #fca5a5;
  border-radius: 12px;
  background: #fff5f5;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.settings-account-delete-btn:hover:not(:disabled) {
  background: #fee2e2;
}

.settings-account-delete-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

body.dark-mode .login-username-prefix {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

body.dark-mode .login-form-error {
  background: #450a0a;
  border-color: #7f1d1d;
  color: #fecaca;
}

body.dark-mode .login-form-success {
  background: #064e3b;
  border-color: #047857;
  color: #a7f3d0;
}

body.dark-mode .login-forgot-password {
  color: #93c5fd;
}

body.dark-mode .login-password-toggle:hover {
  background: #334155;
}

body.dark-mode .settings-account-danger-zone {
  border-top-color: #7f1d1d;
}

body.dark-mode .settings-account-delete-btn {
  background: #450a0a;
  border-color: #991b1b;
  color: #fecaca;
}

body.dark-mode .login-card {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-color: #334155;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

body.dark-mode .login-title {
  color: #f1f5f9;
}

body.dark-mode .login-subtitle,
body.dark-mode .login-field-label {
  color: #94a3b8;
}

body.dark-mode .login-input {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .login-btn-secondary {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .login-btn-secondary:hover:not(:disabled) {
  background: #273449;
}

body.dark-mode .login-btn-google {
  background: #1e293b;
  border-color: #475569;
  color: #f1f5f9;
}

body.dark-mode .login-btn-google:hover:not(:disabled) {
  background: #273449;
  border-color: #64748b;
}

body.dark-mode .login-divider::before,
body.dark-mode .login-divider::after {
  background: #334155;
}

/* General Modal Styling */
#settingsPanel, #settingsSubpanelHost, #roadTripDetailPanel, #roadTripSummaryPanel, #roadTripSharePreviewPanel, #agendaEventPanel {
  display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(92vw, 600px); max-height: 85vh;
  background: #fcfdff; border: 1px solid #dfe7f0; border-radius: 22px; padding: 18px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.24); z-index: 10000;
}

#settingsPanel, #settingsSubpanelHost {
  width: min(92vw, 760px);
  overflow-y: auto;
}

#agendaEventPanel {
  overflow-y: auto;
}

#roadTripDetailPanel, #roadTripSummaryPanel, #roadTripSharePreviewPanel {
  overflow: hidden;
}
#settingsPanel.open, #settingsSubpanelHost.open, #roadTripDetailPanel.open, #roadTripSummaryPanel.open, #roadTripSharePreviewPanel.open, #agendaEventPanel.open {
  display: flex;
  flex-direction: column;
}

#settingsPanel.open:not(.subpanel-open) {
  overflow-y: auto;
}

#roadTripDetailPanel.open,
#roadTripSummaryPanel.open,
#roadTripSharePreviewPanel.open {
  display: flex;
}

/* Modal Header Components */
.settings-modal-head, .roadtrip-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px;
}
.settings-close, .roadtrip-modal-close, .agenda-close {
  width: 40px; height: 40px; border: none; border-radius: 12px; background: #eef4fb;
  color: #223; font-size: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* Modal Content Controls */
.form-control { margin-top: 10px; }
input, select, textarea {
  background: white; border: 1px solid #d7dee7; width: 100%; padding: 8px; border-radius: 8px;
}
input:focus, select:focus { border-color: #b8c4d3; outline: none; }


/* ==========================================================================
   5. OVERLAYS, MODALS & SETTINGS PANELS
   ========================================================================== */
/* Overlays */
#settingsOverlay, #settingsSubpanelOverlay, #roadTripDetailOverlay, #roadTripSummaryOverlay, #roadTripSharePreviewOverlay, #agendaEventOverlay {
  display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.42); z-index: 9999;
}
#settingsSubpanelOverlay { z-index: 9999; }

/* General Modal Styling */
#settingsPanel, #settingsSubpanelHost, #roadTripDetailPanel, #roadTripSummaryPanel, #roadTripSharePreviewPanel, #agendaEventPanel {
  display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(92vw, 600px); max-height: 85vh;
  background: #fcfdff; border: 1px solid #dfe7f0; border-radius: 22px; padding: 18px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.24); z-index: 10000;
}

#settingsPanel, #settingsSubpanelHost {
  width: min(92vw, 760px);
  overflow-y: auto;
}

#agendaEventPanel {
  overflow-y: auto;
}

#roadTripDetailPanel, #roadTripSummaryPanel, #roadTripSharePreviewPanel {
  overflow: hidden;
}
#settingsPanel.open, #settingsSubpanelHost.open, #roadTripDetailPanel.open, #roadTripSummaryPanel.open, #roadTripSharePreviewPanel.open, #agendaEventPanel.open {
  display: flex;
  flex-direction: column;
}

#settingsPanel.open:not(.subpanel-open) {
  overflow-y: auto;
}

#roadTripDetailPanel.open,
#roadTripSummaryPanel.open,
#roadTripSharePreviewPanel.open {
  display: flex;
}

/* Modal Header Components */
.settings-modal-head, .roadtrip-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px;
}
.settings-close, .roadtrip-modal-close, .agenda-close {
  width: 40px; height: 40px; border: none; border-radius: 12px; background: #eef4fb;
  color: #223; font-size: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* Modal Content Controls */
.form-control { margin-top: 10px; }
input, select, textarea {
  background: white; border: 1px solid #d7dee7; width: 100%; padding: 8px; border-radius: 8px;
}
input:focus, select:focus { border-color: #b8c4d3; outline: none; }

/* ==========================================================================
   8. DARK MODE THEME
   ========================================================================== */
body.dark-mode { background: #111827; color: #e5e7eb; }
body.dark-mode #sidebar { background: #111827; box-shadow: 2px 0 16px rgba(0,0,0,0.45); }

body.dark-mode #sidebar .sidebar-brand-title {
  color: #f1f5f9;
}
body.dark-mode .sidebar-list-back { background: #1c2a3a; border-color: #334155; color: #e5e7eb; }

body.dark-mode .sidebar-search-input {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .sidebar-user-card {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  border-top-color: #334155;
}

body.dark-mode .sidebar-user-name {
  color: #f1f5f9;
}

body.dark-mode .sidebar-user-email {
  color: #94a3b8;
}

body.dark-mode .sidebar-logout-btn {
  background: rgba(127, 29, 29, 0.18);
  border-color: #7f1d1d;
  color: #fca5a5;
  margin-top: 16px;
}

body.dark-mode .sidebar-logout-btn:hover {
  background: rgba(127, 29, 29, 0.32);
  border-color: #b91c1c;
}

body.dark-mode #settingsPanel .settings-account-readonly {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode #settingsPanel .settings-account-avatar-row {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode #settingsPanel .settings-account-upload-btn {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode #settingsPanel .settings-account-google-notice {
  background: #172554;
  border-color: #1d4ed8;
  color: #bfdbfe;
}

body.dark-mode #settingsPanel .settings-account-readonly-value,
body.dark-mode #settingsPanel .settings-account-intro {
  color: #cbd5e1;
}

/* Panels & Inputs in Dark Mode */
body.dark-mode #formBox, 
body.dark-mode #settingsPanel, 
body.dark-mode #roadTripDetailPanel, 
body.dark-mode .agenda-view-header,
body.dark-mode .agenda-view-footer {
  background: #1c2a3a;
  border-color: #334155;
}

body.dark-mode .agenda-view-title,
body.dark-mode .agenda-view-meta-value {
  color: #e5e7eb;
}

body.dark-mode .agenda-view-meta-item,
body.dark-mode .agenda-view-note {
  background: #111827;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode .agenda-view-linked-spot {
  background: #0c4a6e;
  border-color: #0369a1;
  color: #e0f2fe;
}

body.dark-mode .agenda-view-link-chip {
  background: #1e3a5f;
  border-color: #2563eb;
  color: #bfdbfe;
}

body.dark-mode .agenda-view-link-chip:hover {
  background: #1d4ed8;
  color: #fff;
}

body.dark-mode .nav-btn--google,
body.dark-mode .agenda-nav-btn--google {
  background: #273449;
  border-color: #334155;
}

body.dark-mode .agenda-tag-pill,
body.dark-mode .agenda-tag-chip {
  background: #14532d;
  border-color: #166534;
  color: #bbf7d0;
}

body.dark-mode .dashboard-agenda-row {
  background: #1c2a3a;
  border-color: #334155;
}

body.dark-mode .dashboard-agenda-row-title {
  color: #f1f5f9;
}

body.dark-mode .dashboard-agenda-row-meta {
  color: #94a3b8;
}

body.dark-mode .dashboard-agenda-action {
  background: #273449;
  border-color: #334155;
  color: #e5e7eb;
}

body.dark-mode .dashboard-agenda-row-actions {
  background: transparent;
}

body.dark-mode .dashboard-agenda-row-actions .note-icon-btn {
  border-color: #475569;
  background: #1e293b;
  box-shadow: none;
}

body.dark-mode .dashboard-agenda-row-actions .note-icon-btn:hover {
  border-color: #64748b;
  background: #273449;
}

body.dark-mode .dashboard-filter-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode .dashboard-filter-btn:hover {
  background: #243044;
  border-color: #475569;
}

body.dark-mode .dashboard-filter-btn.active {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #60a5fa;
  color: #f8fafc;
}

body.dark-mode .dashboard-agenda-select,
body.dark-mode .dashboard-year-select,
body.dark-mode .dashboard-select {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .dashboard-year-card {
  background: #1e293b;
  border: 1px solid #334155;
  box-shadow: none;
}

body.dark-mode .dashboard-year-body {
  background: #1e293b;
  border-top: 1px solid #334155;
}

body.dark-mode .dashboard-year-card-title,
body.dark-mode .dashboard-gallery-title {
  color: #e5e7eb;
}

body.dark-mode .dashboard-year-card-meta,
body.dark-mode .dashboard-gallery-meta,
body.dark-mode .dashboard-year-card-note {
  color: #94a3b8;
}

body.dark-mode .dashboard-timeline-meta,
body.dark-mode .dashboard-group-month-title {
  color: #94a3b8;
}

body.dark-mode .dashboard-agenda-calendar {
  border-color: #334155;
}

body.dark-mode .dashboard-agenda-weekday {
  background: #1e293b;
  border-bottom-color: #334155;
  color: #94a3b8;
}

body.dark-mode .dashboard-agenda-day {
  border-color: #334155;
  background: #0f172a;
}

body.dark-mode .dashboard-agenda-day.is-outside {
  background: #111827;
}

body.dark-mode .dashboard-agenda-day-number {
  color: #cbd5e1;
}

body.dark-mode .dashboard-agenda-day-event,
body.dark-mode .dashboard-agenda-year-item {
  background: #1e3a8a;
  color: #dbeafe;
}

body.dark-mode .dashboard-agenda-year-month {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .dashboard-agenda-year-title {
  color: #e2e8f0;
}

body.dark-mode .roadtrip-all-row-actions {
  background: #111827;
  border-left-color: #334155;
}

body.dark-mode .roadtrip-all-row.is-visible {
  border-color: #3b82f6;
  background: linear-gradient(180deg, #172554 0%, #1c2a3a 100%);
}

body.dark-mode .roadtrip-all-row.is-editing {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #451a03 0%, #1c2a3a 100%);
}

body.dark-mode .roadtrip-modal-title,
body.dark-mode .roadtrip-all-row-title,
body.dark-mode .roadtrip-all-row .roadtrip-sidebar-name {
  color: #e5e7eb;
}

@media (max-width: 700px) {
  body.dark-mode .dashboard-agenda-row-actions {
    background: transparent;
  }
}

body.dark-mode .agenda-view-action-btn {
  background: #273449;
  border-color: #334155;
  color: #e5e7eb;
}

body.dark-mode .agenda-view-action-btn--primary {
  background: #0077ff;
  border-color: #0077ff;
  color: #fff;
}

body.dark-mode #agendaEventPanel {
  background: #162131; border: 1px solid #334155;
}
body.dark-mode .form-control, body.dark-mode input, body.dark-mode select, body.dark-mode textarea {
  background: #0f172a; color: #e5e7eb; border: 1px solid #334155;
}

/* Dashboard Dark Mode */
body.dark-mode #dashboardView {
  background: radial-gradient(circle at top left, rgba(59,130,246,0.16), transparent 28%), linear-gradient(180deg, #0f172a 0%, #111827 100%);
}
body.dark-mode .dashboard-panel,
body.dark-mode .dashboard-stat-card,
body.dark-mode .dashboard-section-header,
body.dark-mode .dashboard-timeline-card {
  background: rgba(17, 24, 39, 0.86);
  border-color: #334155;
}

body.dark-mode .dashboard-stat-card--theme-time .dashboard-stat-card-deco {
  background:
    radial-gradient(ellipse 85% 75% at 100% 100%, rgba(59, 130, 246, 0.22), transparent 58%),
    radial-gradient(ellipse 55% 45% at 0% 0%, rgba(37, 99, 235, 0.12), transparent 52%),
    linear-gradient(155deg, rgba(17, 24, 39, 0.92) 0%, rgba(30, 41, 59, 0.88) 100%);
}

body.dark-mode .dashboard-stat-card--theme-agenda .dashboard-stat-card-deco {
  background:
    radial-gradient(ellipse 80% 70% at 100% 90%, rgba(139, 92, 246, 0.2), transparent 55%),
    linear-gradient(155deg, rgba(17, 24, 39, 0.92) 0%, rgba(46, 16, 101, 0.35) 100%);
}

body.dark-mode .dashboard-stat-card--theme-route .dashboard-stat-card-deco {
  background:
    radial-gradient(ellipse 80% 70% at 100% 100%, rgba(249, 115, 22, 0.18), transparent 55%),
    linear-gradient(155deg, rgba(17, 24, 39, 0.92) 0%, rgba(67, 20, 7, 0.28) 100%);
}

body.dark-mode .dashboard-stat-card--theme-map .dashboard-stat-card-deco {
  background:
    radial-gradient(ellipse 80% 70% at 100% 95%, rgba(16, 185, 129, 0.18), transparent 55%),
    linear-gradient(155deg, rgba(17, 24, 39, 0.92) 0%, rgba(6, 46, 34, 0.3) 100%);
}

body.dark-mode .dashboard-stat-card--theme-star .dashboard-stat-card-deco {
  background:
    radial-gradient(ellipse 75% 65% at 100% 100%, rgba(245, 158, 11, 0.2), transparent 55%),
    linear-gradient(155deg, rgba(17, 24, 39, 0.92) 0%, rgba(69, 26, 3, 0.28) 100%);
}

body.dark-mode .dashboard-stat-card--theme-photo .dashboard-stat-card-deco {
  background:
    radial-gradient(ellipse 78% 68% at 100% 92%, rgba(14, 165, 233, 0.18), transparent 54%),
    linear-gradient(155deg, rgba(17, 24, 39, 0.92) 0%, rgba(12, 45, 72, 0.32) 100%);
}

body.dark-mode .dashboard-stat-card--theme-pulse .dashboard-stat-card-deco,
body.dark-mode .dashboard-stat-card--theme-neutral .dashboard-stat-card-deco {
  background:
    radial-gradient(ellipse 70% 60% at 100% 100%, rgba(148, 163, 184, 0.12), transparent 55%),
    linear-gradient(155deg, rgba(17, 24, 39, 0.92) 0%, rgba(30, 41, 59, 0.9) 100%);
}

body.dark-mode .dashboard-stat-card-watermark {
  opacity: 0.08;
  color: #94a3b8;
}

body.dark-mode .dashboard-stat-card {
  background: transparent;
}

body.dark-mode .dashboard-section-header.active {
  background: rgba(17, 24, 39, 0.92);
}

body.dark-mode .dashboard-section-title,
body.dark-mode .dashboard-title,
body.dark-mode .dashboard-stat-value,
body.dark-mode .dashboard-timeline-title,
body.dark-mode .dashboard-group-year-title {
  color: #e5e7eb;
}

body.dark-mode .dashboard-stat-label,
body.dark-mode .dashboard-stat-note,
body.dark-mode .dashboard-section-arrow,
body.dark-mode .dashboard-subtitle {
  color: #94a3b8;
}

body.dark-mode .dashboard-header {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.88) 78%, rgba(15, 23, 42, 0) 100%);
}

body.dark-mode .dashboard-section-sticky-bar-inner {
  background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e293b 100%);
  border-color: rgba(96, 165, 250, 0.42);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(148, 163, 184, 0.1);
}

body.dark-mode .dashboard-section-sticky-label {
  color: #f8fafc;
}

body.dark-mode .dashboard-section-sticky-icon {
  background: rgba(59, 130, 246, 0.22);
  color: #bfdbfe;
}

body.dark-mode .dashboard-section-sticky-close {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

body.dark-mode .dashboard-section-sticky-close:hover {
  background: rgba(248, 113, 113, 0.28);
  color: #fecaca;
}

body.dark-mode .dashboard-section-icon {
  background: #1e3a5f;
}

/* ==========================================================================
   9. RESPONSIVE LAYOUT (Mobile Optimization)
   ========================================================================== */
@media (max-width: 900px) {
  .dashboard-top-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  .dashboard-top-grid .dashboard-hero-card {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 200px;
  }
}

@media (max-width: 700px) {
  #sidebar {
    width: 100%;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }

  #sidebar-user-info {
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }

  .sidebar-logout-btn {
    min-height: 44px;
  }

  .dashboard-stats { grid-template-columns: 1fr 1fr; }
  .dashboard-top-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-top-grid .dashboard-hero-card {
    grid-column: 1 / -1;
    min-height: 180px;
  }
  .dashboard-header { padding-left: 52px; padding-right: 52px; }

  .dashboard-agenda-row {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-agenda-row-main {
    width: 100%;
    box-sizing: border-box;
  }

  .dashboard-agenda-body {
    width: 100%;
    min-width: 0;
  }

  .dashboard-agenda-row-title,
  .dashboard-agenda-row-meta {
    white-space: nowrap;
  }

  .dashboard-agenda-body .agenda-tag-list {
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .dashboard-agenda-row-actions {
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
    padding: 0 12px 12px;
    margin-top: 0;
    border-top: 1px solid #eef2f7;
  }

  .dashboard-gallery-grid--stack {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dashboard-gallery-grid--stack .dashboard-gallery-item {
    aspect-ratio: 16 / 10;
  }

  .dashboard-gallery-grid--grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .dashboard-gallery-grid--grid-3 .dashboard-gallery-item {
    aspect-ratio: 1;
    border-radius: 10px;
  }

  .dashboard-year-card {
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
  }

  .dashboard-year-card .dashboard-year-photo {
    height: auto;
    aspect-ratio: 16 / 10;
    flex-shrink: 0;
  }

  .dashboard-year-body {
    padding: 8px 10px 10px;
    flex: 0 0 auto;
  }

  .dashboard-year-card-meta--desktop-only,
  .dashboard-year-card-note {
    display: none;
  }

  .done-date-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px;
    gap: 8px;
    align-items: center;
  }

  #formBox .done-date-remove-btn,
  #formBox .chip-remove-btn.done-date-remove-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
  }
}

@media (max-width: 620px) {
  .roadtrip-point-grid, .roadtrip-waypoint-row { grid-template-columns: 1fr; }
  .roadtrip-route-editor-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   10. GLOBAL UTILITIES
   ========================================================================== */
.sort-option-disabled { color: #94a3b8; }
.note-search-highlight { background: #fff1a8; color: inherit; padding: 0 2px; border-radius: 4px; }
button:not(.chip-remove-btn):not(.edit-sheet-btn):not(.nav-btn) { cursor: pointer; border: none; }
button:active { transform: scale(0.97); }

/* ==========================================================================
   11. ROAD TRIPS — modale, sidebar, fiche
   ========================================================================== */
.roadtrip-all-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 760px);
  max-height: min(88vh, 900px);
  overflow: hidden;
  background: #fcfdff;
  border: 1px solid #dfe7f0;
  border-radius: 22px;
  padding: 18px;
  box-sizing: border-box;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.24);
  z-index: 10013;
  flex-direction: column;
}

.roadtrip-all-modal.is-open {
  display: flex;
}

.roadtrip-modal-title {
  margin: 0;
  font-size: 22px;
  color: #162131;
  line-height: 1.2;
}

.roadtrip-modal-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: #64748b;
}

.roadtrip-all-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.roadtrip-all-filter-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.roadtrip-all-filter-btn.active {
  background: #0077ff;
  border-color: #0077ff;
  color: #fff;
}

.roadtrip-all-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
  padding-right: 2px;
}

.roadtrip-all-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.roadtrip-all-row.is-visible {
  border-color: #93c5fd;
  background: #f8fbff;
}

.roadtrip-all-row.is-editing {
  border-color: #fdba74;
  background: #fffaf5;
}

.roadtrip-all-row-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}

.roadtrip-all-row-main:hover {
  background: rgba(0, 119, 255, 0.04);
}

.roadtrip-all-row-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #eef4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.roadtrip-all-row-body {
  min-width: 0;
  flex: 1;
}

.roadtrip-all-row-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.roadtrip-sidebar-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #162131;
  line-height: 1.3;
}

.roadtrip-all-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.roadtrip-all-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.roadtrip-all-row-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 8px 10px;
  border-left: 1px solid #eef2f7;
  background: #fafbfd;
  flex-shrink: 0;
}

.roadtrip-all-row-actions .note-icon-btn,
.roadtrip-sidebar-card-actions .note-icon-btn,
.roadtrip-modal-icon-footer .note-icon-btn,
.roadtrip-modal-unified-footer .note-icon-btn {
  border: 1px solid #cbd5e1;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
  flex-shrink: 0;
}

.entity-edit-sheet__actions--icons .note-icon-btn {
  flex-shrink: 0;
}

.roadtrip-mini-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: #eef2f7;
  color: #475569;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.roadtrip-mini-btn:hover {
  background: #e2e8f0;
}

.roadtrip-mini-btn.is-active {
  background: #dbeafe;
  color: #2563eb;
}

.roadtrip-mini-btn.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.roadtrip-mini-btn.danger:hover {
  background: #fecaca;
}

.roadtrip-btn-view.is-active,
.roadtrip-btn-map.is-active,
.roadtrip-btn-recap.is-active,
.roadtrip-mini-btn.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #2563eb;
}

.roadtrip-mini-btn.roadtrip-mini-btn--text {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.roadtrip-status-badge {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
}

.roadtrip-status-badge.todo {
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fbbf24;
  color: #92400e;
}

.roadtrip-status-badge.done {
  background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 100%);
  border: 1px solid #4ade80;
  color: #166534;
}

.roadtrip-all-empty {
  text-align: center;
  padding: 28px 16px;
  border: 1px dashed #dbe3ee;
  border-radius: 16px;
  background: #f8fafc;
}

.roadtrip-all-empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.roadtrip-all-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: #334155;
}

.roadtrip-all-empty-note {
  margin-top: 6px;
  font-size: 13px;
  color: #64748b;
}

.roadtrip-all-active-hint {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eef4ff;
  color: #1e40af;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.roadtrip-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roadtrip-sidebar-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.roadtrip-sidebar-card.is-visible {
  border-color: #93c5fd;
  background: #f8fbff;
}

.roadtrip-sidebar-card.is-editing {
  border-color: #fdba74;
  background: #fffaf5;
}

.roadtrip-sidebar-card-main {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 10px 12px 8px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}

.roadtrip-sidebar-card-main:hover {
  background: rgba(0, 119, 255, 0.04);
}

.roadtrip-sidebar-card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.roadtrip-sidebar-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.roadtrip-sidebar-card-title-row .roadtrip-sidebar-name {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.3;
  word-break: break-word;
}

.roadtrip-sidebar-card-title-row .list-item-status {
  flex-shrink: 0;
}

.roadtrip-summary-stats-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.roadtrip-summary-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.roadtrip-summary-qty-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.roadtrip-summary-qty-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #dbe3ee;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.roadtrip-summary-qty-chip.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.roadtrip-summary-qty-chip .ui-icon-host {
  display: inline-flex;
  color: inherit;
}

body.dark-mode .roadtrip-summary-meta-chip {
  background: #1f2937;
  color: #cbd5e1;
}

body.dark-mode .roadtrip-summary-qty-chip {
  background: #111827;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .roadtrip-summary-qty-chip.is-active {
  background: rgba(37, 99, 235, 0.18);
  border-color: #3b82f6;
  color: #93c5fd;
}

.roadtrip-sidebar-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef4ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.roadtrip-sidebar-card-text {
  min-width: 0;
  flex: 1;
}

.roadtrip-sidebar-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roadtrip-sidebar-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.roadtrip-sidebar-card-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  align-self: stretch;
  width: 100%;
  gap: 6px;
  padding: 6px 10px 8px;
  border-top: 1px solid #eef2f7;
  border-left: none;
  background: rgba(248, 250, 252, 0.85);
  flex-shrink: 0;
  box-sizing: border-box;
}

.roadtrip-sidebar-card-actions.note-header-actions {
  align-self: stretch;
}

.roadtrip-modal-icon-footer,
.entity-edit-sheet__actions--icons {
  justify-content: flex-start;
  gap: 8px;
}

.roadtrip-sidebar-empty {
  padding: 10px 2px;
  font-size: 13px;
  color: #64748b;
}

.roadtrip-modal-block {
  margin-bottom: 14px;
}

.roadtrip-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

@media (max-width: 560px) {
  .roadtrip-modal-grid,
  .roadtrip-date-grid {
    grid-template-columns: 1fr;
  }
}

.roadtrip-modal-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.roadtrip-stat {
  font-size: 13px;
  color: #475569;
  font-weight: 600;
}

.summary-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-filter-button {
  border: 1px solid #dbe3ee;
  cursor: pointer;
}

.summary-filter-button.active {
  background: #0077ff;
  border-color: #0077ff;
  color: #fff;
}

.roadtrip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

#roadTripDetailPanel,
#roadTripSummaryPanel,
#roadTripSharePreviewPanel {
  display: none;
  flex-direction: column;
  overflow: hidden;
}

#roadTripDetailPanel.open,
#roadTripSummaryPanel.open,
#roadTripSharePreviewPanel.open {
  display: flex;
}

.roadtrip-modal-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.roadtrip-modal-shell > .roadtrip-modal-head {
  flex-shrink: 0;
  margin-bottom: 12px;
}

.roadtrip-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.roadtrip-modal-footers {
  flex-shrink: 0;
  margin-top: 8px;
}

.roadtrip-date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.roadtrip-day-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.roadtrip-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  color: #223;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}

.roadtrip-toolbar-btn--primary {
  background: #0077ff;
  border-color: #0077ff;
  color: #fff;
}

.roadtrip-toolbar-btn--active {
  background: #e8f2ff;
  border-color: #0077ff;
  color: #005bcc;
}

.roadtrip-spot-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 8px;
}

.roadtrip-spot-row--empty {
  flex-direction: column;
  align-items: stretch;
}

.roadtrip-boundary-row {
  background: rgba(0, 91, 204, 0.06);
  border: 1px solid rgba(0, 91, 204, 0.14);
  border-radius: 8px;
  margin-bottom: 8px;
}

.roadtrip-boundary-row--end {
  background: rgba(46, 125, 50, 0.06);
  border-color: rgba(46, 125, 50, 0.18);
  margin-top: 8px;
  margin-bottom: 0;
}

.roadtrip-boundary-editor {
  margin: 0 0 10px;
  padding: 10px;
  border: 1px dashed rgba(0, 91, 204, 0.25);
  border-radius: 8px;
}

.roadtrip-drag-handle {
  cursor: grab;
  user-select: none;
  color: #8a96a3;
  font-weight: 700;
  letter-spacing: -1px;
  padding: 0 4px;
}

.roadtrip-route-item.dragging {
  opacity: 0.55;
}

.roadtrip-route-dropzone.drag-over {
  outline: 2px dashed rgba(0, 91, 204, 0.35);
  outline-offset: 4px;
  border-radius: 8px;
}

.roadtrip-spot-name {
  flex: 1 1 auto;
  min-width: 0;
}

.roadtrip-route-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.roadtrip-route-item-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: #223;
  line-height: 1.35;
}

.roadtrip-route-item-meta {
  font-weight: 400;
  color: #64748b;
  font-size: 12px;
}

.roadtrip-spot-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.roadtrip-spot-actions .roadtrip-day-select {
  max-width: 92px;
  min-width: 72px;
  padding: 4px 6px;
  font-size: 12px;
}

.roadtrip-spot-actions .roadtrip-mini-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
}

#roadTripDetailPanel .roadtrip-modal-block,
#roadTripSummaryPanel .roadtrip-modal-block,
#roadTripSharePreviewPanel .roadtrip-modal-block {
  flex: none;
  min-height: 0;
}

.roadtrip-modal-unified-footer {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 0 2px;
  border-top: 1px solid #e2e8f0;
  background: transparent;
  position: static;
  overflow-x: auto;
}

.roadtrip-modal-unified-footer.edit-sheet-footer {
  margin-top: 0;
  padding-top: 12px;
}

.roadtrip-modal-unified-footer .edit-sheet-btn,
.roadtrip-modal-unified-footer .roadtrip-mini-btn {
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.roadtrip-modal-unified-footer .edit-sheet-btn {
  border-radius: 12px;
  font-size: 13px;
  padding: 0 14px;
}

.roadtrip-modal-unified-footer .edit-sheet-btn-delete {
  width: 40px;
  flex: 0 0 40px;
  padding: 0;
  font-size: 16px;
}

.roadtrip-modal-unified-footer .roadtrip-footer-save {
  margin-left: auto;
  flex: 0 0 auto;
  min-width: 0;
  padding: 0 16px;
}

.roadtrip-modal-unified-footer .roadtrip-mini-btn {
  width: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 12px;
  font-size: 16px;
}

.roadtrip-route-type-grid {
  margin-bottom: 6px;
}

.roadtrip-modal-icon-footer {
  margin: 0;
  padding: 12px 0 10px;
  border-top: 1px solid #e2e8f0;
  background: transparent;
}

.roadtrip-modal-main-footer {
  margin: 0;
  padding: 0 0 2px;
  border-top: 1px solid #e2e8f0;
  background: transparent;
  position: static;
}

.roadtrip-modal-icon-footer .roadtrip-mini-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 12px;
  font-size: 16px;
}

.roadtrip-modal-icon-footer--solo {
  padding-bottom: 2px;
  border-bottom: none;
}

.roadtrip-actions button {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  color: #223;
  font-size: 13px;
  font-weight: 600;
}

.roadtrip-actions button:first-child {
  background: #0077ff;
  border-color: #0077ff;
  color: #fff;
}

.roadtrip-day-section {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.roadtrip-day-header,
.roadtrip-summary-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.roadtrip-day-title,
.roadtrip-summary-day-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #223;
  font-size: 13px;
}

.roadtrip-day-color {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.roadtrip-summary-day-count {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.roadtrip-day-body {
  padding: 8px 10px 10px;
}

.roadtrip-spot-row,
.roadtrip-summary-item {
  border-top: 1px solid #f1f5f9;
}

.roadtrip-summary-item:first-child {
  border-top: none;
}

.roadtrip-summary-item-button {
  width: 100%;
  padding: 10px 8px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
}

.roadtrip-summary-item-button:hover {
  background: #f8fafc;
}

.roadtrip-summary-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #223;
}

@media (max-width: 700px) {
  .roadtrip-all-modal {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-height: min(92vh, 100dvh);
    border-radius: 22px 22px 0 0;
    padding: 16px 14px max(16px, env(safe-area-inset-bottom));
  }

  .roadtrip-sidebar-card-actions {
    justify-content: flex-end;
    padding: 8px 10px 10px;
  }

  .roadtrip-all-row {
    flex-direction: column;
    overflow: visible;
  }

  .roadtrip-all-row-actions {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    border-left: none;
    border-top: 1px solid #eef2f7;
    justify-content: flex-end;
    padding: 10px 12px;
    gap: 6px;
  }

  body.dark-mode .roadtrip-all-row-actions {
    border-top-color: #334155;
  }

  .roadtrip-actions button {
    min-width: calc(50% - 4px);
  }

  #roadTripDetailPanel .roadtrip-spot-row:not(.roadtrip-spot-row--empty) {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  #roadTripDetailPanel .roadtrip-route-item-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #roadTripDetailPanel .roadtrip-spot-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  #roadTripDetailPanel .roadtrip-modal-unified-footer {
    flex-wrap: wrap;
  }
}

body.dark-mode .roadtrip-all-modal,
body.dark-mode #roadTripDetailPanel,
body.dark-mode #roadTripSummaryPanel,
body.dark-mode #roadTripSharePreviewPanel {
  background: #111827;
  border-color: #334155;
}

body.dark-mode .roadtrip-toolbar-btn {
  background: #273449;
  border-color: #334155;
  color: #e5e7eb;
}

body.dark-mode .roadtrip-toolbar-btn--primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

body.dark-mode .roadtrip-toolbar-btn--active {
  background: rgba(37, 99, 235, 0.18);
  border-color: #2563eb;
  color: #bfdbfe;
}

body.dark-mode .roadtrip-modal-footers .roadtrip-modal-icon-footer,
body.dark-mode .roadtrip-modal-footers .roadtrip-modal-main-footer,
body.dark-mode .roadtrip-modal-footers .roadtrip-modal-unified-footer {
  background: #162131;
  border-top-color: #334155;
}

body.dark-mode .roadtrip-modal-title,
body.dark-mode .roadtrip-sidebar-name,
body.dark-mode .roadtrip-summary-item-title {
  color: #e5e7eb;
}

body.dark-mode .roadtrip-modal-subtitle,
body.dark-mode .roadtrip-sidebar-meta,
body.dark-mode .roadtrip-all-empty-note {
  color: #94a3b8;
}

body.dark-mode .roadtrip-all-row,
body.dark-mode .roadtrip-sidebar-card,
body.dark-mode .roadtrip-day-section {
  background: #1c2a3a;
  border-color: #334155;
}

body.dark-mode .roadtrip-all-row-main:hover,
body.dark-mode .roadtrip-sidebar-card-main:hover,
body.dark-mode .roadtrip-summary-item-button:hover {
  background: rgba(59, 130, 246, 0.08);
}

body.dark-mode .roadtrip-sidebar-card-actions {
  border-top-color: #334155;
  background: rgba(15, 23, 42, 0.35);
}

body.dark-mode .roadtrip-mini-btn.nav-btn--duplicate,
body.dark-mode .edit-sheet-btn-duplicate {
  background: #64748b;
  color: #f8fafc;
}

body.dark-mode .roadtrip-mini-btn.nav-btn--duplicate:hover,
body.dark-mode .edit-sheet-btn-duplicate:hover {
  background: #475569;
}

body.dark-mode .roadtrip-all-meta-chip,
body.dark-mode .roadtrip-mini-btn {
  background: #273449;
  color: #cbd5e1;
}

body.dark-mode .roadtrip-btn-view,
body.dark-mode .roadtrip-btn-map,
body.dark-mode .roadtrip-btn-recap,
body.dark-mode .map-status-reset.roadtrip-btn-view,
body.dark-mode .map-status-reset.roadtrip-btn-map,
body.dark-mode .map-status-reset.roadtrip-btn-recap,
body.dark-mode .settings-map-icon-btn.roadtrip-btn-view {
  background: #64748b;
  color: #f8fafc;
}

body.dark-mode .roadtrip-btn-view:hover,
body.dark-mode .roadtrip-btn-map:hover,
body.dark-mode .roadtrip-btn-recap:hover,
body.dark-mode .map-status-reset.roadtrip-btn-view:hover,
body.dark-mode .map-status-reset.roadtrip-btn-map:hover,
body.dark-mode .map-status-reset.roadtrip-btn-recap:hover,
body.dark-mode .settings-map-icon-btn.roadtrip-btn-view:hover {
  background: #475569;
}

body.dark-mode .roadtrip-btn-view.is-active,
body.dark-mode .roadtrip-btn-map.is-active,
body.dark-mode .roadtrip-btn-recap.is-active,
body.dark-mode .settings-map-icon-btn.roadtrip-btn-view.is-active {
  background: #334155;
  color: #fff;
}

body.dark-mode .roadtrip-all-filter-btn {
  background: #273449;
  border-color: #334155;
  color: #e5e7eb;
}

body.dark-mode .roadtrip-all-empty {
  background: #1c2a3a;
  border-color: #334155;
}

/* ==========================================================================
   12. AMIS & PARTAGE
   ========================================================================== */
.friends-search-btn {
  width: 100%;
  margin: 8px 0 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #0077ff;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}

.sidebar-section-title-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sidebar-section-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-sizing: border-box;
}

.sidebar-section-badge--pending {
  background: #ef4444;
}

.sidebar-section-badge--message {
  background: #22c55e;
}

.sidebar-section-badge--share {
  background: #f59e0b;
}

.sidebar-section-badge[hidden] {
  display: none !important;
}

#sidebar .section-title.has-sidebar-badge:not(.active) {
  border-color: #fecaca;
  background: #fff7f7;
}

#sidebar .section-title.has-sidebar-badge-pending:not(.active) {
  border-color: #fecaca;
  background: #fff7f7;
}

#sidebar .section-title.has-sidebar-badge-message:not(.active) {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

#sidebar .section-title.has-sidebar-badge-pending.has-sidebar-badge-message:not(.active) {
  border-color: #fde68a;
  background: #fffbeb;
}

#sidebar #agendaBtn.has-sidebar-badge:not(.active) {
  border-color: #bfdbfe;
  background: #f0f9ff;
}

.sidebar-section-badge--agenda {
  background: #2563eb;
}

.agenda-share-inbox {
  margin-bottom: 10px;
}

.agenda-share-inbox-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 6px;
}

.agenda-share-invite-card {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.agenda-share-from {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #1d4ed8;
}

.agenda-share-invite-meta {
  display: block;
  font-size: 12px;
  color: #334155;
  margin-top: 2px;
}

.agenda-share-invite-date {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

.agenda-share-invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.agenda-share-preview-banner {
  margin-bottom: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 12px;
  font-weight: 700;
}

.agenda-share-preview-footer {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.agenda-share-preview-footer .edit-action-btn,
.agenda-share-preview-footer .friends-action-btn {
  width: 100%;
  justify-content: center;
}

.agenda-sidebar-shared {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #2563eb;
}

.friends-search-item.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
}

.friends-search-results,
.friends-pending-list,
.friends-list-item {
  margin-top: 6px;
}

.friends-pending-card {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: #fff8e6;
  border: 1px solid #f5d78e;
}

.friends-pending-label {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
}

.friends-pending-actions {
  display: flex;
  gap: 8px;
}

.friends-action-btn {
  flex: 1;
  padding: 6px 10px;
  border-radius: 8px;
  background: #e8edf3;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

.friends-action-btn--accept {
  background: #16a34a;
  color: #fff;
}

.friends-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
}

.friends-list-item-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  margin-bottom: 6px;
}

.friends-sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px 8px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: #f8fafc;
}

.friends-list-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friends-list-menu-arrow {
  flex-shrink: 0;
  font-size: 11px;
  color: #64748b;
  margin-left: auto;
}

.friends-favorite-star {
  flex-shrink: 0;
  color: #f59e0b;
  font-size: 14px;
  line-height: 1;
}

.friends-sidebar-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.friends-sidebar-menu-item-label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.friends-sidebar-menu-badge {
  flex-shrink: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.friends-sidebar-menu-item:hover {
  background: #eff6ff;
}

.friends-list-item-wrap.is-open .friends-list-item {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0;
}

.friends-list-name-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}

.friends-list-share-hint {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: #b45309;
  line-height: 1.25;
}

.friends-pending-share-hint {
  margin: 0 0 10px;
  padding: 0 4px;
  font-size: 12px;
  line-height: 1.35;
  color: #64748b;
}

.friend-modal-requester-maps {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.friend-modal-requester-title {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  color: #1d4ed8;
}

.friend-modal-requester-list {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #334155;
}

.friend-modal-section-title {
  margin: 14px 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
}

.friend-favorite-toggle {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.friend-favorite-toggle input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
}

.friend-favorite-toggle-label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  color: #92400e;
}

.friends-share-map-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  min-height: 44px;
  cursor: pointer;
}

.friends-share-map-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  align-self: center;
}

.friends-share-map-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-view-chip-submenu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 8px 6px 16px;
}

.friend-view-chip-submenu[hidden] {
  display: none !important;
}

.friend-view-chip-submenu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.friend-view-chip-submenu-item.is-active {
  background: #eff6ff;
  color: #1d4ed8;
}

.friend-view-chip-submenu-item--all {
  font-weight: 700;
}

.friend-view-chip-submenu-item:hover {
  background: #f1f5f9;
}

.friend-view-chip-submenu-arrow {
  margin-left: auto;
  font-size: 11px;
}

.friend-view-chip-menu-item--maps {
  display: flex;
  align-items: center;
  gap: 8px;
}

.friend-gallery-item .dashboard-gallery-overlay,
.friend-gallery-grid .dashboard-gallery-overlay {
  display: none !important;
}

.friends-list-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-bottom: 6px;
}

.friends-list-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0077ff;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}

.friends-list-avatar--photo {
  background: #e2e8f0;
}

.friends-list-avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.friends-pending-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.friends-search-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.friends-search-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.friends-list-name {
  font-weight: 600;
  font-size: 13px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friends-item-message-badge {
  flex-shrink: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.friends-list-item.has-unread-message {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.friend-view-chip-message-badge {
  flex-shrink: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.friend-view-chip.has-unread-message {
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
}

.friend-view-menu-message-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.friends-search-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-bottom: 6px;
}

.friends-search-sub {
  font-size: 11px;
  color: #64748b;
}

.friends-search-sub--ok {
  color: #16a34a;
  font-weight: 600;
}

.friends-search-item--static {
  cursor: default;
  opacity: 0.92;
}

.friend-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
}

.friend-modal.open {
  display: flex;
}

.friend-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.friend-modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 32px));
  max-height: min(80vh, 560px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.friend-modal-title {
  margin: 0 0 8px;
  font-size: 18px;
}

.friend-modal-maps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
  min-width: 0;
}

.friend-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.friend-modal-actions--accept {
  flex-wrap: wrap;
}

.friend-modal-actions--accept .friend-modal-primary-btn,
.friend-modal-actions--accept .friend-modal-later-btn {
  flex: 1 1 calc(50% - 5px);
  min-width: 0;
  height: 42px;
  font-size: 13px;
  padding: 0 10px;
  white-space: nowrap;
}

.friend-modal-actions--accept .friend-modal-cancel-btn {
  flex: 1 1 100%;
  width: 100%;
  height: 40px;
  font-size: 13px;
}

.friend-modal-later-btn {
  background: #e2e8f0;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.friend-modal-later-btn:hover {
  background: #cbd5e1;
}

body.dark-mode .friend-modal-later-btn {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

body.dark-mode .friend-modal-later-btn:hover {
  background: #475569;
}

.friend-modal-danger {
  margin-top: 16px;
  padding-top: 4px;
}

.friend-modal-divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 0 0 12px 0;
}

.friend-modal-remove-btn {
  width: 100%;
  margin-top: 4px;
}

body.dark-mode .friend-modal-divider {
  border-top-color: #334155;
}

.friend-view-chip {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(60px + 8px + env(safe-area-inset-bottom, 0px));
  z-index: 6095;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(calc(100vw - 20px), 400px);
  pointer-events: none;
}

.friend-view-chip:not([hidden]) {
  pointer-events: auto;
}

.friend-view-chip[hidden] {
  display: none !important;
}

.friend-view-chip-row {
  display: flex;
  align-items: stretch;
  gap: 4px;
  background: rgba(15, 23, 42, 0.94);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22);
}

.friend-view-chip-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
}

.friend-view-chip-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  text-align: left;
}

.friend-view-chip-label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.friend-view-chip-map {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.friend-view-chip-arrow {
  font-size: 11px;
  opacity: 0.85;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.friend-view-chip.is-open .friend-view-chip-arrow {
  transform: rotate(180deg);
}

.friend-view-chip-exit {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.friend-view-chip-exit:hover {
  background: rgba(255, 255, 255, 0.2);
}

.friend-view-chip-menu {
  order: -1;
  margin-bottom: 8px;
  margin-top: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.18);
  border: 1px solid #e2e8f0;
}

.friend-view-chip-menu[hidden],
.friend-view-chip:not(.is-open) .friend-view-chip-menu {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  border: none !important;
  box-shadow: none !important;
  overflow: hidden !important;
  visibility: hidden !important;
}

.friend-view-chip-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  border: none;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
}

.friend-view-chip-menu-icon,
.friends-sidebar-menu-icon,
.friend-view-chip-submenu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  color: #64748b;
}

.friend-view-chip-menu-label,
.friends-sidebar-menu-item-label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.friends-sidebar-menu-item {
  justify-content: flex-start;
}

.sidebar-action-btn--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sidebar-action-btn-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: #64748b;
}

.friend-view-chip-menu-item:hover {
  background: #f8fafc;
}

.friend-view-chip-menu-item + .friend-view-chip-menu-item {
  border-top: 1px solid #eef2f7;
}

.friend-view-sidebar-block {
  margin-bottom: 4px;
}

.friend-view-section-title {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.friend-view-section-title.active {
  background: #dbeafe;
}

.friend-view-exit-eye {
  color: #64748b;
}

.friend-view-exit-eye:hover {
  color: #dc2626;
}

.dashboard-exit-eye {
  color: #64748b;
}

.dashboard-exit-eye:hover {
  color: #dc2626;
}

@media (max-width: 768px) {
  .friend-view-chip {
    width: min(calc(100vw - 16px), 400px);
  }

  .friend-view-chip-label {
    font-size: 11px;
  }

  .friend-view-chip-map {
    font-size: 9px;
  }

  .friend-view-chip-exit {
    width: 32px;
    min-width: 32px;
    height: 32px;
  }
}

.friend-view-maps-list {
  margin-bottom: 10px;
}

.friend-map-sidebar-count {
  margin-left: auto;
  font-size: 11px;
  color: #64748b;
}

.friend-map-sidebar-item.is-active .friend-map-sidebar-count {
  color: #0077ff;
}

.my-map-sidebar-item {
  border-style: dashed;
}

.my-map-sidebar-item:hover {
  border-color: #0077ff;
  background: #f0f9ff;
}

.sidebar-list-hint {
  margin: 0 0 8px;
  font-size: 11px;
  line-height: 1.35;
  color: #64748b;
}

.friend-maps-sidebar-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}

.friend-map-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.friend-map-sidebar-item.is-active {
  border-color: #0077ff;
  background: #eff6ff;
  color: #0f172a;
  font-weight: 600;
}

.friend-map-sidebar-item:not(.is-active) {
  opacity: 0.72;
}

.friend-map-sidebar-item--all {
  border-style: dashed;
  font-weight: 600;
}

.friends-manage-btn {
  flex-shrink: 0;
  width: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}

.spot-popup-add-map-btn {
  flex: 1 1 100%;
  min-width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: #0ea5e9;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.spot-popup-roadtrip-btn {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 9px 12px;
  border: none;
  border-radius: 10px;
  background: #0077ff;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.spot-popup-roadtrip-btn--remove {
  background: #64748b;
}

.copy-spot-map-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 4px;
}

.copy-spot-map-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.copy-spot-map-option:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.copy-spot-map-option:has(input:checked) {
  border-color: #0077ff;
  background: #eff6ff;
  box-shadow: 0 0 0 1px rgba(0, 119, 255, 0.12);
}

.copy-spot-map-option input {
  width: 18px;
  height: 18px;
  accent-color: #0077ff;
  flex-shrink: 0;
}

.copy-spot-map-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.copy-spot-map-option-sub {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
}

body.dark-mode .copy-spot-map-option {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

body.dark-mode .copy-spot-map-option:hover,
body.dark-mode .copy-spot-map-option:has(input:checked) {
  background: #172554;
  border-color: #3b82f6;
}

.spot-popup-private-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
  user-select: none;
}

.spot-popup-private-row--footer {
  margin-top: 4px;
  margin-bottom: 8px;
}

.spot-popup-private-row:has(input:checked) {
  background: #fff7ed;
  border-color: #fdba74;
}

.spot-popup-private-lock {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.spot-popup-private-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: #64748b;
  cursor: pointer;
}

.spot-popup-private-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  line-height: 1.25;
}

.spot-popup-private-hint {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
}

body.dark-mode .spot-popup-footer {
  border-top-color: #334155;
}

body.dark-mode .spot-popup-private-pill {
  background: #0f172a;
  border-color: #475569;
  color: #cbd5e1;
}

body.dark-mode .spot-popup-private-pill:hover {
  background: #1e293b;
  border-color: #64748b;
}

body.dark-mode .spot-popup-private-pill:has(.spot-popup-private-check:checked) {
  background: #172554;
  border-color: #3b82f6;
  color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

body.dark-mode .spot-popup-private-pill:has(.spot-popup-private-check:checked) .spot-popup-private-pill-icon {
  color: #60a5fa;
}

body.dark-mode .spot-popup-head-actions .note-icon-btn,
body.dark-mode .spot-popup-action-btn {
  border-color: #475569;
  background: #0f172a;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35);
}

body.dark-mode .spot-popup-private-row {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .spot-popup-private-row:has(input:checked) {
  background: #431407;
  border-color: #9a3412;
}

body.dark-mode .spot-popup-private-text {
  color: #e2e8f0;
}

body.dark-mode .spot-popup-private-hint {
  color: #94a3b8;
}

.spot-form-private-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
  user-select: none;
  max-width: 100%;
}

.spot-form-private-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: #64748b;
  cursor: pointer;
}

.spot-form-private-text {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  line-height: 1.25;
  white-space: nowrap;
}

body.dark-mode .spot-form-private-row {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .spot-form-private-text {
  color: #e2e8f0;
}

body.dark-mode .friends-list-item,
body.dark-mode .friends-search-item {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .friends-list-item:hover {
  background: #243044;
  border-color: #475569;
}

body.dark-mode .friends-list-item-wrap.is-open .friends-list-item {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: #3b82f6;
  background: linear-gradient(180deg, #1e3a8a 0%, #1e293b 100%);
}

body.dark-mode .friends-sidebar-menu {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .friends-sidebar-menu-item {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .friends-sidebar-menu-item:hover {
  background: #243044;
  border-color: #475569;
}

body.dark-mode .friends-pending-card {
  background: #422006;
  border-color: #92400e;
  color: #fde68a;
}

body.dark-mode .friends-action-btn {
  background: #334155;
  color: #e2e8f0;
}

body.dark-mode .friends-search-btn {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
}

body.dark-mode .friends-manage-btn {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .friends-list-share-hint {
  color: #94a3b8;
}

body.dark-mode .friends-pending-share-hint {
  color: #94a3b8;
}

body.dark-mode .friend-modal-requester-maps {
  background: #1e3a8a;
  border-color: #3b82f6;
}

body.dark-mode .friend-modal-requester-title {
  color: #bfdbfe;
}

body.dark-mode .friend-modal-requester-list {
  color: #e2e8f0;
}

body.dark-mode .friends-share-map-row {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .friend-modal-card {
  background: #1e293b;
  color: #e2e8f0;
}

/* ==========================================================================
   TUTORIEL — bulles d'introduction
   ========================================================================== */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 10140;
  pointer-events: none;
}

.tutorial-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10141;
  background: rgba(15, 23, 42, 0.52);
  pointer-events: none;
}

.tutorial-backdrop[hidden] {
  display: none !important;
}

.tutorial-highlight {
  position: relative;
  z-index: 10142 !important;
  border-radius: 12px;
  outline: 3px solid #60a5fa;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.35), 0 8px 28px rgba(15, 23, 42, 0.22) !important;
}

.tutorial-bubble[hidden] {
  display: none !important;
}

.tutorial-bubble {
  position: fixed;
  z-index: 10150;
  width: min(92vw, 320px);
  padding: 14px 14px 12px;
  border-radius: 16px;
  border: 1px solid #cbd5e1;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
  pointer-events: auto;
}

.tutorial-bubble--active {
  border-color: #60a5fa;
  box-shadow:
    0 0 0 4px rgba(96, 165, 250, 0.42),
    0 22px 56px rgba(15, 23, 42, 0.32);
}

.tutorial-bubble::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 1px solid #cbd5e1;
  transform: rotate(45deg);
}

.tutorial-bubble[data-placement="bottom"]::before {
  top: -7px;
  left: 50%;
  margin-left: -6px;
  border-bottom: none;
  border-right: none;
}

.tutorial-bubble[data-placement="top"]::before {
  bottom: -7px;
  left: 50%;
  margin-left: -6px;
  border-top: none;
  border-left: none;
}

.tutorial-bubble[data-placement="left"]::before {
  right: -7px;
  top: 50%;
  margin-top: -6px;
  border-bottom: none;
  border-left: none;
}

.tutorial-bubble[data-placement="right"]::before {
  left: -7px;
  top: 50%;
  margin-top: -6px;
  border-top: none;
  border-right: none;
}

.tutorial-bubble[data-placement="center"]::before {
  display: none;
}

.tutorial-bubble-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.tutorial-bubble-step {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.tutorial-bubble-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: #eef4fb;
  color: #334155;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.tutorial-bubble-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.tutorial-bubble-body {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #475569;
}

.tutorial-bubble-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.tutorial-bubble-back {
  margin-right: auto;
}

.tutorial-bubble-skip,
.tutorial-bubble-next {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.tutorial-bubble-skip {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #64748b;
}

.tutorial-bubble-next {
  border: none;
  background: #2563eb;
  color: #fff;
}

.tutorial-bubble-skip:hover {
  background: #f1f5f9;
}

.tutorial-bubble-next:hover {
  background: #1d4ed8;
}

body.dark-mode .tutorial-bubble {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

body.dark-mode .tutorial-bubble::before {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .tutorial-bubble-title {
  color: #f1f5f9;
}

body.dark-mode .tutorial-bubble-body {
  color: #cbd5e1;
}

body.dark-mode .tutorial-bubble-close {
  background: #0f172a;
  color: #e2e8f0;
}

body.dark-mode .tutorial-bubble-skip {
  background: #0f172a;
  border-color: #334155;
  color: #94a3b8;
}

body.dark-mode .tutorial-highlight {
  outline-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.35), 0 8px 28px rgba(0, 0, 0, 0.45) !important;
}

body.dark-mode .tutorial-bubble--active {
  border-color: #93c5fd;
  box-shadow:
    0 0 0 4px rgba(147, 197, 253, 0.38),
    0 22px 56px rgba(0, 0, 0, 0.5);
}

body.dark-mode .tutorial-backdrop {
  background: rgba(2, 6, 23, 0.72);
}

/* Admin — accueil nouveaux utilisateurs */
.admin-onboarding-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-onboarding-section {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.admin-onboarding-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-onboarding-section-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.admin-onboarding-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  margin-bottom: 8px;
}

.admin-onboarding-check--main {
  padding: 10px 12px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.admin-onboarding-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-onboarding-grid label,
.admin-onboarding-section > label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.admin-onboarding-textarea {
  min-height: 72px;
  resize: vertical;
}

.admin-onboarding-tutorials-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-onboarding-tutorial {
  padding: 10px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
}

.admin-onboarding-tutorial-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-onboarding-tutorial-actions {
  display: flex;
  gap: 4px;
}

.admin-onboarding-icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.admin-onboarding-icon-btn--danger {
  border-color: #fecaca;
  background: #fff5f5;
}

.admin-onboarding-add-btn {
  margin: 0;
  min-height: 38px;
}

.admin-onboarding-accordion {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.admin-onboarding-accordion[open] {
  display: flex;
  flex-direction: column;
  max-height: min(50vh, 520px);
}

.admin-onboarding-accordion + .admin-onboarding-accordion {
  margin-top: 10px;
}

.admin-onboarding-accordion-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  flex-shrink: 0;
}

.admin-onboarding-accordion-summary::-webkit-details-marker {
  display: none;
}

.admin-onboarding-accordion-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.admin-onboarding-accordion-count {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 999px;
}

.admin-onboarding-accordion-chevron {
  color: #64748b;
  transition: transform 0.15s ease;
}

.admin-onboarding-accordion[open] .admin-onboarding-accordion-chevron {
  transform: rotate(90deg);
}

.admin-onboarding-accordion-body {
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid #e2e8f0;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.admin-onboarding-accordion-body > .settings-data-hint:first-child {
  margin-top: 12px;
}

.admin-onboarding-accordion-body > label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.admin-onboarding-inline-btn {
  width: 100%;
  margin: 0;
}

.admin-onboarding-demo-block {
  padding: 10px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
}

.admin-onboarding-demo-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-onboarding-demo-block-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.admin-onboarding-check--inline {
  margin: 0;
  font-size: 12px;
}

.admin-onboarding-demo-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.admin-onboarding-help-mode {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.admin-onboarding-help-mode legend {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  padding: 0;
  margin-bottom: 8px;
}

.admin-onboarding-help-mode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 10px 12px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
}

.admin-onboarding-radio {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
}

.admin-onboarding-radio input {
  margin: 0;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.admin-onboarding-radio span {
  line-height: 1.2;
}

.admin-onboarding-help-block[hidden] {
  display: none !important;
}

.admin-onboarding-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.admin-onboarding-footer-btn {
  width: 100%;
  flex: none !important;
  min-height: 44px;
  height: auto;
  padding: 10px 14px;
  white-space: normal;
  line-height: 1.3;
}

.admin-onboarding-actions {
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 700px) {
  .admin-onboarding-grid {
    grid-template-columns: 1fr;
  }
}

body.dark-mode .admin-onboarding-section {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .admin-onboarding-accordion {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .admin-onboarding-accordion-body {
  border-color: #334155;
}

body.dark-mode .admin-onboarding-accordion-title,
body.dark-mode .admin-onboarding-demo-block-title {
  color: #f1f5f9;
}

body.dark-mode .admin-onboarding-demo-block,
body.dark-mode .admin-onboarding-help-mode-row {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .admin-onboarding-radio {
  color: #cbd5e1;
}

body.dark-mode .admin-onboarding-section-title {
  color: #f1f5f9;
}

body.dark-mode .admin-onboarding-check {
  color: #cbd5e1;
}

body.dark-mode .admin-onboarding-check--main {
  background: #172554;
  border-color: #1d4ed8;
}

body.dark-mode .admin-onboarding-tutorial {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .admin-onboarding-icon-btn {
  background: #0f172a;
  border-color: #475569;
  color: #e2e8f0;
}

.tutorial-bubble--wide {
  width: min(92vw, 360px);
}

.tutorial-hub-links {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.tutorial-hub-links a,
.tutorial-chip-link {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}

.tutorial-hub-link-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.tutorial-hub-icon {
  flex-shrink: 0;
  color: #1d4ed8;
}

.tutorial-hub-links a:hover,
.tutorial-chip-link:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.tutorial-highlight-chip {
  outline: 3px solid #f59e0b !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.35) !important;
}

.tutorial-bubble-back {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.tutorial-bubble-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tutorial-demo-spot-pin {
  position: fixed;
  z-index: 10143;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  pointer-events: none;
  transform: translate(-50%, -100%);
  animation: none !important;
  filter: none;
}

.tutorial-demo-spot-pin.tutorial-highlight {
  position: fixed;
  z-index: 10143 !important;
  border-radius: 50%;
  outline: none;
  box-shadow: none !important;
}

.tutorial-demo-spot-pin::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 28px;
  height: 28px;
  transform: translateX(-50%) rotate(-45deg);
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(145deg, #fb923c 0%, #ea580c 100%);
  border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.35);
}

.tutorial-demo-spot-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 44px;
  height: 44px;
  transform: translateX(-50%);
  border: 3px solid #60a5fa;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.28);
  animation: tutorial-spot-pulse 1.6s ease-in-out infinite;
}

.tutorial-demo-spot-marker {
  z-index: 10142 !important;
  position: relative;
  filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.95));
  animation: tutorial-spot-bounce 1.6s ease-in-out infinite;
}

.leaflet-marker-icon.tutorial-demo-spot-marker::after {
  content: "";
  position: absolute;
  inset: -12px;
  border: 3px solid #60a5fa;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.28);
  pointer-events: none;
  animation: tutorial-spot-pulse 1.6s ease-in-out infinite;
}

@keyframes tutorial-spot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.82; }
}

@keyframes tutorial-spot-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.leaflet-marker-icon.tutorial-highlight,
.tutorial-highlight.leaflet-marker-icon {
  z-index: 10142 !important;
}

body.dark-mode .tutorial-hub-links a,
body.dark-mode .tutorial-chip-link {
  background: #0f172a;
  border-color: #334155;
  color: #93c5fd;
}

body.dark-mode .tutorial-hub-icon {
  color: #93c5fd;
}

body.dark-mode .tutorial-bubble-back {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.settings-help-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-onboarding-help-html {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.help-page-overlay {
  position: fixed;
  inset: 0;
  z-index: 10055;
  background: rgba(15, 23, 42, 0.45);
}

.help-page-overlay[hidden],
.help-page-modal[hidden] {
  display: none !important;
}

.help-page-modal {
  position: fixed;
  z-index: 10056;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(94vw, 640px);
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid #cbd5e1;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}

.help-page-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.help-page-modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.help-page-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #eef4fb;
  color: #334155;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.help-page-modal-body {
  flex: 1;
  overflow: auto;
  padding: 0 18px 16px;
}

.help-page-modal-foot {
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.help-page-modal-foot[hidden] {
  display: none !important;
}

.help-page-modal-foot .edit-sheet-btn {
  flex: none;
  width: auto;
  min-width: 100px;
  min-height: 40px;
  height: auto;
  padding: 0 16px;
}

.help-page-pdf-open-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.help-page-modal--pdf {
  width: min(96vw, 860px);
  max-height: min(92vh, 900px);
}

.help-page-pdf-frame {
  width: 100%;
  min-height: min(70vh, 640px);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.help-page-pdf-fallback {
  margin: 10px 0 0;
  font-size: 12px;
  color: #64748b;
}

.help-page-content img,
.help-page-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px 0;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.help-page-content .help-page-hero {
  width: calc(100% + 36px);
  margin: 0 -18px 14px;
  padding: 0 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  background: linear-gradient(180deg, #1a3358 0%, #1e3a5f 50%, #1a3358 100%);
  box-sizing: border-box;
}

.help-page-content .help-page-hero-logo,
.help-page-content > .help-page-hero-logo {
  display: block;
  width: 100%;
  max-width: none;
  aspect-ratio: 420 / 150;
  height: auto;
  margin: 0 auto;
  padding: 0;
  line-height: normal;
  object-fit: cover;
  object-position: center center;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.help-page-content > .help-page-hero-logo {
  width: calc(100% + 36px);
  margin: 0 -18px 14px;
  padding: 0 14px;
  box-sizing: border-box;
  background: linear-gradient(180deg, #1a3358 0%, #1e3a5f 50%, #1a3358 100%);
}

.help-page-content figure {
  margin: 14px 0;
}

.help-page-content figcaption {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
}

.help-page-content h4 {
  margin: 18px 0 8px;
  font-size: 15px;
  color: #0f172a;
}

.help-page-content h4:first-child {
  margin-top: 0;
}

.help-page-content p,
.help-page-content li {
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
}

.help-page-content ul {
  margin: 0 0 10px;
  padding-left: 20px;
}

.help-page-content .help-page-lead {
  margin: 0 0 12px;
  color: #475569;
}

.help-page-tutorial-cta {
  margin: 0 0 14px;
}

.help-page-tutorial-btn,
.help-page-inline-link {
  font: inherit;
  cursor: pointer;
  color: #1d4ed8;
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.help-page-tutorial-btn {
  display: inline-flex;
  text-decoration: none;
  padding: 0;
}

.help-page-tutorial-btn-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}

.help-page-tutorial-btn:hover .help-page-tutorial-btn-inner {
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
}

.help-page-inline-link:hover {
  color: #1e40af;
}

body.dark-mode .help-page-tutorial-btn-inner {
  background: linear-gradient(180deg, #1e3a5f 0%, #172554 100%);
  border-color: #3b82f6;
  color: #dbeafe;
}

body.dark-mode .help-page-inline-link {
  color: #93c5fd;
}

.help-page-toc {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.help-page-toc-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.help-page-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px 10px;
}

.help-page-toc-list li {
  margin: 0;
  padding: 0;
}

.help-page-toc-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.help-page-toc-link:hover {
  background: #eff6ff;
}

.help-page-toc-link-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  line-height: 1.3;
}

.help-page-toc-link-inner .help-page-icon {
  flex-shrink: 0;
}

.help-page-toc-link:hover .help-page-toc-link-inner {
  color: #1d4ed8;
}

.help-page-section {
  margin: 0 0 4px;
  padding-bottom: 4px;
}

.help-page-section-title {
  display: block;
  width: 100%;
  margin: 18px 0 10px;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.help-page-section-title[id] {
  scroll-margin-top: 10px;
}

.help-page-section-title-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  box-sizing: border-box;
  text-align: center;
}

.help-page-section-title-text {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.help-page-section-title-chip .help-page-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.help-page-icon {
  flex-shrink: 0;
  color: #1d4ed8;
}

.help-page-nav-grid li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.help-page-section--tips {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #fde68a;
  background: #fffbeb;
}

.help-page-section--tips .help-page-section-title {
  margin-top: 0;
}

.help-page-section--tips .help-page-section-title-chip {
  background: #fff;
  border-color: #fde68a;
}

.help-page-footnote {
  margin: 16px 0 0;
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
}

.help-page-content code {
  font-size: 12px;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
}

body.dark-mode .help-page-modal {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .help-page-modal-head,
body.dark-mode .help-page-modal-foot {
  border-color: #334155;
}

body.dark-mode .help-page-modal-title,
body.dark-mode .help-page-content h4 {
  color: #f1f5f9;
}

body.dark-mode .help-page-section-title {
  color: #f1f5f9;
}

body.dark-mode .help-page-section-title-chip {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .help-page-section-title-text {
  color: #f1f5f9;
}

body.dark-mode .help-page-toc-link:hover {
  background: #1e3a5f;
}

body.dark-mode .help-page-toc-link-inner {
  color: #cbd5e1;
}

body.dark-mode .help-page-toc-link:hover .help-page-toc-link-inner {
  color: #93c5fd;
}

body.dark-mode .help-page-section--tips .help-page-section-title-chip {
  background: #422006;
  border-color: #78350f;
}

body.dark-mode .help-page-toc {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .help-page-toc-list li {
  color: #cbd5e1;
}

body.dark-mode .help-page-icon {
  color: #93c5fd;
}

body.dark-mode .help-page-section--tips {
  background: #422006;
  border-color: #78350f;
}

body.dark-mode .help-page-footnote {
  color: #64748b;
}

body.dark-mode .help-page-content p,
body.dark-mode .help-page-content li,
body.dark-mode .help-page-content .help-page-lead {
  color: #cbd5e1;
}

body.dark-mode .help-page-content code {
  background: #0f172a;
  color: #93c5fd;
}

body.dark-mode .help-page-modal-close {
  background: #0f172a;
  color: #e2e8f0;
}

/* --- Pages légales (modale + liens) --- */
.legal-page-modal {
  width: min(94vw, 760px);
  max-height: min(90vh, 860px);
}

.legal-page-modal-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.legal-page-frame {
  display: block;
  width: 100%;
  min-height: min(72vh, 640px);
  border: none;
  background: #fff;
}

.legal-page-frame-fallback {
  margin: 0;
  padding: 10px 16px 14px;
  font-size: 12px;
  color: #64748b;
  border-top: 1px solid #e2e8f0;
}

.legal-inline-links,
.settings-legal-links,
.map-profile-legal-links,
.subscription-page-legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 2px;
  font-size: 13px;
}

.legal-inline-sep {
  color: #94a3b8;
  user-select: none;
}

.legal-link-btn {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  color: #2563eb;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-link-btn:hover {
  color: #1d4ed8;
}

.legal-link-btn--inline {
  display: inline;
  vertical-align: baseline;
}

.login-legal-row {
  margin: 8px 0 2px;
  width: 100%;
}

.login-legal-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
  width: 100%;
}

.login-legal-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: #2563eb;
}

.login-legal-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
  cursor: pointer;
  text-align: left;
  white-space: normal;
}

.login-legal-text .legal-link-btn--inline {
  display: inline;
  white-space: normal;
}

.login-google-legal {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: #64748b;
  text-align: center;
}

.settings-legal-card {
  margin-top: 12px;
}

.settings-legal-links {
  margin-top: 8px;
}

.map-profile-legal-links {
  margin: 10px 4px 0;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  justify-content: center;
}

.subscription-page-legal {
  text-align: center;
}

.subscription-page-legal-hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
}

.subscription-page-legal-links {
  justify-content: center;
}

body.dark-mode .login-legal-text,
body.dark-mode .login-google-legal,
body.dark-mode .subscription-page-legal-hint {
  color: #94a3b8;
}

body.dark-mode .legal-link-btn {
  color: #93c5fd;
}

body.dark-mode .map-profile-legal-links {
  border-top-color: #334155;
}

body.dark-mode .legal-page-frame-fallback {
  color: #94a3b8;
  border-top-color: #334155;
}

/* Console admin (support) */
.admin-console-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 8px;
}

.admin-console-section {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.admin-console-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.admin-console-section-head .settings-data-section-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.admin-console-section-head .admin-console-icon-btn {
  flex-shrink: 0;
}

.admin-console-search-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 8px;
}

.admin-console-search-row .admin-console-search-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.admin-console-icon-btn {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-console-icon-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.admin-console-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.admin-console-sub-host {
  margin-top: 8px;
}

.admin-console-onboarding-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.admin-console-status--error {
  color: #b91c1c !important;
}

.admin-console-user-card {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #dbe3ee;
}

.admin-console-user-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-console-user-uid {
  font-size: 11px;
  color: #64748b;
  font-family: ui-monospace, monospace;
}

.admin-console-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 16px;
  margin: 0;
}

.admin-console-dl > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-console-dl dt {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}

.admin-console-dl dd {
  margin: 0;
  font-size: 13px;
  color: #0f172a;
}

.admin-console-muted {
  color: #64748b;
  font-size: 12px;
}

.admin-console-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-console-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.admin-console-metric-card {
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.admin-console-metric-value {
  font-size: 22px;
  font-weight: 800;
  color: #1d4ed8;
  line-height: 1.1;
}

.admin-console-metric-label {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.25;
  color: #475569;
}

.admin-console-metric-hint {
  font-size: 10px;
  color: #94a3b8;
}

.admin-console-metrics-updated {
  margin: 0 0 4px;
}

.admin-console-beta-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
}

.admin-console-beta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-console-beta-table-wrap {
  overflow-x: auto;
  margin-top: 10px;
}

.admin-console-beta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.admin-console-beta-table th,
.admin-console-beta-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  white-space: nowrap;
}

.admin-console-beta-table th {
  background: #eef2ff;
  font-weight: 700;
  color: #334155;
}

.admin-console-link-btn {
  border: none;
  background: none;
  padding: 0;
  color: #1d4ed8;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.admin-console-log-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.admin-console-log-item {
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr minmax(80px, auto);
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  align-items: start;
}

.admin-console-log-date {
  color: #64748b;
  white-space: nowrap;
}

.admin-console-log-text {
  color: #0f172a;
}

.admin-console-log-admin {
  color: #94a3b8;
  font-size: 11px;
  text-align: right;
  word-break: break-all;
}

.admin-console-section--dashboard {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.admin-console-accordion {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}

.admin-console-accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
  user-select: none;
}

.admin-console-accordion-summary::-webkit-details-marker {
  display: none;
}

.admin-console-accordion-chevron {
  color: #64748b;
  font-size: 14px;
  transition: transform 0.15s ease;
}

.admin-console-accordion[open] .admin-console-accordion-chevron {
  transform: rotate(90deg);
}

.admin-console-accordion-body {
  padding: 0 14px 14px;
  border-top: 1px solid #e2e8f0;
}

.admin-console-section-head--inner {
  margin-top: 10px;
  margin-bottom: 0;
}

.admin-console-section-head--inner .settings-data-hint {
  margin: 0;
  flex: 1 1 auto;
}

.admin-console-charts-host {
  margin-top: 12px;
}

.admin-console-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.admin-console-chart {
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.admin-console-chart-title {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-console-chart-row {
  display: grid;
  grid-template-columns: minmax(88px, 34%) 1fr minmax(28px, auto);
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.admin-console-chart-row:last-child {
  margin-bottom: 0;
}

.admin-console-chart-label {
  font-size: 11px;
  color: #334155;
  line-height: 1.2;
}

.admin-console-chart-track {
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.admin-console-chart-bar {
  height: 100%;
  border-radius: 999px;
  min-width: 4px;
}

.admin-console-chart-value {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  text-align: right;
}

.admin-console-warnings {
  margin: 0 0 10px;
  padding: 8px 10px 8px 28px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 12px;
  line-height: 1.35;
}

.admin-console-subhint {
  margin-top: 4px;
}

.admin-console-status--ok {
  color: #166534 !important;
}

.admin-console-guide {
  margin: 10px 0 14px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
  overflow: hidden;
}

.admin-console-guide-summary {
  cursor: pointer;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #1e40af;
  list-style: none;
}

.admin-console-guide-summary::-webkit-details-marker {
  display: none;
}

.admin-console-guide-body {
  padding: 0 14px 14px;
  font-size: 13px;
  color: #334155;
  line-height: 1.45;
}

.admin-console-guide-block + .admin-console-guide-block {
  margin-top: 12px;
}

.admin-console-guide-block h6 {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.admin-console-guide-block ul {
  margin: 0;
  padding-left: 18px;
}

.admin-console-guide-block li + li {
  margin-top: 6px;
}

.admin-console-guide-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: #64748b;
}

.admin-console-metrics-section {
  margin-top: 14px;
}

.admin-console-metrics-section-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.admin-user-card {
  margin-top: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #dbe3ee;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.admin-user-card-header {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  border-bottom: 1px solid #e2e8f0;
}

.admin-user-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  color: #312e81;
  background: #fff;
  border: 1px solid #c7d2fe;
  flex-shrink: 0;
}

.admin-user-header-main {
  min-width: 0;
  flex: 1;
}

.admin-user-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-user-title {
  margin: 0;
  font-size: 20px;
  color: #0f172a;
}

.admin-user-plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-user-plan-badge--pro {
  background: #dcfce7;
  color: #166534;
}

.admin-user-plan-badge--beta {
  background: #ede9fe;
  color: #6d28d9;
}

.admin-user-plan-badge--default {
  background: #e2e8f0;
  color: #475569;
}

.admin-user-email {
  margin: 4px 0 0;
  font-size: 14px;
  color: #334155;
}

.admin-user-uid {
  margin: 4px 0 0;
  font-size: 11px;
  color: #64748b;
  font-family: ui-monospace, monospace;
  word-break: break-all;
}

.admin-user-alerts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 18px 0;
}

.admin-user-alert {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.admin-user-alert--warn {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.admin-user-alert--danger {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.admin-user-alert--info {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.admin-user-alert-title {
  font-size: 13px;
  font-weight: 700;
}

.admin-user-alert-detail {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
}

.admin-user-alert .settings-data-btn {
  margin-top: 8px;
}

.admin-user-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  padding: 14px 18px 18px;
}

.admin-user-section {
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.admin-user-section--muted {
  background: #fff;
}

.admin-user-section-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.admin-user-kv {
  display: grid;
  gap: 8px;
  margin: 0;
}

.admin-user-kv > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  align-items: baseline;
}

.admin-user-kv dt {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

.admin-user-kv dd {
  margin: 0;
  font-size: 13px;
  color: #0f172a;
}

.admin-user-kv--compact > div {
  grid-template-columns: 120px 1fr;
}

.admin-user-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
}

.admin-user-quota {
  margin-bottom: 10px;
}

.admin-user-quota-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}

.admin-user-quota-track {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.admin-user-quota-fill {
  height: 100%;
  border-radius: 999px;
  background: #22c55e;
}

.admin-user-quota--warn .admin-user-quota-fill {
  background: #f59e0b;
}

.admin-user-quota--danger .admin-user-quota-fill {
  background: #ef4444;
}

.admin-user-quota--unlimited {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.admin-user-invite-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-user-invite-stat {
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.admin-user-invite-value {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.admin-user-invite-label {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.admin-user-invite-sub {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
}

.admin-user-invite-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
}

.admin-user-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 16px;
  border-top: 1px solid #e2e8f0;
  background: #fafafa;
}

.admin-user-card-actions .settings-data-btn {
  margin-top: 12px;
}

.admin-console-directory-block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #cbd5e1;
}

.admin-console-match-list {
  margin: 10px 0;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #dbe3ee;
}

.admin-console-match-items {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-console-match-btn {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
}

.admin-console-match-btn:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.admin-console-directory-table td:nth-child(2) {
  white-space: normal;
  max-width: 220px;
  word-break: break-word;
}

body.dark-mode .admin-console-section {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .admin-console-user-card,
body.dark-mode .admin-user-card,
body.dark-mode .admin-console-metric-card,
body.dark-mode .admin-console-log-item,
body.dark-mode .admin-console-beta-table {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .admin-console-dl dd,
body.dark-mode .admin-console-log-text {
  color: #e2e8f0;
}

body.dark-mode .admin-console-beta-table th {
  background: #1e3a8a;
  color: #bfdbfe;
}

body.dark-mode .admin-console-icon-btn {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}

body.dark-mode .admin-console-icon-btn:hover {
  background: #334155;
}

body.dark-mode .admin-console-onboarding-footer {
  border-color: #334155;
}

body.dark-mode .admin-console-metric-value {
  color: #93c5fd;
}

body.dark-mode #adminConsoleView {
  background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.16), transparent 28%), linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
}

body.dark-mode #subscriptionView {
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 32%), linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

body.dark-mode .subscription-page-header {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.88) 78%, rgba(15, 23, 42, 0) 100%);
}

body.dark-mode .subscription-page-title {
  color: #f1f5f9;
}

body.dark-mode .subscription-page-subtitle {
  color: #94a3b8;
}

body.dark-mode .subscription-page-section {
  background: #1e293b;
  border-color: #334155;
  box-shadow: none;
}

body.dark-mode .subscription-page-section-title,
body.dark-mode .subscription-page-plan-name,
body.dark-mode .subscription-page-plan-price-main,
body.dark-mode .subscription-page-trust-card h4 {
  color: #f1f5f9;
}

body.dark-mode .subscription-page-section-hint,
body.dark-mode .subscription-page-plan-tagline,
body.dark-mode .subscription-page-plan-price-sub,
body.dark-mode .subscription-page-plan-bullets li,
body.dark-mode .subscription-page-trust-card p,
body.dark-mode .subscription-page-footnote {
  color: #94a3b8;
}

body.dark-mode .subscription-page-plan-card {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .subscription-page-plan-card--highlight {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.18) 0%, #0f172a 100%);
  border-color: #2563eb;
}

body.dark-mode .subscription-page-plan-card--current {
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.16) 0%, #0f172a 100%);
  border-color: #16a34a;
}

body.dark-mode .subscription-page-table-wrap {
  border-color: #334155;
}

body.dark-mode .subscription-page-table th,
body.dark-mode .subscription-page-table td {
  border-color: #334155;
}

body.dark-mode .subscription-page-table thead th {
  background: #0f172a;
  color: #e2e8f0;
}

body.dark-mode .subscription-page-table tbody th {
  background: #1e293b;
  color: #cbd5e1;
}

body.dark-mode .subscription-page-table thead th:first-child,
body.dark-mode .subscription-page-table tbody th:first-child {
  box-shadow: 1px 0 0 #334155;
}

body.dark-mode .subscription-page-col--current {
  background: rgba(37, 99, 235, 0.16);
}

body.dark-mode .subscription-page-trust-card {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .subscription-page-trust-icon {
  background: rgba(37, 99, 235, 0.22);
}

body.dark-mode .subscription-page-soon-banner,
body.dark-mode .subscription-page-plan-promo {
  background: rgba(154, 52, 18, 0.2);
  border-color: #c2410c;
  color: #fdba74;
}

body.dark-mode .subscription-donation-card {
  background: linear-gradient(135deg, rgba(154, 52, 18, 0.18) 0%, #1e293b 70%);
  border-color: #c2410c;
}
body.dark-mode .subscription-donation-btn {
  background: #0f172a;
  border-color: #c2410c;
}
body.dark-mode .subscription-donation-label,
body.dark-mode .subscription-donation-thanks {
  color: #fdba74;
}
body.dark-mode .subscription-donation-amount,
body.dark-mode .subscription-donation-custom {
  color: #fb923c;
}

body.dark-mode #subscriptionView .subscription-card,
body.dark-mode #subscriptionView .settings-card {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode #subscriptionView .subscription-usage-item {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode #subscriptionView .subscription-usage-value {
  color: #f1f5f9;
}

body.dark-mode #subscriptionView .subscription-plan-badge {
  background: rgba(37, 99, 235, 0.22);
  color: #93c5fd;
}

body.dark-mode #subscriptionView .subscription-status-pill {
  background: rgba(22, 163, 74, 0.18);
  color: #86efac;
}

body.dark-mode #subscriptionView .subscription-trial-card {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode #subscriptionView .subscription-launch-promo {
  background: rgba(37, 99, 235, 0.14);
  border-color: #2563eb;
}

body.dark-mode .admin-console-header {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.88) 78%, rgba(15, 23, 42, 0) 100%);
}

body.dark-mode .admin-console-title {
  color: #f1f5f9;
}

body.dark-mode .admin-console-subtitle {
  color: #94a3b8;
}

body.dark-mode .admin-console-section--dashboard {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

body.dark-mode .admin-console-accordion {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .admin-console-accordion-summary {
  color: #f1f5f9;
}

body.dark-mode .admin-console-accordion-body {
  border-color: #334155;
}

body.dark-mode .admin-console-chart {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .admin-console-chart-title,
body.dark-mode .admin-console-chart-label {
  color: #cbd5e1;
}

body.dark-mode .admin-console-chart-track {
  background: #334155;
}

body.dark-mode .admin-console-chart-value {
  color: #f1f5f9;
}

body.dark-mode .admin-console-warnings {
  background: rgba(154, 52, 18, 0.2);
  border-color: #c2410c;
  color: #fdba74;
}

body.dark-mode .admin-console-directory-block {
  border-color: #475569;
}

body.dark-mode .admin-console-match-list,
body.dark-mode .admin-console-match-btn {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .admin-console-match-btn:hover {
  background: #334155;
}

/* ==========================================================================
   MODE NUIT — correctifs sidebar, fiches spot, carte, menu +
   ========================================================================== */
body.dark-mode #sidebar #notesList .note-card,
body.dark-mode #sidebar #allNotesList .note-card,
body.dark-mode #notesList .note-card {
  background: #172033 !important;
  border-color: #334155 !important;
  box-shadow: none !important;
}

body.dark-mode #sidebar #notesList .note-card:hover,
body.dark-mode #notesList .note-card:hover {
  background: #1e293b !important;
  border-color: #475569 !important;
}

body.dark-mode #listContent .list-item,
body.dark-mode #sidebar #listContent .list-item {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: none !important;
}

body.dark-mode #listContent .list-item:hover,
body.dark-mode #sidebar #listContent .list-item:hover {
  background: #243044 !important;
  border-color: #475569 !important;
}

body.dark-mode .edit-sheet-footer-sticky {
  background: #1c2a3a;
  border-top-color: #334155;
}

body.dark-mode #formBox #formTitle,
body.dark-mode #formBox .field-label,
body.dark-mode #formBox .spot-form-label,
body.dark-mode #agendaEventPanel .field-label,
body.dark-mode .edit-sheet-title {
  color: #94a3b8;
}

body.dark-mode #formBox .cat-pill,
body.dark-mode #agendaEventPanel .cat-pill,
body.dark-mode .cat-pill {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode #formBox .cat-pill:hover,
body.dark-mode #agendaEventPanel .cat-pill:hover,
body.dark-mode .cat-pill:hover {
  background: #243044;
  border-color: #475569;
}

body.dark-mode #formBox .cat-pill.active,
body.dark-mode #agendaEventPanel .cat-pill.active,
body.dark-mode .cat-pill.active {
  border-color: #60a5fa;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #f8fafc;
}

body.dark-mode #formBox .spot-form-tag-add-btn,
body.dark-mode .agenda-tag-add-btn {
  background: linear-gradient(180deg, #1e3a8a 0%, #1d4ed8 100%);
  border-color: #3b82f6;
  color: #eff6ff;
  box-shadow: none;
}

body.dark-mode #formBox .spot-form-tag-add-btn:hover,
body.dark-mode .agenda-tag-add-btn:hover {
  background: linear-gradient(180deg, #2563eb 0%, #1e40af 100%);
  border-color: #60a5fa;
}

body.dark-mode .spot-form-tag-add-btn--agenda {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
  box-shadow: none;
}

body.dark-mode .spot-form-tag-add-btn--agenda:hover {
  background: #1e293b;
  border-color: #475569;
  color: #f8fafc;
}

body.dark-mode .spot-photo-add-btn,
body.dark-mode .spot-photo-action {
  background: #273449;
  color: #e2e8f0;
}

body.dark-mode .spot-photo-action.nav-btn--edit {
  background: #92400e;
  color: #fff;
}

body.dark-mode #plusBtn {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

body.dark-mode #addMenu {
  background: #111827;
  border: 1px solid #334155;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

body.dark-mode .add-menu-title,
body.dark-mode .add-menu-section-title,
body.dark-mode .temporary-point-row strong {
  color: #e2e8f0;
}

body.dark-mode .add-menu-section-desc,
body.dark-mode .add-menu-hint,
body.dark-mode .add-menu-status,
body.dark-mode .temporary-point-row-meta {
  color: #94a3b8;
}

body.dark-mode .add-menu-close,
body.dark-mode .add-menu-accordion-btn,
body.dark-mode .add-menu-locate-btn,
body.dark-mode .temporary-point-row {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .add-menu-accordion-btn.active {
  background: #172554;
  border-color: #3b82f6;
  color: #bfdbfe;
}

body.dark-mode .leaflet-popup-content-wrapper,
body.dark-mode .spot-leaflet-popup .leaflet-popup-content-wrapper {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

body.dark-mode .leaflet-popup-tip {
  background: #1e293b;
}

body.dark-mode .leaflet-popup-close-button {
  color: #cbd5e1 !important;
}

body.dark-mode .spot-popup-title {
  color: #f1f5f9;
}

body.dark-mode .spot-popup-head-btn {
  background: #273449;
  color: #e2e8f0;
}

body.dark-mode .spot-popup-nav-btn.nav-btn--google {
  background: #273449;
  border-color: #334155;
}

body.dark-mode .spot-popup-nav-btn.nav-btn--coords {
  background: #334155;
  color: #f8fafc;
}

body.dark-mode #formBox hr {
  border-top-color: #334155;
}

body.dark-mode .edit-sheet-footer {
  border-top-color: #334155;
}

body.dark-mode .agenda-form-scroll .field-label {
  color: #94a3b8;
}

body.dark-mode .settings-close,
body.dark-mode .roadtrip-modal-close,
body.dark-mode .agenda-close {
  background: #273449;
  color: #e2e8f0;
}

body.dark-mode .list-item-photo,
body.dark-mode .list-item-photo-placeholder {
  background: #0f172a !important;
  color: #64748b !important;
  box-shadow: inset 0 0 0 1px #334155 !important;
}

body.dark-mode .list-item-name,
body.dark-mode .list-item-name-text {
  color: #f8fafc !important;
}

body.dark-mode .list-item-status--todo {
  background: #422006 !important;
  color: #fcd34d !important;
}

body.dark-mode .list-item-status--check {
  background: #1e3a5f !important;
  color: #93c5fd !important;
}

body.dark-mode .list-item-status--done {
  background: #14532d !important;
  color: #86efac !important;
}

body.dark-mode .list-item-status--verified {
  background: #172554 !important;
  color: #bfdbfe !important;
}

body.dark-mode .spot-tag-chip {
  background: #172554;
  border-color: #3b82f6;
  color: #bfdbfe;
}

body.dark-mode .chip-remove-btn,
body.dark-mode .agenda-tag-pill-remove,
body.dark-mode .spot-tag-chip-remove,
body.dark-mode .done-date-remove-btn {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

body.dark-mode .chip-remove-btn:hover,
body.dark-mode .agenda-tag-pill-remove:hover,
body.dark-mode .spot-tag-chip-remove:hover,
body.dark-mode .done-date-remove-btn:hover {
  background: #450a0a;
  border-color: #b91c1c;
  color: #fecaca;
}

body.dark-mode .spot-map-select-row {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .spot-map-select-row:hover {
  background: #243044;
  border-color: #475569;
}

body.dark-mode .spot-map-select-row.is-active {
  background: linear-gradient(180deg, #1e3a8a 0%, #172554 100%);
  border-color: #60a5fa;
  color: #eff6ff;
}

body.dark-mode .add-menu-section--spot {
  background: linear-gradient(180deg, #172554 0%, #1e293b 100%);
  border-color: #334155;
}

body.dark-mode .add-menu-section--temp {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .add-menu-section-icon--spot {
  background: #1e3a8a;
}

body.dark-mode .add-menu-section-icon--temp {
  background: #422006;
}

body.dark-mode .temp-marker-glyph {
  color: #fdba74;
}

body.dark-mode #geoBtn {
  background: #1e293b;
  border: 1px solid #334155;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

body.dark-mode #geoBtn .geo-btn-icon ellipse {
  stroke: #60a5fa;
}

body.dark-mode #geoBtn .geo-btn-icon path {
  fill: #fbbf24;
}

/* =====================================================================
   UI POLISH — fiche spot (popup) + boutons flottants (build 202606174)
   Améliore le rendu visuel sans changer la structure ni le comportement.
   ===================================================================== */

/* --- Carte de la fiche spot (popup Leaflet) --- */
.spot-leaflet-popup .leaflet-popup-content-wrapper {
  border-radius: 16px;
  padding: 4px 2px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22), 0 2px 8px rgba(15, 23, 42, 0.12);
}
body:not(.dark-mode) .spot-leaflet-popup .leaflet-popup-content-wrapper {
  background: #ffffff;
  border: 1px solid #e8edf5;
}
.spot-leaflet-popup .leaflet-popup-content {
  margin: 12px 14px;
}
.spot-leaflet-popup .leaflet-popup-close-button {
  width: 26px;
  height: 26px;
  top: 7px;
  right: 7px;
  font-size: 18px;
  line-height: 24px;
  border-radius: 50%;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
body:not(.dark-mode) .spot-leaflet-popup .leaflet-popup-close-button {
  background: rgba(248, 250, 252, 0.92);
  color: #475569;
}
.spot-leaflet-popup .leaflet-popup-close-button:hover {
  background: #eef2ff;
  transform: scale(1.08);
}

/* Titre + boutons : micro-interactions */
.spot-popup-title {
  letter-spacing: -0.01em;
}
.spot-popup-head-btn,
.spot-popup-nav-btn {
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, filter 0.15s ease;
}
.spot-popup-head-btn:hover,
.spot-popup-nav-btn:hover {
  transform: translateY(-1px);
}
.spot-popup-head-btn:active,
.spot-popup-nav-btn:active {
  transform: translateY(0) scale(0.96);
}
.spot-popup-nav-btn {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.spot-popup-nav-btn.nav-btn--edit {
  box-shadow: 0 2px 6px rgba(255, 152, 0, 0.35);
}

/* --- Boutons flottants (localiser / ajouter) --- */
#plusBtn,
#geoBtn {
  transition: transform 0.14s ease, box-shadow 0.18s ease, filter 0.14s ease;
}
#plusBtn {
  background: linear-gradient(145deg, #2f8bff 0%, #0066ee 100%);
  box-shadow: 0 8px 22px rgba(0, 102, 238, 0.42), 0 2px 6px rgba(15, 23, 42, 0.2);
}
#geoBtn {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.32);
}
#plusBtn:hover,
#geoBtn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}
#plusBtn:active,
#geoBtn:active {
  transform: scale(0.93);
}

/* =====================================================================
   FICHE SPOT — carte en bas d'écran (remplace le popup) build 202606175
   ===================================================================== */
.spot-bottom-card {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 6000;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transform: translateY(115%);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  visibility: hidden;
}
.spot-bottom-card[hidden],
.spot-bottom-card:not(.open) {
  visibility: hidden !important;
  pointer-events: none !important;
}
.spot-bottom-card.open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: none;
}
.spot-bottom-card-body {
  pointer-events: auto;
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e8edf5;
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 44px rgba(15, 23, 42, 0.26);
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
}
.spot-bottom-card.expanded .spot-bottom-card-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 760px) {
  .spot-bottom-card {
    justify-content: flex-start;
    padding: 0 0 18px 18px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }
  .spot-bottom-card-body {
    max-width: 420px;
    border-radius: 20px;
    border-bottom: 1px solid #e8edf5;
  }
}

.sbc-grip {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #cbd5e1;
  margin: 0 auto 10px;
}
.sbc-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: background 0.15s ease, transform 0.12s ease;
}
.sbc-close:hover {
  background: #e2e8f0;
  transform: scale(1.08);
}

.sbc-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding-right: 30px;
}
.sbc-photo {
  width: 74px;
  height: 74px;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sbc-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sbc-photo-placeholder {
  font-size: 26px;
  opacity: 0.6;
}
.sbc-info {
  min-width: 0;
  flex: 1;
}
.sbc-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 5px;
}
.sbc-name {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sbc-star {
  color: #fbc02d;
}
.sbc-cats,
.sbc-distance {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
}
.sbc-cats {
  font-size: 12px;
  color: #64748b;
}
.sbc-distance {
  font-size: 12px;
  color: #2563eb;
  font-weight: 600;
}
.sbc-chevron {
  flex-shrink: 0;
  align-self: center;
  font-size: 28px;
  color: #cbd5e1;
  line-height: 1;
}

.sbc-fullhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.sbc-back {
  border: none;
  background: transparent;
  color: #2563eb;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 2px;
}
.sbc-close--full {
  position: static;
}
.sbc-fullbody .spot-popup {
  min-width: 0 !important;
  max-width: none !important;
}

body.dark-mode .spot-bottom-card-body {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 -12px 44px rgba(0, 0, 0, 0.5);
}
body.dark-mode .sbc-grip {
  background: #475569;
}
body.dark-mode .sbc-close {
  background: #273449;
  color: #cbd5e1;
}
body.dark-mode .sbc-close:hover {
  background: #334155;
}
body.dark-mode .sbc-name {
  color: #f1f5f9;
}
body.dark-mode .sbc-cats {
  color: #94a3b8;
}
body.dark-mode .sbc-distance {
  color: #60a5fa;
}
body.dark-mode .sbc-photo {
  background: #0f172a;
}

/* =====================================================================
   CHROME CARTE — barre haut, menu bas, contrôles droite (build 202606176)
   ===================================================================== */
.map-top-bar {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.map-search-row {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}
.map-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 6px 10px;
  min-height: 40px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}
.map-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  flex-shrink: 0;
}
.map-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: #0f172a;
}
.map-search-input::-webkit-search-cancel-button {
  display: none;
}
.map-search-clear {
  display: none;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
}
.map-search-clear.show {
  display: block;
}
.map-filter-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--brand-navy-border);
  border-radius: 12px;
  background: var(--brand-navy-solid);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--brand-navy-shadow);
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.map-filter-btn-icon {
  display: block;
  color: #fff;
}
.map-filter-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.map-filter-btn:active {
  transform: scale(0.95);
}
.map-filter-btn.active,
.map-filter-btn.has-active-filters {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(15, 23, 42, 0.45), 0 6px 18px rgba(15, 23, 42, 0.35);
}

.map-view-toggle {
  pointer-events: auto;
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 3px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}
.map-view-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 34px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.map-view-toggle-btn:first-child {
  border-radius: 999px 0 0 999px;
}
.map-view-toggle-btn:last-child {
  border-radius: 0 999px 999px 0;
}
.map-view-toggle-btn + .map-view-toggle-btn {
  border-left: 1px solid #e2e8f0;
}
.map-view-toggle-btn.is-active {
  background: var(--brand-navy-solid);
  color: #ffffff;
}
.map-view-toggle-btn.is-active + .map-view-toggle-btn {
  border-left-color: rgba(255, 255, 255, 0.12);
}
.map-view-toggle-btn:not(.is-active) + .map-view-toggle-btn.is-active {
  border-left-color: transparent;
}
.map-view-toggle-btn:hover:not(.is-active) {
  background: #f8fafc;
  color: #334155;
}

/* Contrôles droite (cartes + géoloc, au-dessus du menu bas) */
.map-right-controls {
  position: fixed;
  right: 12px;
  bottom: var(--map-float-bottom);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: bottom 0.2s ease;
}

body.road-trip-chip-visible .map-right-controls {
  bottom: var(--map-float-bottom-chip);
}

body.road-trip-chip-visible.road-trip-chip-menu-open .map-right-controls {
  bottom: var(--map-float-bottom-chip-open);
}
.map-float-square {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.map-float-square:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22);
}
.map-float-square:active {
  transform: scale(0.94);
}

/* Menu bas */
.map-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6100;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, #ffffff 100%);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
}
.map-bottom-nav-item {
  border: none;
  background: transparent;
  color: #64748b;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  max-width: 62px;
  padding: 4px 1px;
  cursor: pointer;
  min-height: 48px;
  border-radius: 12px;
  transition: color 0.15s ease, background 0.15s ease;
}
.map-bottom-nav-item[hidden] {
  display: none !important;
  flex: 0 0 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
}
.map-bottom-nav-item.active {
  color: #2563eb;
}
.map-bottom-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  line-height: 1;
}
.map-bottom-nav-add-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ui-icon {
  display: block;
  flex-shrink: 0;
}
.ui-icon-host {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}
.map-bottom-nav-item.active .ui-icon {
  color: currentColor;
}
.map-bottom-nav-label {
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.1;
}
.map-bottom-nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  overflow: hidden;
}
.map-bottom-nav-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.map-bottom-nav-add {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  margin-top: -18px;
  border: 1px solid var(--brand-navy-border);
  border-radius: 50%;
  background: var(--brand-navy-solid);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--brand-navy-shadow-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s ease, box-shadow 0.18s ease, filter 0.14s ease;
}
.map-bottom-nav-add:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}
.map-bottom-nav-add:active {
  transform: scale(0.93);
}

/* Pilule road trip — au-dessus du menu bas, menu vers le haut */
.road-trip-bottom-chip {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(60px + 8px + env(safe-area-inset-bottom, 0px));
  z-index: 6095;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(calc(100vw - 20px), 400px);
  pointer-events: none;
}
.road-trip-bottom-chip:not([hidden]) {
  pointer-events: auto;
}
.road-trip-bottom-chip[hidden] {
  display: none !important;
}
.road-trip-bottom-chip-row {
  display: flex;
  align-items: stretch;
  gap: 4px;
  background: rgba(15, 23, 42, 0.94);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22);
}
.road-trip-bottom-chip-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
}
.road-trip-bottom-chip-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  text-align: left;
}
.road-trip-bottom-chip-label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.road-trip-bottom-chip-arrow {
  font-size: 11px;
  opacity: 0.85;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.road-trip-bottom-chip.is-open .road-trip-bottom-chip-arrow {
  transform: rotate(180deg);
}
.road-trip-bottom-chip-exit {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.road-trip-bottom-chip-exit:hover {
  background: rgba(255, 255, 255, 0.2);
}
.road-trip-bottom-chip-menu {
  order: -1;
  margin-bottom: 8px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.18);
  border: 1px solid #e2e8f0;
}
.road-trip-bottom-chip-menu[hidden],
.road-trip-bottom-chip:not(.is-open) .road-trip-bottom-chip-menu {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  border: none !important;
  box-shadow: none !important;
  overflow: hidden !important;
  visibility: hidden !important;
}
.road-trip-bottom-chip-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  border: none;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
}

.road-trip-bottom-chip-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex-shrink: 0;
}

.roadtrip-map-loading {
  position: fixed;
  inset: 0;
  z-index: 12050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.list-spots-count-title {
  display: none;
  margin: 0 0 8px;
  padding: 0 2px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

body.map-spots-list-sheet-open .list-spots-count-title {
  display: block;
}

body.dark-mode .list-spots-count-title {
  color: #e2e8f0;
}

.roadtrip-map-loading.open {
  opacity: 1;
  pointer-events: none;
}

.roadtrip-map-loading.open .roadtrip-map-loading__core,
.roadtrip-map-loading.open .roadtrip-map-loading__label {
  pointer-events: auto;
}

body.roadtrip-map-loading-open .road-trip-bottom-chip {
  z-index: 12060;
}

body.roadtrip-map-loading-open {
  overflow: hidden;
}

.roadtrip-map-loading__core {
  position: relative;
  width: 88px;
  height: 88px;
}

.roadtrip-map-loading__pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  margin-left: -15px;
  margin-top: -15px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.roadtrip-map-loading__pin::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
}

.roadtrip-map-loading__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 2px dashed rgba(37, 99, 235, 0.7);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.roadtrip-map-loading__ring--a {
  width: 52px;
  height: 52px;
  animation: roadtripSpin 1.2s linear infinite;
}

.roadtrip-map-loading__ring--b {
  width: 70px;
  height: 70px;
  border-color: rgba(59, 130, 246, 0.45);
  animation: roadtripSpin 1.7s linear infinite reverse;
}

.roadtrip-map-loading__ring--c {
  width: 88px;
  height: 88px;
  border-color: rgba(96, 165, 250, 0.3);
  animation: roadtripSpin 2.4s linear infinite;
}

.roadtrip-map-loading__label {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

@keyframes roadtripSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
.road-trip-bottom-chip-menu-item:hover {
  background: #f8fafc;
}
.road-trip-bottom-chip-menu-item + .road-trip-bottom-chip-menu-item {
  border-top: 1px solid #eef2f7;
}
body.road-trip-chip-visible .spot-bottom-card {
  bottom: calc(118px + env(safe-area-inset-bottom, 0px));
}
body.friend-view-chip-visible .spot-bottom-card {
  bottom: calc(118px + env(safe-area-inset-bottom, 0px));
}
body.dark-mode .friend-view-chip-menu,
body.dark-mode .friend-view-chip-menu-item {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
body.dark-mode .friend-view-chip-menu-item:hover {
  background: #1e293b;
}
body.dark-mode .friend-view-chip-menu-item + .friend-view-chip-menu-item {
  border-top-color: #334155;
}
body.dark-mode .road-trip-bottom-chip-menu,
body.dark-mode .road-trip-bottom-chip-menu-item {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
body.dark-mode .road-trip-bottom-chip-menu-item:hover {
  background: #1e293b;
}
body.dark-mode .road-trip-bottom-chip-menu-item + .road-trip-bottom-chip-menu-item {
  border-top-color: #334155;
}

/* Sheets (panneaux) */
.map-sheet[hidden] {
  display: none !important;
}
.map-sheet {
  position: fixed;
  inset: 0;
  z-index: 7000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.map-sheet.open {
  opacity: 1;
  pointer-events: auto;
}
.map-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.map-sheet-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: min(78vh, 640px);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.22);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.map-sheet.open .map-sheet-panel {
  transform: translateY(0);
}
.map-sheet-panel--compact {
  max-height: min(62vh, 480px);
}
.map-sheet-panel--layers {
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.map-sheet-panel--spots-list {
  max-height: min(82vh, 720px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

/* Liste spots — plein écran sous la barre haut (Carte | Liste) */
.map-spots-list-fullscreen {
  z-index: 5000;
  align-items: stretch;
  justify-content: stretch;
  background: transparent;
}
.map-spots-list-fullscreen.open {
  pointer-events: none;
}
.map-spots-list-fullscreen .map-spots-list-panel {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: 0;
  transform: none !important;
  box-shadow: none;
  padding: 0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  min-height: 0;
  pointer-events: auto;
  overflow: hidden;
}
body.map-spots-list-sheet-open #mapTopBar {
  z-index: 6050;
}
body.map-spots-list-sheet-open #map {
  visibility: hidden !important;
  pointer-events: none !important;
}
.map-spots-list-count-bar {
  flex-shrink: 0;
  padding: 10px 14px 8px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}
.map-spots-list-count-bar[hidden] {
  display: none !important;
}
.map-spots-list-count-label {
  display: block;
}
body.dark-mode .map-spots-list-count-bar {
  background: #111827;
  border-bottom-color: #334155;
  color: #e2e8f0;
}
body.map-spots-list-sheet-open #listFilterSummary,
body.map-spots-list-sheet-open .list-search-row {
  display: none !important;
}
body.map-spots-list-sheet-open .map-spots-list-host #listControls {
  padding: 8px 12px 0;
  gap: 6px;
}
body.map-spots-list-sheet-open .map-spots-list-host #listPanel {
  height: 100%;
}
body.map-spots-list-sheet-open .map-spots-list-host #listContent {
  padding: 0 12px 12px;
}
body.dark-mode .map-spots-list-fullscreen .map-spots-list-panel {
  background: #0b1220;
}

.map-spots-list-host {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.map-spots-list-host #listPanel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.map-spots-list-host #listContent {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.map-layers-markers-host .settings-display-body--markers {
  padding: 0;
}
.map-layers-markers-host .settings-card {
  margin-bottom: 10px;
}
.map-layers-markers-host .settings-card:last-child {
  margin-bottom: 0;
}
.map-layers-sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 2px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.map-layers-sheet-body .settings-section-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #dfe7f0;
  border-radius: 14px;
  background: #fff;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.map-layers-sheet-body .settings-section-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.map-layers-section + .map-layers-section {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.map-layers-section--visible-maps .map-layers-collapsible-body,
.map-layers-section--collapsible .map-layers-collapsible-body {
  padding: 0 2px;
}
.map-layers-section-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.map-layers-manage-host .settings-manager-head,
.map-layers-manage-host .settings-manager-actions {
  display: none !important;
}
.map-layers-manage-host .settingsMapsPanel,
.map-layers-manage-host #settingsMapsPanel {
  display: block !important;
}
.map-layers-manage-host .settings-manager-panel,
#mapLayersMapsManageHost .settings-manager-panel {
  position: static;
  display: block !important;
  box-shadow: none;
  border: none;
  border-radius: 0;
  background: transparent;
  max-height: none;
  overflow: visible;
}
.map-layers-manage-host .settings-manager-body {
  padding: 0;
}
.map-layers-display-quick-host {
  margin-top: 12px;
}
.map-layers-display-quick-host .settings-display-body--quick {
  padding: 0;
}
.map-layers-display-quick-host .settings-card {
  margin-bottom: 10px;
}
.map-layers-display-quick-host .settings-card:last-child {
  margin-bottom: 0;
}
.settings-card-hint {
  margin: 4px 0 10px;
}
.marker-shape-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.marker-shape-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 6px 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.marker-shape-option:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.marker-shape-option.is-active {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}
.marker-shape-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}
.marker-shape-preview svg {
  display: block;
  max-width: 100%;
  max-height: 100%;
}
.marker-shape-name {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  text-align: center;
  line-height: 1.2;
}
.marker-icon-style-row {
  display: flex;
  gap: 8px;
}
.marker-icon-style-btn {
  flex: 1;
  min-height: 40px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.marker-icon-style-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.marker-icon-style-btn.is-active {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #1d4ed8;
}
.category-marker-icon-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.cat-icon-preview-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.cat-icon-preview-label {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-icon-preview-styles {
  display: flex;
  gap: 8px;
}
.cat-icon-preview-marker {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: 999px;
  background: var(--cat-color, #f59e0b);
  box-shadow: inset 0 0 0 2px rgba(30, 74, 122, 0.85);
}
.cat-icon-preview-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}
.cat-icon-preview-style-tag {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 1px 5px;
  white-space: nowrap;
}

.cat-pill-color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.cat-pill-with-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.settings-field-label-spaced {
  margin-top: 12px;
}

.settings-category-add-btn {
  margin-top: 10px;
}

.settings-color-swatch {
  -webkit-appearance: none;
  appearance: none;
  width: 42px;
  height: 42px;
  padding: 3px;
  border: 1px solid #dfe7f0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.settings-color-swatch::-webkit-color-swatch-wrapper {
  padding: 0;
}

.settings-color-swatch::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.settings-color-swatch::-moz-color-swatch {
  border: none;
  border-radius: 6px;
}

.settings-manager-row-main {
  flex: 1;
  min-width: 0;
}

.settings-manager-row-main--edit .form-control {
  width: 100%;
  padding: 8px 10px;
}

.settings-manager-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #333;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-manager-row-count {
  color: #94a3b8;
  font-weight: 500;
}

.settings-manager-row-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  white-space: normal;
}

.settings-manager-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.category-maps-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  align-items: stretch;
}

.category-maps-pills-row--edit {
  margin-top: 8px;
}

.category-maps-pills-row .category-map-pill {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  justify-content: center;
}

.category-map-pill-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.category-map-pill-label > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-map-pill-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: #64748b;
}

.category-map-pill-icon .ui-icon {
  color: #64748b;
}

.spot-marker-icon-picker-scroll {
  margin-top: 6px;
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.spot-marker-icon-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
  margin-top: 0;
  max-height: none;
  overflow: visible;
  padding: 0;
}

.marker-icon-pick-btn {
  border: none;
  background: transparent;
  padding: 2px;
  cursor: pointer;
  border-radius: 999px;
  line-height: 0;
}

.marker-icon-pick-btn.is-selected .marker-icon-preview-pill {
  box-shadow: 0 0 0 2px #2563eb, 0 0 0 4px rgba(37, 99, 235, 0.22);
}

.marker-icon-preview-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #02122e;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.marker-icon-preview-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.settings-category-create-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.settings-category-name-field {
  flex: 1 1 auto;
  min-width: 0;
}

.settings-category-color-field {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.settings-category-color-field .field-label {
  white-space: nowrap;
}

.marker-icon-lib-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.marker-icon-lib-label {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  line-height: 1.2;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dark-mode .spot-marker-icon-picker-scroll {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .settings-manager-row-title {
  color: #e2e8f0;
}

body.dark-mode .settings-color-swatch {
  background: #1e293b;
  border-color: #475569;
}

body.dark-mode .marker-icon-lib-label {
  color: #94a3b8;
}

body.dark-mode .category-map-pill-icon,
body.dark-mode .category-map-pill-icon .ui-icon {
  color: #94a3b8;
}

.list-search-submit-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #2563eb;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
.list-search-submit-btn:hover {
  background: #1d4ed8;
}
.list-filter-summary.is-clickable {
  cursor: pointer;
}
.list-filter-summary.is-clickable:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.sidebar-link-btn--icon,
.sidebar-nest-btn--icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sidebar-link-btn-icon,
.sidebar-nest-btn-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: #64748b;
}
.agenda-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
}
.spot-popup-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: #475569;
  margin-bottom: 8px;
  line-height: 1.4;
}
.spot-popup-meta-row--muted {
  color: #64748b;
}
.spot-popup-meta-row .ui-icon-host {
  flex-shrink: 0;
  margin-top: 1px;
  color: #94a3b8;
}
.spot-popup-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  color: #b45309;
  font-weight: 600;
}
.dashboard-stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dashboard-stat-icon {
  display: inline-flex;
  color: #64748b;
  flex-shrink: 0;
}
.dashboard-hero-fallback,
.dashboard-gallery-placeholder,
.dashboard-photo-placeholder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}
.edit-sheet-btn-delete,
.edit-sheet-btn-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.sbc-photo-placeholder,
.sbc-cats,
.sbc-distance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sbc-chevron {
  color: #94a3b8;
  flex-shrink: 0;
}
.sbc-star {
  color: #f59e0b;
}
body.dark-mode .cat-icon-preview-item {
  background: #0f172a;
  border-color: #334155;
}
body.dark-mode .cat-icon-preview-label {
  color: #e2e8f0;
}
body.dark-mode .list-search-submit-btn {
  background: #2563eb;
  border-color: #3b82f6;
}
body.dark-mode .marker-shape-option,
body.dark-mode .marker-icon-style-btn {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
body.dark-mode .marker-shape-option:hover,
body.dark-mode .marker-icon-style-btn:hover {
  background: #1e293b;
}
body.dark-mode .marker-shape-option.is-active,
body.dark-mode .marker-icon-style-btn.is-active {
  border-color: #60a5fa;
  background: #172554;
  color: #93c5fd;
}
body.dark-mode .marker-shape-name {
  color: #94a3b8;
}
.map-layers-section--collapsible {
  margin-top: 0;
}
.map-layers-section--markers {
  margin-bottom: 4px;
}
.map-layers-collapsible-body {
  margin-top: 10px;
}
.map-layers-collapsible-body[hidden] {
  display: none !important;
}
.map-layers-start-view-host {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.map-layers-start-view-host .settings-display-body--start-view {
  padding: 0;
}
.map-layers-start-view-host .settings-display-nest--sheet {
  margin: 0;
}
.map-sheet-panel--profile {
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.map-profile-actions--primary {
  margin-top: 12px;
}
.map-profile-action-btn--edit {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.map-profile-account-host[hidden] {
  display: none !important;
}
.map-profile-account-host:not([hidden]) {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.map-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.map-sheet-head h3 {
  margin: 0;
  font-size: 18px;
  color: #0f172a;
}
.map-sheet-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
}
.map-sheet-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: #64748b;
}
.map-layers-active-summary {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #bfdbfe;
  font-size: 13px;
  font-weight: 600;
  color: #1e40af;
  line-height: 1.35;
}
.map-layers-maps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.map-layers-map-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #334155;
  cursor: pointer;
  min-height: 44px;
  color: #f8fafc;
}
.map-layers-map-item--action {
  width: 100%;
  text-align: left;
  font: inherit;
}
.map-layers-map-item.active {
  border-color: #2563eb;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}
.map-layers-map-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #fff;
  cursor: pointer;
}
.map-layers-map-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}
.map-layers-map-item.active .map-layers-map-icon-wrap {
  background: rgba(255, 255, 255, 0.18);
}
.map-layers-map-icon {
  display: block;
  color: #fff;
}
.map-layers-map-text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-layers-map-count {
  font-weight: 500;
  opacity: 0.88;
}
.map-layers-friend-hint {
  margin-top: 0;
}

.map-basemap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.map-basemap-vignette {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.map-basemap-vignette:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.map-basemap-vignette.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
}

.map-basemap-thumb {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  aspect-ratio: 1;
  overflow: hidden;
  background: #e2e8f0;
  min-height: 72px;
}

.map-basemap-vignette[data-basemap="satellite"] .map-basemap-thumb {
  background: linear-gradient(145deg, #1e3a2f 0%, #3d5c45 100%);
}
.map-basemap-vignette[data-basemap="plan"] .map-basemap-thumb {
  background: linear-gradient(145deg, #e8eef5 0%, #c5d4e8 100%);
}
.map-basemap-vignette[data-basemap="osm"] .map-basemap-thumb {
  background: linear-gradient(145deg, #f1f5f0 0%, #c8dcc8 100%);
}
.map-basemap-vignette[data-basemap="dark"] .map-basemap-thumb {
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
}
.map-basemap-vignette[data-basemap="topo"] .map-basemap-thumb {
  background: linear-gradient(145deg, #d4e4c8 0%, #8fb878 100%);
}
.map-basemap-vignette[data-basemap="positron"] .map-basemap-thumb {
  background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
}

.map-basemap-tile {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

.map-basemap-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  padding: 7px 4px 8px;
  color: #334155;
}

.map-basemap-vignette.active .map-basemap-label {
  color: #1d4ed8;
}

.map-layers-type-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.map-layers-type-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #334155;
}
.map-layers-type-btn.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.map-sheet-panel--filters {
  max-height: min(85vh, 720px);
  min-height: min(52vh, 480px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.map-filters-sheet-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.map-filters-reset-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.map-filters-sheet-body {
  flex: 1 1 auto;
  min-height: 200px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#mapFiltersPanelHost #filtersPanel,
#mapFiltersPanelHost #filtersPanel.open,
#mapFiltersPanelHost .map-filters-panel--sheet {
  display: block !important;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  max-height: none;
  overflow: visible;
}
#mapFiltersPanelHost .sidebar-nest {
  margin-top: 10px;
}
#mapFiltersPanelHost .sidebar-nest:first-child {
  margin-top: 0;
}
#mapFiltersPanelHost .sidebar-nest-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  color: #1e293b;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
#mapFiltersPanelHost .sidebar-nest-btn.active {
  border-color: #93c5fd;
  background: #f8fbff;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
#mapFiltersPanelHost .sidebar-nest-panel {
  padding: 10px 4px 6px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#mapFiltersPanelHost .sidebar-filter-box,
#mapFiltersPanelHost #statusFilters,
#mapFiltersPanelHost #stateFilters,
#mapFiltersPanelHost #spotTagFilters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#mapFiltersPanelHost #filters {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
}

#mapFiltersPanelHost .filter-pill {
  font-size: 13px;
  padding: 8px 13px;
  -webkit-appearance: none;
  appearance: none;
  min-height: 34px;
  touch-action: manipulation;
}
#mapFiltersPanelHost .filter-distance-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#mapFiltersPanelHost .filter-distance-btn {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
}
#mapFiltersPanelHost .filter-reference-box,
#mapFiltersPanelHost .filter-distance-hint,
#mapFiltersPanelHost .settings-data-hint {
  font-size: 13px;
  line-height: 1.4;
}
#mapFiltersPanelHost .form-control {
  border-radius: 12px;
  min-height: 42px;
}
body.dark-mode #mapFiltersPanelHost .sidebar-nest-btn,
body.dark-mode #mapFiltersPanelHost .sidebar-nest-panel {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
body.dark-mode #mapFiltersPanelHost .sidebar-nest-btn.active {
  background: #1e293b;
  border-color: #3b82f6;
}

.map-section-sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
}
.map-sheet-panel--section {
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.map-sheet-panel--section .map-sheet-head {
  flex-shrink: 0;
  margin-bottom: 0;
  padding: 16px 18px 12px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 2;
}
.map-section-sheet-body .sidebar-panel.map-section-panel--sheet,
.map-section-sheet-body .sidebar-panel.map-section-panel--sheet.open {
  display: block !important;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  max-height: none;
  overflow: visible;
}
.map-section-sheet-body .notes-add-btn,
.map-section-sheet-body .roadtrip-add-btn {
  margin-top: 0;
}

.map-section-sheet-body .map-sheet-compact-add {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 10px;
}
.map-section-sheet-body .map-sheet-compact-add .form-control {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  min-height: 42px;
}
.map-section-sheet-body .map-sheet-primary-btn {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}
.map-section-sheet-body .map-sheet-compact-add .map-sheet-primary-btn {
  width: auto;
  flex: 0 0 auto;
  min-width: 88px;
  margin: 0;
  white-space: nowrap;
}
.map-section-sheet-body .map-sheet-primary-btn:hover {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #93c5fd;
}
.map-section-sheet-body .map-sheet-primary-btn .sidebar-action-btn-icon {
  color: #2563eb;
}
.map-section-sheet-body .map-sheet-all-link-btn {
  width: 100%;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.map-section-sheet-body .map-sheet-all-link-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}
.map-section-sheet-body .map-sheet-all-link-btn .sidebar-link-btn-icon {
  color: #2563eb;
}
.map-section-sheet-body .sidebar-panel-label {
  margin: 4px 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
}

.map-section-sheet-body .notes-all-link-btn {
  margin-top: 12px;
}

.map-section-sheet-body .notes-compact-add {
  margin-bottom: 4px;
}
.map-section-sheet-body .form-control {
  margin-top: 0;
}
.map-section-sheet-body .sidebar-nest {
  margin-top: 12px;
}
.map-section-sheet-body .sidebar-nest-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  color: #1e293b;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.map-section-sheet-body .sidebar-nest-panel {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}
body.dark-mode .map-section-sheet-body .sidebar-nest-btn,
body.dark-mode .map-section-sheet-body .sidebar-nest-panel {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
body.dark-mode .map-section-sheet-body .map-sheet-primary-btn {
  background: linear-gradient(180deg, #1e293b 0%, #172033 100%);
  border-color: #334155;
  color: #bfdbfe;
  box-shadow: none;
}
body.dark-mode .map-section-sheet-body .map-sheet-primary-btn:hover {
  background: linear-gradient(180deg, #243044 0%, #1a2438 100%);
  border-color: #475569;
}
body.dark-mode .map-section-sheet-body .map-sheet-primary-btn .sidebar-action-btn-icon,
body.dark-mode .map-section-sheet-body .map-sheet-all-link-btn .sidebar-link-btn-icon {
  color: #93c5fd;
}
body.dark-mode .map-section-sheet-body .map-sheet-all-link-btn {
  background: linear-gradient(180deg, #1e293b 0%, #172033 100%);
  border-color: #334155;
  color: #bfdbfe;
}
body.dark-mode .map-section-sheet-body .map-sheet-all-link-btn:hover {
  background: linear-gradient(180deg, #243044 0%, #1a2438 100%);
  border-color: #475569;
}
body.dark-mode .map-section-sheet-body .sidebar-panel-label {
  color: #94a3b8;
}

.map-profile-account-host {
  margin: 12px 0;
}
.map-profile-account-host .map-profile-account-panel {
  position: static;
  display: block !important;
  box-shadow: none;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  max-height: none;
  overflow: visible;
}
.map-profile-account-panel .settings-manager-body {
  padding: 14px;
}
.map-profile-account-panel .settings-account-actions {
  padding: 0 14px 14px;
  border-top: none;
}
.map-profile-account-panel .settings-account-avatar-row {
  margin-bottom: 12px;
}
.map-profile-account-host .settings-account-avatar-row {
  align-items: center;
  gap: 12px;
}
.map-profile-account-host .settings-account-avatar {
  display: none;
}
body.dark-mode .map-profile-account-panel {
  background: #0f172a;
  border-color: #334155;
}

.map-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-bottom: 14px;
}
.map-profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  overflow: hidden;
  flex-shrink: 0;
}
.map-profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.map-profile-name {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}
.map-profile-username {
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  margin-top: 2px;
}
.map-profile-email {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}
.map-profile-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.map-sheet-panel--profile .settings-section-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #dfe7f0;
  border-radius: 14px;
  background: #fff;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.map-sheet-panel--profile .settings-section-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.map-profile-section-btn--danger {
  color: #b91c1c;
  border-color: #fecaca !important;
  background: #fff5f5 !important;
}
.map-profile-section-btn--danger:hover {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
}

.map-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.map-menu-item {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 14px;
  padding: 14px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 88px;
}
.map-menu-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #2563eb;
}
.map-menu-item-label {
  line-height: 1.2;
}

.map-sheet-head--menu {
  align-items: center;
  gap: 10px;
}

.map-brand-badge {
  position: fixed;
  left: 12px;
  bottom: var(--map-float-bottom);
  z-index: 6150;
  display: inline-block;
  width: auto;
  height: auto;
  padding: 0;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  background: transparent;
  box-shadow: var(--brand-navy-shadow);
  overflow: hidden;
  line-height: 0;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.map-brand-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--brand-navy-shadow-strong);
}

.map-brand-badge-logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: center;
}

.map-brand-badge-icon {
  display: none;
  width: 44px;
  height: 44px;
  object-fit: cover;
}

body.road-trip-chip-visible .map-brand-badge,
body.friend-view-chip-visible .map-brand-badge {
  bottom: var(--map-float-bottom-chip);
}

body.road-trip-chip-visible.road-trip-chip-menu-open .map-brand-badge {
  bottom: var(--map-float-bottom-chip-open);
}

@media (min-width: 768px) {
  .map-brand-badge-logo {
    height: 48px;
  }
}

@media (max-width: 520px) {
  .map-brand-badge {
    border-radius: 10px;
  }
  .map-brand-badge-logo {
    display: none;
  }
  .map-brand-badge-icon {
    display: block;
  }
}

body.dark-mode .map-brand-badge {
  border-color: rgba(255, 255, 255, 0.88);
  box-shadow: var(--brand-navy-shadow-strong);
}

.map-filter-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.map-float-square .ui-icon-host {
  color: #1e293b;
}

.leaflet-div-icon.urbex-spot-marker--teardrop {
  background: transparent;
  border: none;
  overflow: visible !important;
}
.urbex-pin-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 18px;
  max-height: 18px;
}
.urbex-pin-icon span {
  display: block;
  line-height: 1;
}

@media (max-width: 600px) {
  :root {
    --map-float-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  .map-top-bar {
    left: 12px;
    right: 10px;
    align-items: center;
  }
  .map-search-row {
    width: 100%;
  }
  .map-view-toggle {
    margin-left: auto;
    margin-right: auto;
  }
  .map-right-controls {
    right: 10px;
  }
}

body.dark-mode .map-filter-btn {
  background: var(--brand-navy-solid);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: var(--brand-navy-shadow-strong);
}

body.dark-mode .map-filter-btn.active,
body.dark-mode .map-filter-btn.has-active-filters {
  box-shadow: 0 0 0 2px #1e293b, 0 0 0 4px rgba(226, 232, 240, 0.35), 0 6px 18px rgba(0, 0, 0, 0.45);
}

body.dark-mode .map-bottom-nav-add {
  background: var(--brand-navy-solid);
  box-shadow: var(--brand-navy-shadow-strong);
}
body.dark-mode .map-filters-reset-btn {
  background: #1e3a5f;
  color: #93c5fd;
}
body.dark-mode .map-search,
body.dark-mode .map-float-square {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}
body.dark-mode .map-search-input {
  color: #f1f5f9;
}
body.dark-mode .map-view-toggle {
  background: #ffffff;
  border-color: #e2e8f0;
}
body.dark-mode .map-view-toggle-btn {
  color: #64748b;
}
body.dark-mode .map-view-toggle-btn + .map-view-toggle-btn {
  border-left-color: #e2e8f0;
}
body.dark-mode .map-view-toggle-btn.is-active {
  background: var(--brand-navy-solid);
  color: #ffffff;
}
body.dark-mode .map-view-toggle-btn:hover:not(.is-active) {
  background: #f8fafc;
  color: #334155;
}
body.dark-mode .map-bottom-nav {
  background: linear-gradient(180deg, rgba(30,41,59,0.95) 0%, #1e293b 100%);
  border-color: #334155;
}
body.dark-mode .map-bottom-nav-item {
  color: #94a3b8;
}
body.dark-mode .map-bottom-nav-item.active {
  color: #60a5fa;
}
body.dark-mode .map-sheet-panel {
  background: #1e293b;
  color: #e2e8f0;
}
body.dark-mode .map-sheet-panel--section .map-sheet-head {
  background: #1e293b;
  border-bottom-color: #334155;
}
body.dark-mode .map-sheet-head h3,
body.dark-mode .map-layers-start-view-host {
  border-top-color: #334155;
}
body.dark-mode .map-layers-collapsible-arrow {
  color: #94a3b8;
}
body.dark-mode .map-layers-section-title {
  color: #94a3b8;
}
body.dark-mode .map-layers-sheet-body .settings-section-btn,
body.dark-mode .map-sheet-panel--profile .settings-section-btn {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
body.dark-mode .map-layers-sheet-body .settings-section-btn:hover,
body.dark-mode .map-sheet-panel--profile .settings-section-btn:hover {
  background: #1e293b;
  border-color: #475569;
}
body.dark-mode .map-profile-section-btn--danger {
  background: #450a0a !important;
  border-color: #991b1b !important;
  color: #fecaca !important;
}
body.dark-mode .map-profile-username {
  color: #93c5fd;
}
body.dark-mode .map-float-square .ui-icon-host {
  color: #e2e8f0;
}
body.dark-mode .map-menu-item-icon {
  color: #60a5fa;
}
body.dark-mode .map-profile-name {
  color: #f1f5f9;
}
body.dark-mode .map-layers-active-summary {
  background: #1e293b;
  border-color: #334155;
  color: #93c5fd;
}
body.dark-mode .view-return-vignette {
  background: var(--brand-navy-solid);
  border-color: var(--brand-navy-border);
  color: #ffffff;
  box-shadow: var(--brand-navy-shadow-strong);
}
body.dark-mode .view-return-vignette:hover {
  filter: brightness(1.08);
  border-color: var(--brand-navy-border);
}
body.dark-mode #sidebar .sidebar-nest-btn-icon {
  background: #1e293b;
  color: #e2e8f0;
}

body.dark-mode .map-profile-card,
body.dark-mode .map-layers-map-item,
body.dark-mode .map-menu-item,
body.dark-mode .map-layers-type-btn,
body.dark-mode .map-basemap-vignette {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .map-basemap-vignette.active {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}

body.dark-mode .map-basemap-label {
  color: #e2e8f0;
}

body.dark-mode .map-basemap-vignette.active .map-basemap-label {
  color: #93c5fd;
}
body.dark-mode .map-layers-map-item.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #3b82f6;
  color: #fff;
}

body.spot-bottom-card-open .map-bottom-nav-add,
body.spot-bottom-card-open .map-right-controls {
  opacity: 0;
  pointer-events: none;
}
body.map-spots-list-sheet-open .map-right-controls {
  opacity: 0;
  pointer-events: none;
}
