- {current?.resource?.url && (
-
)}
diff --git a/src/components/sections/VideoSection.tsx b/src/components/sections/VideoSection.tsx
index c9a4de6..0d5f2b1 100644
--- a/src/components/sections/VideoSection.tsx
+++ b/src/components/sections/VideoSection.tsx
@@ -38,7 +38,7 @@ export default function VideoSection({ section, slug, configId, languages }: Pro
const { language, setAvailableLanguages } = useVisitor()
const router = useRouter()
- useEffect(() => { setAvailableLanguages(languages) }, [languages])
+ useEffect(() => { setAvailableLanguages([]) }, [languages])
const source = section.source ?? section.video?.source
const videoType = useMemo(() => detectType(source), [source])
diff --git a/src/components/sections/WeatherSection.tsx b/src/components/sections/WeatherSection.tsx
index 2858f36..11eb418 100644
--- a/src/components/sections/WeatherSection.tsx
+++ b/src/components/sections/WeatherSection.tsx
@@ -223,7 +223,7 @@ export default function WeatherSection({ section, languages }: Props) {
const router = useRouter()
const [selectedDay, setSelectedDay] = useState(0)
- useEffect(() => { setAvailableLanguages(languages) }, [languages])
+ useEffect(() => { setAvailableLanguages([]) }, [languages])
const weatherData: WeatherData | null = useMemo(() => {
const raw = section.weather?.result
diff --git a/src/components/sections/WebSection.tsx b/src/components/sections/WebSection.tsx
index 4f9ab8b..b60215f 100644
--- a/src/components/sections/WebSection.tsx
+++ b/src/components/sections/WebSection.tsx
@@ -17,7 +17,7 @@ export default function WebSection({ section, slug, configId, languages }: Props
const { language, setAvailableLanguages } = useVisitor()
const router = useRouter()
- useEffect(() => { setAvailableLanguages(languages) }, [languages])
+ useEffect(() => { setAvailableLanguages([]) }, [languages])
const source = section.web?.source ?? section.source
const title = tPlain(section.title, language)
diff --git a/src/components/sections/game/EscapeProgression.tsx b/src/components/sections/game/EscapeProgression.tsx
index 52e11ba..65f6d21 100644
--- a/src/components/sections/game/EscapeProgression.tsx
+++ b/src/components/sections/game/EscapeProgression.tsx
@@ -188,6 +188,16 @@ export default function EscapeProgression({ paths, language }: Props) {
open={showEnd}
title="Bravo !"
html={`Tu as terminé le parcours « ${tPlain(activePath.title, language) || 'parcours'} ».`}
+ icon={
+
+ }
onClose={() => { setShowEnd(false); setActivePathId(null) }}
primaryAction={{ label: 'Recommencer', onClick: () => { setCompletedSteps(new Set()); setQuizPassedSteps(new Set()); setTimerExpiredSteps(new Set()); setZoneNotifiedSteps(new Set()); setShowEnd(false) } }}
secondaryAction={{ label: 'Retour', onClick: () => { setShowEnd(false); setActivePathId(null) } }}
diff --git a/src/components/sections/game/MessageDialog.tsx b/src/components/sections/game/MessageDialog.tsx
index 6806dd2..8c6a769 100644
--- a/src/components/sections/game/MessageDialog.tsx
+++ b/src/components/sections/game/MessageDialog.tsx
@@ -6,6 +6,7 @@ interface Props {
open: boolean
title?: string
html?: string
+ icon?: ReactNode
onClose: () => void
primaryAction?: { label: string; onClick: () => void }
secondaryAction?: { label: string; onClick: () => void }
@@ -13,7 +14,7 @@ interface Props {
}
export default function MessageDialog({
- open, title, html, onClose, primaryAction, secondaryAction, children,
+ open, title, html, icon, onClose, primaryAction, secondaryAction, children,
}: Props) {
if (!open) return null
return (
@@ -27,24 +28,43 @@ export default function MessageDialog({
}}
>
+
+ {icon && (
+
+ {icon}
+
+ )}
+
+ {title && (
+
+ {title}
+
+ )}
+
+ {(html || children) && (
+
+ )}
+
- {title}
-
-
-
{primaryAction && (
@@ -54,7 +74,7 @@ export default function MessageDialog({
onClick={secondaryAction.onClick}
className="w-full py-3 rounded-2xl font-semibold text-sm"
style={{
- background: 'var(--color-surface)',
+ background: 'transparent',
color: 'var(--color-text)',
border: '1px solid var(--color-border)',
}}
@@ -66,7 +86,10 @@ export default function MessageDialog({
diff --git a/src/components/sections/game/PuzzleGame.tsx b/src/components/sections/game/PuzzleGame.tsx
index f3ebb85..d027108 100644
--- a/src/components/sections/game/PuzzleGame.tsx
+++ b/src/components/sections/game/PuzzleGame.tsx
@@ -145,7 +145,7 @@ export default function PuzzleGame({ imageUrl, rows, cols, showHint, onWin }: Pr
>
{board && (
<>
- {/* Board frame (target outlines) */}
+ {/* Board frame (always visible) */}
+ {/* Hint overlay — full image reference when hint is active */}
+ {showHint && (
+
+ )}
{/* Pieces */}
{pieces.map((p) => {
const pw = board.w / cols
diff --git a/src/components/ui/AppBar.tsx b/src/components/ui/AppBar.tsx
index 045d98a..21ef1c2 100644
--- a/src/components/ui/AppBar.tsx
+++ b/src/components/ui/AppBar.tsx
@@ -1,5 +1,6 @@
'use client'
+import { useState, useRef, useEffect } from 'react'
import { useVisitor } from '@/context/VisitorContext'
const FLAG: Record
= {
@@ -7,6 +8,11 @@ const FLAG: Record = {
IT: '🇮🇹', ES: '🇪🇸', PL: '🇵🇱', CN: '🇨🇳', AR: '🇸🇦', UK: '🇺🇦',
}
+const LABEL: Record = {
+ FR: 'Français', NL: 'Nederlands', EN: 'English', DE: 'Deutsch',
+ IT: 'Italiano', ES: 'Español', PL: 'Polski', CN: '中文', AR: 'العربية', UK: 'Українська',
+}
+
interface Props {
title?: string
onBack?: () => void
@@ -14,6 +20,19 @@ interface Props {
export default function AppBar({ title, onBack }: Props) {
const { language, setLanguage, availableLanguages } = useVisitor()
+ const [open, setOpen] = useState(false)
+ const ref = useRef(null)
+
+ useEffect(() => {
+ if (!open) return
+ const handler = (e: MouseEvent) => {
+ if (ref.current && !ref.current.contains(e.target as Node)) setOpen(false)
+ }
+ document.addEventListener('mousedown', handler)
+ return () => document.removeEventListener('mousedown', handler)
+ }, [open])
+
+ const showSelector = availableLanguages.length > 1
return (