/* ============================================================
   Baladego — Design System v4
   Palette verte / bleue
   ============================================================ */

:root {
  --color-primary: #14A876;
  --color-primary-dark: #0F8B62;
  --color-primary-light: #E0F5EC;

  --color-accent: #2C7BE5;
  --color-accent-dark: #2163BC;
  --color-accent-light: #E3EEFB;

  --color-reward: #A38F58;
  --color-reward-dark: #8A7749;
  --color-reward-light: #F2ECE0;

  --color-bg: #F8F7F0;
  --color-surface: #FFFFFF;
  --color-ink: #000000;
  --color-ink-soft: #595D59;
  --color-border: rgba(0, 0, 0, 0.08);

  --color-danger: #C0392B;
  --color-danger-light: #F8E6E3;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 10px 28px rgba(44, 123, 229, 0.16), 0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-float: 0 12px 32px rgba(0, 0, 0, 0.14);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --nav-height: 64px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
}
body.has-bottom-nav {
  padding-bottom: calc(var(--nav-height) + 28px);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-ink);
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.7rem, 4.2vw, 2.4rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 700; }
p { line-height: 1.55; color: var(--color-ink); }
small, .muted { color: var(--color-ink-soft); }

a { color: var(--color-accent); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.app-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 12px;
}

.hero {
  position: relative;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(44, 123, 229, 0.22);
}

/* Variante avec photo de fond : dégradé en overlay semi-transparent
   pour garder le texte lisible quelle que soit l'image. */
.hero.hero--photo {
  background-image:
    linear-gradient(135deg, rgba(20, 168, 118, 0.82) 0%, rgba(44, 123, 229, 0.82) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero h1, .hero p { color: var(--color-surface); position: relative; }
.hero p { color: rgba(255, 255, 255, 0.88); }

/* ---------- Cards ---------- */
.card, article {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.route-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 640px) {
  .grid.grid-2 { grid-template-columns: 1fr 1fr; }
}

/* ---------- Buttons ---------- */
.button, button, input[type="submit"] {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-pill);
  padding: 13px 24px;
  cursor: pointer;
  background: var(--color-primary);
  color: var(--color-surface);
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(20, 168, 118, 0.32);
}
.button:hover, button:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
}
.button:active, button:active { transform: scale(0.97); }

.button.contrast, button.contrast {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  box-shadow: 0 4px 14px rgba(44, 123, 229, 0.35);
}
.button.contrast:hover, button.contrast:hover { filter: brightness(1.05); }

.button.secondary, button.secondary {
  background: var(--color-surface);
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
  box-shadow: none;
}
.button.secondary:hover, button.secondary:hover { background: var(--color-accent-light); }

.button.outline, button.outline {
  background: transparent;
  color: var(--color-surface);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  box-shadow: none;
}

/* ---------- Forms ---------- */
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-ink-soft);
  margin: 14px 0 6px;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], textarea, select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-ink);
  outline-offset: 2px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-surface);
}
input[readonly] { opacity: 0.6; }

fieldset { border: none; padding: 0; margin: 0; }

details {
  margin-top: 16px;
  background: var(--color-accent-light);
  border-radius: var(--radius-sm);
  padding: 4px 14px 14px;
}
details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--color-accent);
  padding: 12px 0;
}

hr { border: none; border-top: 1px solid var(--color-border); margin: 20px 0; }

/* ---------- Badges & chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-reward-light);
  border: 1px solid var(--color-reward);
  color: var(--color-reward-dark);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.price-tag {
  font-weight: 700;
  font-size: 0.82rem;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}
.price-tag.free { background: var(--color-primary-light); color: var(--color-primary-dark); }
.price-tag.paid { background: var(--color-reward-light); color: var(--color-reward-dark); }

/* ---------- Trail / stages signature element ---------- */
.trail {
  position: relative;
  margin: 20px 0;
  padding-left: 8px;
}
.trail-step {
  position: relative;
  display: flex;
  gap: 14px;
  padding-bottom: 22px;
}
.trail-step:last-child { padding-bottom: 0; }
.trail-step::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: -22px;
  border-left: 2.5px dashed var(--color-accent);
  opacity: 0.4;
}
.trail-step:last-child::before { display: none; }
.trail-marker {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: var(--color-surface);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.trail-step.done .trail-marker { background: var(--color-primary); }
.trail-content { flex: 1; }
.trail-content h4 { margin-bottom: 2px; }
.stage-thumb {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  margin: 0 auto 8px;
}

/* ---------- Route cards ---------- */
.route-card-thumb {
  display: block;
  width: calc(100% + 44px);
  height: 150px;
  object-fit: cover;
  margin: -20px -22px 14px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.route-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.route-card footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ---------- Bottom nav : pilule flottante ---------- */
.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 688px;
  margin: 0 auto;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: var(--shadow-float);
  z-index: 50;
  /* Défilement horizontal si trop de liens pour la largeur disponible
     (ex. superuser : Balades + Créer + Modération + Mon compte +
     Déconnexion) — plutôt qu'un lien poussé hors champ et invisible. */
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.bottom-nav::-webkit-scrollbar {
  display: none;
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-ink-soft);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  transition: background 0.15s ease, color 0.15s ease;
  flex: 0 0 auto;
  white-space: nowrap;
}
@media (max-width: 420px) {
  .bottom-nav {
    justify-content: flex-start;
  }
  .bottom-nav a {
    padding: 8px 10px;
    font-size: 0.62rem;
  }
  .bottom-nav a span.icon {
    font-size: 1.1rem;
  }
}
.bottom-nav a span.icon { font-size: 1.25rem; }
.bottom-nav a:hover { text-decoration: none; color: var(--color-ink); }
.bottom-nav a.active {
  color: var(--color-surface);
  text-decoration: none;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}

/* ---------- Alerts / empty states ---------- */
.alert {
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 16px;
}
.alert.danger { background: var(--color-danger-light); color: var(--color-danger); }
.alert.info { background: var(--color-accent-light); color: var(--color-accent-dark); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-ink-soft);
}
.empty-state .emoji { font-size: 2.4rem; display: block; margin-bottom: 10px; }

/* ---------- Map placeholder ---------- */
.map-container {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-accent-light);
  margin-bottom: 16px;
  position: relative;
  box-shadow: var(--shadow-card);
}
#map { width: 100%; height: 100%; }
@media (min-width: 640px) {
  .map-container { aspect-ratio: 16 / 10; }
}

/* ---------- Profil / Carnet de badges ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat-box {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 16px 10px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.stat-box .stat-value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
}
.stat-box .stat-label {
  font-size: 0.72rem;
  color: var(--color-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}

.badge-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 16px 10px;
  text-align: center;
  box-shadow: var(--shadow-card);
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.badge-card .badge-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 6px;
}
.badge-card .badge-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--color-ink);
  margin-bottom: 2px;
}
.badge-card.unlocked {
  border-color: var(--color-reward);
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-reward-light) 100%);
}
.badge-card.unlocked:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.badge-card.locked { opacity: 0.55; }
.badge-card.locked .badge-icon { filter: grayscale(100%); }
.badge-card.locked .badge-title::after { content: " 🔒"; }

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-border);
  overflow: hidden;
  margin: 8px 0;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-pill);
}

/* ---------- Accordéon "Le sentier" (repliable par défaut) ---------- */
.trail-toggle-wrapper {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  padding: 4px 20px;
  margin-bottom: 16px;
}
.trail-toggle {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-ink);
}
.trail-toggle::-webkit-details-marker { display: none; }
.trail-toggle .chevron {
  transition: transform 0.2s ease;
  color: var(--color-accent);
}
.trail-toggle-wrapper[open] .trail-toggle .chevron { transform: rotate(180deg); }
.trail-toggle-wrapper .trail { padding-bottom: 14px; padding-top: 6px; }

@media (max-width: 480px) {
  .app-content { padding: 14px 12px 12px; }
  .hero { padding: 24px 18px; }
}

/* ---------- Mode terrain : bouton flottant + modal bottom-sheet ---------- */
.fab {
  position: fixed;
  bottom: calc(var(--nav-height) + 32px);
  right: 20px;
  z-index: 60;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: var(--color-surface);
  font-size: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(44, 123, 229, 0.4);
  transition: transform 0.15s ease;
}
.fab:hover { transform: scale(1.06); }
.fab:active { transform: scale(0.95); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 23, 26, 0.55);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}
.modal-overlay.open { display: flex; }

.modal-sheet {
  background: var(--color-surface);
  width: 100%;
  max-width: 720px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 26px 22px calc(env(safe-area-inset-bottom, 0px) + 28px);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-float);
}

/* ---------- Sélecteur de sens (aller / retour) ---------- */
.direction-toggle {
  display: flex;
  gap: 6px;
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}
.direction-btn {
  flex: 1;
  background: transparent;
  color: var(--color-ink-soft);
  box-shadow: none;
  font-size: 0.85rem;
  padding: 10px 12px;
}
.direction-btn.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: var(--color-surface);
}
.direction-btn:hover { transform: none; }

/* Étape courante (cible active du guidage) distincte de "déjà validée" */
.trail-step.current .trail-marker {
  box-shadow: 0 0 0 4px var(--color-accent-light);
}
.trail-step.current .trail-content h4 { color: var(--color-accent); }

/* ---------- Bouton supprimer une étape ---------- */
.trail-step {
  align-items: flex-start;
}
.delete-stage-btn {
  background: transparent;
  color: var(--color-ink-soft);
  box-shadow: none;
  padding: 6px 8px;
  font-size: 1rem;
  flex-shrink: 0;
}
.delete-stage-btn:hover {
  background: var(--color-danger-light);
  color: var(--color-danger);
  transform: none;
}

.button.danger, button.danger {
  background: var(--color-danger);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}
.button.danger:hover, button.danger:hover { filter: brightness(1.08); }

/* ---------- Zone de danger (suppression définitive) ---------- */
article:has(#delete-route-btn) {
  border: 1.5px solid var(--color-danger-light);
  background: var(--color-danger-light);
}
article:has(#delete-route-btn) h3 { color: var(--color-danger); }

/* ---------- Mode carte plein écran (route_detail, vue Walker) ---------- */
body.map-page {
  overflow: hidden; /* la carte gère son propre défilement interne */
}

.map-background {
  position: fixed;
  inset: 0;
  z-index: 0;
}
.map-background #map {
  width: 100%;
  height: 100%;
}

.map-topbar {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  box-shadow: var(--shadow-float);
}
.map-topbar-btn {
  background: transparent;
  color: var(--color-ink);
  box-shadow: none;
  font-size: 1.3rem;
  padding: 4px 8px;
  flex-shrink: 0;
}
.map-topbar-btn:hover { transform: none; background: var(--color-accent-light); }
.map-topbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  white-space: nowrap;
}
.map-topbar-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
}

/* Panneau replié par défaut (max-height: 0), déplié par-dessus la carte au clic sur ☰ */
.map-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 25;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: transparent;
}
.map-panel.open {
  max-height: 85vh;
  overflow-y: auto;
  background: rgba(245, 246, 250, 0.97);
  backdrop-filter: blur(6px);
}
.map-panel-scroll {
  padding: 76px 16px 20px; /* laisse la place à la topbar par-dessus */
}

/* Zone "Étape en cours", flottante au-dessus de la nav du bas */
.floating-stage-card {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(var(--nav-height) + 16px);
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  margin: 0;
}

/* ---------- Marqueurs étape : à trouver vs déjà trouvée ---------- */
.stage-marker {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--color-surface);
  box-shadow: 0 2px 6px rgba(20, 23, 26, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-surface);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
}
.stage-marker-found {
  background: var(--color-reward);
}

/* ---------- Sélecteur de sens verrouillé une fois la progression commencée ---------- */
.direction-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.direction-toggle-locked {
  opacity: 0.85;
}

/* ---------- Champs d'upload de fichier ---------- */
input[type="file"] {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--color-ink-soft);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--color-border);
  background: var(--color-bg);
}

/* Le bouton "Parcourir..." est un pseudo-élément à part, non stylable
   via les règles CSS classiques appliquées à l'input lui-même. */
input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  margin-right: 12px;
  cursor: pointer;
  background: var(--color-primary);
  color: var(--color-surface);
  transition: background 0.15s ease;
}
input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
  background: var(--color-primary-dark);
}

/* ---------- Barre de recherche par proximité (liste des balades) ---------- */
.location-search {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.location-search-city {
  display: flex;
  flex: 1;
  min-width: 200px;
  gap: 6px;
}
.location-search-city input {
  flex: 1;
}

/* ============================================================
   Landing page marketing (structure SaaS classique adaptée au B2B)
   ============================================================ */

/* ---------- Nav du haut (desktop-first, se simplifie en mobile) ---------- */
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 4px;
  margin-bottom: 8px;
}
.landing-nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-ink);
}
.landing-nav-links {
  display: none;
  gap: 24px;
}
.landing-nav-links a {
  color: var(--color-ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
}
.landing-nav-links a:hover { color: var(--color-ink); text-decoration: none; }
.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (min-width: 720px) {
  .landing-nav-links { display: flex; }
}
@media (max-width: 480px) {
  .landing-nav-logo { font-size: 1rem; }
  .landing-nav-actions .button.secondary { display: none; }
  .landing-nav-actions .button { padding: 8px 14px; font-size: 0.8rem; }
}

/* ---------- Bandeau preuve sociale ---------- */
.social-proof-band {
  text-align: center;
  padding: 18px 16px;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}
.social-proof-band p {
  margin: 0;
  font-weight: 600;
  color: var(--color-ink);
}

/* ---------- Fonctionnalités en Z (alternance texte / visuel) ---------- */
.feature-row {
  display: grid;
  gap: 24px;
  align-items: center;
  margin: 32px 0;
}
@media (min-width: 720px) {
  .feature-row { grid-template-columns: 1fr 1fr; }
  .feature-row.reverse .feature-visual { order: 2; }
  .feature-row.reverse .feature-text { order: 1; }
}
.feature-visual {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent-light));
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.feature-text h3 { margin-bottom: 10px; }

/* ---------- Grille tarifaire ---------- */
.pricing-toggle {
  display: flex;
  justify-content: center;
  gap: 6px;
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  padding: 4px;
  max-width: 280px;
  margin: 0 auto 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}
.pricing-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 720px) {
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
}
.pricing-card {
  text-align: center;
  position: relative;
}
.pricing-card.popular {
  border: 2px solid var(--color-primary);
  transform: scale(1.02);
}
.pricing-card-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--color-surface);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
}
.pricing-card .price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-ink);
  margin: 12px 0;
}
.pricing-card .price small {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-ink-soft);
}
.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  text-align: left;
}
.pricing-card ul li {
  padding: 6px 0;
  color: var(--color-ink-soft);
  font-size: 0.9rem;
}
.pricing-card ul li::before { content: "✓ "; color: var(--color-primary); font-weight: 700; }

/* ---------- Témoignages ---------- */
.testimonial-card {
  text-align: center;
}
.testimonial-card .avatar-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.4rem;
}
.testimonial-card blockquote {
  margin: 0 0 12px;
  font-style: italic;
  color: var(--color-ink);
}

/* ---------- Bandeau CTA final ---------- */
.final-cta-band {
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  color: var(--color-surface);
  margin: 32px 0;
}
.final-cta-band h2 { color: var(--color-surface); }
.final-cta-band p { color: rgba(255, 255, 255, 0.88); }

/* ---------- Footer étendu ---------- */
.site-footer {
  padding: 32px 4px 20px;
  border-top: 1px solid var(--color-border);
  margin-top: 24px;
}
.site-footer-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 24px;
}
@media (min-width: 640px) {
  .site-footer-grid { grid-template-columns: repeat(4, 1fr); }
}
.site-footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-ink-soft);
  margin-bottom: 10px;
}
.site-footer-col a {
  display: block;
  color: var(--color-ink);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.site-footer-bottom {
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-ink-soft);
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

/* ---------- Notation en étoiles ---------- */
.star-rating {
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: 2.2rem;
  margin: 16px 0;
}
.star {
  cursor: pointer;
  color: var(--color-border);
  transition: color 0.15s ease, transform 0.1s ease;
}
.star.selected,
.star.hovered {
  color: var(--color-reward);
  transform: scale(1.1);
}

/* ---------- Autocomplétion ville (page compte) ---------- */
.city-autocomplete { position: relative; }
.city-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card-hover);
  max-height: 240px;
  overflow-y: auto;
}
.city-suggestions.open { display: block; }
.city-suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--color-border);
}
.city-suggestion-item:last-child { border-bottom: none; }
.city-suggestion-item:hover,
.city-suggestion-item.active {
  background: var(--color-accent-light);
}
.city-suggestion-empty {
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--color-ink-soft);
}

/* ---------- Aperçu stylisé du tracé — route_list : sous le price-tag, à droite ---------- */
.route-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.route-path-thumb {
  display: block;
  width: 75px;
  height: 47px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}

/* ---------- Aperçu stylisé du tracé — route_detail : dans le hero, en haut à droite ---------- */
.hero-path-thumb {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 75px;
  height: 47px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
  z-index: 2;
}

/* ---------- Pagination (liste des balades) ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 24px 0;
}

/* ---------- Statut de modération d'un parcours (dashboard, détail) ---------- */
.chip-draft {
  background: var(--color-reward-light);
  border-color: var(--color-reward);
  color: var(--color-reward-dark);
}
.chip-published {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

/* ---------- Bouton modifier une étape ---------- */
.edit-stage-btn {
  background: transparent;
  color: var(--color-ink-soft);
  box-shadow: none;
  padding: 6px 8px;
  font-size: 1rem;
  flex-shrink: 0;
  text-decoration: none;
}
.edit-stage-btn:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
  text-decoration: none;
}

/* ---------- Récapitulatif des énigmes en fin de parcours ---------- */
.recap-riddle-item {
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.recap-riddle-item:last-child { margin-bottom: 0; }

/* ---------- File de modération (superutilisateurs) ---------- */
.moderation-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.moderation-cover {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

/* ---------- Choix du mode de parcours (création / édition) ---------- */
.game-mode-choice {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.game-mode-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-transform: none;
  font-weight: 400;
}
.game-mode-option input[type="radio"] {
  width: auto;
  margin-top: 4px;
}
.game-mode-option:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

/* ---------- Étape mystère (mode jeu de piste) ---------- */
.trail-mystery h4 { color: var(--color-ink-soft); }

css
/* ---------- Mode verrouillé après création (route_edit) ---------- */
.game-mode-locked {
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  font-weight: 700;
}

/* ---------- Raccourcis par parcours (dashboard) ---------- */
.dashboard-route-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.dashboard-route-actions .button {
  flex: 1;
  min-width: 140px;
  font-size: 0.78rem;
  padding: 9px 12px;
  box-shadow: none;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .dashboard-route-actions {
    flex-direction: column;
  }
  .dashboard-route-actions .button {
    width: 100%;
  }
}

/* ---------- Panneau de gestion superuser ---------- */
.superadmin-user-row {
  border-top: 1px solid var(--color-border);
  padding: 16px 0;
}
.superadmin-user-row:first-child {
  border-top: none;
  padding-top: 0;
}
.superadmin-user-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.superadmin-user-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.superadmin-subscription-form {
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

/* ---------- Filtres de la liste utilisateurs (panneau de gestion) ---------- */
.superadmin-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.superadmin-filters input[type="text"] {
  flex: 2;
  min-width: 200px;
}
.superadmin-filters select {
  flex: 1;
  min-width: 140px;
}
.superadmin-filters button,
.superadmin-filters .button {
  flex-shrink: 0;
}

/* ---------- Séparateur "+" dans la carte tarifaire "Sur mesure" ---------- */
.pricing-card ul li.pricing-plus-separator {
  text-align: center;
  font-weight: 700;
  color: var(--color-primary);
  list-style: none;
  padding: 2px 0;
}
.pricing-card ul li.pricing-plus-separator::before {
  content: none;
}

/* ---------- Clean Link ---------- */
a.clean-link {
    display: block;
}

a.clean-link,
a.clean-link:hover,
a.clean-link:focus,
a.clean-link:active {
    color: inherit;     
    font-weight: inherit;
    text-decoration: none;
}

/* ---------- Filtres de statut (file de modération) ---------- */
.moderation-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* ---------- Badge du mode de parcours (route_list) ---------- */
.chip-treasure-hunt {
  background: var(--color-reward-light);
  border-color: var(--color-reward);
  color: var(--color-reward-dark);
}
.chip-guided {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
  color: var(--color-accent-dark);
}

/* ---------- Conseil "dézoomez" à la révélation d'une nouvelle étape ---------- */
.zoom-out-hint {
  position: fixed;
  top: 76px;
  left: 16px;
  right: 16px;
  max-width: 460px;
  margin: 0 auto;
  background: rgba(20, 168, 118, 0.95);
  color: var(--color-surface);
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-float);
  z-index: 40;
  opacity: 1;
  transition: opacity 0.5s ease;
}
.zoom-out-hint-fade {
  opacity: 0;
}