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

+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>