/* ============================================================
   Zot Ride – Styles globaux
   ============================================================ */

:root {
  --bg: #0d0d0d;
  --bg-card: #181818;
  --bg-card2: #202020;
  --border: #2a2a2a;
  --primary: #e63946;
  --primary-dark: #c1121f;
  --accent: #f4a261;
  --text: #e2e2e2;
  --text-muted: #a0a0a0;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #fff; }

/* Surcharge Bootstrap text-muted pour notre thème sombre */
.text-muted { color: var(--text-muted) !important; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: rgba(13,13,13,.97) !important;
  border-bottom: 1px solid var(--border);
  padding: .65rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.navbar-brand {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff !important;
}
.brand-accent { color: var(--primary); }

/* Burger menu mobile */
.navbar-toggler {
  border: 1px solid rgba(255,255,255,.35) !important;
  padding: .35rem .55rem;
  border-radius: 6px;
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-width='2.5' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  width: 1.4em; height: 1.4em;
}
.navbar-toggler:focus { box-shadow: 0 0 0 2px rgba(230,57,70,.4); }

.nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  padding: .4rem .75rem !important;
  border-radius: 6px;
  transition: color .2s, background .2s;
}
.nav-link:hover { color: #fff !important; background: var(--bg-card); }

.notif-label {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
}
.nav-link:hover .notif-label { color: #fff; }

.nav-avatar {
  width: 28px; height: 28px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; color: #fff;
}

.notif-link { position: relative; }
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--primary);
  color: #fff; font-size: .65rem; font-weight: 700;
  border-radius: 10px; padding: 1px 5px;
  min-width: 18px; text-align: center;
}

/* Dropdown */
.dropdown-dark {
  background: var(--bg-card2) !important;
  border: 1px solid var(--border) !important;
  min-width: 180px;
}
.dropdown-dark .dropdown-item {
  color: var(--text); padding: .5rem 1rem;
}
.dropdown-dark .dropdown-item:hover { background: var(--border); color: #fff; }
.dropdown-dark .dropdown-divider { border-color: var(--border); }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at top, #1a1a2e 0%, #0d0d0d 60%);
  padding: 1.5rem;
}

.auth-wrap { width: 100%; max-width: 430px; }

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 2.25rem;
  box-shadow: 0 25px 60px rgba(0,0,0,.5);
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-logo h1 {
  font-size: 2.2rem; font-weight: 900;
  letter-spacing: 3px; text-transform: uppercase;
  color: #fff; margin-bottom: .25rem;
}
/* Sous-titre de page affiché sous le logo (ex: "Espace Partenaire", "Connexion") */
.auth-wrap .text-center > p.text-muted {
  color: #c8c8c8 !important;
  font-size: .9rem;
  letter-spacing: .5px;
}

/* ============================================================
   GENERIC PAGE
   ============================================================ */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}

.page-title {
  font-size: 1.6rem; font-weight: 700; color: #fff;
}

/* ============================================================
   DARK CARD
   ============================================================ */
.dark-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.card-section-title {
  font-size: 1rem; font-weight: 700;
  color: #fff; margin-bottom: 1rem;
}

/* ============================================================
   FORM CONTROLS
   ============================================================ */
.form-control, .form-select {
  background: #111 !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 8px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 .2rem rgba(230,57,70,.2) !important;
}
.form-control::placeholder { color: var(--text-muted); }
.form-label { font-weight: 500; font-size: .9rem; color: var(--text); }
.form-select option { background: #1a1a1a; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  font-weight: 600;
}
.btn-primary:hover { background: var(--primary-dark) !important; border-color: var(--primary-dark) !important; }
.btn-outline-secondary { border-color: var(--border); color: var(--text-muted); }
.btn-outline-secondary:hover { background: var(--border); color: #fff; border-color: var(--border); }

/* ============================================================
   SORTIE CARDS (dashboard)
   ============================================================ */
.sortie-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  height: 100%;
  display: flex; flex-direction: column;
}
.sortie-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(230,57,70,.15);
}
.sortie-date-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(230,57,70,.15);
  border: 1px solid rgba(230,57,70,.3);
  color: var(--primary);
  border-radius: 20px; padding: 4px 12px;
  font-size: .8rem; font-weight: 600;
  margin-bottom: .75rem;
}
.sortie-card h5 { color: #fff; font-weight: 700; margin-bottom: .4rem; }
.sortie-card p { color: var(--text-muted); font-size: .85rem; flex-grow: 1; }
.sortie-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: .75rem; padding-top: .75rem;
  border-top: 1px solid var(--border);
}
.sortie-organizer { color: var(--text-muted); font-size: .82rem; }
.participants-pill {
  background: rgba(244,162,97,.1);
  border: 1px solid rgba(244,162,97,.3);
  color: var(--accent);
  border-radius: 20px; padding: 3px 10px;
  font-size: .78rem; font-weight: 600;
}
.participants-pill.full { background: rgba(230,57,70,.1); border-color: rgba(230,57,70,.3); color: var(--primary); }

/* ============================================================
   SORTIE DETAIL
   ============================================================ */
.detail-meta { display: flex; flex-direction: column; gap: .5rem; }
.detail-meta-item { display: flex; align-items: center; gap: .6rem; color: var(--text); font-size: .92rem; }
.detail-meta-item i { width: 18px; color: var(--primary); text-align: center; }

.participant-row {
  display: flex; align-items: center; gap: .6rem;
  padding: .4rem 0; border-bottom: 1px solid var(--border);
}
.participant-row:last-child { border-bottom: none; }
.mini-avatar {
  width: 32px; height: 32px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; color: var(--text-muted);
  flex-shrink: 0;
}

/* ============================================================
   PROFILE
   ============================================================ */
.big-avatar {
  width: 80px; height: 80px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.stat-num { font-size: 2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-lbl { font-size: .72rem; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.notif-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: .5rem;
}
.notif-item.unread {
  border-left: 3px solid var(--primary);
  background: rgba(230,57,70,.04);
}
.notif-time { font-size: .72rem; color: var(--text-muted); }

/* ============================================================
   ADMIN
   ============================================================ */
.admin-tabs {
  display: flex; gap: .5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.admin-tab {
  background: none; border: none;
  color: var(--text-muted);
  font-weight: 600; font-size: .9rem;
  padding: .5rem 1.25rem;
  border-bottom: 2px solid transparent;
  cursor: pointer; transition: color .2s, border-color .2s;
  position: relative;
}
.admin-tab:hover { color: #fff; }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-badge {
  background: var(--accent); color: #000;
  font-size: .65rem; font-weight: 700;
  border-radius: 10px; padding: 1px 6px;
  margin-left: 5px;
}

.admin-user-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: .75rem;
  transition: border-color .2s;
}
.admin-user-card:hover { border-color: #444; }

.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}
.admin-stat-card .num { font-size: 2.2rem; font-weight: 800; color: var(--primary); }
.admin-stat-card .lbl { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }

.user-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: .6rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem;
}
.user-row.pending  { border-left: 3px solid var(--accent); }
.user-row.blocked-row { border-left: 3px solid #ffc107; opacity: .75; }

.badge-pending {
  background: rgba(244,162,97,.15);
  color: var(--accent);
  border: 1px solid rgba(244,162,97,.4);
  border-radius: 20px; padding: 2px 10px; font-size: .75rem; font-weight: 600;
}
.badge-validated {
  background: rgba(40,167,69,.1);
  color: #5cb85c;
  border: 1px solid rgba(40,167,69,.35);
  border-radius: 20px; padding: 2px 10px; font-size: .75rem; font-weight: 600;
}

/* ============================================================
   MAP WAYPOINTS
   ============================================================ */
.wp-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .35rem .5rem;
  background: rgba(255,255,255,.03);
  border-radius: 6px;
  margin-bottom: 4px;
  font-size: .83rem;
}
.wp-num {
  width: 24px; height: 24px;
  border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; color: #fff;
}
.wp-num.first { background: var(--primary); }
.wp-num.other { background: var(--accent); }
.wp-item .form-control { flex: 1; font-size: .8rem; padding: 2px 8px; }
.badge-point {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%; font-size: .7rem; font-weight: 700; color: #fff;
  background: var(--accent);
}
.badge-point.first { background: var(--primary); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center; padding: 4rem 2rem; color: var(--text-muted);
}
.empty-state i { font-size: 3.5rem; opacity: .2; display: block; margin-bottom: 1rem; }

/* ============================================================
   TOAST
   ============================================================ */
.toast { background: #222 !important; border: 1px solid var(--border) !important; min-width: 240px; }

/* ============================================================
   MAP FULLSCREEN
   ============================================================ */

#map-fullscreen-btn:hover { background: rgba(45,45,45,0.98) !important; color: #fff !important; }

/* ============================================================
   MAP SEARCH BAR
   ============================================================ */
.map-search-bar { position: relative; }

.map-search-icon {
  background: #111;
  border: 1px solid var(--border);
  border-right: none;
  color: var(--text-muted);
}

.map-search-bar .input-group .form-control {
  border-left: none;
}

.city-results {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  z-index: 2000;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
}

.city-result-item {
  padding: .55rem 1rem;
  cursor: pointer;
  font-size: .88rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .5rem;
  transition: background .15s;
}
.city-result-item:last-child { border-bottom: none; }
.city-result-item:hover { background: var(--border); color: #fff; }
.city-result-item i { color: var(--primary); flex-shrink: 0; }

.city-result-searching {
  padding: .75rem 1rem;
  color: var(--text-muted);
  font-size: .85rem;
  text-align: center;
}

/* ============================================================
   DASHBOARD v2 — design fidèle à la maquette
   ============================================================ */

/* ── Widget card de base ── */
.widget-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 1.1rem;
}
.widget-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: .6rem;
}
.widget-title {
  font-size: .7rem; font-weight: 800;
  letter-spacing: 1.1px; text-transform: uppercase;
  color: #fff; margin: 0;
}
.widget-sub { font-size: .7rem; color: #666; margin: 2px 0 0; }
.widget-link { font-size: .75rem; color: var(--accent); white-space: nowrap; }
.widget-link:hover { color: #fff; }

/* ── Empty state ── */
.db-empty {
  text-align: center; padding: 1.2rem .5rem; color: #555;
}
.db-empty i { font-size: 1.6rem; opacity: .2; display: block; margin-bottom: .4rem; }
.db-empty p { font-size: .8rem; margin: 0 0 .5rem; }

/* ── Barre de recherche ── */
.db-search-wrap { position: relative; }
.db-searchbar .form-control {
  background: #111 !important;
  border: 1px solid #333 !important;
  border-right: none !important;
  color: var(--text) !important;
  border-radius: 8px 0 0 8px;
  padding: .65rem 1rem;
  font-size: .88rem;
}
.db-search-btn {
  background: #222;
  border: 1px solid #333;
  border-left: none;
  color: #888;
  border-radius: 0 8px 8px 0;
  padding: .65rem 1rem;
  transition: color .2s;
}
.db-search-btn:hover { color: #fff; }

/* ── Bouton Créer ── */
.db-create-btn {
  font-size: .9rem; font-weight: 700;
  letter-spacing: .5px;
  padding: .85rem;
  border-radius: 8px;
  background: var(--primary) !important;
  border: none !important;
  transition: background .2s, transform .1s;
}
.db-create-btn:hover { background: var(--primary-dark) !important; transform: translateY(-1px); }

/* ── Mes Prochaines Sorties — scroll horizontal ── */
.db-sorties-scroll {
  display: flex; gap: .75rem;
  overflow-x: auto; overflow-y: hidden;
  padding-bottom: .4rem;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
  -webkit-overflow-scrolling: touch;
}
.db-sorties-scroll::-webkit-scrollbar { height: 4px; }
.db-sorties-scroll::-webkit-scrollbar-track { background: transparent; }
.db-sorties-scroll::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

.db-sortie-card {
  min-width: 200px; max-width: 230px;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: .9rem;
  cursor: pointer; flex-shrink: 0;
  transition: border-color .2s, transform .15s;
  display: flex; flex-direction: column;
}
.db-sortie-card:hover { border-color: var(--primary); transform: translateY(-2px); }

.db-sortie-date {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(230,57,70,.15);
  border: 1px solid rgba(230,57,70,.25);
  color: var(--primary);
  border-radius: 20px; padding: 3px 10px;
  font-size: .68rem; font-weight: 600;
  margin-bottom: .55rem; width: fit-content;
}
.db-sortie-title {
  color: #fff; font-weight: 700; font-size: .88rem;
  margin-bottom: .2rem; line-height: 1.3;
}
.db-sortie-desc { color: #666; font-size: .75rem; flex: 1; margin-bottom: .6rem; line-height: 1.3; }
.db-sortie-footer {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid #222; padding-top: .5rem; margin-top: auto;
}
.db-organiser { color: #555; font-size: .7rem; display: flex; align-items: center; gap: 4px; }
.db-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(244,162,97,.1);
  border: 1px solid rgba(244,162,97,.25);
  color: var(--accent);
  border-radius: 20px; padding: 2px 8px;
  font-size: .68rem; font-weight: 600;
}
.db-pill.full { background: rgba(230,57,70,.1); border-color: rgba(230,57,70,.25); color: var(--primary); }

/* ── Spots widget — carte gauche + liste droite ── */
.db-spots-inner { display: flex; gap: .6rem; align-items: flex-start; }
.db-spots-map-mini {
  flex: 0 0 46%; height: 250px;
  border-radius: 10px; overflow: hidden;
}
.db-spots-list-side {
  flex: 1; overflow-y: auto; max-height: 250px;
  scrollbar-width: thin; scrollbar-color: #333 transparent;
}
.db-spot-item {
  display: flex; align-items: center; gap: .4rem;
  padding: .26rem .2rem;
  border-radius: 6px; cursor: pointer;
  font-size: .75rem; color: #ccc;
  transition: background .15s;
}
.db-spot-item:hover { background: #222; color: #fff; }
.db-spot-num {
  min-width: 19px; height: 19px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.db-spot-name { flex: 1; line-height: 1.2; }
.db-spot-ride { color: var(--accent); font-size: .7rem; }

/* Leaflet spot markers */
.spot-marker {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,.5);
  border: 2px solid rgba(255,255,255,.15);
}
.spot-marker.viewpoint { background: var(--primary); }
.spot-marker.balade    { background: var(--accent); }

/* ── Zot'Flux — social feed ── */
.flux-post {
  padding: .85rem 0;
  border-bottom: 1px solid #222;
}
.flux-post:last-child { border-bottom: none; }
.flux-post-header { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .6rem; }
.flux-user-avatar {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%; background: #333;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700; color: var(--text);
}
.flux-group-avatar {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%; background: rgba(230,57,70,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; color: var(--primary);
}
.flux-text { font-size: .82rem; color: var(--text); line-height: 1.4; }
.flux-text strong { color: #fff; }
.flux-text .flux-link { color: var(--accent); cursor: pointer; }
.flux-text .flux-link:hover { color: #fff; }

.flux-photos {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 3px; border-radius: 8px; overflow: hidden;
  margin: .55rem 0;
}
.flux-photo {
  height: 88px; background: #1e2e1e;
  display: flex; align-items: center; justify-content: center;
  color: #2a4a2a; font-size: 1.2rem; overflow: hidden;
}
.flux-route-map {
  width: 100%; height: 130px;
  border-radius: 8px; overflow: hidden;
  margin: .55rem 0;
}
.flux-actions {
  display: flex; align-items: center; gap: .65rem; margin-top: .4rem;
}
.flux-action-btn {
  background: none; border: none; color: #555;
  font-size: .76rem; cursor: pointer; padding: 0;
  display: flex; align-items: center; gap: 4px;
  transition: color .2s;
}
.flux-action-btn:hover { color: #fff; }
.flux-comment-input {
  flex: 1; background: #111; border: 1px solid #2a2a2a;
  border-radius: 20px; padding: .3rem .8rem;
  font-size: .76rem; color: var(--text); outline: none;
}
.flux-comment-input:focus { border-color: #444; }

/* ── Mes Groupes — avatars circulaires ── */
.db-groups-grid {
  display: flex; gap: .5rem; flex-wrap: wrap;
  justify-content: center; padding: .3rem 0;
}
.db-group-item {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: .25rem; cursor: pointer;
}
.db-group-circle {
  width: 68px; height: 68px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff;
  border: 2px solid rgba(255,255,255,.08);
  transition: transform .2s, border-color .2s;
  overflow: hidden;
}
.db-group-circle:hover { transform: scale(1.06); border-color: var(--primary); }
.db-group-gname { font-size: .68rem; font-weight: 700; color: #ccc; max-width: 72px; line-height: 1.2; }
.db-group-role { font-size: .62rem; color: #666; display: flex; align-items: center; gap: 3px; }
.db-group-role .dot { width: 5px; height: 5px; border-radius: 50%; background: #4caf50; flex-shrink: 0; }

.db-group-create-btn {
  background: #1e1e1e; border: 1px solid #2e2e2e;
  color: #aaa; font-size: .76rem; font-weight: 600;
  letter-spacing: .5px; padding: .5rem;
  border-radius: 8px; transition: background .2s, border-color .2s;
}
.db-group-create-btn:hover { background: #2a2a2a; border-color: var(--primary); color: #fff; }

/* ── Partenaires — catégories grid 2 cols ── */
.db-partner-section { margin-bottom: .7rem; }
.db-partner-cat-row {
  display: flex; align-items: center; gap: .5rem;
  background: #111; border-radius: 8px;
  padding: .45rem .65rem; margin-bottom: .4rem;
  font-size: .67rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .7px; color: #ccc;
}
.db-partner-cat-row .cat-icon {
  width: 24px; height: 24px; background: #1e1e1e;
  border-radius: 5px; display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: .65rem; flex-shrink: 0;
}
.db-partner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; }
.db-partner-box {
  background: #111; border: 1px solid #1e1e1e;
  border-radius: 8px; padding: .45rem .35rem;
  text-align: center; cursor: default;
  transition: border-color .2s;
}
.db-partner-box:hover { border-color: #333; }
.db-partner-logo-box {
  width: 38px; height: 38px; background: #1e1e1e;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: .55rem; font-weight: 700; color: #666;
  margin: 0 auto .25rem; overflow: hidden;
}
.db-partner-pname { font-size: .64rem; color: #888; line-height: 1.2; }

.db-partner-inscription-btn {
  background: #111; border: 1px solid #2a2a2a;
  color: #777; font-size: .73rem; font-weight: 700;
  letter-spacing: .5px; padding: .5rem;
  border-radius: 8px; transition: border-color .2s, color .2s;
}
.db-partner-inscription-btn:hover { border-color: #555; color: #fff; }

/* ── Footer ── */
.site-footer {
  background: transparent; border-top: 1px solid #1a1a1a;
  padding: .65rem 1rem; margin-top: 1rem;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem;
}
.footer-date { font-size: .7rem; color: #444; }
.footer-links { display: flex; align-items: center; gap: .85rem; }
.footer-links a { font-size: .7rem; color: #444; transition: color .2s; }
.footer-links a:hover { color: #fff; }

/* ── Modals ── */
.modal-dark .modal-content {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
}
.modal-dark .modal-header { border-bottom: 1px solid var(--border); }
.modal-dark .modal-footer { border-top: 1px solid var(--border); }
.modal-dark .btn-close { filter: invert(1); }

/* ============================================================
   PARTENAIRES
   ============================================================ */

/* Code de connexion partenaire */
.partner-code {
  font-family: 'Courier New', Courier, monospace;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: 2px;
  background: #111;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 2px 8px;
  color: #f4a261;
}

/* Carte d'offre */
.offer-card {
  background: #202020;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: .75rem 1rem;
  margin-bottom: .6rem;
}
.offer-card + .offer-card { margin-top: 0; }

/* Badge type d'offre */
.offer-type-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 1px 7px;
  color: #fff;
}

/* Mini bouton (xs) */
.btn-xs {
  padding: 1px 6px;
  font-size: .7rem;
  border-radius: 4px;
  line-height: 1.4;
}

/* Modal détail partenaire */
#pd-map { height: 180px; border-radius: 10px; overflow: hidden; }

/* Espace partenaire – dashboard */
#page-partner-dashboard .dark-card { margin-bottom: 1.25rem; }

/* Carte de localisation partenaire */
#partner-location-map { height: 220px; border-radius: 10px; margin-top: .5rem; }

/* ============================================================
   GUIDED TOUR OVERLAY
   ============================================================ */
.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,13,13,.97);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  animation: tourFadeIn .35s ease;
}
.tour-overlay.tour-out {
  animation: tourFadeOut .3s ease forwards;
}
@keyframes tourFadeIn  { from { opacity: 0 } to { opacity: 1 } }
@keyframes tourFadeOut { from { opacity: 1 } to { opacity: 0 } }

.tour-inner {
  max-width: 380px;
  width: 100%;
  text-align: center;
  position: relative;
  padding-top: 2rem;
}
.tour-skip {
  position: absolute;
  top: 0;
  right: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: .82rem;
  cursor: pointer;
  padding: 0;
  transition: color .15s;
}
.tour-skip:hover { color: #fff; }
.tour-icon {
  font-size: 4.5rem;
  margin-bottom: 1.25rem;
  line-height: 1;
  display: block;
}
.tour-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: .75rem;
}
.tour-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 2rem;
}
.tour-slide { display: none; }
.tour-slide.active { display: block; }
.tour-dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1.75rem;
}
.tour-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background .2s, width .2s, border-radius .2s;
  cursor: pointer;
}
.tour-dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}
#tour-btn-next {
  min-width: 150px;
  padding: .7rem 2.25rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 30px;
}

/* ============================================================
   MOBILE BOTTOM NAV
   ============================================================ */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(13,13,13,.98);
  border-top: 1px solid var(--border);
  z-index: 1025;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-nav.visible { display: flex; }

.mnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .02em;
  text-decoration: none;
  flex: 1;
  padding: .4rem 0 .25rem;
  position: relative;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
}
.mnav-item.active { color: #fff; }
.mnav-item.active > i { color: var(--primary); }
.mnav-item:hover { color: #fff; }
.mnav-item > i { font-size: 1.15rem; }

.mnav-create {
  background: var(--primary);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  color: #fff !important;
  box-shadow: 0 0 0 5px rgba(230,57,70,.18);
  margin-top: -10px;
  gap: 0;
  padding: 0;
}
.mnav-create > i { font-size: 1.3rem; color: #fff !important; }
.mnav-create.active { box-shadow: 0 0 0 5px rgba(230,57,70,.35); }

.mnav-badge {
  position: absolute;
  top: .15rem;
  right: 50%;
  transform: translateX(60%);
  background: var(--primary);
  color: #fff;
  font-size: .58rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 0 5px;
  min-width: 16px;
  text-align: center;
  line-height: 16px;
  pointer-events: none;
}

/* ============================================================
   LANDING PAGE — architecture simple, mobile-first
   ============================================================ */

/* Override auth-page : plein écran fixe */
#page-landing {
  position: fixed !important;
  inset: 0;
  padding: 0;
  background: var(--bg);
  display: block; /* PAS de !important : d-none doit pouvoir masquer la page */
  overflow: hidden;
  min-height: unset;
  align-items: unset;
  justify-content: unset;
}

/* ── Carte plein écran ── */
#landing-map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ── Top bar ── */
#landing-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 52px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background: rgba(13,13,13,.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ltb-brand {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
}
.ltb-brand span { color: var(--primary); }
.ltb-login {
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 20px;
  padding: .3rem .85rem;
  text-decoration: none;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.ltb-login:hover { color: #fff; border-color: rgba(255,255,255,.5); }

/* ── Panel commun ── */
#landingPanel {
  position: absolute;
  z-index: 90;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
}

/* ── Desktop : sidebar gauche 400px ── */
@media (min-width: 992px) {
  #landing-map    { left: 400px; top: 0; }
  #landing-topbar { right: auto; width: 400px; border-right: 1px solid var(--border); }
  #landingPanel   { top: 52px; left: 0; bottom: 0; width: 400px; border-right: 1px solid var(--border); overflow-y: auto; }
  #landing-handle { display: none; }
  #landing-scroll { display: block !important; }
}

/* ── Mobile : overlay fixe en bas ── */
@media (max-width: 991px) {
  #landing-map    { top: 52px; }
  #landing-topbar { right: 0; }
  #landingPanel {
    left: 0; right: 0; bottom: 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,.55);
    overflow: hidden;
    max-height: 82vh;
  }
  /* Zone déroulante : cachée par défaut, visible quand expanded */
  #landing-scroll          { display: none; }
  #landingPanel.expanded   { overflow-y: auto; }
  #landingPanel.expanded #landing-scroll { display: block; }
}

/* ── Handle (mobile) ── */
#landing-handle {
  display: flex;
  justify-content: center;
  padding: .65rem 0 .3rem;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.lp-bar {
  display: block;
  width: 40px; height: 4px;
  background: rgba(255,255,255,.2);
  border-radius: 2px;
}

/* ── Zone sticky (chips + CTAs) ── */
#landing-sticky {
  padding: .4rem .9rem .85rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex-shrink: 0;
}

/* ── Live counter ── */
.landing-live-counter {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(46,204,113,.08);
  border: 1px solid rgba(46,204,113,.2);
  border-radius: 10px;
  padding: .5rem .85rem;
  font-size: .84rem;
  color: #2ecc71;
  font-weight: 600;
}
.landing-live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: #2ecc71;
  border-radius: 50%;
  animation: llivePulse 1.5s ease infinite;
  flex-shrink: 0;
}
@keyframes llivePulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(46,204,113,.5); }
  50%      { box-shadow: 0 0 0 5px rgba(46,204,113,0); }
}

/* ── CTA banner ── */
.landing-cta-banner {
  background: rgba(230,57,70,.08);
  border: 1px solid rgba(230,57,70,.2);
  border-radius: 10px;
  padding: .6rem .85rem;
  font-size: .82rem;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.landing-cta-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  font-size: .82rem;
}
.landing-cta-link:hover { color: #fff; }

/* ── Chips filtre ── */
.landing-chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.landing-chip {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 20px;
  padding: .32rem .8rem;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.landing-chip:hover  { border-color: var(--accent); color: var(--accent); }
.landing-chip.active { background: var(--accent); border-color: var(--accent); color: #1a1a1a; }

/* ── Boutons CTA ── */
.lp-ctas { display: flex; flex-direction: column; }

/* ── Zone déroulante ── */
#landing-scroll {
  padding: .25rem .9rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* ── Hero ── */
.lp-hero { padding: .75rem 0 .6rem; }
.lp-hero-title {
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.2;
  color: #fff;
  margin-bottom: .45rem;
}
.lp-hero-sub {
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.55;
  margin-bottom: 0;
}

/* ── Tooltip ── */
.landing-create-tip {
  background: rgba(244,162,97,.1);
  border: 1px solid rgba(244,162,97,.3);
  border-radius: 10px;
  padding: .5rem .85rem;
  font-size: .8rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* ── Section title ── */
.lp-section-title {
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin: .75rem 0 .5rem;
}

/* ── Parcours cards ── */
.landing-parcours-list { display: flex; flex-direction: column; gap: .45rem; }
.lpc-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .65rem .85rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  cursor: pointer;
  transition: border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.lpc-card:hover { border-color: var(--accent); }
.lpc-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(244,162,97,.12);
  display: flex; align-items: center; justify-content: center;
}
.lpc-info { flex: 1; min-width: 0; }
.lpc-nom  { font-weight: 700; font-size: .86rem; color: #fff; }
.lpc-desc { font-size: .73rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lpc-dist { font-size: .72rem; color: var(--accent); font-weight: 600; flex-shrink: 0; }

/* ── Marqueurs carte ── */
.lm-parcours {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .8rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.45);
}
.lm-partner {
  width: 38px; height: 38px;
  background: rgba(20,20,20,.9);
  border: 2px solid var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.lm-live {
  width: 32px; height: 32px;
  background: #4cc9f0;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .85rem;
  box-shadow: 0 0 0 4px rgba(76,201,240,.25);
}
.lc-cluster {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .8rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.lc-cluster-partner  { background: var(--accent); }
.lc-cluster-parcours { background: var(--primary); }
.lc-cluster-live     { background: #4cc9f0; }

/* ============================================================
   EXPLORE PAGE (pre-auth route tracing)
   ============================================================ */
/* ============================================================
   EXPLORE PAGE – split-view (panneau gauche + carte droite)
   ============================================================ */
#page-explore {
  display: flex; /* pas de !important : d-none doit pouvoir masquer la page */
  flex-direction: row;
  height: 100dvh;
  height: 100vh;
  padding: 0;
  background: var(--bg);
  align-items: stretch;
  overflow: hidden;
}

/* ── Panneau gauche ── */
.explore-sidebar {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  height: 100%;
  overflow: hidden;
  z-index: 10;
}

.explore-sidebar-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: rgba(13,13,13,.97);
}
.explore-back-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
  min-width: 28px;
  transition: color .15s;
}
.explore-back-btn:hover { color: #fff; }

.explore-sidebar-search {
  padding: .5rem .85rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
}

/* Instruction initiale */
.explore-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1.25rem;
  color: var(--text-muted);
  font-size: .82rem;
  line-height: 1.5;
  gap: .5rem;
  flex-shrink: 0;
}

/* Liste waypoints (prend l'espace disponible) */
.explore-wp-list {
  flex: 1;
  overflow-y: auto;
  padding: .5rem .85rem;
  min-height: 0;
}
.explore-wp-list .wp-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem 0;
  font-size: .82rem;
  border-bottom: 1px solid var(--border);
}
.explore-wp-list .wp-item:last-child { border-bottom: none; }

/* CTA toujours visible en bas du panneau */
.explore-sidebar-cta {
  padding: .85rem 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-card);
}

/* ── Carte (droite, flex:1) ── */
#explore-map {
  flex: 1;
  min-width: 0;
  height: 100%;
}

/* ── Mobile : colonne, sidebar compacte en haut ── */
@media (max-width: 991px) {
  #page-explore {
    flex-direction: column;
    /* height: 100dvh déjà défini dans la règle de base — couvre iOS */
    overflow: visible; /* laisser le dropdown déborder sur la carte */
  }
  .explore-sidebar {
    width: 100%;
    height: auto;
    flex-direction: column;
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    overflow: visible; /* permettre au dropdown de passer par-dessus la carte */
    z-index: 30;       /* au-dessus des couches Leaflet */
  }
  .explore-sidebar-search {
    overflow: visible;
  }
  .explore-hint { display: none; }
  .explore-wp-list {
    flex: none;
    max-height: 80px;
  }
  /* Hide sidebar CTA on mobile — replaced by fixed bottom bar */
  .explore-sidebar-cta { display: none; }
  #explore-map {
    flex: 1;
    min-height: 200px;
    height: auto;
    z-index: 1; /* sous la sidebar */
  }
}

/* Fixed bottom CTA for explore — visible uniquement quand la page explore est active */
#explore-mobile-cta { display: none; }

@media (max-width: 991px) {
  /* Sélecteur frère adjacent : s'affiche seulement si #page-explore n'a pas .d-none */
  #page-explore:not(.d-none) + #explore-mobile-cta {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    padding: .65rem .9rem;
    background: rgba(24,24,24,.97);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(8px);
    z-index: 50;
    gap: .5rem;
    align-items: center;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 576px) {
  .auth-card { padding: 1.5rem 1.25rem; }
  .page-title { font-size: 1.3rem; }
  .dark-card { padding: 1rem; }
}

/* iOS fix : ancrer les formulaires au viewport (exclu : explore qui gère sa propre hauteur) */
@media (max-width: 768px) {
  .auth-page:not(#page-explore):not(#page-landing) {
    position: fixed;
    inset: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    align-items: flex-start;
    padding-top: 1.25rem;
    min-height: unset;
  }
}

@media (max-width: 991px) {
  /* Show mobile nav when logged in */
  body.has-mobile-nav .page {
    padding-bottom: 72px;
  }
  /* Prevent iOS zoom on form inputs */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px !important;
  }
  /* Better tap targets */
  .btn { min-height: 40px; }
}

/* ============================================================
   CHAT ÉPHÉMÈRE
   ============================================================ */
.chat-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  height: 420px;
  margin-top: 1.5rem;
}
.chat-header {
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
}
.chat-header-title {
  font-weight: 700;
  font-size: .95rem;
  color: #fff;
}
.chat-live-dot {
  width: 8px; height: 8px;
  background: #2ecc71;
  border-radius: 50%;
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; }
  50%      { opacity: .3; }
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: .75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.chat-empty {
  color: var(--text-muted);
  font-size: .85rem;
  text-align: center;
  margin: auto;
}
.chat-msg {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  max-width: 85%;
}
.chat-msg.own {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-avatar {
  width: 28px; height: 28px; min-width: 28px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: #fff;
}
.chat-msg.own .chat-avatar { background: #3a86ff; }
.chat-bubble {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 4px;
  padding: .45rem .75rem;
  font-size: .87rem;
  color: var(--text);
  word-break: break-word;
}
.chat-msg.own .chat-bubble {
  background: #1e3a5f;
  border-color: #2d5a8e;
  border-radius: 12px 12px 4px 12px;
}
.chat-meta {
  font-size: .7rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.chat-msg.own .chat-meta { text-align: right; }
.chat-footer {
  padding: .75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: .5rem;
  flex-shrink: 0;
}
.chat-footer input {
  flex: 1;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: .45rem .8rem;
  font-size: .88rem;
  outline: none;
  transition: border-color .2s;
}
.chat-footer input:focus { border-color: #444; }
.chat-footer input::placeholder { color: var(--text-muted); }
.chat-footer button {
  background: var(--primary);
  border: none;
  border-radius: 8px;
  color: #fff;
  padding: .45rem .9rem;
  cursor: pointer;
  font-size: .9rem;
  transition: background .2s;
}
.chat-footer button:hover { background: var(--primary-dark); }
.chat-footer button:disabled { opacity: .5; cursor: not-allowed; }
