/* SnapSpot Paris — La Carte.
   DESIGN "HYBRIDE ASSUMÉ" (pivot 07/2026) : la carte garde ses surfaces
   sombres immersives or/bleu, mais reprend la typo (Playfair Display),
   l'échelle (--sp-*, --r-*) et les composants de la webapp V1
   (client/webapp/css/styles.css) — un bouton carte = un bouton app. */

:root {
  /* Couleurs partagées avec la webapp V1 */
  --primary: rgb(70, 130, 220);
  --primary-dark: rgb(50, 110, 200);
  --gold: rgb(255, 193, 7);
  --gold-soft: #ffd166;

  /* Surfaces sombres propres à la carte */
  --ink: #14161f;
  --panel: rgba(20, 22, 31, 0.92);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #f2f3f7;
  --text-dim: rgba(242, 243, 247, 0.62);

  /* Échelle partagée (mêmes valeurs que la webapp V1) */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-lg: 16px;
  --sp-xl: 20px;
  --sp-2xl: 24px;
  --sp-3xl: 32px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-pill: 999px;
  --r-full: 50%;

  /* Ombres : mêmes crans que la V1, densité adaptée aux surfaces sombres */
  --shadow-sm: 0 1px 3px rgba(5, 6, 12, 0.35);
  --shadow-md: 0 4px 12px rgba(5, 6, 12, 0.4);
  --shadow-lg: 0 12px 40px rgba(10, 12, 20, 0.45);
  --radius: var(--r-xl);
  --shadow: var(--shadow-lg);

  font-size: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; overflow: hidden; }

body {
  /* Même pile que la webapp V1 : Playfair Display en tête, c'est l'identité. */
  font-family: 'Playfair Display', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  background: #e8eaee;
}

/* Les contrôles de formulaire n'héritent pas de la police par défaut :
   sans ceci, les boutons resteraient en police système (≠ webapp). */
button, input, select, textarea { font-family: inherit; }

#map { position: absolute; inset: 0; }

/* ---------- Topbar ---------- */

#topbar {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 12px; right: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  z-index: 20;
  pointer-events: none;
}
#topbar > * { pointer-events: auto; }

.brand {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.brand-logo { width: 28px; height: 28px; flex-shrink: 0; display: block; }
.brand-text { font-weight: 700; letter-spacing: .2px; line-height: 1.05; display: flex; flex-direction: column; }
.brand-text em { font-style: normal; color: var(--gold-soft); }
.brand-text small { font-weight: 500; font-size: .68rem; color: var(--text-dim); letter-spacing: 1.2px; text-transform: uppercase; }

.progress-pill {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 8px 16px;
  min-width: 190px;
  box-shadow: var(--shadow);
}
#progress-label { font-size: .82rem; font-weight: 600; color: var(--gold-soft); }
.progress-track {
  height: 6px; margin-top: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px; overflow: hidden;
}
#progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold), #ffe08a);
  border-radius: 99px;
  transition: width .8s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.7);
}

/* ---------- Bouton + panneau arrondissements ---------- */

#btn-arrs {
  position: fixed;
  left: 12px; bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 20;
  display: flex; align-items: center; gap: 7px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-weight: 600; font-size: .88rem;
  padding: 11px 16px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
#btn-arrs:hover { border-color: var(--gold); }

/* ---------- Explorer les spots (bandeau bas, js/spotsnav.js) ---------- */

#btn-spots {
  position: fixed;
  right: 12px; bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 20;
  display: flex; align-items: center; gap: 7px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-weight: 600; font-size: .88rem;
  padding: 11px 16px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
#btn-spots:hover, #btn-spots.active { border-color: var(--gold); }

#spotsnav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 26; /* au-dessus du hub (20), sous les sheets (30+) */
  background: var(--panel);
  border-top: 1px solid var(--panel-border);
  backdrop-filter: blur(14px);
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  transform: translateY(115%);
  transition: transform .38s cubic-bezier(.2, .8, .2, 1);
}
#spotsnav.open { transform: none; }

.sn-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 6px;
  font-weight: 700; font-size: .92rem;
}
.sn-head small { color: var(--text-dim); font-weight: 400; }
#spotsnav-close {
  background: none; border: none; color: var(--text-dim);
  font-size: 1rem; cursor: pointer; padding: 4px 8px;
}

.sn-wrap { position: relative; }
#sn-strip {
  display: flex; gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 14px 12px;
  scrollbar-width: none;
}
#sn-strip::-webkit-scrollbar { display: none; }

.sn-card {
  position: relative;
  flex: 0 0 200px; height: 116px;
  border-radius: var(--r-lg);
  overflow: hidden;
  scroll-snap-align: center;
  border: 2px solid var(--panel-border);
  background: #232633;
  cursor: pointer;
  transition: border-color .25s, transform .25s;
}
.sn-card.selected { border-color: var(--gold-soft); transform: translateY(-3px); }

.sn-img {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 30px;
  background: linear-gradient(140deg, #2d3145, #191b26);
  background-size: cover; background-position: center;
}
.sn-img.loaded span { display: none; }

.sn-info {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 10px 8px;
  background: linear-gradient(transparent, rgba(8, 9, 14, 0.9));
  line-height: 1.25;
}
.sn-info b {
  display: block;
  font-size: .82rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sn-info small { color: var(--text-dim); font-size: .72rem; }

/* Pastille d'état, même code couleur que les arches */
.sn-dot {
  position: absolute; top: 8px; right: 8px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #6b7280;
}
.sn-card[data-status="color"] .sn-dot { background: #7eb1ff; box-shadow: 0 0 8px #7eb1ff; }
.sn-card[data-status="gold"]  .sn-dot { background: var(--gold-soft); box-shadow: 0 0 8px var(--gold-soft); }

/* Flèches de défilement — inutiles au doigt, réservées à la souris */
#sn-prev, #sn-next {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--text);
  font-size: 1.2rem; line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}
#sn-prev { left: 8px; }
#sn-next { right: 8px; }
#sn-prev:hover, #sn-next:hover { border-color: var(--gold); }
@media (pointer: coarse) {
  #sn-prev, #sn-next { display: none; }
}

#panel {
  position: fixed;
  left: 12px; bottom: 70px;
  width: min(330px, calc(100vw - 24px));
  max-height: min(62vh, 560px);
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(14px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 25;
  transform: translateX(-120%);
  opacity: 0;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .3s;
}
#panel.open { transform: none; opacity: 1; }

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
}
.panel-head h3 { font-size: .98rem; }
#panel-close {
  background: none; border: none; color: var(--text-dim);
  font-size: 1rem; cursor: pointer; padding: 4px 8px;
}

#panel-rows { overflow-y: auto; padding: 0 10px 8px; }
.arr-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px;
  border-radius: var(--r-md);
  font-size: .85rem;
  cursor: pointer;
}
.arr-row:hover { filter: brightness(1.35); }
.arr-row.color { background: rgba(70, 130, 220, 0.14); }
.arr-row.color .arr-name { color: #9cc4ff; font-weight: 700; }
.arr-row.gold { background: rgba(255, 193, 7, 0.12); }
.arr-row.gold .arr-name { color: var(--gold-soft); font-weight: 700; }
.arr-name { width: 64px; flex-shrink: 0; }
.arr-bar {
  flex: 1; height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px; overflow: hidden;
}
.arr-bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold), #ffe08a);
  border-radius: 99px;
  transition: width .6s;
}
.arr-count { width: 36px; text-align: right; color: var(--text-dim); font-variant-numeric: tabular-nums; }

.panel-foot { padding: 10px 16px 14px; border-top: 1px solid var(--panel-border); }
#panel-stats { font-size: .76rem; color: var(--text-dim); margin-bottom: 8px; }
#btn-reset {
  background: none; border: 1px solid var(--panel-border);
  color: var(--text-dim); font-size: .78rem;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
}
#btn-reset:hover { color: #ff8989; border-color: #ff8989; }

/* ---------- Hub (la carte = écran d'accueil) ---------- */

#hub {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  gap: 10px;
  z-index: 20;
}
.hub-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: transform .15s, border-color .15s;
}
.hub-btn:hover { border-color: var(--gold); transform: translateY(-2px); }
.hub-btn:active { transform: scale(.94); }
.hub-btn span { font-size: 1.25rem; line-height: 1; }
.hub-btn small { font-size: .56rem; color: var(--text-dim); letter-spacing: .2px; }

/* Session : avatar + prénom sur le bouton profil du hub (rendu par app.js) */
.hub-avatar {
  width: 26px; height: 26px;
  border-radius: var(--r-full);
  object-fit: cover;
}
/* .hub-btn .hub-avatar--initial : plus spécifique que `.hub-btn span` (qui
   impose 1.25rem aux icônes emoji) pour garder l'initiale à taille lisible. */
.hub-btn .hub-avatar--initial {
  display: flex; align-items: center; justify-content: center;
  background: var(--primary);
  color: #fff;
  font-weight: 700; font-size: .82rem;
}
.hub-btn.logged { border-color: rgba(255, 193, 7, 0.4); }
.hub-btn.logged small { color: var(--text); font-weight: 600; }

.btn-soft {
  display: block;
  margin: 10px auto 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  font-size: .76rem;
  padding: 7px 14px;
  border-radius: 999px;
}
.btn-soft[disabled] { cursor: default; opacity: .8; }

/* ---------- Fiche spot ---------- */

#sheet, #booking, #profile, #chat {
  position: fixed;
  left: 50%; bottom: 0;
  transform: translate(-50%, 112%);
  width: min(480px, 100vw);
  max-height: 72vh;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-bottom: none;
  backdrop-filter: blur(16px);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  box-shadow: var(--shadow);
  z-index: 30;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
  overflow-y: auto;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
}
#sheet.open, #booking.open, #profile.open, #chat.open { transform: translate(-50%, 0); }
#booking, #profile { z-index: 35; } /* au-dessus de la fiche spot */
#chat { z-index: 40; } /* au-dessus de la réservation (ouvert depuis elle) */

.sheet-grab {
  width: 42px; height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 99px;
  margin: 2px auto 12px;
}
#sheet-close, #booking-close, #profile-close, #chat-close {
  position: absolute; top: 12px; right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: none; color: var(--text-dim);
  width: 30px; height: 30px; border-radius: 50%;
  cursor: pointer; font-size: .9rem;
}

#sheet-content h2 { font-size: 1.25rem; padding-right: 34px; }
.sheet-meta { color: var(--text-dim); font-size: .82rem; margin-top: 4px; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.badge {
  font-size: .73rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.06);
}
.badge.color { color: #9cc4ff; border-color: rgba(70, 130, 220, 0.5); background: rgba(70, 130, 220, 0.14); }
.badge.done { color: var(--gold-soft); border-color: rgba(255, 193, 7, 0.45); background: rgba(255, 193, 7, 0.1); }
.badge.todo { color: var(--text-dim); }
.badge.gh { color: #ffce7a; }

.desc { font-size: .92rem; line-height: 1.45; }
.conseil {
  margin-top: 8px;
  font-size: .85rem; line-height: 1.4;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--gold);
  padding: 8px 12px;
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.ph {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.ph.placeholder.p0 { background: linear-gradient(135deg, #3a3f52, #23263a); }
.ph.placeholder.p1 { background: linear-gradient(135deg, #44405c, #1f2233); }
.ph.placeholder.p2 { background: linear-gradient(135deg, #32445c, #1c2030); }
.ph.placeholder span { opacity: .35; }
.ph.user img { width: 100%; height: 100%; object-fit: cover; }
.ph.user span {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: .66rem; font-weight: 600; text-align: center;
  padding: 3px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}
.ph.user { outline: 2px solid var(--gold); outline-offset: -2px; }
.ph.user.color { outline-color: var(--primary); }
.gallery-note { font-size: .7rem; color: var(--text-dim); margin-top: 6px; text-align: center; }

.cta-zone { margin-top: var(--sp-lg); }
/* Boutons alignés sur la webapp V1 (.btn/.btn-primary : fond plat, radius
   --r-lg, graisse 600) ; le halo lumineux reste, c'est l'ambiance carte. */
.btn-primary {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: .95rem; font-weight: 600;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(70, 130, 220, 0.4);
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(.97); }
.btn-gold {
  width: 100%;
  background: var(--gold);
  color: #2a1d00;
  border: none;
  font-size: .95rem; font-weight: 600;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(255, 173, 7, 0.4);
  transition: background .2s, transform .15s;
}
.btn-gold:hover { background: #ffaa00; }
.btn-gold:active { transform: scale(.97); }
.cta-hint { text-align: center; font-size: .72rem; color: var(--text-dim); margin-top: 8px; }
.cta-status { font-size: .85rem; line-height: 1.45; margin-top: 10px; text-align: center; }
.btn-demo {
  display: block;
  margin: 10px auto 0;
  background: rgba(70, 130, 220, 0.16);
  border: 1px solid rgba(70, 130, 220, 0.5);
  color: #9cc4ff;
  font-size: .8rem; font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.done-line {
  text-align: center;
  font-weight: 700;
  padding: var(--sp-md);
  border-radius: var(--r-lg);
}
.done-line.gold {
  color: var(--gold-soft);
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.35);
}
.done-line.blue {
  color: #9cc4ff;
  background: rgba(70, 130, 220, 0.12);
  border: 1px solid rgba(70, 130, 220, 0.4);
}

/* Section upsell "passe en or" — depuis le 02/07 elle ouvre la cta-zone
   (ordre commercial : payant d'abord), d'où les marges sur ce qui la suit. */
.or-section {
  padding: 14px;
  border: 1px dashed rgba(255, 193, 7, 0.45);
  border-radius: var(--r-lg);
  background: rgba(255, 193, 7, 0.05);
}
.or-section + .btn-primary,
.or-section + .done-line { margin-top: var(--sp-lg); }
.or-title { font-weight: 700; color: var(--gold-soft); margin-bottom: 6px; }
.or-section p { font-size: .82rem; line-height: 1.45; color: var(--text-dim); margin-bottom: 10px; }
.or-section .btn-gold[disabled] { opacity: .55; cursor: default; box-shadow: none; }
.btn-demo-mini {
  display: block;
  margin: 8px auto 0;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: .74rem;
  text-decoration: underline dotted;
  cursor: pointer;
}
.btn-demo-mini:hover { color: #9cc4ff; }

/* Mise en valeur bleu/or dans l'onboarding */
.b-blue { color: #9cc4ff; }
.b-gold { color: var(--gold-soft); }

/* ---------- Réservation (phase B) ---------- */

.bk-head {
  display: flex; align-items: center; gap: var(--sp-sm);
  padding-right: 34px; /* place du bouton fermer */
}
.bk-head h2 { font-size: 1.15rem; }
.bk-back {
  flex-shrink: 0;
  width: 30px; height: 30px;
  background: rgba(255, 255, 255, 0.08);
  border: none; color: var(--text);
  border-radius: var(--r-full);
  cursor: pointer; font-size: .95rem;
}
.bk-back:hover { background: rgba(255, 255, 255, 0.16); }
.bk-back-spacer { width: 0; }
.bk-spot { color: var(--text-dim); font-size: .82rem; margin: 4px 0 var(--sp-md); }

.bk-list { display: flex; flex-direction: column; gap: var(--sp-sm); }
.bk-row {
  display: flex; align-items: center; gap: var(--sp-md);
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: var(--r-lg);
  padding: 10px 14px;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.bk-row:hover { border-color: var(--gold); background: rgba(255, 255, 255, 0.07); }
.bk-avatar {
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  object-fit: cover;
  flex-shrink: 0;
}
.bk-avatar--initial {
  display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff;
  font-weight: 700;
}
.bk-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bk-row-name { font-weight: 600; }
.bk-row-name em { font-style: normal; color: #7ddc8f; font-size: .8rem; }
.bk-row-sub { font-size: .78rem; color: var(--text-dim); }
.bk-row-price { font-weight: 700; color: var(--gold-soft); white-space: nowrap; }
.bk-pack-emoji { font-size: 1.5rem; width: 40px; text-align: center; flex-shrink: 0; }

.bk-days {
  display: flex; gap: var(--sp-sm);
  overflow-x: auto;
  padding-bottom: var(--sp-sm);
  margin-bottom: var(--sp-sm);
}
.bk-day {
  display: flex; flex-direction: column; align-items: center;
  gap: 1px;
  min-width: 52px;
  padding: 8px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: var(--r-md);
  color: var(--text);
  cursor: pointer;
}
.bk-day small { font-size: .62rem; color: var(--text-dim); text-transform: capitalize; }
.bk-day b { font-size: 1.05rem; }
.bk-day.sel { border-color: var(--gold); background: rgba(255, 193, 7, 0.12); }
.bk-day.sel small { color: var(--gold-soft); }

.bk-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: var(--sp-sm);
}
.bk-slot {
  padding: 9px 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: var(--r-md);
  color: var(--text);
  font-weight: 600; font-size: .88rem;
  cursor: pointer;
}
.bk-slot:hover, .bk-slot.sel { border-color: var(--gold); background: rgba(255, 193, 7, 0.12); }

.bk-recap {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: var(--r-lg);
  padding: var(--sp-md) var(--sp-lg);
  margin-bottom: var(--sp-lg);
}
.bk-recap-row {
  display: flex; justify-content: space-between; gap: var(--sp-md);
  padding: 6px 0;
  font-size: .9rem;
}
.bk-recap-row span { color: var(--text-dim); }
.bk-recap-total {
  border-top: 1px solid var(--panel-border);
  margin-top: 4px; padding-top: 10px;
}
.bk-recap-total b { color: var(--gold-soft); font-size: 1.05rem; }

.bk-empty { text-align: center; padding: var(--sp-xl) var(--sp-md); color: var(--text-dim); font-size: .9rem; line-height: 1.5; }
.bk-empty p { margin-bottom: var(--sp-md); }
.bk-login { display: block; text-decoration: none; text-align: center; }

/* ---------- Profil & progression (phase C) ---------- */

.pf-head {
  display: flex; align-items: center; gap: var(--sp-md);
  padding-right: 34px; /* place du bouton fermer */
  margin-bottom: var(--sp-lg);
}
.pf-avatar {
  width: 52px; height: 52px;
  border-radius: var(--r-full);
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 193, 7, 0.4);
}
.pf-avatar--initial {
  display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff;
  font-weight: 700; font-size: 1.3rem;
}
.pf-id h2 { font-size: 1.2rem; line-height: 1.2; }
.pf-link { font-size: .78rem; color: var(--text-dim); text-decoration: none; }
.pf-link:hover { color: var(--gold-soft); }
.pf-link--center { display: block; text-align: center; margin-top: var(--sp-sm); }

.pf-level {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: var(--r-lg);
  padding: var(--sp-md) var(--sp-lg);
  margin-bottom: var(--sp-md);
}
.pf-level-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .92rem;
  margin-bottom: 8px;
}
.pf-level-row span { color: var(--gold-soft); font-weight: 700; }
.pf-level-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px; overflow: hidden;
}
.pf-level-bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold), #ffe08a);
  border-radius: 99px;
  transition: width .8s cubic-bezier(.2, .8, .2, 1);
}

.pf-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
}
.pf-stat {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: var(--r-md);
  padding: 10px 6px;
  text-align: center;
  display: flex; flex-direction: column; gap: 2px;
}
.pf-stat b { font-size: 1.35rem; }
.pf-stat small { font-size: .68rem; color: var(--text-dim); }
.pf-stat--gold b { color: var(--gold-soft); }

.pf-h3 { font-size: .95rem; margin-bottom: var(--sp-sm); }
.pf-achs, .pf-ress { display: flex; flex-direction: column; gap: var(--sp-sm); margin-bottom: var(--sp-lg); }

.pf-ach {
  display: flex; align-items: center; gap: var(--sp-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: var(--r-md);
  padding: 8px 12px;
}
.pf-ach.done { border-color: rgba(255, 193, 7, 0.35); background: rgba(255, 193, 7, 0.06); }
.pf-ach-icon { font-size: 1.3rem; width: 30px; text-align: center; flex-shrink: 0; }
.pf-ach-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pf-ach-title { font-weight: 600; font-size: .85rem; }
.pf-ach-desc { font-size: .72rem; color: var(--text-dim); }
.pf-ach-bar {
  height: 4px; margin-top: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px; overflow: hidden;
}
.pf-ach-bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold), #ffe08a);
  border-radius: 99px;
}
.pf-ach-state { font-size: .78rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.pf-ach.done .pf-ach-state { color: var(--gold-soft); font-weight: 700; font-size: .95rem; }

.pf-res {
  display: flex; align-items: center; gap: var(--sp-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: var(--r-md);
  padding: 10px 12px;
}
.pf-res-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pf-res-main b { font-size: .88rem; }
.pf-res-main small { font-size: .75rem; color: var(--text-dim); }
.pf-badge {
  font-size: .7rem; font-weight: 600;
  padding: 4px 9px; border-radius: 999px;
  white-space: nowrap;
}
.pf-badge--wait { color: #ffce7a; background: rgba(255, 193, 7, 0.1); border: 1px solid rgba(255, 193, 7, 0.3); }
.pf-badge--ok { color: #7ddc8f; background: rgba(80, 180, 80, 0.12); border: 1px solid rgba(80, 180, 80, 0.35); }

/* ---------- Vue « Ma séance » (sous-vue du panneau profil) ---------- */

.pf-res--btn { cursor: pointer; }
.pf-res--btn:hover { border-color: var(--gold-soft); }
.pf-res-chev { color: var(--text-dim); font-size: 1.15rem; line-height: 1; }
.se-date { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 12px; font-size: .95rem; }
.se-card {
  display: flex; flex-direction: column; gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: var(--r-md);
  padding: 12px 14px; margin-bottom: 10px;
  font-size: .88rem;
}
.se-card small { color: var(--text-dim); font-size: .76rem; }
.se-row { flex-direction: row; align-items: center; gap: 10px; }
.se-actions { display: flex; gap: 8px; margin-bottom: 10px; }
.se-actions .btn-gold { flex: 1; margin: 0; }
.se-btn-ghost {
  flex: 1; background: none; color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--r-md);
  padding: 10px 12px; font: inherit; font-size: .85rem; cursor: pointer;
}
.se-btn-ghost:hover { border-color: var(--gold-soft); color: var(--gold-soft); }
.se-dir { color: var(--gold-soft); text-decoration: none; font-weight: 600; font-size: .84rem; }
.se-dir:hover { text-decoration: underline; }

/* ---------- Modal d'instructions d'installation (pwa-install.js) ---------- */

.inst-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(10, 12, 20, 0.72);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.inst-modal {
  width: min(380px, 100%);
  background: #232633;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.inst-modal h3 { margin: 0 0 8px; font-size: 1.1rem; }
.inst-modal p { margin: 0 0 12px; font-size: .88rem; color: var(--text-dim); }
.inst-steps { margin: 0 0 16px; padding-left: 20px; font-size: .88rem; }
.inst-steps li { margin-bottom: 8px; }

/* ---------- Mini-chat (phase D) ---------- */

.ch-head {
  display: flex; align-items: center; gap: var(--sp-md);
  padding-right: 34px;
  margin-bottom: var(--sp-md);
}
.ch-avatar {
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  object-fit: cover;
  flex-shrink: 0;
}
.ch-avatar--initial {
  display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff;
  font-weight: 700; font-size: 1rem;
}
.ch-id h2 { font-size: 1.1rem; line-height: 1.2; }

.ch-msgs {
  min-height: 180px;
  max-height: 42vh;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--sp-sm);
  padding: var(--sp-sm) 2px;
}
.ch-empty {
  text-align: center;
  color: var(--text-dim);
  font-size: .85rem; line-height: 1.5;
  padding: var(--sp-xl) var(--sp-md);
}
.ch-bubble {
  max-width: 82%;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--panel-border);
  border-radius: var(--r-lg) var(--r-lg) var(--r-lg) var(--r-sm);
  padding: 8px 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.ch-bubble.mine {
  align-self: flex-end;
  background: rgba(70, 130, 220, 0.22);
  border-color: rgba(70, 130, 220, 0.45);
  border-radius: var(--r-lg) var(--r-lg) var(--r-sm) var(--r-lg);
}
.ch-text { font-size: .9rem; line-height: 1.4; word-break: break-word; white-space: pre-wrap; }
.ch-time { font-size: .64rem; color: var(--text-dim); align-self: flex-end; }

.ch-form {
  display: flex; gap: var(--sp-sm);
  margin-top: var(--sp-md);
}
.ch-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--panel-border);
  border-radius: var(--r-pill);
  color: var(--text);
  font-size: .9rem;
  padding: 11px 16px;
  outline: none;
}
.ch-input:focus { border-color: rgba(70, 130, 220, 0.6); }
.ch-input::placeholder { color: var(--text-dim); }
.ch-send {
  width: 42px; height: 42px;
  flex-shrink: 0;
  background: var(--primary);
  border: none;
  border-radius: var(--r-full);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s;
}
.ch-send:hover { background: var(--primary-dark); }
.ch-send[disabled] { opacity: .6; cursor: default; }

/* Bouton contacter (étape packs du booking) */
.bk-contact {
  display: block;
  margin: var(--sp-md) auto 0;
  background: none;
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  font-size: .8rem;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  cursor: pointer;
}
.bk-contact:hover { color: var(--text); border-color: rgba(70, 130, 220, 0.6); }

/* Galerie : photos du feed (crédit photographe) */
.ph.feed img { width: 100%; height: 100%; object-fit: cover; }
.ph.feed span {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: .66rem; font-weight: 600; text-align: center;
  padding: 3px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

/* ---------- Onboarding ---------- */

#onboarding {
  position: fixed; inset: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 12, 20, 0.6);
  backdrop-filter: blur(6px);
  padding: 20px;
  transition: opacity .4s;
}
#onboarding.hidden { opacity: 0; pointer-events: none; }

.ob-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--r-2xl);
  padding: 30px 26px;
  text-align: center;
  box-shadow: var(--shadow);
}
.ob-logo svg { width: 56px; height: 56px; }
.ob-card h1 { font-size: 1.35rem; margin: 10px 0 22px; line-height: 1.3; }
.ob-card h1 span { color: var(--gold-soft); }
.ob-step {
  display: flex; align-items: center; gap: 14px;
  text-align: left;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  padding: 12px 14px;
  border-radius: var(--r-lg);
}
.ob-step span { font-size: 1.5rem; }
.ob-step p { font-size: .86rem; line-height: 1.4; color: var(--text-dim); }
.ob-step p b { color: var(--text); }
#onboard-start {
  margin-top: 10px;
  width: 100%;
  background: var(--gold);
  color: #2a1d00;
  border: none;
  font-size: .95rem; font-weight: 600;
  padding: 14px;
  border-radius: var(--r-lg);
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(255, 173, 7, 0.35);
  transition: background .2s;
}
#onboard-start:hover { background: #ffaa00; }

/* ---------- Toast & confettis ---------- */

#toast {
  position: fixed;
  top: max(64px, calc(env(safe-area-inset-top) + 56px));
  left: 50%;
  transform: translate(-50%, -16px);
  background: var(--panel);
  border: 1px solid rgba(255, 193, 7, 0.4);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: .9rem; font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 60;
  max-width: calc(100vw - 32px);
  text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
#confetti span {
  position: absolute;
  top: -3vh;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(108vh) rotate(680deg); opacity: .85; }
}

/* ---------- MapLibre & responsive ---------- */

.maplibregl-ctrl-bottom-right { margin-bottom: 60px; }

@media (max-width: 560px) {
  .brand-text small { display: none; }
  .progress-pill { min-width: 0; flex: 1; }
  #btn-arrs span { display: none; }
  #sheet { max-height: 64vh; }
}
