docs(docs): V1-2.6 U2 boards 02-06, 13, 31-33, review and arbitrations

This commit is contained in:
bchanot committed 2026-11-17 12:54:12 +01:00
1 parent c42c65509b
commit bc19481b93
18 files changed
+1335

No files matched your search

+1
View File
@@ -743,6 +743,7 @@ Order (BDR-071): P0 docs + decisions → V1-1 clients and animals → V1-2 sheet
- [x] Final fix wave (FX1-FX16, `.superpowers/sdd/2026-11-16-r4-card-integrity-2337/final-fix-list.md`): b378cf0 retry ending with no retry left keeps the polite region and moves focus to « Consulter », busy look on « Réessayer », engine stopped for good in the error tone, one attempt for two calls in one tick, rendered tests (engine stopped, two cards on the core, no blob URL after unmount); 2930f49 lines over 100 columns wrapped; 1e50585 board 30 deviation fixed (failure row `*:px-3`, both buttons on one row at 1280 and 375, e2e checks it); 3bea19f spec reads each own sheet's name by id before archiving, `seedGrant` account id through `capturedId`. App 1775 tests in 138 files; typecheck, lint, build exit 0. `catalogue-integrity.spec.ts` alone 6 passed 0 failed 0 skipped 0 flaky (twice: once with temporary screenshot lines, once as committed); `catalogue.spec.ts` alone 8 passed. Guard: 0 removed, 0 changed, 81 added (27 sheets, 43 versions, 11 grants), the runs' own; 8 R4 sheets archived, 4 grants revoked, read back. `pnpm check:all` then run at `2c9d837` (line above)
- [ ] Follow-up: seed owner row in `private.catalog_write_budgets` is R4's own (none before R4; its first run created it, later runs update that same row, 4 archives per run; 8 of 300 per hour after the final wave, outside the data guard); `catalogue.spec.ts` still leaves its published sheets listed, warm-up its sheet and `sheet_editor` grant per invocation (BLK-015, RR-13)
- [ ] owner arbitrations A1-A15 (`V1-2-6_U1_CORRECTIONS.md` §6, `TRIAL_STACK.md` §6)
- [ ] V1-2.6 UX U2 design: boards 02-06, 13 redrawn + extras from 31 (owner brief 2026-11-17 « R4 est terminé … préparer U2 », orientation 2026-11-14 BDR-117; contract `.claude/tasks/contracts/2026-11-17-u2-design-boards.md`; docs only, no code, no DEV, no merge). [ ] audit as built · [ ] boards + REVUE + ARBITRAGES in `docs/design/v1-2-6-u2/` · [ ] fresh design review · [ ] fresh conformity check · [ ] STOP owner visual validation before any U2 plan or code
- [ ] Test anomaly A (owner 2026-11-09, separate from U1/U2): fictitious fingerprints `'a'.repeat(64)` from worker stand-ins (`packages/supabase/tests/sandbox/sheet-fixtures.ts:115` openRound, `sheets-concurrency.sandbox.ts:168`, `sheets-perf.sandbox.ts:169`); 7 published/deprecated sandbox versions fail `check_published`. Fix: real fingerprint through the core (as e2e `fingerprintOf`, `apps/app/e2e/support/catalogue.ts:88`); never weaken the publish gate or the reader check. Needs its own go. Census 2026-11-17 (R4 Task 3, read-only): 4 of 164 catalogue entries fail, the four current « Cheval sandbox » versions (2 at v1, 2 at v2), all `fingerprint_mismatch`; R4 cards show them with the integrity line.
- [ ] Test anomaly B (owner 2026-11-09, separate from U1/U2): `packages/supabase/tests/sandbox/sheets-admin.sandbox.ts:181-195` creates the historical working copy and never archives it; slot taken → `admin.spec.ts:717` fails x4. Fix test independence and cleanup; the existing copy `8c315a12-20d4-4432-9db3-7cb88b27a5b4` stays untouched until the owner authorises. Linked: RR-13, the admin.spec confirmation line above.
- [x] Test anomaly C (owner 2026-11-09, separate from U1/U2): CLOSED 2026-11-17 with R4's owner validation. Integrity failure invisible in catalogue cards; implemented as lot R4; failure shown, never hidden or bypassed. Built 2026-11-17 (R4 Task 1-3 and final fix wave, `V1-2-6_U1_CORRECTIONS.md` §5 row C: built by R4, closes on the owner's validation); checked off with R4's owner validation.
@@ -0,0 +1,118 @@
# CONTRACT — u2-design-boards
- date: 2026-11-17 | flow: design and documentation only (U2 boards, review, arbitrations, tracking) | branch: feature/v1-2-anatomical-sheets
- status: open
- worktree: /home/bchanot/Documents/faunosteo-v1-2 (every command from this absolute path; never DEV: the
`supabase_*_faunosteo` containers are DEV). The sandbox and the trial stack are not read nor written by this lot.
- base: c42c655. Commit in place, push; no merge, no `gitflow.sh finish`.
- untracked file kept: `faunosteo-v1-2-6-revue-ux-chatgpt.md`.
## REQUEST (verbatim — IMMUTABLE)
### Owner brief 2026-11-17 (R4 closed, U2 design start)
Je confirme avoir terminé mes tests manuels de R4 sur la sandbox.
Tous les tests fonctionnent correctement et le résultat me convient.
Je valide officiellement R4.
Je confirme également les deux décisions restantes :
1. Nettoyage des fiches de test :
Je valide leur archivage plutôt que leur suppression.
Les règles métier concernant les fiches ayant eu une version publiée doivent rester inchangées.
2. Fichiers supplémentaires :
J'accepte les modifications de Card.tsx et de l'utilitaire de validation des identifiants SQL.
Tu peux maintenant procéder à la clôture documentaire de R4 :
- Enregistrer ma validation propriétaire.
- Mettre à jour les contrats, le TODO et le suivi.
- Enregistrer les décisions et apprentissages pertinents.
- Conserver les résultats exacts des tests.
- Committer et pousser les modifications documentaires.
BLK-015, RR-13 et l'anomalie A restent des chantiers séparés.
R4 est terminé.
Nous pouvons maintenant préparer U2 : la refonte de la manipulation graphique des annotations.
Je souhaite commencer par la conception graphique, conformément à notre méthode habituelle.
Reprends les maquettes validées et les nouvelles décisions UX concernant les modales de propriétés des annotations.
Les objectifs restent :
- Création d'un point directement sur le schéma.
- Création d'une zone en traçant son polygone.
- Déplacement des sommets avec la souris ou le doigt.
- Ajout d'un sommet avec « + » sur un segment.
- Suppression d'un sommet avec « − ».
- Déplacement et redessin d'une zone.
- Modification de la taille d'un point.
- Consultation et modification des propriétés dans une modale.
- Ouverture de la modale de création après le placement du point ou la fin du tracé.
Les interactions graphiques doivent rester possibles sans que les modales gênent les gestes.
Prépare les nouvelles maquettes U2, notamment les planches 02 à 06 et 13, ainsi que les éventuels écrans supplémentaires nécessaires.
Je te laisse autonome pour auditer l'existant, proposer les meilleures interactions et organiser les relectures.
Présente-moi les maquettes pour validation visuelle avant toute implémentation de U2.
Aucune fusion ni intervention sur DEV.
## CLARIFICATIONS
- « Les nouvelles décisions UX concernant les modales de propriétés des annotations » = the owner orientation of
2026-11-14 (BDR-117), recorded in `docs/development/V1-2-6_UX_PLAN.md` §U2 « Orientation 2026-11-14 »,
`docs/development/V1-2-6_UX_DECISIONS.md` row « U2 orientation » and `docs/design/README.md` note of 2026-11-14.
- « Les maquettes validées »: `docs/design/v1-2-6/` boards 01 to 16 (approved for good, not reopened, except boards
02 to 06 and 13 which the orientation sends back for redrawing), the R0 boards `docs/design/v1-2-6-r0/` 23 to 30
(validated 2026-11-09, BDR-110; board 26 draws the Annotations tab as U1 built it), the constats boards
`docs/design/v1-2-6-constats/` and the step 7 shell.
- Ratified rules that bind the drawing (`V1-2-6_UX_DECISIONS.md`, `v1-2-6/ARBITRAGES.md`, `V1-2-6_UX_PLAN.md` §U2):
choice 1 (a) a selected zone drags directly with the mouse, an explicit « Déplacer la zone » mode by touch; choice 3
(b) the point size slider snaps to the sizes used in the view, no number shown, red minimum mark (core
`marker_too_small`); choice 10 (b) the app sidebar hidden in the editor below 1 280 px; O14 A below 1 024 px the
editor is read-only (boards 14 and 16 unchanged); T15 wording « Abandonner » for a form, « Défaire » / « Refaire »
for the history (R0); T18 handle cap per shape; §2 G keyboard (Tab between handles, arrows, Maj by 10, Inser,
Suppr, Entrée, Échap); 44 px touch targets; no coordinate field in the normal journey; curves excluded (curves lot).
- What is open and goes to the owner as an arbitration: any deviation from the 2026-11-14 interaction rules that the
request's « sans que les modales gênent les gestes » leads to, the dialog placement over the drawing, the laterality
default at creation (C25), and any other visible choice the boards make.
## ACCEPTANCE CRITERIA
1. Boards: a new folder `docs/design/v1-2-6-u2/` holds `maquettes.html`, its data generator and generated data, one
PNG per board rendered with the pinned Chromium (`docs/design/v1-2-6/render.cjs`), a contact sheet (PNG and HTML)
and `REVUE.md` in French. Boards 02 to 06 and 13 are redrawn under their numbers; extra boards, if any, are
numbered from 31.
2. Objectives: each of the nine objectives of the request is drawn on at least one board, and `REVUE.md` holds a
table objective → board(s) → what is shown.
3. Dialogs: properties are read and edited in a modal dialog (read mode first, then a form whose actions reuse the R2
wording); the creation dialog opens after the point is placed or the trace is finished, the new shape staying
visible; no board shows a gesture on the drawing while a dialog is open, and no dialog covers the shape it
concerns. The rule for when a dialog opens (and when it does not) is written in `REVUE.md`.
4. Geometry on the drawing: point move and size (slider in the fixed strip with the red minimum mark and the snap
marks), vertex drag, « + » on a segment, « − » on the chosen vertex, zone move (mouse direct, touch explicit mode),
redraw keeping the old shape until accepted, each undoable in one step through « Défaire »; no coordinate field.
5. Touch: board 13 at 1 180 px with 44 px targets, the sidebar hidden (choice 10 b), the explicit touch move mode, and
a dialog opened by touch.
6. Keyboard: the alternative to every drag (WCAG 2.5.7) and the focus path into and out of the dialogs (return target)
are drawn or written on the boards.
7. Identity and truth: tokens, shell (five tabs, « Défaire » / « Refaire », save line as built after R2), components and
icons reused from the validated boards with no new colour; annotations at their real coordinates from the equine
draft `document.json` through the generator; every new visible label listed in `REVUE.md` with FR and EN.
8. Arbitrations: `docs/design/v1-2-6-u2/ARBITRAGES.md` lists every choice that needs the owner, each with what the
boards draw, the alternatives, the consequences and a recommendation; any deviation from the 2026-11-14 orientation
is named as such.
9. Reviews: a fresh design review and a fresh conformity check against this contract, their exact results written in
`REVUE.md` (or a `CONTROLE-CONFORMITE.md`), and `impeccable detect` on `maquettes.html` run or its absence stated.
10. Restrictions: the branch diff from c42c655 touches only `docs/`, `.claude/tasks/`, `.claude/memory/`; nothing under
`apps/`, `packages/`, `crates/`, `supabase/`, `scripts/`; no stack started, stopped or written; no merge; DEV
unchanged; the untracked review file still present.
## FILE SCOPE
docs/design/v1-2-6-u2/**, docs/design/README.md, docs/development/V1-2-6_UX_PLAN.md (U2 note only),
.claude/tasks/TODO.md, .claude/tasks/contracts/this file, .claude/memory/*
Binary file not shown.

After

Width:  |  Height:  |  Size: 505 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 578 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 747 KiB

+123
View File
@@ -0,0 +1,123 @@
# U2 : choix à arbitrer par le propriétaire
Brief du 2026-11-17 (« préparer U2 », « sans que les modales gênent les gestes »), orientation du 2026-11-14
(BDR-117, `docs/development/V1-2-6_UX_PLAN.md` §U2). Les planches dessinent la recommandation de chaque choix.
Rien n'est implémenté ; aucun choix ci-dessous ne vaut autorisation de code.
## Tableau de synthèse
| # | Choix | Écart avec l'orientation du 14/11 | Recommandation |
|---|---|---|---|
| A1 | Quand le dialogue de propriétés s'ouvre | **Oui** (règle 1) | Le premier clic sélectionne seulement ; le dialogue s'ouvre par un clic sur l'annotation déjà sélectionnée, un double-clic, Entrée ou « Propriétés » |
| A2 | Où le dialogue s'ouvre | Précise « ouvert sur le dessin » | Sur la colonne de droite, à sa largeur (22 rem), voile plus léger que celui des constats |
| A3 | La colonne de droite pendant une sélection | Précise « le dessin garde toute sa largeur » | L'aperçu (vues, catégories, liste) reste affiché ; la ligne sélectionnée y est marquée |
| A4 | Latéralité à la création (question C25) | Non, la règle laissait la question ouverte | Aucune valeur par défaut, « Choisir… » obligatoire, comme aujourd'hui |
| A5 | Taille d'un nouveau point | Non | La taille la plus utilisée dans la vue (34 sur la vue principale) |
| A6 | Un seul bandeau fixe au-dessus du dessin | Non, il précise le « bandeau de tracé » | Bandeau unique, hauteur fixe, sur toute la largeur de l'onglet |
| A7 | Outil après « Créer » | Non | Retour à « Sélectionner », le nouvel élément sélectionné |
| A8 | Champs de coordonnées | Non | Retirés partout ; le clavier remplace le glisser |
| A9 | Champ « Couleur » | Non | Gardé dans le formulaire du dialogue, comme aujourd'hui |
| A10 | « Marquer comme relu » | Non | Action directe du dialogue en lecture, comme pour un constat |
## A1. Quand le dialogue de propriétés s'ouvre · écart avec l'orientation
- **Orientation du 14/11, règle 1** : un clic sans déplacement sélectionne l'annotation et ouvre son dialogue en lecture.
- **Constat** : le dialogue est modal. Tant qu'il est ouvert, le dessin ne répond plus. Pour corriger une forme, il
faut fermer le dialogue avant chaque geste, et sélectionner une autre zone rouvre un dialogue. C'est la gêne que le
brief du 17/11 demande d'éviter.
- **Dessiné (planches 03, 05, 13, 32)** : le premier clic ou toucher sélectionne seulement (poignées, bandeau, ligne
marquée). Le dialogue s'ouvre par un clic sans déplacement sur l'annotation déjà sélectionnée (la règle 3 de
l'orientation), un double-clic sur une annotation, Entrée sur sa ligne dans la liste, ou « Propriétés » dans le
bandeau. Un glisser n'ouvre jamais le dialogue.
- **Alternatives** : (a) la règle 1 telle quelle ; (b) le dialogue seulement par « Propriétés » et Entrée, sans clic
sur le dessin.
- **Conséquences** : la recommandation coûte un clic de plus pour lire les propriétés ; le bandeau affiche le nom et le
statut dès la sélection. Elle garde le comportement actuel du premier clic (aujourd'hui, un clic sélectionne sans
rien ouvrir). (a) ajoute une fermeture avant chaque correction. (b) cache l'ouverture à qui ne lit pas le bandeau.
- **Recommandation** : celle dessinée.
## A2. Où le dialogue s'ouvre
- **Dessiné (02, 04, 13)** : le dialogue s'ouvre au-dessus de la colonne de droite, à sa largeur (352 px), aligné en
haut du dessin. Le dessin n'est jamais couvert, la forme concernée reste visible. Le voile est plus léger (22 %
d'encre) que celui des dialogues de constats (`bg-black/40`) pour que la forme reste lisible dessous.
- **Alternatives** : (a) dialogue centré, taille `lg` (672 px) comme celui d'un constat : il couvre la plus grande
partie d'un dessin de 538 px ; (b) dialogue placé du côté opposé à la forme : sa position change d'une fois à
l'autre.
- **Conséquences** : la recommandation ajoute une variante de placement au composant `Dialog`, le reste (focus, Échap,
historique, saisie protégée) est celui de R2. À 1 024 et 1 280 px la colonne fait la même largeur, le cas est donc le
même. Le dialogue reste modal : le geste sur le dessin attend sa fermeture.
- **Recommandation** : celle dessinée.
## A3. La colonne de droite pendant une sélection
- **Aujourd'hui** : sans sélection, la colonne montre l'aperçu (Vues, Catégories, Annotations de la vue) ; avec une
sélection, elle devient le panneau de propriétés.
- **Dessiné** : l'aperçu reste affiché pendant la sélection ; la ligne de l'annotation y est marquée. Les propriétés
passent au dialogue.
- **Alternatives** : (a) colonne retirée, dessin sur toute la largeur (environ 900 px à 1 280 px) et aperçu derrière un
bouton ; (b) colonne repliable.
- **Conséquences** : la liste est aujourd'hui la seule voie clavier pour sélectionner une annotation (les repères du
dessin ne prennent pas le focus) ; la garder visible garde cette voie et le retour du focus. Le dessin reste à 538 px
à 1 280 px, avec le zoom. (a) agrandit le dessin mais cache la liste et oblige à revoir la voie clavier.
- **Recommandation** : celle dessinée ; « le dessin garde toute sa largeur » est lu comme « aucun panneau de propriétés
ne réduit le dessin ».
## A4. Latéralité à la création (question C25)
- **Aujourd'hui** : aucune valeur par défaut, « Choisir… » ; « Créer » refuse sans latéralité (« Choisissez la catégorie
et la latéralité (et la vue ouverte pour un accès). »).
- **Dessiné (02, 04, 33 B)** : la même règle.
- **Alternatives** : (a) une valeur par défaut fixe (« Bilatérale ») ; (b) la dernière valeur utilisée.
- **Conséquences** : une valeur par défaut fausse s'enregistre sans que personne ne la voie ; la latéralité compte dans
le bilan. (a) et (b) font gagner un choix par création.
- **Recommandation** : aucune valeur par défaut.
## A5. Taille d'un nouveau point
- **Aujourd'hui** : rayon calculé depuis le cadre (`frame.ts:55-59`), environ 74 unités sur la vue principale, plus du
double des points existants (34).
- **Dessiné (02)** : le curseur du bandeau part de la taille la plus utilisée dans la vue (34 sur la vue principale, 27
sur la tête) ; elle se change avant ou après le placement.
- **Alternative** : garder le rayon calculé.
- **Recommandation** : la taille la plus utilisée ; sans point dans la vue, le rayon calculé.
## A6. Un seul bandeau fixe
- **Aujourd'hui** : une ligne « Outil : … » au-dessus du dessin, qui change de hauteur avec ses messages (le dessin se
décale, BLK-013 resté ouvert pour cette ligne), et une barre de tracé sous le dessin, seulement pendant un tracé.
- **Dessiné (toutes les planches)** : un bandeau de hauteur fixe au-dessus du dessin et de l'aperçu, sur toute la
largeur de l'onglet. Il porte la consigne de l'outil, la sélection (nom, statut, taille, « Déplacer la zone »,
« Redessiner », « Propriétés », « Désélectionner »), les commandes du tracé et les refus du cœur (deux lignes au plus).
- **Alternative** : bandeau au-dessus du dessin seul (590 px) : les commandes d'une zone n'y tiennent pas sur une ligne.
- **Recommandation** : celle dessinée.
## A7. Outil après « Créer »
- **Aujourd'hui et planche 02 d'origine** : l'outil Point reste actif pour enchaîner les points.
- **Dessiné (02 C)** : retour à « Sélectionner », le nouveau point sélectionné, prêt à être glissé ou redimensionné ;
pour enchaîner, on reprend l'outil.
- **Alternative** : garder l'outil actif ; le nouveau point ne se corrige qu'après avoir changé d'outil.
- **Recommandation** : retour à « Sélectionner ».
## A8. Champs de coordonnées
- **Aujourd'hui** : « Centre x », « Centre y », « Rayon » et une ligne x, y par sommet dans le panneau.
- **Dessiné** : aucun champ de coordonnées. La voie sans glisser passe par le clavier (planche 32 C) et par
« Déplacer la zone », « Redessiner », « + » et « − ».
- **Alternative** : une section repliée « Coordonnées » dans le formulaire du dialogue, pour une valeur exacte.
- **Recommandation** : retirés, comme l'objectif U2 ratifié (« coordinate fields leave the normal journey »).
## A9. Champ « Couleur »
- **Aujourd'hui** : un champ texte dans le panneau (hexadécimal, vide = couleur de la catégorie), absent à la création.
- **Dessiné (31)** : gardé dans le formulaire du dialogue, avec son aide ; en lecture, « Celle de la catégorie » ou la
valeur.
- **Recommandation** : le garder ainsi ; son sélecteur de couleur reste l'affaire du lot catégories (U6).
## A10. « Marquer comme relu »
- **Dessiné (31)** : action directe du dialogue en lecture, une modification et un « Défaire », comme dans le dialogue
d'un constat ; « Remettre à confirmer » une fois relu.
- **Alternative** : un champ du formulaire, enregistré avec le reste.
- **Recommandation** : action directe.
+160
View File
@@ -0,0 +1,160 @@
# V1-2.6 U2 : manipulation graphique des annotations (proposition de conception, non validée)
Brief du propriétaire du 2026-11-17 (« préparer U2 : la refonte de la manipulation graphique des annotations »),
orientation du 2026-11-14 (BDR-117, `docs/development/V1-2-6_UX_PLAN.md` §U2 « Orientation 2026-11-14 »). Contrat
`.claude/tasks/contracts/2026-11-17-u2-design-boards.md`. Ces planches remplacent les planches 02 à 06 et 13 de
`docs/design/v1-2-6/` une fois validées ; les planches 14 et 16 (téléphone) ne changent pas (O14 A). Rien n'est
implémenté : ni code, ni SQL, ni Rust, ni pile démarrée. Aucune fusion, DEV inchangé.
| Fichier | Contenu |
|---|---|
| `02-point-creation-desktop.png` | Outil Point : taille choisie dans le bandeau, clic, dialogue « Nouveau point » ouvert sur la colonne de droite, point visible sous le voile ; A avant le clic ; C après « Créer » (sélection, message « Défaire ») |
| `03-point-modification-desktop.png` | Point sélectionné sans dialogue, déplacé (ancienne place en pointillé, message) ; B curseur de taille aimanté ; C dialogue en lecture ouvert d'un clic sur le point sélectionné |
| `04-zone-creation-desktop.png` | Dialogue « Nouvelle zone » à la fermeture du tracé, forme visible ; A tracé en cours dans le bandeau ; C « Reprendre le tracé » |
| `05-zone-poignees-desktop.png` | Zone sélectionnée : sommets, « + », bulle « − », glisser direct de l'intérieur à la souris ; A sommet ajouté, B sommet glissé, C sommet retiré |
| `06-zone-deplacer-redessiner-desktop.png` | A déplacement direct à la souris ; B mode explicite « Déplacer la zone » (doigt, clavier) ; C « Redessiner » sur l'ancien contour |
| `13-tablette-tactile.png` | 1 180 px au doigt : poignées agrandies, cibles de 44 px, bandeau en 44 px ; B dialogue en lecture ouvert d'un toucher ; C déplacement au doigt |
| `31-dialogue-proprietes-etats.png` | Dialogue de propriétés : lecture (point, zone), « Modifier », fermeture avec saisie en cours, « Supprimer », lecture seule |
| `32-ouverture-gestes-clavier.png` | Règle d'ouverture proposée face à la règle 1 de l'orientation ; Échap ; clavier pour chaque geste ; retour du focus |
| `33-refus-et-etats.png` | Fermeture refusée, latéralité manquante, déplacement refusé, plafond de poignées, lecture seule |
| `planche-contact.png`, `planche-contact.html` | Les neuf planches sur une page |
| `maquettes.html`, `gen-data.cjs`, `data.js` | Source des planches ; données calculées depuis `document.json` du brouillon équin |
| `ARBITRAGES.md` | Les dix choix soumis au propriétaire, dont l'écart A1 avec l'orientation |
Rendu : `node gen-data.cjs && PW_MODULE=<…>/apps/app/node_modules/@playwright/test node ../v1-2-6/render.cjs maquettes.html .`
puis la même commande sur `planche-contact.html` ; le fichier `all.png` produit est supprimé.
## Point de départ : l'onglet Annotations tel qu'il est construit
Audit en lecture du 2026-11-17 (U1, R1, R2). Les planches partent de ces faits :
- Largeurs : à 1 280 px la barre latérale est affichée et le dessin fait 538 × 403 px ; à 1 180 px la barre latérale
est masquée (bouton menu) et le dessin fait 694 × 520 px ; à 1 024 px, 538 × 403 px. La colonne de droite fait
22 rem (352 px) partout, la colonne d'outils 44 px (`EditableAnnotations.tsx:142`, `AnnotationCanvas.tsx`,
`ShellChrome.tsx:32-37`).
- Colonne de droite : sans sélection, l'aperçu « Vues », « Catégories », « Annotations de la vue » (`OverviewPanel.tsx`) ;
avec une sélection, le panneau de propriétés ; pendant une création, le formulaire de création.
- Gestes construits : sélection au clic, glisser en bloc de l'annotation sélectionnée (point ou zone, seuil 4 px),
défilement, pincement, zoom. Non construits : poignées de sommet, « + » et « − » sur le dessin, curseur de taille,
« Déplacer la zone », « Redessiner » d'une zone ordinaire, message après un geste, dialogue d'annotation.
- Création : formulaire dans la colonne de droite ; catégorie préremplie avec la première ; latéralité sans valeur par
défaut ; « Créer » écrit en une modification.
- Libellés existants repris tels quels : « Non latéralisée », « Bilatérale », « Gauche », « Droite » ; « À confirmer »,
« Relu », « Hérité, non relu » ; « Fermer le tracé », « Annuler le tracé » ; « Nouveau point », « Nouvelle zone »,
« Créer » ; « Marquer comme relu », « Remettre à confirmer », « Désélectionner », « Supprimer » ; dialogue de
suppression et question « Abandonner les modifications ? » (R2).
## Objectifs du brief et planches
| Objectif | Planches | Ce qui est montré |
|---|---|---|
| Créer un point directement sur le schéma | 02 | Outil Point, aperçu sous le pointeur à la taille du bandeau, un clic place le point |
| Créer une zone en traçant son polygone | 04 A, 33 A | Un clic par sommet, fermeture sur le premier sommet, Entrée ou « Fermer le tracé » ; refus d'une zone trop étroite |
| Déplacer les sommets à la souris ou au doigt | 05 B, 13 | Poignée glissée, aperçu, validation au relâchement ; poignées agrandies et cibles de 44 px au doigt |
| Ajouter un sommet avec « + » sur un segment | 05, 05 A, 13 | « + » au milieu de chaque segment ; le nouveau sommet est déjà choisi |
| Supprimer un sommet avec « − » | 05, 05 C, 13 | Bulle « − » sur le sommet choisi ; grisée sous 3 sommets |
| Déplacer et redessiner une zone | 05, 06 A, 06 B, 06 C, 13 C | Glisser direct à la souris, mode explicite au doigt et au clavier, redessin sur l'ancien contour |
| Modifier la taille d'un point | 02 A, 03, 03 B | Curseur du bandeau aimanté sur les tailles de la vue, trait rouge du minimum, sans nombre |
| Consulter et modifier les propriétés dans une modale | 03 C, 13 B, 31 | Lecture d'abord, « Modifier », enregistrement en une modification, sortie protégée, suppression, lecture seule |
| Ouvrir la modale de création après le placement ou le tracé | 02, 04 | « Nouveau point » et « Nouvelle zone » s'ouvrent seuls, la forme reste visible ; « Replacer le point », « Reprendre le tracé » |
| Gestes possibles sans que les modales gênent | 03, 05, 13, 32 | Sélection sans dialogue, dialogue sur la colonne de droite et jamais sur le dessin, jamais pendant un geste (A1, A2) |
## Quand le dialogue s'ouvre, et quand il ne s'ouvre pas
Proposé (arbitrage A1, écart avec la règle 1 de l'orientation du 14/11) :
1. Un clic ou un toucher sans déplacement sur une annotation la sélectionne : poignées, bandeau, ligne marquée dans la
liste. Aucun dialogue.
2. Un appui qui bouge au-delà du seuil est un geste : point, sommet, « + », « − », intérieur d'une zone sélectionnée à
la souris. Il n'ouvre jamais de dialogue.
3. Les propriétés s'ouvrent en lecture par un clic sans déplacement sur l'annotation déjà sélectionnée, un double-clic
sur une annotation, Entrée sur sa ligne dans la liste, ou « Propriétés » dans le bandeau.
4. Le dialogue de création s'ouvre seul après le placement d'un point ou la fermeture d'un tracé.
5. Le dialogue est modal (dialogue natif, D13) et s'ouvre sur la colonne de droite (A2) : il ne couvre jamais le dessin.
« Modifier la forme » le ferme et met le focus sur la première poignée. Fermer le dialogue rend le dessin tel qu'il
était : sélection, zoom et défilement inchangés.
## Écarts avec les planches 02 à 06 et 13 d'origine
- Le panneau de propriétés à droite du dessin devient un dialogue (orientation du 14/11) ; la colonne de droite garde
l'aperçu tel que construit (A3).
- Le bandeau fixe porte la consigne, la sélection, le curseur de taille, « Déplacer la zone », « Redessiner » et les
commandes du tracé (A6) ; les bulles d'aide posées sur le dessin des anciennes planches disparaissent.
- La poignée de taille sur le bord d'un point (ancienne planche 03) n'est pas reprise : la taille se règle au curseur
du bandeau, qui montre le minimum et les crans.
- « Annuler » de l'historique devient « Défaire » (R0) ; le message après un geste dit « Défaire ».
- Le déplacement d'une zone n'est plus seulement un mode explicite : à la souris, l'intérieur d'une zone sélectionnée
se glisse directement (choix 1 a ratifié) ; le mode reste pour le doigt et le clavier.
- Les catégories gardent leurs noms actuels (« Segments vertébraux ») : U2 passe avant les catégories fixes de U6.
- Les zones à courbes (encart de l'ancienne planche 05) restent hors U2 (lot courbes) : sélection possible, sans
poignée ni déplacement.
## Nouveaux libellés (FR / EN)
| FR | EN | Où |
|---|---|---|
| Propriétés | Properties | Bandeau, sélection |
| Taille | Size | Bandeau, curseur d'un point |
| Déplacer la zone | Move zone | Bandeau |
| Valider la position | Confirm position | Bandeau, mode déplacement |
| Redessiner | Redraw | Bandeau |
| Redessiner · {nom} | Redraw · {name} | Bandeau, tracé |
| Retirer le dernier sommet | Remove last vertex | Bandeau, tracé |
| Modifier la forme | Edit shape | Dialogue en lecture |
| Replacer le point | Reposition the point | Dialogue « Nouveau point » |
| Reprendre le tracé | Resume tracing | Dialogue « Nouvelle zone » |
| Continuer | Continue | Bandeau, création reprise |
| Nouvelle zone · tracé repris | New zone · tracing resumed | Bandeau |
| Point placé · renseignez ses propriétés | Point placed · fill in its properties | Bandeau |
| Tracé fermé · {n} sommets · renseignez ses propriétés | Tracing closed · {n} vertices · fill in its properties | Bandeau |
| Cliquez dans le dessin pour placer le point | Click in the drawing to place the point | Bandeau |
| {n} sommets · sommet {i} choisi | {n} vertices · vertex {i} chosen | Bandeau |
| Glissez n'importe où · flèches au clavier | Drag anywhere · arrow keys | Bandeau, mode déplacement |
| Fermeture refusée | Closing refused | Bandeau, refus |
| Trop de sommets pour les poignées : utilisez « Redessiner ». | Too many vertices for handles: use “Redraw”. | Bandeau, plafond T18 |
| Celle de la catégorie | The category's | Dialogue, couleur en lecture |
| Vue | View | Dialogue en lecture |
| Point « {nom} » créé / déplacé ; Zone « {nom} » déplacée, redessinée ; Sommet ajouté, retiré ; Taille modifiée | Point “{name}” created / moved; Zone “{name}” moved, redrawn; Vertex added, removed; Size changed | Message après un geste |
| Défaire | Undo | Message après un geste (libellé existant de l'en-tête) |
| Déplacement refusé : {texte du cœur} | Move refused: {core text} | Message d'erreur |
## Conventions
- Identité reprise des planches validées (jetons, coquille, composants, icônes) et de l'onglet tel que construit ;
aucune nouvelle couleur. Le voile des dialogues d'annotation (22 % d'encre) est une valeur proposée (A2), dans la
même famille que le voile actuel.
- Données vraies : chaque annotation, nom, catégorie, latéralité, zone de constats, région, statut, coordonnée et taille
vient de `data.js`, généré depuis `document.json` ; les crans du curseur sont les tailles réelles de la vue (30 et
34 sur la vue principale, 27 sur la tête).
- Texte de mise en scène (exemples, pas des données) : le nouveau point « Tibia distal » / « Distal tibia », la nouvelle
zone « Tibia », les positions du point déplacé et de la zone déplacée, le tracé en cours et le tracé de redessin, la
forme trop étroite, le texte du refus de déplacement, « 3 modifications non enregistrées », l'utilisateur. Le trait
rouge du minimum est placé à titre indicatif : sa valeur viendra du cœur (seuil `MIN_VISIBLE_PX`, `frame.rs:67`).
- Les lignes en jaune pointillé sont des notes de planche, pas du texte d'interface.
## Points pour le plan U2 (techniques, sans choix visible)
- Le cœur donne une valeur en lecture par vue : le rayon minimum visible (orientation, U2 « Rust ops »).
- Le dialogue d'annotation est une couche d'historique : `LAYERS` gagne `annotation` et `EditorView` un champ clé par
élément (`useEditorNavigation.ts:61-62`, `navigation.ts:36-45`).
- Les propriétés passent d'un enregistrement par champ à un formulaire transactionnel (`useFormDraft`, `FormActions`,
`DiscardConfirm` de R2 ; LRN-142).
- Les flèches font aujourd'hui défiler le dessin focalisé (`useFraming.ts:150-168`) : elles ne déplacent une forme que
si une poignée a le focus.
- Le seuil de glisser vaut 4 px pour la souris et le doigt, mesuré de trois façons (`gesture.ts:5`, `useFraming.ts:20`,
`useEmptyTap.ts:5`) : un seuil au doigt plus large est à fixer et à unifier.
- Le bandeau remplace la ligne d'outil et la barre de tracé (`ToolNotes`, `TracingBar`) ; hauteur fixe (LRN-131).
- Pendant une création, cliquer une autre annotation abandonne aujourd'hui la saisie sans le dire (`uiState.ts:64-71`) :
les planches rendent les annotations non sélectionnables pendant la création.
- Compatibilité U2b : le dialogue de propriétés pourra recevoir la partie « Constats » de l'annotation (planches 17 et
18 de `v1-2-6-constats/`), à la place du panneau ; à trancher au plan U2b.
## impeccable detect
`npx --offline impeccable@4.1.0 detect docs/design/v1-2-6-u2/maquettes.html` (2026-11-17, sans réseau) : 2 observations
esthétiques, les mêmes que pour R0 : `overused-font` (Inter, jeton `--font-sans` de l'application) et `cream-palette`
(#ECE6DA, fond de présentation des planches seulement), code de sortie 2. Gardées, comme décidé par le propriétaire à R0.
## Contrôles
À compléter par la revue graphique et le contrôle de conformité neufs (section suivante).
+2
View File
@@ -0,0 +1,2 @@
// generated by gen-data.cjs from document.json
window.DOC = {"name":{"fr":"Cheval","en":"Horse"},"views":[{"id":"main","fr":"Vue latérale gauche","en":"Left lateral view","parent":null,"box":null},{"id":"head","fr":"Tête (vue latérale gauche)","en":"Head (left lateral view)","parent":"main","box":{"min_x":60,"min_y":100,"width":500,"height":380}}],"categories":[{"id":"articulations","fr":"Articulations","en":"Joints","color":"#ff9500"},{"id":"os","fr":"Os","en":"Bones","color":"#a41e65"},{"id":"charnieres-vertebrales","fr":"Charnières vertébrales","en":"Vertebral junctions","color":"#ff0000"},{"id":"zone-colonne","fr":"Segments vertébraux","en":"Vertebral segments","color":"#e100ff"},{"id":"cadrans-du-crane","fr":"Os du crâne","en":"Cranial bones","color":"#1baa08"}],"regions":[{"code":"C","fr":"Cervicales","en":"Cervical","count":7},{"code":"T","fr":"Thoraciques","en":"Thoracic","count":18},{"code":"L","fr":"Lombaires","en":"Lumbar","count":6},{"code":"S","fr":"Sacrales","en":"Sacral","count":5},{"code":"Cd","fr":"Caudales","en":"Caudal","count":18}],"annotations":[{"id":"hind-fetlock","view":"main","kind":"point","cat":"articulations","lat":"bilateral","fr":"Boulet postérieur (métatarso-phalangien)","en":"Hind fetlock","zone":"hind-fetlock","zoneFr":"Boulet postérieur (métatarso-phalangien)","region":null,"status":"to_confirm","g":["c",1523,1397,34]},{"id":"hock","view":"main","kind":"point","cat":"articulations","lat":"bilateral","fr":"Jarret (tarso-crurale et intertarsiennes)","en":"Hock (tarsal joints)","zone":"hock","zoneFr":"Jarret (tarso-crurale et intertarsiennes)","region":null,"status":"to_confirm","g":["c",1542,1159,34]},{"id":"stifle","view":"main","kind":"point","cat":"articulations","lat":"bilateral","fr":"Grasset (fémoro-tibiale et fémoro-patellaire)","en":"Stifle joint","zone":"stifle","zoneFr":"Grasset (fémoro-tibiale et fémoro-patellaire)","region":null,"status":"to_confirm","g":["c",1464,918,34]},{"id":"hip","view":"main","kind":"point","cat":"articulations","lat":"bilateral","fr":"Hanche (coxo-fémorale)","en":"Hip joint","zone":"hip","zoneFr":"Hanche (coxo-fémorale)","region":null,"status":"to_confirm","g":["c",1585,612,34]},{"id":"sacroiliac","view":"main","kind":"point","cat":"articulations","lat":"bilateral","fr":"Articulation sacro-iliaque","en":"Sacroiliac joint","zone":"sacroiliac","zoneFr":"Articulation sacro-iliaque","region":null,"status":"to_confirm","g":["c",1450,578,34]},{"id":"shoulder","view":"main","kind":"point","cat":"articulations","lat":"bilateral","fr":"Épaule (scapulo-humérale)","en":"Shoulder joint","zone":"shoulder","zoneFr":"Épaule (scapulo-humérale)","region":null,"status":"inherited","g":["c",784,907,34]},{"id":"elbow","view":"main","kind":"point","cat":"articulations","lat":"bilateral","fr":"Coude (huméro-radio-ulnaire)","en":"Elbow joint","zone":"elbow","zoneFr":"Coude (huméro-radio-ulnaire)","region":null,"status":"to_confirm","g":["c",743.0451049804688,1193,34]},{"id":"carpus","view":"main","kind":"point","cat":"articulations","lat":"bilateral","fr":"Carpe (antébrachio-carpienne, médio-carpienne)","en":"Carpus (carpal joints)","zone":"carpus","zoneFr":"Carpe (antébrachio-carpienne, médio-carpienne)","region":null,"status":"to_confirm","g":["c",745,1252,34]},{"id":"fore-fetlock","view":"main","kind":"point","cat":"articulations","lat":"bilateral","fr":"Boulet antérieur (métacarpo-phalangien)","en":"Fore fetlock","zone":"fore-fetlock","zoneFr":"Boulet antérieur (métacarpo-phalangien)","region":null,"status":"to_confirm","g":["c",736,1379,34]},{"id":"fore-sesamoids","view":"main","kind":"point","cat":"os","lat":"bilateral","fr":"Sésamoïdes antérieurs (boulet)","en":"Forelimb sesamoids","zone":"fore-sesamoids","zoneFr":"Sésamoïdes antérieurs (boulet)","region":null,"status":"to_confirm","g":["c",784,1371,34]},{"id":"l6-s1","view":"main","kind":"point","cat":"charnieres-vertebrales","lat":"unpaired","fr":"Charnière L6-S1 (lombo-sacrée)","en":"L6-S1 junction (lumbosacral joint)","zone":"l6-s1","zoneFr":"Charnière L6-S1 (lombo-sacrée)","region":null,"status":"to_confirm","g":["c",1424,515,30]},{"id":"t18-l1","view":"main","kind":"point","cat":"charnieres-vertebrales","lat":"unpaired","fr":"Charnière T18-L1 (thoraco-lombaire)","en":"T18-L1 junction (thoracolumbar)","zone":"t18-l1","zoneFr":"Charnière T18-L1 (thoraco-lombaire)","region":null,"status":"to_confirm","g":["c",1118,528,30]},{"id":"c7-t1","view":"main","kind":"point","cat":"charnieres-vertebrales","lat":"unpaired","fr":"Charnière C7-T1 (cervico-thoracique)","en":"C7-T1 junction (cervicothoracic)","zone":"c7-t1","zoneFr":"Charnière C7-T1 (cervico-thoracique)","region":null,"status":"to_confirm","g":["c",865,528,30]},{"id":"caudal","view":"main","kind":"zone","cat":"zone-colonne","lat":"unpaired","fr":"Vertèbres caudales","en":"Caudal vertebrae","zone":"caudal","zoneFr":"Vertèbres caudales","region":"Cd","status":"inherited","g":["p",[[1655,545],[1662,513],[1742,565],[1780,618],[1763,628],[1724,590],[1682,Line truncated
+45
View File
@@ -0,0 +1,45 @@
// node gen-data.cjs: writes data.js (window.DOC) from the equine draft document, so every annotation, name,
// category, laterality, findings zone, vertebral region, review status and coordinate of the U2 boards comes from
// document.json and none is typed by hand. The point sizes of each view (the slider's snap marks) are counted
// from the same data.
const fs = require('fs')
const path = require('path')
const SRC = path.join(__dirname, '../../../supabase/seed/anatomical-sheets/equine/draft/document.json')
const doc = JSON.parse(fs.readFileSync(SRC, 'utf8'))
const zoneName = Object.fromEntries(doc.finding_zones.map((z) => [z.id, z.name.fr]))
const regions = doc.vertebral_config.regions.map((r) => ({ code: r.code, fr: r.name.fr, en: r.name.en, count: r.count }))
const sizes = {}
for (const a of doc.annotations) {
if (a.geometry.type !== 'circle') continue
sizes[a.view_id] = sizes[a.view_id] || {}
sizes[a.view_id][a.geometry.r] = (sizes[a.view_id][a.geometry.r] || 0) + 1
}
const out = {
name: doc.name,
views: doc.views.map((v) => ({ id: v.id, fr: v.name.fr, en: v.name.en, parent: v.parent_view_id || null, box: v.view_box || null })),
categories: doc.categories.map((c) => ({ id: c.id, fr: c.name.fr, en: c.name.en, color: c.color })),
regions,
annotations: doc.annotations.map((a) => ({
id: a.id,
view: a.view_id,
kind: a.kind,
cat: a.category_id,
lat: a.laterality,
fr: a.name ? a.name.fr : null,
en: a.name ? a.name.en : null,
zone: a.finding_zone_id || null,
zoneFr: a.finding_zone_id ? zoneName[a.finding_zone_id] : null,
region: a.vertebral_region_code || null,
status: a.review_status || 'inherited',
g: a.geometry.type === 'circle'
? ['c', a.geometry.cx, a.geometry.cy, a.geometry.r]
: ['p', a.geometry.points],
})),
zones: doc.finding_zones.map((z) => ({ id: z.id, fr: z.name.fr })),
sizes,
}
const body = 'window.DOC = ' + JSON.stringify(out) + '\n'
fs.writeFileSync(path.join(__dirname, 'data.js'), '// generated by gen-data.cjs from document.json\n' + body)
console.log('annotations', out.annotations.length, 'zones', out.zones.length, 'regions', regions.length,
'sizes', JSON.stringify(sizes), 'bytes', body.length)
+824
View File
@@ -0,0 +1,824 @@
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Faunosteo V1-2.6 U2 manipulation des annotations (proposition)</title>
<!--
V1-2.6 U2 boards (owner brief 2026-11-17 « préparer U2 », orientation 2026-11-14 BDR-117; contract
.claude/tasks/contracts/2026-11-17-u2-design-boards.md): static functional mockups, never shipped, NOT validated.
Styles, icons, shell and drawing helpers are copied from docs/design/v1-2-6-r0/maquettes.html (itself copied from the
validated v1-2-6 boards); the Annotations tab follows the U1 build as audited 2026-11-17 (EditableAnnotations,
OverviewPanel, ToolColumn, KeyboardAdd, Dialog). Every annotation, name, category, laterality, findings zone,
vertebral region, review status, coordinate and point size comes from data.js, generated by gen-data.cjs from the
equine draft document.json. Staging text is listed in REVUE.md. Rendered to PNG by ../v1-2-6/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; }
.annot.inline { padding: 4px 9px; font-size: 12px; align-self: flex-start; }
/* 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; }
/* complement */
mark { background: #fde7c7; color: inherit; border-radius: 3px; padding: 0 1px; }
.cb { width: 16px; height: 16px; border: 1.5px solid var(--color-ink-muted); border-radius: 4px; display: inline-grid; place-items: center; flex: none; background: #fff; }
.cb.on { background: var(--color-accent); border-color: var(--color-accent); }
.cb.on::after { content: ''; width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.ring { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 6px; }
.tree .lrow { min-height: 26px; }
.count { font-size: 13px; color: var(--color-ink-muted); white-space: nowrap; }
.sbar { display: flex; align-items: center; gap: 8px; }
.fpanel { position: absolute; right: 0; top: 0; bottom: 0; background: var(--color-surface); border-left: 1px solid var(--color-border); box-shadow: -10px 0 30px rgba(31,27,22,.12); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
a.lnk { color: var(--color-accent-strong); text-decoration: underline; }
.tree .lrow { padding: 2px 0; }
/* ---------- R0 additions (same tokens, no new colour family) ---------- */
.hbtn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 9px; border-radius: 6px; font-size: 14px; color: var(--color-ink); white-space: nowrap; }
.hbtn[disabled] { opacity: .4; }
.focus { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.tip { position: absolute; z-index: 9; background: var(--color-ink); color: var(--color-bg); font-size: 12px; line-height: 1.35; padding: 6px 9px; border-radius: 6px; white-space: nowrap; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.clr { width: 28px; height: 28px; margin-left: auto; margin-right: -4px; display: grid; place-items: center; border-radius: 6px; color: var(--color-ink-muted); flex: none; }
.clr.big { width: 44px; height: 44px; margin-right: -10px; }
.sortsel { display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.sortsel .inp { min-width: 210px; }
.rlist { display: flex; flex-direction: column; gap: 8px; }
.rtile { border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); }
.rtile.open { border-color: var(--color-border); box-shadow: 0 2px 8px rgba(31,27,22,.06); }
.rhead { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; min-height: 44px; }
.rhead .chev { width: 24px; height: 24px; display: grid; place-items: center; flex: none; color: var(--color-ink-muted); margin-top: -1px; }
.rcit { flex: 1; min-width: 0; font-size: 14px; line-height: 1.45; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rmeta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; width: 168px; }
.rmeta .cnt { font-size: 12px; color: var(--color-ink-muted); white-space: nowrap; }
.rbody { border-top: 1px solid var(--color-border); padding: 12px 16px 14px 48px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.rdl { display: grid; grid-template-columns: 76px 1fr; gap: 6px 10px; margin: 0; }
.rdl dt { color: var(--color-ink-muted); }
.rdl dd { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcited .lrow { min-height: 32px; border-top: 1px solid var(--color-surface-strong); }
.rcited .path { color: var(--color-ink-muted); }
.ractions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ractions .sep { width: 1px; height: 22px; background: var(--color-border); margin: 0 2px; }
.rtile.ph .rhead { flex-wrap: wrap; padding: 10px 12px; }
.rtile.ph .rmeta { width: auto; flex-direction: row; align-items: center; gap: 8px; padding-left: 34px; flex-basis: 100%; }
.rtile.ph .rbody { padding: 12px 12px 14px 12px; }
.rtile.ph .rdl { grid-template-columns: 52px 1fr; }
.ph-body > * { flex-shrink: 0; }
.scrollbar { position: absolute; right: 2px; width: 5px; border-radius: 3px; background: rgba(31,27,22,.25); }
.pbody { flex: 1; min-height: 0; padding: 26px 32px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
h1.big { font: 400 30px/1.2 var(--font-serif); margin: 0; }
.srow { display: flex; flex-direction: column; gap: 3px; padding: 11px 16px; border-top: 1px solid var(--color-border); }
.srow:first-child { border-top: 0; }
.srow .l1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.srow .l1 b { font-weight: 500; }
.srow .l2 { font-size: 13px; color: var(--color-ink-muted); }
.srow .date { margin-left: auto; font-size: 13px; color: var(--color-ink-muted); white-space: nowrap; }
.mini { position: relative; width: 250px; height: 170px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-bg); overflow: hidden; }
.mini .blk { position: absolute; background: var(--color-surface-strong); border-radius: 4px; }
.mini .scr { position: absolute; left: 0; right: 0; bottom: 0; top: 46px; background: rgba(31,27,22,.25); }
.mini .pan { position: absolute; top: 46px; bottom: 0; right: 0; width: 140px; background: var(--color-surface); border-left: 1px solid var(--color-border); box-shadow: -8px 0 18px rgba(31,27,22,.12); }
.mini .pan i { display: block; height: 8px; margin: 10px 12px 0; border-radius: 3px; background: var(--color-surface-strong); }
.ccard { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; box-shadow: 0 1px 2px rgba(31,27,22,.05); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.ccard h2 { font: 400 20px/1.25 var(--font-serif); margin: 0; }
table.esc { border-collapse: collapse; width: 100%; font-size: 13px; }
table.esc th, table.esc td { border-bottom: 1px solid var(--color-border); padding: 7px 8px; text-align: left; vertical-align: top; }
table.esc th { font-size: 12px; color: var(--color-ink-muted); font-weight: 600; }
table.esc td.n { font-weight: 700; color: var(--color-accent-strong); width: 22px; }
/* ---------- U2 additions (same tokens, no new colour family) ---------- */
.side { width: 256px; }
.work.u2 { flex-direction: column; gap: 0; padding: 10px 32px 12px; }
.work.u2.tab { padding: 10px 22px 12px; }
.btn.danger { background: var(--color-danger); color: #fff; }
.strip { height: 52px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 8px 0 12px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; min-width: 0; }
.strip.act { background: var(--color-surface-strong); }
.strip.alert { border-color: rgba(192,57,43,.45); background: color-mix(in srgb, var(--color-danger) 6%, white); }
.strip.big { height: 62px; }
.strip .slead { display: inline-flex; flex: 0 1 auto; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; min-width: 0; max-width: 420px; overflow: hidden; }
.strip .stxt { font-size: 13px; line-height: 1.3; color: var(--color-ink-muted); overflow: hidden; min-width: 0; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.strip .slead .badge { flex: none; font-weight: 500; }
.strip.alert .stxt { color: var(--color-danger-strong); }
.strip .sact { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.sz { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; margin-right: 8px; }
.sz .slider { height: 28px; }
.sz.big .slider { height: 44px; }
.sz.big .knob { width: 28px; height: 28px; }
.snap { position: absolute; top: 9px; width: 2px; height: 7px; background: var(--color-ink-muted); transform: translateX(-1px); border-radius: 1px; }
.dback { position: absolute; inset: 0; background: rgba(31,27,22,.22); z-index: 8; }
.dlgu { position: absolute; top: 0; right: 0; z-index: 9; background: var(--color-surface); border-radius: 16px; box-shadow: 0 18px 40px rgba(31,27,22,.28); display: flex; flex-direction: column; overflow: hidden; }
.dlgu.static { position: relative; }
.dlgu .dh { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--color-border); padding: 6px 6px 6px 24px; }
.dlgu .dh h2 { font-size: 18px; font-weight: 600; margin: 0; line-height: 1.3; flex: 1; min-width: 0; }
.dlgu .dx { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; flex: none; }
.dlgu .db { padding: 14px 24px 14px; display: flex; flex-direction: column; gap: 11px; }
.dlgu .df { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 0 24px 16px; }
.rd { display: grid; grid-template-columns: 112px 1fr; gap: 7px 10px; margin: 0; font-size: 14px; }
.rd dt { color: var(--color-ink-muted); font-size: 13px; padding-top: 1px; }
.rd dd { margin: 0; min-width: 0; display: flex; align-items: flex-start; gap: 6px; line-height: 1.35; }
.inp.bad { border-color: rgba(192,57,43,.6); box-shadow: 0 0 0 3px rgba(192,57,43,.12); }
.toastu { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: var(--color-ink); color: var(--color-bg); border-radius: 10px; padding: 6px 6px 6px 14px; font-size: 13px; display: flex; gap: 10px; align-items: center; white-space: nowrap; box-shadow: 0 8px 20px rgba(31,27,22,.25); z-index: 3; }
.toastu .ua { color: #f2c1ae; font-weight: 600; padding: 5px 9px; border-radius: 6px; }
.toastu.err { background: #7a2318; padding-right: 14px; }
.ocard { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.ocard .ot { display: flex; align-items: center; font-size: 14px; font-weight: 600; }
.ocard .ot .r { margin-left: auto; font-weight: 400; font-size: 13px; color: var(--color-ink-muted); }
.arow { display: flex; align-items: center; gap: 8px; font-size: 13px; min-height: 30px; padding: 0 6px; border-radius: 6px; }
.arow.cur { background: var(--color-surface-strong); }
.arow.on { background: var(--color-surface-strong); box-shadow: inset 2px 0 0 var(--color-accent); }
.arow .k { width: 38px; color: var(--color-ink-muted); font-size: 12px; flex: none; }
.arow .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.steps .st { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; }
.steps .st .no { width: 24px; height: 24px; border-radius: 50%; background: var(--color-surface-strong); display: grid; place-items: center; font-weight: 600; font-size: 12px; }
.steps .st.bad .no { background: color-mix(in srgb, var(--color-danger) 14%, white); color: var(--color-danger-strong); }
.steps .st.good .no { background: color-mix(in srgb, var(--severity-mild) 18%, white); color: #3f5e3f; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border: 1px solid var(--color-border); border-radius: 6px; font-size: 12px; background: var(--color-surface); white-space: nowrap; }
</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>
<symbol id="i-external" viewBox="0 0 24 24"><path d="M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"/></symbol>
<symbol id="i-sort" viewBox="0 0 24 24"><path d="M7 4v16M7 20l-3-3M7 20l3-3M17 20V4M17 4l-3 3M17 4l3 3"/></symbol>
<symbol id="i-deselect" viewBox="0 0 24 24"><path d="M4 8V5a1 1 0 0 1 1-1h3M16 4h3a1 1 0 0 1 1 1v3M20 16v3a1 1 0 0 1-1 1h-3M8 20H5a1 1 0 0 1-1-1v-3M9 9l6 6M15 9l-6 6"/></symbol>
</svg>
<script src="data.js"></script>
<script>
/* ---------- data: window.DOC (data.js, generated by gen-data.cjs from the equine draft document.json) ---------- */
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
const DOC = window.DOC
// Category colours and names come from the draft (U2 ships before U6: no fixed categories yet, real names shown).
const KEY = { articulations: 'art', os: 'os', 'charnieres-vertebrales': 'charn', 'zone-colonne': 'vert', 'cadrans-du-crane': 'crane' }
const OPA = { art: .35, os: .35, charn: .35, vert: .30, crane: .35 }
const CATS = Object.fromEntries(DOC.categories.map((c) => [KEY[c.id], { id: c.id, fr: c.fr, en: c.en, c: c.color, o: OPA[KEY[c.id]] }]))
const catOf = (id) => CATS[KEY[id]]
const viewName = (id) => DOC.views.find((v) => v.id === id).fr
const DETAIL = DOC.views.find((v) => v.parent).id
const ANN = DOC.annotations
// A trigger without a name shows its view's name, as the core does (index_data.rs:39).
const nameOf = (a) => a.fr || viewName(DETAIL)
const A = ANN.map((a) => [a.view, a.kind === 'detail_trigger' ? 'link' : KEY[a.cat], nameOf(a), a.g, a.id])
const pts = (p) => p.map((q) => q.join(',')).join(' ')
const annById = Object.fromEntries(ANN.map((a) => [a.id, a]))
// As built (creation.ts LATERALITIES, fr.ts:1657-1660).
const LAT = { unpaired: 'Non latéralisée', bilateral: 'Bilatérale', left: 'Gauche', right: 'Droite' }
// As built ReviewBadge tones: warn, accent, neutral (ReviewBadge.tsx:5-9).
const ST = { to_confirm: ['warn', 'À confirmer'], reviewed: ['accent', 'Relu'], inherited: ['', 'Hérité, non relu'] }
const status = (s) => `<span class="badge ${ST[s][0]}">${ST[s][1]}</span>`
const REGION = Object.fromEntries(DOC.regions.map((r) => [r.code, r.fr]))
const KIND = { point: 'Point', zone: 'Zone', detail_trigger: 'Accès' }
const countView = (id) => ANN.filter((a) => a.view === id).length
// French plural as the editor's mechanism (C36): 0 and 1 take the singular.
const pl = (n, one, many) => `${n.toLocaleString('fr-FR')} ${n <= 1 ? one : many}`
const STIFLE = annById.stifle, THOR = annById.thoracic.g[1]
</script>
<script>
/* ---------- 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
}
/* ---------- editor stage helpers, copied unchanged ---------- */
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="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 = DOC.views[0].fr) => `<span class="chip" style="position:absolute;right:10px;top:10px;background:rgba(255,255,255,.95)">${ico('layers', 'sm')}${v}</span>`
const zoom = (z = '100 %') => `${vchip()}<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>`
/* ---------- R0 shell: U1 as built (DraftHeader, EditorTabs, HistoryButtons, SaveLine) + the R0 changes ---------- */
const NAV = [['dashboard','Tableau de bord'],['users','Clients'],['paw','Animaux'],['book','Fiches anatomiques'],['HR'],['shield','Administration'],['HR'],['user','Mon compte'],['tool','Outil de bilan']]
const ico = (n, c = '') => `<svg class="icon ${c}" aria-hidden="true"><use href="#i-${n}"/></svg>`
// noAdmin: an account without capability (board 01 v1-2-4) has no « Administration » entry.
const side = (on = 'Administration', noAdmin = false) => `<aside class="side"><div class="logo"><img src="${LOGO}" alt="Faunosteo"></div><nav class="nav">${NAV.filter(([, l], k) => !noAdmin || (l !== 'Administration' && k !== 4)).map(([i, l]) => i === 'HR' ? '<hr>' : `<a class="${l === on ? 'on' : ''}">${ico(i)}${l}</a>`).join('')}</nav><div class="foot muted">Se déconnecter</div></aside>`
const ME = `<span class="me"><span class="avatar">BC</span>Bastien Chanot</span>`
// R0: five tabs, Références between Constats and Vérification (owner brief §1).
const TABS = ['Général', 'Annotations', 'Constats', 'Références', 'Vérification']
// R0 §2: « Défaire » / « Refaire »; name = aria-label, title adds the real shortcut (useUndoShortcuts.ts: Ctrl+Z, Ctrl+Maj+Z, no Ctrl+Y).
const HIST = {
undo: ['undo', 'Défaire', 'Défaire la dernière modification', 'Ctrl+Z ou ⌘Z'],
redo: ['redo', 'Refaire', 'Refaire la dernière modification défaite', 'Ctrl+Maj+Z ou ⇧⌘Z'],
}
const hbtn = (k, o = {}) => { const [i, l, n, s] = HIST[k]; return `<span class="hbtn ${o.focus ? 'focus' : ''}" title="${n} (${s})"${o.off ? ' disabled' : ''}>${ico(i, 'sm')}${o.iconOnly ? '' : l}</span>` }
const hist = (o = {}) => `<span style="margin-left:auto;align-self:center;display:flex;gap:4px;padding-bottom:3px;position:relative">${hbtn('undo', { focus: o.focusUndo, off: o.ro })}${hbtn('redo', { off: true })}${o.tip ? `<span style="position:absolute;top:24px;left:58px;z-index:10">${ico('cursor', 'sm')}</span><span class="tip" style="top:44px;right:60px">${HIST.undo[2]} (${HIST.undo[3]})</span>` : ''}</span>`
function tabs(on, o = {}) {
return '<div class="tabs">' + TABS.map(t => `<a class="${t === on ? 'on' : ''}">${t}${t === 'Vérification' ? ' <span class="badge danger">2 erreurs</span>' : ''}</a>`).join('') + hist(o) + '</div>'
}
const UNSAVED = '3 modifications non enregistrées'
function saveLine(o = {}) {
if (o.ro) return `<span class="s13 muted" style="white-space:nowrap">Révision 11</span>`
return `<span class="s13 muted" style="white-space:nowrap">${o.unsaved || UNSAVED}</span><span class="btn secondary sm">Abandonner les modifications</span><span class="btn primary sm">Enregistrer</span>`
}
// R0: no « Références » button in the header any more (owner brief §1).
function header(o = {}) {
return `<div class="ehead"><h1 class="page">Brouillon, version 4</h1><span class="badge">Brouillon</span><span class="badge">Copie de travail</span>${o.ro ? `<span class="badge">${ico('lock', 'sm')}Lecture seule</span>` : ''}
<span style="margin-left:auto;display:flex;gap:8px;align-items:center">${saveLine(o)}</span></div>`
}
const CRUMB = 'Administration › Fiches officielles › Cheval, squelette et rachis › <b>Brouillon, version 4</b>'
function editor(o) {
return `<div class="frame desk" style="height:${o.h || 800}px">${side()}<div class="main">
<div class="top"><span class="crumb">${CRUMB}</span>${ME}</div>
${header(o)}${o.notice ? `<div style="padding:8px 24px 0">${o.notice}</div>` : ''}${tabs(o.tab, o)}
<div class="work">${o.body}</div>${o.overlay || ''}</div></div>`
}
function pageFrame(o) {
return `<div class="frame desk" style="height:${o.h || 800}px;${o.w ? `width:${o.w}px` : ''}">${o.noSide ? '' : side(o.nav, o.noAdmin)}<div class="main">
<div class="top"><span class="crumb" style="color:var(--color-ink)">${o.crumb}</span>${o.me || ME}</div>
<div class="pbody">${o.body}</div></div></div>`
}
const note = (html, style = '') => `<div class="annot" style="${style}">${html}</div>`
const vframe = (w, h, inner, style = '') => `<div class="frame" style="width:${w}px;height:${h}px;display:flex;flex-direction:column;gap:10px;padding:14px;${style}">${inner}</div>`
/* ---------- U2 helpers (same tokens; the Annotations tab as built + the U2 proposal) ---------- */
// Tool column as built (ToolColumn.tsx: 44 px icon-only buttons, aria-label = title, zoom under the separator).
const GL = { select: 'M5 3l12 7-5 1-3 5z', point: 'M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM12 3v3M12 18v3M3 12h3M18 12h3', zone: 'M12 3l8 6-3 10H7L4 9z', link: 'M4 4h8v8H4zM12 12h8v8h-8z', out: 'M5 11h12M20 20l-4-4', in: 'M11 5v12M5 11h12M20 20l-4-4', fit: 'M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5' }
const glyph = (k) => `<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="${GL[k]}"/></svg>`
const tbtn44 = (k, label, on, off) => `<span title="${label}" style="width:44px;height:44px;display:grid;place-items:center;border-radius:8px;border:1px solid var(--color-border);${on ? 'background:var(--color-ink);color:#fff' : 'background:var(--color-surface);color:var(--color-ink)'}${off ? ';opacity:.4' : ''}">${glyph(k)}</span>`
function toolCol(on = 'select', o = {}) {
return `<div role="toolbar" style="display:flex;flex-direction:column;gap:8px;flex:none">${tbtn44('select', 'Sélectionner et déplacer', on === 'select')}${tbtn44('point', 'Point', on === 'point')}${tbtn44('zone', 'Zone', on === 'zone')}${tbtn44('link', 'Accès à une vue détaillée', on === 'link')}<hr style="border:0;border-top:1px solid var(--color-border);margin:0;width:44px">${tbtn44('out', 'Zoom arrière')}${tbtn44('in', 'Zoom avant')}${tbtn44('fit', 'Ajuster')}</div>`
}
const VIEWCHIPS = (on = 'main', big) => `<div style="display:flex;gap:8px;flex:none">${DOC.views.map((v) => `<span class="chip ${v.id === on ? 'on' : ''}" style="height:${big ? 44 : 28}px">${v.fr}</span>`).join('')}</div>`
const ADDROW = (big, off) => `<div style="display:flex;gap:8px;flex:none">${['Ajouter un point', 'Ajouter une zone', 'Ajouter un accès'].map((l) => `<span class="btn secondary ${big ? '' : 'sm'}"${off ? ' disabled' : ''}>${l}</span>`).join('')}</div>`
const B = (label, cls = 'secondary', o = {}) => `<span class="btn ${cls} ${o.big ? '' : 'sm'} ${o.focus ? 'focus' : ''}" style="${o.big ? 'height:44px;' : ''}${o.style || ''}"${o.off ? ' disabled' : ''}>${o.icon ? ico(o.icon, 'sm') : ''}${label}</span>`
// The point size slider (choice 3 b): snaps on the sizes used in the view, no number, red minimum mark.
// The mark's place comes from the core at U2 (one read-only value per view); drawn here near r 24 of the main view.
const SMIN = 12, SMAX = 72, MINR = { main: 24.1, head: 24.1 }
const pct = (r) => ((r - SMIN) / (SMAX - SMIN) * 100).toFixed(1)
function sizeSlider(r, o = {}) {
const view = o.view || 'main'
const snaps = Object.keys(DOC.sizes[view]).map(Number)
const ticks = snaps.map((s) => `<span class="snap" style="left:${pct(s)}%"></span>`).join('')
return `<span class="sz ${o.big ? 'big' : ''}"><span>Taille</span><span class="slider" style="width:${o.w || 168}px"><span class="track"><span class="fill" style="width:${pct(r)}%"></span><span class="mark" style="left:${pct(MINR[view])}%"></span>${ticks}</span><span class="knob ${o.focus ? 'focus' : ''}" style="left:${pct(r)}%"></span></span></span>`
}
// The contextual strip (proposal): one fixed-height bar above the drawing and the overview, never in the drawing.
function strip(o) {
return `<div class="strip ${o.act ? 'act' : ''} ${o.alert ? 'alert' : ''} ${o.big ? 'big' : ''}"${o.alert ? ' role="alert"' : ''}>${o.lead ? `<span class="slead">${o.lead}</span>` : ''}${o.text ? `<span class="stxt">${o.text}</span>` : '<span style="flex:1"></span>'}<span class="sact">${o.actions || ''}</span></div>`
}
const IDLE = 'Outil : sélectionner et déplacer · cliquez une annotation pour la sélectionner · Échap annule un tracé'
const leadOf = (a) => `${ico(a.kind === 'point' ? 'point' : 'zone', 'sm')}<span style="overflow:hidden;text-overflow:ellipsis;min-width:0">${KIND[a.kind]} · ${nameOf(a)}</span>`
function selStrip(a, o = {}) {
const geo = a.kind === 'point'
? sizeSlider(o.r || a.g[3], { big: o.big, focus: o.focusSize, w: o.big ? 200 : 168 })
: `${B('Déplacer la zone', o.moveOn ? 'on' : 'secondary', { big: o.big, icon: 'move' })}${B('Redessiner', 'secondary', { big: o.big, icon: 'pen' })}`
const ro = o.ro ? '' : geo
return strip({ big: o.big, lead: `${leadOf(a)}${status(a.status)}`, text: o.text || '', actions: `${ro}${B('Propriétés', 'secondary', { big: o.big, icon: 'file', focus: o.focusProps })}${B('Désélectionner', 'secondary', { big: o.big, icon: 'deselect' })}` })
}
// Right column as built (OverviewPanel: Vues, Catégories, Annotations de la vue), kept beside the drawing (proposal):
// the selected annotation's row is marked instead of the column turning into a properties panel.
function overview(o = {}) {
const view = o.view || 'main'
const vrows = DOC.views.map((v) => `<div class="arow ${v.id === view ? 'cur' : ''}" style="min-height:42px"><span style="flex:1;min-width:0"><span style="font-weight:500;display:block">${v.fr}</span><span class="small muted">${v.parent ? 'Vue détaillée' : 'Vue principale'}</span></span><span class="small muted">${pl(countView(v.id), 'annotation', 'annotations')}</span></div>`).join('')
const views = `<div class="ocard"><div class="ot">Vues</div>${vrows}<span class="btn secondary sm" style="align-self:flex-start">Gérer les vues</span></div>`
const chips = DOC.categories.map((c) => `<span class="chip" style="height:26px;font-size:12px;padding:0 9px">${sw(c.color, OPA[KEY[c.id]])}${c.fr}</span>`).join('')
const cats = `<div class="ocard"><div class="ot">Catégories<span class="r">${DOC.categories.length}</span></div><div style="display:flex;flex-wrap:wrap;gap:6px">${chips}</div><div style="display:flex;gap:6px;flex-wrap:wrap"><span class="btn secondary sm">Modifier les catégories</span><span class="btn secondary sm">Régions vertébrales (${pl(DOC.regions.length, 'région', 'régions')})</span></div></div>`
const rows = []
for (const c of DOC.categories) {
const list = ANN.filter((a) => a.view === view && a.cat === c.id)
if (!list.length) continue
rows.push({ head: true, html: `<div class="arow" style="min-height:26px;font-weight:600;font-size:12px">${sw(c.color, OPA[KEY[c.id]])}${c.fr}<span class="muted" style="margin-left:auto;font-weight:400">${list.length}</span></div>` })
for (const a of list) rows.push({ id: a.id, html: `<div class="arow ${a.id === o.sel ? 'on' : ''}"><span class="k">${KIND[a.kind]}</span><span class="n">${nameOf(a)}</span>${status(a.status)}</div>` })
}
const at = Math.max(0, rows.findIndex((r) => r.id === o.sel) - 3)
const shown = rows.slice(o.sel ? at : 0, (o.sel ? at : 0) + (o.rows || 8)).map((r) => r.html).join('')
const list = `<div class="ocard" style="flex:1;min-height:0"><div class="ot">Annotations de la vue<span class="r">${countView(view)}</span></div><span class="inp" style="height:34px"><span class="muted s13">Filtrer par nom</span></span><div style="position:relative;display:flex;flex-direction:column;gap:1px">${shown}<span class="scrollbar" style="top:${o.sel ? 40 : 0}px;height:60px"></span></div></div>`
return `<div style="display:flex;flex-direction:column;gap:8px;height:100%">${views}${cats}${list}</div>`
}
// The workspace: strip across both columns, then (view chips, tool column + drawing, keyboard add) | overview.
// Widths as built at 1 280 px: drawing 538 × 403 (4:3), right column 352 (22rem); at 1 180 px: 694 × 520.
function ws(o) {
const cw = o.cw || 538, ch = o.ch || Math.round(cw * 3 / 4)
const canvas = `<div class="canvas" style="flex:none;width:${cw}px;height:${ch}px;background:#fff">${drawing({ w: cw, h: ch, vb: o.vb, view: o.view, faint: o.faint, hide: o.hide, extra: o.extra })}${o.over || ''}</div>`
const left = `<div style="display:flex;flex-direction:column;gap:8px;flex:none">${VIEWCHIPS(o.view || 'main')}<div style="display:flex;gap:8px">${toolCol(o.tool || 'select')}${canvas}</div>${ADDROW(false, o.addOff)}</div>`
return `${o.strip}<div style="display:flex;gap:16px;margin-top:10px;min-height:0;flex:1">${left}<div style="width:352px;flex:none;position:relative">${o.right || overview(o)}${o.dialog || ''}</div></div>`
}
// Desktop editor at 1 280 px: app sidebar shown (xl), five tabs, « Défaire » / « Refaire », the save line (R0, U1 as built).
function desk(o) {
return `<div class="frame desk" style="height:${o.h || 900}px">${side()}<div class="main">
<div class="top"><span class="crumb">${CRUMB}</span>${ME}</div>
${header(o)}${tabs('Annotations', o)}
<div class="work u2">${o.body}</div></div>${o.dim ? '<div class="dback"></div>' : ''}</div>`
}
// Tablet at 1 180 px: no sidebar (menu button, choice 10 b as built), same tab row, 44 px controls.
function tablet(o) {
return `<div class="frame tab-frame" style="height:${o.h || 960}px"><div class="main">
<div class="top" style="padding:0 16px">${ico('menu')}<span class="crumb">Fiches officielles › Cheval, squelette et rachis › <b>Brouillon, version 4</b></span>${ME}</div>
${header(o)}${tabs('Annotations', o)}
<div class="work u2 tab">${o.body}</div></div>${o.dim ? '<div class="dback"></div>' : ''}</div>`
}
// Drawing marks (drawing units; u = units per screen px).
const RING = (a, u, r) => `<circle cx="${a.g[1]}" cy="${a.g[2]}" r="${(r || a.g[3]) + 6 * u}" fill="none" stroke="#1f1b16" stroke-width="${2.5 * u}"/>`
const GHOSTC = (x, y, r, u, k) => `<circle cx="${x}" cy="${y}" r="${r}" fill="${k.c}" fill-opacity="${k.o}" stroke="#fff" stroke-width="${6 * u}"/><circle cx="${x}" cy="${y}" r="${r}" fill="none" stroke="#b85a3f" stroke-width="${2.5 * u}" stroke-dasharray="${6 * u} ${4 * u}"/>`
const GHOSTP = (p, u, k) => `<polygon points="${pts(p)}" fill="${k.c}" fill-opacity="${k.o}" stroke="#fff" stroke-width="${6 * u}"/><polygon points="${pts(p)}" fill="none" stroke="#b85a3f" stroke-width="${2.5 * u}" stroke-dasharray="${6 * u} ${4 * u}"/>`
const OLD = (g, u) => g[0] === 'c' ? `<circle cx="${g[1]}" cy="${g[2]}" r="${g[3]}" fill="none" stroke="#6b6359" stroke-width="${1.5 * u}" stroke-dasharray="${4 * u} ${4 * u}"/>` : `<polygon points="${pts(g[1])}" fill="none" stroke="#6b6359" stroke-width="${1.5 * u}" stroke-dasharray="${5 * u} ${4 * u}"/>`
const ICON_AT = (name, x, y, u, s = 22, color = '#1f1b16') => `<g transform="translate(${x - s * u / 2} ${y - s * u / 2}) scale(${s * u / 24})"><circle cx="12" cy="12" r="15" fill="#fff" stroke="${color}" stroke-width="1.4"/><use href="#i-${name}" width="24" height="24" stroke="${color}" fill="none" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></g>`
const ARROW = (x, y, u) => `<path d="M${x} ${y}l0 ${18 * u}l${5 * u} ${-5 * u}l${4 * u} ${8 * u}l${3 * u} ${-1.5 * u}l${-4 * u} ${-8 * u}l${7 * u} 0z" fill="#1f1b16" stroke="#fff" stroke-width="${1.2 * u}"/>`
const FINGER = (x, y, u) => `<circle cx="${x}" cy="${y}" r="${20 * u}" fill="rgba(31,27,22,.16)" stroke="rgba(31,27,22,.45)" stroke-width="${1.2 * u}"/>`
const shift = (p, dx, dy) => p.map((q) => [q[0] + dx, q[1] + dy])
const toast = (text, o = {}) => `<div class="toastu ${o.err ? 'err' : ''}" role="status" style="${o.style || ''}"><span style="max-width:${o.w || 330}px;overflow:hidden;text-overflow:ellipsis">${text}</span>${o.err ? '' : '<span class="ua">Défaire</span>'}</div>`
// Dialogs (Dialog as built: rounded-2xl, header with the h2 and a 44 px ✕ « Fermer », body, footer actions).
// Proposal: annotation dialogs open over the overview column, at its width, so the drawing is never covered.
function dlgBox(o) {
return `<div class="dlgu ${o.static ? 'static' : ''}" role="dialog" aria-modal="true" style="width:${o.w || 352}px;${o.style || ''}"><div class="dh"><h2>${o.title}</h2><span class="dx ${o.big ? 'big' : ''}" title="Fermer">${ico('close')}</span></div><div class="db">${o.body}</div>${o.foot ? `<div class="df">${o.foot}</div>` : ''}</div>`
}
const fld = (label, val, o = {}) => `<div class="field"><label>${label}</label><span class="inp ${o.focus ? 'focus' : ''} ${o.bad ? 'bad' : ''}" style="${o.big ? 'height:44px;' : ''}">${val}${o.sel ? `<span class="caret">${ico('down', 'sm')}</span>` : ''}</span>${o.hint ? `<span class="small muted">${o.hint}</span>` : ''}</div>`
const swc = (id) => { const c = DOC.categories.find((x) => x.id === id); return `${sw(c.color, OPA[KEY[c.id]])}${c.fr}` }
const CHOOSE = '<span class="muted">Choisir…</span>'
// Read mode (as R2's FindingView): kind + status, values as text, then the action row (FindingActions order).
function readBody(a, o = {}) {
const rows = [['Nom (FR)', a.fr], ['Nom (EN)', a.en], ['Catégorie', swc(a.cat)], ['Couleur', 'Celle de la catégorie'], ['Latéralité', LAT[a.lat]], ['Région vertébrale', a.region ? REGION[a.region] : 'Aucune'], ['Zone de constats', a.zoneFr || 'Aucune'], ['Vue', viewName(a.view)]]
const dl = `<dl class="rd">${rows.map(([k, v]) => `<dt>${k}</dt><dd>${v}</dd>`).join('')}</dl>`
const acts = o.ro ? '' : `<div class="ractions" style="justify-content:flex-end">${B('Modifier', 'secondary', { big: o.big, icon: 'pen', focus: o.focusEdit })}${B('Modifier la forme', 'secondary', { big: o.big, icon: a.kind === 'point' ? 'point' : 'zone' })}${B(a.status === 'reviewed' ? 'Remettre à confirmer' : 'Marquer comme relu', 'secondary', { big: o.big, icon: 'check' })}${B('Supprimer', 'dangertxt', { big: o.big, icon: 'trash' })}</div>`
return `<div style="display:flex;align-items:center;gap:8px;font-size:13px"><span class="muted">${KIND[a.kind]}</span>${status(a.status)}</div>${dl}${acts}${o.saved ? '<div class="s13 muted" role="status">Modifications enregistrées</div>' : ''}`
}
const readDlg = (a, o = {}) => dlgBox({ title: nameOf(a), body: readBody(a, o), big: o.big, w: o.w, style: o.style, static: o.static })
function editBody(a, o = {}) {
return [fld('Nom (FR)', o.fr || a.fr, { focus: o.focus }), fld('Nom (EN)', a.en), fld('Catégorie', swc(a.cat), { sel: true }), fld('Couleur', '<span class="muted">Celle de la catégorie</span>', { hint: 'Laissez vide pour la couleur de la catégorie, ou indiquez une valeur hexadécimale (#rrggbb).' }), fld('Latéralité', LAT[a.lat], { sel: true }), fld('Région vertébrale', a.region ? REGION[a.region] : 'Aucune', { sel: true }), fld('Zone de constats', a.zoneFr || 'Aucune', { sel: true })].join('')
}
const DISCARD = `<div class="notice warn" style="flex-direction:column;align-items:stretch;gap:10px;width:100%"><b style="font-weight:600">Abandonner les modifications ?</b><div style="display:flex;gap:8px;justify-content:flex-end">${B('Continuer la saisie', 'secondary', { focus: true })}${B('Abandonner', 'danger')}</div></div>`
function createDlg(kind, o = {}) {
const body = [fld('Nom (FR)', o.fr || '', { focus: o.focusName }), fld('Nom (EN)', o.en || ''), fld('Catégorie', swc(o.cat || DOC.categories[0].id), { sel: true }), fld('Latéralité', o.lat ? LAT[o.lat] : CHOOSE, { sel: true, bad: o.err }), fld('Zone de constats', CHOOSE, { sel: true }), fld('Région vertébrale', CHOOSE, { sel: true })].join('')
const err = o.err ? '<div class="s13" role="alert" style="color:var(--color-danger-strong)">Choisissez la catégorie et la latéralité (et la vue ouverte pour un accès).</div>' : ''
const back = kind === 'point' ? 'Replacer le point' : 'Reprendre le tracé'
return dlgBox({ title: kind === 'point' ? 'Nouveau point' : 'Nouvelle zone', body: body + err, big: o.big, w: o.w, style: o.style, static: o.static,
foot: o.discard ? DISCARD : `${B(back, 'secondary', { big: o.big, icon: kind === 'point' ? 'point' : 'pen', style: 'margin-right:auto' })}${B('Abandonner', 'ghost', { big: o.big })}${B('Créer', 'primary', { big: o.big })}` })
}
const vig = (label, inner, w) => `<div class="vign" style="${w ? `width:${w}px` : ''}"><div class="lbl">${label}</div>${inner}</div>`
// A drawing crop with its strip, for the vignettes.
function crop(o) {
const w = o.w || 760, h = o.h || Math.round(w * o.vb[3] / o.vb[2])
return `<div class="frame" style="width:${w + 28}px;padding:14px;display:flex;flex-direction:column;gap:10px;${o.style || ''}">${o.strip || ''}<div class="canvas" style="flex:none;width:${w}px;height:${h}px;background:#fff;position:relative">${drawing({ w, h, vb: o.vb, view: o.view, faint: o.faint, hide: o.hide, extra: o.extra })}${o.over || ''}${o.dim ? '<div class="dback" style="border-radius:12px"></div>' : ''}</div>${o.after || ''}</div>`
}
</script>
<!-- ================================================================== 02 point creation -->
<div class="row"><div data-board="02-point-creation-desktop">
<p class="sheet-title">2. Ajouter un point : la taille se choisit dans le bandeau, un clic place le point, le dialogue « Nouveau point » s'ouvre seul, le point reste visible à côté</p>
<div id="b02"></div></div></div>
<script>
{
const vb = [1250, 760, 560, 420], vbc = [1330, 880, 400, 250]
const np = [1505, 1030], art = CATS.art
const NEW = { kind: 'point', fr: 'Tibia distal', status: 'to_confirm', g: ['c', np[0], np[1], 34] }
const main = desk({ dim: true, body: ws({ vb, tool: 'point', faint: true, addOff: true,
strip: strip({ act: true, lead: `${ico('point', 'sm')}Nouveau point`, text: 'Point placé · renseignez ses propriétés', actions: sizeSlider(34) }),
extra: (u) => GHOSTC(np[0], np[1], 34, u, art),
dialog: createDlg('point', { fr: 'Tibia distal|', en: 'Distal tibia', focusName: true }) }) })
const preview = (u) => `<circle cx="${np[0] + 15}" cy="${np[1] + 10}" r="34" fill="none" stroke="#b85a3f" stroke-width="${2 * u}" stroke-dasharray="${6 * u} ${4 * u}"/><path d="M${np[0] + 15 - 10 * u} ${np[1] + 10}h${20 * u}M${np[0] + 15} ${np[1] + 10 - 10 * u}v${20 * u}" stroke="#1f1b16" stroke-width="${1.6 * u}"/>`
const a = vig('A. Outil Point : la taille vient du bandeau (la plus utilisée dans la vue, ici celle des articulations), l\'aperçu suit le pointeur', crop({ vb: vbc, faint: true,
strip: strip({ lead: `${ico('point', 'sm')}Ajouter un point`, text: 'Cliquez dans le dessin pour placer le point', actions: sizeSlider(34) }), extra: preview }))
const c = vig('C. Après « Créer » : le point est sélectionné (outil Sélectionner), le message propose « Défaire »', crop({ vb: vbc,
strip: selStrip(NEW, { text: '' }),
extra: (u) => `<circle cx="${np[0]}" cy="${np[1]}" r="34" fill="${art.c}" fill-opacity="${art.o}" stroke="${art.c}" stroke-width="${2 * u}"/>${RING(NEW, u)}`,
over: toast('Point « Tibia distal » créé') }))
document.getElementById('b02').innerHTML = main
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1600px">${a}${c}</div>`
+ `<div style="display:flex;gap:12px;margin-top:12px;width:1280px">${note('<b>Ordre :</b> géométrie d\'abord, propriétés ensuite. Le clic place le point à la taille du bandeau ; le dialogue s\'ouvre aussitôt, ancré sur la colonne de droite à sa largeur (22 rem) : il ne couvre jamais le dessin, le point placé reste visible sous le voile, détouré de blanc et cerclé en pointillé. Pendant la création, les autres annotations sont estompées et ne se sélectionnent pas : rien ne peut faire perdre la saisie sans le dire.')}${note('<b>Dialogue « Nouveau point » :</b> champs de la création actuelle (CreationFields) ; catégorie préremplie avec la première, latéralité sans valeur par défaut (« Choisir… », arbitrage A4). « Replacer le point » ferme le dialogue en gardant la saisie, le point se glisse puis « Continuer » rouvre le dialogue ; « Abandonner » retire le point et demande d\'abord si quelque chose a été saisi ; « Créer » écrit le point et ses propriétés en une seule modification (un seul « Défaire »). Clavier : « Ajouter un point » place le point au centre et ouvre le même dialogue.')}</div>`
}
</script>
<!-- ================================================================== 03 point modification -->
<div class="row"><div data-board="03-point-modification-desktop">
<p class="sheet-title">3. Modifier un point : sélection sans dialogue, le point se glisse, sa taille se règle au curseur du bandeau ; les propriétés s'ouvrent d'un clic sur le point sélectionné</p>
<div id="b03"></div></div></div>
<script>
{
const vb = [1250, 760, 560, 420], vbc = [1330, 800, 400, 250]
const nw = [1478, 934]
const MOVED = { ...STIFLE, g: ['c', nw[0], nw[1], 34] }
const art = CATS.art
const at = (g, r) => `<circle cx="${g[0]}" cy="${g[1]}" r="${r}" fill="${art.c}" fill-opacity="${art.o}" stroke="${art.c}" stroke-width="2"/>`
const main = desk({ body: ws({ vb, hide: [STIFLE.fr], sel: 'stifle',
strip: selStrip(STIFLE),
extra: (u) => `${OLD(STIFLE.g, u)}${at(nw, 34)}${RING(MOVED, u)}`,
over: toast(`Point « ${STIFLE.fr} » déplacé`, { w: 300 }) }) })
const b = vig('B. Taille : le curseur s\'aimante sur les tailles de la vue (30 et 34), sans nombre ; le trait rouge est le minimum du cœur', crop({ vb: vbc, hide: [STIFLE.fr],
strip: selStrip(STIFLE, { r: 30, focusSize: true }),
extra: (u) => `${OLD(STIFLE.g, u)}${at([STIFLE.g[1], STIFLE.g[2]], 30)}${RING(STIFLE, u, 30)}` }))
const c = vig('C. Un clic sans déplacement sur le point déjà sélectionné, un double-clic, Entrée ou « Propriétés » : le dialogue s\'ouvre en lecture', readDlg(STIFLE, { static: true }), 360)
document.getElementById('b03').innerHTML = main
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1280px;align-items:flex-start">${b}${c}</div><div style="display:flex;gap:12px;margin-top:12px;width:1280px">${note('<b>Glisser :</b> appuyer sur le point puis bouger au-delà de 4 px (souris) le déplace ; l\'aperçu suit le pointeur, la position est proposée au cœur au relâchement (une modification, un « Défaire »). Le contour pointillé gris montre l\'ancienne place pendant le geste. Un glisser n\'ouvre jamais le dialogue.<br><br><b>Message :</b> « Point « … » déplacé · Défaire », 6 s, en bas du dessin, annoncé poliment ; « Défaire » annule la même entrée que le bouton de l\'en-tête.<br><br><b>Bandeau :</b> nom et statut, curseur de taille, « Propriétés », « Désélectionner ». Aucune coordonnée.')}</div>`
}
</script>
<!-- ================================================================== 04 zone creation -->
<div class="row"><div data-board="04-zone-creation-desktop">
<p class="sheet-title">4. Ajouter une zone : un clic par sommet, commandes du tracé dans le bandeau ; à la fermeture, le dialogue « Nouvelle zone » s'ouvre seul et la forme reste dessinée</p>
<div id="b04"></div></div></div>
<script>
{
const vb = [1300, 840, 520, 390], vbc = [1330, 900, 400, 250]
const p = [[1430, 1060], [1500, 1035], [1585, 1050], [1610, 1110], [1570, 1180]]
const cur = [1470, 1172]
const os = CATS.os
const main = desk({ dim: true, body: ws({ vb, tool: 'zone', faint: true, addOff: true,
strip: strip({ act: true, lead: `${ico('zone', 'sm')}Nouvelle zone`, text: 'Tracé fermé · 5 sommets · renseignez ses propriétés' }),
extra: (u) => GHOSTP(p, u, os),
dialog: createDlg('zone', { fr: 'Tibia', en: 'Tibia', cat: 'os' }) }) })
const tracing = (u) => `<polygon points="${pts([...p, cur])}" fill="#b85a3f" fill-opacity=".12" stroke="none"/><polyline points="${pts(p)}" fill="none" stroke="#b85a3f" stroke-width="${2.5 * u}"/><path d="M${p[4]}L${cur}" stroke="#b85a3f" stroke-width="${2 * u}" stroke-dasharray="${5 * u} ${4 * u}"/><path d="M${cur}L${p[0]}" stroke="#b85a3f" stroke-width="${1.2 * u}" stroke-dasharray="${3 * u} ${4 * u}" opacity=".6"/>${p.map((q, i) => V(q[0], q[1], u, false, false)).join('')}<circle cx="${p[0][0]}" cy="${p[0][1]}" r="${12 * u}" fill="none" stroke="#b85a3f" stroke-width="${2 * u}"/>${ARROW(cur[0], cur[1], u)}`
const a = vig('A. Tracé en cours : bandeau fixe hors du dessin, annotations estompées et non sélectionnables', crop({ vb: vbc, faint: true,
strip: strip({ act: true, lead: `${ico('zone', 'sm')}5 sommets posés`, text: '', actions: `${B('Fermer le tracé', 'primary', { icon: 'check' })}${B('Retirer le dernier sommet', 'secondary', { icon: 'undo' })}${B('Annuler le tracé', 'ghost')}` }), extra: tracing }))
const resumed = (u) => `<polygon points="${pts(p)}" fill="${os.c}" fill-opacity="${os.o}" stroke="#b85a3f" stroke-width="${2.5 * u}" stroke-dasharray="${6 * u} ${4 * u}"/>${polyEdit(p, u, {})}`
const c = vig('C. « Reprendre le tracé » : le dialogue se ferme, la saisie est gardée, la forme se corrige au doigt ou à la souris', crop({ vb: vbc, faint: true,
strip: strip({ act: true, lead: `${ico('zone', 'sm')}Nouvelle zone · tracé repris`, text: '', actions: `${B('Continuer', 'primary')}${B('Abandonner', 'ghost')}` }), extra: resumed }))
document.getElementById('b04').innerHTML = main
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1600px">${a}${c}</div>`
+ `<div style="display:flex;gap:12px;margin-top:12px;width:1280px">${note('<b>Tracé :</b> un clic par sommet ; fermeture sur le premier sommet (cerclé), par Entrée ou « Fermer le tracé » (3 sommets au moins) ; Retour arrière ou « Retirer le dernier sommet » enlève le dernier ; Échap ou « Annuler le tracé » abandonne sans rien écrire. Le bandeau a une hauteur fixe : le dessin ne bouge pas quand il change.')}${note('<b>Fermeture :</b> le dialogue « Nouvelle zone » s\'ouvre sur la colonne de droite, la zone tracée reste visible (fond de sa catégorie, contour pointillé). « Créer » écrit forme et propriétés en une modification. Le cœur refuse une zone trop étroite à la fermeture : le tracé reste ouvert avec son message (planche 33 A). Un accès (« Accès à une vue détaillée ») suit le même parcours, dialogue « Nouvel accès ».')}</div>`
}
</script>
<!-- ================================================================== 05 zone handles -->
<div class="row"><div data-board="05-zone-poignees-desktop">
<p class="sheet-title">5. Zone sélectionnée : sommets, « + » au milieu de chaque segment, bulle « − » sur le sommet choisi ; à la souris, glisser l'intérieur déplace la zone</p>
<div id="b05"></div></div></div>
<script>
{
const vb = [800, 345, 345, 259], vbc = [800, 345, 345, 259]
const thor = annById.thoracic, vert = CATS.vert
const main = desk({ body: ws({ vb, sel: 'thoracic',
strip: selStrip(thor, { text: '9 sommets · sommet 7 choisi' }),
extra: (u) => `${polyEdit(THOR, u, { on: 6 })}${ICON_AT('move', 965, 520, u, 26)}` }) })
const mid = [(THOR[1][0] + THOR[2][0]) / 2, (THOR[1][1] + THOR[2][1]) / 2]
const added = [THOR[0], THOR[1], mid, ...THOR.slice(2)]
const fill = (p) => `<polygon points="${pts(p)}" fill="${vert.c}" fill-opacity="${vert.o}" stroke="none"/>`
const a = vig('A. « + » ajoute un sommet au milieu du segment, déjà choisi pour être glissé', crop({ w: 392, vb: vbc, hide: [thor.fr],
extra: (u) => `${fill(added)}${polyEdit(added, u, { on: 2 })}`, over: toast('Sommet ajouté', { style: 'bottom:10px' }) }))
const dragged = THOR.map((q, i) => i === 3 ? [q[0] - 18, q[1] + 26] : q)
const b = vig('B. Glisser un sommet : aperçu pendant le geste, le cœur valide au relâchement', crop({ w: 392, vb: vbc, hide: [thor.fr],
extra: (u) => `${OLD(['p', THOR], u)}${fill(dragged)}${polyEdit(dragged, u, { on: 3, minus: false, noPlus: true })}${ARROW(dragged[3][0] + 4 * u, dragged[3][1] + 4 * u, u)}` }))
const removed = THOR.filter((_, i) => i !== 6)
const c = vig('C. « − » retire le sommet choisi ; refusé sous 3 sommets (bulle grisée)', crop({ w: 392, vb: vbc, hide: [thor.fr],
extra: (u) => `${fill(removed)}${polyEdit(removed, u, {})}`, over: toast('Sommet retiré', { style: 'bottom:10px' }) }))
document.getElementById('b05').innerHTML = main
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1304px">${a}${b}${c}</div>`
+ `<div style="display:flex;gap:12px;margin-top:12px;width:1280px">${note('<b>Sur le dessin, sans dialogue :</b> glisser un sommet ; « + » sur un segment ; « − » sur le sommet choisi (un clic sur un sommet le choisit) ; glisser l\'intérieur de la zone sélectionnée la déplace (souris, choix 1 a). Chaque geste est une modification et un « Défaire ». Les poignées ne s\'affichent que sur la zone sélectionnée.')}${note('<b>Bandeau :</b> nom et statut, nombre de sommets et sommet choisi, « Déplacer la zone » (mode explicite, pour le doigt et le clavier), « Redessiner », « Propriétés », « Désélectionner ». Colonne de droite : la ligne de la zone est marquée dans « Annotations de la vue ». Les zones à courbes restent hors U2 (lot courbes) : elles se sélectionnent, sans poignée ni déplacement.')}</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 (glisser direct à la souris, mode explicite au doigt et au clavier) et la redessiner (l'ancien contour reste jusqu'à la fermeture)</p>
<div id="b06"></div></div></div>
<script>
{
const vbc = [760, 330, 440, 275]
const thor = annById.thoracic, vert = CATS.vert
const moved = shift(THOR, 28, -22)
const a = vig('A. Souris : glisser l\'intérieur de la zone sélectionnée la déplace tout de suite', crop({ vb: vbc, hide: [thor.fr],
strip: selStrip(thor, { text: '' }),
extra: (u) => `${OLD(['p', THOR], u)}<polygon points="${pts(moved)}" fill="${vert.c}" fill-opacity="${vert.o}" stroke="#1f1b16" stroke-width="${2 * u}"/>${ICON_AT('move', 990, 470, u, 26)}`,
after: '<div class="s13 muted">Au relâchement : « Zone « Vertèbres thoraciques » déplacée · Défaire ».</div>' }))
const b = vig('B. Doigt ou clavier : « Déplacer la zone » ouvre un mode explicite, validé ou annulé', crop({ vb: vbc, hide: [thor.fr],
strip: strip({ act: true, lead: `${ico('move', 'sm')}Déplacer la zone`, text: 'Glissez n\'importe où · flèches au clavier', actions: `${B('Valider la position', 'primary', { icon: 'check' })}${B('Annuler', 'secondary')}` }),
extra: (u) => `${OLD(['p', THOR], u)}<polygon points="${pts(moved)}" fill="${vert.c}" fill-opacity="${vert.o}" stroke="#1f1b16" stroke-width="${2 * u}"/>${FINGER(990, 470, u)}`,
after: '<div class="s13 muted">Hors de ce mode, un doigt sur l\'intérieur ne déplace rien : il fait défiler le dessin zoomé.</div>' }))
const redraw = [[835, 430], [900, 470], [985, 488], [1070, 500], [1105, 520]]
const cur = [1095, 556]
const c = vig('C. « Redessiner » : nouveau tracé par-dessus l\'ancien contour, qui reste en repère jusqu\'à la fermeture', crop({ w: 900, vb: [760, 330, 440, 220], faint: true, hide: [thor.fr],
strip: strip({ act: true, lead: `${ico('pen', 'sm')}Redessiner · Vertèbres thoraciques`, text: '5 sommets posés', actions: `${B('Fermer le tracé', 'primary', { icon: 'check' })}${B('Retirer le dernier sommet', 'secondary', { icon: 'undo' })}${B('Annuler le tracé', 'ghost')}` }),
extra: (u) => `<polygon points="${pts(THOR)}" fill="${vert.c}" fill-opacity=".10" stroke="${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}"/><path d="M${redraw[4]}L${cur}" stroke="#b85a3f" stroke-width="${2 * u}" stroke-dasharray="${5 * u} ${4 * u}"/>${redraw.map((q) => V(q[0], q[1], u)).join('')}<circle cx="${redraw[0][0]}" cy="${redraw[0][1]}" r="${12 * u}" fill="none" stroke="#b85a3f" stroke-width="${2 * u}"/>${ARROW(cur[0], cur[1], u)}` }))
document.getElementById('b06').innerHTML = `<div style="display:flex;gap:20px;width:1600px">${a}${b}</div>`
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1280px;align-items:flex-start">${c}${note('<b>Redessiner :</b> à la fermeture, la nouvelle forme remplace l\'ancienne en une modification ; nom, catégorie, latéralité, région vertébrale, zone de constats et statut sont gardés. Un seul « Défaire » rend l\'ancienne forme. « Annuler le tracé » ou Échap : rien ne change. Le cœur refuse une forme trop étroite : le tracé reste ouvert avec son message.<br><br><b>Déplacer :</b> un déplacement validé est une modification, un « Défaire ». En mode explicite, Entrée valide et Échap annule.', 'width:340px')}</div>`
}
</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, bandeau en 44 px ; toucher la zone sélectionnée ouvre ses propriétés</p>
<div id="b13"></div></div></div>
<script>
{
const vb = [800, 345, 345, 259]
const thor = annById.thoracic, vert = CATS.vert
const main = tablet({ h: 1000, body: ws({ vb, cw: 694, big: true, sel: 'thoracic',
strip: selStrip(thor, { big: true, text: '' }),
extra: (u) => `${polyEdit(THOR, u, { on: 6, big: true })}${HIT(THOR[2][0], THOR[2][1], u)}` }) })
const moved = shift(THOR, 24, -18)
const c = vig('C. Déplacer au doigt : mode explicite depuis le bandeau', crop({ w: 560, vb: [760, 330, 440, 283], hide: [thor.fr],
strip: strip({ big: true, act: true, lead: `${ico('move', 'sm')}Déplacer la zone`, text: '', actions: `${B('Valider la position', 'primary', { big: true, icon: 'check' })}${B('Annuler', 'secondary', { big: true })}` }),
extra: (u) => `${OLD(['p', THOR], u)}<polygon points="${pts(moved)}" fill="${vert.c}" fill-opacity="${vert.o}" stroke="#1f1b16" stroke-width="${2 * u}"/>${FINGER(985, 470, u)}` }))
const b = vig('B. Toucher la zone déjà sélectionnée : propriétés en lecture, boutons de 44 px', readDlg(thor, { static: true, big: true }), 360)
document.getElementById('b13').innerHTML = main
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1180px;align-items:flex-start">${b}${c}</div>`
+ `<div style="display:flex;gap:12px;margin-top:12px;width:1180px">${note('<b>Gestes :</b> toucher une annotation la sélectionne ; toucher l\'annotation déjà sélectionnée ouvre ses propriétés ; un doigt sur une poignée la déplace ; un doigt ailleurs fait défiler le dessin zoomé ; deux doigts zooment. Sommet 18 px visibles, « + » 24 px, bulle « − » 44 × 36 px, chaque poignée répond dans un cercle de 44 px (pointillé sur le 3e sommet) ; si deux poignées se chevauchent, la plus proche du doigt gagne.')}${note('<b>Mise en page :</b> comme construite à 1 180 px, sans barre latérale (bouton menu), dessin 694 px, colonne de droite 352 px. Le dialogue s\'ouvre sur cette colonne : un toucher près du bord droit du dessin ne fait jamais apparaître le dialogue sous le doigt sur la forme. Seuil de glisser au doigt plus large qu\'à la souris (réglé au plan U2).')}</div>`
}
</script>
<!-- ================================================================== 31 dialogs -->
<div class="row"><div data-board="31-dialogue-proprietes-etats">
<p class="sheet-title">31. Dialogue des propriétés : lecture, modification transactionnelle, sortie avec saisie en cours, suppression, lecture seule</p>
<div id="b31"></div></div></div>
<script>
{
const thor = annById.thoracic
const a = vig('A. Point, en lecture', readDlg(STIFLE, { static: true }), 360)
const b = vig('B. Zone, en lecture (après « Enregistrer »)', readDlg(thor, { static: true, saved: true }), 360)
const c = vig('C. « Modifier » : formulaire, un enregistrement = une modification', dlgBox({ static: true, title: STIFLE.fr, body: editBody(STIFLE, { focus: true }), foot: `${B('Annuler', 'ghost')}${B('Enregistrer', 'primary')}` }), 360)
const d = vig('D. Fermer (✕, Échap, Retour) avec une saisie en cours : la question remplace les boutons', dlgBox({ static: true, title: STIFLE.fr, body: editBody(STIFLE, { fr: 'Grasset (fémoro-tibiale)' }), foot: DISCARD }), 360)
const del = `<div style="position:relative;width:470px;height:470px">${readDlg(STIFLE, { static: true, style: 'width:352px' })}<div class="dback" style="border-radius:16px"></div>
<div class="dlgu" style="top:130px;left:11px;right:auto;width:448px"><div class="dh"><h2>Supprimer « ${STIFLE.fr} » ?</h2><span class="dx">${ico('close')}</span></div><div class="db"><div class="s14">Supprimer « ${STIFLE.fr} » du brouillon ?</div></div><div class="df">${B('Annuler', 'secondary')}${B('Supprimer', 'danger')}</div></div></div>`
const e = vig('E. « Supprimer » : confirmation existante, posée sur le dialogue', del, 470)
const f = vig('F. Fiche en lecture seule : valeurs seules, aucune action', readDlg(STIFLE, { static: true, ro: true }), 360)
document.getElementById('b31').innerHTML = `<div style="display:flex;gap:24px;width:1500px;align-items:flex-start">${a}${b}${c}${d}</div>`
+ `<div style="display:flex;gap:24px;margin-top:20px;width:1500px;align-items:flex-start">${e}${f}<div style="display:flex;flex-direction:column;gap:12px;width:560px">${note('<b>Lecture d\'abord</b> (comme le dialogue d\'un constat, R2) : titre = nom de l\'annotation, type et statut, valeurs en texte, puis « Modifier », « Modifier la forme », « Marquer comme relu » (ou « Remettre à confirmer ») et « Supprimer ». « Modifier la forme » ferme le dialogue, garde la sélection et met le focus sur la première poignée.')}${note('<b>Modifier :</b> formulaire transactionnel (aujourd\'hui chaque champ s\'écrit seul, une entrée d\'historique par champ) ; « Enregistrer » écrit tout en une modification, un seul « Défaire » ; « Annuler » revient à la lecture. Couleur : champ actuel gardé, avec son aide. Une saisie en cours n\'est jamais perdue sans question (« Continuer la saisie » ou « Abandonner »).')}${note('<b>Historique du navigateur :</b> le dialogue est une couche, comme celui d\'un constat ; Retour le ferme (en demandant d\'abord si une saisie est en cours). Le geste sur le dessin, le tracé et le mode « Déplacer la zone » ne sont pas des entrées : Échap les termine.')}</div></div>`
}
</script>
<!-- ================================================================== 32 rules -->
<div class="row"><div data-board="32-ouverture-gestes-clavier">
<p class="sheet-title">32. Quand le dialogue s'ouvre, et quand il ne s'ouvre pas ; touche Échap ; clavier pour chaque geste ; retour du focus</p>
<div id="b32"></div></div></div>
<script>
{
const step = (n, t, cls = '') => `<div class="st ${cls}"><span class="no">${n}</span><span>${t}</span></div>`
const rec = `<div class="ccard" style="width:560px"><h2 style="font-size:18px">Proposé (arbitrage A1)</h2><div class="steps">
${step(1, 'Clic ou toucher <b>sans déplacement</b> sur une annotation : elle est sélectionnée (poignées, bandeau, ligne marquée dans la liste). <b>Aucun dialogue.</b>', 'good')}
${step(2, 'Glisser le point, un sommet, « + », « − », ou l\'intérieur de la zone (souris) : le geste se fait aussitôt. Un appui qui bouge au-delà du seuil n\'ouvre jamais rien.', 'good')}
${step(3, 'Ouvrir les propriétés : clic sans déplacement sur l\'annotation <b>déjà sélectionnée</b>, double-clic sur une annotation, Entrée sur sa ligne dans la liste, ou « Propriétés » dans le bandeau.', 'good')}
${step(4, 'Création : « Nouveau point » ou « Nouvelle zone » s\'ouvre seul après le placement du point ou la fermeture du tracé.', 'good')}
</div><div class="s13 muted">Coût : un clic de plus pour lire les propriétés, compensé par le bandeau qui montre le nom et le statut dès la sélection.</div></div>`
const ori = `<div class="ccard" style="width:560px"><h2 style="font-size:18px">Orientation du 14 novembre, règle 1</h2><div class="steps">
${step(1, 'Clic sans déplacement sur une annotation : elle est sélectionnée <b>et</b> son dialogue s\'ouvre en lecture.')}
${step(2, 'Le dialogue est modal : tant qu\'il est ouvert, le dessin ne répond plus. Pour glisser un sommet, il faut d\'abord le fermer (✕ ou Échap).', 'bad')}
${step(3, 'Sélectionner une autre zone pour la corriger rouvre un dialogue à chaque fois.', 'bad')}
${step(4, 'Création : identique.')}
</div><div class="s13 muted">Coût : une fermeture de dialogue avant chaque correction de forme ; c'est ce que la demande « sans que les modales gênent les gestes » cherche à éviter.</div></div>`
const escRows = [
['Dialogue ouvert', 'le ferme ; une saisie en cours demande d\'abord', 'Propriétés, Nouveau point, Supprimer'],
['Menu ouvert', 'ferme le menu, focus sur son bouton', 'Menu « Plus » (moins de 640 px)'],
['Volet contextuel', 'ferme le volet, focus sur son déclencheur', 'Références d\'un constat'],
['Tracé, redessin ou « Déplacer la zone »', 'l\'abandonne, rien n\'est écrit', 'Ajouter une zone, Redessiner'],
['Création en attente', 'abandonne la création ; une saisie demande d\'abord', '« Replacer le point », « Reprendre le tracé »'],
['Sommet choisi', 'le déchoisit, la zone reste sélectionnée', 'bulle « − » visible'],
['Sélection', 'désélectionne', 'Annotation sélectionnée'],
]
const esc = `<div class="frame" style="width:560px;padding:12px 14px"><div class="lbl" style="font-weight:600;font-size:13px;margin-bottom:6px">Touche Échap : la première situation qui s'applique la consomme</div><table class="esc"><tr><th></th><th>Situation</th><th>Échap</th><th>Exemples</th></tr>${escRows.map(([s, e, x], i) => `<tr><td class="n">${i + 1}</td><td><b style="font-weight:600">${s}</b></td><td>${e}</td><td class="muted">${x}</td></tr>`).join('')}</table></div>`
const kRows = [
['Sélectionner une annotation', 'Tab jusqu\'à sa ligne dans « Annotations de la vue », Entrée'],
['Ouvrir ses propriétés', 'Entrée sur la ligne de l\'annotation sélectionnée, ou « Propriétés »'],
['Passer aux poignées', '« Modifier la forme » (dialogue) : focus sur la première poignée ; Tab et Maj+Tab de l\'une à l\'autre'],
['Déplacer point, sommet ou zone', 'flèches (Maj : pas de 10) ; une série de touches = une modification, écrite au relâchement'],
['Ajouter, retirer un sommet', 'Inser ajoute après le sommet choisi ; Suppr le retire'],
['Taille d\'un point', 'curseur du bandeau : flèches, Page haut et Page bas pour le cran suivant'],
['Valider, annuler', 'Entrée valide un tracé ou un déplacement ; Échap l\'annule'],
]
const keys = `<div class="frame" style="width:560px;padding:12px 14px"><div class="lbl" style="font-weight:600;font-size:13px;margin-bottom:6px">Clavier : une voie sans glisser pour chaque geste (WCAG 2.5.7)</div><table class="esc">${kRows.map(([s, e]) => `<tr><td style="width:190px"><b style="font-weight:600">${s}</b></td><td>${e}</td></tr>`).join('')}</table><div class="small muted" style="margin-top:8px">Sans poignée focalisée, les flèches font toujours défiler le dessin, comme aujourd'hui.</div></div>`
const fRows = [
['Dialogue de propriétés ouvert', 'premier contrôle du dialogue (règle du dialogue natif, D13)'],
['Dialogue fermé (✕, Échap, Retour, Annuler)', 'la ligne de l\'annotation dans la liste ; si un filtre la cache, le dessin'],
['« Modifier la forme »', 'la première poignée de la forme sélectionnée'],
['« Créer » réussi', 'la ligne de la nouvelle annotation (sélectionnée)'],
['« Abandonner » une création', 'le bouton de l\'outil, ou « Ajouter un point / une zone » au clavier'],
]
const focus = `<div class="frame" style="width:560px;padding:12px 14px"><div class="lbl" style="font-weight:600;font-size:13px;margin-bottom:6px">Retour du focus</div><table class="esc">${fRows.map(([s, e]) => `<tr><td style="width:240px"><b style="font-weight:600">${s}</b></td><td>${e}</td></tr>`).join('')}</table></div>`
document.getElementById('b32').innerHTML = `<div style="display:flex;gap:24px;width:1150px">${rec}${ori}</div>`
+ `<div style="display:flex;gap:24px;margin-top:20px;width:1150px;align-items:flex-start">${esc}${keys}</div>`
+ `<div style="display:flex;gap:24px;margin-top:20px;width:1150px;align-items:flex-start">${focus}${note('<b>Seuil :</b> un appui devient un geste au-delà de 4 px à la souris (valeur actuelle) ; au doigt, un seuil plus large évite qu\'un toucher tremblé déplace une forme (valeur fixée au plan U2). Un geste n\'ouvre jamais de dialogue, un dialogue n\'apparaît jamais pendant un geste.<br><br><b>Ce qui ne change pas :</b> « Défaire » et « Refaire » dans l\'en-tête, inactifs pendant qu\'un dialogue est ouvert, comme aujourd\'hui.', 'width:560px')}</div>`
}
</script>
<!-- ================================================================== 33 states -->
<div class="row"><div data-board="33-refus-et-etats">
<p class="sheet-title">33. Refus et états : fermeture refusée, latéralité manquante, déplacement refusé, trop de sommets, lecture seule</p>
<div id="b33"></div></div></div>
<script>
{
const vbc = [1330, 880, 400, 250]
const sliver = [[1400, 1000], [1600, 1010], [1602, 1016], [1402, 1007]]
const a = vig('A. Fermeture refusée par le cœur : le tracé reste ouvert, le message est dans le bandeau', crop({ vb: vbc, faint: true,
strip: strip({ alert: true, lead: `${ico('alert', 'sm')}Fermeture refusée`, text: 'L\'intérieur d\'une zone est trop étroit pour être touché sur mobile.', actions: `${B('Retirer le dernier sommet', 'secondary', { icon: 'undo' })}${B('Annuler le tracé', 'ghost')}` }),
extra: (u) => `<polygon points="${pts(sliver)}" fill="#b85a3f" fill-opacity=".14" stroke="#b85a3f" stroke-width="${2.5 * u}"/>${sliver.map((q) => V(q[0], q[1], u)).join('')}` }))
const b = vig('B. « Créer » sans latéralité : le champ est signalé, rien n\'est écrit', createDlg('point', { static: true, fr: 'Tibia distal', en: 'Distal tibia', err: true }), 360)
const art = CATS.art
const c = vig('C. Déplacement refusé : le point reprend sa place, le message le dit', crop({ vb: [1330, 780, 400, 250],
strip: selStrip(STIFLE),
extra: (u) => `${RING(STIFLE, u)}<circle cx="${STIFLE.g[1] + 150}" cy="${STIFLE.g[2] - 120}" r="34" fill="none" stroke="#c0392b" stroke-width="${1.5 * u}" stroke-dasharray="${4 * u} ${4 * u}"/>`,
over: toast('Déplacement refusé : le point ne tient pas à l\'endroit choisi. Il garde sa place.', { err: true, w: 520 }) }))
const cerv = annById.cervical
const d = vig('D. Plafond de poignées (T18) : au-delà, contour seul et message ; « Redessiner » reste possible', crop({ vb: [380, 180, 560, 350], hide: [cerv.fr],
strip: strip({ lead: `${leadOf(cerv)}`, text: 'Trop de sommets pour les poignées : utilisez « Redessiner ».', actions: `${B('Redessiner', 'secondary', { icon: 'pen' })}${B('Propriétés', 'secondary', { icon: 'file' })}` }),
extra: (u) => `<polygon points="${pts(cerv.g[1])}" fill="${CATS.vert.c}" fill-opacity="${CATS.vert.o}" stroke="#1f1b16" stroke-width="${2 * u}"/>` }))
const e = vig('E. Fiche en lecture seule : sélection et propriétés en lecture, ni poignée ni curseur', crop({ vb: [1330, 780, 400, 250],
strip: selStrip(STIFLE, { ro: true }), extra: (u) => RING(STIFLE, u) }))
document.getElementById('b33').innerHTML = `<div style="display:flex;gap:20px;width:1600px;align-items:flex-start">${a}${b}</div>`
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1600px">${c}${d}</div>`
+ `<div style="display:flex;gap:20px;margin-top:16px;width:1600px;align-items:flex-start">${e}<div style="display:flex;flex-direction:column;gap:12px;width:600px">${note('<b>Messages :</b> les refus viennent du cœur, avec ses mots, comme aujourd\'hui (texte de C : exemple, le libellé exact sera celui du cœur). Le bandeau garde sa hauteur quand il passe en refus : le dessin ne bouge pas. Un refus d\'un geste rend la forme exacte d\'avant, au point près.')}${note('<b>Plafond (T18) :</b> le nombre est fixé au plan U2 à partir des formes équines, avec une marge ; aucune zone équine ne l\'atteint (la zone cervicale, 17 sommets, sert ici d\'illustration). <b>Lecture seule :</b> mêmes règles d\'ouverture ; le dialogue n\'a aucune action (planche 31 F).')}</div></div>`
}
</script>
</body>
</html>
@@ -0,0 +1,62 @@
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Faunosteo V1-2.6 U2, planche-contact</title>
<!--
Contact sheet of the nine U2 boards (02 to 06, 13, 31 to 33), grouped by step of the journey. It only shows the PNGs of
this folder, scaled down by the browser; it never redraws them. Rendered to planche-contact.png by
../v1-2-6/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: 340px; 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>U2 : manipulation graphique des annotations</h1>
<p class="lede">V1-2.6 · géométrie sur le dessin, propriétés dans un dialogue, création par placement ou tracé puis dialogue</p></div>
<div class="meta"><span class="tag">Proposition, non validée</span><br>Brief du 17/11/2026, orientation du 14/11/2026 · branche feature/v1-2-anatomical-sheets<br>Sources : maquettes.html et data.js, rendu par render.cjs</div>
</header>
<div class="flow" id="flow"></div>
</div>
<script>
const STAGES = [
['Points', 'Créer et modifier un point', [['02-point-creation-desktop', '02', 'Placer, puis « Nouveau point »'], ['03-point-modification-desktop', '03', 'Glisser, taille, propriétés']]],
['Zones', 'Tracer, corriger, déplacer, redessiner', [['04-zone-creation-desktop', '04', 'Tracer, puis « Nouvelle zone »'], ['05-zone-poignees-desktop', '05', 'Sommets, « + », « − »'], ['06-zone-deplacer-redessiner-desktop', '06', 'Déplacer et redessiner']]],
['Au doigt', 'Tablette 1 180 px', [['13-tablette-tactile', '13', 'Poignées de 44 px, toucher']]],
['Règles', 'Dialogue, clavier, refus', [['31-dialogue-proprietes-etats', '31', 'Lecture, modification, sortie'], ['32-ouverture-gestes-clavier', '32', 'Ouverture, Échap, clavier, focus'], ['33-refus-et-etats', '33', 'Refus et lecture seule']]],
]
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: 778 KiB