/* ==========================================================================
   Mre SpotGuide • Design System Océan & Plage Mobile-First
   Conçu & Développé par MreSystems © 2026
   ========================================================================== */

:root {
  /* Palette de Couleurs Océan & Sable */
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-dark: #075985;
  --primary-light: #e0f2fe;
  
  --lagoon: #0d9488;
  --lagoon-light: #ccfbf1;
  --sand: #f59e0b;
  --sand-light: #fef3c7;
  --coral: #f43f5e;
  --coral-light: #ffe4e6;

  /* Neutres & Contrastes pour l'extérieur / soleil */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-focus: #38bdf8;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-sub: #475569;
  --text-white: #ffffff;

  /* Ombres & Effets */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.12);
  --shadow-float: 0 8px 24px rgba(2, 132, 199, 0.25);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset de base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Règle Utilitaire Universelle Masquage */
.hidden {
  display: none !important;
}

/* Conteneur Global */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* ==========================================================================
   Header Top Nav
   ========================================================================== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.brand-full-logo {
  height: 56px;
  max-height: 60px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(2, 132, 199, 0.3));
  transition: transform var(--transition);
}

.brand:hover .brand-full-logo {
  transform: scale(1.03);
}

.brand-slogan-line {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-sub);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.modal-header-badge-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}

@media (max-width: 620px) {
  .brand-slogan-line {
    display: none;
  }
  .brand-full-logo {
    height: 48px;
    max-height: 52px;
  }
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.1;
}

.brand-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  font-size: 0.72rem;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
  margin: 0;
}

.brand-title-accent {
  color: var(--primary);
  background: linear-gradient(135deg, #0284c7, #024e82);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.69rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 3px 0 0 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.user-avatar {
  font-size: 1.1rem;
}

.btn-primary-add {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--shadow-float);
  transition: var(--transition);
}

.btn-primary-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(2, 132, 199, 0.35);
}

/* ==========================================================================
   Zone de Recherche & Filtres Rapides
   ========================================================================== */
.search-filter-section {
  padding: 14px 18px 8px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.search-bar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  padding: 0 12px;
  transition: var(--transition);
}

.search-bar-wrap:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.search-icon {
  font-size: 1rem;
  opacity: 0.6;
  margin-right: 8px;
}

.search-bar-wrap input {
  width: 100%;
  padding: 11px 0;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
}

.btn-clear {
  border: none;
  background: transparent;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.filter-pills-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 2px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filter-pills-scroll::-webkit-scrollbar {
  display: none;
}

.pill {
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-sub);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.pill:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

/* ==========================================================================
   Switch Vue (Liste vs Carte) & GPS Indicator
   ========================================================================== */
.view-switcher-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--bg-main);
}

.tabs-control {
  display: flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 3px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  border-radius: calc(var(--radius-md) - 2px);
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active {
  background: white;
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

.gps-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--lagoon);
  background: var(--lagoon-light);
  padding: 4px 9px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lagoon);
  animation: pulseAnimation 2s infinite;
}

@keyframes pulseAnimation {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* ==========================================================================
   Conteneur Principal & Vues
   ========================================================================== */
.main-content {
  flex: 1;
  padding: 14px 18px 24px;
}

.content-view {
  display: none;
}

.content-view.active {
  display: block;
}

/* Grille des Cartes Spots */
.spots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* Carte Individuelle de Spot (Style Guide Touristique) */
.spot-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.spot-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.spot-cover-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  background: #e2e8f0;
  overflow: hidden;
  cursor: pointer;
}

.spot-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.spot-card:hover .spot-cover-img {
  transform: scale(1.04);
}

.spot-photo-count-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 4px;
}

.spot-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.spot-fav-btn:hover {
  transform: scale(1.15);
}

.spot-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(2, 132, 199, 0.9);
  backdrop-filter: blur(6px);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Corps de la carte */
.spot-card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.spot-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.spot-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  cursor: pointer;
}

.spot-card-title:hover {
  color: var(--primary);
}

.spot-card-rating {
  font-size: 0.85rem;
  color: var(--sand);
  white-space: nowrap;
}

.spot-card-address {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
}

/* Badges pratiques (Amélioration) */
.spot-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.spot-mini-tag {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  color: var(--text-sub);
}

.spot-mini-tag.weather-tag {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
}

.spot-mini-tag.distance-tag {
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
}

/* Footer de carte & Bouton Y Aller */
.spot-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.btn-card-itinerary {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-card-itinerary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-card-details {
  flex: 1;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-sub);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-card-details:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

/* ==========================================================================
   Vue Carte Interactive Leaflet
   ========================================================================== */
#viewMap {
  position: relative;
  height: calc(100vh - 220px);
  min-height: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.leaflet-map-wrapper {
  width: 100%;
  height: 100%;
}

.map-controls-floating {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 800;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-map-float {
  padding: 8px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-map-float:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* Custom Marker Leaflet Popup */
.custom-leaflet-popup .leaflet-popup-content-wrapper {
  border-radius: var(--radius-md);
  padding: 4px;
  box-shadow: var(--shadow-lg);
}

.popup-spot-preview {
  width: 200px;
}

.popup-spot-img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.popup-spot-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.popup-spot-address {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.popup-btn-itinerary {
  display: block;
  text-align: center;
  background: var(--primary);
  color: white !important;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

/* ==========================================================================
   Modales & Formulaires
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.modal-backdrop.hidden {
  display: none;
  opacity: 0;
}

.modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card.modal-large {
  max-width: 720px;
}

@keyframes modalScaleUp {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.modal-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.btn-close-modal {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.btn-close-modal:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.full-width {
  grid-column: 1 / -1;
}

.form-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px;
  width: 100%;
}

.form-group.hidden {
  display: none !important;
}

.form-group label {
  display: block !important;
  width: 100%;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-sub);
  text-align: left;
}

.required-mark {
  color: #ef4444;
  font-weight: 700;
  margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text-main);
  background: white;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Photo Drop Zone */
.photo-upload-box {
  background: #f8fafc;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.photo-upload-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.badge-quota {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 700;
}

.exif-notice {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lagoon);
  background: var(--lagoon-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.drop-zone {
  position: relative;
  border: 2px dashed #94a3b8;
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  background: white;
  cursor: pointer;
  transition: var(--transition);
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  font-size: 2rem;
  margin-bottom: 6px;
  display: block;
}

.drop-zone-content p {
  font-size: 0.9rem;
  color: var(--text-sub);
}

.drop-zone-content small {
  color: var(--text-muted);
}

.photo-previews-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.photo-preview-item {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #e2e8f0;
}

.photo-preview-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-remove-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(244, 63, 94, 0.9);
  color: white;
  border: none;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Panneau Localisation & GPS */
.location-panel {
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 14px;
}

.location-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.location-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 6px 0 12px 0;
}

.btn-location-toolbar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}

.btn-location-toolbar.primary {
  background: var(--primary);
  color: white;
  border: none;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.btn-location-toolbar.primary:hover {
  background: var(--primary-hover);
}

.btn-location-toolbar.secondary {
  background: white;
  color: var(--primary-dark);
  border: 1.5px solid #bae6fd;
}

.btn-location-toolbar.secondary:hover {
  background: #f0f9ff;
}

.alert-exif {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.coord-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.input-with-label small {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.input-btn-combo {
  display: flex;
  gap: 6px;
}

.input-btn-combo input {
  flex: 1;
}

.btn-compact {
  padding: 0 12px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.mini-map-picker {
  margin-top: 12px;
}

.mini-map-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

#miniMapPicker {
  height: 180px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Modale Footer Boutons */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}

.modal-footer.space-between {
  justify-content: space-between;
}

.btn-cancel {
  padding: 10px 18px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-save, .btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-save:hover, .btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  padding: 10px 16px;
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-danger {
  padding: 10px 16px;
  background: var(--coral);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
}

.btn-danger-outline {
  padding: 10px 16px;
  background: white;
  color: var(--coral);
  border: 1px solid #fecdd3;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   Modale Fiche Spot Détail
   ========================================================================== */
.spot-detail-badge {
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Carrousel Photos */
.detail-carousel-container {
  position: relative;
  width: 100%;
  height: 280px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0f172a;
  margin-bottom: 16px;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.carousel-arrow.prev { left: 10px; }
.carousel-arrow.next { right: 10px; }

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.carousel-dot.active {
  background: white;
  width: 18px;
  border-radius: 4px;
}

/* Météo Live Card */
.live-weather-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.weather-icon-temp {
  display: flex;
  align-items: center;
  gap: 12px;
}

.weather-emoji {
  font-size: 2.2rem;
}

.weather-temp {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.1;
}

.weather-desc {
  font-size: 0.8rem;
  opacity: 0.9;
}

.weather-details-col {
  text-align: right;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
}

/* Actions Fiche Spot (Itinéraire + Partage) */
.detail-action-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.btn-itinerary-cta {
  flex: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: var(--transition);
}

.btn-itinerary-cta:hover {
  transform: translateY(-1px);
}

.btn-icon-big {
  font-size: 1.8rem;
}

.btn-itinerary-text strong {
  display: block;
  font-size: 1rem;
}

.btn-itinerary-text small {
  font-size: 0.75rem;
  opacity: 0.9;
}

.btn-share-cta {
  flex: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #25d366;
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-favorite-cta {
  width: 50px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Specs Pratiques Grid */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.spec-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.spec-icon {
  font-size: 1.2rem;
}

.spec-card small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.spec-card p {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

/* Notes & Carte Fiche */
.detail-notes-card {
  background: var(--sand-light);
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 18px;
}

.detail-notes-card h4 {
  font-size: 0.9rem;
  color: #92400e;
  margin-bottom: 6px;
}

.detail-notes-card p {
  font-size: 0.9rem;
  color: #78350f;
  line-height: 1.4;
}

.detail-meta-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #fcd34d;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #92400e;
}

.detail-map-box h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.detail-leaflet-map {
  height: 190px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

/* ==========================================================================
   Modale Auth & Cloudflare
   ========================================================================== */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.auth-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.auth-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-guest-divider {
  text-align: center;
  position: relative;
  margin: 12px 0;
}

.auth-guest-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.auth-guest-divider span {
  position: relative;
  background: white;
  padding: 0 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.profile-header-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: #f0f9ff;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.avatar-large {
  font-size: 2rem;
  background: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.badge-role {
  font-size: 0.72rem;
  font-weight: 700;
  background: #dcfce7;
  color: #166534;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.stats-counter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.stat-counter {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.stat-num {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.stat-counter small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sync-actions-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.sync-actions-box h4 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.sync-buttons-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.sync-buttons-row button {
  flex: 1;
  font-size: 0.82rem;
}

/* ==========================================================================
   Toast Notification & Utilitaires
   ========================================================================== */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast-notification.hidden {
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
}

.empty-state {
  text-align: center;
  padding: 48px 16px;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px dashed #cbd5e1;
}

.empty-illustration {
  font-size: 3.5rem;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto 18px;
  font-size: 0.92rem;
}

.btn-cta {
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--shadow-float);
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Footer Légal Conforme MreSystems
   ========================================================================== */
.app-footer {
  text-align: center;
  padding: 22px 16px 28px;
  border-top: 1px solid var(--border);
  background: white;
  margin-top: auto;
}

.footer-legal {
  font-size: 0.82rem;
  color: var(--text-sub);
  margin-bottom: 10px;
  line-height: 1.45;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-sep {
  color: #cbd5e1;
  font-size: 0.7rem;
  user-select: none;
}

.auth-prompt-banner {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-text-content h3 {
  font-size: 1rem;
  margin: 14px 0 6px;
  color: var(--primary-dark);
}

.legal-text-content p {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-bottom: 10px;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 640px) {
  .top-nav {
    padding: 10px 14px;
  }
  .brand-title {
    font-size: 1.1rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .specs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .photo-previews-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .coord-inputs-row {
    grid-template-columns: 1fr;
  }
  .btn-primary-add .btn-text {
    display: none;
  }
}

/* ==========================================================================
   Pages Légales SaaS • Typographie Haute Densité (MreSystems)
   ========================================================================== */
.legal-body {
  background-color: #f8fafc;
  color: #334155;
  min-height: 100vh;
}

.legal-main-wrap {
  padding: 24px 16px 60px;
}

.legal-container {
  max-width: 920px;
  margin: 0 auto;
}

.legal-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 16px;
  padding: 6px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.legal-back-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.legal-card-saas {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  padding: 36px 42px;
}

.legal-doc-header {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 20px;
  margin-bottom: 28px;
}

.legal-badge-pill {
  display: inline-block;
  font-size: 0.70rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}

.legal-doc-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 8px;
}

.legal-meta-date {
  font-size: 0.74rem;
  color: #64748b;
  line-height: 1.4;
}

.legal-section {
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px dashed #f1f5f9;
}

.legal-section:last-of-type {
  border-bottom: none;
}

.legal-section h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.legal-section p {
  font-size: 0.81rem;
  line-height: 1.7;
  color: #475569;
  margin-bottom: 10px;
  text-align: justify;
}

.legal-section ul {
  margin-left: 22px;
  margin-bottom: 12px;
}

.legal-section li {
  font-size: 0.81rem;
  line-height: 1.7;
  color: #475569;
  margin-bottom: 6px;
}

.legal-section strong {
  color: #0f172a;
  font-weight: 700;
}

.legal-section code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.74rem;
  color: var(--primary);
  font-family: monospace;
}

.legal-table-responsive {
  overflow-x: auto;
  margin: 14px 0;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
}

.legal-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
  text-align: left;
}

.legal-data-table th {
  background: #f8fafc;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 700;
  color: #1e293b;
}

.legal-data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  vertical-align: top;
}

.legal-data-table tr:last-child td {
  border-bottom: none;
}

.legal-doc-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  font-size: 0.76rem;
  color: #64748b;
}

.legal-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.legal-footer-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.legal-footer-links a:hover,
.legal-footer-links a.active {
  color: #0f172a;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .legal-card-saas {
    padding: 22px 18px;
  }
  .legal-doc-header h1 {
    font-size: 1.2rem;
  }
}

