'use client' import { useEffect, useMemo, useState } from 'react' import { useRouter } from 'next/navigation' import dynamic from 'next/dynamic' import { useVisitor } from '@/context/VisitorContext' import { t, tPlain } from '@/lib/i18n' import type { SectionDTO, GeoPointDTO, GuidedPathDTO, GuidedStepDTO } from '@/lib/api/types' import { useGeolocation } from '@/hooks/useGeolocation' import { haversineMeters, formatDistance } from '@/lib/geo' import { trackEvent } from '@/lib/stats' import StepTimer from './map/StepTimer' import StepQuiz from './map/StepQuiz' import Toast from './map/Toast' import './map/map.css' const LeafletMap = dynamic(() => import('./map/LeafletMap'), { ssr: false, loading: () => (