/* =====================================================================
   HANGAR7 — feuille de style de référence
   Direction artistique « plan technique » (cyanotype / tirage blanc).
   Tout est préfixé h7- pour cohabiter avec n'importe quel projet.
   Ordre : 1. Tirages (tokens) · 2. Base · 3. Typo · 4. Structure de feuille
           5. Navigation · 6. Boutons · 7. Formulaires · 8. Données
           9. Retours · 10. Dessin SVG · 11. Mouvement · 12. Curseur
           13. Responsive · 14. Mouvement réduit
   ===================================================================== */

/* ---------- 1. TIRAGES (tokens) ---------- */
/* @property permet d'animer le changement de tirage (fondu des couleurs). */
@property --h7-paper   { syntax: "<color>"; inherits: true; initial-value: #1C3F75; }
@property --h7-paper-2 { syntax: "<color>"; inherits: true; initial-value: #183868; }
@property --h7-ink     { syntax: "<color>"; inherits: true; initial-value: #EAF2FF; }
@property --h7-ink-2   { syntax: "<color>"; inherits: true; initial-value: #A9C2E8; }
@property --h7-pencil  { syntax: "<color>"; inherits: true; initial-value: #FFD166; }
@property --h7-ok      { syntax: "<color>"; inherits: true; initial-value: #7EE0C3; }
@property --h7-err     { syntax: "<color>"; inherits: true; initial-value: #FF9B8A; }

:root {
  /* Tirage par défaut : CYANO (bleu de Prusse, trait blanc) */
  --h7-paper: #1C3F75;
  --h7-paper-2: #183868;
  --h7-ink: #EAF2FF;
  --h7-ink-2: #A9C2E8;
  --h7-pencil: #FFD166;
  --h7-ok: #7EE0C3;
  --h7-err: #FF9B8A;

  /* Dérivés : toujours calculés depuis l'encre, ils suivent le tirage */
  --h7-line: color-mix(in srgb, var(--h7-ink) 55%, transparent);
  --h7-line-soft: color-mix(in srgb, var(--h7-ink) 22%, transparent);
  --h7-grid: color-mix(in srgb, var(--h7-ink) 6%, transparent);
  --h7-grid-2: color-mix(in srgb, var(--h7-ink) 13%, transparent);
  --h7-fill: color-mix(in srgb, var(--h7-ink) 5%, transparent);
  --h7-fill-2: color-mix(in srgb, var(--h7-ink) 9%, transparent);

  /* Typographie */
  --h7-display: "IBM Plex Sans Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --h7-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --h7-fs-xs: 9.5px;  --h7-fs-sm: 11px;  --h7-fs-base: 14px;  --h7-fs-md: 16px;
  --h7-fs-h3: 21px;   --h7-fs-h2: clamp(30px, 4vw, 46px);   --h7-fs-h1: clamp(38px, 5.4vw, 68px);

  /* Grille et espacements : tout est multiple de 8 (grille mineure) */
  --h7-u: 8px;        --h7-major: 40px;
  --h7-s1: 4px; --h7-s2: 8px; --h7-s3: 12px; --h7-s4: 16px; --h7-s5: 24px; --h7-s6: 32px; --h7-s7: 48px; --h7-s8: 64px;
  --h7-max: 1240px;   --h7-header: 52px;

  /* Mouvement */
  --h7-ease: cubic-bezier(.2, .8, .2, 1);
  --h7-ease-io: cubic-bezier(.4, 0, .6, 1);
  --h7-t-fast: .2s; --h7-t: .35s; --h7-t-slow: .8s;

  color-scheme: dark;
  transition: --h7-paper .7s var(--h7-ease), --h7-paper-2 .7s var(--h7-ease), --h7-ink .7s var(--h7-ease), --h7-ink-2 .7s var(--h7-ease), --h7-pencil .7s var(--h7-ease), --h7-ok .7s var(--h7-ease), --h7-err .7s var(--h7-ease);
}
/* BLANC : tirage diazo « blueline » — clair, idéal pour lire longtemps */
:root[data-h7-print="blanc"] { --h7-paper: #F3F6FA; --h7-paper-2: #FFFFFF; --h7-ink: #1D3F73; --h7-ink-2: #4B6589; --h7-pencil: #C2410C; --h7-ok: #0F7B5F; --h7-err: #B42318; color-scheme: light; }
/* SÉPIA : contretype diazo brun — patrimoine, archives, artisanat */
:root[data-h7-print="sepia"] { --h7-paper: #F1E7D6; --h7-paper-2: #F8F1E4; --h7-ink: #5A3A1E; --h7-ink-2: #7E6247; --h7-pencil: #B4361C; --h7-ok: #2F6B3A; --h7-err: #A3271A; color-scheme: light; }
/* CALQUE : graphite sur papier calque — brouillons, wireframes, outils internes */
:root[data-h7-print="calque"] { --h7-paper: #ECEEEA; --h7-paper-2: #F6F7F4; --h7-ink: #2B2F33; --h7-ink-2: #5E646B; --h7-pencil: #B23A0E; --h7-ok: #2B7A4B; --h7-err: #C0261A; color-scheme: light; }
/* NUIT : bleu-noir — applications utilisées longtemps dans le noir, jeux */
:root[data-h7-print="nuit"] { --h7-paper: #0D1726; --h7-paper-2: #111D30; --h7-ink: #D7E6FF; --h7-ink-2: #8FA6C8; --h7-pencil: #FFD166; --h7-ok: #6FD6B8; --h7-err: #FF8F80; color-scheme: dark; }
/* AUTO : suit le système (sombre → cyano, clair → blanc) */
@media (prefers-color-scheme: light) {
  :root[data-h7-print="auto"] { --h7-paper: #F3F6FA; --h7-paper-2: #FFFFFF; --h7-ink: #1D3F73; --h7-ink-2: #4B6589; --h7-pencil: #C2410C; --h7-ok: #0F7B5F; --h7-err: #B42318; color-scheme: light; }
}

/* ---------- 2. BASE ---------- */
.h7, .h7 *, .h7 *::before, .h7 *::after { box-sizing: border-box; }
.h7 [hidden] { display: none !important; }
html.h7-root { background: var(--h7-paper); }
.h7 {
  background-color: var(--h7-paper);
  background-image:
    linear-gradient(var(--h7-grid-2) 1px, transparent 1px), linear-gradient(90deg, var(--h7-grid-2) 1px, transparent 1px),
    linear-gradient(var(--h7-grid) 1px, transparent 1px), linear-gradient(90deg, var(--h7-grid) 1px, transparent 1px);
  background-size: var(--h7-major) var(--h7-major), var(--h7-major) var(--h7-major), var(--h7-u) var(--h7-u), var(--h7-u) var(--h7-u);
  color: var(--h7-ink); font-family: var(--h7-mono); font-size: var(--h7-fs-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased; min-width: 320px;
}
.h7.h7-plain { background-image: none; }            /* sans grille (écrans très denses) */
.h7 :where(h1, h2, h3, h4, p, dl, dd, ul, ol, figure) { margin: 0; padding: 0; }
.h7 :where(ul, ol) { list-style: none; }
.h7 :where(button, input, select, textarea) { font: inherit; color: inherit; border-radius: 0; }
.h7 :where(button) { cursor: pointer; }
.h7 :where(button:disabled) { cursor: not-allowed; }
.h7 :where(a) { color: inherit; }
.h7 ::selection { background: var(--h7-pencil); color: var(--h7-paper); }
.h7 :focus-visible { outline: 2px solid var(--h7-pencil); outline-offset: 3px; }
.h7-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 3. TYPOGRAPHIE ---------- */
.h7-lbl { font: 500 var(--h7-fs-sm) var(--h7-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--h7-ink-2); }
.h7-eyebrow { display: flex; align-items: center; gap: 10px; }
.h7-eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--h7-pencil); flex: none; }
.h7-h1, .h7-h2, .h7-h3 { font-family: var(--h7-display); text-wrap: balance; }
.h7-h1 { font-weight: 700; font-size: var(--h7-fs-h1); line-height: 1; letter-spacing: -.01em; }
.h7-h2 { font-weight: 700; font-size: var(--h7-fs-h2); line-height: 1.05; letter-spacing: -.01em; }
.h7-h3 { font-weight: 600; font-size: var(--h7-fs-h3); line-height: 1.15; letter-spacing: .01em; }
.h7-h1 em, .h7-h2 em, .h7-h3 em { font-style: normal; color: var(--h7-pencil); }
.h7-lead { color: var(--h7-ink-2); max-width: 56ch; font-size: 14.5px; }
.h7-prose { max-width: 68ch; color: var(--h7-ink-2); display: grid; gap: var(--h7-s4); }
.h7-prose :is(h2, h3) { color: var(--h7-ink); font-family: var(--h7-display); }
.h7-prose a { color: var(--h7-ink); text-decoration: underline; text-decoration-color: var(--h7-pencil); text-underline-offset: 3px; }
.h7-pencil { color: var(--h7-pencil); }
.h7-muted { color: var(--h7-ink-2); }
.h7-num { font-variant-numeric: tabular-nums; }
.h7-kbd { display: inline-block; min-width: 22px; padding: 0 6px; border: 1px solid var(--h7-line); border-bottom-width: 2px; font: 500 11px/20px var(--h7-mono); text-align: center; }
.h7-code { margin: 0; padding: 14px 16px; border: 1px solid var(--h7-line-soft); background: var(--h7-fill); font: 500 12px/1.65 var(--h7-mono); white-space: pre; overflow-x: auto; }
.h7-code em { font-style: normal; color: var(--h7-pencil); }

/* ---------- 4. STRUCTURE DE FEUILLE ---------- */
.h7-wrap { max-width: var(--h7-max); margin: 0 auto; padding-block: 22px 28px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
/* Cadre de feuille : trait fin extérieur + trait fort intérieur (convention du dessin technique) */
.h7-frame { position: relative; border: 1px solid var(--h7-line); padding: 22px; background: color-mix(in srgb, var(--h7-paper) 70%, transparent); }
.h7-frame::before { content: ""; position: absolute; inset: 6px; border: 1.5px solid var(--h7-ink); pointer-events: none; }
/* Repères de zone (lettres en haut, chiffres à gauche) */
.h7-zones-x, .h7-zones-y { position: absolute; display: flex; font: 500 9px var(--h7-mono); color: var(--h7-ink-2); pointer-events: none; }
.h7-zones-x { top: -16px; left: 22px; right: 22px; justify-content: space-around; }
.h7-zones-y { left: -14px; top: 22px; bottom: 22px; flex-direction: column; justify-content: space-around; }
.h7-area { position: relative; overflow: hidden; padding: 30px 28px 34px; }
.h7-head { display: grid; gap: 12px; margin-bottom: 26px; }
.h7-section { padding-block: var(--h7-s7); border-top: 1px solid var(--h7-line-soft); }
.h7-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.h7-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.h7-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.h7-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.h7-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 34px; align-items: center; }
/* Panneau à filets (tableau de cellules qui partagent leurs traits) */
.h7-cells { display: grid; border-top: 1px solid var(--h7-line); border-left: 1px solid var(--h7-line-soft); }
.h7-cells > * { border-right: 1px solid var(--h7-line-soft); border-bottom: 1px solid var(--h7-line-soft); min-width: 0; }
.h7-hr { height: 1px; border: 0; background: var(--h7-line-soft); margin: var(--h7-s5) 0; }
.h7-hr.is-axis { background: none; border-top: 1px dashed var(--h7-line); }

/* Cartouche (title block) : identité du document, toujours en pied */
.h7-cart { display: grid; grid-template-columns: 1.6fr 1.6fr repeat(3, minmax(0, 1fr)) auto; margin-top: 22px; border: 1px solid var(--h7-ink); }
.h7-cart > div { padding: 8px 12px; border-right: 1px solid var(--h7-line-soft); display: grid; gap: 1px; min-width: 0; }
.h7-cart > div span { font-size: var(--h7-fs-xs); letter-spacing: .12em; color: var(--h7-ink-2); text-transform: uppercase; }
.h7-cart > div b { font: 600 13px var(--h7-mono); letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h7-cart nav { display: flex; }
.h7-cart nav button { width: 52px; border: 0; border-left: 1px solid var(--h7-line-soft); background: none; color: var(--h7-ink); font-size: 15px; transition: background-color .2s, color .2s; }
.h7-cart nav button:hover:not(:disabled) { background: var(--h7-ink); color: var(--h7-paper); }
.h7-cart nav button:disabled { opacity: .3; }
.h7-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 12px; color: var(--h7-ink-2); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- 5. NAVIGATION ---------- */
.h7-top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; display: flex; align-items: stretch; height: var(--h7-header); background: var(--h7-paper); border-bottom: 1px solid var(--h7-line); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.h7-top-band { position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 40; background: var(--h7-paper); }
.h7-logo { display: flex; align-items: center; gap: 12px; padding-right: 20px; border-right: 1px solid var(--h7-line-soft); text-decoration: none; color: inherit; }
.h7-logo svg { width: 26px; height: 26px; transition: transform .6s var(--h7-ease); }
.h7-logo:hover svg { transform: rotate(90deg); }
.h7-logo b { font: 700 18px var(--h7-display); letter-spacing: .1em; }
.h7-tabs { position: relative; display: flex; overflow-x: auto; scrollbar-width: none; }
.h7-tabs::-webkit-scrollbar { display: none; }
.h7-tab { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 18px; border: 0; background: none; color: var(--h7-ink-2); font: 500 11.5px var(--h7-mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; text-decoration: none; transition: color .25s; }
.h7-tab > span { color: var(--h7-line); transition: color .25s; }
.h7-tab:hover, .h7-tab[aria-current="page"] { color: var(--h7-ink); }
.h7-tab:hover > span, .h7-tab[aria-current="page"] > span { color: var(--h7-pencil); }
.h7-tab::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 12px; border-top: 1px dashed var(--h7-line); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--h7-ease); }
.h7-tab:hover::after { transform: scaleX(1); }
/* Indicateur glissant (positionné en JS par H7.pages) */
.h7-ind { position: absolute; bottom: -1px; left: 0; width: 0; height: 3px; background: var(--h7-ink); transition: transform .5s var(--h7-ease), width .5s var(--h7-ease); pointer-events: none; }
.h7-ind::before, .h7-ind::after { content: ""; position: absolute; bottom: 0; width: 1px; height: 9px; background: var(--h7-ink); }
.h7-ind::before { left: 0; } .h7-ind::after { right: 0; }
.h7-grow { flex: 1; }
.h7-top-btn { display: flex; align-items: center; gap: 10px; padding: 0 18px; border: 0; border-left: 1px solid var(--h7-line-soft); background: none; color: var(--h7-ink-2); font: 500 11px var(--h7-mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; transition: color .2s, translate .25s var(--h7-ease); }
.h7-top-btn:hover, .h7-top-btn[aria-expanded="true"], .h7-top-btn[aria-pressed="true"] { color: var(--h7-ink); }
.h7-top-btn svg { width: 16px; height: 16px; transition: rotate .5s var(--h7-ease); }
.h7-top-btn:hover svg { rotate: 90deg; }
/* Interrupteur de tirage */
.h7-print-switch { position: relative; width: 30px; height: 16px; border: 1px solid var(--h7-line); }
.h7-print-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; background: var(--h7-ink); transition: transform .35s var(--h7-ease); }
[aria-pressed="true"] > .h7-print-switch::after { transform: translateX(14px); }

/* Barre latérale d'application : index des feuilles */
.h7-app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100%; }
.h7-side { position: sticky; top: var(--h7-header); align-self: start; height: calc(100vh - var(--h7-header)); overflow: auto; border-right: 1px solid var(--h7-line); padding: 18px 0; display: grid; align-content: start; gap: 2px; }
.h7-side-t { padding: 0 18px 10px; }
.h7-side a, .h7-side button { position: relative; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 4px; padding: 9px 18px; border: 0; background: none; color: var(--h7-ink-2); text-align: left; text-decoration: none; font: 500 12px var(--h7-mono); letter-spacing: .06em; transition: color .2s, background-color .2s; }
.h7-side a > span:first-child, .h7-side button > span:first-child { font-size: 10px; color: var(--h7-line); }
.h7-side a::before, .h7-side button::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: var(--h7-pencil); transform: scaleY(0); transition: transform .3s var(--h7-ease); }
.h7-side a:hover, .h7-side button:hover { color: var(--h7-ink); background: var(--h7-fill); }
.h7-side [aria-current="page"] { color: var(--h7-ink); background: var(--h7-fill-2); }
.h7-side [aria-current="page"]::before { transform: scaleY(1); }
/* Fil d'Ariane : planche › feuille › détail */
.h7-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font: 500 11px var(--h7-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--h7-ink-2); }
.h7-crumbs a { color: inherit; text-decoration: none; }
.h7-crumbs a:hover { color: var(--h7-ink); }
.h7-crumbs > * + *::before { content: "›"; margin-right: 6px; color: var(--h7-line); }
.h7-crumbs [aria-current] { color: var(--h7-ink); }
/* Pagination */
.h7-pager { display: flex; border: 1px solid var(--h7-line); width: max-content; max-width: 100%; }
.h7-pager > * { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 10px; border: 0; border-left: 1px solid var(--h7-line-soft); background: none; color: var(--h7-ink-2); font: 500 12px var(--h7-mono); text-decoration: none; }
.h7-pager > :first-child { border-left: 0; }
.h7-pager > :hover:not([aria-current]) { color: var(--h7-ink); background: var(--h7-fill); }
.h7-pager [aria-current] { background: var(--h7-ink); color: var(--h7-paper); }

/* ---------- 6. BOUTONS ---------- */
.h7-btn { --mk: 0px; position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 46px; padding: 0 20px; border: 1px solid var(--h7-ink); background: transparent; color: var(--h7-ink); font: 600 11.5px var(--h7-mono); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; text-decoration: none; transition: color .3s, background-color .3s, transform .12s, translate .25s var(--h7-ease); }
/* repères d'angle (crop marks) qui s'écartent au survol */
.h7-btn::before { content: ""; position: absolute; inset: calc(-5px - var(--mk)); pointer-events: none; background: linear-gradient(var(--h7-pencil), var(--h7-pencil)) top left / 8px 1px, linear-gradient(var(--h7-pencil), var(--h7-pencil)) top left / 1px 8px, linear-gradient(var(--h7-pencil), var(--h7-pencil)) top right / 8px 1px, linear-gradient(var(--h7-pencil), var(--h7-pencil)) top right / 1px 8px, linear-gradient(var(--h7-pencil), var(--h7-pencil)) bottom left / 8px 1px, linear-gradient(var(--h7-pencil), var(--h7-pencil)) bottom left / 1px 8px, linear-gradient(var(--h7-pencil), var(--h7-pencil)) bottom right / 8px 1px, linear-gradient(var(--h7-pencil), var(--h7-pencil)) bottom right / 1px 8px; background-repeat: no-repeat; opacity: 0; transition: opacity .25s, inset .35s var(--h7-ease); }
/* hachure qui défile au survol (bouton contour) */
.h7-btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--h7-ink) 16%, transparent) 0 1px, transparent 1px 6px); background-size: 200% 100%; opacity: 0; transition: opacity .3s; }
.h7-btn:hover:not(:disabled)::before, .h7-btn:focus-visible::before { opacity: 1; --mk: 3px; }
.h7-btn:hover:not(:disabled)::after { opacity: 1; animation: h7-hatch 1.2s linear infinite; }
.h7-btn:active:not(:disabled) { transform: translateY(1px); }
.h7-btn:focus-visible { outline: none; }
.h7-btn i { font-style: normal; transition: transform .3s var(--h7-ease); }
.h7-btn:hover:not(:disabled) i { transform: translateX(4px); }
.h7-btn:disabled, .h7-btn[aria-disabled="true"] { opacity: .4; }
.h7-btn--solid { background: var(--h7-ink); color: var(--h7-paper); }
.h7-btn--solid::after { display: none; }
.h7-btn--solid:hover:not(:disabled) { background: transparent; color: var(--h7-ink); }
.h7-btn--pencil { border-color: var(--h7-pencil); color: var(--h7-pencil); }
.h7-btn--danger { border-color: var(--h7-err); color: var(--h7-err); }
.h7-btn--sm { height: 36px; padding: 0 14px; font-size: 10.5px; gap: 8px; }
.h7-btn--lg { height: 56px; padding: 0 26px; font-size: 12.5px; }
.h7-btn--icon { width: 44px; padding: 0; font: 400 18px var(--h7-mono); }
.h7-btn--block { width: 100%; }
.h7-btn.is-busy { pointer-events: none; }
.h7-btn.is-busy::after { opacity: 1; animation: h7-hatch .6s linear infinite; }
.h7-link { position: relative; padding: 2px 0; border: 0; background: none; color: var(--h7-ink); font: 500 12px var(--h7-mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.h7-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--h7-pencil); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--h7-ease); }
.h7-link:hover::after, .h7-link:focus-visible::after { transform: scaleX(1); }
.h7-btn-group { display: inline-flex; }
.h7-btn-group > .h7-btn + .h7-btn { margin-left: -1px; }

/* ---------- 7. FORMULAIRES ---------- */
.h7-fld { display: grid; gap: 7px; min-width: 0; }
.h7-fld .h7-rl { display: flex; justify-content: space-between; gap: 10px; }
.h7-fld output { font: 600 12px var(--h7-mono); color: var(--h7-ink); font-variant-numeric: tabular-nums; }
.h7-inp { width: 100%; height: 44px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--h7-line); background: var(--h7-fill); color: var(--h7-ink); font: 500 13px var(--h7-mono); letter-spacing: .04em; transition: border-color .25s, background-color .25s; appearance: none; -webkit-appearance: none; }
textarea.h7-inp { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.h7-inp:hover { background: var(--h7-fill-2); }
.h7-inp:focus { outline: none; border-bottom-color: var(--h7-pencil); background: color-mix(in srgb, var(--h7-pencil) 8%, transparent); }
.h7-inp::placeholder { color: var(--h7-ink-2); opacity: .7; }
select.h7-inp { cursor: pointer; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--h7-ink) 50%), linear-gradient(-45deg, transparent 50%, var(--h7-ink) 50%); background-size: 5px 5px; background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-repeat: no-repeat; }
select.h7-inp option { background: var(--h7-paper-2); color: var(--h7-ink); }
.h7-inp-unit { position: relative; display: block; }
.h7-inp-unit > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 500 11px var(--h7-mono); color: var(--h7-ink-2); pointer-events: none; }
.h7-inp-unit .h7-inp { padding-right: 46px; }
.h7-inp[type="number"] { -moz-appearance: textfield; }
.h7-inp::-webkit-outer-spin-button, .h7-inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.h7-hint { font-size: 12px; color: var(--h7-ink-2); }
.h7-fld.is-bad .h7-inp, .h7-inp[aria-invalid="true"] { border-bottom-color: var(--h7-err); }
.h7-err-msg { color: var(--h7-err); font-size: 12px; display: flex; gap: 8px; align-items: center; }
.h7-err-msg::before { content: "!"; width: 16px; height: 16px; border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-size: 10px; flex: none; }
.h7-ok-msg { color: var(--h7-ok); font-size: 12px; display: flex; gap: 8px; align-items: center; }
.h7-ok-msg::before { content: ""; width: 14px; height: 1px; background: currentColor; }
.h7 input[type="range"].h7-range, .h7-range { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: transparent; cursor: pointer; margin: 0; }
.h7-range::-webkit-slider-runnable-track { height: 1px; background: var(--h7-ink); }
.h7-range::-moz-range-track { height: 1px; background: var(--h7-ink); }
.h7-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -7px; border: 1px solid var(--h7-ink); border-radius: 50%; background: var(--h7-paper); transition: transform .2s, background-color .2s; }
.h7-range::-moz-range-thumb { width: 14px; height: 14px; border: 1px solid var(--h7-ink); border-radius: 50%; background: var(--h7-paper); }
.h7-range:hover::-webkit-slider-thumb { transform: scale(1.25); background: var(--h7-pencil); }
.h7-ticks { display: flex; justify-content: space-between; margin-top: -2px; }
.h7-ticks i { width: 1px; height: 5px; background: var(--h7-line); }
.h7-opts { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.h7-opts.is-col { flex-direction: column; gap: 6px; }
.h7-ch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 12.5px; letter-spacing: .04em; min-height: 30px; }
.h7-ch input { appearance: none; -webkit-appearance: none; margin: 0; width: 16px; height: 16px; flex: none; border: 1px solid var(--h7-ink); background: transparent; cursor: pointer; display: grid; place-items: center; transition: background-color .2s; }
.h7-ch input[type="radio"] { border-radius: 50%; }
.h7-ch input::after { content: ""; width: 8px; height: 8px; background: var(--h7-ink); transform: scale(0); transition: transform .2s var(--h7-ease); }
.h7-ch input[type="radio"]::after { border-radius: 50%; }
.h7-ch input:checked::after { transform: scale(1); }
.h7-ch input[role="switch"] { width: 32px; place-items: center start; padding: 0 3px; }
.h7-ch input[role="switch"]::after { transform: none; background: var(--h7-ink-2); transition: transform .25s var(--h7-ease), background-color .2s; }
.h7-ch input[role="switch"]:checked::after { transform: translateX(14px); background: var(--h7-pencil); }
.h7-ch:hover input { background: var(--h7-fill-2); }
.h7 fieldset.h7-fs { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.h7 fieldset.h7-fs legend { padding: 0; margin-bottom: 4px; }
/* Segmenté (choix exclusif) */
.h7-pills { display: flex; flex-wrap: wrap; }
.h7-pill { height: 38px; padding: 0 16px; margin-left: -1px; border: 1px solid var(--h7-line); background: transparent; color: var(--h7-ink-2); font: 500 11px var(--h7-mono); letter-spacing: .12em; text-transform: uppercase; transition: color .2s, background-color .25s; }
.h7-pill:first-child { margin-left: 0; }
.h7-pill b { font-weight: 500; opacity: .6; margin-left: 6px; }
.h7-pill:hover { color: var(--h7-ink); }
.h7-pill[aria-pressed="true"], .h7-pill[aria-selected="true"] { background: var(--h7-ink); color: var(--h7-paper); border-color: var(--h7-ink); position: relative; z-index: 1; }
/* Zone de dépôt de fichier */
.h7-drop { display: grid; place-items: center; gap: 6px; padding: 32px 16px; border: 1px dashed var(--h7-line); text-align: center; color: var(--h7-ink-2); transition: border-color .2s, background-color .2s; }
.h7-drop:hover, .h7-drop.is-over { border-style: solid; border-color: var(--h7-pencil); background: color-mix(in srgb, var(--h7-pencil) 6%, transparent); color: var(--h7-ink); }

/* ---------- 8. DONNÉES ---------- */
/* Carte « pièce » : pointillé au repos, trait plein + repères d'angle au survol */
.h7-card { --mk: 0px; position: relative; display: grid; align-content: start; text-align: left; padding: 0; border: 1px dashed var(--h7-line); background: var(--h7-paper-2); color: inherit; text-decoration: none; transition: border-color .3s, transform .35s var(--h7-ease); }
.h7-card::before { content: ""; position: absolute; inset: calc(-7px - var(--mk)); pointer-events: none; background: linear-gradient(var(--h7-ink), var(--h7-ink)) top left / 12px 1px, linear-gradient(var(--h7-ink), var(--h7-ink)) top left / 1px 12px, linear-gradient(var(--h7-ink), var(--h7-ink)) top right / 12px 1px, linear-gradient(var(--h7-ink), var(--h7-ink)) top right / 1px 12px, linear-gradient(var(--h7-ink), var(--h7-ink)) bottom left / 12px 1px, linear-gradient(var(--h7-ink), var(--h7-ink)) bottom left / 1px 12px, linear-gradient(var(--h7-ink), var(--h7-ink)) bottom right / 12px 1px, linear-gradient(var(--h7-ink), var(--h7-ink)) bottom right / 1px 12px; background-repeat: no-repeat; opacity: 0; transition: opacity .25s, inset .35s var(--h7-ease); }
:is(a, button).h7-card:hover, :is(a, button).h7-card:focus-visible, .h7-card.is-hover:hover { border-style: solid; border-color: var(--h7-ink); transform: translateY(-3px); outline: none; }
:is(a, button).h7-card:hover::before, :is(a, button).h7-card:focus-visible::before, .h7-card.is-hover:hover::before { opacity: 1; --mk: 3px; }
.h7-card.is-static { border-style: solid; border-color: var(--h7-line-soft); }
.h7-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px dashed var(--h7-line-soft); }
.h7-card-art { display: block; padding: 6px 10px 0; }
.h7-card-art svg { width: 100%; height: auto; display: block; }
.h7-card-body { padding: 8px 16px 16px; display: grid; gap: 6px; }
.h7-card-go { position: absolute; right: 14px; bottom: 16px; color: var(--h7-pencil); font: 600 13px var(--h7-mono); opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s var(--h7-ease); }
.h7-card:hover .h7-card-go, .h7-card:focus-visible .h7-card-go { opacity: 1; transform: none; }
.h7-tag { display: inline-block; padding: 2px 8px; border: 1px solid currentColor; font: 500 10px var(--h7-mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.h7-tag--pencil { color: var(--h7-pencil); } .h7-tag--ok { color: var(--h7-ok); } .h7-tag--err { color: var(--h7-err); } .h7-tag--mute { color: var(--h7-ink-2); }
.h7-badge { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; background: var(--h7-ink); color: var(--h7-paper); font: 600 11px var(--h7-mono); letter-spacing: .04em; }
/* Statistiques avec trait crayon au survol */
.h7-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--h7-line); border-left: 1px solid var(--h7-line-soft); }
.h7-stat { position: relative; overflow: hidden; padding: 16px 18px; border-right: 1px solid var(--h7-line-soft); border-bottom: 1px solid var(--h7-line-soft); display: grid; gap: 4px; }
.h7-stat::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: var(--h7-pencil); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--h7-ease); }
.h7-stat:hover::before { transform: scaleX(1); }
.h7-stat b { font: 700 clamp(30px, 3.4vw, 42px)/1 var(--h7-display); font-variant-numeric: tabular-nums; }
.h7-stat b small { font: 500 12px var(--h7-mono); color: var(--h7-ink-2); margin-left: 4px; }
.h7-delta { font: 500 11px var(--h7-mono); color: var(--h7-ok); } .h7-delta.is-down { color: var(--h7-err); }
/* Étapes numérotées (uniquement pour une vraie séquence) */
.h7-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.h7-step { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; color: var(--h7-ink-2); }
.h7-step > span { width: 34px; height: 34px; border: 1px solid var(--h7-ink); border-radius: 50%; display: grid; place-items: center; color: var(--h7-ink); font: 600 13px var(--h7-mono); transition: background-color .3s, color .3s; }
.h7-step:hover > span { background: var(--h7-ink); color: var(--h7-paper); }
.h7-step b { display: block; color: var(--h7-ink); font: 600 16px var(--h7-display); letter-spacing: .02em; }
/* Nomenclature (tableau) */
.h7-table-wrap { overflow-x: auto; border: 1px solid var(--h7-line); }
.h7-table { width: 100%; border-collapse: collapse; font: 500 12.5px var(--h7-mono); }
.h7-table th { text-align: left; padding: 10px 12px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--h7-ink-2); border-bottom: 1px solid var(--h7-ink); white-space: nowrap; }
.h7-table td { padding: 10px 12px; border-bottom: 1px solid var(--h7-line-soft); }
.h7-table td.is-num, .h7-table th.is-num { text-align: right; font-variant-numeric: tabular-nums; }
.h7-table tbody tr { transition: background-color .2s; }
.h7-table tbody tr:hover { background: var(--h7-fill-2); }
.h7-table tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--h7-pencil); }
/* Frise de révisions */
.h7-log { position: relative; display: grid; gap: 4px; padding-left: 40px; max-width: 760px; }
.h7-log::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 1px; background: var(--h7-ink); transform-origin: top; }
.is-enter .h7-log::before { animation: h7-grow 1.1s .3s var(--h7-ease) both; }
.h7-rev { position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 6px 20px; padding: 16px 18px; border: 1px solid transparent; transition: border-color .3s, background-color .3s, transform .35s var(--h7-ease); }
.h7-rev::before { content: ""; position: absolute; left: -35px; top: 22px; width: 12px; height: 12px; border: 1px solid var(--h7-ink); border-radius: 50%; background: var(--h7-paper); transition: background-color .3s, transform .3s var(--h7-ease); }
.h7-rev::after { content: ""; position: absolute; left: -23px; top: 28px; width: 23px; border-top: 1px dashed var(--h7-ink-2); transform: scaleX(.3); transform-origin: left; transition: transform .35s var(--h7-ease); }
.h7-rev:hover { border-color: var(--h7-line-soft); background: var(--h7-fill); transform: translateX(6px); }
.h7-rev:hover::before { background: var(--h7-pencil); transform: scale(1.2); }
.h7-rev:hover::after { transform: scaleX(1); }
.h7-rev > b { font: 700 28px/1 var(--h7-display); }
.h7-rev p { color: var(--h7-ink-2); }
.h7-rev.is-next { border: 1px dashed var(--h7-line-soft); }
/* Lecture chiffrée (readout) */
.h7-readout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--h7-line-soft); }
.h7-readout > div { padding: 12px 16px; border-right: 1px solid var(--h7-line-soft); display: grid; }
.h7-readout > div:last-child { border-right: 0; }
.h7-readout b { font: 700 24px var(--h7-display); font-variant-numeric: tabular-nums; }
/* Faits (dl) */
.h7-facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--h7-line-soft); border-left: 1px solid var(--h7-line-soft); }
.h7-facts > div { padding: 10px 12px; border-right: 1px solid var(--h7-line-soft); border-bottom: 1px solid var(--h7-line-soft); }
.h7-facts dt { font: 500 10.5px var(--h7-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--h7-ink-2); }
.h7-facts dd { font: 600 19px var(--h7-display); }
/* Jauge graduée */
.h7-gauge { position: relative; height: 10px; border: 1px solid var(--h7-line); background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), var(--h7-line-soft) calc(10% - 1px) 10%); }
.h7-gauge > i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--v, 0%); background: var(--h7-ink); transition: width .8s var(--h7-ease); }
.h7-gauge.is-warn > i { background: var(--h7-pencil); }
/* Accordéon (détails repliables) */
.h7-acc { border-top: 1px solid var(--h7-line-soft); }
.h7-acc > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; cursor: pointer; font: 600 16px var(--h7-display); }
.h7-acc > summary::-webkit-details-marker { display: none; }
.h7-acc > summary::after { content: "+"; font: 400 18px var(--h7-mono); color: var(--h7-pencil); transition: rotate .3s var(--h7-ease); }
.h7-acc[open] > summary::after { rotate: 45deg; }
.h7-acc > div { padding: 0 0 16px; color: var(--h7-ink-2); }
/* Onglets de contenu internes */
.h7-subtabs { display: flex; gap: 0; border-bottom: 1px solid var(--h7-line-soft); }
.h7-subtabs [role="tab"] { padding: 10px 16px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--h7-ink-2); font: 500 11px var(--h7-mono); letter-spacing: .12em; text-transform: uppercase; margin-bottom: -1px; transition: color .2s, border-color .3s; }
.h7-subtabs [role="tab"][aria-selected="true"] { color: var(--h7-ink); border-bottom-color: var(--h7-ink); }
/* Avatar / initiales en cercle de détail */
.h7-avatar { width: 36px; height: 36px; border: 1px solid var(--h7-ink); border-radius: 50%; display: grid; place-items: center; font: 600 12px var(--h7-mono); flex: none; }

/* ---------- 9. RETOURS ---------- */
.h7-toast { position: fixed; right: max(20px, env(safe-area-inset-right, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px)); z-index: 90; display: flex; gap: 12px; align-items: center; max-width: min(380px, calc(100vw - 40px)); padding: 12px 16px; background: var(--h7-paper); color: var(--h7-ink); border: 1px solid var(--h7-ink); box-shadow: 6px 6px 0 color-mix(in srgb, var(--h7-ink) 25%, transparent); font: 500 12.5px var(--h7-mono); letter-spacing: .04em; animation: h7-toastIn .45s var(--h7-ease) both; }
.h7-toast::before { content: ""; width: 10px; height: 10px; border: 1px solid var(--h7-ok); background: var(--h7-ok); flex: none; }
.h7-toast.is-warn::before { border-color: var(--h7-pencil); background: var(--h7-pencil); }
.h7-toast.is-err::before { border-color: var(--h7-err); background: var(--h7-err); }
/* Note « crayon » (alerte) */
.h7-note { position: relative; padding: 12px 16px 12px 44px; border: 1px dashed var(--h7-pencil); color: var(--h7-ink); }
.h7-note::before { content: "!"; position: absolute; left: 14px; top: 13px; width: 18px; height: 18px; border: 1px solid var(--h7-pencil); border-radius: 50%; display: grid; place-items: center; font: 600 11px var(--h7-mono); color: var(--h7-pencil); }
.h7-note.is-ok { border-color: var(--h7-ok); } .h7-note.is-ok::before { content: "✓"; border-color: var(--h7-ok); color: var(--h7-ok); }
.h7-note.is-err { border-color: var(--h7-err); } .h7-note.is-err::before { border-color: var(--h7-err); color: var(--h7-err); }
/* Tampon de validation */
.h7-stamp { display: inline-grid; text-align: center; line-height: 1.1; padding: 8px 16px; border: 3px double var(--h7-pencil); color: var(--h7-pencil); font: 700 22px var(--h7-display); letter-spacing: .14em; transform: rotate(-12deg); pointer-events: none; }
.h7-stamp small { font: 500 9.5px var(--h7-mono); letter-spacing: .12em; }
.h7-stamp.is-in { animation: h7-stamp .45s cubic-bezier(.3, 1.6, .5, 1) both; }
/* État vide */
.h7-empty { display: grid; place-items: center; gap: 8px; padding: 48px 20px; border: 1px dashed var(--h7-line); text-align: center; color: var(--h7-ink-2); }
.h7-empty b { font: 700 22px var(--h7-display); color: var(--h7-ink); }
/* Squelette de chargement : traits de construction qui défilent */
.h7-skel { height: 12px; background: repeating-linear-gradient(90deg, var(--h7-line-soft) 0 8px, transparent 8px 12px); background-size: 200% 100%; animation: h7-hatch 1.4s linear infinite; }
/* Infobulle à ligne de rappel */
.h7-tip { position: relative; }
.h7-tip[data-tip]::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translateX(-50%) translateY(4px); padding: 3px 8px; border: 1px solid var(--h7-pencil); background: var(--h7-paper); color: var(--h7-pencil); font: 500 10px var(--h7-mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s, transform .3s var(--h7-ease); }
.h7-tip[data-tip]::before { content: ""; position: absolute; left: 50%; bottom: 100%; height: 12px; border-left: 1px solid var(--h7-pencil); opacity: 0; transform: scaleY(0); transform-origin: bottom; transition: opacity .2s, transform .3s var(--h7-ease); }
.h7-tip:hover::after, .h7-tip:focus-visible::after { opacity: 1; transform: translateX(-50%); }
.h7-tip:hover::before, .h7-tip:focus-visible::before { opacity: 1; transform: none; }
/* Vue de détail plein écran (ouverte en cercle par H7.reveal) */
.h7-detail { position: fixed; inset: 0; z-index: 80; overflow: auto; background-color: var(--h7-paper); background-image: linear-gradient(var(--h7-grid-2) 1px, transparent 1px), linear-gradient(90deg, var(--h7-grid-2) 1px, transparent 1px); background-size: 40px 40px; padding-block: max(24px, env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.h7-detail-in { position: relative; max-width: 1040px; margin: 0 auto; border: 1px solid var(--h7-line); }
.h7-detail-in::before { content: ""; position: absolute; inset: 6px; border: 1.5px solid var(--h7-ink); pointer-events: none; }
.h7-detail-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--h7-line-soft); }
/* Fenêtre modale classique */
.h7-modal-back { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--h7-paper) 80%, transparent); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: h7-fadeIn .3s both; }
.h7-modal { width: min(520px, 100%); max-height: 100%; overflow: auto; background: var(--h7-paper); border: 1px solid var(--h7-ink); box-shadow: 8px 8px 0 color-mix(in srgb, var(--h7-ink) 20%, transparent); padding: 24px; display: grid; gap: 16px; animation: h7-sheetIn .5s var(--h7-ease) both; }
/* Tiroir (réglages, filtres) */
.h7-drawer { position: fixed; z-index: 85; top: calc(var(--h7-header) + env(safe-area-inset-top, 0px)); right: 0; bottom: 0; width: min(380px, 100%); overflow: auto; background: var(--h7-paper); border-left: 1px solid var(--h7-ink); box-shadow: -10px 0 0 color-mix(in srgb, var(--h7-ink) 8%, transparent); padding: 22px max(22px, env(safe-area-inset-right, 0px)) calc(22px + env(safe-area-inset-bottom, 0px)) 22px; display: grid; gap: 22px; align-content: start; animation: h7-drawerIn .5s var(--h7-ease) both; }

/* ---------- 10. DESSIN SVG (conventions du dessin technique) ---------- */
.h7-ln { fill: none; stroke: var(--h7-ink); stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }   /* contour vu : trait continu fort */
.h7-ln-th { fill: none; stroke: var(--h7-ink); stroke-width: .9; stroke-linecap: round; }                          /* détail : continu fin */
.h7-hid { fill: none; stroke: var(--h7-ink-2); stroke-width: .9; stroke-dasharray: 4 3; }                         /* arête cachée : tirets */
.h7-ax { fill: none; stroke: var(--h7-ink-2); stroke-width: .8; stroke-dasharray: 8 3 2 3; }                       /* axe : trait mixte */
.h7-ct { fill: none; stroke: var(--h7-pencil); stroke-width: .9; }                                                  /* cote / rappel : crayon */
.h7-t { font: 500 9px var(--h7-mono); fill: var(--h7-ink-2); letter-spacing: .06em; }
.h7-t-p { font: 500 9px var(--h7-mono); fill: var(--h7-pencil); letter-spacing: .06em; }
.h7-fill-paper { fill: var(--h7-paper); }
.h7-off { opacity: 0; } .h7-togglable { transition: opacity .35s; }

/* ---------- 11. MOUVEMENT ---------- */
.h7-scan { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; z-index: 5; background: var(--h7-ink); box-shadow: 0 0 18px 4px color-mix(in srgb, var(--h7-ink) 45%, transparent); opacity: 0; pointer-events: none; }
.h7-scan.is-run.is-fwd { animation: h7-scanFwd .8s var(--h7-ease) both; }
.h7-scan.is-run.is-back { animation: h7-scanBack .8s var(--h7-ease) both; }
.h7-page.is-enter.is-fwd { animation: h7-printFwd .8s var(--h7-ease) both; }
.h7-page.is-enter.is-back { animation: h7-printBack .8s var(--h7-ease) both; }
.is-enter .h7-rise, .h7-rise.is-in { animation: h7-rise .6s var(--h7-ease) both; animation-delay: calc(var(--d, 0) * 70ms + 220ms); }
.h7-dr { stroke-dasharray: 1; stroke-dashoffset: 0; }   /* à poser sur les tracés avec pathLength="1" */
.is-enter .h7-dr, .h7-redraw .h7-dr { animation: h7-draw 1.2s var(--h7-ease) both; animation-delay: calc(var(--d, 0) * 80ms + 260ms); }
.h7-redraw .h7-dr { animation-duration: .9s; animation-delay: calc(var(--d, 0) * 50ms); }
.is-enter .h7-fd { animation: h7-fadeIn .8s .7s both; }
.h7-spin { transform-box: fill-box; transform-origin: center; animation: h7-rot var(--dur, 14s) linear infinite; }
.h7-spin.is-rev { animation-direction: reverse; }

@keyframes h7-scanFwd { 0% { left: 0; opacity: 1; } 90% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
@keyframes h7-scanBack { 0% { left: 100%; opacity: 1; } 90% { opacity: 1; } 100% { left: 0; opacity: 0; } }
@keyframes h7-printFwd { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes h7-printBack { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
@keyframes h7-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes h7-draw { from { stroke-dashoffset: 1; } }
@keyframes h7-fadeIn { from { opacity: 0; } }
@keyframes h7-grow { from { transform: scaleY(0); } }
@keyframes h7-hatch { to { background-position: -24px 0; } }
@keyframes h7-rot { to { transform: rotate(360deg); } }
@keyframes h7-toastIn { from { opacity: 0; transform: translateY(14px); clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes h7-stamp { from { opacity: 0; transform: rotate(-24deg) scale(2.4); } }
@keyframes h7-sheetIn { from { opacity: 0; clip-path: inset(46% 0 46% 0); } to { opacity: 1; clip-path: inset(0); } }
@keyframes h7-drawerIn { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0); } }
@keyframes h7-blink { 50% { opacity: 0; } }

/* Cote au survol et réticule (créés par H7.measure / H7.crosshair) */
.h7-measure { position: fixed; z-index: 70; height: 14px; pointer-events: none; color: var(--h7-pencil); opacity: 0; transform: scaleX(.2); transition: opacity .2s, transform .35s var(--h7-ease); }
.h7-measure.is-on { opacity: 1; transform: none; }
.h7-measure::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: currentColor; }
.h7-measure i, .h7-measure b { position: absolute; top: 0; width: 1px; height: 14px; background: currentColor; }
.h7-measure i { left: 0; } .h7-measure b { right: 0; }
.h7-measure span { position: absolute; left: 50%; top: -1px; transform: translateX(-50%); padding: 0 6px; background: var(--h7-paper); font: 500 9.5px/14px var(--h7-mono); letter-spacing: .1em; white-space: nowrap; }
.h7-xh { position: fixed; z-index: 60; pointer-events: none; background: color-mix(in srgb, var(--h7-ink) 16%, transparent); opacity: 0; transition: opacity .3s; }
.h7-xh-h { left: 0; right: 0; top: 0; height: 1px; } .h7-xh-v { top: 0; bottom: 0; left: 0; width: 1px; }
.h7-xh-r { position: fixed; z-index: 61; left: 0; top: 0; pointer-events: none; font: 500 9.5px var(--h7-mono); letter-spacing: .08em; color: var(--h7-ink-2); background: var(--h7-paper); padding: 1px 5px; border: 1px solid var(--h7-line-soft); opacity: 0; transition: opacity .3s; white-space: nowrap; }
.h7-xh-on .h7-xh, .h7-xh-on .h7-xh-r { opacity: 1; }

/* ---------- 12. CURSEUR PERSONNALISÉ (H7.cursor) ---------- */
html.h7-cur-on, html.h7-cur-on * { cursor: none !important; }
.h7-cur { --s: 14px; --c: var(--h7-ink); position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: 0; transition: opacity .25s; }
.h7-cur.is-vis { opacity: 1; }
.h7-cur[data-c="pencil"] { --c: var(--h7-pencil); }
.h7-cur i, .h7-cur span { position: fixed; left: 0; top: 0; pointer-events: none; display: block; }
.h7-cur-a { width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); box-sizing: border-box; transition: width .3s var(--h7-ease), height .3s var(--h7-ease), margin .3s var(--h7-ease), background-color .25s, border-color .25s, border-radius .3s var(--h7-ease), scale .3s var(--h7-ease), rotate .45s var(--h7-ease); }
.h7-cur-b { width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: var(--c); transition: scale .25s var(--h7-ease); }
.h7-cur[data-type="boule"] .h7-cur-a { border-radius: 50%; background: var(--c); border: 0 solid var(--h7-pencil); }
.h7-cur[data-type="boule"] .h7-cur-b { display: none; }
.h7-cur[data-type="boule"].is-hov .h7-cur-a { scale: 2.6; background: color-mix(in srgb, var(--h7-pencil) 14%, transparent); border-width: .6px; }
.h7-cur[data-type="anneau"] .h7-cur-a { width: calc(var(--s) * 2.4); height: calc(var(--s) * 2.4); margin: calc(var(--s) * -1.2) 0 0 calc(var(--s) * -1.2); border-radius: 50%; border: 1px solid var(--c); }
.h7-cur[data-type="anneau"].is-hov .h7-cur-a { scale: 1.5; border-color: var(--h7-pencil); background: color-mix(in srgb, var(--h7-pencil) 10%, transparent); }
.h7-cur[data-type="anneau"].is-hov .h7-cur-b { scale: 0; }
.h7-cur[data-type="reticule"] .h7-cur-a { width: calc(var(--s) * 2); height: calc(var(--s) * 2); margin: calc(var(--s) * -1) 0 0 calc(var(--s) * -1); border-radius: 50%; border: 1px solid var(--c); background: linear-gradient(var(--c), var(--c)) center / 1px 100% no-repeat, linear-gradient(var(--c), var(--c)) center / 100% 1px no-repeat; }
.h7-cur[data-type="reticule"] .h7-cur-b { background: var(--h7-pencil); }
.h7-cur[data-type="reticule"].is-hov .h7-cur-a { rotate: 45deg; scale: 1.3; border-color: var(--h7-pencil); }
.h7-cur[data-type="pointe"] .h7-cur-a { width: calc(var(--s) * 1.4); height: calc(var(--s) * 1.4); margin: 0; background: var(--c); clip-path: polygon(0 0, 100% 40%, 54% 54%, 40% 100%); }
.h7-cur[data-type="pointe"] .h7-cur-b { display: none; }
.h7-cur[data-type="pointe"].is-hov .h7-cur-a { background: var(--h7-pencil); scale: 1.15; }
.h7-cur[data-type="carre"] .h7-cur-a { border: 1px solid var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.h7-cur[data-type="carre"].is-hov .h7-cur-a { rotate: 45deg; scale: 1.6; border-color: var(--h7-pencil); }
.h7-cur.is-txt .h7-cur-a { width: 2px; height: calc(var(--s) * 1.6); margin: calc(var(--s) * -.8) 0 0 -1px; border-radius: 0; border: 0; background: var(--h7-pencil); clip-path: none; scale: 1; rotate: 0deg; }
.h7-cur.is-txt .h7-cur-b { scale: 0; }
.h7-cur.is-down .h7-cur-a { scale: .72; }
.h7-cur.is-down.is-hov .h7-cur-a { scale: 2; }
.h7-cur[data-type="anneau"].is-down.is-hov .h7-cur-a, .h7-cur[data-type="reticule"].is-down.is-hov .h7-cur-a, .h7-cur[data-type="carre"].is-down.is-hov .h7-cur-a { scale: 1.1; }
.h7-cur-l { font: 600 9.5px var(--h7-mono); letter-spacing: .1em; color: var(--h7-paper); background: var(--h7-pencil); padding: 2px 6px; white-space: nowrap; opacity: 0; transition: opacity .2s; }
.h7-cur.is-lab .h7-cur-l { opacity: 1; }
body:has(.h7-cur.is-lab.is-vis) .h7-xh-r { opacity: 0; }

/* ---------- 13. RESPONSIVE ---------- */
@media (max-width: 980px) {
  .h7-split, .h7-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .h7-grid-3, .h7-grid-4, .h7-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h7-app { grid-template-columns: minmax(0, 1fr); }
  .h7-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--h7-line); display: flex; overflow-x: auto; padding: 0; }
  .h7-side-t { display: none; }
  .h7-side a, .h7-side button { flex: none; grid-template-columns: auto auto; }
  .h7-cart { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .h7-cart > div:nth-child(-n+2) { grid-column: span 3; border-bottom: 1px solid var(--h7-line-soft); border-right: 0; }
  .h7-cart nav { grid-column: span 3; border-top: 1px solid var(--h7-line-soft); }
  .h7-cart nav button { flex: 1; height: 44px; }
  .h7-cart nav button:first-child { border-left: 0; }
}
@media (max-width: 640px) {
  .h7-logo b, .h7-top-btn > span:not(.h7-print-switch) { display: none; }
  .h7-logo { padding-right: 12px; }
  .h7-tab { padding: 0 12px; } .h7-tab::after { left: 12px; right: 12px; }
  .h7-top-btn { padding: 0 14px; }
  .h7-frame { padding: 10px; } .h7-zones-x, .h7-zones-y { display: none; }
  .h7-area { padding: 22px 14px 26px; }
  .h7-grid-3, .h7-grid-4, .h7-steps { grid-template-columns: minmax(0, 1fr); }
  .h7-rev { grid-template-columns: minmax(0, 1fr); }
  .h7-readout b { font-size: 20px; }
}

/* ---------- 14. MOUVEMENT RÉDUIT (obligatoire) ---------- */
@media (prefers-reduced-motion: reduce) {
  .h7 *, .h7 *::before, .h7 *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .h7-spin { animation: none !important; }
}
