# ✅ Vérification humaine — `dev-verif-10` (Performance / CWV — lot 2 : LCP home)

**Branche :** `dev-verif-10` (depuis `dev`)
**Lot :** LCP de la home (vidéo hero)
**Date :** 2026-06-01

## Corrigé (mesuré)

| Métrique (home `/`) | Avant | Après |
|---|---|---|
| **LCP** | 5.3 s | **~4.1 s** (3.9–4.3 lab) |
| **Score perf** | 80 | **85–88** |
| CLS | 0 | 0 |
| `lcp-discovery-insight` | ❌ (élément LCP non préchargé) | ✅ **score 1** (poster préchargé) |

## Changements (fichiers)

- `public/videos/hero-poster.jpg` — **nouveau** : poster extrait de `hero-background.mp4` (frame @1s, **ffmpeg** → PNG, **sips** → JPEG 1600px / q62, **116 KB**).
- `components/hero/HeroServer.tsx` :
  - `poster="/videos/hero-poster.jpg"` sur le `<video>` → l'élément LCP est l'image (peinte immédiatement) au lieu d'attendre le décodage vidéo.
  - `<link rel="preload" as="image" href="/videos/hero-poster.jpg" fetchPriority="high">` (hoisté dans `<head>` par React 19) → le poster est fetché en priorité.

## Méthodo / preuve

```
Lighthouse lab (slow-4G + 4× CPU, headless) sur / :
  baseline   : perf 80 · LCP 5.3s
  poster seul : perf 82 · LCP 4.9s
  + preload   : insights LCP au vert (discovery score 1)
  + poster 116KB (1600px) : perf 85–88 · LCP 3.9–4.3s · CLS 0
```
Le LCP lab reste >2.5s car **throttlé** (slow-4G) sur un hero vidéo ; en conditions réelles (CrUX) ce sera nettement plus bas. Build `pnpm build` exit 0.

## ⚠️ À confirmer / limites

- [ ] **Rendu visuel du poster** : vérifier que la frame @1s est représentative (pas de flou/transition). Si besoin, ré-extraire à un autre timestamp : `ffmpeg -ss 2 -i public/videos/hero-background.mp4 -frames:v 1 /tmp/p.png && sips -Z 1600 -s format jpeg -s formatOptions 62 /tmp/p.png --out public/videos/hero-poster.jpg`.
- [ ] **CWV réel** : valider en prod via PageSpeed/CrUX (le lab throttlé n'est pas le terrain).

## Reste du chantier CWV (non couvert)

- [ ] **Self-host police** (`next/font/local`) : non fait — nécessite les WOFF2 Inter (ajouter `@fontsource-variable/inter` via `sfw pnpm add`, à autoriser). Bénéfice : supprime la dépendance Google Fonts au **build** (builds flaky) + item `font-loading`. (Sur la home, le LCP est désormais l'image, pas le texte → la police n'est pas le goulot LCP ici.)
- [ ] **critical-CSS** (~450ms render-blocking) : à mesurer/itérer.
- [ ] **LCP guide** (~3.7s) : `ServiceHero` déjà `priority` ; gain = poids image de fond.

## Décision

- [ ] **Lot validé** (LCP home amélioré, mesuré) → mergeable.
- [ ] Self-host police : à autoriser (`@fontsource-variable/inter`) pour un `dev-verif-11`.
- [ ] Corrections demandées :

> _Notes du vérificateur :_
