diff --git a/.claude/memory/decisions.md b/.claude/memory/decisions.md
index 6119f398..873b2d13 100644
--- a/.claude/memory/decisions.md
+++ b/.claude/memory/decisions.md
@@ -107,3 +107,21 @@ SVG data-anno-id values stay opaque generator strings (point-mpb..., zone-...).
Alt rejected: rename SVG data-anno-id to JSON keys — couples opaque SVG generator output to human-meaningful catalog, brittle across SVG re-exports.
Alt rejected: add new `data-anno-finding-zone` attribute on every hitbox — forces SVG edit per species, double-source for the same info already in name_fr/en.
Status: closed.
+
+---
+
+## BDR-014 | 2026-05-20 | PDF locale = render preference, not Report schema field
+
+exportReportToPdf takes explicit `{ locale }` option read from localeStore at call site. Locale lives outside Report — never persisted in schema. Rationale: Finding snapshots already carry labelFrSnapshot+labelEnSnapshot (per BDR-010), so render-time locale picks the correct snapshot; no schema bump needed; re-imported PDF can be re-exported in either locale without data migration; embedded JSON byte-identical between locale variants of the same Report.
+Alt rejected: store `locale` field on Report schema — would force v3 bump, complicate re-export ergonomics, duplicate state already in store.
+Alt rejected: default locale to 'fr' in export — caller is route layer, has store, easy to pass; explicit arg makes tests + API surface clean.
+Status: closed.
+
+---
+
+## BDR-015 | 2026-05-20 | Typed ImportError discriminant (kind + foundVersion) over localized messages
+
+ImportError carries `kind: 'invalid_pdf' | 'incompatible_version' | 'no_attachment'` + optional `foundVersion`. Message field collapses to internal sentinel. UI layer (HomeRoute) resolves user-facing string via i18n dict using err.kind, with `{version}` template substitution. Rationale: review caught hardcoded FR in pdf/import.ts + pdf/attachment.ts leaking to EN UI; original "throw with localized message" coupled domain layer to one locale; typed discriminant moves message authoring to the UI layer where i18n lives.
+Alt rejected: keep FR messages, translate via err.message string match — brittle (any rewording breaks the lookup), spreads i18n knowledge into the catch site.
+Alt rejected: pass `t()` into domain layer — wrong direction; domain should not know about React hooks or current locale.
+Status: closed.
diff --git a/.claude/memory/evals.md b/.claude/memory/evals.md
index abb565ba..d4b82b10 100644
--- a/.claude/memory/evals.md
+++ b/.claude/memory/evals.md
@@ -10,3 +10,12 @@ Method: pnpm install → pnpm build → pnpm test:run → pnpm typecheck.
Result: all pass, 0 errors.
Anomalies: pnpm version 11 instead of 9 (corepack issue on host).
Action: document in BDR-007, BLK-001.
+
+---
+
+## EVAL-002 | 2026-05-20 | B3 i18n — code review caught hardcoded FR in PDF import
+
+Method: cavecrew-reviewer ran against full diff `0a05c47..HEAD` after self-review + analyzer agent both reported CLEAN.
+Result: reviewer flagged 3 CRITICAL: pdf/import.ts:9, pdf/attachment.ts:9-10, app/routes/HomeRoute.tsx:32 — hardcoded FR error messages leaking to EN UI.
+Anomaly: prior i18n grep ('Annuler', 'Valider', etc.) missed these because the error-path files contained different French vocabulary ("Ce PDF n'a pas été..."). Implementer's TODO checklist did not include the PDF import error paths since they were not in the original component migration list. Analyzer also missed because the leak only surfaces under EN locale at runtime (no static signal in code).
+Action: fixed in d602726+next via typed ImportError discriminant (BDR-015). Future i18n migrations should enumerate ALL files that emit user-facing strings (not just components/routes) — include error path files, exception messages, anything that may end up in window.alert or setError.
diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md
index 0951d694..33606023 100644
--- a/.claude/memory/journal.md
+++ b/.claude/memory/journal.md
@@ -50,6 +50,22 @@ Bundled B0+B1+B2 shipped on feat/findings-tree-v2. 3 atomic commits.
---
+## 2026-05-20 (session 3 — B3 shipped)
+
+B3 (i18n FR/EN site + PDF) shipped on `feat/findings-tree-v2` via /ship-feature. 5 new commits:
+- 0a05c47 docs(plan): B3 i18n FR/EN implementation plan
+- a570475 feat(i18n): localeStore + persist
+- 359104c feat(i18n): fr/en dicts + useT hook (~90 keys each, parity-tested)
+- d602726 feat(i18n): migrate site + PDF to locale-aware (25 files, +390/-207)
+- fa3eb51 test(pdf): roundtrip per locale (3 cases)
+- (post-review fix) typed ImportError discriminant for localized PDF import errors
+- 154/154 tests pass, lint clean, typecheck clean, build OK.
+- description_fr + scope_disclaimer stay FR-only this iteration (vet-expert authoring needed).
+- BDR-014 (PDF locale = render preference), BDR-015 (typed ImportError discriminant), LRN-017 (dict parity test), LRN-018 (useT selector+closure), LRN-019 (exhaustive-deps closure trap), EVAL-002 (review caught FR leak in PDF import) captured.
+- NEXT: B4 (PDF observationPage vet-referral polish), C (full horse.json + QA + Scaleway deploy). description_fr/_en EN copy when vet expert provides.
+
+---
+
## 2026-05-20 (session 2)
Iterated on the findings-tree branch — 11 more commits on top of B0+B1+B2.
diff --git a/.claude/memory/learnings.md b/.claude/memory/learnings.md
index a3841d62..29e6be3b 100644
--- a/.claude/memory/learnings.md
+++ b/.claude/memory/learnings.md
@@ -123,3 +123,33 @@ Apply: any fan-out fetch / parse / transform over heterogeneous sources — conf
pdf-lib with embedded TTF fonts (Inter, Fraunces) subsets glyphs and stores text streams as glyph indices, not codepoints. A latin1 / utf-8 grep over the raw PDF bytes will not match user-visible strings ("Temporo" never appears literally in the dump). Standard PDF text show ops (`Tj`, `TJ`) carry the glyph IDs inside content streams that are typically Flate-encoded too.
Testing implication: don't assert PDF text via byte grep — either re-extract the embedded JSON attachment (already plain text) or refactor the offending logic into an exported helper and unit-test that. Same pattern when smoke-testing PDF output in CI.
+
+---
+
+## LRN-017 | 2026-05-20 | i18n dict parity via Object.keys.sort equality
+
+Cheapest drift guard between fr/en dicts: one test asserts `Object.keys(fr).sort()` deep-equals `Object.keys(en).sort()` + every value non-empty. Catches any forgotten translation at CI time without enumerating keys. Pairs with a flat `.` convention so adding a key in fr.ts forces matching update in en.ts at the next test run.
+Apply: any project with N parallel translation dicts (i18n, locale strings, error-code maps). Beats type-level enforcement (TS can't easily require Record shapes to match across two `as const` literals without ceremony).
+
+---
+
+## LRN-018 | 2026-05-20 | useT hook: selector subscribe + closure-per-render
+
+```ts
+export function useT() {
+ const locale = useLocaleStore((s) => s.locale)
+ const dict = getDict(locale)
+ return (key) => dict[key] ?? (warn(key), key)
+}
+```
+Selector subscribe re-renders consumer only on locale change. Dict resolved once per render, the returned closure does a single hash lookup per call. No prop drilling, no context provider, no React `useMemo` needed. Missing-key path warns in DEV (`import.meta.env?.DEV`) and falls back to the key literal so the UI never crashes on a typo.
+Apply: any Zustand-state-driven derived computation that needs to re-render N components without prop chains. Same pattern works for theme tokens, feature flags, current user.
+
+---
+
+## LRN-019 | 2026-05-20 | exhaustive-deps trap with closures over store values
+
+Defining a helper like `const nameOf = (z) => locale === 'en' ? z.name_en : z.name_fr` inside a component and using it inside `useMemo([deps])` triggers `react-hooks/exhaustive-deps`: nameOf is a fresh function each render, listing it in deps invalidates the memo every render; omitting it makes the linter complain. Two fixes:
+1. Inline the locale-conditional inside the memo body (no closure).
+2. Wrap the helper in `useCallback([locale])` so it's referentially stable.
+Inline is simpler when the helper is one expression. Apply: any closure that bridges a memoized computation to an outer hook value (store selector, prop, context). Same trap with `useEffect` deps.
diff --git a/.claude/tasks/TODO.md b/.claude/tasks/TODO.md
index 8c817af9..b35f4788 100644
--- a/.claude/tasks/TODO.md
+++ b/.claude/tasks/TODO.md
@@ -61,20 +61,16 @@ with a French-language message.
- [x] `PathologyPicker` + `FreeTextPathologyInput` + their tests deleted; `FreeTextFindingInput` renamed equivalent kept
- [x] `tests/unit/components.FindingsTreePicker.test.tsx` covers navigation, leaf select, vet-referral flag, retour, deselect
-### B3. i18n FR/EN — site + PDF
+### B3. i18n FR/EN — site + PDF (DONE 2026-05-20)
-- [ ] **Locale state**: `src/state/localeStore.ts` Zustand: `'fr' | 'en'`,
- persisted in localStorage `osteo:locale`
-- [ ] **i18n strings**: `src/i18n/{fr,en}.ts` — UI strings dictionary
- - Migrate hardcoded French labels in components (buttons, headers, placeholders, toasts)
- - Helper hook `useT()` returning `(key: string) => string`
-- [ ] **Language switcher**: small FR/EN toggle in ReportHeader (next to Brand)
-- [ ] **Findings rendering**: components pick `name_fr`/`name_en` based on current locale
-- [ ] **PDF render**: `exportReportToPdf(report, { locale })` parameter
- - All static PDF labels (eyebrow, section names) read from i18n dict
- - Findings rendered via `labelFrSnapshot`/`labelEnSnapshot` depending on locale at export
- - Date formatting locale-aware (`formatDateFr` → `formatDate(date, locale)`)
-- [ ] **Tests**: locale switch updates labels; PDF roundtrip preserves locale snapshot
+- [x] **Locale state**: `src/state/localeStore.ts` Zustand `'fr' | 'en'`, persisted `osteo:locale`
+- [x] **i18n dicts**: `src/i18n/{fr,en}.ts` (~90 keys each, parity-tested), `index.ts`, `useT.ts` hook
+- [x] **Language switcher**: `src/components/brand/LanguageSwitcher.tsx` segmented FR | EN toggle, integrated in ReportHeader + HomeRoute + NewReportRoute headers
+- [x] **Findings rendering**: FindingsTreePicker + ObservationCard read `name_fr`/`name_en` per locale; finding snapshots already dual (BDR-010)
+- [x] **PDF render**: `exportReportToPdf(report, { locale })` explicit option; static labels via dict snapshot; `formatDate(iso, locale)` replaces `formatDateFr`; finding leaf labels via `labelFr/EnSnapshot`
+- [x] **PDF import error i18n**: typed ImportError(kind + foundVersion); UI resolves message via dict (BDR-015) — caught by review (EVAL-002)
+- [x] **Out of scope (per design)**: `description_fr` + `scope_disclaimer` stay FR-only — vet-expert authoring needed for EN copy
+- [x] **Tests**: localeStore (3), useT (3), dict parity (2), LanguageSwitcher (2), formatDate FR+EN (7), PDF roundtrip per locale (3). 154/154 green.
### B4. PDF observationPage updates
diff --git a/CLAUDE.md b/CLAUDE.md
index f8e3070c..2d5e4840 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -126,8 +126,14 @@ osteo/
│ │ ├─ types.ts ← SpeciesManifest interface
│ │ ├─ registry.ts ← getSpecies(), getAllSpecies()
│ │ └─ equine/{index,vertebrae,pathologies}.{ts,json}
+│ ├─ i18n/
+│ │ ├─ types.ts ← Locale type + Dict type
+│ │ ├─ fr.ts + en.ts ← translation dicts (flat key → string)
+│ │ ├─ index.ts ← getDict(locale)
+│ │ └─ useT.ts ← useT() hook (reads localeStore)
│ ├─ state/
│ │ ├─ reportStore.ts ← Zustand store
+│ │ ├─ localeStore.ts ← locale Zustand store (persisted to localStorage)
│ │ └─ practitionerCache.ts ← localStorage prefill
│ ├─ anatomy/
│ │ ├─ types.ts ← Bone, BoneCategory, BoneState
@@ -141,7 +147,7 @@ osteo/
│ │ │ FreeTextFindingInput}.tsx
│ │ ├─ report/{ReportHeader,PractitionerForm,AnimalForm,
│ │ │ ConclusionPanel,NextAppointmentPicker}.tsx
-│ │ └─ brand/Brand.tsx
+│ │ └─ brand/{Brand,LanguageSwitcher}.tsx
│ ├─ pdf/
│ │ ├─ export.ts + import.ts + attachment.ts + fonts.ts
│ │ └─ render/{header,footer,observationPage,conclusionPage,svgToPng}.ts
@@ -158,8 +164,12 @@ osteo/
│ ├─ ANATOMY-SVG-CONVENTION.md ← SVG data-* contract
│ ├─ ADDING-A-SPECIES.md
│ ├─ PDF-FORMAT.md
-│ └─ superpowers/specs/
-│ └─ 2026-05-18-osteo-report-mvp-design.md
+│ ├─ superpowers/specs/
+│ │ ├─ 2026-05-18-osteo-report-mvp-design.md
+│ │ └─ 2026-05-20-b3-i18n-fr-en-design.md
+│ └─ superpowers/plans/
+│ ├─ 2026-05-18-osteo-report-mvp.md
+│ └─ 2026-05-20-b3-i18n-fr-en.md
├─ .claude/{tasks/TODO.md,memory/,audits/}
├─ Dockerfile, docker-compose.yml
├─ .env.example, .editorconfig, .nvmrc, .prettierrc.json
@@ -188,7 +198,7 @@ SVG interaction
→ else → updateObservation() in store
PDF export
- → exportReportToPdf(report)
+ → exportReportToPdf(report, { locale })
→ pdf-lib PDFDocument
→ embedFonts (Inter body + Fraunces heading)
→ for each observation: addObservationPage (rasterize SVG → PNG)
@@ -213,9 +223,18 @@ Runtime config
## Project conventions
### Language split
-- UI strings: French (labels, placeholders, error messages, toasts)
+- UI strings: bilingual FR/EN — all user-facing text goes through the i18n system (see below)
- Code: English (variable names, function names, comments, docs)
-- Never mix: no French variable names, no English labels in JSX
+- Never mix: no French variable names, no raw French/English string literals in JSX — use `useT()`
+
+### i18n
+- All user-facing strings live in `src/i18n/fr.ts` and `src/i18n/en.ts` (flat `Record`)
+- Key convention: `.` — e.g. `common.cancel`, `home.new_report.title`, `pdf.subject`
+- Both dicts must share the exact same key set; a key missing in one dict logs a warning in DEV
+- Get the translate function in any component: `const t = useT()` then `t('common.cancel')`
+- `src/state/localeStore.ts` holds current `Locale` (`'fr' | 'en'`), persisted to `localStorage` key `osteo:locale`; default `'fr'`
+- Finding leaf labels (zone names shown in PDF) are resolved at export time via SVG `data-anno-name-fr` / `data-anno-name-en` attributes — not from the dict
+- PDF static labels (section headings, metadata) come from the dict via `getDict(locale)` in `exportReportToPdf`
### Identity strings
- NEVER hardcode APP_SITE_NAME, APP_BRAND_NAME, APP_FOOTER_NAME, APP_TAGLINE
@@ -305,7 +324,7 @@ Runtime config
## Commit message convention
Conventional Commits format. Subject ≤72 chars, imperative mood, no trailing period.
-Allowed scopes: `schema`, `store`, `anatomy`, `pdf`, `editor`, `home`, `new`, `ui`, `config`, `species`, `docker`, `docs`, `tests`, `chore`.
+Allowed scopes: `schema`, `store`, `anatomy`, `pdf`, `editor`, `home`, `new`, `ui`, `config`, `species`, `i18n`, `docker`, `docs`, `tests`, `chore`.
Examples:
- `test(schema): cover Report version literal`
diff --git a/README.md b/README.md
index e8bd4ea0..63270db6 100644
--- a/README.md
+++ b/README.md
@@ -25,6 +25,7 @@ contract.
- **Detail popups** — click a zone (e.g. head) to open a secondary SVG with finer-grained zones
- **PDF export** — A4 portrait with rasterized anatomy SVGs (canvg @ 2×), structured observations, and the full report JSON as a native PDF attachment
- **PDF re-import** — open a previously exported PDF to restore the session for a follow-up
+- **Bilingual UI** — full FR/EN interface with a one-click language switcher; locale persisted across sessions
- **Configurable identity** — site name, brand, footer, tagline all come from env vars; nothing hardcoded
- **Practitioner cache** — last-used practitioner block prefilled via localStorage
@@ -110,7 +111,8 @@ osteo/
├─ src/app/ routes + ConfigProvider
├─ src/config/ runtime env config resolution
├─ src/domain/ Zod schemas + species registry + equine data
-├─ src/state/ Zustand store + localStorage cache
+├─ src/i18n/ translation dicts (fr/en) + useT() hook
+├─ src/state/ Zustand store + locale store + localStorage cache
├─ src/anatomy/ SVG parser + loader
├─ src/components/ UI primitives, canvas, observation, report
├─ src/pdf/ export/import/attachment/fonts + renderers