/* ==================================================================
   Rando Coach IA — feuille de style unique
   Bleu montagne, bleu ciel, blanc, nuances naturelles.
   Mobile d'abord. Vue ordinateur à partir de 900px.
   ================================================================== */

:root {
  --mont: #0F3D5C;
  --mont-2: #1B5E88;
  --sky: #57B0E0;
  --sky-soft: #E8F5FC;
  --sky-line: #CDE7F5;
  --green: #4F9E75;
  --green-soft: #EAF6EF;
  --sand: #F8F3E9;
  --ink: #0E2029;
  --body: #33454F;
  --muted: #6B8090;
  --line: #E4EDF2;
  --bg: #FFFFFF;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 4px 18px rgba(15, 61, 92, 0.08);
  --shadow-lg: 0 12px 34px rgba(15, 61, 92, 0.16);
  --bar-h: 74px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: calc(var(--bar-h) + 26px + env(safe-area-inset-bottom, 0px));
}

img { max-width: 100%; }
a { color: var(--mont-2); }

h1, h2, h3, h4 { margin: 0 0 10px; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0 0 12px; color: var(--body); }

/* ------------------------------------------------------------------
   Bouton menu + tiroir latéral
   ------------------------------------------------------------------ */

.topline {
  display: flex;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 4px;
}

.menu-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--sky-soft);
  color: var(--mont);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}
.menu-btn:active { transform: scale(0.94); }

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(9, 28, 42, 0.45);
  z-index: 70;
  opacity: 1;
  transition: opacity 0.24s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 82%;
  max-width: 320px;
  background: #fff;
  border-radius: 0 24px 24px 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.28s ease, visibility 0.28s ease;
  box-shadow: var(--shadow-lg);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.drawer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--line);
}
.drawer-logo { border-radius: 14px; }
.drawer-head-txt { flex: 1; display: flex; flex-direction: column; }
.drawer-head-txt strong { font-size: 16px; }
.drawer-head-txt span { font-size: 13px; color: var(--muted); }
.drawer-close {
  border: 0;
  background: var(--sky-soft);
  color: var(--mont);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.drawer-nav { flex: 1; overflow-y: auto; padding: 10px 8px; }
.drawer-nav a,
.drawer-session {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.drawer-nav a:active, .drawer-session:active { background: var(--sky-soft); }
.drawer-nav .ico, .drawer-session .ico { color: var(--mont-2); }
.drawer-foot { padding: 10px 8px 16px; border-top: 1px solid var(--line); }

/* ------------------------------------------------------------------
   Contenu
   ------------------------------------------------------------------ */

.page { min-height: 40vh; }
.pad { padding: 0 18px; }

.brand-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 12px;
}
.brand-logo { border-radius: 11px; }
.brand-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.03em;
}

.page-title {
  font-size: 34px;
  font-weight: 800;
  margin: 2px 0 8px;
}
.section-title {
  font-size: 22px;
  font-weight: 800;
  margin: 26px 0 12px;
}
.lead { color: var(--muted); font-size: 15px; }
.intro-line { color: var(--muted); font-size: 15px; margin: 14px 0 18px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--mont-2);
  text-decoration: none;
  margin-bottom: 8px;
  font-weight: 600;
}

/* ------------------------------------------------------------------
   Héro / galerie à glisser
   ------------------------------------------------------------------ */

.hero-wrap { padding: 0 16px; }
.hero-gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: var(--radius);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hero-gallery::-webkit-scrollbar { display: none; }
.hero-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: min(66vh, 520px);
  overflow: hidden;
  margin: 0;
  background: var(--sky-soft);
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-slide.is-active img { animation: kenburns 6s ease-out both; }
@keyframes kenburns {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 20px;
  color: #fff;
  pointer-events: none;
  background: linear-gradient(to top, rgba(6, 26, 40, 0.82) 0%, rgba(6, 26, 40, 0.35) 42%, rgba(6, 26, 40, 0) 70%);
}
.hero-overlay h2 { font-size: 24px; font-weight: 800; margin: 0; color: #fff; }
.hero-overlay p { margin: 0; font-size: 14px; color: rgba(255, 255, 255, 0.9); }
.hero-tag {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
}
.hero-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 12px 0 4px;
}
.hero-dots span {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: var(--sky-line);
  transition: width 0.25s ease, background 0.25s ease;
}
.hero-dots span.on { width: 22px; background: var(--mont); }
.hero-actions { display: grid; gap: 10px; margin-top: 12px; }

/* ------------------------------------------------------------------
   Boutons
   ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  background: var(--sky-soft);
  color: var(--mont);
  transition: transform 0.12s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--mont); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--sky-line); color: var(--mont); }
.btn-soft { background: var(--sky-soft); color: var(--mont); }
.btn-danger { background: #FDECEC; color: #B3261E; }
.btn-install { background: var(--green-soft); color: #26603F; margin-top: 14px; }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13px; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------------------------
   Cartes, tuiles, listes
   ------------------------------------------------------------------ */

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.card h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.stat-tile {
  background: var(--sky-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}
.stat-tile strong { font-size: 24px; font-weight: 800; color: var(--mont); }
.stat-tile span { font-size: 12px; color: var(--muted); }

.tick-list { list-style: none; margin: 0 0 14px; padding: 0; }
.tick-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--body);
}
.tick-list .ico { color: var(--green); flex: 0 0 auto; margin-top: 2px; }

.step-list { list-style: none; margin: 0 0 18px; padding: 0; }
.step-list li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.step-list li:last-child { border-bottom: 0; }
.step-list li > span {
  flex: 0 0 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--sky-soft);
  color: var(--mont);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.step-list strong { display: block; font-size: 15px; }
.step-list p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

/* bandes horizontales */
.band-section { margin: 26px 0; }
.band-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 18px;
  margin-bottom: 12px;
}
.band-head h2 { font-size: 22px; font-weight: 800; margin: 0; }
.band-head a { font-size: 13px; color: var(--muted); text-decoration: none; }
.band {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 18px 6px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.band::-webkit-scrollbar { display: none; }
.band-card {
  flex: 0 0 78%;
  max-width: 290px;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease;
}
.band-card:active { transform: scale(0.98); }
.band-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  background: var(--sky-soft);
}
.band-card-txt { padding: 10px 2px 0; }
.band-card-txt strong { display: block; font-size: 16px; font-weight: 700; }
.band-card-txt span { font-size: 13px; color: var(--muted); }

/* grille catalogue */
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 12px;
  margin: 14px 0 8px;
}
.tile { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.tile img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  background: var(--sky-soft);
}
.tile-body { padding: 8px 2px 0; display: flex; flex-direction: column; gap: 2px; }
.tile-body strong { font-size: 15px; font-weight: 700; line-height: 1.25; }
.tile-meta { font-size: 12px; color: var(--muted); }
.tile-price { font-size: 14px; font-weight: 800; color: var(--mont); }

/* listes */
.rows { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
}
.row-body { flex: 1; min-width: 0; }
.row-body strong { display: block; font-size: 15px; }
.row-body span { font-size: 13px; color: var(--muted); }
.row-right { font-size: 13px; color: var(--muted); text-align: right; flex: 0 0 auto; }

/* badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--sky-soft);
  color: var(--mont);
}
.badge-green { background: var(--green-soft); color: #26603F; }
.badge-sand { background: var(--sand); color: #7A5C1E; }
.badge-grey { background: #F1F4F6; color: var(--muted); }

/* barre de progression */
.progress { height: 8px; border-radius: 999px; background: var(--sky-soft); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--sky); border-radius: 999px; }
.progress.green > span { background: var(--green); }

/* filtres (menu déroulant simple) */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.filters select, .filters input[type="search"] {
  flex: 1 1 150px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  font-size: 14px;
  color: var(--ink);
  font-family: inherit;
}
.search-form { display: flex; gap: 8px; margin: 12px 0; }
.search-form input {
  flex: 1;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
}

/* formulaires */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus,
.search-form input:focus, .filters select:focus {
  outline: 2px solid var(--sky);
  outline-offset: 1px;
}

.alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 14px;
}
.alert-error { background: #FDECEC; color: #9C2B23; }
.alert-ok { background: var(--green-soft); color: #226141; }

.toast {
  margin: 6px 18px 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--green-soft);
  color: #226141;
}
.toast-warn { background: var(--sand); color: #7A5C1E; }
.toast-error { background: #FDECEC; color: #9C2B23; }

/* ------------------------------------------------------------------
   Pages d'authentification
   ------------------------------------------------------------------ */

body.auth-body {
  background:
    linear-gradient(rgba(8, 34, 52, 0.72), rgba(8, 34, 52, 0.88)),
    url("https://images.unsplash.com/photo-1551632811-561732d1e306?w=900") center/cover no-repeat fixed;
  padding-bottom: 24px;
}
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 32px) 18px calc(env(safe-area-inset-bottom, 0px) + 28px);
}
.auth-brand { text-align: center; color: #fff; margin-bottom: 18px; }
.auth-brand img { border-radius: 18px; }
.auth-brand h1 { font-size: 26px; font-weight: 800; margin: 10px 0 2px; color: #fff; }
.auth-brand p { font-size: 14px; color: rgba(255, 255, 255, 0.82); margin: 0; }
.auth-card {
  background: #fff;
  border-radius: 24px;
  padding: 22px 18px;
  box-shadow: var(--shadow-lg);
}
.auth-card h2 { font-size: 20px; font-weight: 800; }
.auth-alt { font-size: 14px; text-align: center; margin: 14px 0 0; color: var(--muted); }
.auth-back {
  display: block;
  text-align: center;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  text-decoration: none;
}

/* ------------------------------------------------------------------
   Pied de page
   ------------------------------------------------------------------ */

.app-footer {
  margin-top: 34px;
  background: var(--sky-soft);
  border-radius: 24px 24px 0 0;
  padding: 26px 20px 18px;
  color: var(--body);
}
.foot-brand { display: flex; gap: 12px; align-items: flex-start; }
.foot-brand img { border-radius: 12px; flex: 0 0 auto; }
.foot-brand strong { font-size: 16px; }
.foot-brand p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.foot-list { list-style: none; margin: 16px 0 14px; padding: 0; }
.foot-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--body);
  padding: 4px 0;
}
.foot-list .ico { color: var(--mont-2); flex: 0 0 auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 8px; }
.foot-links a { font-size: 13px; color: var(--mont-2); text-decoration: none; font-weight: 600; }
.foot-links a.tiny { font-size: 12px; color: var(--muted); font-weight: 500; }
.foot-copy { font-size: 12px; color: var(--muted); margin: 12px 0 0; }

/* ------------------------------------------------------------------
   Barre de navigation basse (application)
   ------------------------------------------------------------------ */

.tabbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: flex;
  gap: 2px;
  padding: 7px 6px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 28px rgba(15, 61, 92, 0.16);
}
.tabbar a {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px;
  border-radius: 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}
.tabbar a:active { transform: scale(0.97); }
.tabbar a.on { background: var(--sky-soft); color: var(--mont); }

/* Six onglets : on resserre pour que rien ne soit coupe. */
.tabbar a { flex: 1 1 0; }
.tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 420px) {
  .tabbar { left: 8px; right: 8px; padding: 6px 4px; }
  .tabbar a { font-size: 10px; padding: 6px 1px; gap: 1px; }
  .tabbar a svg { width: 20px; height: 20px; }
}

/* ------------------------------------------------------------------
   Fenêtre d'installation
   ------------------------------------------------------------------ */

.install-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(9, 28, 42, 0.55);
}
.install-card {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 24px 20px 20px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
}
.install-card h3 { font-size: 19px; font-weight: 800; padding-right: 28px; }
.install-card > p { font-size: 14px; color: var(--muted); }
.install-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: var(--sky-soft);
  color: var(--mont);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.install-step { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.install-step-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--mont);
  margin-bottom: 6px;
}
.install-step p { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------
   Écran d'ouverture
   ------------------------------------------------------------------ */

#app-splash {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #0F3D5C;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}
#app-splash img { border-radius: 22px; }
body.admin-body #app-splash { background: #1F5E4C; }
#app-splash.show { display: flex; animation: splashOut 0.4s ease 1.2s forwards; }
@keyframes splashOut {
  to { opacity: 0; visibility: hidden; }
}

/* ------------------------------------------------------------------
   Sommets
   ------------------------------------------------------------------ */

.summit-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.summit {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}
.summit img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.summit-body { padding: 14px 16px 16px; }
.summit-body h3 { font-size: 17px; margin-bottom: 4px; }
.summit.locked img { filter: grayscale(1) opacity(0.55); }
.summit.locked .summit-body { opacity: 0.85; }

/* ------------------------------------------------------------------
   Quiz
   ------------------------------------------------------------------ */

.quiz-question { font-size: 19px; font-weight: 800; margin: 8px 0 14px; }
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.choice:active { transform: scale(0.99); }
.choice.correct { border-color: var(--green); background: var(--green-soft); }
.choice.wrong { border-color: #D9837C; background: #FDECEC; }
.choice .letter {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sky-soft);
  color: var(--mont);
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.explain {
  font-size: 14px;
  background: var(--sky-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--mont);
  margin-bottom: 14px;
}

/* ------------------------------------------------------------------
   Sac à dos
   ------------------------------------------------------------------ */

.bag-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--mont);
  color: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.bag-total strong { font-size: 24px; font-weight: 800; }
.bag-total span { font-size: 13px; color: rgba(255, 255, 255, 0.8); }
.bag-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: #fff;
  margin-bottom: 8px;
}
.bag-item.done { background: var(--green-soft); border-color: #CBE6D5; }
.bag-item.done .bag-name { text-decoration: line-through; color: var(--muted); }
.bag-check {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--sky-line);
  background: #fff;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.bag-item.done .bag-check { background: var(--green); border-color: var(--green); color: #fff; }
.bag-name { flex: 1; font-size: 14px; font-weight: 600; }
.bag-weight { font-size: 12px; color: var(--muted); white-space: nowrap; }
.icon-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
}
.icon-btn:active { background: #FDECEC; color: #B3261E; }
.cat-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 18px 0 8px;
}

/* ------------------------------------------------------------------
   Tableau de bord
   ------------------------------------------------------------------ */

.hero-banner {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  margin: 0 0 18px;
}
.hero-banner img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.hero-banner .banner-txt {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px;
  color: #fff;
  background: linear-gradient(to top, rgba(6, 26, 40, 0.85), rgba(6, 26, 40, 0));
}
.hero-banner .banner-txt strong { display: block; font-size: 18px; }
.hero-banner .banner-txt span { font-size: 13px; color: rgba(255, 255, 255, 0.85); }

.kpi-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }

/* ------------------------------------------------------------------
   Administration (garde son propre style, aucune règle app ne s'applique)
   ------------------------------------------------------------------ */

body.admin-body {
  background: #F2F6F9;
  padding-bottom: 24px;
}
.admin-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 14px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.admin-top img { border-radius: 12px; }
.admin-top h1 { font-size: 17px; font-weight: 800; margin: 0; }
.admin-top .admin-top-sub { font-size: 12px; color: var(--muted); }
.admin-top .admin-top-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.admin-wrap { padding: 16px; max-width: 1100px; margin: 0 auto; }
.admin-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs a {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  background: #F2F6F9;
}
.admin-tabs a.on { background: var(--mont); color: #fff; }
.admin-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  margin-bottom: 14px;
}
.admin-card h2 { font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.admin-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.admin-kpi { background: #fff; border-radius: 16px; padding: 16px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); }
.admin-kpi strong { display: block; font-size: 26px; font-weight: 800; color: var(--mont); }
.admin-kpi span { font-size: 12px; color: var(--muted); }

/* Chiffres clés et graphique du tableau de bord */
.admin-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.admin-kpis .admin-kpi { display: flex; flex-direction: column; gap: 2px; }
.admin-kpis .admin-kpi strong { font-size: 24px; line-height: 1.1; }
.kpi-trend {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--mont-2);
  margin-top: 4px;
}
.chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.chart-head h2 { margin-bottom: 2px; }
.chart-sub { font-size: 12px; color: var(--muted); margin: 0; }
.badge-kpi {
  font-size: 12px;
  font-weight: 700;
  color: var(--mont);
  background: var(--sky-soft);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}
.chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 130px;
  padding: 6px 2px 0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.chart-col { flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; height: 100%; }
.chart-bar {
  display: block;
  width: 100%;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: var(--sky);
  transition: background 0.15s ease;
}
.chart-col:last-child .chart-bar { background: var(--mont); }
.chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  padding-top: 6px;
}
@media (min-width: 900px) {
  .admin-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .chart { height: 180px; gap: 5px; }
}
.adminbar {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: flex;
  gap: 2px;
  padding: 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(15, 61, 92, 0.16);
}
.adminbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  border-radius: 14px;
}
.adminbar a.on { background: var(--mont); color: #fff; }
body.admin-body { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }

/* ------------------------------------------------------------------
   Vue ordinateur : colonne de navigation, masquée sur téléphone
   ------------------------------------------------------------------ */

.sidenav { display: none; }

@media (min-width: 900px) {
  body { padding-bottom: 40px; }

  .sidenav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    padding: 22px 14px;
    background: #fff;
    border-right: 1px solid var(--line);
    z-index: 65;
  }
  .sidenav-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; }
  .sidenav-brand img { width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto; }
  .sidenav-brand strong { font-size: 15px; }
  .sidenav-brand span { display: block; font-size: 12px; color: var(--muted); }
  .sidenav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--ink);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
  }
  .sidenav a.on { background: var(--sky-soft); color: var(--mont); }
  .sidenav-foot { margin-top: auto; }
  .sidenav-note { font-size: 11px; color: var(--muted); padding: 8px 12px; }

  .topline, .drawer, .scrim, .tabbar { display: none !important; }

  .page, .app-footer { margin-left: 260px; }
  .page { max-width: 1100px; margin-right: auto; padding: 20px 40px 0; }
  .app-footer { max-width: 1060px; margin-left: calc(260px + 40px); margin-right: auto; border-radius: 24px; }
  .pad { padding: 0; }

  .brand-title { font-size: 40px; }
  .brand-line { padding-top: 0; }

  .hero-wrap { padding: 0; }
  .hero-slide { aspect-ratio: 21 / 9; max-height: 460px; }
  .hero-overlay h2 { font-size: 30px; }
  .hero-actions { grid-template-columns: 1fr 1fr; }

  .band { flex-wrap: wrap; overflow: visible; padding: 0; }
  .band-card { flex: 0 0 calc(33.333% - 8px); max-width: none; }

  .grid2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-banner img { aspect-ratio: 21 / 9; }
}

@media (min-width: 1400px) {
  .band-card { flex: 0 0 calc(25% - 9px); }
  .grid2 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------
   Parrainage : invitation, lien personnel et compteurs
   ------------------------------------------------------------------ */

/* Bandeau d'invitation sur la page d'inscription */
.referral-invite {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--green-soft);
  border: 1px solid #CBE6D5;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.referral-invite .ico { color: var(--green); flex: 0 0 auto; margin-top: 1px; }
.referral-invite p { margin: 0; font-size: 14px; color: #226141; }
.referral-invite strong { color: #1B5033; }

/* Carte « Parrainer un ami » du profil */
.ref-share { display: grid; gap: 10px; margin-top: 4px; }
.ref-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--sky-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.ref-code span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.ref-code strong {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--mont);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ref-link-row { display: flex; gap: 8px; }
.ref-link-row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--body);
  background: #fff;
  font-family: inherit;
}
.ref-link-row .btn { flex: 0 0 auto; min-height: 44px; padding: 0 16px; font-size: 14px; }
.ref-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.ref-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}
.ref-stat strong { font-size: 20px; font-weight: 800; color: var(--mont); }
.ref-stat span { font-size: 12px; color: var(--muted); }
.ref-note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.ref-share .btn { min-height: 46px; }

/* Partage direct : WhatsApp, e-mail, SMS */
.ref-direct { display: flex; flex-wrap: wrap; gap: 8px; }
.ref-direct .btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  font-size: 14px;
  white-space: nowrap;
  justify-content: center;
}
#refWhatsapp { background: #25D366; color: #fff; }
@media (max-width: 380px) {
  .ref-direct .btn { flex: 1 1 100%; }
}

/* Carte « Un mois de Premium offert » */
.loyalty-path { margin-top: 14px; }
.loyalty-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.loyalty-head strong { font-size: 14px; font-weight: 700; color: var(--body); }
.loyalty-head span { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.loyalty-path .progress { background: #fff; }
.loyalty-path .progress > span { background: var(--mont); }

/* ------------------------------------------------------------------
   Carnet de randonnée
   ------------------------------------------------------------------ */

/* Onglets internes du carnet */
.lb-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
}
.lb-tabs::-webkit-scrollbar { display: none; }
.lb-tabs a {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 15px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  background: #F1F4F6;
}
.lb-tabs a.on { background: var(--mont); color: #fff; }

/* Compteur de quota (formule gratuite) */
.lb-quota {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--sand);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.lb-quota .ico { color: #7A5C1E; flex: 0 0 auto; margin-top: 1px; }
.lb-quota p { margin: 0; font-size: 13px; color: #6B5019; }

/* Entrée du carnet, liste personnelle */
.lb-entry {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.lb-entry-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: var(--sky-soft);
}
.lb-entry-body { padding: 14px 16px 16px; }
.lb-entry-body h3 { font-size: 17px; margin-bottom: 6px; }
.lb-entry-body > p { font-size: 14px; }

/* Ligne de métriques (distance, dénivelé, temps, ressenti) */
.lb-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}
.lb-metric {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--mont);
  background: var(--sky-soft);
  border-radius: 999px;
  padding: 4px 10px;
}
.lb-metric .ico { flex: 0 0 auto; }

/* Bandeau du fil communautaire */
.lb-community-intro {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--sky-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.lb-community-intro .ico { color: var(--mont-2); flex: 0 0 auto; margin-top: 1px; }
.lb-community-intro p { margin: 0; font-size: 13px; color: var(--mont); }

/* Carte d'une sortie partagée */
.lb-shared {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.lb-shared header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}
.lb-avatar {
  flex: 0 0 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--mont);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lb-shared header strong { display: block; font-size: 14px; }
.lb-shared header span { font-size: 12px; color: var(--muted); }
.lb-shared .lb-entry-cover { aspect-ratio: 4 / 3; }
.lb-shared-body { padding: 12px 14px 14px; }
.lb-shared-body h3 { font-size: 16px; margin-bottom: 6px; }
.lb-shared-body > p { font-size: 14px; }

/* Galerie de photos d'une sortie */
.lb-gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: none;
}
.lb-gallery::-webkit-scrollbar { display: none; }
.lb-gallery img {
  flex: 0 0 72%;
  max-width: 260px;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  background: var(--sky-soft);
}

/* Pied d'une sortie : auteur, like */
.lb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  margin-top: 10px;
}
.lb-like {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.lb-like.on { background: #FDECEC; border-color: #F3C9C6; color: #B3261E; }
.lb-like[disabled] { opacity: 0.6; pointer-events: none; }

/* Formulaire de sortie */
.lb-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.lb-photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.lb-photo-preview img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  background: var(--sky-soft);
}
.lb-hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

/* Résumé privé/partagé sur une entrée */
.lb-visibility {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 9px;
}

@media (min-width: 620px) {
  .lb-form-row { grid-template-columns: 1fr 1fr; gap: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .hero-slide.is-active img { transform: none; }
}

/* ------------------------------------------------------------------
   Dumby — le chamois de Rando Coach
   ------------------------------------------------------------------ */

.dumby {
  position: fixed;
  z-index: 60;
  right: 14px;
  bottom: calc(var(--bar-h) + 14px + env(safe-area-inset-bottom, 0px));
  width: calc(100vw - 28px);
  max-width: 320px;
  animation: dumby-in 0.32s ease-out;
}

@keyframes dumby-in {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.dumby-bubble {
  position: relative;
  background: #fff;
  border: 1px solid var(--sky-line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 61, 92, 0.16);
  padding: 12px 13px 13px;
}

.dumby-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: 0;
  background: var(--sky-soft);
  color: var(--mont);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.dumby-close:active { background: var(--sky-line); }

.dumby-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-right: 26px;
}

.dumby-avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sky-soft);
  overflow: hidden;
}
.dumby-svg { display: block; }

.dumby-txt strong {
  display: block;
  font-size: 13px;
  color: var(--mont);
}
.dumby-txt p {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--body);
}

.dumby-offer {
  margin: 9px 0 8px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 600;
}

.dumby .btn-sm {
  width: 100%;
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 8px;
}

/* Bloc « J'ai lu cet article » */
.dumby-read { background: var(--sand); border-color: var(--sky-line); }
.dumby-read-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.dumby-read-head strong { display: block; font-size: 15px; color: var(--mont); }
.dumby-read-head p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.45; }
.dumby-already {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--green);
  font-weight: 600;
  margin: 14px 0 0;
}

@media (min-width: 900px) {
  .dumby { right: 26px; bottom: 26px; max-width: 340px; }
}


/* ---------- Attrait visuel des pages internes ---------- */
.page {
  background-image: linear-gradient(180deg, rgba(205, 230, 245, 0.55) 0, rgba(255, 255, 255, 0) 320px);
}
.page > .pad:first-of-type > .page-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
}
.page > .pad:first-of-type > .page-title::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 1.1em;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--mont) 0%, var(--sky-soft) 100%);
}
.page > .pad:first-of-type > .lead {
  padding-bottom: 6px;
}
.card {
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
@media (hover: hover) {
  .card:hover {
    box-shadow: 0 8px 22px rgba(15, 61, 92, 0.10);
    transform: translateY(-1px);
  }
}
.stat-grid .stat-tile {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(233, 244, 251, 0.96));
  border: 1px solid var(--sky-line);
  border-radius: 14px;
}
.stat-grid .stat-tile strong { color: var(--mont); }
.card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h3 svg { color: var(--mont-2); }

/* ---------- Barre d'onglets : six onglets lisibles ---------- */
@media (max-width: 480px) {
  .tabbar { left: 6px; right: 6px; padding: 5px 2px; gap: 0; }
  .tabbar a { font-size: 9px; padding: 5px 0 4px; gap: 0; }
  .tabbar a span { text-overflow: clip; letter-spacing: -0.2px; }
  .tabbar a svg { width: 19px; height: 19px; }
}

/* ------------------------------------------------------------------
   Randonnées — recherche par mots-clés
   ------------------------------------------------------------------ */

.hike-search { margin: 12px 0 10px; }

.hike-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 5px 5px 5px 12px;
  box-shadow: 0 2px 10px rgba(15, 61, 92, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hike-search-field:focus-within {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(87, 176, 224, 0.18);
}
.hike-search-ico { color: var(--muted); display: inline-flex; flex: 0 0 auto; }
.hike-search-field:focus-within .hike-search-ico { color: var(--mont-2); }

.hike-search-field input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.hike-search-field input[type="search"]:focus { outline: none; }
.hike-search-field input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.hike-search-field input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }

.hike-search-clear {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--sky-soft);
  color: var(--mont);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.hike-search-go {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--mont);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.hike-search-go:active { transform: scale(0.97); }

/* Raccourcis de recherche */
.hike-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 12px;
}
.hike-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mont);
  background: var(--sky-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 11px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.hike-chip span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: #fff;
  border-radius: 999px;
  padding: 0 6px;
  min-width: 18px;
  text-align: center;
}
.hike-chip.on {
  background: var(--mont);
  border-color: var(--mont);
  color: #fff;
}
.hike-chip.on span { background: rgba(255, 255, 255, 0.22); color: #fff; }
.hike-chip:active { transform: scale(0.97); }

/* Lien de remise à zéro des filtres */
.hike-reset {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  margin: 0 0 14px;
}
.hike-reset .ico { flex: 0 0 auto; }

/* Mots trouvés et extrait dans la tuile */
mark.hl {
  background: rgba(87, 176, 224, 0.28);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
  font-weight: 800;
}
.tile-excerpt {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  margin-top: 4px;
}
.tile-excerpt mark.hl { color: var(--mont); background: rgba(87, 176, 224, 0.32); }

@media (max-width: 420px) {
  .hike-search-go { padding: 0 12px; font-size: 13px; }
  .hike-chip { font-size: 12px; padding: 5px 10px; }
}


/* ==================================================================
   Page Contact — formulaire et coordonnées
   ================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 20px;
}
@media (min-width: 860px) {
  .contact-grid { grid-template-columns: 1.4fr 1fr; align-items: start; }
}
.contact-grid .card { margin: 0; }
.contact-side .row { margin-bottom: 14px; }
.contact-side .row-body strong { display: block; font-size: 14px; }
.contact-side .row-body span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.contact-side .btn { margin-top: 8px; }

/* Champ piège anti-robot : invisible pour un humain, présent dans le code. */
.contact-piege {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 10px 0 0;
  text-align: center;
}

.contact-grid textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--sky-line);
  background: #fff;
  color: var(--ink);
  resize: vertical;
}
.contact-grid textarea:focus {
  outline: none;
  border-color: var(--mont-2);
  box-shadow: 0 0 0 3px rgba(27, 94, 136, 0.12);
}

@media (max-width: 420px) {
  .contact-grid .card { padding: 16px; }
  .contact-grid { gap: 12px; }
}

/* ==================================================================
   Administration — messages reçus
   ================================================================== */
.message-body {
  background: var(--sky-soft);
  border: 1px solid var(--sky-line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  word-break: break-word;
}
@media (max-width: 420px) {
  .message-body { font-size: 13px; padding: 10px 12px; }
}
