/*
 * Portail client Fillio — feuille de style construite sur le système de design Fillio
 * (design-system-fillio/project/tokens.json : mêmes noms de jetons). Thème « pale » par
 * défaut (écrans de travail) ; `data-theme="marin"` sur une zone (en-tête, bandeau de
 * connexion, carte de rendez-vous) redéfinit les jetons sémantiques. Une seule police,
 * une seule graisse (Aeonik Regular, 400). Tout ce qui se clique est une pilule.
 * CSP : aucune règle en ligne dans les gabarits (style-src 'self') ; tout est ici.
 */

@font-face {
  font-family: "Aeonik";
  src: url("/static/fonts/aeonik-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ jetons */

:root {
  /* Marque (identiques dans les deux thèmes) */
  --brand-marin: #1c2629;
  --brand-metal: #d9e3e3;
  --brand-bleu: #aad0ff;
  --brand-vert: #bcc6ad;
  --brand-jaune: #f3bf69;
  --brand-corail: #ff8159;

  /* Sémantiques, thème pâle */
  --bg-page: #e5ebeb;
  --bg-card: #ffffff;
  --bg-chip: #d9e3e3;
  --bg-inset: #f0f3f3;
  --ink: #1c2629;
  --ink-secondary: #4f5c5f;
  --ink-on-accent: #d9e3e3;
  --accent: #1c2629;
  --link: #2a5a8c;
  --border: #c3cdcd;
  --border-strong: #1c2629;
  --focus: #aad0ff;
  --motif-line: #1c262926;
  /* Dérivé (accessibilité) : contour des champs à 3:1 au moins sur blanc et sur métallique. */
  --border-input: #6f7e81;

  /* États (identiques dans les deux thèmes) */
  --state-success-bg: var(--brand-vert);
  --state-info-bg: var(--brand-bleu);
  --state-warning-bg: var(--brand-jaune);
  --state-danger-bg: var(--brand-corail);
  --state-ink: #1c2629;

  /* Viewer 3D */
  --viewer-bg: #1c2629;
  --viewer-body-pcb: #aad0ff;
  --viewer-body-overmold: #f3bf69;
  --viewer-body-cable: #bcc6ad;

  /* Typographie */
  --font-sans: "Aeonik", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* Espacements (échelle de 4 px) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* Rayons */
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
  --radius-pill: 999px;

  /* Ombres et traits */
  --shadow-card: 0 1px 2px rgba(28, 38, 41, 0.06);
  --shadow-focus: 0 0 0 3px #aad0ff;
  --stroke-hairline: 1px;
  --stroke-focus: 3px;

  /* Dérivés de composant (maquettes) */
  --gutter: clamp(16px, 5vw, 64px);
  --pill-outline: var(--border-strong);
}

[data-theme="marin"] {
  --bg-page: #1c2629;
  --bg-card: #243034;
  --bg-chip: #2b383c;
  --bg-inset: #1a2326;
  --ink: #d9e3e3;
  --ink-secondary: #a9b6b8;
  --ink-on-accent: #1c2629;
  --accent: #d9e3e3;
  --link: #aad0ff;
  --border: #3a474b;
  --border-strong: #d9e3e3;
  --border-input: #8a9799;
  --motif-line: #d9e3e333;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
  /* Contour des pilules sur marin : métallique à 40 % (en-tête du site). */
  --pill-outline: rgba(217, 227, 227, 0.4);
  color: var(--ink);
}

/* Retour au thème pâle à l'intérieur d'une zone marin (carte de connexion métallique). */
[data-theme="pale"] {
  --bg-page: #e5ebeb;
  --bg-card: #ffffff;
  --bg-chip: #d9e3e3;
  --bg-inset: #f0f3f3;
  --ink: #1c2629;
  --ink-secondary: #4f5c5f;
  --ink-on-accent: #d9e3e3;
  --accent: #1c2629;
  --link: #2a5a8c;
  --border: #c3cdcd;
  --border-strong: #1c2629;
  --border-input: #6f7e81;
  --motif-line: #1c262926;
  --shadow-card: 0 1px 2px rgba(28, 38, 41, 0.06);
  --pill-outline: var(--border-strong);
  color: var(--ink);
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, h4, strong, b, th, legend { font-weight: 400; }
h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }
h1 { font-size: clamp(30px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.005em; }
h2 { font-size: 24px; line-height: 1.2; }
h3 { font-size: 18px; line-height: 1.3; }
h1.h2, .h2 { font-size: 24px; line-height: 1.2; letter-spacing: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
code, kbd, pre { font-family: var(--font-mono); font-size: 13px; line-height: 18px; }
code.small { font-size: 12px; }
small { font-size: 14px; line-height: 20px; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
/* Focus : halo bleu de marque (jeton focus) doublé d'un contour border-strong (marin sur pâle,
   métallique sur marin) pour un contraste suffisant ; l'outline survit au contraste forcé. */
:focus-visible { outline: 2px solid var(--border-strong); outline-offset: 2px; box-shadow: var(--shadow-focus); }
a:not([class]):focus-visible { border-radius: 4px; }
[hidden] { display: none !important; }
fieldset[hidden] { display: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 10;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
  background: var(--brand-metal); color: var(--brand-marin);
}
.skip-link:focus { top: var(--space-2); }

.muted, .text-secondary { color: var(--ink-secondary); }
.body-s { font-size: 14px; line-height: 20px; }
.caption { font-size: 13px; line-height: 18px; }
.arrow { display: inline-block; }

/* Enveloppe de page : 1152 px au plus, gouttière clamp(16px, 5vw, 64px). */
.wrap {
  width: 100%;
  max-width: 1152px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.page {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding-block: var(--space-12) var(--space-16);
}
.wrap.page--narrow, .surface-staff .wrap.page--narrow { max-width: 600px; }
.page-head { display: flex; flex-direction: column; gap: var(--space-3); }
.page-head p { max-width: 640px; color: var(--ink-secondary); }
.page-title-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-4);
}
.page-title-row > div { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.page-meta { font-size: 14px; line-height: 20px; color: var(--ink-secondary); overflow-wrap: anywhere; }
.back-link { align-self: flex-start; font-size: 14px; line-height: 20px; text-decoration: none; }
.back-link:hover { text-decoration: underline; }

/* Deux colonnes : contenu + aside (suivi), repliées en une seule sous 900 px. */
.layout-aside { display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: flex-start; }
.layout-aside > .main-col { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-6); }
.layout-aside > aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-6); }

/* ------------------------------------------------------------------ Header */

.site-header {
  background: var(--brand-marin);
  color: var(--brand-metal);
}
.site-header__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--space-16);
  padding: var(--space-3) var(--gutter);
}
.brand { display: flex; align-items: center; gap: var(--space-4); text-decoration: none; }
.brand svg { display: block; height: 28px; width: auto; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.site-nav form { display: contents; }
.nav-user { font-size: 13px; line-height: 16px; color: var(--ink-secondary); padding-inline: var(--space-1); }

.nav-pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 var(--space-4);
  border: var(--stroke-hairline) solid transparent; border-radius: var(--radius-pill);
  background: var(--bg-chip); color: var(--ink);
  font-family: var(--font-sans); font-size: 13px; line-height: 16px;
  letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none;
  white-space: nowrap; cursor: pointer;
}
.nav-pill:hover { color: var(--ink); border-color: var(--pill-outline); }
.nav-pill[aria-current="page"] { background: var(--brand-metal); color: var(--brand-marin); }
.nav-pill--outline { background: transparent; border-color: var(--pill-outline); }
.nav-pill .short { display: none; }
.nav-toggle { display: none; }

/* Puce « Interne · Tailscale » du tableau de bord. */
.tag-internal {
  display: inline-flex; align-items: center; height: 24px; padding: 0 var(--space-3);
  border-radius: var(--radius-pill); background: var(--state-warning-bg); color: var(--state-ink);
  font-size: 12px; line-height: 16px; letter-spacing: 0.05em; text-transform: uppercase;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ Footer */

.site-footer {
  border-top: var(--stroke-hairline) solid var(--border);
  color: var(--ink-secondary);
  font-size: 13px; line-height: 18px;
}
.site-footer__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-2) var(--space-6);
  padding: var(--space-4) var(--gutter);
}
.site-footer__promise { max-width: 820px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }

/* ------------------------------------------------------------------ Button */

.fillio-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--space-12); padding: var(--space-2) var(--space-8);
  border-radius: var(--radius-pill); border: var(--stroke-hairline) solid transparent;
  background: transparent; color: var(--ink);
  font-family: var(--font-sans); font-size: 14px; line-height: 16px; font-weight: 400;
  letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; text-align: center;
  cursor: pointer;
}
.fillio-btn:hover { color: inherit; }
.fillio-btn--primary { background: var(--accent); color: var(--ink-on-accent); }
.fillio-btn--primary:hover { color: var(--ink-on-accent); }
.fillio-btn--secondary { border-color: var(--border-strong); color: var(--ink); }
.fillio-btn--secondary:hover { background: var(--bg-chip); color: var(--ink); }
.fillio-btn--tonal { background: var(--bg-chip); color: var(--ink); }
.fillio-btn--danger { background: var(--state-danger-bg); color: var(--state-ink); }
.fillio-btn--m { min-height: 44px; padding: 6px var(--space-6); }
.fillio-btn--s { min-height: 36px; padding: var(--space-1) var(--space-4); font-size: 13px; }
.fillio-btn--xs { min-height: 32px; padding: var(--space-1) 14px; font-size: 12px; }
.fillio-btn--block { width: 100%; }
.fillio-btn:disabled, .fillio-btn[aria-disabled="true"] { opacity: 0.5; cursor: default; }
.fillio-btn--primary:hover { opacity: 0.88; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* Bouton-lien discret (« Cadrer » dans la liste des corps). */
.link-button {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px;
  border: var(--stroke-hairline) solid var(--border-strong); border-radius: var(--radius-pill);
  background: transparent; color: var(--ink);
  font-family: var(--font-sans); font-size: 12px; line-height: 16px;
  letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer;
}
.link-button:hover { background: var(--bg-chip); }
.link-button:disabled { opacity: 0.5; cursor: default; }

/* ------------------------------------------------------------------ Chip */

.fillio-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 28px; padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-s);
  background: var(--bg-chip); color: var(--ink);
  font-size: 13px; line-height: 16px; letter-spacing: 0.05em; text-transform: uppercase;
  text-align: center; white-space: nowrap;
}
.fillio-chip--metal { background: var(--brand-metal); color: var(--brand-marin); }
.fillio-chip--status { border-radius: var(--radius-pill); color: var(--state-ink); padding-inline: var(--space-4); white-space: normal; }
.fillio-chip--success { background: var(--state-success-bg); }
.fillio-chip--info { background: var(--state-info-bg); }
.fillio-chip--warning { background: var(--state-warning-bg); }
.fillio-chip--danger { background: var(--state-danger-bg); }
.fillio-chip--accent { background: var(--accent); color: var(--ink-on-accent); }
.fillio-chip--neutral { background: var(--bg-chip); color: var(--ink); }
.fillio-chip--l { min-height: 36px; padding-inline: 20px; }
.fillio-chip--s { min-height: 24px; padding: 2px var(--space-2); font-size: 12px; line-height: 16px; }
.fillio-chip--xs { min-height: 22px; padding: 2px var(--space-2); font-size: 11px; line-height: 14px; }
.fillio-chip--status.fillio-chip--s, .fillio-chip--status.fillio-chip--xs { padding-inline: 10px; }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

/* Puce sélectionnable : <label class="chip-option"><input class="visually-hidden">
   <span class="fillio-chip fillio-chip--select">…</span></label> (radio masqué, accessible). */
.chip-option { position: relative; display: inline-flex; }
.chip-option input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.fillio-chip--select {
  min-height: 40px; padding: var(--space-1) 20px;
  border-radius: var(--radius-pill);
  border: var(--stroke-hairline) solid var(--border-strong);
  background: transparent; color: var(--ink);
  cursor: pointer; white-space: normal;
}
.chip-option:hover .fillio-chip--select { background: var(--bg-chip); }
.chip-option input:checked + .fillio-chip--select { background: var(--accent); color: var(--ink-on-accent); border-color: var(--accent); }
.chip-option input:focus-visible + .fillio-chip--select { outline: 2px solid var(--border-strong); outline-offset: 2px; box-shadow: var(--shadow-focus); }
.chip-option input:disabled + .fillio-chip--select { opacity: 0.5; cursor: default; }

/* ------------------------------------------------------------------ Card */

.fillio-card {
  display: flex; flex-direction: column; gap: var(--space-4);
  min-width: 0;
  margin: 0;
  padding: var(--space-6);
  background: var(--bg-card);
  border: var(--stroke-hairline) solid var(--border);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
}
.fillio-card > h2 { margin: 0; }
.fillio-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.fillio-card--inset { background: var(--bg-inset); border-color: transparent; box-shadow: none; gap: var(--space-3); }
.fillio-card--marin { background: var(--brand-marin); border-color: var(--brand-marin); gap: var(--space-3); }
.fillio-card--marin p { font-size: 14px; line-height: 20px; color: var(--ink-secondary); }
.fillio-card--marin .fillio-btn { align-self: flex-start; }
.fillio-card--dense { padding: 20px var(--space-6); gap: var(--space-3); }
.fillio-card--dense > h2 { font-size: 20px; }

/* Carte de liste cliquable en entier. */
.card-list { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.fillio-card--row {
  flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  color: inherit; text-decoration: none;
}
a.fillio-card--row:hover { border-color: var(--border-strong); color: inherit; }
.fillio-card--row .title { font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.fillio-card--row .meta { margin-top: var(--space-1); font-size: 14px; line-height: 20px; color: var(--ink-secondary); overflow-wrap: anywhere; }
.fillio-card--row > div { min-width: 0; }

/* Groupe de champs : <fieldset class="fillio-card"> avec une légende en titre de carte. */
fieldset.fillio-card { min-inline-size: 0; }
fieldset.fillio-card > legend {
  float: left; width: 100%;
  margin: 0; padding: 0;
  font-size: 24px; line-height: 1.2;
}
fieldset.fillio-card > legend + * { clear: both; }

/* ------------------------------------------------------------------ Field */

.field-grid { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); }
.fillio-field { min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.field-grid > .fillio-field { flex: 1 1 260px; }
.field-grid > .fillio-field--full { flex-basis: 100%; }
.fillio-field > label, .fillio-field > .label { font-size: 16px; line-height: 24px; }
.fillio-field > .label-h2 { font-size: 24px; line-height: 1.2; }
fieldset.fillio-field { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
fieldset.fillio-field > legend { float: left; width: 100%; padding: 0; }
fieldset.fillio-field > legend + * { clear: both; }
.fillio-field input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.fillio-field select,
.fillio-field textarea,
.input {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-s);
  border: var(--stroke-hairline) solid var(--border-input);
  background: var(--bg-card);
  color: var(--ink);
  font-family: var(--font-sans); font-size: 16px; line-height: 24px;
}
.fillio-field textarea { height: auto; min-height: 112px; padding: var(--space-3) var(--space-4); resize: vertical; }
.fillio-field select { padding-right: var(--space-8); }
.fillio-field input:focus-visible, .fillio-field select:focus-visible, .fillio-field textarea:focus-visible, .input:focus-visible {
  outline: 2px solid transparent; border-color: var(--border-strong); box-shadow: var(--shadow-focus);
}
.fillio-field ::placeholder { color: var(--ink-secondary); opacity: 1; }
.fillio-field .help { font-size: 14px; line-height: 20px; color: var(--ink-secondary); }
.fillio-field--error input, .fillio-field--error select, .fillio-field--error textarea { border-color: var(--brand-corail); }
.field-error { display: block; font-size: 14px; line-height: 20px; color: var(--ink); }
.field-error::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: var(--space-2);
  border-radius: 50%; background: var(--state-danger-bg); vertical-align: 1px;
}
.fillio-field--compact { gap: var(--space-1); }
.fillio-field--compact > label { font-size: 14px; line-height: 20px; }
.fillio-field--compact input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.fillio-field--compact select { height: 40px; padding: 0 var(--space-3); font-size: 14px; }
.form-stack { display: flex; flex-direction: column; gap: var(--space-6); }

/* ------------------------------------------------------------------ Bandeaux (flash) */

.flash {
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-m);
  color: var(--state-ink);
  font-size: 16px; line-height: 24px;
  overflow-wrap: anywhere;
}
.flash-ok { background: var(--state-success-bg); }
.flash-info { background: var(--state-info-bg); }
.flash-warn { background: var(--state-warning-bg); }
/* Le corail ne s'étale jamais : erreur = carte blanche, contour et pastille corail. */
.flash-error { background: var(--bg-card); color: var(--ink); border: var(--stroke-hairline) solid var(--brand-corail); }
.flash-error::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: var(--space-2);
  border-radius: 50%; background: var(--state-danger-bg); vertical-align: 1px;
}

/* ------------------------------------------------------------------ FileDrop */

.fillio-drop {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  padding: var(--space-8);
  border: var(--stroke-hairline) dashed var(--border-strong);
  border-radius: var(--radius-m);
  background: var(--bg-inset);
  text-align: center;
}
.fillio-drop.is-over { border-style: solid; border-color: var(--accent); background: var(--bg-card); }
.fillio-drop .formats { margin-bottom: var(--space-2); font-size: 14px; line-height: 20px; color: var(--ink-secondary); }
.fillio-drop .help { max-width: 640px; font-size: 13px; line-height: 18px; color: var(--ink-secondary); }
.fillio-drop .chosen { font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.fillio-drop .chosen:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.file-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-input:focus-visible + .fillio-btn { outline: 2px solid var(--border-strong); outline-offset: 2px; box-shadow: var(--shadow-focus); }
.fillio-drop .btn-row { justify-content: center; }

.file-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.file-list li {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3);
  padding: var(--space-3) 0;
  border-top: var(--stroke-hairline) solid var(--border);
}
.file-list li:first-child { border-top: 0; padding-top: 0; }
.file-list code { overflow-wrap: anywhere; min-width: 0; }
.file-list .meta { margin-left: auto; font-size: 14px; line-height: 20px; color: var(--ink-secondary); white-space: nowrap; }
.file-list .file-actions { display: inline-flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

/* ------------------------------------------------------------------ StatusTimeline */

.fillio-timeline { list-style: none; margin: 0; padding: 0; }
.fillio-timeline li { position: relative; padding: 0 0 20px var(--space-8); }
.fillio-timeline li::before {
  content: ""; position: absolute; left: 5px; top: 20px; bottom: 0;
  border-left: var(--stroke-hairline) solid var(--border);
}
.fillio-timeline li:last-child { padding-bottom: 0; }
.fillio-timeline li:last-child::before { display: none; }
.fillio-timeline .dot {
  position: absolute; left: 0; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  border: var(--stroke-hairline) solid var(--border); background: var(--bg-card);
}
.fillio-timeline .done .dot { border: 0; background: var(--ink-secondary); }
.fillio-timeline .done.s-submitted .dot { background: var(--state-success-bg); }
.fillio-timeline .done.s-in_review .dot { background: var(--state-info-bg); }
.fillio-timeline .done.s-quote_sent .dot { background: var(--accent); }
.fillio-timeline .done.s-in_production .dot { background: var(--state-warning-bg); }
.fillio-timeline .title { font-size: 16px; line-height: 24px; }
.fillio-timeline .todo .title { color: var(--ink-secondary); }
.fillio-timeline .when { display: block; font-size: 13px; line-height: 18px; color: var(--ink-secondary); }
.fillio-timeline .todo .when { display: inline; margin-left: var(--space-1); }
.fillio-timeline .text { margin-top: var(--space-1); font-size: 14px; line-height: 20px; }
.fillio-timeline--compact li { padding: 0 0 var(--space-3) 28px; font-size: 14px; line-height: 20px; }
.fillio-timeline--compact li::before { top: 18px; }
.fillio-timeline--compact .dot { top: 4px; }
.fillio-timeline--compact .title { display: inline; font-size: 14px; line-height: 20px; }
.fillio-timeline--compact .when { display: inline; margin-left: var(--space-1); }

/* ------------------------------------------------------------------ Définitions (réponses) */

.answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-2) var(--space-6); }
.answers > div { min-width: 0; }
.answers dt { color: var(--ink-secondary); }
.answers dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.dl { display: grid; grid-template-columns: minmax(96px, max-content) minmax(0, 1fr); gap: 6px var(--space-4); font-size: 14px; line-height: 20px; }
.dl dt { color: var(--ink-secondary); }
.dl dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.dl--wide { grid-template-columns: minmax(160px, 220px) minmax(0, 1fr); }
.error-list { margin: var(--space-2) 0 0; padding-left: 20px; }

/* ------------------------------------------------------------------ Tableaux denses */

/* position: relative retient aussi les éléments masqués en absolu (en-têtes « visually-hidden »). */
.table-scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  padding: var(--space-2) var(--space-3);
  border-bottom: var(--stroke-hairline) solid var(--border);
  color: var(--ink-secondary);
  font-size: 12px; line-height: 16px; letter-spacing: 0.05em; text-transform: uppercase;
  text-align: left; white-space: nowrap;
}
.table td {
  padding: 10px var(--space-3);
  border-bottom: var(--stroke-hairline) solid var(--bg-page);
  font-size: 14px; line-height: 20px;
  vertical-align: top;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table--wide { min-width: 640px; }
.table .nowrap, .table .fillio-chip, .table .fillio-btn { white-space: nowrap; }
.table code { overflow-wrap: break-word; }

/* ------------------------------------------------------------------ Connexion (bandeau marin) */

.auth-hero {
  position: relative;
  flex-grow: 1;
  overflow: hidden;
  background-color: var(--brand-marin);
  background-image: url("/static/motifs/motif-losanges-fonce.svg");
  background-repeat: no-repeat;
  background-position: right -80px top 40px;
  background-size: 760px auto;
  color: var(--ink);
}
.auth-hero__inner {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-16);
  max-width: 1152px; margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter);
}
.auth-hero__copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-6); }
.auth-hero__copy > .fillio-chip { align-self: flex-start; }
.auth-hero h1 {
  font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.01em;
  color: var(--ink);
}
.auth-hero__copy p { max-width: 520px; }
.auth-card {
  flex: 1 1 320px; max-width: 440px; min-width: 0;
  display: flex; flex-direction: column; gap: var(--space-4);
  padding: var(--space-8);
  border-radius: var(--radius-m);
  background: var(--brand-metal);
}
.auth-card form { display: flex; flex-direction: column; gap: var(--space-4); }
.auth-card .note { font-size: 14px; line-height: 20px; color: var(--ink-secondary); }
.auth-card .fineprint { font-size: 13px; line-height: 18px; color: var(--ink-secondary); }
.auth-card .account-email { overflow-wrap: anywhere; }
.auth-card .cf-turnstile { min-height: 65px; }

/* ------------------------------------------------------------------ Viewer 3D */

.viewer { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: stretch; }
.viewer-stage {
  position: relative;
  flex: 999 1 420px; min-width: 0;
  height: 400px;
  border-radius: var(--radius-m);
  background: var(--viewer-bg);
  overflow: hidden;
}
.viewer--tall .viewer-stage { height: min(64vh, 620px); min-height: 400px; }
.viewer-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.viewer-status {
  position: absolute; top: 50%; left: 50%; z-index: 1;
  max-width: 90%;
  padding: 6px 14px;
  transform: translate(-50%, -50%);
  border-radius: var(--radius-pill);
  background: rgba(28, 38, 41, 0.85);
  color: var(--brand-metal);
  font-size: 14px; line-height: 20px;
  text-align: center;
  pointer-events: none;
}
.viewer-status:empty, .viewer-status[hidden] { display: none; }
.viewer-status[data-state="error"], .viewer-status[data-state="expired"] { background: var(--state-warning-bg); color: var(--state-ink); }
/* Barre d'outils posée sur la scène ; se replie (retour à la ligne) sur petit écran. */
.viewer-toolbar {
  position: absolute; left: var(--space-4); right: var(--space-4); bottom: var(--space-4); z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  pointer-events: none;
}
.viewer-toolbar > * { pointer-events: auto; }
.viewer-toolbar .tools { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.viewer-toolbar .viewer-hint { font-size: 12px; line-height: 16px; color: #a9b6b8; pointer-events: none; }
.viewer-tool {
  height: 32px; padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  border: var(--stroke-hairline) solid rgba(217, 227, 227, 0.4);
  background: rgba(28, 38, 41, 0.6); color: var(--brand-metal);
  font-family: var(--font-sans); font-size: 12px; line-height: 16px;
  letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer;
}
.viewer-tool:hover { border-color: var(--brand-metal); }
/* « Tout afficher » sans corps masqué (0.5.4) : désactivé, atténué, sans effet de survol. */
.viewer-tool:disabled, .viewer-tool[aria-disabled="true"] {
  opacity: 0.45; cursor: default;
  border-color: rgba(217, 227, 227, 0.4);
}
.viewer-side {
  flex: 1 1 220px; min-width: 0;
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-m);
  background: var(--bg-inset);
}
.viewer-bodies { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.viewer-bodies li { display: flex; flex-direction: column; gap: 2px; }
.viewer-bodies label { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 20px; cursor: pointer; overflow-wrap: anywhere; }
.viewer-bodies input[type="checkbox"] { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--brand-marin); }
.viewer-bodies .body-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding-left: 26px; font-size: 13px; line-height: 18px; color: var(--ink-secondary); }
.swatch {
  display: inline-block; flex: none;
  width: 12px; height: 12px; margin-top: 4px;
  border-radius: 3px;
  background: var(--bg-chip);
  /* liseré : la teinte « autre » (métal) se confond sinon avec le fond en creux */
  box-shadow: inset 0 0 0 1px var(--border-input);
}
/* Couleur = groupe du pré-tri (0.5.0) : surmoulage jaune, composants bleu, câbles vert,
   autre métallique (mêmes teintes que la scène, frontend/viewer/src/palette.ts). */
.swatch--overmold { background: var(--viewer-body-overmold); }
.swatch--internal { background: var(--viewer-body-pcb); }
.swatch--cable { background: var(--viewer-body-cable); }
.swatch--other { background: var(--brand-metal); }
/* Sans tri affiché (0.5.4 : impression 3D, harnais, corps unique hors surmoulage) : une seule
   couleur neutre, celle de la scène (`plain`, palette.ts NEUTRAL_COLOR = brand-metal). */
.viewer--plain .swatch { background: var(--brand-metal); }
/* « Zones minces » (0.6.0) : bouton bascule de la barre (plein métal quand actif) et légende
   posée en haut de la scène ; corail sous 0,5 mm, jaune de 0,5 à 1 mm (palette.ts THIN_*). */
.viewer-tool[aria-pressed="true"] { background: var(--brand-metal); color: var(--brand-marin); border-color: var(--brand-metal); }
.viewer-thin-legend {
  position: absolute; top: var(--space-3); left: var(--space-3); right: var(--space-3); z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
  width: fit-content; max-width: calc(100% - 2 * var(--space-3));
  margin: 0; padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(28, 38, 41, 0.85); color: var(--brand-metal);
  pointer-events: none;
}
.viewer-thin-legend[hidden] { display: none; }
.viewer-thin-legend .swatch { margin-top: 0; box-shadow: none; }
.viewer-thin-legend .swatch--thin, .swatch--thin { background: var(--brand-corail); }
.viewer-thin-legend .swatch--medium, .swatch--medium { background: var(--brand-jaune); }
.viewer-summary { margin-top: var(--space-1); font-size: 13px; line-height: 18px; color: var(--ink-secondary); }

/* Barre « Analyse préliminaire » du pas 5 (0.7.0 ; 0.7.1 : directement sous la scène à toutes
   les largeurs, état annoté d'emblée). Libellé du groupe, pilules des calques (elles
   s'enroulent ; pleines marin = calque affiché), « Vue simple » contourée en pointillé à la
   suite, légende de couleurs des calques actifs, définitions repliées ; mêmes teintes que
   palette.ts (corail sous 1 mm, jaune sous 2 mm, métal sombre affleurant, vert : points de
   maintien ; enveloppe et sorties de câble sur une vignette marin, comme dans la scène). */
.viewer-annot {
  flex-basis: 100%;
  display: flex; flex-direction: column; gap: var(--space-2);
  margin-top: calc(-1 * var(--space-2));
}
.viewer-annot__title {
  margin: 0; color: var(--ink-secondary);
  font-size: 12px; line-height: 16px; letter-spacing: 0.05em; text-transform: uppercase;
}
.viewer-annot__tools { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.viewer-annot__tool {
  min-height: 32px; padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  border: var(--stroke-hairline) solid var(--border-input);
  background: var(--bg-card); color: var(--ink);
  font-family: var(--font-sans); font-size: 13px; line-height: 16px;
  cursor: pointer;
}
.viewer-annot__tool:hover { border-color: var(--border-strong); }
.viewer-annot__tool[aria-pressed="true"] { background: var(--brand-marin); color: var(--ink-on-accent); border-color: var(--brand-marin); }
.viewer-annot__simple { border-style: dashed; }
.viewer-annot__simple[aria-pressed="true"] { border-style: solid; }
.viewer-annot__legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-4);
  margin: 0; padding: 0; list-style: none; color: var(--ink-secondary);
}
.viewer-annot__legend:not(:has(> li:not([hidden]))) { display: none; }
.viewer-annot__legend > li[hidden] { display: none; }
.viewer-annot__more { color: var(--ink-secondary); }
.viewer-annot__more summary { cursor: pointer; color: var(--link); width: fit-content; }
.viewer-annot__defs { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); margin: var(--space-2) 0 0; }
.viewer-annot__defs dt { color: var(--ink); }
.viewer-annot__defs dd { margin: 0; }
.viewer-annot__defs p { margin: 0; }
.viewer-annot__defs ul { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: 0; padding: 0; list-style: none; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-item .swatch { margin-top: 0; }
.swatch--lt1 { background: var(--brand-corail); }
.swatch--lt2 { background: var(--brand-jaune); }
.swatch--flush { background: var(--border-input); }
.swatch--holding { background: var(--brand-vert); }
.swatch--inside { background: var(--viewer-body-overmold); opacity: 0.45; }
.swatch--envelope, .swatch--envelope-over, .swatch--exit { background: var(--viewer-bg); box-shadow: inset 0 0 0 2px var(--brand-metal); }
.swatch--envelope-over { box-shadow: inset 0 0 0 2px var(--brand-corail); }
.swatch--exit { box-shadow: none; background: radial-gradient(circle, var(--brand-corail) 0 3px, var(--viewer-bg) 3.5px); }
html:not(.js) .viewer-annot { display: none; }

/* Liste des corps au pas 5 (0.7.1) : carte repliée (<details> natif fermé), titre au
   <summary> avec chevron CSS ; ouverte, la liste en lecture seule de la scène. */
.bodies-details { gap: 0; }
.bodies-details[open] { gap: var(--space-4); }
.bodies-details__summary {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 32px; list-style: none; cursor: pointer;
  font-size: 24px; line-height: 1.2;
}
.bodies-details__summary::-webkit-details-marker { display: none; }
.bodies-details__summary::after {
  content: ""; flex: none;
  width: 8px; height: 8px; margin-left: 2px;
  border-right: 1.5px solid var(--ink-secondary); border-bottom: 1.5px solid var(--ink-secondary);
  transform: rotate(45deg); margin-top: -4px;
}
.bodies-details[open] > .bodies-details__summary::after { transform: rotate(-135deg); margin-top: 4px; }
.viewer-side--outside { padding: var(--space-4); }

/* Points de l'analyse (pas 5) : niveau en puce, constat, suggestion, « Voir ». */
.analysis-points { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.analysis-point {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start;
  gap: var(--space-2) var(--space-3);
  padding-bottom: var(--space-3); border-bottom: var(--stroke-hairline) solid var(--border);
}
.analysis-point:last-child { padding-bottom: 0; border-bottom: 0; }
.analysis-point .fillio-chip { margin-top: 2px; }
.analysis-point__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.analysis-point__text { margin: 0; overflow-wrap: anywhere; }
.analysis-point__fix { margin: 0; color: var(--ink-secondary); }
.analysis-notes { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-4); }
.analysis-notes h3 { margin: 0; }
/* Point mis en évidence par « Voir » (0.7.1, un seul à la fois) : liseré marin à gauche et
   fond en creux ; la zone et le corps sont surlignés dans la scène. */
.analysis-point { border-radius: var(--radius-s); transition: background-color 0.2s ease, box-shadow 0.2s ease; }
.analysis-point.is-focused, .feasibility__zones li.is-focused {
  background: var(--bg-inset);
  box-shadow: inset 3px 0 0 var(--brand-marin), -8px 0 0 var(--bg-inset), 8px 0 0 var(--bg-inset);
}

/* Attente du pas 5 (0.7.1) : puce « Analyse en cours » avec un point qui pulse, étapes
   allumées au fil du temps écoulé (previews.js pose `data-wait-stage`) ; l'étape courante
   pulse doucement. Aucune animation si l'utilisateur les réduit ; sans JavaScript, ni
   étapes ni texte « s'affichera ici » (le <noscript> dit de recharger). */
.analysis-wait__chip { display: inline-flex; align-items: center; gap: 8px; }
.analysis-wait__pulse {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-marin);
  animation: analysis-pulse 1.6s ease-in-out infinite;
}
.analysis-wait__steps {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4);
  margin: 0; padding: 0; list-style: none;
  font-size: 14px; line-height: 20px; color: var(--ink-secondary);
}
.analysis-wait__step { display: inline-flex; align-items: center; gap: 8px; }
.analysis-wait__step + .analysis-wait__step::before {
  content: ""; flex: none; width: 16px; height: 1px; margin-right: var(--space-2);
  background: var(--border);
}
.analysis-wait__dot {
  flex: none; width: 10px; height: 10px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--border-input);
}
.analysis-wait__step.is-on { color: var(--ink); }
.analysis-wait__step.is-on .analysis-wait__dot { background: var(--state-info-bg); box-shadow: inset 0 0 0 1.5px var(--brand-marin); }
.analysis-wait__step[aria-current="step"] .analysis-wait__dot { animation: analysis-pulse 1.6s ease-in-out infinite; }
@keyframes analysis-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}
html:not(.js) .analysis-wait__steps, html:not(.js) .analysis-wait__text { display: none; }

/* Puce de groupe d'un corps (0.5.1) : nom court du groupe, sur la teinte du corps dans la
   scène, texte marin (mêmes paires que les statuts). */
.group-chip {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-height: 24px; padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-chip); color: var(--state-ink);
  font-size: 11px; line-height: 14px; letter-spacing: 0.05em; text-transform: uppercase;
  white-space: nowrap;
}
.group-chip--overmold { background: var(--viewer-body-overmold); }
.group-chip--internal { background: var(--viewer-body-pcb); }
.group-chip--cable { background: var(--viewer-body-cable); }
.group-chip--other { background: var(--brand-metal); box-shadow: inset 0 0 0 1px var(--border-input); }

/* Tri des corps (pas 3, brouillon ; légende allégée en 0.5.1) : la liste passe sous la scène,
   une ligne par corps — visibilité, pastille, nom (repli natif « Détails » : dimensions,
   triangles, raison, « Cadrer »), puce de groupe et pilule « Changer » (le <select> natif,
   transparent, posé sur la puce et la pilule ; sans JavaScript, le <select> reste visible). */
.viewer--groups .viewer-stage, .viewer--groups .viewer-side { flex-basis: 100%; }
.viewer--groups .viewer-bodies { gap: 2px; max-height: 28rem; overflow-y: auto; }
.viewer-bodies .body-row {
  --row-gap: 10px;
  --change-w: 196px;
  display: grid; grid-template-columns: 16px 12px minmax(0, 1fr) var(--change-w);
  align-items: start; column-gap: var(--row-gap);
  padding: 4px 8px;
  border-radius: var(--radius-s);
}
.body-row > input[type="checkbox"] { margin: 8px 0 0; }
.body-row > .swatch { margin-top: 10px; }
.body-row__details { grid-column: 3; min-width: 0; }
.body-row__name {
  display: flex; align-items: center; gap: var(--space-2);
  min-height: 32px; padding: 4px 0;
  font-size: 14px; line-height: 20px; overflow-wrap: anywhere;
  list-style: none; cursor: pointer;
}
.body-row__name::-webkit-details-marker { display: none; }
/* Chevron du repli (dessiné en CSS, pas un caractère) : à droite du nom, tourne à l'ouverture. */
.body-row__name::after {
  content: ""; flex: none;
  width: 6px; height: 6px; margin-left: 2px;
  border-right: 1.5px solid var(--ink-secondary); border-bottom: 1.5px solid var(--ink-secondary);
  transform: rotate(-45deg);
}
.body-row__details[open] > .body-row__name::after { transform: rotate(45deg); margin-top: -3px; }
.body-row__name:hover .body-row__label { text-decoration: underline; text-underline-offset: 2px; }
.body-row__more {
  display: flex; flex-direction: column; gap: var(--space-2);
  margin: 2px calc(-1 * (var(--change-w) + var(--row-gap))) 6px calc(-1 * (28px + 2 * var(--row-gap)));
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-s);
  background: var(--bg-card);
  font-size: 13px; line-height: 18px; color: var(--ink-secondary);
}
.body-row__more p { margin: 0; }
.body-row__reason { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.body-row__reason .help { font-size: 13px; line-height: 18px; }
.viewer-bodies li:not(.body-row) { margin-inline: -6px; padding: 4px 6px; border-radius: var(--radius-s); }
.body-row.is-selected, .viewer-bodies li.is-selected {
  background: var(--bg-card); box-shadow: inset 0 0 0 1px var(--border-strong);
}
.body-change {
  grid-column: 4; justify-self: end; position: relative;
  display: flex; align-items: center; gap: 6px; max-width: 100%; min-height: 32px;
}
.viewer-bodies .body-change__pill {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-height: 32px; padding: 0 12px;
  border: var(--stroke-hairline) solid var(--border-strong); border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 12px; line-height: 16px; letter-spacing: 0.05em; text-transform: uppercase;
  white-space: nowrap;
}
.body-change:hover .body-change__pill { background: var(--bg-chip); }
.body-change__select { min-width: 0; max-width: 100%; min-height: 32px; font-size: 14px; }
/* Avec JavaScript : le <select> couvre la puce et la pilule, invisible ; un clic ouvre la
   liste native (souris, doigt), le clavier garde le <select> lui-même. */
.js .body-change__select {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer; font-size: 16px;
}
.js .body-change:has(.body-change__select:focus-visible) .body-change__pill {
  outline: 2px solid var(--border-strong); outline-offset: 2px; box-shadow: var(--shadow-focus);
}
/* Sans JavaScript : le <select> natif reste visible (sa valeur se lit), la puce s'efface. */
html:not(.js) .body-change .group-chip { display: none; }
html:not(.js) .body-change__text {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
html:not(.js) .body-change__pill { min-height: 0; padding: 0; border: 0; }
.groups-form { display: flex; flex-direction: column; gap: var(--space-3); }
.groups-form__intro { max-width: 72ch; color: var(--ink-secondary); }
.groups-form__status:empty { display: none; }
.groups-form .fillio-btn, .service-form .fillio-btn { align-self: flex-start; }
.body-group--static { margin: 0; padding-left: 26px; font-size: 13px; line-height: 18px; }

/* Gros assemblages (0.5.3, à partir de 12 corps) : légende regroupée par groupe ; surmoulage
   et câbles ouverts (titre + liste), composants et autres repliés (<details> natif). */
.legend-group { display: flex; flex-direction: column; gap: var(--space-2); }
.legend-group + .legend-group { margin-top: var(--space-2); padding-top: var(--space-3); border-top: var(--stroke-hairline) solid var(--border); }
.legend-group__title {
  display: flex; align-items: center; gap: var(--space-2);
  margin: 0; font-size: 14px; line-height: 20px; letter-spacing: 0.05em; text-transform: uppercase;
}
.legend-group__title .swatch { margin-top: 0; }
details.legend-group > summary.legend-group__title { min-height: 32px; list-style: none; cursor: pointer; }
details.legend-group > summary.legend-group__title::-webkit-details-marker { display: none; }
/* Chevron du repli (CSS, pas un caractère), comme le repli « Détails » d'une ligne. */
details.legend-group > summary.legend-group__title::after {
  content: ""; flex: none;
  width: 6px; height: 6px; margin-left: 2px;
  border-right: 1.5px solid var(--ink-secondary); border-bottom: 1.5px solid var(--ink-secondary);
  transform: rotate(-45deg);
}
details.legend-group[open] > summary.legend-group__title::after { transform: rotate(45deg); margin-top: -3px; }
.legend-group__empty { margin: 0; color: var(--ink-secondary); }

/* Budget d'affichage (0.5.3) : un corps non dessiné reste trié dans la légende, grisé, sans
   case de visibilité (la colonne garde sa largeur). */
.body-row__nobox { width: 16px; }
.body-row--hidden .body-row__label, .body-row--hidden .body-static { color: var(--ink-secondary); }
.body-row--hidden > .swatch, .body-row--hidden .body-static .swatch { opacity: 0.55; }
.body-row__hidden { color: var(--ink-secondary); font-size: 12px; line-height: 16px; }
.body-row__name .body-row__hidden { flex: none; }
.body-static { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding-left: 26px; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.viewer-notice { margin-bottom: var(--space-3); font-size: 14px; line-height: 20px; padding: var(--space-3) var(--space-4); }
/* Avis du tri dans la fiche automatique (surmoulage absent, 0.5.3). */
.sheet-notice { padding: var(--space-3); border-radius: var(--radius-s); background: var(--state-info-bg); color: var(--state-ink); }

/* Faisabilité de l'impression 3D (0.6.0) : un constat par ligne, pastille de niveau (jamais
   un aplat), zones avec « Voir » ; au pas 4, une ligne sous les puces de résine. */
.feasibility__issues { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.feasibility__issue { display: flex; flex-direction: column; gap: var(--space-2); padding-left: 18px; position: relative; font-size: 15px; line-height: 22px; }
.feasibility__issue::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--state-info-bg);
}
/* jamais le corail (erreur) : un constat à corriger, pas un refus */
.feasibility__issue--blocking::before, .feasibility__issue--major::before { background: var(--state-warning-bg); }
.feasibility__zones { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.feasibility__zones li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.resin-feasibility { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-2); }
.resin-feasibility__line { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); margin: 0; }
.resin-feasibility__line[hidden] { display: none; }
.resin-guide summary { cursor: pointer; color: var(--link); }
/* « Fabrication par Fillio seulement » (0.6.0) : une ligne discrète en bas de la carte. */
.fillio-only { display: flex; flex-direction: column; gap: 2px; margin-top: var(--space-2); }
.fillio-only__label { display: flex; align-items: flex-start; gap: var(--space-2); cursor: pointer; }
.fillio-only__label input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--brand-marin); }
.fillio-only .caption { padding-left: 24px; }
.resin-guide__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); margin: var(--space-2) 0 0; }
.resin-guide__list dt { color: var(--ink); }
.resin-guide__list dd { margin: 0; color: var(--ink-secondary); }
.viewer-pick-hint { margin: 0; color: var(--ink-secondary); }
.viewer--groups .viewer-pick-hint { flex-basis: 100%; margin-top: calc(-1 * var(--space-2)); }
html:not(.js) .viewer-pick-hint { display: none; }
@media (max-width: 640px) {
  .body-group--static { padding-left: 0; }
}
@media (max-width: 480px) {
  /* Une ligne aussi sur téléphone : la puce de groupe porte un chevron et ouvre la liste ; la
     pilule « Changer » s'efface à l'écran mais reste le libellé lu du <select>. Un nom long
     passe à la ligne plutôt que d'être coupé (les noms d'un même fichier diffèrent souvent
     par la fin : « … (3) »). */
  .viewer--groups .viewer-side { padding: var(--space-3); }
  .viewer-bodies .body-row { --row-gap: 8px; --change-w: 116px; padding-inline: 4px; }
  .js .viewer-bodies .body-change__pill {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .js .body-change .group-chip { min-height: 32px; gap: 6px; padding-right: 8px; }
  .js .body-change .group-chip::after {
    content: ""; width: 6px; height: 6px; margin-top: -3px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
  }
  .js .body-change:has(.body-change__select:focus-visible) .group-chip {
    outline: 2px solid var(--border-strong); outline-offset: 2px; box-shadow: var(--shadow-focus);
  }
}

/* Menu flottant d'un corps choisi dans la scène (0.5.1) : carte blanche 12 px posée au point
   du clic (le viewer la recale dans le cadre), pilules des quatre groupes (le groupe courant
   plein, les autres contourés), « Cadrer » et une croix. */
.viewer-menu {
  position: absolute; left: var(--space-3); top: var(--space-3); z-index: 6;
  display: flex; flex-direction: column; gap: var(--space-3);
  width: max-content; max-width: min(340px, calc(100% - 16px));
  padding: var(--space-3) var(--space-4) var(--space-4);
  border: var(--stroke-hairline) solid var(--border); border-radius: var(--radius-m);
  background: var(--bg-card); color: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.viewer-menu__head { display: flex; align-items: center; gap: var(--space-2); }
.viewer-menu__head .link-button { flex: none; }
.viewer-menu__head .swatch { margin-top: 0; }
.viewer-menu__name { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.viewer-menu__close {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 32px; margin: -4px -8px -4px 0; padding: 0;
  border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--ink);
  font-size: 20px; line-height: 1; cursor: pointer;
}
.viewer-menu__close:hover { background: var(--bg-chip); }
.viewer-menu__groups { display: flex; flex-wrap: wrap; gap: 6px; }
.viewer-menu__group {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 0 12px;
  border: var(--stroke-hairline) solid var(--border-strong); border-radius: var(--radius-pill);
  background: transparent; color: var(--ink);
  font-family: var(--font-sans); font-size: 12px; line-height: 16px;
  letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer;
}
.viewer-menu__group .swatch { margin-top: 0; width: 10px; height: 10px; }
.viewer-menu__group:hover { background: var(--bg-chip); }
.viewer-menu__group[aria-pressed="true"] { background: var(--accent); color: var(--ink-on-accent); border-color: var(--accent); }
.viewer-menu__current { margin: 0; }
.viewer-stage canvas.is-pickable { cursor: pointer; }
@media (pointer: coarse) {
  .viewer-menu__group, .viewer-menu__close, .viewer-menu .link-button { min-height: 40px; }
  .viewer-menu__close { width: 40px; height: 40px; }
}
@media (forced-colors: active) {
  .viewer-menu__group[aria-pressed="true"] { border-width: 3px; }
}

/* Service au pas 3 : puces sélectionnables dans la fiche automatique. */
.service-form { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-4); padding-top: var(--space-4); border-top: var(--stroke-hairline) solid var(--border); }
.service-form .fillio-field { gap: var(--space-2); }
.service-form__legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: 13px; line-height: 18px; color: var(--ink-secondary); }
.service-form__status:empty { display: none; }

/* ------------------------------------------------------------------ Texte long (confidentialité) */

.prose { gap: var(--space-4); max-width: 880px; }
.prose h2 { margin-top: var(--space-4); }
.prose p { max-width: 72ch; }
/* 0.6.1 : conditions d'utilisation et page sécurité (listes, champs « à compléter »). */
.prose ul {
  display: flex; flex-direction: column; gap: var(--space-2);
  max-width: 72ch; margin: 0; padding-left: var(--space-6);
}
.terms-field {
  padding: 0 var(--space-1); border-radius: var(--radius-s);
  background: var(--state-warning-bg); color: var(--state-ink);
}
.page-head + .flash { max-width: 880px; }  /* « Texte provisoire » de /terms */
@media print {
  .terms-field { background: none; border: var(--stroke-hairline) solid currentColor; }
}
/* Sous-traitants (page confidentialité) : une carte par ligne sous 640 px. */
.table--stack tbody th {
  color: var(--ink); font-size: 14px; line-height: 20px; letter-spacing: normal;
  text-transform: none; white-space: normal; vertical-align: top;
  border-bottom: var(--stroke-hairline) solid var(--bg-page);
}
.table-stack__label { display: none; }
@media (max-width: 640px) {
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--stack tr { display: block; padding: var(--space-3) 0; border-bottom: var(--stroke-hairline) solid var(--border); }
  .table--stack tbody th, .table--stack td { display: block; padding: var(--space-1) 0; border: 0; }
  .table--stack tbody th { font-size: 16px; line-height: 24px; }
  .table-stack__label {
    display: block; color: var(--ink-secondary); font-size: 12px; line-height: 16px;
    letter-spacing: 0.05em; text-transform: uppercase;
  }
}
/* Zone de dépôt en bêta privée : rappel « fichiers de test seulement ». */
.drop-beta {
  align-self: center; padding: var(--space-1) var(--space-3); border-radius: var(--radius-s);
  background: var(--state-warning-bg); color: var(--state-ink); font-size: 13px; line-height: 18px;
  text-align: center;
}

/* ------------------------------------------------------------------ Bandeau bêta privée (0.6.1) */

.beta-banner { background: var(--state-warning-bg); color: var(--state-ink); }
.beta-banner__inner {
  max-width: 1152px; margin: 0 auto; padding: var(--space-3) var(--gutter);
  font-size: 14px; line-height: 20px; overflow-wrap: anywhere;
}
.beta-banner a { color: var(--state-ink); text-decoration: underline; white-space: nowrap; }

/* ------------------------------------------------------------------ Tableau de bord interne */

.surface-staff .wrap { max-width: 1184px; padding-inline: clamp(16px, 4vw, 48px); }
.surface-staff .site-header__inner { padding-inline: clamp(16px, 4vw, 48px); }
.surface-staff .page { gap: 20px; padding-block: var(--space-8) var(--space-12); }
.surface-staff .layout-aside { gap: 20px; }
.surface-staff .layout-aside > .main-col, .surface-staff .layout-aside > aside { gap: 20px; }
.surface-staff h1 { font-size: 32px; line-height: 1.15; overflow-wrap: anywhere; }
.surface-staff h1 code { font-size: 20px; }
.status-form { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-3); border-top: var(--stroke-hairline) solid var(--border); }
.status-form .fillio-btn { align-self: flex-start; }

/* ------------------------------------------------------------------ Parcours en 4 pas (0.4.0) */

.label-upper { font-size: 13px; line-height: 16px; letter-spacing: 0.05em; text-transform: uppercase; }
.title-l { font-size: clamp(30px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.005em; }

/* Frise d'avancement : fait = vert ✓, en cours = marin numéroté, à venir = contour ;
   traits fins entre les pas. Sous 640 px : barre à 4 segments + « Pas N sur 4 · Libellé »
   (la liste reste lue par les lecteurs d'écran). */
.stepper { position: relative; display: flex; flex-direction: column; gap: var(--space-2); }
.stepper__caption { font-size: 13px; line-height: 18px; color: var(--ink-secondary); }
.stepper__list {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4);
  margin: 0; padding: 0; list-style: none;
}
.stepper__step { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; color: var(--ink-secondary); }
.stepper__step:last-child { flex: 0 0 auto; }
.stepper__step:not(:last-child)::after {
  content: ""; flex: 1 1 24px; min-width: 16px; height: var(--stroke-hairline);
  margin-left: 6px; background: var(--border);
}
.stepper__dot {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  border: var(--stroke-hairline) solid var(--border); background: var(--bg-card);
  color: var(--ink-secondary); font-size: 13px; line-height: 1;
}
.stepper__step--done .stepper__dot { border-color: transparent; background: var(--state-success-bg); color: var(--state-ink); }
.stepper__step--current { color: var(--ink); }
.stepper__step--current .stepper__dot { border-color: transparent; background: var(--accent); color: var(--ink-on-accent); }
.stepper__label { white-space: nowrap; }
/* 0.5.2 : pas fait = lien pour revenir en arrière (pastille et libellé cliquables, pilule au
   focus) ; le pas 2 (déclaration immuable) n'en est jamais un. */
.stepper__link {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0;
  margin: -4px -8px -4px -4px; padding: 4px 8px 4px 4px; border-radius: var(--radius-pill);
  color: inherit; text-decoration: none;
}
.stepper__link:hover { color: var(--ink); }
.stepper__link:hover .stepper__label { text-decoration: underline; text-underline-offset: 3px; }
.stepper__link:hover .stepper__dot { box-shadow: 0 0 0 2px var(--state-success-bg); }
/* Pas à venir déjà atteignable (0.5.3, page de la déclaration) : pastille contourée. */
.stepper__step--todo .stepper__link:hover .stepper__dot { box-shadow: 0 0 0 2px var(--border-strong); }
.stepper__bar { display: none; gap: 6px; }
.stepper__seg { flex: 1; height: 4px; border-radius: 2px; background: var(--border); }
.stepper__seg--done { background: var(--state-success-bg); }
.stepper__seg--current { background: var(--accent); }
.stepper__compact { display: none; color: var(--ink-secondary); }
.stepper__compact-current { color: var(--ink); }

/* Pas 1 et 2 : un seul formulaire ; la déclaration est repliée par journey.js (chargé dans
   le <head>) tant qu'aucun fichier n'est choisi. Sans ce script, tout reste visible. */
.journey { display: flex; flex-direction: column; gap: var(--space-8); }
.journey-declaration { display: flex; flex-direction: column; gap: var(--space-6); scroll-margin-top: var(--space-4); }
.journey-js .journey-declaration:not(.is-open) { display: none; }
.journey-requests { display: flex; flex-direction: column; gap: var(--space-4); margin-top: var(--space-4); }
.fillio-drop--hero { padding: clamp(32px, 6vw, 72px) var(--space-6); gap: var(--space-3); }
.fillio-drop .drop-title { font-size: 24px; line-height: 1.2; }
.fillio-drop .note { font-size: 13px; line-height: 18px; color: var(--ink-secondary); }
.fillio-drop--error { border-color: var(--brand-corail); }
.fillio-drop--compact { margin-top: var(--space-2); padding: var(--space-6) var(--space-4); }
/* Une seule action principale à l'écran : « Choisir les fichiers » passe en secondaire dès
   que des fichiers sont choisis, et sans JavaScript (formulaire entier visible). */
.journey.is-declaring .fillio-btn--choose { background: transparent; color: var(--ink); border-color: var(--border-strong); }
/* Sans JavaScript, le champ fichier natif suffit (il affiche les fichiers choisis). */
html:not(.js) .fillio-btn--choose { display: none; }
.journey-controlled { margin-top: calc(-1 * var(--space-4)); text-align: center; }
.fillio-card--error { border-color: var(--brand-corail); }
.fillio-field input.input--half { max-width: 520px; }
.text-button {
  min-height: 24px; padding: 0; border: 0; background: none;
  color: var(--link); font-size: 14px; line-height: 20px;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.text-button:hover { color: var(--ink); }
.check-field { display: flex; align-items: flex-start; gap: var(--space-3); padding-top: var(--space-1); font-size: 14px; line-height: 20px; }
.check-field input[type="checkbox"] { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--brand-marin); }
.check-field--error input[type="checkbox"] { outline: 2px solid var(--brand-corail); outline-offset: 2px; }
.bullet-list { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding-left: 18px; font-size: 14px; line-height: 20px; }
.card-list--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: var(--space-4); }

/* Pas 3 : fiche automatique (définitions en grille), barre d'action. */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--space-3) var(--space-4); margin: 0; }
.facts > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.facts dt { font-size: 13px; line-height: 18px; color: var(--ink-secondary); }
.facts dd { margin: 0; font-size: 16px; line-height: 24px; overflow-wrap: anywhere; }
.facts .facts__wide { grid-column: 1 / -1; }
.facts--stack { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
/* « Votre déclaration » (0.5.3) : la réponse, courte, puis la date et l'heure sur une ligne. */
.facts--declaration { grid-template-columns: minmax(96px, auto) minmax(0, 1fr); }
.facts__list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 20px; }
.journey-actions { display: flex; flex-direction: column; gap: var(--space-3); }
.journey-actions .fillio-btn { width: 100%; }
.journey-actions .caption { text-align: center; color: var(--ink-secondary); }

/* Pas 4 : « Et ensuite ». */
.next-steps { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 20px; }
.next-steps__item { display: flex; align-items: flex-start; gap: 10px; }
.next-steps__dot {
  flex: none; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%;
  border: var(--stroke-hairline) solid var(--border); background: var(--bg-card);
}
.next-steps__item--first .next-steps__dot { border-color: transparent; background: var(--state-success-bg); }

@media (max-width: 640px) {
  .stepper:not(.stepper--preview) .stepper__caption,
  .stepper:not(.stepper--preview) .stepper__list {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  /* Les liens de la liste (lue par les lecteurs d'écran) restent atteignables au clavier :
     la liste réapparaît tant qu'un de ses liens a le focus. */
  .stepper:not(.stepper--preview) .stepper__list:focus-within {
    position: static; width: auto; height: auto; margin: 0; overflow: visible;
    clip-path: none; white-space: normal;
  }
  .stepper:not(.stepper--preview) .stepper__bar { display: flex; }
  .stepper:not(.stepper--preview) .stepper__compact { display: block; }
  .stepper--preview .stepper__list { flex-direction: column; align-items: flex-start; }
  .stepper--preview .stepper__step::after { display: none; }
  .stepper--preview .stepper__dot { width: 24px; height: 24px; font-size: 12px; }
  .fillio-drop--hero { padding: var(--space-8) var(--space-4); }
  .fillio-drop .drop-title { font-size: 20px; }

  /* Pas 3 : barre d'action collée en bas de l'écran (« ← » + action principale). Le focus
     clavier ne passe jamais dessous (scroll-padding). */
  body.has-action-bar { padding-bottom: 80px; }
  html:has(body.has-action-bar) { scroll-padding-bottom: 96px; }
  .has-action-bar .journey-actions:not(.journey-actions--stack) {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
    flex-direction: row; align-items: center; gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-page); border-top: var(--stroke-hairline) solid var(--border);
  }
  .has-action-bar .journey-actions:not(.journey-actions--stack) .fillio-btn--primary { flex: 1 1 auto; width: auto; }
  .has-action-bar .journey-actions:not(.journey-actions--stack) .journey-actions__back { order: -1; flex: 0 0 auto; width: auto; padding-inline: 20px; }
  .has-action-bar .journey-actions:not(.journey-actions--stack) .journey-actions__label {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  .has-action-bar .journey-actions:not(.journey-actions--stack) > p { flex: 1 1 auto; }
}

/* ------------------------------------------------------------------ Mobile */

@media (max-width: 720px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-header--collapsible:not(.is-open) .site-nav { display: none; }
  .js .site-header--collapsible.is-open .site-nav { flex-basis: 100%; padding-bottom: var(--space-1); }
  .site-header__inner { min-height: 56px; padding-block: 10px; }
  .brand svg { height: 24px; }
  .nav-pill .long { display: none; }
  .nav-pill .short { display: inline; }
}

@media (max-width: 640px) {
  .page { padding-block: var(--space-8) var(--space-12); gap: var(--space-4); }
  .fillio-card { padding: 20px var(--space-4); }
  .fillio-btn { padding-inline: var(--space-6); }
  .form-actions .fillio-btn, .fillio-drop .fillio-btn { width: 100%; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .fillio-drop { padding: var(--space-6) var(--space-4); }
  .file-list .meta { margin-left: 0; }
  .viewer-stage { height: 320px; flex-basis: 100%; }
  .viewer--tall .viewer-stage { height: 56vh; min-height: 320px; }
  .viewer-toolbar { left: var(--space-3); right: var(--space-3); bottom: var(--space-3); }
  .viewer-side { flex-basis: 100%; }
  .viewer-stage { order: -2; }
  .analysis-point { grid-template-columns: minmax(0, 1fr) auto; }
  .analysis-point > .fillio-chip { grid-column: 1 / -1; justify-self: start; }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dl dd { margin-bottom: var(--space-2); }

  /* Connexion : tout le bandeau est marin, le formulaire en bas comme sur la maquette. */
  .auth-hero { background-position: left -120px top 120px; background-size: 620px auto; }
  .auth-hero__inner { gap: var(--space-4); padding: var(--space-8) var(--space-4) var(--space-4); align-items: stretch; }
  .auth-hero__copy { gap: var(--space-4); }
  .auth-hero__facts { display: none; }
  .auth-card { max-width: none; padding: 20px; gap: var(--space-3); }
  .page--auth .site-footer { border-top: 0; background: var(--brand-marin); color: #a9b6b8; font-size: 12px; line-height: 16px; }
  .page--auth .site-footer a { color: var(--brand-bleu); }
}

/* Sans JavaScript : pas de « Chargement… » ni de barre d'outils inerte sur la scène, champ
   fichier natif visible. */
html:not(.js) .viewer-status[data-viewer-status], html:not(.js) .viewer-toolbar { display: none; }
html:not(.js) .file-input { position: static; opacity: 1; width: auto; height: auto; }

/* Indications de gestes selon le pointeur (souris ou tactile). */
.viewer-hint--touch { display: none; }
@media (pointer: coarse) {
  .viewer-hint--mouse { display: none; }
  .viewer-hint--touch { display: inline; }
}

@media (forced-colors: active) {
  .chip-option input:checked + .fillio-chip--select { border-width: 3px; }
  .fillio-chip--status, .flash { border: 1px solid CanvasText; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .analysis-wait__pulse, .analysis-wait__dot { animation: none !important; }
}
