docs(docs): V1-2.6 graphic editor maquettes and core feasibility audit

This commit is contained in:
bchanot committed 2026-11-05 15:16:28 +01:00
1 parent 37c9fdf6eb
commit 46ea996a61
26 files changed
+1102

No files matched your search

@@ -0,0 +1,95 @@
# V1-2.6 new editor UX: feasibility audit (read-only, 2026-11-05)
Brief « V1-2.6 : nouvelles maquettes UX approuvées sur le principe ». Read-only analysis of `crates/core` and the
V1-2.6 editor on `feature/v1-2-anatomical-sheets`; nothing built or run. Owner-facing summary in
`docs/design/v1-2-6/REVUE.md` § Faisabilité. Classes: SUPPORTED, UI-ONLY, CORE-OP MISSING, SCHEMA CHANGE.
## 1. Annotation categories: SCHEMA CHANGE (fixed categories, opacity)
- No fixed category. Equine draft: articulations #ff9500, os #a41e65, charnieres-vertebrales #ff0000, zone-colonne
#e100ff, cadrans-du-crane #1baa08; only the legacy importer names them (curation/legacy/categories.rs:15-29).
New sheet: `categories: []` (domain/sheet/create.rs:27); drawing tools disabled until one exists
(EditableAnnotations.tsx:113,138).
- Schema `{id, name, color: #rrggbb | null}` (schema.rs:219-228); `is_hex_color` = 7 chars, no alpha (domain/js.rs:180-183).
- Delete refused with `has_dependents` only while used (edit.rs:570-577, 903-908); every row has Delete
(general/CategoriesSection.tsx:108-116).
- Opacity: constants only. Point twin 0.65 main / 0.5 detail (anatomy/layer.rs:94,242), zone 0.3 (layer.rs:299),
trigger 0.06 (layer.rs:308), PDF highlight 0.85 (compose.rs:42), CSS selected 0.85 (styles/index.css:14);
ANNOTATION-RENDERING.md:25-27. No stroke-opacity.
- Displayed colour: annotation.color, else category colour, else #888888 (layer.rs:13,147-155).
- A schema change touches: ts-rs types; frozen N-1 reader `.strict()` (packages/core-wasm/tests/n-1/.../schema.ts:66-72);
PDF snapshot embeds categories (archive/snapshot_rules.rs:160-162); fingerprint = JCS of the validated document
(fingerprint.rs:1-11, equine alias :43-48); review digests (review.rs:349-382); SQL pins (migrations
20261010100000:12, 20261028110000:424); worker verdict strict read (verdict.rs:264-274); f64 breaks `Eq` on
AnnotationCategory (schema.rs:219); rendering change → ANNOTATION-RENDERING.md first, R3/R4 goldens owner decision.
## 2. Category and vertebral region: no link (UI-ONLY filter, or new rule)
- Only rule: region code exists, `annotation.region.missing` (validate.rs:348-365); also `region.code.duplicate`
(validate.rs:391), `region.count_range.invalid` (validate.rs:502-526). Code grammar: 1-16 chars, alnum, `_`, `-`,
alnum first (domain/js.rs:169-177).
- Practitioner picker keyed on `vertebral_region_code`, never on the category (domain/editor/zone.rs:101-102,
336-346; index.rs:145-164). Equine: only the 5 zone-colonne polygons carry a code.
## 3. Points: SUPPORTED (move, numeric radius); radius drag UI-ONLY
- Drag translates cx, cy after 4 CSS px, rounded 0.01 (editor/annotations/gesture.ts:5,12-22); one `update` on
pointer-up (useMoveGesture.ts:98-105; annotationCommit.ts:93-104).
- Checks after commit (issues.ts:123-175): `out_of_frame` (frame.rs:113-119,167-174), `too_small` when
2·max(2, r−12)·scale < 4 CSS px (layer.rs:260-262; frame.rs:63-67,160-165,219-221); no interior check on circles.
- r > 0 only (schema.rs:335-336). « 12 + 3 % » is a page default (editor/annotations/frame.ts:55-59).
## 4. Polygons: SUPPORTED as `update` of the points array; vertex drag / segment insert UI-ONLY
- Add vertex inserts the midpoint after the selected row (geometryEdit.ts:91-111); remove disabled at 3
(GeometryGroup.tsx:320); schema refuses < 3 (schema.rs:365-372). Overlay vertices `pointer-events-none`
(AnnotationOverlay.tsx:48-66,125).
- Checks: out_of_frame, too_small, `interior_too_small` (frame.rs:206-254; interior.rs:33-43). Self-intersection
allowed, nonzero fill decides (interior.rs:283).
- Undo: one entry per accepted commit, 8 MiB (undo.ts:7,52-74; editorEdit.ts:45-61); Ctrl+Z / Ctrl+Shift+Z
(useUndoShortcuts.ts:8-24). Preview on move, core on pointer-up (useMoveGesture.ts:90-105); < 61 ms on equine.
## 5. Paths: CORE-OP MISSING (point editing and translation)
- Core reads `d` to measure only (anatomy/path.rs:51-133): private Cursor/Pen, no segment model, no writer.
App: paths neither editable nor draggable (geometryEdit.ts:31-35; gesture.ts:32); C45 never reshaped
(repair.ts:55-70,95-100). No seed contains a path.
- Existing proposal, not built: `.claude/tasks/plans/2026-11-04-v1-2-6-path-repair-core-proposal.md`
(`sheet.path_points`, `sheet.path_move_points`, wasm 583 126 / 600 000 B gzip).
- Lossless handle editing also needs: number byte spans, relative-command compensation, H/V, implicit S/T controls,
arcs (endpoint only). Reusable: path.rs number grammar (private), `json::js_number` (json.rs:18),
`svg/number.rs:122`.
## 6. Detail views: crop SUPPORTED; derived asset not needed; remap on replacement MISSING
- `compose_canvas` clones the whole sanitised asset, root becomes `<g>` keeping defs and transforms, only the root
viewBox is the frame (compose.rs:94-160); reader strips only root class/style/transform/filter/mask/clip-path
(svg/sanitize.rs:243-249).
- Coordinates in the user space of the drawing shown (own asset, else up the parent chain) (compose.rs:74-90;
frame.rs:6-11).
- Replacement: clean_svg (crates/wasm/src/lib.rs:160) → upload → `addDrawing` (editorEdit.ts:85-104) → view
`update` of `svg_asset_id` (drawingUpload.ts:185); numbers kept, read in the new space. View box or drawing change:
geometry untouched, annotations → `to_confirm` (edit.rs:792-857); page refuses new geometry errors
(issues.ts:141-160); repair dialog only for previously unmeasured views (repair.ts:132-151, C33).
## 7. Name suggestion from a rectangle: CORE-OP MISSING
- No rectangle query or hit-test; clicks resolve through DOM `data-anno-id` (ops.rs:297,311-319;
useCanvasGestures.ts:57-64). Internal blocks: `frame::geometry_bounds`, `placement` (frame.rs:167-204), index
`name()` (index.rs:166-179). Sketch: `sheet.annotations_in_rect` {document, view_id, rect} →
[{id, name, category_id, inside|partial}].
## 8. Touch
- One pointer pans, two pinch, zoom 1-6, wheel, keyboard (catalogue/useFraming.ts:46-148; framing.ts:20);
`touch-action: none` while a tool or drag is active (useCanvasGestures.ts:76-84).
- No touch-sized handles (AnnotationOverlay.tsx:116). Move gesture has no pointerId check (useMoveGesture.ts:82-105).
- LRN-108 Chromium tap tolerance, observation only. `MIN_EDIT_WIDTH` 1024 (editor/mode.ts:21; useViewport.ts:9-13).
## 9-10. References, Général
- Only finding categories and nodes cite references (schema.rs:551,579); PDF snapshot drops them
(snapshot_rules.rs:115,133,159).
- Général: Fiche (name, description, scope disclaimer FR/EN), Attribution, Catégories (GeneralTab.tsx:22-24).
No template text anywhere; contract §7.4 « No template of scientific content is shipped »; publication needs a
non-blank disclaimer FR and EN, `publish.disclaimer.missing` (migration 20261028110000:206-214).
## 11. Reusable states
Modes edit, narrow, rights, frozen, historical, inactive (mode.ts:12-18; ModeNotice.tsx); DraftHeader statuses;
RecoveryNotice; CopyIssueNotice; ConflictDialog; BlockKind refusals (editorTypes.ts:13-23); frame refusal and repair
dialog (i18n/fr.ts:1420-1434); canvas failure (AnnotationCanvas.tsx:164-188); delete dialog.
## Constraints in force
BDR-043 (rules in Rust, no TS path parser), BDR-086, BDR-091, BDR-092, BDR-068, BDR-019, LRN-103, LRN-108; contract
§8.3 level-2 deferrals and §8.4 O14 A; `crates/**` outside V1-2.6 scope without owner approval.
+3
View File
@@ -524,3 +524,6 @@ R5.4: `draft/{labels,changelog,review_report,drawing,overlay,app_review,svg_comp
- V1-2.6 lots A-M done on feature/v1-2-anatomical-sheets, HEAD 7a4ce9e. Fresh sandbox contract order green (1992 / e2e 148+46 skip / sandbox 105), check:all green, security PASS, verifier 33/34 then order fixed. Stop at owner checkpoint; R12 state files, m3, sign-out copy, labels pending owner.
- V1-2.6 owner checkpoint decisions applied (lot N: C35-C44), code 5e0aa62. Fresh sandbox contract order green (1992 / e2e 150+48 skip / sandbox 105), check:all green, security PASS, fresh verifiers: all criteria met except checkpoint-report parts. Guide run from durable worktree. Stop: ready for owner trial.
- V1-2.6 lot O: free paths never reshaped (core proposal written, not built), explicit category zone, owner trial on LAN 192.168.1.100:5193 behind a Host filter (no CORS, no ws, upgrades closed). Fresh verifier final pass CONFORME 0 NOT MET. Stop: ready for owner trial.
## 2026-11-05
- V1-2.6 new editor UX maquettes: 16 boards docs/design/v1-2-6 (desktop, tablet, phone), REVUE.md, core feasibility audit. Missing core: annotations_in_rect, path point edit/translate, remap on drawing swap; schema change for fixed categories + opacity. Reopens §8.3, O14 A, §8.2, §7.4. Design review + verifier gaps fixed. No code, no DEV. Stop at graphic checkpoint.
+3
View File
@@ -673,6 +673,9 @@ Order (BDR-071): P0 docs + decisions → V1-1 clients and animals → V1-2 sheet
- [x] L4 gates: check:all green (dcb1a94; delta = sandbox test + docs), fresh stack test-db 1965, e2e:shell 110 + 8 skipped, sandbox test 103 + 10 skipped after e2e, upgrade from M6 1965 + types match; security PASS x2; verifier ECARTS(6) -> CONFORME; two state-dependent sandbox tests fixed (0499a39, f5456f3); suites need a fresh stack in order test-db, e2e:shell, test
- [ ] V1-2.6 editor level 1: plan APPROVED by the owner 2026-11-03 (brief « GO propriétaire V1-2.6 »: 13 lots A-M, C1-C24, 8 visible choices, M8 sandbox only, no JSON export button, recovery messages exact), gated on a targeted independent re-check of the six FATAL fixes. Re-check 2026-11-03: REMAINING(2) — fixes 1-5 closed, I1-I5 hold; fix 6 (r = 12 + 3 %) opens `out_of_frame` on frames under ~25.5 units (hitbox r in frame bounds); I6 broken: the first commit overwrites a pending recovery copy before « Restaurer » / « Ignorer »; 2 MINOR (N source when the admin read fails, two-copy cap). Executor NOT launched; STOP for the owner. Owner arbitrations 2026-11-03 (« arbitrages propriétaire sur REMAINING(2) »): C25-C31 gated, plan revised; second targeted re-check: REMAINING(1), no BLOCKER, F1 MAJOR (accept trusted the core's silence on unmeasured views) + 7 MINOR, all integrated in the plan. Owner GO 2026-11-04 (« GO propriétaire après REMAINING(1) »): F1 fix approved, C26 refined by seven repair rules, minor effects approved; C32-C34 gated; execution of lots A-M authorised, no third plan review. 2026-11-04 13:08 the scratchpad worktree was removed by the harness cleanup (LRN-114): commits safe on origin (8343528), uncommitted lot H + lot G fix lost; worktree recreated at /home/bchanot/Documents/faunosteo-v1-2 (owner authorisation); resume ledger `.claude/tasks/plans/2026-11-03-v1-2-6-execution.md`. Contract `.claude/tasks/contracts/2026-11-03-v1-2-6-editor-1509.md`, plan `.claude/tasks/plans/2026-11-03-v1-2-6-editor.md`; sandbox only, no DEV, no worker on DEV, no merge, no V1-2.7; STOP at the V1-2.6 owner checkpoint (trial procedure)
- [x] A M8 draft_last_save (2f824a9) · [x] B sheet asset accessors (f7e7bf4) · [x] C preview mutators, edit ops, ids (173be59..cfd49c7) · [x] D editor store, undo, recovery (7f1d440..b14509f) · [x] E route, modes, tabs (6aba971) · [x] F Général, Références, Vertèbres (d163b2c) · [x] G views + upload (8343528, 1bbf97e, 7ea9619) · [x] H Annotations (2609785, 3f15762) · [x] I Constats (92c595c, 91d06c9) · [x] J Vérification + submit (447d0a4..3d589e1) · [x] K e2e (5097fd7..4cc27a8) · [x] L owner trial tooling (ac5fbfb) · [x] M gates, reviews, checkpoint (071b58a..7a4ce9e; checkpoint report 2026-11-04, owner trial pending) · [x] N owner checkpoint decisions (C35-C44: be4f468..5e0aa62; ready for the owner trial, guide verified from the worktree) · [x] O last decisions (C45-C48: free paths never reshaped, explicit category zone, LAN trial on 192.168.1.100:5193; a69eba5..9b86f54) · [ ] owner manual trial
- [ ] V1-2.6 new editor UX maquettes (owner brief 2026-11-05 « nouvelles maquettes UX approuvées sur le principe »; contract `.claude/tasks/contracts/2026-11-05-v1-2-6-ux-maquettes.md`): mockups + feasibility audit only, no core/app code, no DEV, no merge, no V1-2.7; STOP at the graphic checkpoint
- [x] core feasibility audit (`.claude/audits/2026-11-05-v1-2-6-ux-feasibility.md`) · [x] 16 boards + contact sheet + sources in `docs/design/v1-2-6/` · [x] REVUE.md (journey, 11 choices, contradictions, feasibility) · [x] fresh design review (6 MUST-FIX, 10 SHOULD applied; board 08 name finding wrong: frame holds Coude) + verifier ECARTS(2) U2/U9 fixed after (custom category menu, phone redraw), no re-verify · [x] commit + push branch · [ ] owner graphic checkpoint
- [ ] separate tracks kept apart: TOTP asked at sign-in; missing illustrations blocking the copy of the historical equine sheet
- [ ] MANDATORY before merging V1-2 into develop (owner 2026-11-03): registry id reconciliation. LRN-095 collides: develop 09655b2 « Port a safe runner verbatim… » (2026-11-02) vs V1-2 « pgTAP across PGlite and the real Supabase image… » (2026-10-28, cited by BDR-084 and the V1-2.1 TODO lines). BLK-013 exists on develop only (« e2e:avatar on develop reached DEV »): `memory.sh` on V1-2 would hand out BLK-013 again, so a V1-2 blocker needs its id checked against develop first. Same for the TODO release-readiness ids: RR-11 is develop's (« sandbox-only e2e follow-ups »), V1-2 uses RR-12. No renumbering during V1-2.6 unless needed; renumber one side and patch its citers at the merge
- [ ] V1-2.5 catalogue, admin space, rights, species, MFA · V1-2.6 editor level 1 · V1-2.7 preview, review, publication UI · V1-2.8 equine working copy and review preparation · V1-2.9 FR/EN acceptance and closure (owner checkpoints V1-2.3, V1-2.4, V1-2.6, V1-2.7, V1-2.8, V1-2.9 + each DEV operation of contract §16.11)
@@ -0,0 +1,34 @@
# Contract: V1-2.6 new editor UX maquettes (owner brief of 2026-11-05)
Brief « V1-2.6 : nouvelles maquettes UX approuvées sur le principe ». Deliverable: mockups and a feasibility
audit only. No change to `crates/`, `apps/`, `packages/`, `supabase/` (except reading), no DEV, no merge,
no V1-2.7. TOTP-at-login and the missing equine illustrations stay separate tracks. STOP at the graphic
checkpoint before any implementation.
## Criteria
- U1 Navigation: four tabs Général, Annotations, Constats, Vérification; views, drawings and vertebral
settings inside Annotations; references reachable from a secondary surface.
- U2 Categories: Os, Articulations, Vertèbres always present and not deletable, colour and opacity editable;
custom categories added, edited, deleted in a folding panel of Annotations; « Ajouter une catégorie » during
point or zone creation opens that panel; palette + opacity with synchronised values; annotations inherit
their category's look.
- U3 Direct editing: Point and Zone tools; points and zones moved on the drawing; radius by slider; no
coordinate shown in the normal UI.
- U4 Polygons: vertices on selection, vertex drag, + at segment midpoints, − bubble on a clicked vertex,
whole-zone move in an explicit mode, redraw tool, undo/redo for all of it; curves keep their control
points (no destructive simplification).
- U5 Touch: equivalent finger interactions on tablet and phone, handles sized for touch.
- U6 Detail views: tool, rectangle on the drawing, FR/EN name proposed, derived view framed, annotatable;
no `viewBox` numbers shown; replacement by a specific SVG; vector quality preserved.
- U7 Vertebrae: no standalone tab; « Configurer les régions vertébrales » from the Vertèbres category;
regions, codes, counts, ranges and rules kept.
- U8 Général simplified; controlled prefill of « Périmètre et limites » from a common text that never
erases sheet-specific legal or anatomical text.
- U9 Boards desktop and mobile for: main editor; point create + modify; zone create; polygon selection with
+/−; zone move and redraw; categories and colours; detail view by selection; vertebral regions; error,
read-only and save states.
- U10 Identity kept (tokens, Step 7 shell, V1-2.4 components); contact sheet, individual PNGs and sources in
`docs/design/v1-2-6/`, easy to open.
- U11 Feasibility audit against the current Rust core: missing operations named (vertex editing, path
editing, derived views, categories model), contradictions with ratified decisions listed for the owner.
+14
View File
@@ -105,3 +105,17 @@ Accepted deviations (owner 2026-11-02, V1-2.5): the boards stay as approved, not
Condition: it stays identifiable and accessible (a live region in the panel names the picked zone).
2. On a phone, « Références » is a plain, non-collapsible card (`03`). Condition: it does not hide the
anatomical area (it starts at or below the drawing's bottom, checked at 320 and 375 px).
## v1-2-6/ — V1-2.6 graphic editor maquettes (proposal, not validated)
Produced 2026-11-05 on the owner's brief « V1-2.6 : nouvelles maquettes UX approuvées sur le principe »
(contract `.claude/tasks/contracts/2026-11-05-v1-2-6-ux-maquettes.md`). A proposal until the owner validates it:
boards `04` and `05` of v1-2-4 stay the editor reference meanwhile. Sixteen boards, desktop, tablet and phone:
four tabs (Général, Annotations, Constats, Vérification), references in a side panel, point and zone tools with
direct manipulation (vertex handles, « + » on segments, « − » bubble, move and redraw modes, undo/redo), fixed
categories Os / Articulations / Vertèbres with colour and opacity, detail view drawn as a rectangle, vertebral
regions from the Vertèbres category, editor states, touch variants. Same identity and components as v1-2-4; the
drawing and every geometry come from the equine draft. Source `maquettes.html` and `planche-contact.html`,
rendered by `render.cjs`; `REVUE.md` holds the journey, the choices to arbitrate, the contradictions with
ratified decisions (§8.3 level 2, §8.4 O14 A, §8.2 numeric fields, §7.4 templates, BDR-096) and the feasibility
against the Rust core (detail: `.claude/audits/2026-11-05-v1-2-6-ux-feasibility.md`).
Binary file not shown.

After

Width:  |  Height:  |  Size: 289 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 KiB

+101
View File
@@ -0,0 +1,101 @@
# V1-2.6 · Éditeur graphique : maquettes et faisabilité
Branche `feature/v1-2-anatomical-sheets`. Brief du propriétaire du 2026-11-05, « nouvelles maquettes UX approuvées sur le principe ». Statut : **proposition, non validée**. Rien n'est implémenté. Le cœur Rust, l'application, Supabase et DEV sont intacts. Aucune fusion, pas de V1-2.7. Contrat de ce lot : `.claude/tasks/contracts/2026-11-05-v1-2-6-ux-maquettes.md` (U1 à U11).
Les deux chantiers séparés restent hors de ce dossier : le TOTP demandé à la connexion, et les illustrations manquantes qui empêchent la copie de la fiche équine historique.
## Contenu du dossier
| Fichier | Rôle |
|---|---|
| `planche-contact.png` | Les seize planches réduites, groupées par étape du parcours |
| `planche-contact.html` | Même planche dans un navigateur : chaque vignette ouvre le PNG en pleine taille |
| `01-…png` à `16-…png` | Les planches en pleine résolution |
| `maquettes.html`, `render.cjs` | Source des planches et outil de rendu (Chromium épinglé du projet) |
| `REVUE.md` | Ce rapport |
Les planches réutilisent l'identité validée : jetons de `tokens.css`, coque de l'étape 7, composants des maquettes V1-2.4. Le dessin est le fichier nettoyé du brouillon équin. Chaque point et chaque zone vient de son `document.json`, aux vraies coordonnées. La vue « Tête » et la nouvelle vue détaillée sont des cadrages du même fichier, comme le cœur les compose déjà.
## Parcours
| Étape | Planches | Ce que l'utilisateur fait |
|---|---|---|
| Ouvrir | 01, 10, 11 | Quatre onglets : Général, Annotations, Constats, Vérification. Vues, illustrations et régions vertébrales vivent dans Annotations. Références s'ouvre en volet latéral depuis l'en-tête ou depuis un constat. |
| Points | 02, 03 | « Ajouter un point », clic sur le dessin, nom et catégorie, taille au curseur. Le point se glisse sur le dessin ; une poignée sur son bord change sa taille. |
| Zones | 04, 05, 06 | « Ajouter une zone », un clic par sommet, fermeture sur le premier sommet. Une zone sélectionnée montre ses sommets, un « + » au milieu de chaque segment et une bulle « − » sur le sommet cliqué. « Déplacer la zone » et « Redessiner » sont des modes explicites. |
| Structure | 07, 08, 09 | Catégories dans un volet dépliable, Os, Articulations et Vertèbres fixes. Vue détaillée tracée au rectangle avec un nom FR/EN proposé. Régions vertébrales depuis la catégorie Vertèbres. |
| États | 12 | Enregistrement, refus d'une modification, lecture seule, récupération locale, moteur indisponible. |
| Au doigt | 13, 14, 15, 16 | Tablette avec poignées agrandies. Téléphone avec panneau du bas et barre d'outils en bas : zone sélectionnée, point, vue détaillée, tracé d'une zone, déplacement, redessin, refus et enregistrement. Planche 15 C : la règle actuelle sous 1 024 px. |
Aucune coordonnée n'apparaît dans l'interface courante. L'alternative au glisser exigée par le WCAG 2.5.7 passe par le clavier, sur chaque geste : Tab parcourt les sommets, les points de contrôle et les poignées du rectangle d'une vue détaillée ; les flèches déplacent l'élément choisi (par 10 avec Maj) ; Inser ajoute un sommet après celui choisi ; Suppr le retire ; Entrée valide un tracé ou un déplacement, Échap l'annule. Les boutons « Terminer la zone », « Retirer le dernier sommet », « Déplacer la zone » et « Valider la position » donnent aussi une voie sans glisser. Chaque pastille de couleur porte son nom, et la catégorie s'affiche à la sélection : la couleur n'est jamais seule à porter le sens.
## Choix de conception à arbitrer
Ces choix sont visibles dans les planches. Aucun n'est tranché sans le propriétaire.
1. **Déplacement d'une zone entière par un mode explicite** (« Déplacer la zone », planches 05, 06). Un mode évite les déplacements involontaires, au bureau comme au doigt ; hors de ce mode, un doigt hors d'une poignée ne déplace rien et deux doigts font défiler le dessin. L'alternative serait de glisser directement l'intérieur d'une zone sélectionnée sur desktop, comme le fait l'éditeur actuel.
2. **Annuler / Rétablir en bouton flottant** sur le dessin, en bas à gauche au bureau et sur tablette, en haut à droite au téléphone, plus un message « … déplacé · Annuler » après chaque geste (planche 03). Noms d'outils identiques partout : Sélectionner, Ajouter un point, Ajouter une zone, Créer une vue détaillée ; formes courtes (Point, Zone, Vue détaillée) seulement quand la largeur l'impose.
3. **Taille du point sans valeur chiffrée** : curseur de « Petit » à « Grand », avec un trait rouge au minimum touchable.
4. **Noms des trois catégories fixes non modifiables**, seules la couleur et l'opacité changent. Le brief dit « non supprimables », il ne dit rien des noms.
5. **L'opacité règle le remplissage seulement**, le contour reste plein. Palette de seize couleurs, code hexadécimal, curseur et champ « 55 % » synchronisés, aperçu, « Appliquer ».
6. **Vue détaillée** : le nom proposé reprend les annotations comprises dans le cadre (« Coude, carpe et boulet »). Une case cochée par défaut crée l'accès sur la vue parente avec le rectangle tracé. L'outil « Accès à une vue détaillée » de l'éditeur actuel disparaît de la barre ; un accès supplémentaire vers une vue existante passerait par le menu de la vue.
7. **Périmètre et limites** en deux blocs : texte commun non modifiable ici, et précisions propres à la fiche. Le praticien lit les deux à la suite. Une nouvelle version du texte commun est signalée et ne s'applique qu'après accord.
8. **Enregistrement explicite conservé** (bouton « Enregistrer », pas d'enregistrement automatique), désormais placé en dernier dans l'en-tête après Références et Prévisualiser.
9. **Téléphone** : panneau du bas qui se tire ou s'ouvre par « Toutes les propriétés », barre de quatre outils en bas. « + » seulement sur les segments assez longs pour être touchés ; zoomer fait apparaître les autres.
10. **Tablette** : la barre latérale de l'application se replie derrière le menu pour laisser la place au dessin.
11. **Couleur propre d'une annotation** : le champ existe (`color`). Les planches ne le montrent plus et toute annotation hérite de sa catégorie. À décider : le masquer, le garder en option avancée, ou le retirer du modèle.
## Contradictions avec des décisions ratifiées
Le brief rouvre des décisions déjà prises. Les planches suivent le brief, ces points restent à confirmer.
| Décision en vigueur | Ce que la nouvelle UX demande |
|---|---|
| Contrat V1-2 §8.3 : glisser de sommet, rectangle de recadrage sur le dessin et courbes sont au **niveau 2, différé** | Les trois deviennent le cœur de l'éditeur |
| §8.4 et O14 A : **édition en lecture seule sous 1 024 px** | Interactions au doigt sur téléphone (planches 14, 15 A-B, 16). La planche 15 C montre la règle actuelle si elle est gardée |
| §8.2 : chaque coordonnée **saisissable dans un champ numérique** (alternative clavier et précision) | Coordonnées internes. Le clavier reste possible par les flèches, sans champ chiffré |
| §7.4 : « No template of scientific content is shipped » | Un texte commun préremplit « Périmètre et limites ». C'est un texte juridique, mais c'est un modèle livré |
| §8.2 : noms des catégories modifiables, couleur propre par annotation, outil de lien vers une vue détaillée | Noms des catégories fixes figés (choix 4), couleur héritée de la catégorie (choix 11), lien créé avec la vue détaillée (choix 6) |
| BDR-096 : planches 04 et 05 de V1-2.4 approuvées comme référence de l'éditeur | Ces maquettes les remplacent une fois validées (règle de `docs/design/README.md` : un changement de direction demande un nouveau fichier validé) |
| V1-2.6 niveau 1 construit, essai du propriétaire en attente | Il faut décider si la nouvelle UX remplace l'essai, s'ajoute à V1-2.6 ou devient une étape avant V1-2.7 |
## Faisabilité avec le cœur Rust actuel
Audit en lecture seule de `crates/core` et de l'éditeur. Les références détaillées (fichier:ligne) sont dans `.claude/audits/2026-11-05-v1-2-6-ux-feasibility.md`. Classement : **déjà possible** (opérations existantes), **page seule** (le cœur suffit, seule l'interface change), **opération à créer** dans le cœur, **changement de schéma** du document v2.
| Besoin | Classement | Constat |
|---|---|---|
| Déplacer un point, régler son rayon | Déjà possible | Un `update` de l'annotation au relâchement. Le rayon par glisser ou curseur ne change que la page |
| Glisser un sommet, insérer au milieu d'un segment, retirer un sommet, déplacer un polygone | Page seule | Chaque geste est un `update` avec le nouveau tableau de points. Minimum de 3 sommets déjà refusé par le schéma. Les cercles de sommets actuels sont décoratifs (`pointer-events-none`) |
| Refus d'une forme (hors cadre, trop petite, intérieur trop étroit) | Déjà possible | `out_of_frame`, `too_small`, `interior_too_small` contrôlés après chaque validation, moins de 61 ms sur l'équin. L'aperçu pendant le geste reste côté page |
| Annuler / Rétablir | Déjà possible | Une entrée par modification acceptée, 8 Mio de pile. Ctrl+Z et Ctrl+Maj+Z existent |
| Redessiner une zone | Page seule | Un `update` de la géométrie qui garde les autres champs |
| Tracer une vue détaillée au rectangle | Page seule | Le rectangle donne le `view_box` d'une vue sans dessin propre. Le compositeur garde tout le SVG (définitions, transformations) et ne fait que recadrer : la qualité vectorielle est conservée sans fichier dérivé |
| Nom FR/EN proposé pour la vue | **Opération à créer** | Aucune requête ne liste les annotations dans un rectangle. Esquisse : `sheet.annotations_in_rect` {document, view_id, rect} → [{id, name, category_id, inside \| partial}] |
| Remplacer le cadrage par un SVG spécifique | Déjà possible, **remise en place à créer** | Téléversement, nettoyage, rattachement existent. Les coordonnées sont gardées telles quelles et relues dans l'espace du nouveau dessin : les annotations peuvent se décaler. Esquisse : transposer les géométries du cadre au nouveau `viewBox`, les passer « À confirmer » |
| Éditer une courbe sans la simplifier (sommets et points de contrôle) | **Opération à créer** | Le cœur lit `d` pour le mesurer, sans modèle de segments ni écrivain. Une proposition existe, non construite : `sheet.path_points` et `sheet.path_move_points` (`.claude/tasks/plans/2026-11-04-v1-2-6-path-repair-core-proposal.md`). Il reste à traiter les chemins relatifs (déplacer un point décale les suivants), H et V, les contrôles implicites S et T, les arcs. Aucune fiche actuelle ne contient de courbe |
| Déplacer une zone courbe entière | **Opération à créer** | Même manque : aucune translation de `d` aujourd'hui |
| Catégories fixes Os, Articulations, Vertèbres | **Changement de schéma** ou règle nouvelle | Aucune notion de catégorie fixe. Une fiche neuve démarre sans catégorie. Il faut un rôle par catégorie (ou des identifiants réservés) et une règle qui refuse leur suppression |
| Opacité par catégorie | **Changement de schéma** et du rendu | Couleur `#rrggbb` seulement. Opacités codées en dur dans le calque (point 0,65 ou 0,5, zone 0,3, accès 0,06, PDF 0,85). Toucher au rendu impose de mettre à jour `docs/ANNOTATION-RENDERING.md` d'abord, et les références R3/R4 ne se régénèrent pas sans décision |
| Lien catégorie Vertèbres ↔ régions | Page seule ou règle nouvelle | Aujourd'hui toute annotation peut porter une région, quelle que soit sa catégorie. Filtrer le choix par catégorie ne change que la page ; l'imposer est une règle de validation |
| Régions vertébrales dans la catégorie | Page seule | Code unique, nombre positif, plage `count_range` cohérente et suppression refusée tant qu'une zone l'utilise : règles déjà dans le cœur |
| Texte commun de « Périmètre et limites » | Page seule, **source à décider** | Un seul `update`. Il faut décider où vit le texte commun (dictionnaire de l'application, table serveur) et qui en porte la rédaction juridique |
| Références en volet secondaire | Page seule | Seuls les constats citent des références |
| Toucher : poignées, deux doigts | Page seule, **défaut à corriger** | Pincer et faire défiler existent déjà. Le geste de déplacement ne vérifie pas `pointerId` : un second doigt peut l'alimenter |
### Conséquences d'un changement de schéma
Ajouter un rôle ou une opacité aux catégories touche : les types ts-rs, le lecteur N-1 figé (strict, il refuserait un instantané nouveau), l'instantané embarqué dans chaque PDF, l'empreinte RFC 8785 de la fiche, les empreintes des groupes de revue, les contrôles SQL de version de schéma, le verdict du worker. Un champ flottant retire aussi `Eq` à `AnnotationCategory`. Les lecteurs d'archives ne perdent jamais une version : un document v3 coexisterait avec v2. Une piste à étudier pour limiter l'effet : rôle et opacité déduits sans nouveau champ (identifiants réservés, opacité fixe par rôle), au prix de la souplesse demandée.
### Autres risques
- Il reste environ 17 Ko de marge sur le module WebAssembly (583 126 o sur 600 000 o compressés) pour les nouvelles opérations.
- La fiche équine a cinq catégories : Articulations, Os, Charnières vertébrales, Segments vertébraux, Os du crâne. Les planches rangent « Segments vertébraux » sous Vertèbres et gardent « Charnières vertébrales » et « Os du crâne » comme catégories de la fiche. Ce rattachement est à valider, avec la migration de la copie de travail.
## Ce qui n'est pas dessiné
Le contenu des onglets Constats et Vérification ne change pas : seule leur place dans la barre d'onglets est montrée (planche 11 pour Constats). Les écrans de revue et de publication relèvent de V1-2.7.
## Relecture d'écriture
Texte relu contre les règles de style du projet : pas de tiret cadratin, pas de liste réflexe en trois points, pas de vocabulaire creux. Rien d'autre à corriger.
+769
View File
@@ -0,0 +1,769 @@
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Faunosteo V1-2.6 éditeur graphique (proposition)</title>
<!--
V1-2.6 new editor UX (owner brief 2026-11-05, contract .claude/tasks/contracts/2026-11-05-v1-2-6-ux-maquettes.md):
static functional mockups, never shipped. Tokens, shell and components are those of V1-2.4
(docs/design/v1-2-4/maquettes.html, apps/app/src/styles/tokens.css). The drawing is the equine draft's
cleaned asset and every annotation geometry comes from its document.json; detail views are drawn as crops
of that same file (viewBox), as the core composes them. Rendered to PNG by render.cjs.
-->
<style>
:root {
--color-bg: #fbf9f5; --color-surface: #ffffff; --color-surface-strong: #f4efe6;
--color-ink: #1f1b16; --color-ink-muted: #6b6359; --color-border: #e7e0d2;
--color-accent: #b85a3f; --color-accent-strong: #9c4831;
--color-danger: #c0392b; --color-danger-strong: #962c21;
--severity-mild: #6b8e6b; --severity-moderate: #b88a3f; --severity-severe: #c0392b;
--font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
--font-serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: #ece6da; font-family: var(--font-sans); color: var(--color-ink); -webkit-font-smoothing: antialiased; }
.sheet-title { font: 600 15px var(--font-sans); margin: 0 0 10px; }
.row { display: flex; gap: 28px; align-items: flex-start; padding: 24px 28px; flex-wrap: wrap; }
[data-board] { background: #ece6da; padding: 16px; }
.frame { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(31,27,22,.06); position: relative; }
.desk { width: 1280px; height: 800px; display: flex; }
.tab-frame { width: 1180px; height: 820px; display: flex; flex-direction: column; border-radius: 22px; border: 10px solid #2a2520; }
.phone { width: 375px; height: 780px; display: flex; flex-direction: column; border-radius: 28px; border: 8px solid #2a2520; position: relative; }
.side { width: 216px; flex: none; background: var(--color-surface); border-right: 1px solid var(--color-border); display: flex; flex-direction: column; }
.side .logo { padding: 20px; } .side .logo img { height: 32px; }
.nav { padding: 0 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--color-ink-muted); }
.nav a.on { background: var(--color-surface-strong); color: var(--color-ink); font-weight: 500; }
.nav a.on::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--color-accent); }
.nav hr { border: 0; border-top: 1px solid var(--color-border); margin: 8px 4px; width: 100%; }
.side .foot { border-top: 1px solid var(--color-border); padding: 16px; font-size: 14px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.top { height: 52px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-bottom: 1px solid var(--color-border); background: rgba(255,255,255,.95); }
.top .crumb { font-size: 13px; color: var(--color-ink-muted); white-space: nowrap; overflow: hidden; }
.top .crumb b { color: var(--color-ink); font-weight: 500; }
.top .me { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--color-accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.ehead { padding: 12px 24px 0; display: flex; align-items: center; gap: 10px; }
h1.page { font: 400 22px/1.2 var(--font-serif); margin: 0; white-space: nowrap; }
h2.sec { font: 400 18px/1.3 var(--font-serif); margin: 0 0 10px; }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; box-shadow: 0 1px 2px rgba(31,27,22,.05); }
.muted { color: var(--color-ink-muted); }
.small { font-size: 12px; } .s13 { font-size: 13px; } .s14 { font-size: 14px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--color-surface-strong); white-space: nowrap; }
.badge.warn { background: #fffbeb; color: #b45309; }
.badge.danger { background: #fef2f2; color: #b91c1c; }
.badge.ok { background: color-mix(in srgb, var(--severity-mild) 14%, white); color: #3f5e3f; }
.badge.accent { background: rgba(184,90,63,.1); color: var(--color-accent-strong); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 8px; font-size: 14px; font-weight: 500; border: 1px solid transparent; white-space: nowrap; }
.btn.sm { height: 34px; padding: 0 11px; border-radius: 6px; font-size: 13px; }
.btn.lg { height: 46px; padding: 0 16px; font-size: 15px; }
.btn.primary { background: var(--color-accent); color: #fff; }
.btn.secondary { background: var(--color-surface); border-color: var(--color-border); }
.btn.ghost { background: transparent; }
.btn.dangertxt { background: transparent; color: var(--color-danger-strong); }
.btn.on { background: var(--color-ink); color: var(--color-bg); border-color: var(--color-ink); }
.btn[disabled] { opacity: .45; }
.notice { display: flex; gap: 8px; align-items: flex-start; border: 1px solid; border-radius: 8px; padding: 9px 12px; font-size: 13px; line-height: 1.4; }
.notice.info { border-color: var(--color-border); background: var(--color-surface-strong); }
.notice.error { border-color: rgba(192,57,43,.4); background: color-mix(in srgb, var(--color-danger) 8%, white); color: var(--color-danger-strong); }
.notice.success { border-color: rgba(107,142,107,.4); background: color-mix(in srgb, var(--severity-mild) 10%, white); }
.notice.warn { border-color: rgba(184,138,63,.45); background: color-mix(in srgb, var(--severity-moderate) 10%, white); }
.notice svg { flex: none; margin-top: 1px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; min-width: 0; }
.field label { font-weight: 500; }
.inp { height: 36px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); padding: 0 10px; display: flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; overflow: hidden; }
.inp.area { height: auto; min-height: 72px; align-items: flex-start; padding: 8px 10px; white-space: normal; line-height: 1.45; font-size: 13px; }
.inp.focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(184,90,63,.18); }
.inp .caret { margin-left: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip { height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-surface); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.chip.on { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-bg); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--color-border); padding: 0 16px; margin-top: 8px; }
.tabs a { padding: 10px 14px; font-size: 14px; color: var(--color-ink-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs a.on { color: var(--color-accent-strong); border-color: var(--color-accent); font-weight: 500; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.sm { width: 15px; height: 15px; } .icon.lg { width: 22px; height: 22px; }
.mono { font-family: ui-monospace, 'DejaVu Sans Mono', monospace; font-size: 12px; }
.annot { background: #fff8e6; border: 1px dashed #c9a35a; color: #6b5323; border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.45; }
.annot b { color: #4a3916; }
/* editor */
.work { flex: 1; display: flex; gap: 12px; padding: 10px 16px 12px; min-height: 0; }
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.toolbar { display: flex; align-items: center; gap: 6px; }
.toolbar .sep { width: 1px; height: 24px; background: var(--color-border); margin: 0 4px; }
.tbtn { height: 36px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--color-border); background: var(--color-surface); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.tbtn.on { background: var(--color-ink); color: var(--color-bg); border-color: var(--color-ink); }
.tbtn.ico { width: 36px; padding: 0; justify-content: center; }
.tbtn[disabled] { opacity: .4; }
.canvas { position: relative; flex: 1; min-height: 0; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.canvas svg.drawing { display: block; }
.hint { position: absolute; left: 12px; top: 12px; background: rgba(31,27,22,.88); color: #fbf9f5; border-radius: 8px; padding: 7px 11px; font-size: 13px; line-height: 1.35; max-width: 70%; }
.hint kbd, .kbd { font: 500 11px var(--font-sans); border: 1px solid rgba(255,255,255,.35); border-radius: 4px; padding: 0 4px; }
.zoombox { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 4px; align-items: center; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; padding: 3px; font-size: 12px; }
.zoombox span.z { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; }
.toast { position: absolute; left: 50%; transform: translateX(-50%); bottom: 14px; background: var(--color-ink); color: var(--color-bg); border-radius: 10px; padding: 9px 12px; font-size: 13px; display: flex; gap: 12px; align-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.18); white-space: nowrap; }
.toast a { color: #f2c1ae; font-weight: 600; }
.toast.err { background: #7a2318; }
.panel { width: 320px; flex: none; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.pcard { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; }
.phead { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.phead .r { margin-left: auto; font-weight: 400; }
.lrow { display: flex; align-items: center; gap: 8px; font-size: 13px; min-height: 30px; }
.lrow .r { margin-left: auto; }
.sw { width: 18px; height: 18px; border-radius: 5px; flex: none; border: 1px solid rgba(0,0,0,.12); background-image: linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%),linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%); background-size: 8px 8px; background-position: 0 0,4px 4px; position: relative; overflow: hidden; }
.sw i { position: absolute; inset: 0; }
.sw.lg { width: 26px; height: 26px; border-radius: 7px; }
.slider { position: relative; height: 22px; display: flex; align-items: center; }
.slider .track { height: 6px; border-radius: 3px; background: var(--color-surface-strong); border: 1px solid var(--color-border); width: 100%; position: relative; }
.slider .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--color-accent); }
.slider .knob { position: absolute; top: 50%; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--color-accent); transform: translate(-50%,-50%); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.slider .mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--color-danger); }
.seg { display: flex; border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; font-size: 12px; }
.seg span { flex: 1; text-align: center; padding: 7px 4px; border-left: 1px solid var(--color-border); white-space: nowrap; }
.seg span:first-child { border-left: 0; }
.seg span.on { background: var(--color-ink); color: var(--color-bg); }
.thumb { width: 54px; height: 40px; border-radius: 6px; border: 1px solid var(--color-border); overflow: hidden; flex: none; background: #fff; }
.menu { position: absolute; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 10px 28px rgba(31,27,22,.16); padding: 6px; font-size: 13px; z-index: 5; }
.menu div { padding: 8px 10px; border-radius: 6px; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.menu div.on { background: var(--color-surface-strong); }
.menu hr { border: 0; border-top: 1px solid var(--color-border); margin: 4px 0; }
.pop { position: absolute; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; box-shadow: 0 14px 34px rgba(31,27,22,.2); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; z-index: 6; }
.dialog-wrap { position: absolute; inset: 0; background: rgba(31,27,22,.42); display: grid; place-items: center; z-index: 8; }
.dialog { background: var(--color-surface); border-radius: 16px; padding: 20px 22px; box-shadow: 0 10px 30px rgba(0,0,0,.2); display: flex; flex-direction: column; gap: 12px; }
table.t { border-collapse: collapse; width: 100%; font-size: 13px; }
table.t th, table.t td { border-bottom: 1px solid var(--color-border); padding: 6px 6px; text-align: left; vertical-align: middle; }
table.t th { font-size: 12px; font-weight: 600; color: var(--color-ink-muted); }
table.t .inp { height: 32px; font-size: 13px; }
.palette { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.palette span { height: 26px; border-radius: 6px; border: 1px solid rgba(0,0,0,.12); }
.palette span.on { outline: 2px solid var(--color-ink); outline-offset: 2px; }
.ph-top { height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--color-border); background: var(--color-surface); flex: none; font-size: 14px; }
.ph-body { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--color-surface); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 24px rgba(31,27,22,.14); padding: 8px 14px 14px; display: flex; flex-direction: column; gap: 10px; z-index: 4; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--color-border); align-self: center; }
.ptools { display: flex; justify-content: space-around; border-top: 1px solid var(--color-border); background: var(--color-surface); padding: 6px 4px 10px; flex: none; }
.ptools span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; min-width: 80px; padding: 0 6px; white-space: nowrap; min-height: 48px; justify-content: center; border-radius: 10px; color: var(--color-ink-muted); }
.ptools span.on { background: var(--color-ink); color: var(--color-bg); }
.callout { position: absolute; z-index: 7; }
.lead { position: absolute; border-top: 1.5px dashed #c9a35a; transform-origin: 0 0; z-index: 7; }
.vign { display: flex; flex-direction: column; gap: 8px; }
.vign > .lbl { font-size: 13px; font-weight: 600; }
</style>
</head>
<body>
<svg width="0" height="0" style="position:absolute">
<symbol id="i-dashboard" viewBox="0 0 24 24"><path d="M4 4h7v7H4zM13 4h7v4h-7zM13 11h7v9h-7zM4 14h7v6H4z"/></symbol>
<symbol id="i-users" viewBox="0 0 24 24"><path d="M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM2 21a7 7 0 0 1 14 0M16 3.5a4 4 0 0 1 0 7M22 21a7 7 0 0 0-4.5-6.5"/></symbol>
<symbol id="i-paw" viewBox="0 0 24 24"><path d="M5.5 12a1.8 1.8 0 1 0 0-3.6 1.8 1.8 0 0 0 0 3.6zM9 8.4a1.9 1.9 0 1 0 0-3.8 1.9 1.9 0 0 0 0 3.8zM15 8.4a1.9 1.9 0 1 0 0-3.8 1.9 1.9 0 0 0 0 3.8zM18.5 12a1.8 1.8 0 1 0 0-3.6 1.8 1.8 0 0 0 0 3.6zM12 11c-3 0-5.5 4.5-5.5 6.5 0 2 2 2.5 3 2.2 1-.3 1.6-.7 2.5-.7s1.5.4 2.5.7c1 .3 3-.2 3-2.2 0-2-2.5-6.5-5.5-6.5z"/></symbol>
<symbol id="i-user" viewBox="0 0 24 24"><path d="M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4 21a8 8 0 0 1 16 0"/></symbol>
<symbol id="i-tool" viewBox="0 0 24 24"><path d="M14 3l7 7-4 4-7-7zM10 10l-6 6 4 4 6-6M3 21l3-3"/></symbol>
<symbol id="i-check" viewBox="0 0 24 24"><path d="M5 12l5 5L20 7"/></symbol>
<symbol id="i-alert" viewBox="0 0 24 24"><path d="M12 9v4M12 17h.01M10.3 3.9L2.8 17a2 2 0 0 0 1.7 3h15a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z"/></symbol>
<symbol id="i-info" viewBox="0 0 24 24"><path d="M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 11v5M12 8h.01"/></symbol>
<symbol id="i-menu" viewBox="0 0 24 24"><path d="M4 7h16M4 12h16M4 17h16"/></symbol>
<symbol id="i-close" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6L6 18"/></symbol>
<symbol id="i-book" viewBox="0 0 24 24"><path d="M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2zM4 21V5M8 7h7M8 11h5"/></symbol>
<symbol id="i-shield" viewBox="0 0 24 24"><path d="M12 3l8 3v6c0 4.5-3.4 8-8 9-4.6-1-8-4.5-8-9V6zM9 12l2 2 4-4"/></symbol>
<symbol id="i-search" viewBox="0 0 24 24"><path d="M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14zM20 20l-4-4"/></symbol>
<symbol id="i-cursor" viewBox="0 0 24 24"><path d="M5 3l14 7-6 2-2 6z"/></symbol>
<symbol id="i-point" viewBox="0 0 24 24"><path d="M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM12 2v3M12 19v3M2 12h3M19 12h3"/></symbol>
<symbol id="i-zone" viewBox="0 0 24 24"><path d="M5 7l7-4 7 5-2 10-9 2-3-6z"/></symbol>
<symbol id="i-crop" viewBox="0 0 24 24"><path d="M6 2v14a2 2 0 0 0 2 2h14M2 6h14a2 2 0 0 1 2 2v14"/></symbol>
<symbol id="i-hand" viewBox="0 0 24 24"><path d="M8 13V5.5a1.5 1.5 0 0 1 3 0V12M11 11V4a1.5 1.5 0 0 1 3 0v7M14 11V5.5a1.5 1.5 0 0 1 3 0V13M17 9.5a1.5 1.5 0 0 1 3 0V15a7 7 0 0 1-7 7h-1a7 7 0 0 1-5.5-2.7L3.6 15.5a1.6 1.6 0 0 1 2.5-2L8 15.5"/></symbol>
<symbol id="i-undo" viewBox="0 0 24 24"><path d="M9 14L4 9l5-5M4 9h10a6 6 0 0 1 0 12h-3"/></symbol>
<symbol id="i-redo" viewBox="0 0 24 24"><path d="M15 14l5-5-5-5M20 9H10a6 6 0 0 0 0 12h3"/></symbol>
<symbol id="i-plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></symbol>
<symbol id="i-minus" viewBox="0 0 24 24"><path d="M5 12h14"/></symbol>
<symbol id="i-trash" viewBox="0 0 24 24"><path d="M4 7h16M10 11v6M14 11v6M5 7l1 13h12l1-13M9 7V4h6v3"/></symbol>
<symbol id="i-lock" viewBox="0 0 24 24"><path d="M6 11h12v10H6zM8 11V7a4 4 0 0 1 8 0v4"/></symbol>
<symbol id="i-eye" viewBox="0 0 24 24"><path d="M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12zM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/></symbol>
<symbol id="i-chevron" viewBox="0 0 24 24"><path d="M9 6l6 6-6 6"/></symbol>
<symbol id="i-down" viewBox="0 0 24 24"><path d="M6 9l6 6 6-6"/></symbol>
<symbol id="i-up" viewBox="0 0 24 24"><path d="M6 15l6-6 6 6"/></symbol>
<symbol id="i-move" viewBox="0 0 24 24"><path d="M12 2v20M2 12h20M12 2l-3 3M12 2l3 3M12 22l-3-3M12 22l3-3M2 12l3-3M2 12l3 3M22 12l-3-3M22 12l-3 3"/></symbol>
<symbol id="i-pen" viewBox="0 0 24 24"><path d="M4 20l4-1 11-11-3-3L5 16zM14 6l3 3"/></symbol>
<symbol id="i-image" viewBox="0 0 24 24"><path d="M4 4h16v16H4zM4 16l5-5 4 4 3-3 4 4M15 9h.01"/></symbol>
<symbol id="i-gear" viewBox="0 0 24 24"><path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-2.9 1.2V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-2.9-1.2l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1A1.7 1.7 0 0 0 3 15H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.2-2.9l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1A1.7 1.7 0 0 0 9 4.6V4a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 2.9 1.2l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1A1.7 1.7 0 0 0 20.9 11H21a2 2 0 1 1 0 4z"/></symbol>
<symbol id="i-dots" viewBox="0 0 24 24"><path d="M12 6h.01M12 12h.01M12 18h.01"/></symbol>
<symbol id="i-grip" viewBox="0 0 24 24"><path d="M9 6h.01M15 6h.01M9 12h.01M15 12h.01M9 18h.01M15 18h.01"/></symbol>
<symbol id="i-clock" viewBox="0 0 24 24"><path d="M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 7v5l3 2"/></symbol>
<symbol id="i-spin" viewBox="0 0 24 24"><path d="M12 3a9 9 0 1 0 9 9"/></symbol>
<symbol id="i-cloud-off" viewBox="0 0 24 24"><path d="M3 3l18 18M8 8a5 5 0 0 0-3 9h11M18 17a4 4 0 0 0-1.5-7.7A6 6 0 0 0 10.6 5"/></symbol>
<symbol id="i-layers" viewBox="0 0 24 24"><path d="M12 3l9 5-9 5-9-5zM3 13l9 5 9-5"/></symbol>
<symbol id="i-fit" viewBox="0 0 24 24"><path d="M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5"/></symbol>
<symbol id="i-spine" viewBox="0 0 24 24"><path d="M6 5h12M7 9h10M6 13h12M7 17h10M12 3v18"/></symbol>
<symbol id="i-file" viewBox="0 0 24 24"><path d="M6 3h8l4 4v14H6zM14 3v4h4"/></symbol>
<symbol id="i-copy" viewBox="0 0 24 24"><path d="M9 9h11v11H9zM5 15H4V4h11v1"/></symbol>
</svg>
<script>
/* ---------- data: the equine draft (document.json), categories in the proposed model ---------- */
const HORSE = '../../../supabase/seed/anatomical-sheets/equine/draft/assets/horse.svg'
const LOGO = '../../../apps/app/public/logo-horizontal.svg'
const W = 2073.4, H = 1629.4
// Proposed model: three fixed categories + custom ones. Colours from the draft; opacity is the new value.
const CATS = {
os: { fr: 'Os', en: 'Bones', c: '#a41e65', o: .35, fixed: true, n: 3 },
art: { fr: 'Articulations', en: 'Joints', c: '#ff9500', o: .35, fixed: true, n: 13 },
vert: { fr: 'Vertèbres', en: 'Vertebrae', c: '#e100ff', o: .30, fixed: true, n: 5 },
charn: { fr: 'Charnières vertébrales', en: 'Vertebral junctions', c: '#ff0000', o: .35, n: 4 },
crane: { fr: 'Os du crâne', en: 'Cranial bones', c: '#1baa08', o: .35, n: 5 },
}
const A = [
['main','art','Boulet postérieur',['c',1523,1397,34]], ['main','art','Jarret',['c',1542,1159,34]],
['main','art','Grasset',['c',1464,918,34]], ['main','art','Hanche',['c',1585,612,34]],
['main','art','Articulation sacro-iliaque',['c',1450,578,34]], ['main','art','Épaule',['c',784,907,34]],
['main','art','Coude',['c',743,1193,34]], ['main','art','Carpe',['c',745,1252,34]],
['main','art','Boulet antérieur',['c',736,1379,34]], ['main','os','Sésamoïdes antérieurs',['c',784,1371,34]],
['main','charn','Charnière L6-S1',['c',1424,515,30]], ['main','charn','Charnière T18-L1',['c',1118,528,30]],
['main','charn','Charnière C7-T1',['c',865,528,30]],
['main','vert','Vertèbres caudales',['p',[[1655,545],[1662,513],[1742,565],[1780,618],[1763,628],[1724,590],[1682,569]]]],
['main','vert','Vertèbres sacrales',['p',[[1438,461],[1418,556],[1511,540],[1595,538],[1641,552],[1641,510],[1606,485],[1515,468]]]],
['main','vert','Vertèbres lombaires',['p',[[1401,457],[1386,562],[1232,562],[1130,552],[1131,503],[1260,475],[1361,454]]]],
['main','vert','Vertèbres thoraciques',['p',[[1110,498],[1103,559],[1010,559],[915,552],[874,531],[827,510],[841,422],[960,482],[1068,496]]]],
['main','vert','Vertèbres cervicales',['p',[[468,276],[489,216],[558,248],[586,339],[607,401],[625,447],[649,510],[695,528],[729,520],[765,473],[817,453],[796,544],[730,600],[646,604],[593,565],[552,461],[524,370]]]],
['main','link','Tête',['p',[[454,332],[429,202],[408,150],[349,154],[300,188],[269,216],[234,279],[192,318],[164,384],[175,457],[234,468],[265,450],[328,419],[405,394],[443,408]]]],
['head','crane','Pariétal',['c',348,161,27]], ['head','crane','Frontal',['c',277,214,27]],
['head','crane','Sphénoïde',['c',352,300,27]], ['head','crane','Temporal',['c',366,214,27]],
['head','crane','Occipital',['c',441,190,27]], ['head','art','ATM',['c',400,258,27]],
['head','art','SSB',['c',437,300,27]], ['head','os','Appareil hyoïdien',['c',376,399,27]],
['head','charn','Charnière C0-C1',['c',482,332,27]],
]
const THOR = A.find(a => a[2] === 'Vertèbres thoraciques')[3][1]
const pts = (p) => p.map(q => q.join(',')).join(' ')
/* ---------- drawing ---------- */
// opts: vb [x,y,w,h], w px, view, sel (name), hide [names], extra(u) markup, cats override, dim
function drawing(o) {
const vb = o.vb || [0, 0, W, H]
const w = o.w, h = o.h || Math.round(w * vb[3] / vb[2])
const u = vb[2] / w * (o.fitH ? (w * vb[3] / vb[2]) / h : 1)
const uu = Math.max(vb[2] / w, vb[3] / h)
const cats = o.cats || CATS
let s = `<svg class="drawing" width="${w}" height="${h}" viewBox="${vb.join(' ')}" preserveAspectRatio="xMidYMid meet"><image href="${HORSE}" x="0" y="0" width="${W}" height="${H}"${o.dim ? ' opacity=".45"' : ''}/>`
if (!o.noAnn) for (const [view, cat, name, g] of A) {
if (view !== (o.view || 'main') || (o.hide || []).includes(name)) continue
if (cat === 'link') {
if (o.links === false) continue
s += `<polygon points="${pts(g[1])}" fill="rgba(31,27,22,.05)" stroke="#1f1b16" stroke-width="${2 * uu}" stroke-dasharray="${8 * uu} ${5 * uu}"/>`
continue
}
const k = cats[cat], fo = o.faint ? k.o * .45 : k.o, so = o.faint ? .5 : 1
const st = `fill="${k.c}" fill-opacity="${fo}" stroke="${k.c}" stroke-opacity="${so}" stroke-width="${2 * uu}"`
s += g[0] === 'c' ? `<circle cx="${g[1]}" cy="${g[2]}" r="${g[3]}" ${st}/>` : `<polygon points="${pts(g[1])}" ${st}/>`
}
if (o.extra) s += o.extra(uu)
return s + '</svg>'
}
// vertex handle, midpoint plus, minus bubble, selection outline; u = user units per screen px
const V = (x, y, u, on, big) => `<circle cx="${x}" cy="${y}" r="${(big ? 9 : 6) * u}" fill="${on ? '#b85a3f' : '#fff'}" stroke="#1f1b16" stroke-width="${2 * u}"/>`
const HIT = (x, y, u) => `<circle cx="${x}" cy="${y}" r="${22 * u}" fill="rgba(184,90,63,.10)" stroke="#b85a3f" stroke-width="${1 * u}" stroke-dasharray="${3 * u} ${3 * u}"/>`
const PLUS = (x, y, u, big) => { const r = (big ? 12 : 8) * u, l = r * .55; return `<g><circle cx="${x}" cy="${y}" r="${r}" fill="#fff" stroke="#b85a3f" stroke-width="${1.6 * u}"/><path d="M${x - l} ${y}h${2 * l}M${x} ${y - l}v${2 * l}" stroke="#b85a3f" stroke-width="${2 * u}" stroke-linecap="round"/></g>` }
const MINUS = (x, y, u, big, off) => { const bw = (big ? 44 : 30) * u, bh = (big ? 36 : 26) * u, yy = y - (big ? 30 : 22) * u - bh; const c = off ? '#b9b0a3' : '#c0392b'; return `<g><rect x="${x - bw / 2}" y="${yy}" width="${bw}" height="${bh}" rx="${8 * u}" fill="${c}"/><path d="M${x - 5 * u} ${yy + bh}l${5 * u} ${6 * u}l${5 * u} ${-6 * u}z" fill="${c}"/><path d="M${x - bw * .22} ${yy + bh / 2}h${bw * .44}" stroke="#fff" stroke-width="${2.6 * u}" stroke-linecap="round"/></g>` }
const SEL = (p, u) => `<polygon points="${pts(p)}" fill="none" stroke="#1f1b16" stroke-width="${2 * u}"/>`
const mids = (p) => p.map((q, i) => { const n = p[(i + 1) % p.length]; return [(q[0] + n[0]) / 2, (q[1] + n[1]) / 2] })
function polyEdit(p, u, o = {}) {
let s = SEL(p, u)
if (!o.noPlus) s += mids(p).filter((m, i) => { const n = p[(i + 1) % p.length]; return !o.minSeg || Math.hypot(n[0] - p[i][0], n[1] - p[i][1]) / u >= o.minSeg }).map(m => PLUS(m[0], m[1], u, o.big)).join('')
s += p.map((q, i) => V(q[0], q[1], u, i === o.on, o.big)).join('')
if (o.on != null && o.minus !== false) s += MINUS(p[o.on][0], p[o.on][1], u, o.big, o.minusOff)
return s
}
/* ---------- shell ---------- */
const NAV = [['dashboard','Tableau de bord'],['users','Clients'],['paw','Animaux'],['book','Fiches anatomiques'],['HR'],['shield','Administration','on'],['HR'],['user','Mon compte'],['tool','Outil de bilan']]
const ico = (n, c = '') => `<svg class="icon ${c}"><use href="#i-${n}"/></svg>`
const side = () => `<aside class="side"><div class="logo"><img src="${LOGO}" alt="Faunosteo"></div><nav class="nav">${NAV.map(([i, l, on]) => i === 'HR' ? '<hr>' : `<a class="${on || ''}">${ico(i)}${l}</a>`).join('')}</nav><div class="foot muted">Se déconnecter</div></aside>`
const TABS = ['Général', 'Annotations', 'Constats', 'Vérification']
function tabs(on, errs = '2 erreurs') {
return '<div class="tabs">' + TABS.map(t => `<a class="${t === on ? 'on' : ''}">${t}${t === 'Vérification' && errs ? ` <span class="badge danger">${errs}</span>` : ''}</a>`).join('') + '</div>'
}
function save(state) {
return ({
dirty: `<span class="s13 muted">3 modifications non enregistrées</span><span class="btn primary sm">Enregistrer</span>`,
saving: `<span class="s13 muted" style="display:flex;gap:6px;align-items:center">${ico('spin', 'sm')}Enregistrement…</span><span class="btn primary sm" disabled>Enregistrer</span>`,
saved: `<span class="s13" style="display:flex;gap:6px;align-items:center;color:#3f5e3f">${ico('check', 'sm')}Enregistré à 14:32 · révision 11</span><span class="btn primary sm" disabled>Enregistrer</span>`,
})[state]
}
function header(o = {}) {
return `<div class="ehead"><h1 class="page">${o.title || 'Brouillon, version 4'}</h1><span class="badge">Brouillon</span><span class="badge">Copie de travail</span>${o.badges || ''}
<span style="margin-left:auto;display:flex;gap:8px;align-items:center"><span class="btn secondary sm">${ico('book', 'sm')}Références</span><span class="btn secondary sm">${ico('eye', 'sm')}Prévisualiser</span><span style="width:1px;height:24px;background:var(--color-border)"></span>${o.right || save(o.save || 'dirty')}</span></div>`
}
function editor(o) {
return `<div class="frame desk">${side()}<div class="main">
<div class="top"><span class="crumb">Administration › Fiches officielles › Cheval, squelette et rachis › <b>Brouillon, version 4</b></span><span class="me"><span class="avatar">BC</span>Bastien Chanot</span></div>
${header(o)}${tabs(o.tab || 'Annotations', o.errs)}
<div class="work">${o.body}</div>${o.overlay || ''}</div></div>`
}
function toolbar(on, o = {}) {
const t = (k, i, l, key) => `<span class="tbtn ${on === k ? 'on' : ''}" title="${key}">${ico(i, 'sm')}${l}</span>`
return `<div class="toolbar">${t('sel', 'cursor', 'Sélectionner', 'V')}${t('point', 'point', 'Ajouter un point', 'P')}${t('zone', 'zone', 'Ajouter une zone', 'Z')}${t('crop', 'crop', 'Créer une vue détaillée', 'D')}
</div>`
}
const bigPills = (z) => `${vchip()}<div class="zoombox" style="right:auto;left:10px;padding:4px"><span class="z" style="width:44px;height:44px">${ico('undo')}</span><span class="z" style="width:44px;height:44px;opacity:.4">${ico('redo')}</span></div><div class="zoombox" style="padding:4px"><span class="z" style="width:44px;height:44px">${ico('minus')}</span><span style="min-width:48px;text-align:center">${z}</span><span class="z" style="width:44px;height:44px">${ico('plus')}</span><span class="z" style="width:44px;height:44px">${ico('fit')}</span></div>`
const vchip = (v = 'Vue latérale gauche') => `<span class="chip" style="position:absolute;right:10px;top:10px;background:rgba(255,255,255,.95)">${ico('layers', 'sm')}${v}</span>`
const undo = `<div class="zoombox" style="right:auto;left:10px"><span class="z" title="Annuler (Ctrl+Z)">${ico('undo', 'sm')}</span><span class="z" title="Rétablir (Ctrl+Maj+Z)" style="opacity:.4">${ico('redo', 'sm')}</span></div>`
const zoom = (z = '100 %') => `${vchip()}${undo}<div class="zoombox"><span class="z">${ico('minus', 'sm')}</span><span style="min-width:42px;text-align:center">${z}</span><span class="z">${ico('plus', 'sm')}</span><span class="z" title="Ajuster">${ico('fit', 'sm')}</span></div>`
const sw = (c, o, cls = '') => `<span class="sw ${cls}"><i style="background:${c};opacity:${o}"></i></span>`
const catSel = (k) => `<span class="inp">${sw(CATS[k].c, CATS[k].o)}${CATS[k].fr}<span class="caret">${ico('down', 'sm')}</span></span>`
function slider(pct, o = {}) {
return `<div class="slider"><div class="track"><div class="fill" style="width:${pct}%"></div>${o.mark != null ? `<div class="mark" style="left:${o.mark}%" title="minimum"></div>` : ''}<div class="knob" style="left:${pct}%"></div></div></div>`
}
const keys = `<div class="s13 muted">Clavier : Tab = sommet ou poignée suivante · flèches = déplacer (Maj : par 10) · Inser = sommet après · Suppr = retirer · Entrée = valider · Échap = annuler · Ctrl+Z / Ctrl+Maj+Z</div>`
function catList(o = {}) {
return Object.entries(CATS).map(([k, c]) => `<div class="lrow">${sw(c.c, c.o)}<span>${c.fr}</span>${c.fixed ? `<span class="badge" title="Catégorie fixe">${ico('lock', 'sm')}Fixe</span>` : ''}<span class="r muted">${c.n}</span></div>`).join('')
}
function overviewPanel() {
return `<div class="panel">
<div class="pcard"><div class="phead">Vues<span class="r"><span class="btn ghost sm">${ico('crop', 'sm')}Nouvelle</span></span></div>
<div class="lrow" style="background:var(--color-surface-strong);border-radius:8px;padding:4px 6px"><span class="thumb">${drawing({ w: 54, h: 40, noAnn: true })}</span><span><b>Vue latérale gauche</b><br><span class="small muted">Vue principale · 18 annotations</span></span><span class="r">${ico('dots', 'sm')}</span></div>
<div class="lrow" style="padding:4px 6px"><span class="thumb">${drawing({ w: 54, h: 40, vb: [60, 100, 500, 380], view: 'head' })}</span><span>Tête<br><span class="small muted">Vue détaillée, cadrage · 9 annotations</span></span><span class="r">${ico('dots', 'sm')}</span></div></div>
<div class="pcard"><div class="phead">${ico('chevron', 'sm')}Catégories<span class="r small muted">5 · déplier pour modifier</span></div>
<div style="display:flex;gap:6px;flex-wrap:wrap">${Object.values(CATS).map(c => `<span class="chip" style="height:26px">${sw(c.c, c.o)}${c.fr}</span>`).join('')}</div></div>
<div class="pcard" style="flex:1;min-height:0;overflow:hidden"><div class="phead">Annotations de la vue<span class="r small muted">18</span></div>
<div class="inp" style="height:32px">${ico('search', 'sm')}<span class="muted s13">Filtrer par nom</span></div>
${['art', 'vert', 'charn', 'os'].map(k => `<div class="lrow" style="font-weight:600">${sw(CATS[k].c, CATS[k].o)}${CATS[k].fr}<span class="r muted" style="font-weight:400">${A.filter(a => a[0] === 'main' && a[1] === k).length}</span></div>` + A.filter(a => a[0] === 'main' && a[1] === k).slice(0, 2).map(a => `<div class="lrow" style="padding-left:26px;min-height:24px">${ico(a[3][0] === 'c' ? 'point' : 'zone', 'sm')}${a[2]}</div>`).join('') + `<div class="lrow small muted" style="padding-left:26px;min-height:20px">Voir les ${A.filter(a => a[0] === 'main' && a[1] === k).length} annotations</div>`).join('')}
</div></div>`
}
</script>
<!-- ================================================================== 01 overview -->
<div class="row"><div data-board="01-editeur-annotations-desktop">
<p class="sheet-title">1. Éditeur, onglet Annotations, dessin principal (desktop 1 280 px) · quatre onglets, Références en accès secondaire</p>
<div id="b01"></div></div></div>
<script>
document.getElementById('b01').innerHTML = editor({ body: `
<div class="stage">${toolbar('sel')}
<div class="canvas">${drawing({ w: 700, h: 550 })}${zoom('Ajusté')}</div>${keys}</div>${overviewPanel()}` })
</script>
<!-- ================================================================== 02 point creation -->
<div class="row"><div data-board="02-point-creation-desktop">
<p class="sheet-title">2. Ajouter un point : outil Point, clic sur le dessin, propriétés et rayon au curseur ; « Ajouter une catégorie » ouvre le volet Catégories</p>
<div id="b02"></div></div></div>
<script>
{
const vb = [1250, 760, 560, 440]
const np = [1505, 1030]
document.getElementById('b02').innerHTML = editor({ body: `
<div class="stage">${toolbar('point')}
<div class="canvas">${drawing({ w: 700, h: 550, vb, extra: u => `<circle cx="${np[0]}" cy="${np[1]}" r="30" fill="${CATS.art.c}" fill-opacity="${CATS.art.o}" stroke="${CATS.art.c}" stroke-width="${2 * u}"/><circle cx="${np[0]}" cy="${np[1]}" r="${30 + 5 * u}" fill="none" stroke="#1f1b16" stroke-width="${2 * u}" stroke-dasharray="${5 * u} ${4 * u}"/>${V(np[0] + 30, np[1], u)}` })}
<div class="hint">Point placé. Glissez-le pour l'ajuster, ou cliquez ailleurs pour le replacer. <kbd>Échap</kbd> abandonne.</div>${zoom('250 %')}</div>${keys}</div>
<div class="panel"><div class="pcard" style="gap:10px">
<div class="phead">${ico('point', 'sm')}Nouveau point<span class="r badge warn">À confirmer</span></div>
<div class="grid2"><div class="field"><label>Nom (FR)</label><span class="inp focus">Tibia distal|</span></div><div class="field"><label>Nom (EN)</label><span class="inp muted">Distal tibia</span></div></div>
<div class="field" style="position:relative"><label>Catégorie</label><span class="inp focus">${sw(CATS.art.c, CATS.art.o)}Articulations<span class="caret">${ico('up', 'sm')}</span></span>
<div class="menu" style="left:0;right:0;top:62px">${Object.values(CATS).map((c, i) => `<div class="${i === 1 ? 'on' : ''}">${sw(c.c, c.o)}${c.fr}${c.fixed ? `<span class="muted small" style="margin-left:auto">fixe</span>` : ''}</div>`).join('')}<hr><div style="color:var(--color-accent-strong);font-weight:600">${ico('plus', 'sm')}Ajouter une catégorie…</div></div></div>
<div style="height:206px"></div>
<div class="field"><label>Taille du point</label>${slider(42, { mark: 8 })}<span class="small muted" style="display:flex;justify-content:space-between"><span>Petit</span><span>Grand</span></span><span class="small muted">Trait rouge : taille minimale touchable sur mobile.</span></div>
<div style="display:flex;gap:8px"><span class="btn primary sm">Valider le point</span><span class="btn secondary sm">Annuler</span></div>
</div>
<div class="annot"><b>Création :</b> l'outil reste actif pour enchaîner les points. L'apparence vient de la catégorie. Latéralité, zone de constats et région se règlent ensuite dans les propriétés.</div></div>` })
}
</script>
<!-- ================================================================== 03 point modification -->
<div class="row"><div data-board="03-point-modification-desktop">
<p class="sheet-title">3. Modifier un point : glisser sur le dessin, taille au curseur, propriétés ; Annuler / Rétablir sur le dessin</p>
<div id="b03"></div></div></div>
<script>
{
const vb = [1250, 760, 560, 440]
const old = [1464, 918], nw = [1478, 934]
document.getElementById('b03').innerHTML = editor({ body: `
<div class="stage">${toolbar('sel', { redo: false })}
<div class="canvas">${drawing({ w: 700, h: 550, vb, hide: ['Grasset'], extra: u => `<circle cx="${old[0]}" cy="${old[1]}" r="34" fill="none" stroke="#6b6359" stroke-width="${1.5 * u}" stroke-dasharray="${4 * u} ${4 * u}"/><path d="M${old[0]} ${old[1]}L${nw[0]} ${nw[1]}" stroke="#6b6359" stroke-width="${1.2 * u}" stroke-dasharray="${3 * u} ${3 * u}"/><circle cx="${nw[0]}" cy="${nw[1]}" r="40" fill="${CATS.art.c}" fill-opacity="${CATS.art.o}" stroke="${CATS.art.c}" stroke-width="${2 * u}"/><circle cx="${nw[0]}" cy="${nw[1]}" r="${40 + 5 * u}" fill="none" stroke="#1f1b16" stroke-width="${2 * u}"/>${V(nw[0] + 40, nw[1], u, true)}` })}
<div class="hint" style="top:auto;bottom:56px">Glisser le point le déplace ; la poignée sur son bord change sa taille. L'aperçu suit le pointeur, la modification est appliquée au relâchement.</div>
<div class="toast" style="top:12px;bottom:auto;left:auto;right:180px;transform:none">Point « Grasset » déplacé<a>Annuler</a></div>${zoom('250 %')}</div>${keys}</div>
<div class="panel"><div class="pcard" style="gap:10px">
<div class="phead">${ico('point', 'sm')}Point · Grasset<span class="r badge warn">À confirmer</span></div>
<div class="grid2"><div class="field"><label>Nom (FR)</label><span class="inp">Grasset (fémoro-tibiale…</span></div><div class="field"><label>Nom (EN)</label><span class="inp">Stifle (femorotibial…</span></div></div>
<div class="field"><label>Catégorie</label>${catSel('art')}<span class="small muted">Apparence héritée de la catégorie. <a style="text-decoration:underline">Modifier la catégorie</a></span></div>
<div class="field"><label>Taille du point</label>${slider(52, { mark: 8 })}</div>
<div class="field"><label>Latéralité</label><div class="seg"><span>Impaire</span><span class="on">Bilatérale</span><span>Gauche</span><span>Droite</span></div></div>
<div class="field"><label>Zone de constats</label><span class="inp">Grasset<span class="caret">${ico('down', 'sm')}</span></span></div>
<div style="display:flex;gap:8px;align-items:center;flex-wrap:wrap"><span class="btn secondary sm">${ico('check', 'sm')}Marquer comme relu</span><span class="btn dangertxt sm">${ico('trash', 'sm')}Supprimer</span></div>
</div>
<div class="annot"><b>Précision :</b> les flèches du clavier déplacent le point sélectionné ; aucune coordonnée n'est affichée. Le curseur de taille ne descend pas sous le minimum touchable (règle du cœur <span class="mono">marker_too_small</span>).</div></div>` })
}
</script>
<!-- ================================================================== 04 zone creation -->
<div class="row"><div data-board="04-zone-creation-desktop">
<p class="sheet-title">4. Ajouter une zone : outil Zone, un clic par sommet, fermeture sur le premier sommet ou « Terminer »</p>
<div id="b04"></div></div></div>
<script>
{
const vb = [1300, 840, 520, 410]
const p = [[1430, 1060], [1500, 1035], [1585, 1050], [1610, 1110], [1570, 1180]]
const cur = [1470, 1175]
document.getElementById('b04').innerHTML = editor({ body: `
<div class="stage">${toolbar('zone')}
<div class="canvas">${drawing({ w: 700, h: 550, vb, faint: true, extra: u => `<polyline points="${pts(p)}" fill="none" stroke="#b85a3f" stroke-width="${2.5 * u}"/><polygon points="${pts([...p, cur])}" fill="#b85a3f" fill-opacity=".12" stroke="none"/><path d="M${p[4]} L${cur}" stroke="#b85a3f" stroke-width="${2 * u}" stroke-dasharray="${6 * u} ${4 * u}"/><path d="M${cur} L${p[0]}" stroke="#b85a3f" stroke-width="${1.2 * u}" stroke-dasharray="${2 * u} ${4 * u}" opacity=".7"/>${p.map((q, i) => V(q[0], q[1], u, false)).join('')}<circle cx="${p[0][0]}" cy="${p[0][1]}" r="${13 * u}" fill="none" stroke="#b85a3f" stroke-width="${2 * u}"/><path d="M${cur[0]} ${cur[1]}l${14 * u} ${6 * u}l${-6 * u} ${3 * u}l${-3 * u} ${7 * u}z" fill="#1f1b16"/>` })}
<div class="hint">Zone : 5 sommets. Cliquez sur le <b>premier sommet</b> pour fermer, ou <kbd>Entrée</kbd>. <kbd>Retour arrière</kbd> retire le dernier sommet.</div>
<div style="position:absolute;left:96px;bottom:56px;display:flex;gap:8px"><span class="btn primary sm">${ico('check', 'sm')}Terminer la zone</span><span class="btn secondary sm">${ico('undo', 'sm')}Retirer le dernier sommet</span><span class="btn secondary sm">Abandonner</span></div>${zoom('300 %')}</div>${keys}</div>
<div class="panel"><div class="pcard" style="gap:10px">
<div class="phead">${ico('zone', 'sm')}Nouvelle zone<span class="r small muted">en cours de tracé</span></div>
<div class="grid2"><div class="field"><label>Nom (FR)</label><span class="inp">Tibia</span></div><div class="field"><label>Nom (EN)</label><span class="inp">Tibia</span></div></div>
<div class="field"><label>Catégorie</label>${catSel('os')}<a class="s13" style="color:var(--color-accent-strong);font-weight:600;display:flex;gap:4px;align-items:center">${ico('plus', 'sm')}Ajouter une catégorie</a></div>
<div class="notice info">${ico('info', 'sm')}<div>Les autres propriétés se règlent une fois la zone fermée. Pendant le tracé, les annotations existantes sont estompées et ne se sélectionnent pas.</div></div>
</div>
<div class="annot"><b>Fermeture refusée</b> si la zone a moins de 3 sommets ou si son intérieur est trop étroit pour qu'un praticien la touche au doigt : message sous le dessin, le tracé reste ouvert pour être corrigé (planche 12).</div></div>` })
}
</script>
<!-- ================================================================== 05 polygon handles -->
<div class="row"><div data-board="05-zone-poignees-desktop">
<p class="sheet-title">5. Zone sélectionnée : sommets visibles, « + » au milieu des segments, bulle « − » sur le sommet cliqué ; courbes conservées avec leurs points de contrôle</p>
<div id="b05"></div></div></div>
<script>
{
const vb = [800, 345, 345, 282]
const curve = (u) => {
const a = [[560, 300], [820, 420], [800, 470], [540, 345]], c = [[620, 250], [720, 330], [860, 450], [850, 480], [700, 450], [610, 400], [520, 330], [530, 310]]
let s = `<path d="M560 300 C620 250 720 330 820 420 C860 450 850 480 800 470 C700 450 610 400 540 345 C520 330 530 310 560 300Z" fill="${CATS.charn.c}" fill-opacity=".22" stroke="#1f1b16" stroke-width="${2 * u}"/>`
const pairs = [[a[0], c[0]], [a[1], c[1]], [a[1], c[2]], [a[2], c[3]], [a[2], c[4]], [a[3], c[5]], [a[3], c[6]], [a[0], c[7]]]
s += pairs.map(([x, y]) => `<path d="M${x}L${y}" stroke="#3f7d8c" stroke-width="${1.4 * u}"/><rect x="${y[0] - 4 * u}" y="${y[1] - 4 * u}" width="${8 * u}" height="${8 * u}" fill="#3f7d8c" transform="rotate(45 ${y[0]} ${y[1]})"/>`).join('')
s += a.map((q, i) => V(q[0], q[1], u, i === 1)).join('')
return s
}
document.getElementById('b05').innerHTML = editor({ body: `
<div class="stage">${toolbar('sel')}
<div class="canvas">${drawing({ w: 700, h: 550, vb, extra: u => polyEdit(THOR, u, { on: 6 }) })}
<div class="hint" style="top:auto;bottom:56px">Glissez un sommet pour le déplacer · « + » ajoute un sommet au milieu du segment · « − » retire le sommet choisi. Glisser l'intérieur ne déplace rien : utilisez « Déplacer la zone ».</div>${zoom('560 %')}</div>${keys}</div>
<div class="panel"><div class="pcard" style="gap:10px">
<div class="phead">${ico('zone', 'sm')}Zone · Vertèbres thoraciques<span class="r badge ok">Relu</span></div>
<div class="s13 muted">9 sommets · sommet 7 sélectionné</div>
<div style="display:flex;gap:6px;flex-wrap:wrap"><span class="btn secondary sm">${ico('move', 'sm')}Déplacer la zone</span><span class="btn secondary sm">${ico('pen', 'sm')}Redessiner</span></div>
<div class="field"><label>Catégorie</label>${catSel('vert')}</div>
<div class="field"><label>Région vertébrale</label><span class="inp">Thoraciques (T1 à T18)<span class="caret">${ico('down', 'sm')}</span></span></div>
<div class="field"><label>Zone de constats</label><span class="inp">Rachis thoracique<span class="caret">${ico('down', 'sm')}</span></span></div>
</div>
<div class="pcard" style="gap:6px"><div class="phead" style="font-size:13px">Zone à courbes (exemple d'une autre fiche)</div>
<div style="border:1px solid var(--color-border);border-radius:8px;overflow:hidden">${drawing({ w: 310, h: 150, vb: [480, 220, 440, 290], noAnn: true, extra: curve })}</div>
<div class="small muted">Ronds : sommets, comme sur toute zone. Losanges bleus : points de contrôle des courbes, déplaçables. Aucune courbe n'est convertie en segments droits.</div></div></div>` })
}
</script>
<!-- ================================================================== 06 move + redraw -->
<div class="row"><div data-board="06-zone-deplacer-redessiner-desktop">
<p class="sheet-title">6. Déplacer une zone entière (mode explicite) et redessiner une zone (propriétés et liens conservés)</p>
<div id="b06" style="display:flex;gap:20px"></div></div></div>
<script>
{
const vb = [760, 360, 440, 300]
const dx = 28, dy = -22
const moved = THOR.map(q => [q[0] + dx, q[1] + dy])
const redraw = [[835, 430], [900, 470], [985, 488], [1070, 500], [1105, 520]]
const card = (title, tb, canvas, side) => `<div class="frame" style="width:760px;height:620px;display:flex;flex-direction:column;padding:14px;gap:10px"><div class="phead">${title}</div>${tb}<div class="canvas" style="flex:1">${canvas}</div>${side}</div>`
document.getElementById('b06').innerHTML =
card('A. Déplacer la zone', `<div class="toolbar"><span class="tbtn on">${ico('move', 'sm')}Déplacer la zone</span><span class="s13 muted">Glissez n'importe où dans la zone · <span class="kbd" style="border-color:var(--color-border)">Entrée</span> valide · <span class="kbd" style="border-color:var(--color-border)">Échap</span> annule</span><span class="tbtn" style="margin-left:auto">Valider la position</span></div>`,
drawing({ w: 730, h: 470, vb, hide: ['Vertèbres thoraciques'], extra: u => `<polygon points="${pts(THOR)}" fill="none" stroke="#6b6359" stroke-width="${1.5 * u}" stroke-dasharray="${5 * u} ${4 * u}"/><polygon points="${pts(moved)}" fill="${CATS.vert.c}" fill-opacity="${CATS.vert.o}" stroke="#1f1b16" stroke-width="${2 * u}"/><g transform="translate(985 500)"><circle r="${18 * u}" fill="#fff" stroke="#1f1b16" stroke-width="${1.5 * u}"/><path d="M0 ${-11 * u}V${11 * u}M${-11 * u} 0H${11 * u}M0 ${-11 * u}l${-3 * u} ${3 * u}M0 ${-11 * u}l${3 * u} ${3 * u}M0 ${11 * u}l${-3 * u} ${-3 * u}M0 ${11 * u}l${3 * u} ${-3 * u}M${-11 * u} 0l${3 * u} ${-3 * u}M${-11 * u} 0l${3 * u} ${3 * u}M${11 * u} 0l${-3 * u} ${-3 * u}M${11 * u} 0l${-3 * u} ${3 * u}" stroke="#1f1b16" stroke-width="${1.6 * u}" stroke-linecap="round"/></g>` }),
`<div class="notice info">${ico('info', 'sm')}<div>Le mode est explicite pour qu'un glisser accidentel ne déplace jamais une zone, au bureau comme au doigt (hors de ce mode, un doigt hors d'une poignée ne déplace rien). Le contour pointillé montre la position d'origine. Clavier : flèches pour déplacer, Entrée pour valider.</div></div>`) +
card('B. Redessiner la zone', `<div class="toolbar"><span class="tbtn on">${ico('pen', 'sm')}Redessiner · Vertèbres thoraciques</span><span class="s13 muted">5 sommets posés · cliquez le premier pour fermer</span><span class="tbtn" style="margin-left:auto">Abandonner</span></div>`,
drawing({ w: 730, h: 470, vb, hide: ['Vertèbres thoraciques'], faint: true, extra: u => `<polygon points="${pts(THOR)}" fill="${CATS.vert.c}" fill-opacity=".10" stroke="${CATS.vert.c}" stroke-width="${1.5 * u}" stroke-dasharray="${5 * u} ${4 * u}"/><polyline points="${pts(redraw)}" fill="none" stroke="#b85a3f" stroke-width="${2.5 * u}"/>${redraw.map(q => V(q[0], q[1], u)).join('')}<circle cx="${redraw[0][0]}" cy="${redraw[0][1]}" r="${13 * u}" fill="none" stroke="#b85a3f" stroke-width="${2 * u}"/>` }),
`<div class="notice info">${ico('info', 'sm')}<div>Le nouveau tracé remplace l'ancien à la fermeture. Nom, catégorie, région vertébrale, zone de constats et statut de relecture sont conservés ; l'ancien contour reste visible en repère. Un seul « Annuler » rétablit l'ancien tracé. Clavier : Entrée ferme, Retour arrière retire le dernier sommet.</div></div>`)
}
</script>
<!-- ================================================================== 07 categories -->
<div class="row"><div data-board="07-categories-couleurs-desktop">
<p class="sheet-title">7. Catégories et couleurs : volet dépliable de l'onglet Annotations ; Os, Articulations, Vertèbres fixes ; palette, opacité synchronisée, aperçu</p>
<div id="b07"></div></div></div>
<script>
{
const pal = ['#a41e65', '#c0392b', '#ff0000', '#ff9500', '#d4a017', '#1baa08', '#2e8b57', '#3f7d8c', '#1e6fd9', '#5b4bd6', '#e100ff', '#7a3f7d', '#8a6b3f', '#6b6359', '#1f1b16', '#b85a3f']
document.getElementById('b07').innerHTML = editor({ save: 'dirty', body: `
<div class="stage">${toolbar('sel')}
<div class="canvas">${drawing({ w: 600, h: 470, cats: { ...CATS, art: { ...CATS.art, c: '#ff9500', o: .55 } } })}${zoom('Ajusté')}</div>
<div class="s13 muted">Le dessin montre la couleur et l'opacité en cours de réglage, avant « Appliquer ».</div>
<div class="annot"><b>Couleurs :</b> chaque pastille porte son nom (infobulle et lecteur d'écran) ; la catégorie s'affiche au survol et à la sélection, la couleur n'est jamais seule. <b>Modifier</b> (menu « ⋮ ») ouvre le même éditeur que ci-dessus, avec en plus le nom FR et EN. <b>Suppression :</b> même menu. Refusée tant qu'une annotation l'utilise : la liste des annotations s'affiche avec « Réaffecter à… » (règle <span class="mono">has_dependents</span>). Les trois catégories fixes n'ont pas d'action Supprimer.</div></div>
<div class="panel" style="width:420px"><div class="pcard" style="gap:7px;flex:1;min-height:0;overflow:hidden">
<div class="phead">${ico('down', 'sm')}Catégories<span class="r"><span class="btn ghost sm">${ico('close', 'sm')}Replier</span></span></div>
<div class="lrow">${sw(CATS.os.c, CATS.os.o)}<span>Os</span><span class="badge">${ico('lock', 'sm')}Fixe</span><span class="r muted">3 annotations</span>${ico('chevron', 'sm')}</div>
<div style="border:1px solid var(--color-accent);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:9px;background:#fffdfa">
<div class="lrow">${sw('#ff9500', .55, 'lg')}<b>Articulations</b><span class="badge">${ico('lock', 'sm')}Fixe</span><span class="r muted">13 annotations</span></div>
<div class="small muted">Fixe : nom et présence imposés ; couleur et opacité modifiables.</div>
<div class="palette">${pal.map(c => `<span style="background:${c}" class="${c === '#ff9500' ? 'on' : ''}"></span>`).join('')}</div>
<div style="display:grid;grid-template-columns:112px 1fr 64px;gap:8px;align-items:center"><span class="inp">${sw('#ff9500', 1)}#FF9500</span><div title="Opacité du remplissage">${slider(55)}</div><span class="inp focus">55 %</span></div>
<div class="lrow"><span class="small muted">Aperçu</span><svg width="150" height="40" viewBox="0 0 150 40"><rect width="150" height="40" fill="#efe9df" rx="6"/><circle cx="26" cy="20" r="12" fill="#ff9500" fill-opacity=".55" stroke="#ff9500" stroke-width="2"/><polygon points="58,8 120,12 132,30 70,33" fill="#ff9500" fill-opacity=".55" stroke="#ff9500" stroke-width="2"/></svg><span class="r" style="display:flex;gap:6px"><span class="btn secondary sm">Couleur d'origine</span><span class="btn primary sm">Appliquer</span></span></div>
</div>
<div class="lrow">${sw(CATS.vert.c, CATS.vert.o)}<span>Vertèbres</span><span class="badge">${ico('lock', 'sm')}Fixe</span><span class="r muted">5 annotations</span>${ico('chevron', 'sm')}</div>
<div class="lrow" style="padding-left:26px"><a class="s13" style="color:var(--color-accent-strong);font-weight:600;display:flex;gap:4px;align-items:center">${ico('spine', 'sm')}Configurer les régions vertébrales (5)</a></div>
<div style="border-top:1px solid var(--color-border);padding-top:6px" class="small muted">Catégories de la fiche</div>
<div class="lrow">${sw(CATS.charn.c, CATS.charn.o)}<span>Charnières vertébrales</span><span class="r muted">4 annotations</span>${ico('dots', 'sm')}</div>
<div class="lrow" style="position:relative">${sw(CATS.crane.c, CATS.crane.o)}<span>Os du crâne</span><span class="r muted">5 annotations</span><span style="background:var(--color-surface-strong);border-radius:6px;display:grid;place-items:center;width:24px;height:24px">${ico('dots', 'sm')}</span>
<div class="menu" style="right:30px;top:4px;width:190px"><div class="on">${ico('pen', 'sm')}Modifier</div><div style="color:var(--color-danger-strong)">${ico('trash', 'sm')}Supprimer…</div></div></div>
<div style="border:1px dashed var(--color-border);border-radius:10px;padding:8px 10px;display:flex;flex-direction:column;gap:6px"><div class="small" style="font-weight:600">Nouvelle catégorie</div>
<div class="grid2"><span class="inp"><span class="small muted">FR</span>Ligaments</span><span class="inp"><span class="small muted">EN</span>Ligaments</span></div>
<div class="lrow"><div class="palette" style="grid-template-columns:repeat(8,20px);gap:5px">${pal.slice(0, 8).map(c => `<span style="background:${c};height:20px" class="${c === '#3f7d8c' ? 'on' : ''}"></span>`).join('')}</div><span class="small muted">35 %</span><span class="r btn primary sm">Ajouter</span></div></div>
</div></div>` })
}
</script>
<!-- ================================================================== 08 detail view -->
<div class="row"><div data-board="08-vue-detaillee-creation-desktop">
<p class="sheet-title">8. Créer une vue détaillée : tracer un rectangle sur le dessin, nom FR/EN proposé, cadrage dérivé du même SVG, accès ajouté sur la vue principale</p>
<div id="b08" style="display:flex;gap:20px;align-items:flex-start"></div></div></div>
<script>
{
const r = [650, 1120, 230, 300]
const mask = (u) => `<path d="M0 0H${W}V${H}H0Z M${r[0]} ${r[1]}v${r[3]}h${r[2]}v${-r[3]}Z" fill="rgba(31,27,22,.45)" fill-rule="evenodd"/><rect x="${r[0]}" y="${r[1]}" width="${r[2]}" height="${r[3]}" fill="none" stroke="#fff" stroke-width="${2.5 * u}"/><rect x="${r[0]}" y="${r[1]}" width="${r[2]}" height="${r[3]}" fill="none" stroke="#b85a3f" stroke-width="${2.5 * u}" stroke-dasharray="${8 * u} ${6 * u}"/>` + [[0, 0], [1, 0], [0, 1], [1, 1]].map(([a, b]) => `<rect x="${r[0] + a * r[2] - 6 * u}" y="${r[1] + b * r[3] - 6 * u}" width="${12 * u}" height="${12 * u}" fill="#fff" stroke="#1f1b16" stroke-width="${2 * u}"/>`).join('')
const crop = drawing({ w: 150, h: 196, vb: r })
document.getElementById('b08').innerHTML = editor({ save: 'dirty', body: `
<div class="stage">${toolbar('crop')}
<div class="canvas">${drawing({ w: 700, h: 550, extra: mask })}
<div class="hint" style="max-width:300px">Tracez un rectangle autour de la région à détailler. Les poignées d'angle ajustent le cadre avant de valider.</div>
<div class="pop" style="left:306px;top:56px;width:396px">
<div class="phead">${ico('crop', 'sm')}Nouvelle vue détaillée</div>
<div style="display:flex;gap:12px"><div style="border:1px solid var(--color-border);border-radius:8px;overflow:hidden;flex:none">${crop}</div>
<div style="display:flex;flex-direction:column;gap:8px;min-width:0;flex:1">
<div class="field"><label>Nom (FR) <span class="badge accent">Proposé</span></label><span class="inp focus">Coude, carpe et boulet</span></div>
<div class="field"><label>Nom (EN) <span class="badge accent">Proposé</span></label><span class="inp">Elbow, carpus and fetlock</span></div>
<div class="small muted">Proposé d'après les annotations comprises dans le cadre ; modifiable.</div></div></div>
<div class="lrow"><span class="sw" style="background:#1f1b16;border-radius:4px;display:grid;place-items:center;color:#fff">${ico('check', 'sm')}</span><span class="s13">Ajouter l'accès sur la vue « Vue latérale gauche » (le rectangle tracé, modifiable ensuite)</span></div>
<div style="display:flex;gap:8px"><span class="btn primary sm">Créer la vue</span><span class="btn secondary sm">Ajuster le cadre</span><span class="btn ghost sm">Annuler</span></div></div>${zoom('Ajusté')}</div>${keys}</div>
<div class="panel" style="width:300px;position:relative"><div class="pcard"><div class="phead">Vues</div>
<div class="lrow"><span class="thumb">${drawing({ w: 54, h: 40, noAnn: true })}</span><span><b>Vue latérale gauche</b><br><span class="small muted">Vue principale</span></span></div>
<div class="lrow" style="background:var(--color-surface-strong);border-radius:8px;padding:4px 6px"><span class="thumb">${drawing({ w: 54, h: 40, vb: [60, 100, 500, 380], view: 'head' })}</span><span>Tête<br><span class="small muted">Vue détaillée, cadrage</span></span><span class="r">${ico('dots', 'sm')}</span></div>
</div>
<div class="small" style="position:absolute;left:4px;top:160px;font-weight:600">Autre état : menu « ⋮ » d'une vue</div><div class="menu" style="left:0;top:182px;width:300px"><div>${ico('pen', 'sm')}Renommer</div><div>${ico('crop', 'sm')}Recadrer sur le dessin</div><div class="on">${ico('image', 'sm')}Remplacer par un SVG spécifique…</div><div>${ico('eye', 'sm')}Ouvrir la vue</div><hr><div style="color:var(--color-danger-strong)">${ico('trash', 'sm')}Supprimer la vue</div></div>
<div class="annot" style="margin-top:238px"><b>Remplacer par un SVG spécifique :</b> téléversement et nettoyage habituels. Aujourd'hui les coordonnées sont gardées telles quelles et relues dans l'espace du nouveau dessin : les annotations peuvent se retrouver décalées. Proposé : les transposer du cadre au nouveau dessin, les passer « À confirmer » et les lister pour vérification.</div></div>` })
+ `<div class="vign" style="width:520px"><div class="lbl">Après « Créer la vue » : la vue s'ouvre, prête à annoter</div>
<div class="frame" style="padding:12px;display:flex;flex-direction:column;gap:8px"><div class="lrow"><span class="chip on">${ico('layers', 'sm')}Coude, carpe et boulet</span><span class="small muted">Vue détaillée · cadrage de « Vue latérale gauche »</span></div>
<div class="canvas" style="height:560px;flex:none">${drawing({ w: 400, h: 520, vb: [r[0] - 10, r[1] - 10, r[2] + 20, r[3] + 20], links: false })}</div>
<div class="s13 muted">Même dessin que la vue principale, recadré : traits, dégradés et définitions intacts, qualité vectorielle conservée. Les annotations déjà présentes dans le cadre apparaissent ; celles ajoutées ici n'appartiennent qu'à cette vue.</div></div></div>`
}
</script>
<!-- ================================================================== 09 vertebral regions -->
<div class="row"><div data-board="09-regions-vertebrales-desktop">
<p class="sheet-title">9. Configurer les régions vertébrales : depuis la catégorie Vertèbres, plus d'onglet autonome ; régions, codes, nombres, plages et règles du modèle</p>
<div id="b09"></div></div></div>
<script>
{
const R = [['C', 'Cervicales', 'Cervical', 7, '', 1], ['T', 'Thoraciques', 'Thoracic', 18, '17 à 19', 1], ['L', 'Lombaires', 'Lumbar', 7, '5 à 6', 1, 'err'], ['S', 'Sacrales', 'Sacral', 5, '', 1], ['Cd', 'Caudales', 'Caudal', 18, '15 à 21', 1]]
const rows = R.map(([c, fr, en, n, rg, used, err]) => `<tr><td class="muted">${ico('grip', 'sm')}</td><td><span class="inp" style="width:56px">${c}</span></td><td><span class="inp">${fr}</span></td><td><span class="inp">${en}</span></td><td><span class="inp ${err ? 'focus' : ''}" style="width:64px;${err ? 'border-color:#c0392b;box-shadow:0 0 0 3px rgba(192,57,43,.15)' : ''}">${n}</span></td><td><span class="inp" style="width:110px">${rg || '<span class="muted">—</span>'}</span></td><td class="small muted">${used} zone</td><td><span class="muted" title="Utilisée : suppression impossible">${ico('lock', 'sm')}</span></td></tr>` + (err ? `<tr><td></td><td colspan="7" style="color:var(--color-danger-strong);font-size:12px;border-bottom:1px solid var(--color-border)">${ico('alert', 'sm')} Le nombre de vertèbres lombaires (7) sort de la plage 5 à 6. Corrigez le nombre ou la plage.</td></tr>` : '')).join('')
document.getElementById('b09').innerHTML = editor({ save: 'dirty', body: `
<div class="stage">${toolbar('sel')}<div class="canvas">${drawing({ w: 640, h: 540 })}</div></div>
<div class="panel"><div class="pcard"><div class="phead">${ico('down', 'sm')}Catégories</div>${catList()}</div></div>`,
overlay: `<div class="dialog-wrap"><div class="dialog" style="width:860px">
<div class="phead" style="font-size:17px">${ico('spine')}Régions vertébrales<span class="r">${ico('close')}</span></div>
<div class="s13 muted">Les zones de la catégorie Vertèbres se rattachent à une région. Le praticien choisit ensuite les vertèbres touchées dans la plage de la région (C1 à C7, T1 à T18…).</div>
<table class="t"><thead><tr><th></th><th>Code</th><th>Nom (FR)</th><th>Nom (EN)</th><th>Nombre</th><th>Plage tolérée</th><th>Utilisée par</th><th></th></tr></thead><tbody>${rows}</tbody></table>
<div style="display:flex;gap:8px;align-items:center"><span class="btn secondary sm">${ico('plus', 'sm')}Ajouter une région</span><span class="s13 muted">Glisser la poignée ou <span class="kbd" style="border-color:var(--color-border)">Alt</span>+flèches pour l'ordre crânio-caudal.</span></div>
<div class="notice info">${ico('info', 'sm')}<div>Règles conservées du modèle : code unique (16 caractères au plus, lettres et chiffres, puis aussi tiret et tiret bas), nombre entier positif, nombre compris dans la plage quand elle existe, ordre affiché aux praticiens. Une région utilisée par une zone ne se supprime pas : détachez d'abord la zone.</div></div>
<div style="display:flex;gap:8px;justify-content:flex-end"><span class="btn secondary">Annuler</span><span class="btn primary" disabled>Appliquer (1 erreur)</span></div></div></div>` })
}
</script>
<!-- ================================================================== 10 général -->
<div class="row"><div data-board="10-general-desktop">
<p class="sheet-title">10. Onglet Général simplifié : identité de la fiche, périmètre et limites à partir d'un texte commun, attribution ; réglages techniques repliés</p>
<div id="b10"></div></div></div>
<script>
{
const common = "Les éléments listés relèvent du périmètre légal de l'ostéopathie animale : dysfonctions ostéopathiques palpées, observations cliniques et motifs de consultation rapportés. Aucun diagnostic médical n'est posé. Toute pathologie organique relève du vétérinaire."
const own = "Cadre légal : art. L. 243-3 12° et R. 243-6 du Code rural et de la pêche maritime. Conformément à l'art. R. 243-8, le propriétaire est orienté vers un vétérinaire lorsque les symptômes ou lésions nécessitent un diagnostic ou un traitement médical, persistent ou s'aggravent."
document.getElementById('b10').innerHTML = editor({ tab: 'Général', save: 'saved', body: `
<div style="flex:1;display:grid;grid-template-columns:1fr 1fr;gap:12px;overflow:hidden;align-content:start">
<div class="pcard"><div class="phead" style="font:400 17px var(--font-serif)">Identité de la fiche</div>
<div class="grid2"><div class="field"><label>Nom (FR)</label><span class="inp">Cheval, squelette et rachis</span></div><div class="field"><label>Nom (EN)</label><span class="inp">Horse, skeleton and spine</span></div></div>
<div class="field"><label>Espèce</label><span class="inp" style="background:var(--color-surface-strong)">Cheval ${ico('lock', 'sm')}</span></div>
<div class="field"><label>Description (FR)</label><span class="inp area" style="min-height:44px">Fiche anatomique officielle Faunosteo du cheval (Equus caballus)</span></div>
<div class="field"><label>Description (EN)</label><span class="inp area" style="min-height:40px">Official Faunosteo anatomical sheet of the horse (Equus caballus)</span></div></div>
<div class="pcard"><div class="phead" style="font:400 17px var(--font-serif)">Attribution</div>
<div class="field"><label>Auteurs</label><span class="inp"><span class="chip" style="height:24px">Faunosteo ${ico('close', 'sm')}</span><span class="muted s13">Ajouter un auteur</span></span></div>
<div class="field"><label>Licence</label><span class="inp muted">Aucune</span></div>
<div class="field"><label>Notes</label><span class="inp area" style="min-height:48px">Import des données historiques</span></div>
<div class="lrow" style="border-top:1px solid var(--color-border);padding-top:8px">${ico('chevron', 'sm')}<span class="s13">Informations techniques</span><span class="r small muted">révision 11 · 0,41 Mo sur 2 Mo</span></div></div>
<div class="pcard" style="grid-column:1 / span 2"><div class="phead" style="font:400 17px var(--font-serif)">Périmètre et limites<span class="r"><span class="badge">FR</span> <span class="badge" style="opacity:.6">EN</span></span></div>
<div class="notice info">${ico('copy', 'sm')}<div>Ce texte part du <b>texte commun Faunosteo</b> (version du 05/11/2026). Une nouvelle version du texte commun est signalée ici et ne s'applique qu'après votre accord ; les précisions propres à cette fiche ne sont jamais effacées.</div></div>
<div style="display:grid;grid-template-columns:1fr 1fr;gap:12px">
<div class="field"><label>Texte commun <span class="muted" style="font-weight:400">(non modifiable ici)</span></label><span class="inp area" style="background:var(--color-surface-strong);min-height:98px">${common}</span></div>
<div class="field"><label>Précisions propres à cette fiche <span class="muted" style="font-weight:400">(légales ou anatomiques)</span></label><span class="inp area" style="min-height:98px">${own}</span></div></div>
<div style="display:flex;gap:8px;align-items:center"><span class="btn secondary sm">${ico('eye', 'sm')}Voir le texte tel que le lira le praticien</span><span class="s13 muted">Le praticien lit un seul texte : la partie commune puis les précisions.</span></div></div>
</div>`, errs: '2 erreurs' })
}
</script>
<!-- ================================================================== 11 constats + references -->
<div class="row"><div data-board="11-constats-references-desktop">
<p class="sheet-title">11. Références en accès secondaire : volet latéral ouvert depuis l'en-tête ou depuis un constat qui les cite (ici sur l'onglet Constats)</p>
<div id="b11"></div></div></div>
<script>
{
const tree = [['Rachis thoracique', 0], ['Dysfonctions', 1], ['Restriction de mobilité', 2], ['Hypomobilité en extension', 3, 1], ['Tension paravertébrale', 3], ['Motifs de consultation', 1], ['Grasset', 0]]
const refs = [['Livre', 'Barone R., Anatomie comparée des mammifères domestiques, t. 1, Ostéologie', 3], ['Livre', 'Denoix J.-M., Biomécanique et gymnastique du cheval', 2], ['Texte légal', 'Code rural et de la pêche maritime, art. L. 243-3 et R. 243-6 à R. 243-8', 1], ['Revue', 'Haussler K. K., Equine chiropractic: general principles…', 4]]
document.getElementById('b11').innerHTML = editor({ tab: 'Constats', save: 'saved', body: `
<div class="pcard" style="flex:1;min-width:0">${tree.map(([n, d, sel]) => `<div class="lrow" style="padding-left:${d * 22}px;${sel ? 'background:var(--color-surface-strong);border-radius:8px' : ''}">${ico(d < 3 ? 'down' : 'chevron', 'sm')}${n}${sel ? `<span class="r badge accent" style="outline:2px solid var(--color-accent);outline-offset:1px">${ico('book', 'sm')}2 références</span>` : ''}</div>`).join('')}</div>`,
overlay: `<div style="position:absolute;inset:0;background:rgba(31,27,22,.25)"></div><div style="position:absolute;right:0;top:0;bottom:0;width:430px;background:var(--color-surface);border-left:1px solid var(--color-border);box-shadow:-10px 0 30px rgba(31,27,22,.15);padding:16px 18px;display:flex;flex-direction:column;gap:10px">
<div class="phead" style="font:400 19px var(--font-serif)">${ico('book')}Références<span class="r">${ico('close')}</span></div>
<div class="lrow"><span class="chip on">Citées par « Hypomobilité en extension » (2)</span><a class="s13" style="text-decoration:underline">Tout afficher (48)</a></div><div class="small muted">Ouvert depuis le constat sélectionné. Les références n'apparaissent pas sur le dessin.</div>
<div class="inp">${ico('search', 'sm')}<span class="muted s13">Rechercher une référence</span></div>
${refs.slice(0, 2).map(([t, c, n]) => `<div class="pcard" style="padding:10px 12px;gap:4px"><div class="lrow" style="min-height:0"><span class="badge">${t}</span><span class="r small muted">citée ${n} fois</span></div><div class="s13">${c}</div></div>`).join('')}
<span class="btn secondary sm" style="align-self:flex-start">${ico('plus', 'sm')}Ajouter une référence</span></div>` })
}
</script>
<!-- ================================================================== 12 states -->
<div class="row"><div data-board="12-etats-desktop">
<p class="sheet-title">12. États : enregistrement, refus d'une modification sur le dessin, lecture seule, récupération locale</p>
<div id="b12" style="display:grid;grid-template-columns:repeat(2,640px);gap:20px"></div></div></div>
<script>
{
const strip = (inner) => `<div class="frame" style="padding:10px 14px;display:flex;align-items:center;gap:10px"><h1 class="page" style="font-size:18px">Brouillon, version 4</h1><span class="badge">Brouillon</span><span style="margin-left:auto;display:flex;gap:8px;align-items:center">${inner}</span></div>`
const saves = `<div class="vign"><div class="lbl">A. Enregistrement (en-tête)</div>
${strip(save('dirty'))}${strip(save('saving'))}${strip(save('saved'))}
${strip(`<span class="s13" style="color:var(--color-danger-strong);display:flex;gap:6px;align-items:center">${ico('cloud-off', 'sm')}Échec de l'enregistrement</span><span class="btn primary sm">Réessayer</span>`)}
<div class="notice error">${ico('alert', 'sm')}<div><b>L'enregistrement n'a pas abouti</b> (connexion interrompue). Vos modifications restent dans ce navigateur ; réessayez quand la connexion revient.</div></div>
${strip(`<span class="s13" style="color:#b45309;display:flex;gap:6px;align-items:center">${ico('alert', 'sm')}Une autre session a enregistré la révision 12</span><span class="btn secondary sm">Voir les choix</span>`)}
<div class="small muted">Le conflit ouvre la boîte de dialogue existante (garder mes modifications sur la révision 12 ou recharger).</div></div>`
const vb = [790, 380, 360, 230]
const p2 = THOR.map((q, i) => i === 6 ? [800, 372] : q)
const refuse = `<div class="vign"><div class="lbl">B. Modifications refusées sur le dessin</div>
<div class="frame" style="padding:10px"><div class="canvas" style="height:250px">${drawing({ w: 600, h: 240, vb, hide: ['Vertèbres thoraciques'], extra: u => `<polygon points="${pts(THOR)}" fill="${CATS.vert.c}" fill-opacity="${CATS.vert.o}" stroke="#1f1b16" stroke-width="${2 * u}"/><path d="M${p2[6]}L${THOR[6]}" stroke="#c0392b" stroke-width="${1.5 * u}" stroke-dasharray="${4 * u} ${3 * u}"/><circle cx="${p2[6][0]}" cy="${p2[6][1]}" r="${8 * u}" fill="none" stroke="#c0392b" stroke-width="${2 * u}"/>${THOR.map(q => V(q[0], q[1], u)).join('')}` })}
<div class="toast err">${ico('alert', 'sm')}Ce sommet sortirait du cadre du dessin : il revient à sa place.</div></div></div>
<div class="notice error">${ico('alert', 'sm')}<div><b>L'intérieur de cette zone deviendrait trop étroit pour qu'un praticien la touche au doigt.</b> Le déplacement est annulé ; écartez les sommets ou agrandissez la zone.</div></div>
<div class="notice info">${ico('info', 'sm')}<div>Sur une zone de 3 sommets, la bulle « − » est grisée : « Une zone garde au moins 3 sommets. »</div></div>
<div class="small muted">Règle commune : le dessin montre l'aperçu pendant le geste ; au relâchement, le cœur accepte ou refuse, et un refus remet la forme précédente avec la raison, sans rien enregistrer.</div></div>`
const ro = `<div class="vign"><div class="lbl">C. Lecture seule : brouillon soumis à la revue</div>
<div class="frame" style="display:flex;flex-direction:column"><div class="ehead" style="padding:12px 14px 0"><h1 class="page" style="font-size:18px">Brouillon, version 4</h1><span class="badge">${ico('lock', 'sm')}Lecture seule</span><span class="badge accent">En revue n° 2</span></div>
<div style="padding:10px 14px;display:flex;flex-direction:column;gap:8px">
<div class="notice info">${ico('lock', 'sm')}<div>Ce brouillon est en revue : il ne se modifie plus. Pour le modifier, retirez la soumission depuis l'onglet Vérification.</div></div>
<div class="toolbar"><span class="tbtn on">${ico('cursor', 'sm')}Sélectionner</span><span class="tbtn" disabled>${ico('point', 'sm')}Ajouter un point</span><span class="tbtn" disabled>${ico('zone', 'sm')}Ajouter une zone</span><span class="tbtn" disabled>${ico('crop', 'sm')}Créer une vue détaillée</span></div>
<div class="canvas" style="height:250px">${drawing({ w: 600, h: 240, vb: [700, 300, 1000, 400] })}</div>
<div class="small muted">La sélection montre les propriétés sans poignées. Même présentation quand le compte n'a pas le droit de modifier.</div></div></div></div>`
const rec = `<div class="vign"><div class="lbl">D. Récupération locale et cœur indisponible</div>
<div class="notice warn">${ico('clock', 'sm')}<div><b>Des modifications non enregistrées de ce brouillon ont été retrouvées dans ce navigateur</b> (05/11/2026 à 14:20, révision 11). <span style="display:inline-flex;gap:8px;margin-top:6px"><span class="btn primary sm">Restaurer</span><span class="btn secondary sm">Ignorer</span></span><br><span class="small muted">L'éditeur reste en lecture seule tant que vous n'avez pas choisi. « Ignorer » demande confirmation, puis supprime la copie locale.</span></div></div>
<div class="notice error">${ico('alert', 'sm')}<div><b>Le moteur de l'éditeur n'a pas pu démarrer.</b> Le dessin reste consultable ; aucune modification n'est possible. <a style="text-decoration:underline">Réessayer</a></div></div>
<div class="notice info">${ico('info', 'sm')}<div><b>Vue sans dessin mesurable :</b> « Ajoutez un dessin à cette vue pour y placer des annotations. » Les outils Point, Zone et Vue détaillée restent grisés.</div></div></div>`
document.getElementById('b12').innerHTML = saves + refuse + ro + rec
}
</script>
<!-- ================================================================== 13 tablet -->
<div class="row"><div data-board="13-tablette-tactile">
<p class="sheet-title">13. Tablette 1 180 px (au doigt) : poignées agrandies, zones de contact de 44 px, mêmes outils ; deux doigts pour zoomer et déplacer le dessin</p>
<div id="b13"></div></div></div>
<script>
{
const vb = [790, 380, 360, 230]
document.getElementById('b13').innerHTML = `<div class="frame tab-frame"><div class="top" style="padding:0 16px">${ico('menu')}<span class="crumb">Fiches officielles › Cheval › <b>Brouillon, version 4</b></span><span class="me"><span class="btn secondary">${ico('book', 'sm')}Références</span><span class="btn secondary">${ico('eye', 'sm')}Prévisualiser</span>${save('dirty')}</span></div>
${tabs('Annotations')}
<div class="work" style="padding:10px 14px">
<div class="stage">
<div class="toolbar"><span class="btn lg on">${ico('cursor')}Sélectionner</span><span class="btn lg secondary">${ico('point')}Point</span><span class="btn lg secondary">${ico('zone')}Zone</span><span class="btn lg secondary">${ico('crop')}Vue détaillée</span></div>
<div class="canvas">${drawing({ w: 760, h: 520, vb, extra: u => polyEdit(THOR, u, { on: 6, big: true }) + HIT(THOR[2][0], THOR[2][1], u) })}
<div class="hint">Un doigt sur une poignée : la déplacer. Un doigt ailleurs : rien ne bouge. Deux doigts : zoom et déplacement du dessin.</div>${bigPills('560 %')}</div></div>
<div class="panel" style="width:300px"><div class="pcard"><div class="phead">${ico('zone', 'sm')}Vertèbres thoraciques</div>
<span class="btn lg secondary">${ico('move')}Déplacer la zone</span><span class="btn lg secondary">${ico('pen')}Redessiner</span>
<div class="field"><label>Catégorie</label>${catSel('vert')}</div><div class="field"><label>Région vertébrale</label><span class="inp">Thoraciques (T1 à T18)<span class="caret">${ico('down', 'sm')}</span></span></div><div class="field"><label>Zone de constats</label><span class="inp">Rachis thoracique<span class="caret">${ico('down', 'sm')}</span></span></div><span class="btn lg dangertxt">${ico('trash')}Supprimer la zone</span></div>
<div class="annot"><b>Tailles :</b> sommet 18 px de diamètre visible, « + » 24 px, bulle « − » 44 × 36 px ; chaque poignée réagit dans un cercle de 44 px (pointillé orange sur le 3e sommet). Quand deux poignées se chevauchent, la plus proche du doigt gagne et une loupe s'affiche au-dessus du doigt.</div></div></div></div>`
}
</script>
<!-- ================================================================== 14 phone editing -->
<div class="row"><div data-board="14-telephone-edition">
<p class="sheet-title">14. Téléphone 375 px, proposition d'édition au doigt (demande de revenir sur O14 A) : zone et poignées, point et taille, vue détaillée, état réduit</p>
<div id="b14" style="display:flex;gap:22px"></div></div></div>
<script>
{
const ptop = (t) => `<div class="ph-top">${ico('menu')}<b style="font-weight:600">${t}</b><span style="margin-left:auto" class="btn primary sm">Enregistrer</span></div>`
const ptabs = `<div class="tabs" style="padding:0;margin:0;justify-content:space-around"><a class="" style="padding:9px 6px;font-size:13px">Général</a><a class="on" style="padding:9px 6px;font-size:13px">Annotations</a><a style="padding:9px 6px;font-size:13px">Constats</a><a style="padding:9px 6px;font-size:13px">Vérif. <span class="badge danger">2</span></a></div>`
const tools = (on) => `<div class="ptools">${[['sel', 'cursor', 'Sélectionner'], ['point', 'point', 'Point'], ['zone', 'zone', 'Zone'], ['crop', 'crop', 'Vue détaillée']].map(([k, i, l]) => `<span class="${k === on ? 'on' : ''}">${ico(i, 'lg')}${l}</span>`).join('')}</div>`
const pill = `<div style="position:absolute;right:8px;top:8px;display:flex;gap:4px;background:var(--color-surface);border:1px solid var(--color-border);border-radius:10px;padding:2px;z-index:3"><span style="width:44px;height:44px;display:grid;place-items:center">${ico('undo')}</span><span style="width:44px;height:44px;display:grid;place-items:center;opacity:.4">${ico('redo')}</span></div>`
const phone = (body) => `<div class="frame phone">${body.replace('<div class="ph-body">', '<div class="ph-body">' + pill)}</div>`
window.PH = { ptop, ptabs, tools, phone }
const vb = [790, 380, 360, 230]
const a = phone(ptop('Brouillon v4') + ptabs + `<div class="ph-body"><div style="flex:1;display:flex;align-items:flex-start;justify-content:center;background:#fff">${drawing({ w: 359, h: 300, vb: [805, 335, 330, 276], extra: u => polyEdit(THOR, u, { on: 6, big: true, minSeg: 70 }) })}</div>
<div class="sheet" style="height:300px"><div class="grab"></div><div class="lrow"><b>${ico('zone', 'sm')} Vertèbres thoraciques</b><span class="r badge ok">Relu</span></div>
<div class="grid2"><span class="btn lg secondary">${ico('move')}Déplacer</span><span class="btn lg secondary">${ico('pen')}Redessiner</span></div>
<div class="field"><label>Catégorie</label>${catSel('vert')}</div>
<span class="btn secondary sm" style="align-self:flex-start">${ico('up', 'sm')}Toutes les propriétés</span><div class="small muted">« + » n'apparaît que sur les segments assez longs pour être touchés ; zoomez pour les autres. Le panneau se tire ou s'ouvre par ce bouton.</div></div></div>` + tools('sel'))
const np = [1505, 1030]
const b = phone(ptop('Brouillon v4') + ptabs + `<div class="ph-body"><div style="flex:1;background:#fff;display:flex;justify-content:center">${drawing({ w: 359, h: 290, vb: [1340, 860, 330, 270], extra: u => `<circle cx="${np[0]}" cy="${np[1]}" r="30" fill="${CATS.art.c}" fill-opacity="${CATS.art.o}" stroke="${CATS.art.c}" stroke-width="${2 * u}"/><circle cx="${np[0]}" cy="${np[1]}" r="${30 + 5 * u}" fill="none" stroke="#1f1b16" stroke-width="${2 * u}" stroke-dasharray="${5 * u} ${4 * u}"/>` })}</div>
<div class="sheet" style="height:372px"><div class="grab"></div><div class="lrow"><b>${ico('point', 'sm')} Nouveau point</b></div>
<div class="field"><label>Nom (FR)</label><span class="inp">Tibia distal</span></div>
<div class="field"><label>Catégorie</label><div style="display:flex;gap:6px;flex-wrap:wrap">${['os', 'art', 'vert'].map(k => `<span class="chip ${k === 'art' ? 'on' : ''}" style="height:36px">${sw(CATS[k].c, CATS[k].o)}${CATS[k].fr}</span>`).join('')}<span class="chip" style="height:36px;color:var(--color-accent-strong)">${ico('plus', 'sm')}Ajouter</span></div></div>
<div class="field"><label>Taille du point</label>${slider(42, { mark: 8 })}</div>
<span class="btn primary lg">Valider le point</span></div></div>` + tools('point'))
const r = [650, 1120, 230, 300]
const c = phone(ptop('Brouillon v4') + ptabs + `<div class="ph-body"><div style="flex:1;background:#fff;display:flex;justify-content:center">${drawing({ w: 359, h: 300, vb: [480, 980, 560, 560], extra: u => `<path d="M0 0H${W}V${H}H0Z M${r[0]} ${r[1]}v${r[3]}h${r[2]}v${-r[3]}Z" fill="rgba(31,27,22,.45)" fill-rule="evenodd"/><rect x="${r[0]}" y="${r[1]}" width="${r[2]}" height="${r[3]}" fill="none" stroke="#b85a3f" stroke-width="${2.5 * u}" stroke-dasharray="${8 * u} ${6 * u}"/>` + [[0, 0], [1, 0], [0, 1], [1, 1]].map(([a, b]) => `<circle cx="${r[0] + a * r[2]}" cy="${r[1] + b * r[3]}" r="${10 * u}" fill="#fff" stroke="#1f1b16" stroke-width="${2 * u}"/>`).join('') })}</div>
<div class="sheet" style="height:310px"><div class="grab"></div><div class="lrow"><b>${ico('crop', 'sm')} Nouvelle vue détaillée</b></div>
<div class="field"><label>Nom (FR) <span class="badge accent">Proposé</span></label><span class="inp">Coude, carpe et boulet</span></div>
<div class="field"><label>Nom (EN) <span class="badge accent">Proposé</span></label><span class="inp">Elbow, carpus and fetlock</span></div>
<div class="s13">${ico('check', 'sm')} Ajouter l'accès sur la vue principale</div>
<span class="btn primary lg">Créer la vue</span></div></div>` + tools('crop'))
const d = phone(ptop('Brouillon v4') + ptabs + `<div class="ph-body"><div style="flex:1;background:#fff;display:flex;align-items:center;justify-content:center">${drawing({ w: 359, h: 282 })}</div>
<div class="sheet" style="height:118px"><div class="grab"></div><div class="lrow"><b>Vue latérale gauche</b><span class="r small muted">18 annotations</span></div><div style="display:flex;gap:6px"><span class="btn secondary sm">${ico('layers', 'sm')}Vues</span><span class="btn secondary sm">Catégories</span><span class="btn secondary sm">${ico('book', 'sm')}Références</span></div></div></div>` + tools('sel'))
document.getElementById('b14').innerHTML = [['A. Zone sélectionnée', a], ['B. Point et taille', b], ['C. Vue détaillée', c], ['D. Rien de sélectionné', d]].map(([l, h]) => `<div class="vign"><div class="lbl">${l}</div>${h}</div>`).join('')
}
</script>
<!-- ================================================================== 15 phone categories / regions / states -->
<div class="row"><div data-board="15-telephone-categories-etats">
<p class="sheet-title">15. Téléphone 375 px : catégories et couleur, régions vertébrales, lecture seule selon la règle actuelle (O14 A)</p>
<div id="b15" style="display:flex;gap:22px"></div></div></div>
<script>
{
const phone = (body) => `<div class="frame phone">${body}</div>`
const pal = ['#a41e65', '#c0392b', '#ff0000', '#ff9500', '#d4a017', '#1baa08', '#2e8b57', '#3f7d8c', '#1e6fd9', '#5b4bd6', '#e100ff', '#7a3f7d', '#8a6b3f', '#6b6359', '#1f1b16', '#b85a3f']
const a = phone(`<div class="ph-top">${ico('close')}<b style="font-weight:600">Catégories</b></div><div class="ph-body" style="padding:12px;gap:10px;overflow:hidden">
${Object.entries(CATS).map(([k, c]) => k === 'art' ? `<div style="border:1px solid var(--color-accent);border-radius:12px;padding:10px;display:flex;flex-direction:column;gap:9px"><div class="lrow">${sw('#ff9500', .55, 'lg')}<b>Articulations</b><span class="badge">${ico('lock', 'sm')}Fixe</span></div>
<div class="palette" style="grid-template-columns:repeat(8,1fr);gap:6px">${pal.map(x => `<span style="background:${x};height:32px" class="${x === '#ff9500' ? 'on' : ''}"></span>`).join('')}</div>
<div class="grid2"><span class="inp">#FF9500</span><span class="inp">55 %</span></div>${slider(55)}<div class="lrow"><span class="small muted">Aperçu</span><svg width="120" height="32" viewBox="0 0 150 40"><rect width="150" height="40" fill="#efe9df" rx="6"/><circle cx="26" cy="20" r="12" fill="#ff9500" fill-opacity=".55" stroke="#ff9500" stroke-width="2"/><polygon points="58,8 120,12 132,30 70,33" fill="#ff9500" fill-opacity=".55" stroke="#ff9500" stroke-width="2"/></svg><span class="r btn primary">Appliquer</span></div></div>` : `<div class="lrow" style="min-height:44px">${sw(c.c, c.o, 'lg')}${c.fr}${c.fixed ? `<span class="badge">${ico('lock', 'sm')}Fixe</span>` : ''}<span class="r">${ico('chevron', 'sm')}</span></div>`).join('')}
<span class="btn secondary lg">${ico('plus')}Ajouter une catégorie</span></div>`)
const R = [['C', 'Cervicales', 7, ''], ['T', 'Thoraciques', 18, '17 à 19'], ['L', 'Lombaires', 6, '5 à 6'], ['S', 'Sacrales', 5, ''], ['Cd', 'Caudales', 18, '15 à 21']]
const b = phone(`<div class="ph-top">${ico('close')}<b style="font-weight:600">Régions vertébrales</b></div><div class="ph-body" style="padding:12px;gap:8px">
${R.map(([c, n, k, rg]) => `<div class="pcard" style="padding:10px 12px;gap:4px"><div class="lrow" style="min-height:0"><span class="badge">${c}</span><b>${n}</b><span class="r">${ico('chevron', 'sm')}</span></div><div class="small muted">${k} vertèbres${rg ? ' · plage ' + rg : ''} · utilisée par 1 zone</div></div>`).join('')}
<span class="btn secondary lg">${ico('plus')}Ajouter une région</span><div class="small muted">Ordre : maintenir puis glisser, ou « Monter / Descendre » dans la fiche d'une région.</div></div>`)
const c = phone(`<div class="ph-top">${ico('menu')}<b style="font-weight:600">Brouillon v4</b><span class="badge" style="margin-left:auto">${ico('lock', 'sm')}Lecture seule</span></div><div class="ph-body" style="padding:12px;gap:10px">
<div class="notice info">${ico('info', 'sm')}<div><b>L'édition demande un écran d'au moins 1 024 px de large.</b> Sur cet écran, consultation seule.</div></div>
<div style="background:#fff;border:1px solid var(--color-border);border-radius:12px;overflow:hidden">${drawing({ w: 333, h: 262 })}</div>
<div class="small muted">Règle ratifiée aujourd'hui (O14 A). Les planches 14, 15 A-B et 16 montrent ce que deviendrait l'édition au téléphone si le propriétaire la lève ; sinon seule cette vue existe sous 1 024 px.</div></div>`)
document.getElementById('b15').innerHTML = [['A. Couleur et opacité', a], ['B. Régions vertébrales', b], ['C. Règle actuelle sous 1 024 px', c]].map(([l, h]) => `<div class="vign"><div class="lbl">${l}</div>${h}</div>`).join('')
}
</script>
<!-- ================================================================== 16 phone: zone creation, point edit, move, states -->
<div class="row"><div data-board="16-telephone-trace-etats">
<p class="sheet-title">16. Téléphone 375 px (même proposition) : tracer une zone, modifier un point, déplacer une zone, refus et enregistrement, redessiner une zone</p>
<div id="b16" style="display:flex;gap:22px"></div></div></div>
<script>
{
const { ptop, ptabs, tools, phone } = window.PH
const zp = [[1430, 1060], [1500, 1035], [1585, 1050], [1610, 1110], [1570, 1180]]
const a = phone(ptop('Brouillon v4') + ptabs + `<div class="ph-body"><div style="flex:1;background:#fff;display:flex;justify-content:center">${drawing({ w: 359, h: 330, vb: [1360, 960, 320, 294], faint: true, extra: u => `<polyline points="${pts(zp)}" fill="none" stroke="#b85a3f" stroke-width="${2.5 * u}"/>${zp.map(q => V(q[0], q[1], u, false, true)).join('')}<circle cx="${zp[0][0]}" cy="${zp[0][1]}" r="${18 * u}" fill="none" stroke="#b85a3f" stroke-width="${2 * u}"/>` })}</div>
<div class="sheet" style="height:236px"><div class="grab"></div><div class="lrow"><b>${ico('zone', 'sm')} Nouvelle zone · 5 sommets</b></div>
<div class="small muted">Touchez pour poser un sommet. Touchez le premier sommet (cerclé) pour fermer.</div>
<span class="btn primary lg">${ico('check')}Terminer la zone</span>
<div class="grid2"><span class="btn secondary">${ico('undo', 'sm')}Retirer le dernier</span><span class="btn secondary">Abandonner</span></div></div></div>` + tools('zone'))
const old = [1464, 918], nw = [1478, 934]
const b = phone(ptop('Brouillon v4') + ptabs + `<div class="ph-body"><div style="flex:1;background:#fff;display:flex;justify-content:center">${drawing({ w: 359, h: 330, vb: [1330, 790, 300, 276], hide: ['Grasset'], extra: u => `<circle cx="${old[0]}" cy="${old[1]}" r="34" fill="none" stroke="#6b6359" stroke-width="${1.5 * u}" stroke-dasharray="${4 * u} ${4 * u}"/><circle cx="${nw[0]}" cy="${nw[1]}" r="40" fill="${CATS.art.c}" fill-opacity="${CATS.art.o}" stroke="${CATS.art.c}" stroke-width="${2 * u}"/><circle cx="${nw[0]}" cy="${nw[1]}" r="${40 + 6 * u}" fill="none" stroke="#1f1b16" stroke-width="${2 * u}"/>${V(nw[0] + 40, nw[1], u, true, true)}${HIT(nw[0] + 40, nw[1], u)}` })}</div>
<div class="sheet" style="height:236px"><div class="grab"></div><div class="lrow"><b>${ico('point', 'sm')} Grasset</b><span class="r badge warn">À confirmer</span></div>
<div class="small muted">Glissez le point au doigt ; la poignée sur son bord change sa taille.</div>
<div class="field"><label>Taille du point</label>${slider(52, { mark: 8 })}</div>
<span class="btn secondary sm" style="align-self:flex-start">${ico('up', 'sm')}Toutes les propriétés</span></div></div>` + tools('sel'))
const dx = 28, dy = -22, moved = THOR.map(q => [q[0] + dx, q[1] + dy])
const c = phone(ptop('Brouillon v4') + ptabs + `<div class="ph-body"><div style="flex:1;background:#fff;display:flex;justify-content:center">${drawing({ w: 359, h: 360, vb: [790, 330, 360, 330], hide: ['Vertèbres thoraciques'], extra: u => `<polygon points="${pts(THOR)}" fill="none" stroke="#6b6359" stroke-width="${1.5 * u}" stroke-dasharray="${5 * u} ${4 * u}"/><polygon points="${pts(moved)}" fill="${CATS.vert.c}" fill-opacity="${CATS.vert.o}" stroke="#1f1b16" stroke-width="${2 * u}"/>` })}</div>
<div class="sheet" style="height:196px"><div class="grab"></div><div class="lrow"><b>${ico('move', 'sm')} Déplacer la zone</b></div>
<div class="small muted">Un doigt dans la zone la déplace ; deux doigts déplacent le dessin.</div>
<div class="grid2"><span class="btn primary lg">Valider la position</span><span class="btn secondary lg">Annuler</span></div></div></div>` + tools('sel'))
const d = phone(`<div class="ph-top">${ico('menu')}<b style="font-weight:600">Brouillon v4</b><span style="margin-left:auto" class="btn primary sm">Réessayer</span></div>` + ptabs + `<div class="ph-body" style="padding:10px;gap:10px">
<div class="notice error" style="margin-top:56px">${ico('cloud-off', 'sm')}<div><b>Échec de l'enregistrement.</b> Vos modifications restent dans ce navigateur ; réessayez quand la connexion revient.</div></div>
<div class="notice warn">${ico('alert', 'sm')}<div><b>Une autre session a enregistré la révision 12.</b> <a style="text-decoration:underline">Voir les choix</a></div></div>
<div style="background:#fff;border:1px solid var(--color-border);border-radius:12px;overflow:hidden;position:relative">${drawing({ w: 337, h: 210, vb: [790, 360, 360, 225], extra: u => `<polygon points="${pts(THOR)}" fill="${CATS.vert.c}" fill-opacity="${CATS.vert.o}" stroke="#1f1b16" stroke-width="${2 * u}"/>${THOR.map(q => V(q[0], q[1], u, false, true)).join('')}` })}
<div class="toast err" style="white-space:normal;width:300px;bottom:8px">${ico('alert', 'sm')}Ce sommet sortirait du cadre du dessin : il revient à sa place.</div></div>
<div class="small muted">Même règle qu'au bureau : refus au relâchement, forme précédente remise, rien n'est enregistré.</div></div>` + tools('sel'))
const rd = [[835, 430], [900, 470], [985, 488], [1070, 500], [1105, 520]]
const e = phone(ptop('Brouillon v4') + ptabs + `<div class="ph-body"><div style="flex:1;background:#fff;display:flex;justify-content:center">${drawing({ w: 359, h: 360, vb: [790, 330, 360, 330], hide: ['Vertèbres thoraciques'], faint: true, extra: u => `<polygon points="${pts(THOR)}" fill="${CATS.vert.c}" fill-opacity=".10" stroke="${CATS.vert.c}" stroke-width="${1.5 * u}" stroke-dasharray="${5 * u} ${4 * u}"/><polyline points="${pts(rd)}" fill="none" stroke="#b85a3f" stroke-width="${2.5 * u}"/>${rd.map(q => V(q[0], q[1], u, false, true)).join('')}<circle cx="${rd[0][0]}" cy="${rd[0][1]}" r="${18 * u}" fill="none" stroke="#b85a3f" stroke-width="${2 * u}"/>` })}</div>
<div class="sheet" style="height:236px"><div class="grab"></div><div class="lrow"><b>${ico('pen', 'sm')} Redessiner · Vertèbres thoraciques</b></div>
<div class="small muted">L'ancien contour reste en repère. Propriétés et liens conservés.</div>
<span class="btn primary lg">${ico('check')}Terminer le nouveau tracé</span>
<div class="grid2"><span class="btn secondary">${ico('undo', 'sm')}Retirer le dernier</span><span class="btn secondary">Abandonner</span></div></div></div>` + tools('sel'))
document.getElementById('b16').innerHTML = [['A. Tracer une zone', a], ['B. Modifier un point', b], ['C. Déplacer une zone', c], ['D. Refus et enregistrement', d], ['E. Redessiner une zone', e]].map(([l, h]) => `<div class="vign"><div class="lbl">${l}</div>${h}</div>`).join('')
}
</script>
</body>
</html>
+64
View File
@@ -0,0 +1,64 @@
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Faunosteo V1-2.6 éditeur graphique, planche-contact</title>
<!--
Contact sheet of the sixteen V1-2.6 editor boards, grouped along the editor's journey. It only shows
the PNGs of this folder, scaled down by the browser; it never redraws them. Rendered to
planche-contact.png by render.cjs (one [data-board] element), like maquettes.html. Opened in a
browser, each thumbnail links to its full-size PNG.
-->
<style>
:root {
--color-bg: #fbf9f5; --color-surface: #ffffff; --color-border: #e7e0d2;
--color-ink: #1f1b16; --color-ink-muted: #6b6359; --color-accent-strong: #9c4831;
--font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
--font-serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: #ece6da; font-family: var(--font-sans); color: var(--color-ink); -webkit-font-smoothing: antialiased; }
[data-board] { width: 2400px; padding: 40px 48px 48px; background: #ece6da; }
header { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
header img { height: 44px; }
h1 { font: 400 34px/1.2 var(--font-serif); margin: 12px 0 6px; }
.lede { margin: 0; font-size: 17px; color: var(--color-ink-muted); }
.tag { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 15px; font-weight: 600; background: #fffbeb; color: #b45309; }
.meta { text-align: right; font-size: 15px; color: var(--color-ink-muted); line-height: 1.6; }
.flow { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.stage { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 18px 24px 22px; }
.stage h2 { font: 400 22px/1.3 var(--font-serif); margin: 0 0 14px; display: flex; align-items: baseline; gap: 10px; }
.stage h2 .step { font: 600 14px var(--font-sans); color: var(--color-accent-strong); text-transform: uppercase; letter-spacing: .06em; }
.thumbs { display: flex; gap: 16px; align-items: flex-start; }
figure { margin: 0; }
figure img { display: block; height: 300px; width: auto; border: 1px solid var(--color-border); border-radius: 8px; }
figcaption { margin-top: 8px; font-size: 15px; display: flex; gap: 8px; align-items: baseline; }
.num { font-weight: 700; color: var(--color-accent-strong); }
a { color: inherit; text-decoration: none; }
</style>
</head>
<body>
<div data-board="planche-contact">
<header>
<div><img src="../../../apps/app/public/logo-horizontal.svg" alt="Faunosteo">
<h1>Éditeur graphique des fiches anatomiques</h1>
<p class="lede">V1-2.6 · nouvelle direction UX, maquettes fonctionnelles desktop, tablette et téléphone</p></div>
<div class="meta"><span class="tag">Proposition, non validée</span><br>Brief du 05/11/2026 · branche feature/v1-2-anatomical-sheets<br>Sources : maquettes.html, rendu par render.cjs</div>
</header>
<div class="flow" id="flow"></div>
</div>
<script>
const STAGES = [
['Ouvrir', "L'éditeur et ses quatre onglets", [['01-editeur-annotations-desktop', '01', 'Dessin principal, onglet Annotations'], ['10-general-desktop', '10', 'Onglet Général'], ['11-constats-references-desktop', '11', 'Références en volet secondaire']]],
['Points', 'Créer puis modifier', [['02-point-creation-desktop', '02', 'Ajouter un point'], ['03-point-modification-desktop', '03', 'Déplacer, taille au curseur']]],
['Zones', 'Tracer, éditer, déplacer, redessiner', [['04-zone-creation-desktop', '04', 'Ajouter une zone'], ['05-zone-poignees-desktop', '05', 'Sommets, + et −, courbes'], ['06-zone-deplacer-redessiner-desktop', '06', 'Déplacer et redessiner']]],
['Structure', 'Catégories, vues, vertèbres', [['07-categories-couleurs-desktop', '07', 'Catégories et couleurs'], ['08-vue-detaillee-creation-desktop', '08', 'Vue détaillée par sélection'], ['09-regions-vertebrales-desktop', '09', 'Régions vertébrales']]],
['États', 'Enregistrement, erreurs, lecture seule', [['12-etats-desktop', '12', 'États de l’éditeur']]],
['Au doigt', 'Tablette et téléphone', [['13-tablette-tactile', '13', 'Tablette 1 180 px'], ['14-telephone-edition', '14', 'Téléphone, édition proposée'], ['15-telephone-categories-etats', '15', 'Téléphone, catégories et règle actuelle'], ['16-telephone-trace-etats', '16', 'Téléphone, tracé et états']]],
]
document.getElementById('flow').innerHTML = STAGES.map(([step, title, boards]) =>
`<section class="stage"><h2><span class="step">${step}</span>${title}</h2><div class="thumbs">${boards.map(([f, n, c]) =>
`<figure><a href="${f}.png"><img src="${f}.png" alt="Planche ${n}"></a><figcaption><span class="num">${n}</span>${c}</figcaption></figure>`).join('')}</div></section>`).join('')
</script>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

+19
View File
@@ -0,0 +1,19 @@
// node render.cjs <html> <out-dir>: one PNG per [data-board] element, plus the full page (all.png).
// PW_MODULE = the absolute path of apps/app/node_modules/@playwright/test (the pinned Chromium).
const path = require('path')
const { chromium } = require(process.env.PW_MODULE)
;(async () => {
const [html, out] = process.argv.slice(2)
const browser = await chromium.launch()
const page = await browser.newPage({ viewport: { width: 1400, height: 900 }, deviceScaleFactor: 1 })
await page.goto('file://' + path.resolve(html))
await page.waitForLoadState('networkidle')
const boards = await page.$$('[data-board]')
for (const b of boards) {
const name = await b.getAttribute('data-board')
await b.screenshot({ path: path.join(out, name + '.png') })
}
await page.screenshot({ path: path.join(out, 'all.png'), fullPage: true })
await browser.close()
console.log('boards', boards.length)
})()