/* Navigation live : carte, marqueurs et panneau de guidage.
   Remplace les règles de style.css utilisées par cette page. Les couleurs viennent de app-ui.css. */

.nav-layout {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.nav-side { position: sticky; top: 86px; display: grid; gap: 14px; }
.nav-card { background: #fff; border: 1px solid var(--ui-line); border-radius: 18px; padding: 16px; }
.nav-card-title { font-size: 12px; font-weight: 700; color: var(--ui-muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 10px; }
.nav-map-card { padding: 12px; }
.nav-map { width: 100%; height: calc(100vh - 170px); min-height: 520px; border-radius: 14px; overflow: hidden; border: 1px solid var(--ui-line); }

.nav-modes { display: grid; gap: 8px; }
.nav-modes .mode-chip {
    border: 1px solid var(--ui-line); background: #fff; border-radius: 12px;
    padding: 10px 12px; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ui-text); text-align: left; cursor: pointer;
}
.nav-modes .mode-chip:hover { border-color: var(--ui-primary); }
.nav-modes .mode-chip.active { background: var(--ui-primary); border-color: var(--ui-primary); color: #fff; }

.nav-field label { display: block; font-size: 13px; font-weight: 600; color: var(--ui-text); margin-bottom: 6px; }
.nav-field select { width: 100%; padding: 10px 12px; border: 1px solid var(--ui-line); border-radius: 12px; background: #fff; font: inherit; font-size: 14px; color: var(--ui-text); }

.nav-actions { display: grid; gap: 8px; }
.nav-actions .ui-btn { width: 100%; justify-content: center; }
.nav-actions .ui-btn.stop { background: #fff; color: var(--ui-red); border: 1px solid #fecdd3; }

.nav-switches { display: grid; gap: 10px; }
.nav-switches label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ui-text); cursor: pointer; }
.nav-switches input[type="checkbox"] { width: 40px; height: 22px; accent-color: var(--ui-primary); }

.live-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px; border-radius: 14px; background: var(--ui-primary-soft); border: 1px solid #bfe9d8;
}
.live-banner small { font-size: 12px; color: var(--ui-muted); text-transform: uppercase; letter-spacing: .05em; }
.live-banner strong { display: block; font-size: 14px; color: var(--ui-text); margin-top: 2px; }
.live-pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--ui-primary); flex: 0 0 auto; animation: navPulseGreen 1.6s infinite; }

.route-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.metric-card { background: #fff; border: 1px solid var(--ui-line); border-radius: 14px; padding: 10px 12px; }
.metric-card small { display: block; font-size: 12px; color: var(--ui-muted); margin-bottom: 2px; }
.metric-card strong { font-size: 16px; color: var(--ui-text); }

.progress-shell { font-size: 13px; color: var(--ui-muted); }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 6px; }
.route-progress { height: 8px; border-radius: 999px; background: var(--ui-line); overflow: hidden; }
.route-progress .progress-bar { height: 100%; background: var(--ui-primary); border-radius: 999px; transition: width .4s ease; }

.result-panel { font-size: 14px; color: var(--ui-text); line-height: 1.5; }
.result-panel h3 { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.nav-summary-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.nav-summary-head small { font-size: 12px; color: var(--ui-muted); text-transform: uppercase; letter-spacing: .05em; }
.nav-muted { color: var(--ui-muted); margin: 0; }
.nav-alert { color: var(--ui-red); margin: 0; }
.route-steps { margin: 10px 0 0; padding-left: 18px; max-height: 210px; overflow: auto; color: var(--ui-text); font-size: 14px; }
.route-steps li { margin-bottom: 6px; }
.route-steps li::marker { color: var(--ui-primary); font-weight: 700; }

.map-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.legend-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ui-muted); background: #fff; border: 1px solid var(--ui-line); border-radius: 999px; padding: 5px 10px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-user, .dot-route { background: var(--ui-blue); }
.dot-destination { background: var(--ui-red); }
.dot-trail { background: #33c28f; }
.guidance-hint { margin-top: 10px; font-size: 12px; color: var(--ui-muted); }

.nav-header { margin: 4px 0 18px; }
.nav-header h1 { font-size: 24px; font-weight: 800; color: var(--ui-text); margin: 0 0 6px; letter-spacing: -.01em; }
.nav-header p { margin: 0; font-size: 14px; color: var(--ui-muted); max-width: 760px; line-height: 1.55; }

/* Marqueurs de la carte */
.user-puck, .destination-puck { position: relative; width: 28px; height: 28px; }
.user-puck-core, .destination-core {
    position: absolute; inset: 5px; width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff;
}
.user-puck-core { background: linear-gradient(135deg, #60a5fa, var(--ui-blue)); box-shadow: 0 6px 14px rgba(30,136,255,.3); animation: navPulseBlue 1.8s infinite; }
.destination-core { background: linear-gradient(135deg, #fb7185, var(--ui-red)); box-shadow: 0 6px 14px rgba(225,29,72,.3); animation: navPulseRed 1.6s infinite; }
.user-puck-glow { position: absolute; inset: -8px; border-radius: 50%; background: radial-gradient(circle, rgba(96,165,250,.3), rgba(96,165,250,0)); animation: navGlow 1.8s ease-out infinite; }
.user-puck-arrow {
    position: absolute; left: 50%; top: 50%; width: 0; height: 0;
    border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 14px solid rgba(30,136,255,.55);
    transform: translate(-50%, -120%); transform-origin: 50% 18px; filter: drop-shadow(0 2px 2px rgba(15,23,42,.18));
}
.destination-ring { position: absolute; inset: -5px; border: 2px solid rgba(225,29,72,.45); border-radius: 50%; animation: navOrbit 1.8s linear infinite; }
.route-runner { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--ui-blue); box-shadow: 0 0 0 6px rgba(30,136,255,.18); }

/* Tracés */
.route-line-glow { filter: blur(3px); }
.route-line-dash { animation: navDash 1.1s linear infinite; }

@keyframes navPulseGreen { 0% { box-shadow: 0 0 0 0 rgba(0,168,107,.4); } 70% { box-shadow: 0 0 0 12px rgba(0,168,107,0); } 100% { box-shadow: 0 0 0 0 rgba(0,168,107,0); } }
@keyframes navPulseBlue { 0% { box-shadow: 0 0 0 0 rgba(30,136,255,.45); } 70% { box-shadow: 0 0 0 14px rgba(30,136,255,0); } 100% { box-shadow: 0 0 0 0 rgba(30,136,255,0); } }
@keyframes navPulseRed { 0% { box-shadow: 0 0 0 0 rgba(225,29,72,.45); } 70% { box-shadow: 0 0 0 14px rgba(225,29,72,0); } 100% { box-shadow: 0 0 0 0 rgba(225,29,72,0); } }
@keyframes navGlow { 0% { transform: scale(.85); opacity: .65; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes navOrbit { 0% { transform: scale(.7); opacity: .95; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes navDash { to { stroke-dashoffset: -42; } }

@media (max-width: 991px) {
    .nav-layout { grid-template-columns: 1fr; }
    .nav-side { position: static; }
    .nav-map { height: 60vh; min-height: 380px; }
}

.nav-page { max-width: 1400px; margin: 0 auto; padding: 18px 16px 32px; }
