/* ── Navigation v15 Design System ── */

:root {
  --hud-bg: rgba(13, 33, 21, 0.85);
  --hud-border: rgba(82, 183, 136, 0.4);
  --hud-accent: #69f0ae;
  --glass: blur(12px) saturate(180%);
}

/* 🏁 LiveHUD */
.live-hud {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--hud-bg);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--hud-border);
  border-radius: 40px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  user-select: none;
}

.live-hud:active { transform: translateX(-50%) scale(0.95); }

.hud-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.hud-sep {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.2);
}

.hud-offline {
  border-color: #ff5252;
  box-shadow: 0 0 15px rgba(255, 82, 82, 0.4);
}

/* 📴 Offline Badge */
.offline-badge {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #c62828;
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% { transform: translateX(-50%) scale(1); box-shadow: 0 0 0 0 rgba(198, 40, 40, 0.7); }
  70% { transform: translateX(-50%) scale(1.05); box-shadow: 0 0 0 10px rgba(198, 40, 40, 0); }
  100% { transform: translateX(-50%) scale(1); box-shadow: 0 0 0 0 rgba(198, 40, 40, 0); }
}

/* 📊 Offline Manager Cards */
.offline-river-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

.orc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.orc-name { font-weight: 700; font-size: 15px; }
.orc-age { font-size: 11px; color: #888; }
.orc-stats { font-size: 12px; color: #aaa; margin-bottom: 10px; }

.orc-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.orc-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
.orc-fill { height: 100%; background: var(--hud-accent); width: 0%; transition: width 0.3s; }
.orc-pct { font-size: 11px; font-weight: 700; min-width: 30px; }

.orc-actions { display: flex; gap: 8px; }

/* 🎙️ Voice Settings */
.voice-setting {
  margin-bottom: 16px;
}
.voice-setting label {
  display: block;
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
}
.voice-setting input[type="range"] {
  width: 100%;
  accent-color: var(--hud-accent);
}

/* 🚐 Mode Conducteur */
body.mode-navette #map {
  transition: transform 0.5s ease-out;
}
body.mode-navette .app-header { background: #000; }
body.mode-navette .live-hud { background: #000; border-color: #fff; }

/* 📍 Waypoints */
.wp-marker {
  width: 28px;
  height: 28px;
  background: #ff9800;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

.wp-panel {
  padding: 10px 0;
}
.wp-total { font-size: 14px; color: #ff9800; margin-bottom: 15px; text-align: center; }
.wp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.05);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
}
.wp-num { font-weight: 900; color: #ff9800; width: 20px; }
.wp-name { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.wp-seg { font-size: 11px; color: #888; }
.wp-del { background: none; border: none; color: #ff5252; font-size: 18px; cursor: pointer; padding: 0 5px; }

/* 🧭 SmartChannel Panel */
.sc-panel {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 400px);
  background: var(--hud-bg);
  backdrop-filter: var(--glass);
  border: 2px solid var(--hud-border);
  border-radius: 12px;
  padding: 12px 16px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  z-index: 1400;
  box-shadow: var(--shadow);
  animation: slide-down 0.4s ease-out;
}

@keyframes slide-down {
  from { transform: translate(-50%, -20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.sc-msg { font-size: 14px; font-weight: 600; line-height: 1.4; color: #fff; }
.sc-close { background: rgba(255,255,255,0.1); border: none; color: #fff; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; }

/* 🏁 Return Route Modes */
.rr-modes {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.rr-mode-btn {
  flex: 1;
  padding: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.rr-mode-btn.active {
  background: var(--green-mid);
  border-color: var(--green-light);
  box-shadow: 0 0 10px rgba(82, 183, 136, 0.3);
}

/* 🍔 River Shop */
.shop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  margin-bottom: 8px;
}
.shop-item-info { display: flex; flex-direction: column; gap: 2px; }
.shop-item-name { font-weight: bold; font-size: 14px; color: #fff; }
.shop-item-price { font-size: 12px; color: var(--primary); }

/* 🔄 Paddle Cadence Indicator */
.hud-cadence {
  font-size: 16px;
  font-weight: 800;
  color: #69f0ae;
  text-shadow: 0 0 10px rgba(105, 240, 174, 0.4);
  margin-left: 10px;
}
.hud-cadence small { font-size: 10px; opacity: 0.7; }

/* 🌊 River Depth Indicator */
.hud-depth {
  font-size: 16px;
  font-weight: 800;
  color: #69f0ae;
  margin-left: 10px;
  border-left: 1px solid rgba(255,255,255,0.2);
  padding-left: 10px;
}
.hud-depth small { font-size: 10px; opacity: 0.7; }

/* 🎙️ AI Guide Button */
.hud-ai-btn {
  background: rgba(105, 145, 240, 0.2);
  color: #6991f0;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 11px;
  margin-left: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.hud-ai-btn:active { transform: scale(0.9); background: rgba(105, 145, 240, 0.4); }

/* 🔴 SOS Broadcast Overlay */
.sos-broadcast-overlay {
  position: fixed;
  inset: 0;
  background: rgba(198, 40, 40, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  opacity: 0;
  transition: opacity 0.5s;
  backdrop-filter: blur(8px);
}
.sos-broadcast-overlay.sbo-visible { opacity: 1; }
.sbo-pulse { font-size: 80px; animation: heartbeat 1s infinite; }
.sbo-title { font-size: 28px; font-weight: 900; margin: 20px 0; }
.sbo-btn { 
  margin: 10px; padding: 15px 30px; border-radius: 30px; border: 2px solid #fff; 
  background: transparent; color: #fff; font-weight: 700; cursor: pointer;
}
.sbo-goto { background: #fff; color: #c62828; }

@keyframes heartbeat {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
