:root {
  /* ── Design System Midspot 2025 (section 06) ── */
  --cream:        #F5F0E8;   /* Fond principal, texte sur vert */
  --cream-dark:   #EDE7D8;   /* Cards, chips inactives, séparateurs */
  --g-dark:       #3D7A57;   /* Vert forêt — primaire */
  --g-deeper:     #2C5A3F;   /* Vert profond — hover, dark mode */
  --g-light-color:#5A9A72;   /* Vert clair — accents secondaires */
  --coral:        #C8563B;   /* Corail terracotta — accent fort */
  --coral-light:  #D97055;   /* Corail hover */
  --ink:          #1B2B20;   /* Texte principal */
  --muted:        #7A8C7F;   /* Texte secondaire */
  --ff-display:  'Fraunces', Georgia, serif;
  --ff-body:     'Plus Jakarta Sans', system-ui, sans-serif;
  --surface:      #FFFFFF;

  /* Fond & bordure mappés sur la palette crème */
  --bg:           var(--cream);       /* #F5F0E8 — fond page */
  --border:       var(--cream-dark);  /* #EDE7D8 — séparateurs */

  /* ── Héritage — variables internes conservées pour compatibilité ── */
  --surf2:    #F5F2EC;
  --g:        #5A9E78;   /* Vert médium — hover léger, focus rings */
  --g-light:  #F0F7F3;   /* Fond vert très clair — bg chip sel, hover cards */
  --g-mid:    #B8D9C5;   /* Vert moyen — bordures douces */
  --g-bg:     rgba(90,158,120,.07);
  --coral-bg: rgba(200,86,59,.07);   /* mis à jour pour le nouveau coral */

  /* Participants */
  --blue:     #5B7FA6;
  --blue-bg:  rgba(91,127,166,.07);
  --violet:     #7B6FA8;
  --violet-bg:  rgba(123,111,168,.1);
  --m-badge-outline-0: rgba(91, 127, 166, 0.45);
  --m-badge-outline-1: rgba(200, 86, 59, 0.4);
  --m-badge-outline-2: rgba(123, 111, 168, 0.45);

  /* Alias texte → design system */
  --txt:      var(--ink);   /* #1B2B20 — alias pour compatibilité */

  --shadow:   0 2px 20px rgba(27,43,32,.06);
  --r:        14px;

  /* Safe area insets */
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: var(--ff-body); background: var(--bg); color: var(--txt); -webkit-font-smoothing: antialiased; overflow: hidden; -webkit-tap-highlight-color: rgba(61,122,87,.15); }

/* ── Motif de fond (points — repère fiable at 1px 1px pour rendu cross-browser) ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(61, 122, 87, 0.14) 1px, transparent 0);
  background-size: 20px 20px;
  transition: opacity 0.4s ease;
}

/* ── Background contextuel par catégorie (signature Midspot) ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 40%, rgba(61,122,87,0.10), transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(61,122,87,0.08), transparent 50%);
  transition: background 0.6s ease;
}

/* ── Animation subtile de flottaison ── */
@keyframes floatBg {
  0% { transform: translate(0,0); }
  50% { transform: translate(-10px, -10px); }
  100% { transform: translate(0,0); }
}

body::after {
  animation: floatBg 20s ease-in-out infinite;
}

/* ── Variantes Food (chaleur / convivialité) ── */
body.cat-food::after {
  background:
    radial-gradient(circle at 20% 30%, rgba(200,86,59,0.15), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(200,86,59,0.12), transparent 50%);
}

body.cat-food::before { opacity: 0.18; }

/* ── Variantes Sport (dynamisme) ── */
body.cat-sport::after {
  background:
    linear-gradient(120deg, rgba(61,122,87,0.10) 0%, transparent 40%),
    repeating-linear-gradient(
      120deg,
      rgba(61,122,87,0.06),
      rgba(61,122,87,0.06) 2px,
      transparent 2px,
      transparent 12px
    );
}

body.cat-sport::before { opacity: 0.22; }

/* ── Variantes Culture (calme / premium) ── */
body.cat-culture::after {
  background:
    radial-gradient(circle at 50% 20%, rgba(123,111,168,0.15), transparent 50%),
    radial-gradient(circle at 30% 80%, rgba(123,111,168,0.12), transparent 60%);
}

body.cat-culture::before { opacity: 0.12; }

/* ── Layout ── */
#app { display: flex; height: 100vh; height: 100dvh; min-height: 0; position: relative; z-index: 1; padding: var(--sat) var(--sar) 0 var(--sal); }

/* ── SIDEBAR ── */
#sidebar {
  width: 348px; flex-shrink: 0;
  background-color: var(--surface);
  background-image: radial-gradient(circle at 1px 1px, rgba(61, 122, 87, 0.07) 1px, transparent 0);
  background-size: 22px 22px;
  border-right: 1.5px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 3px 0 24px rgba(27,43,32,.07);
  z-index: 10;
  color: var(--ink);
}
.sb-head { padding: 1.3rem 1.25rem 1rem; border-bottom: 1.5px solid var(--border); flex-shrink: 0; }
.sb-logo {
  display: inline-flex;
  align-items: center;
  font-family: 'Fraunces', serif;
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--txt);
  letter-spacing: -1.2px;
  line-height: 1;
  padding: 0.38rem 0.9rem 0.42rem;
  background: var(--surf2);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  width: fit-content;
}
.sb-logo-inner { min-width: 0; }
.sb-logo-m {
  color: var(--g-dark);
  font-weight: 900;
}
.sb-logo img { height: 34px; width: auto; }
.sb-logo--brand {
  padding: 0.2rem 0;
  background: transparent;
  border: none;
  box-shadow: none;
  gap: 0.45rem;
}
.sb-logo.sb-logo--brand .sb-mark-img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  flex-shrink: 0;
}
.sb-wordmark {
  font-family: 'Fraunces', serif;
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--txt);
  letter-spacing: -0.06em;
  line-height: 1;
}
.sb-logo--brand sup {
  margin-left: 0.2rem;
}
.sb-logo sup { font-size: .55rem; color: var(--muted); font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 400; letter-spacing: 0; vertical-align: super; margin-left: .06rem; }
.sb-sub { font-size: .72rem; color: var(--muted); margin-top: .3rem; font-weight: 400; }

.sb-body { flex: 1; overflow-y: auto; padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: 1rem; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.sb-body::-webkit-scrollbar { width: 3px; }
.sb-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Subtle inner shadow on scroll area */
.sb-body {
  background: linear-gradient(var(--surface) 30%, transparent) center top,
              linear-gradient(transparent, var(--surface) 70%) center bottom;
  background-attachment: local, local;
}

.sb-foot { padding: 1rem 1.2rem; border-top: 1.5px solid var(--border); flex-shrink: 0; }

/* ── Actions secondaires dans le footer ── */
.sb-foot-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
  padding: 0.5rem 0;
  border-top: 1px solid var(--cream-dark);
  border-bottom: 1px solid var(--cream-dark);
}

/* Boutons du footer: style ghost discret */
.sb-foot-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.sb-foot-btn:hover {
  color: var(--g-dark);
  background: var(--cream-dark);
  border-color: var(--border);
}

.sb-foot-btn:focus-visible {
  outline: 2px solid var(--g-dark);
  outline-offset: 2px;
}

/* Variante icône: plus compacte */
.sb-foot-btn--icon {
  padding: 0.4rem 0.7rem;
}

.sb-foot-btn__ico {
  font-size: 1rem;
  line-height: 1;
}

.sb-foot-btn__txt {
  font-size: 0.8rem;
}

/* État actif: quand le panneau associé est ouvert */
.sb-foot-btn.is-active,
.sb-foot-btn[aria-pressed="true"] {
  color: var(--g-dark);
  background: var(--g-light);
  border-color: var(--g-mid);
}

/* Responsive: masquer le texte sur mobile si besoin */
@media (max-width: 360px) {
  .sb-foot-btn__txt {
    display: none;
  }
  .sb-foot-btn--icon {
    padding: 0.4rem;
  }
}

.sb-head-brand { flex: 1; min-width: 0; }

/* Fermeture du panneau mobile — masqué sur bureau */
.nav-panel-close {
  display: none;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  margin: -0.25rem -0.35rem 0 0;
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surf2);
  color: var(--muted);
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 300;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  touch-action: manipulation;
}
.nav-panel-close:hover {
  background: var(--g-light);
  color: var(--g-dark);
  border-color: var(--g-mid);
}

.nav-backdrop {
  display: none;
}

/* Burger — masqué sur bureau, même DA que .nav-panel-close */
.nav-burger {
  display: none;
  position: absolute;
  z-index: 950;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surf2);
  color: var(--muted);
  box-shadow: var(--shadow);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.nav-burger:hover {
  background: var(--cream-dark);
  border-color: var(--muted);
}
#app.mobile-nav-open .nav-burger {
  box-shadow: none;
}

.nav-burger__lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 16px;
  pointer-events: none;
}
.nav-burger__lines span {
  display: block;
  height: 1.5px;
  border-radius: 1px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-burger.is-open .nav-burger__lines span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-burger.is-open .nav-burger__lines span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-burger.is-open .nav-burger__lines span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Section header — icône via data-icon */
.sec-title { font-size: .62rem; text-transform: uppercase; letter-spacing: 1.3px; color: var(--muted); font-weight: 700; font-family: var(--ff-display); display: flex; align-items: center; gap: .5rem; margin-bottom: .55rem; }
.sec-title::before {
  content: attr(data-icon);
  font-size: .85rem;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.95;
}
.sec-title:not([data-icon])::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--g); opacity: 0.85; }
.sec-title::after { content: ''; flex: 1; height: 1px; background: var(--border); order: 1; }

.sec-optional {
  font-size: .68rem;
  font-weight: 600;
  color: var(--coral);
  margin-left: .4rem;
  font-family: var(--ff-body);
  vertical-align: middle;
  text-transform: none;
  letter-spacing: 0;
}

/* ── Participant card ── */
.p-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r); overflow: visible; margin-bottom: .6rem; }
.p-card[data-pi="0"] { border-top: 3px solid var(--blue); }
.p-card[data-pi="1"] { border-top: 3px solid var(--coral); }
.p-card[data-pi="2"] { border-top: 3px solid var(--violet); }

/* ── Landing mode — sidebar cachée avant sélection de catégorie ── */
#app.landing-mode #sidebar { display: none; }
#app.landing-mode .nav-burger { display: none; }
#app.landing-mode .map-acct-btn { display: none !important; }
/* La carte reste sous la landing (stacking) : désactive les interactions pour éviter qu’elle vole des taps sur mobile */
#app.landing-mode #map { pointer-events: none; }

/* ── Bouton compte dans la vue map ── */
.map-acct-btn {
  display: none; /* activé hors landing-mode via media queries */
  position: absolute;
  z-index: 950;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .55rem 1.05rem .55rem .75rem;
  border: 1.5px solid var(--border);
  background: rgba(254,252,249,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 99px;
  box-shadow: 0 2px 12px rgba(27,43,32,.10);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--ff-body);
  transition: color .15s, background .15s, border-color .15s, box-shadow .15s;
}
.map-acct-btn:hover {
  color: var(--g-dark);
  background: rgba(245,240,232,.98);
  border-color: var(--g-mid);
  box-shadow: 0 3px 16px rgba(27,43,32,.13);
}

.map-acct-lbl {
  font-family: var(--ff-body);
  font-size: .78rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
}

/* Address confirmed state — couleur alignée sur chaque participant */
.p-card[data-pi="0"].addr-ok .addr-inp-row {
  border-color: var(--blue);
  background: var(--blue-bg);
}
.p-card[data-pi="0"].addr-ok .addr-ico::after {
  content: ' ✓';
  color: var(--blue);
  font-size: .7rem;
}
.p-card[data-pi="1"].addr-ok .addr-inp-row {
  border-color: var(--coral);
  background: var(--coral-bg);
}
.p-card[data-pi="1"].addr-ok .addr-ico::after {
  content: ' ✓';
  color: var(--coral);
  font-size: .7rem;
}
.p-card[data-pi="2"].addr-ok .addr-inp-row {
  border-color: var(--violet);
  background: var(--violet-bg);
}
.p-card[data-pi="2"].addr-ok .addr-ico::after {
  content: ' ✓';
  color: var(--violet);
  font-size: .7rem;
}

.p-head {
  display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem;
  background: var(--surf2);
  background-image: radial-gradient(circle at 1px 1px, rgba(61, 122, 87, 0.1) 1px, transparent 0);
  background-size: 18px 18px;
  border-bottom: 1px solid var(--border);
  border-radius: calc(var(--r) - 1.5px) calc(var(--r) - 1.5px) 0 0;
}
.p-av { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; flex-shrink: 0; }
.p-card[data-pi="0"] .p-av { background: var(--blue-bg); color: var(--blue); }
.p-card[data-pi="1"] .p-av { background: var(--coral-bg); color: var(--coral); }
.p-card[data-pi="2"] .p-av { background: var(--violet-bg); color: var(--violet); }
.p-name-inp { flex: 1; background: transparent; border: none; outline: none; font-family: 'Plus Jakarta Sans', sans-serif; font-size: .88rem; font-weight: 600; color: var(--txt); min-width: 0; }
.p-name-inp::placeholder { color: var(--muted); font-weight: 400; }
.rm-btn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 3px 5px; border-radius: 6px; font-size: .8rem; line-height: 1; transition: all .2s; }
.rm-btn:hover { color: var(--coral); background: var(--coral-bg); }

.p-body { padding: .7rem .8rem; display: flex; flex-direction: column; gap: .6rem; }

/* Address autocomplete */
.addr-wrap { position: relative; }
.addr-inp-row { display: flex; align-items: center; background: var(--bg); border: 1.5px solid var(--border); border-radius: 9px; transition: border-color .2s, box-shadow .2s; overflow: visible; }
.addr-inp-row:focus-within { border-color: var(--g); box-shadow: 0 0 0 3px var(--g-bg); }
.p-card[data-pi="0"] .addr-inp-row:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.p-card[data-pi="1"] .addr-inp-row:focus-within { border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-bg); }
.p-card[data-pi="2"] .addr-inp-row:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-bg); }
.addr-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  line-height: 1;
  margin: 0 .35rem 0 .55rem;
  flex-shrink: 0;
  align-self: center;
  user-select: none;
}
.addr-inp { flex: 1; padding: .52rem .4rem; background: transparent; border: none; outline: none; font-family: 'Plus Jakarta Sans', sans-serif; font-size: .83rem; color: var(--txt); min-width: 0; }
.addr-inp::placeholder { color: var(--muted); }

/* Geolocation button */
.addr-geo-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--g-dark);
  padding: .4rem .5rem;
  font-size: .85rem;
  line-height: 1;
  transition: all .2s;
  opacity: 0.7;
}
.addr-geo-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}
.addr-geo-btn:active {
  transform: scale(0.95);
}

.addr-x { background: none; border: none; cursor: pointer; color: var(--muted); padding: .4rem .55rem; font-size: .75rem; line-height: 1; transition: color .2s; }
.addr-x:hover { color: var(--coral); }

.addr-dd {
  position: absolute; top: calc(100% + 5px); left: 0; right: 0;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 30px rgba(27,43,32,.14);
  z-index: 2000; display: none; overflow: hidden;
}
.addr-dd.open { display: block; }
.dd-item { display: flex; align-items: flex-start; gap: .5rem; padding: .6rem .8rem; cursor: pointer; border-bottom: 1px solid var(--border); transition: background .15s; }
.dd-item:last-child { border-bottom: none; }
.dd-item:hover { background: var(--g-light); }

/* Geolocation suggestion item - distinct style (text color only, no background) */
.dd-item--geo {
  font-weight: 500;
}
.dd-main--geo {
  color: var(--g-dark);
  font-weight: 600;
}
.dd-ico {
  width: 1.2rem;
  text-align: center;
  font-size: .82rem;
  line-height: 1.25;
  margin-top: 2px;
  flex-shrink: 0;
  user-select: none;
}
.dd-main { font-size: .82rem; font-weight: 600; color: var(--txt); line-height: 1.3; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.dd-main-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-dist { font-size: .62rem; font-weight: 700; color: #fff; background: #22c55e; border-radius: 9999px; padding: 1px 7px; white-space: nowrap; flex-shrink: 0; letter-spacing: .02em; }
.dd-sub { font-size: .7rem; color: var(--muted); margin-top: 1px; }
.dd-loading { padding: .75rem; text-align: center; color: var(--muted); font-size: .8rem; }

/* Transport pills */
.t-label {
  font-size: .72rem;
  color: var(--muted);
  margin-bottom: .3rem;
  margin-top: .6rem;
  font-weight: 500;
}
.t-row { display: flex; gap: .3rem; flex-wrap: wrap; }
.t-pill { display: flex; align-items: center; gap: .28rem; padding: .3rem .6rem; border-radius: 99px; background: var(--bg); border: 1.5px solid var(--border); font-size: .73rem; color: var(--muted); cursor: pointer; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 500; transition: all .18s; white-space: nowrap; }
.t-pill:hover { border-color: var(--g-mid); color: var(--g-dark); }
.p-card[data-pi="0"] .t-pill:hover { border-color: var(--blue); color: var(--blue); }
.p-card[data-pi="1"] .t-pill:hover { border-color: var(--coral); color: var(--coral); }
.p-card[data-pi="2"] .t-pill:hover { border-color: var(--violet); color: var(--violet); }
.p-card[data-pi="0"] .t-pill.sel { background: var(--blue-bg); border-color: var(--blue); color: var(--blue); font-weight: 600; }
.p-card[data-pi="1"] .t-pill.sel { background: var(--coral-bg); border-color: var(--coral); color: var(--coral); font-weight: 600; }
.p-card[data-pi="2"] .t-pill.sel { background: var(--violet-bg); border-color: var(--violet); color: var(--violet); font-weight: 600; }

.add-p-btn { background: transparent; border: 1.5px dashed var(--border); border-radius: var(--r); padding: .65rem; width: 100%; display: flex; align-items: center; justify-content: center; gap: .4rem; color: var(--muted); font-family: 'Plus Jakarta Sans', sans-serif; font-size: .82rem; cursor: pointer; transition: all .2s; }
.add-p-btn:hover { border-color: var(--g); color: var(--g-dark); background: var(--g-light); }

/* Budget grid */
.b-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.b-opt {
  padding: .58rem .65rem;
  background: var(--bg);
  background-image: radial-gradient(circle at 1px 1px, rgba(61, 122, 87, 0.08) 1px, transparent 0);
  background-size: 18px 18px;
  border: 1.5px solid var(--border); border-radius: 9px; cursor: pointer; transition: all .2s;
}
.b-opt:hover { border-color: var(--g-mid); }
.b-opt.sel {
  background: var(--g-light);
  background-image: radial-gradient(circle at 1px 1px, rgba(61, 122, 87, 0.15) 1px, transparent 0);
  background-size: 18px 18px;
  border-color: var(--g);
}
.b-em {
  font-size: 1.12rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .2rem;
  letter-spacing: 0;
}
.b-lbl { font-size: .8rem; font-weight: 700; color: var(--txt); }
.b-sub { font-size: .67rem; color: var(--muted); margin-top: 1px; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.chips-expand { display: flex; flex-direction: column; gap: 0.4rem; }
.chips-more-btn {
  align-self: flex-start;
  padding: 0.32rem 0.85rem;
  border-radius: 99px;
  border: 1.5px dashed var(--border);
  background: transparent;
  color: var(--muted);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}
.chips-more-btn:hover {
  border-color: var(--g-mid);
  color: var(--g-dark);
  background: var(--g-light);
}
.chip { padding: .3rem .65rem; border-radius: 99px; background: var(--cream-dark); border: 1.5px solid var(--border); font-size: .76rem; cursor: pointer; color: var(--ink); font-family: var(--ff-body); font-weight: 600; transition: all .18s; }
.chip:hover { border-color: var(--g-mid); color: var(--g-dark); }
.chip.sel { background: var(--g-dark); border-color: var(--g-dark); color: var(--cream); font-weight: 700; }

/* Slider */
.sl-wrap { display: flex; align-items: center; gap: .7rem; }
.sl-val { font-family: 'Fraunces', serif; font-size: 1.15rem; font-weight: 700; color: var(--g-dark); min-width: 60px; text-align: right; }
input[type=range] { -webkit-appearance: none; flex: 1; height: 4px; background: linear-gradient(to right, var(--g) 0%, var(--g) var(--p,40%), var(--border) var(--p,40%), var(--border) 100%); border-radius: 2px; outline: none; cursor: pointer; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 17px; height: 17px; border-radius: 50%; background: var(--g); box-shadow: 0 2px 8px rgba(59,122,87,.35); cursor: pointer; border: 2.5px solid white; }

/* Toggle */
.tog-row { display: flex; align-items: center; gap: .75rem; padding: .68rem .85rem; background: var(--bg); border: 1.5px solid var(--border); border-radius: 9px; cursor: pointer; transition: all .2s; }
.tog-row:hover { border-color: var(--g-mid); }
.tog-row.on { background: var(--g-light); border-color: var(--g); }
.tog-txt { flex: 1; }
.tog-lbl { font-size: .83rem; font-weight: 600; }
.tog-sub { font-size: .69rem; color: var(--muted); margin-top: 1px; }
.tog-sw { width: 38px; height: 20px; border-radius: 10px; background: var(--border); position: relative; transition: background .3s; flex-shrink: 0; }
.tog-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .3s; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.tog-row.on .tog-sw { background: var(--g); }
.tog-row.on .tog-sw::after { transform: translateX(18px); }

/* Premium button */
.premium-btn {
  width: 100%;
  margin-top: .55rem;
  padding: .62rem;
  background: var(--coral);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--ff-body);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .01em;
  transition: all .2s;
  opacity: .92;
}
.premium-btn:hover { background: var(--coral-light); opacity: 1; transform: translateY(-1px); }

/* ── Account widget ── */
.acct-guest { }   /* contient premium-btn — styles existants */

.acct-free {
  display: flex; flex-direction: column; gap: .4rem;
}
.acct-info {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; padding: 0 .1rem;
}
.acct-email {
  font-size: .72rem; color: var(--muted); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.acct-logout {
  background: none; border: none; font-size: .72rem; color: var(--muted);
  cursor: pointer; padding: .2rem .35rem; border-radius: 6px;
  font-weight: 600; transition: background .15s, color .15s; white-space: nowrap;
  flex-shrink: 0;
}
.acct-logout:hover { background: var(--cream-dark); color: var(--ink); }

.acct-plan {
  display: flex; align-items: center; gap: .65rem;
  padding: .65rem .85rem; border-radius: 14px; border: 1.5px solid;
}
.acct-plan--flash { background: #FFF7F5; border-color: #F0B8A8; }
.acct-plan--boost { background: #F0F7F3; border-color: #A8D0B8; }
.acct-plan-icon   { font-size: 1.3rem; flex-shrink: 0; line-height: 1; }
.acct-plan-body   { flex: 1; min-width: 0; }
.acct-plan-name   { font-family: var(--ff-display); font-weight: 700; font-size: .82rem; color: var(--ink); }
.acct-plan-detail { font-size: .7rem; color: var(--muted); font-weight: 500; margin-top: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Modal Auth ── */
.auth-overlay {
  position: fixed; inset: 0; background: rgba(27,43,32,.5);
  backdrop-filter: blur(4px); z-index: 9000;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.auth-modal {
  background: var(--surface); border-radius: 22px; padding: 2rem 1.75rem;
  width: 100%; max-width: 380px; position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
  animation: auth-pop .28s cubic-bezier(.34,1.4,.64,1);
}
@keyframes auth-pop {
  from { transform: scale(.92) translateY(12px); opacity: 0; }
  to   { transform: scale(1)   translateY(0);    opacity: 1; }
}
.auth-modal-close {
  position: absolute; top: .9rem; right: .9rem;
  background: var(--cream); border: 1.5px solid var(--cream-dark); border-radius: 8px;
  width: 32px; height: 32px; font-size: 1.2rem; color: var(--muted);
  cursor: pointer; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.auth-modal-close:hover { background: var(--cream-dark); }
.auth-modal-title {
  font-family: var(--ff-display); font-size: 1.35rem; font-weight: 900;
  color: var(--ink); margin-bottom: .25rem;
}
.auth-modal-sub {
  font-size: .82rem; color: var(--muted); margin-bottom: 1.25rem; line-height: 1.55;
}
.auth-tabs {
  display: flex; border: 1.5px solid var(--cream-dark); border-radius: 10px;
  overflow: hidden; margin-bottom: 1.25rem;
}
.auth-tab {
  flex: 1; padding: .55rem .5rem; border: none; cursor: pointer;
  font-family: var(--ff-display); font-weight: 700; font-size: .85rem;
  background: var(--cream-dark); color: var(--muted);
  transition: background .15s, color .15s;
}
.auth-tab.active { background: var(--g-dark); color: #fff; }
.auth-fields {
  display: flex; flex-direction: column; gap: .7rem;
}
.auth-input {
  width: 100%; padding: .75rem 1rem;
  border: 1.5px solid var(--cream-dark); border-radius: 10px;
  font-size: .95rem; font-family: var(--ff-body); background: var(--cream);
  color: var(--ink); outline: none; transition: border-color .15s;
}
.auth-input:focus { border-color: var(--g-dark); }
.auth-error {
  font-size: .82rem; color: var(--coral); padding: .4rem .65rem;
  background: #FFF0ED; border-radius: 8px; border: 1px solid #F8C9BE;
}
.auth-submit {
  width: 100%; padding: .85rem 1rem; border: none; border-radius: 12px;
  background: var(--g-dark); color: #fff; font-family: var(--ff-display);
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: background .15s, transform .15s; margin-top: .15rem;
}
.auth-submit:hover:not(:disabled) { background: var(--g-deeper); transform: translateY(-1px); }
.auth-submit:disabled { opacity: .6; cursor: not-allowed; }

/* Plan badge dans sb-logo */
#plan-badge {
  display: inline-block; font-size: .58rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; vertical-align: super; line-height: 1;
  padding: .15rem .4rem; border-radius: 5px; margin-left: .1rem;
  background: var(--cream-dark); color: var(--muted);
  transition: background .3s, color .3s;
}

/* ── Liens légaux (bas de sidebar) ── */
.sb-legal {
  display: flex; align-items: center; justify-content: center;
  gap: .45rem; flex-wrap: wrap;
  margin-top: .6rem;
  font-size: .72rem; color: var(--muted);
}
.sb-legal a, .sb-legal-link {
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.sb-legal a:hover, .sb-legal-link:hover {
  color: var(--g-dark);
  text-decoration: underline;
}
.sb-legal-link.is-active {
  color: var(--g-dark);
  text-decoration: underline;
}
.sb-legal span { opacity: .5; }

/* ── Sections repliables (sidebar) ── */
.sec-title {
  cursor: pointer;
  user-select: none;
}
.sec-title .sec-chevron {
  order: 2;          /* après le trait ::after (order:1) */
  margin-left: .35rem;
  font-size: .7rem;
  color: var(--muted);
  transition: transform .22s ease;
  flex-shrink: 0;
  line-height: 1;
}
.sec-title.collapsed .sec-chevron {
  transform: rotate(-90deg);
}
.sec-body {
  overflow: hidden;
  transition: max-height .28s cubic-bezier(.4,0,.2,1), opacity .22s ease;
  max-height: 800px;
  opacity: 1;
}
.sec-body.collapsed {
  max-height: 0 !important;
  opacity: 0;
}

/* Search button */
.search-btn { width: 100%; padding: .88rem; background: var(--g-dark); color: var(--cream); border: none; border-radius: 14px; font-family: var(--ff-display); font-size: 1.05rem; font-weight: 700; cursor: pointer; transition: all .2s; letter-spacing: .2px; display: flex; align-items: center; justify-content: center; gap: .5rem; box-shadow: 0 4px 16px rgba(42,92,64,.32); }
.search-btn .btn-ico { display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.05rem; line-height: 1; }
.search-btn:hover:not(:disabled) { background: var(--g); transform: translateY(-1px); box-shadow: 0 6px 22px rgba(42,92,64,.4); }
.search-btn:disabled { opacity: .6; cursor: not-allowed; }
.spin { width: 17px; height: 17px; border: 2.5px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .75s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── MAIN MAP AREA ── */
#main {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
/* Motif au-dessus du fond carte (pointer-events: none — interactions carte inchangées) */
#main::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image: radial-gradient(circle at 1px 1px, rgba(61, 122, 87, 0.1) 1px, transparent 0);
  background-size: 24px 24px;
  opacity: 0.7;
}

/* Motif marque : grille de points + M discrets superposés */
#main::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  /* Couche 1 : M icons espacés · Couche 2 : petits points denses */
  background-image:
    url('/static/icons/midspot-motif.svg'),
    radial-gradient(circle, rgba(184,160,136,.55) 1px, transparent 1px);
  background-repeat: repeat, repeat;
  background-size: 200px 200px, 22px 22px;
  opacity: 0.13;
  mix-blend-mode: multiply;
}

/* Accueil : texte centré sur la carte (sous le motif, au-dessus des tuiles) */
#empty.map-welcome-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  pointer-events: none;
  text-align: center;
  padding: 2rem;
}
#empty.map-welcome-overlay .es-title {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--g-dark);
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}
#empty.map-welcome-overlay .es-sub {
  font-size: 0.84rem;
  color: var(--txt);
  line-height: 1.55;
  max-width: 26rem;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}
#empty.map-welcome-overlay .es-hint {
  color: var(--muted);
}
#empty.map-welcome-overlay .es-sub em {
  color: var(--g-dark);
  font-style: normal;
  font-weight: 600;
}

/* Recherche lancée : masque accueil (bureau + mobile) */
#app.midspot-results-mode #empty.map-welcome-overlay {
  display: none !important;
}

/* Badges */
#badges { position: absolute; top: 1rem; left: 50%; transform: translateX(-50%); display: flex; gap: .45rem; z-index: 800; flex-wrap: wrap; justify-content: center; pointer-events: none; }
.m-badge { display: flex; align-items: center; gap: .38rem; padding: .32rem .72rem; background: rgba(254,252,248,.93); backdrop-filter: blur(8px); border-radius: 99px; border: 1.5px solid; font-size: .74rem; font-weight: 600; white-space: nowrap; box-shadow: 0 2px 12px rgba(27,43,32,.1); }
.m-badge[data-pi="0"] { border-color: var(--m-badge-outline-0); color: var(--blue); }
.m-badge[data-pi="1"] { border-color: var(--m-badge-outline-1); color: var(--coral); }
.m-badge[data-pi="2"] { border-color: var(--m-badge-outline-2); color: var(--violet); }
.bd-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* Map control */
.map-ctrl { position: absolute; z-index: 800; background: rgba(254,252,248,.93); backdrop-filter: blur(8px); border: 1.5px solid var(--border); border-radius: 99px; padding: .35rem .8rem; color: var(--txt); font-family: 'Plus Jakarta Sans', sans-serif; font-size: .76rem; cursor: pointer; display: flex; align-items: center; gap: .32rem; transition: all .2s; font-weight: 500; box-shadow: 0 2px 10px rgba(27,43,32,.09); }
.map-ctrl:hover { border-color: var(--g); color: var(--g-dark); }
.map-ctrl.on { border-color: var(--g); color: var(--g-dark); background: var(--g-light); }

/* ── Map account control (top right) ── */
.map-account-control {
  display: none !important;
}

.map-account-control.shifted {
  right: 320px; /* Shift left by history panel width */
}

.map-acct-guest {
  background: rgba(254,252,248,.93);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: .35rem .8rem;
  box-shadow: 0 2px 10px rgba(27,43,32,.09);
}

.map-acct-link {
  color: var(--g-dark);
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .76rem;
  font-weight: 500;
}

.map-acct-link:hover {
  text-decoration: underline;
}

.map-acct-connected {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: rgba(254,252,248,.93);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: .35rem .8rem;
  box-shadow: 0 2px 10px rgba(27,43,32,.09);
}

.map-acct-pseudo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .76rem;
  font-weight: 500;
  color: var(--txt);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* .map-acct-btn — styles définis dans la section principale (ligne ~393) */

/* ── Mobile: hide map account control, add to mobile nav ── */
@media (max-width: 768px) {
  .map-account-control {
    display: none;
  }

  /* .mobile-acct-* supprimé — section remplacée par map-acct-btn */

  .mobile-premium-btn {
    background: var(--coral);
    color: white;
    border: none;
    border-radius: 99px;
    padding: .4rem 1rem;
    font-size: .75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    width: 100%;
  }

  .mobile-premium-btn:hover {
    background: #e07050;
  }
}

@media (min-width: 769px) {
  .mobile-acct-control {
    display: none;
  }

  /* Bouton compte desktop vue map */
  .map-acct-btn {
    display: flex;
    top: 1rem;
    right: 1rem;
  }
}

.map-premium-btn {
  background: var(--coral);
  color: white;
  border: none;
  border-radius: 99px;
  padding: .35rem .8rem;
  font-size: .76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}

.map-premium-btn:hover {
  background: #e07050;
}

.sidebar-premium-wrapper {
  margin-top: .75rem;
  margin-bottom: 1rem;
}

.sidebar-premium-btn {
  width: 100%;
  padding: .6rem;
  background: var(--coral);
  color: var(--cream);
  border: none;
  border-radius: 14px;
  font-family: var(--ff-display);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  box-shadow: 0 4px 16px rgba(200,86,59,.32);
}

.sidebar-premium-btn:hover {
  background: #e07050;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(200,86,59,.4);
}

/* ── CAROUSEL ── */
#carousel { position: absolute; bottom: 0; left: 0; right: 0; z-index: 800; background: rgba(254,252,248,.97); backdrop-filter: blur(16px); border-top: 1.5px solid var(--border); padding: .8rem 1rem .9rem; display: none; flex-direction: column; gap: .55rem; }
.car-hd { display: flex; align-items: center; justify-content: space-between; }
.car-label { font-size: .63rem; text-transform: uppercase; letter-spacing: 1.1px; color: var(--muted); font-weight: 700; font-family: var(--ff-display); }
.car-ctr { font-size: .72rem; color: var(--muted); }
.car-track { display: flex; gap: .6rem; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: .1rem; }
.car-track::-webkit-scrollbar { display: none; }

.s-card { flex-shrink: 0; width: 208px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 20px; padding: .78rem .88rem; scroll-snap-align: start; cursor: pointer; transition: all .2s; display: flex; flex-direction: column; gap: .38rem; box-shadow: 0 4px 24px rgba(27,43,32,.07); position: relative; }

/* Badge "Meilleur choix" — premier résultat */
.sc-best-badge {
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--g-dark);
  color: var(--cream);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .2rem .65rem;
  border-radius: 99px;
  white-space: nowrap;
  font-family: var(--ff-body);
}
.s-card:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(27,43,32,.12); }
.s-card.sel { border: 2px solid var(--g-dark); background: var(--surface); }
.s-card.out-of-range { opacity: .45; filter: grayscale(.6); order: 99; }
.s-card.out-of-range::after { content: '⏱️ Trop loin'; font-size: .65rem; color: var(--coral); display: block; margin-top: .3rem; font-weight: 700; }
.skeleton { pointer-events: none; }
.sk-line {
  background: linear-gradient(90deg, var(--border) 25%, var(--surf2) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.loading-dots { display: flex; gap: 4px; align-items: center; }
.loading-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--g);
  animation: bounce 1s infinite;
}
.loading-dots span:nth-child(2) { animation-delay: .15s; }
.loading-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce {
  0%,100% { transform: translateY(0); opacity: .4; }
  50% { transform: translateY(-4px); opacity: 1; }
}
.sc-cat { font-size: .62rem; text-transform: none; letter-spacing: .04em; color: var(--coral); font-weight: 700; }
.sc-name { font-family: var(--ff-display); font-size: .9rem; font-weight: 700; color: var(--txt); line-height: 1.2; }
.sc-desc { font-size: .73rem; color: var(--muted); line-height: 1.4; }
.sc-hours {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .4rem 0 .2rem;
}

.hours-tag {
  font-size: .7rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 99px;
  white-space: nowrap;
}

.hours-tag--closed {
  background: #fde8e8;
  color: #b91c1c;
}

.hours-tag--warn {
  background: #fef3c7;
  color: #92400e;
}

.hours-tag--info {
  background: #f0fdf4;
  color: #166534;
  font-weight: 400;
}

.sc-phone { font-size: .72rem; color: var(--txt); margin-top: .25rem; }
.sc-phone-lbl { color: var(--muted); font-weight: 600; margin-right: .2rem; }
.m-badge-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  font-size: .65rem;
  font-weight: 800;
  color: inherit;
  opacity: 0.85;
}
.sc-links { display: flex; gap: .4rem; margin-top: .35rem; flex-wrap: wrap; }
.sc-link {
  font-size: .7rem;
  padding: .25rem .55rem;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: all .15s;
  white-space: nowrap;
}
.sc-link:hover {
  border-color: var(--g);
  color: var(--g-dark);
  background: var(--g-light);
}
.sc-maps-link {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}
.sc-maps-pin {
  display: inline-flex;
  flex-shrink: 0;
  color: inherit;
  line-height: 0;
}
.sc-maps-pin svg {
  display: block;
}
.ext-link {
  font-size: .7rem; padding: .25rem .6rem;
  border-radius: 99px; border: 1.5px solid var(--border);
  color: var(--muted); text-decoration: none;
  transition: all .2s; white-space: nowrap;
}
.ext-link:hover {
  border-color: var(--g);
  color: var(--g-dark);
  background: var(--g-light);
}
/* ── Unified badges row (Maps / rating / price / travel chips) ── */
.sc-badges { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .4rem; }
.sc-badge { display: inline-flex; align-items: center; gap: .28rem; white-space: nowrap; font-size: .72rem; font-weight: 600; padding: .18rem .52rem; border-radius: 99px; border: 1.5px solid var(--border); line-height: 1.4; flex-shrink: 0; text-decoration: none; }
.sc-price { color: var(--g-dark); background: var(--g-light); border-color: var(--border); }
.sc-rating { color: #92400e; background: #fef3c7; border-color: #fde68a; }
.sc-maps-link { color: var(--muted); background: var(--surface); transition: all .15s; }
.sc-maps-link:hover { border-color: var(--g); color: var(--g-dark); background: var(--g-light); }
.t-chip { display: inline-flex; align-items: center; gap: .17rem; white-space: nowrap; flex-shrink: 0; font-size: .66rem; padding: .17rem .4rem; border-radius: 99px; border: 1.5px solid; font-weight: 600; }
.t-chip[data-pi="0"] { border-color: rgba(91,127,166,.35); color: var(--blue); background: var(--blue-bg); }
.t-chip[data-pi="1"] { border-color: rgba(200,86,59,.3); color: var(--coral); background: var(--coral-bg); }
.t-chip[data-pi="2"] { border-color: rgba(123,111,168,.35); color: var(--violet); background: var(--violet-bg); }

/* Toast */
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: rgba(254,252,248,.97); border: 1.5px solid var(--coral); color: var(--coral); padding: .5rem 1.2rem; border-radius: 99px; font-size: .81rem; z-index: 9999; white-space: nowrap; box-shadow: 0 4px 20px rgba(27,43,32,.12); animation: fadeUp .25s ease; }
@keyframes fadeUp { from { opacity:0; transform: translateX(-50%) translateY(8px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }

/* Google Map */
#map {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  background: #e8e4dc;
  touch-action: none;
}
/* Zoom Google : style proche de l’ancien contrôle Leaflet */
.gm-bundled-control .gmnoprint > div { border-radius: 10px !important; box-shadow: 0 2px 10px rgba(27,43,32,.09) !important; }

/* ═══ Phone & small tablet — carte plein écran, menu tiroir ═══ */
@media (max-width: 768px) {
  html, body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
  }

  #app {
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    padding-left: max(var(--sal), 0px);
    padding-right: max(var(--sar), 0px);
    padding-top: max(var(--sat), 0px);
  }

  /* Panneau latéral hors flux : tiroir */
  #sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(100vw, 400px);
    max-width: 100%;
    z-index: 1200;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 8px 0 36px rgba(27, 43, 32, 0.16);
    border-right: 1.5px solid var(--border);
    border-bottom: none;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    display: flex;
    flex-direction: column;
  }

  #app.mobile-nav-open #sidebar {
    transform: translateX(0);
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1190;
    background: rgba(22, 35, 28, 0.42);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    pointer-events: none;
  }

  #app.mobile-nav-open .nav-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-burger {
    display: flex;
    top: calc(0.65rem + env(safe-area-inset-top, 0px));
    left: max(0.65rem, env(safe-area-inset-left, 0px));
  }

  .map-acct-btn {
    display: flex;
    flex-direction: row;
    top: calc(0.65rem + env(safe-area-inset-top, 0px));
    right: max(0.65rem, env(safe-area-inset-right, 0px));
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--surf2);
    gap: 0;
    box-shadow: 0 2px 10px rgba(27,43,32,.09);
  }
  .map-acct-btn .map-acct-lbl {
    display: none;
  }

  .nav-panel-close {
    display: flex;
  }

  .sb-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.85rem 1rem 0.75rem;
    flex-shrink: 0;
  }

  .sb-body {
    flex: 1;
    min-height: 0;
    padding: 0.75rem 1rem;
    gap: 0.85rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sb-foot {
    position: sticky;
    bottom: 0;
    flex-shrink: 0;
    background: var(--surface);
    padding: 0.75rem 1rem env(safe-area-inset-bottom, 0px);
    border-top: 1px solid var(--border);
    z-index: 10;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  }

  .search-btn {
    padding: 0.95rem 1rem;
    min-height: 48px;
    touch-action: manipulation;
  }

  .add-p-btn {
    min-height: 44px;
    touch-action: manipulation;
  }

  /* iOS: évite le zoom au focus si police < 16px */
  .addr-inp,
  .p-name-inp {
    font-size: 16px;
  }

  .rm-btn,
  .addr-x {
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .t-pill {
    min-height: 40px;
    padding: 0.35rem 0.75rem;
  }

  .chip {
    min-height: 40px;
    padding: 0.35rem 0.75rem;
    display: inline-flex;
    align-items: center;
  }

  .chips-more-btn {
    min-height: 40px;
    padding: 0.4rem 1rem;
    touch-action: manipulation;
  }

  .tog-row {
    min-height: 48px;
    padding: 0.75rem 0.9rem;
  }

  .b-opt {
    min-height: 44px;
  }

  #main {
    flex: 1;
    min-height: 0;
    width: 100%;
  }

  #badges {
    top: calc(3.35rem + env(safe-area-inset-top, 0px));
    left: 0.5rem;
    right: 0.5rem;
    transform: none;
    max-width: calc(100% - 1rem);
  }

  .m-badge {
    font-size: 0.68rem;
    padding: 0.3rem 0.55rem;
    white-space: normal;
    text-align: center;
  }

  .map-ctrl {
    min-height: 44px;
    padding: 0.45rem 0.95rem;
    touch-action: manipulation;
  }

  #carousel {
    padding: 0.65rem 0.75rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    max-height: min(42vh, 320px);
  }

  .car-track {
    gap: 0.5rem;
    scroll-padding-left: 0.25rem;
    scroll-padding-right: 0.25rem;
  }

  .s-card {
    width: min(240px, calc(100vw - 3rem));
    max-width: 280px;
    padding: 0.85rem 0.95rem;
  }

  .ext-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  .toast {
    left: max(1rem, env(safe-area-inset-left, 0px));
    right: max(1rem, env(safe-area-inset-right, 0px));
    transform: none;
    width: auto;
    max-width: none;
    white-space: normal;
    text-align: center;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    animation: fadeUpMob 0.25s ease;
  }

  .gm-bundled-control {
    margin-bottom: env(safe-area-inset-bottom, 0px) !important;
    margin-right: env(safe-area-inset-right, 0px) !important;
  }
}

@keyframes fadeUpMob {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Skeleton loading ── */

@media (hover: none) and (pointer: coarse) {
  .s-card:hover {
    transform: none;
  }

  .search-btn:hover:not(:disabled) {
    transform: none;
  }

  .nav-burger:hover {
    background: var(--cream-dark);
    border-color: var(--muted);
  }
}

@media (prefers-reduced-motion: reduce) {
  #sidebar,
  .nav-backdrop,
  .nav-burger__lines span {
    transition: none !important;
  }
}


/* ═══════════════════════════════════════════════════════════════
   LEGAL FOOTER
   ═══════════════════════════════════════════════════════════════ */

.main-legal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .25rem .6rem;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  font-size: .7rem;
  color: var(--muted);
  background: var(--cream);
  position: relative;
  z-index: 1;
}

.main-legal-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}

.main-legal-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.main-legal-footer .sep {
  color: var(--border);
  user-select: none;
}

.main-legal-cookies-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: .7rem;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.main-legal-cookies-btn:hover {
  color: var(--ink);
}


/* ═══════════════════════════════════════════════════════════════
   COOKIE BANNER
   ═══════════════════════════════════════════════════════════════ */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9500;
  background: var(--cream);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0,0,0,.1);
  padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
  animation: slideUpBanner .25s ease;
}

@keyframes slideUpBanner {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.cookie-banner-content {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 200px;
}

.cookie-banner-text strong {
  display: block;
  font-size: .9rem;
  color: var(--ink);
  margin-bottom: .2rem;
}

.cookie-banner-text p {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.cookie-banner-text a {
  color: var(--coral);
  text-decoration: none;
}

.cookie-banner-text a:hover {
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cookie-btn {
  border: none;
  border-radius: 8px;
  padding: .5rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s, transform .1s;
}

.cookie-btn:active {
  transform: scale(.97);
}

.cookie-btn--primary {
  background: var(--coral);
  color: #fff;
}

.cookie-btn--primary:hover {
  opacity: .88;
}

.cookie-btn--secondary {
  background: var(--surf2);
  color: var(--ink);
  border: 1px solid var(--border);
}

.cookie-btn--secondary:hover {
  background: var(--cream-dark);
}

.cookie-btn--ghost {
  background: none;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding-left: .4rem;
  padding-right: .4rem;
}

.cookie-btn--ghost:hover {
  color: var(--ink);
}


/* ═══════════════════════════════════════════════════════════════
   COOKIE PREFERENCES MODAL
   ═══════════════════════════════════════════════════════════════ */

.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9600;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn .2s ease;
}

@media (min-width: 560px) {
  .cookie-modal-overlay {
    align-items: center;
  }
}

.cookie-modal {
  background: var(--surf);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  animation: slideUpModal .25s ease;
}

@media (min-width: 560px) {
  .cookie-modal {
    border-radius: 16px;
    max-height: 85dvh;
  }
}

@keyframes slideUpModal {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.cookie-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cookie-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.cookie-modal-close {
  background: var(--surf2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

.cookie-modal-close:hover {
  background: var(--cream-dark);
}

.cookie-modal-body {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.cookie-category {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .85rem 1rem;
  background: var(--cream);
}

.cookie-cat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.cookie-cat-info {
  flex: 1;
}

.cookie-cat-name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .2rem;
}

.cookie-cat-desc {
  font-size: .75rem;
  color: var(--muted);
  line-height: 1.45;
}

.cookie-cat-desc a {
  color: var(--coral);
  text-decoration: none;
}

.cookie-cat-desc a:hover {
  text-decoration: underline;
}

/* Toggle pill */
.cookie-toggle {
  flex-shrink: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: .4rem;
}

.cookie-toggle--locked {
  cursor: default;
}

.cookie-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  width: 40px;
  height: 22px;
  background: var(--border);
  border-radius: 11px;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}

.cookie-toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.cookie-toggle-input:checked + .cookie-toggle-slider {
  background: var(--coral);
}

.cookie-toggle-input:checked + .cookie-toggle-slider::after {
  transform: translateX(18px);
}

.cookie-toggle--locked .cookie-toggle-slider {
  background: #22c55e;
  cursor: not-allowed;
}

.cookie-toggle--locked .cookie-toggle-slider::after {
  transform: translateX(18px);
}

.cookie-toggle-on {
  font-size: .7rem;
  font-weight: 600;
  color: #22c55e;
  white-space: nowrap;
}

/* Disabled category (analytics placeholder) */
.cookie-category--disabled {
  opacity: .55;
}

.cookie-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}


/* ═══════════════════════════════════════════════════════════════
   MAP CONSENT PLACEHOLDER
   ═══════════════════════════════════════════════════════════════ */

#map-consent-placeholder {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-consent-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 320px;
}

.map-consent-ico {
  font-size: 2.5rem;
  line-height: 1;
}

.map-consent-msg strong {
  font-size: 1rem;
  color: var(--ink);
}

.map-consent-msg p {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.map-consent-btn {
  background: var(--coral);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .55rem 1.1rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
  margin-top: .25rem;
}

.map-consent-btn:hover {
  opacity: .85;
}

/* ── Map Share Button ───────────────────────────────────────────────────────── */

/* car-hd droite : compteur + bouton partager */
.car-hd-right {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.map-share-container {
  display: none; /* togglé par JS en inline-flex */
}

.map-share-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .7rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--txt);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}

.map-share-btn:hover {
  background: var(--cream-dark);
  border-color: var(--g-mid);
  color: var(--g-dark);
}

.map-share-btn:active {
  transform: scale(.97);
}

.map-share-btn__txt {
  font-size: .73rem;
}


/* ═══════════════════════════════════════════════════════════════
   HISTORY PANEL
   ═══════════════════════════════════════════════════════════════ */

/* Note: .history-btn styles moved to .sb-foot-btn (sidebar footer integration) */

.history-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 299;
  background: rgba(0,0,0,.35);
}
.history-overlay.open {
  display: block;
}

.history-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 92vw);
  z-index: 300;
  background: var(--cream);
  box-shadow: -4px 0 24px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  border-radius: 16px 0 0 16px;
}
.history-panel.open {
  transform: translateX(0);
}

.history-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem .75rem;
  border-bottom: 1px solid var(--cream-dark);
  font-weight: 700;
  font-size: .95rem;
  color: var(--ink);
  flex-shrink: 0;
}
.history-hd button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--muted);
  padding: .1rem .4rem;
  border-radius: 6px;
}
.history-hd button:hover { background: var(--cream-dark); }

.history-list {
  overflow-y: auto;
  flex: 1;
  padding: .5rem 0;
}

.h-empty {
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  padding: 2rem 1rem;
  margin: 0;
}

.h-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1.2rem;
  cursor: pointer;
  transition: background .12s;
}
.h-item:hover {
  background: var(--cream-dark);
}

.h-emoji {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 2rem;
  text-align: center;
}

.h-info {
  flex: 1;
  min-width: 0;
}

.h-city {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Nouvelles classes enrichies */
.h-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.h-addrs {
  font-size: .8rem;
  font-weight: 500;
  color: var(--g-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: .18rem;
  letter-spacing: -.01em;
}

.h-meta {
  font-size: .72rem;
  color: var(--muted);
  margin-top: .22rem;
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}

.h-tag {
  background: var(--cream-dark);
  color: var(--ink);
  border-radius: 5px;
  padding: .08rem .42rem;
  font-size: .68rem;
  font-weight: 600;
  white-space: nowrap;
}

.h-arr {
  color: var(--muted);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   ACCOUNT PANEL
   ═══════════════════════════════════════════════════════════════ */

.account-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 299;
  background: rgba(0,0,0,.35);
}
.account-overlay.open {
  display: block;
}

.account-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 92vw);
  z-index: 300;
  background: var(--cream);
  box-shadow: -4px 0 24px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  border-radius: 16px 0 0 16px;
}
.account-panel.open {
  transform: translateX(0);
}

.account-hd {
  position: relative;
  padding: 1.25rem 1.2rem 1rem;
  border-bottom: 1px solid var(--cream-dark);
  background: linear-gradient(135deg, rgba(61,122,87,.07) 0%, transparent 100%);
  flex-shrink: 0;
}

.account-close-btn {
  position: absolute;
  top: .9rem;
  right: .9rem;
  background: var(--surface);
  border: 1.5px solid var(--cream-dark);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: background .2s, color .2s, border-color .2s;
}
.account-close-btn:hover {
  background: var(--cream-dark);
  color: var(--ink);
}

.account-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-right: 2rem;
}

.account-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--g-dark);
  color: var(--cream);
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: .02em;
  flex-shrink: 0;
}

.account-display-name {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .15rem;
}

.account-email {
  font-size: .8rem;
  color: var(--muted);
}

.account-body {
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  padding: 0 0 1rem;
}

.account-credit-card {
  margin: 1rem 1rem .5rem;
  padding: 1rem;
  background: var(--surface);
  border: 1.5px solid var(--cream-dark);
  border-radius: 14px;
}

.credit-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.credit-badge {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .25rem .75rem;
  border-radius: 99px;
  background: var(--g-dark);
  color: var(--cream);
}
.credit-badge--flash { background: var(--coral); }
.credit-badge--boost {
  background: linear-gradient(135deg, var(--g-dark) 0%, #1a4d2e 100%);
}

.credit-upgrade-link {
  font-size: .78rem;
  font-weight: 600;
  color: var(--g-dark);
  text-decoration: none;
  transition: opacity .2s;
}
.credit-upgrade-link:hover { opacity: .7; }

.credit-gauge-wrap {
  margin-bottom: .75rem;
}
.credit-gauge-label {
  font-size: .82rem;
  color: var(--txt);
  margin-bottom: .4rem;
}
.credit-gauge-label span {
  font-weight: 700;
  color: var(--ink);
}

.credit-gauge-bar {
  height: 6px;
  background: var(--cream-dark);
  border-radius: 99px;
  overflow: hidden;
}
.credit-gauge-fill {
  height: 100%;
  background: var(--g-dark);
  border-radius: 99px;
  transition: width .4s ease;
}
.credit-gauge-fill--low { background: var(--coral); }

.credit-recharge-btn {
  width: 100%;
  padding: .6rem;
  background: var(--g-dark);
  color: var(--cream);
  border: none;
  border-radius: 10px;
  font-family: var(--ff-display);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
}
.credit-recharge-btn:hover { opacity: .85; }
.credit-recharge-btn--secondary {
  background: var(--surface);
  border: 1.5px solid var(--g-mid);
  color: var(--g-dark);
}

.account-nav {
  padding: .5rem 0;
}

.account-nav-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1.2rem;
  min-height: 48px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
  color: var(--ink);
  font-family: inherit;
}
.account-nav-row:hover {
  background: var(--cream-dark);
}
.account-nav-row:active {
  background: rgba(61,122,87,.1);
}

.account-nav-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1.5px solid var(--cream-dark);
  border-radius: 10px;
  color: var(--g-dark);
  flex-shrink: 0;
}

.account-nav-label {
  flex: 1;
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink);
}

.account-nav-chevron {
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 300;
}

.account-nav-sep {
  height: 1px;
  background: var(--cream-dark);
  margin: .25rem 1.2rem;
}

.account-nav-row--danger .account-nav-icon {
  color: var(--coral);
  border-color: rgba(220,80,60,.2);
  background: rgba(220,80,60,.05);
}
.account-nav-row--danger .account-nav-label {
  color: var(--coral);
}

.account-subsection {
  position: absolute;
  inset: 0;
  background: var(--cream);
  z-index: 10;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.account-subsection.open {
  transform: translateX(0);
  pointer-events: auto;
}
.account-subsection[hidden] {
  display: none !important;
}

.account-subsection-hd {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--cream-dark);
  font-weight: 700;
  font-size: .95rem;
  color: var(--ink);
  flex-shrink: 0;
}

.account-back-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .9rem;
  color: var(--g-dark);
  font-weight: 600;
  padding: .2rem .4rem;
  font-family: inherit;
}

.profile-view-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .85rem 1.2rem;
  border-bottom: 1px solid var(--cream-dark);
  gap: .75rem;
}
.profile-view-label {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  flex-shrink: 0;
}
.profile-view-value {
  font-size: .88rem;
  color: var(--ink);
  font-weight: 500;
  text-align: right;
  word-break: break-word;
}

.profile-edit-trigger {
  margin: 1rem 1.2rem;
  width: calc(100% - 2.4rem);
  padding: .7rem;
  background: var(--surface);
  border: 1.5px solid var(--g-mid);
  border-radius: 10px;
  font-family: var(--ff-display), var(--ff-body), sans-serif;
  font-size: .85rem;
  font-weight: 700;
  color: var(--g-dark);
  cursor: pointer;
}

#profile-edit {
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  flex: 1;
  overflow-y: auto;
}
#profile-edit input {
  padding: .6rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-family: inherit;
  font-size: .88rem;
  color: var(--txt);
}
#profile-edit input:focus {
  outline: none;
  border-color: var(--g-mid);
}
#profile-edit input:disabled { opacity: .5; }

.profile-edit-actions {
  display: flex;
  gap: .5rem;
  margin-top: .25rem;
}
.profile-edit-actions button:first-child {
  flex: 1;
  padding: .65rem;
  background: var(--surface);
  border: 1.5px solid var(--cream-dark);
  border-radius: 10px;
  font-size: .85rem;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
}
.profile-save-btn {
  flex: 2;
  padding: .65rem;
  background: var(--g-dark);
  color: var(--cream);
  border: none;
  border-radius: 10px;
  font-family: var(--ff-display), var(--ff-body), sans-serif;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
}
.profile-save-btn:hover {
  background: var(--g-deeper);
}

.profile-save-msg {
  font-size: .75rem;
  color: var(--g-dark);
  font-weight: 500;
  min-height: 1.2em;
}

#account-section-profile #profile-view {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
#account-section-profile > .profile-save-msg {
  margin: 0 1.2rem 1rem;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .account-panel {
    width: 100%;
    border-radius: 0;
  }
}
