/* La vitrine d'extraction : la DA de la vitrine d'anonymisation et d'Ally Airport. Un fond
   clair, des cartes arrondies, des boutons en pastille, des cibles de 44 px au doigt. Les
   couleurs des méthodes et des zones sont celles d'Okabe-Ito, toujours doublées d'un
   libellé ou d'un trait. Les couleurs ne vivent qu'ici, dans les jetons. */
:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --ink: #10204a;
  --text: #1b2142;
  --muted: #5f6b8a;
  --line: #e3e6ee;
  --soft: #eceff6;
  --soft-2: #dfe4f0;
  --accent: #1f5fd6;
  --accent-ink: #ffffff;
  --accent-soft: #e7eefc;
  --ok: #1e8e5a;
  --ok-soft: #e5f4ec;
  --warn: #a35a00;
  --warn-soft: #fff2e0;
  --ko: #b3261e;
  --ko-soft: #fbe9e7;
  --zone: #56b4e9;
  --zone-fill: rgba(86, 180, 233, 0.30);
  /* Une couleur par méthode (Okabe-Ito). */
  --m1: #0072b2;
  --m2: #009e73;
  --m3: #d55e00;
  --m4: #cc79a7;
  --m5: #8a6d00;
  --m6: #5d3fa8;
  --radius: 18px;
  --shadow: 0 12px 32px -14px rgba(16, 32, 74, 0.22);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --head: 64px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { scrollbar-gutter: stable; }
body {
  margin: 0;
  background: radial-gradient(1200px 420px at 50% -260px, rgba(31, 95, 214, .08), transparent 70%), var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .fill { fill: currentColor; stroke: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- la coque : l'en-tête, puis la page ---------- */
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; background: var(--panel); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1440px; margin: 0 auto; padding: 10px clamp(14px, 3vw, 28px); display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--head); }
.brand { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; min-width: 0; }
.logo, .hello-logo { display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; }
.logo { width: 36px; height: 36px; }
.logo svg { width: 20px; height: 20px; }
.brand-text { color: var(--ink); font-size: 1.05rem; white-space: nowrap; }
.brand-sub { color: var(--muted); font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-actions a.btn[aria-current="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.lbl-short { display: none; }
@media (max-width: 620px) { .lbl-long { display: none; } .lbl-short { display: inline; } }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 600; color: var(--ink); background: var(--soft); border-radius: 999px; padding: .4em .9em; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pill.ok::before { background: var(--ok); }
.pill.warn::before { background: var(--warn); }
.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; font-size: .84rem; font-weight: 600; color: var(--ink); cursor: pointer; min-height: 34px; transition: background-color .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--panel); box-shadow: 0 2px 8px -3px rgba(16, 32, 74, .35); }
.seg.langue button { padding: 6px 10px; font-size: .76rem; }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; padding: 0 18px; min-height: 42px; font-weight: 700; font-size: .88rem; cursor: pointer; white-space: nowrap; border: 1.5px solid transparent; text-decoration: none; transition: background-color .15s, color .15s, transform .15s var(--ease); }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: .82rem; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: var(--panel); color: var(--ink); border-color: var(--soft-2); }
.btn.link { background: none; color: var(--accent); padding: 0 6px; }
.btn.icon { width: 36px; padding: 0; }
@media (hover: hover) { .btn.ghost:hover { background: var(--soft); } .btn.primary:hover { filter: brightness(1.08); } }
.btn:disabled { opacity: .45; cursor: default; }

/* ---------- l'accueil : le pourquoi en retrait, puis l'essai mis en avant ---------- */
.app { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 20px clamp(14px, 3vw, 28px) 28px; }
.home { max-width: 1040px; margin: 0 auto; padding: clamp(8px, 3vh, 28px) 0; }
.hello { text-align: center; max-width: 700px; margin: 0 auto 26px; }
.hello-logo { width: 56px; height: 56px; margin: 0 auto 14px; }
.hello-logo svg { width: 30px; height: 30px; }
.hello h1 { margin: 0 0 10px; font-size: clamp(1.4rem, 3.4vw, 1.95rem); line-height: 1.25; color: var(--ink); }
.hello h1 .accent { color: var(--accent); }
.hello p { margin: 0; color: var(--muted); font-size: .98rem; line-height: 1.5; }
.hello.petit h1 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* Le pourquoi : du texte et trois chiffres, petits et sans ombre (c'est l'essai qui attire l'œil). */
.why { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; max-width: 900px; margin: 0 auto 28px; align-items: start; }
@media (max-width: 760px) { .why { grid-template-columns: 1fr; } }
.why-text h2 { margin: 0 0 8px; font-size: 1rem; color: var(--ink); line-height: 1.3; }
.why-text > p { margin: 0 0 12px; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.uses { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.uses li { display: flex; gap: 10px; align-items: flex-start; }
.uses .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.uses b { display: block; color: var(--ink); font-size: .86rem; }
.uses span { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.why-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Le premier chiffre, la justesse, sur toute la largeur : les deux autres dessous. */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: start; }
.stat { border: 1px solid var(--line); background: var(--panel); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; cursor: help; }
.stat.large { grid-column: 1 / -1; }
.stat b { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--ink); line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat.large b { font-size: clamp(1.3rem, 2.8vw, 1.6rem); }
.stat span { font-size: .8rem; font-weight: 700; color: var(--ink); }
.stat small { font-size: .72rem; color: var(--muted); line-height: 1.3; }

/* L'essai : un cadre mis en avant, des cartes compactes, son propre document tout en bas. */
.try { max-width: 940px; margin: 0 auto; background: var(--panel); border: 1.5px solid var(--accent); border-radius: var(--radius); box-shadow: 0 18px 44px -20px color-mix(in srgb, var(--accent) 50%, transparent); padding: clamp(16px, 3vw, 28px); }
.ideas-head { text-align: center; margin: 0 auto 18px; }
.ideas-head h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.7rem); color: var(--ink); }
.ideas-head p { margin: 4px 0 0; font-size: .88rem; }
.ideas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .ideas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.idea { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px 10px 10px; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; animation: rise .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
@media (hover: hover) { .idea:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); } }
@media (prefers-reduced-motion: reduce) { .idea { animation: none; } }
.idea .apercu { flex: none; width: 58px; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 8px; background: var(--soft); border: 1px solid var(--line); }
.idea-texte { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.idea b { color: var(--ink); font-size: .92rem; line-height: 1.25; }
.idea .pitch { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.idea .tags { color: var(--muted); font-size: .72rem; font-weight: 600; }
.idea.upload { grid-column: 1 / -1; flex-wrap: wrap; align-items: center; gap: 12px 16px; border: 2px dashed var(--accent); background: var(--accent-soft); padding: 16px 18px; }
.idea.upload .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.up-texte { display: flex; flex-direction: column; gap: 3px; flex: 1 1 260px; min-width: 0; }
.up-texte b { font-size: 1.02rem; }
.up-texte span { color: var(--text, var(--ink)); font-size: .84rem; line-height: 1.4; }
.idea.upload .up-cta { flex: none; pointer-events: none; }
.idea.upload.over { border-style: solid; background: var(--panel); }
/* Un mot du glossaire : souligné en pointillé, il s'explique au survol, au clavier, au doigt. */
.terme { border-bottom: 1px dotted currentColor; cursor: help; }
.terme:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 2px; }
/* Combien pour vos documents : un curseur, trois chiffres, deux barres. */
.projection { margin-top: 34px; padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.proj-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.proj-tete h2 { margin: 0; font-size: 1.2rem; color: var(--ink); }
.reglage-pages { display: flex; align-items: center; gap: 10px; font-size: .84rem; color: var(--muted); flex: 1 1 320px; max-width: 520px; }
.reglage-pages input[type="range"] { flex: 1; accent-color: var(--accent); min-height: 32px; }
.pages-valeur { min-width: 110px; text-align: right; font-weight: 800; color: var(--ink); font-size: 1rem; font-variant-numeric: tabular-nums; }
.proj-res { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 600px) { .proj-res { grid-template-columns: 1fr; } }
.proj-chiffre { border-radius: 14px; background: var(--soft); padding: 12px 16px; display: flex; flex-direction: column; gap: 0; }
.proj-chiffre b { font-size: clamp(1.4rem, 3.2vw, 1.9rem); color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.proj-chiffre span { font-size: .84rem; color: var(--muted); }
.proj-chiffre.fort { background: var(--ok-soft); }
.proj-chiffre.fort b { color: var(--ok); }
.barres-temps { display: flex; flex-direction: column; gap: 8px; }
.barres-titre { margin: 0; font-size: .84rem; font-weight: 700; color: var(--ink); }
.barre-temps { display: grid; grid-template-columns: minmax(150px, 220px) 1fr 70px; align-items: center; gap: 10px; font-size: .84rem; }
.barre-temps .nom { color: var(--muted); }
.barre-temps .piste { height: 14px; border-radius: 4px; background: transparent; }
.barre-temps .plein { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--soft-2); }
.barre-temps.avec .plein { background: var(--accent); }
.barre-temps b { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .barre-temps { grid-template-columns: 1fr 60px; } .barre-temps .piste { grid-column: 1 / -1; grid-row: 2; } }
.hypotheses summary { cursor: pointer; font-size: .84rem; font-weight: 700; color: var(--accent); min-height: 32px; display: flex; align-items: center; }
.hypotheses .muted { font-size: .78rem; margin: 10px 0 0; }
.hyps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
@media (max-width: 760px) { .hyps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hyp { display: flex; flex-direction: column; gap: 4px; font-size: .74rem; color: var(--muted); font-weight: 600; }
.hyp input { border: 1px solid var(--soft-2); border-radius: 10px; padding: 8px 10px; font-size: .95rem; color: var(--ink); background: var(--panel); min-height: 40px; width: 100%; font-variant-numeric: tabular-nums; }

/* ---------- mesures : les détails repliés ---------- */
.details-tech { padding: 14px 18px; }
.details-tech summary { cursor: pointer; font-weight: 700; color: var(--ink); min-height: 32px; display: flex; align-items: center; }
.details-tech h3 { font-size: .95rem; color: var(--ink); margin: 18px 0 4px; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--ink); }
.legende span::before { content: ""; display: inline-block; width: 12px; height: 3px; border-radius: 2px; background: var(--mc); margin-right: 6px; vertical-align: middle; }
.drawer-liens { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px 18px 0; }
.drawer-liens .btn { flex-direction: column; align-items: flex-start; white-space: normal; text-align: left; border-radius: 14px; padding: 10px 14px; gap: 2px; }
.drawer-liens .btn small { font-weight: 500; color: var(--muted); font-size: .74rem; line-height: 1.3; }
#ouvrir-coulisses[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.section-title { margin: 34px 0 12px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.methodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.methode { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--mc, var(--muted)); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.methode b { color: var(--ink); font-size: .9rem; }
.methode small { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.methode .meta { display: flex; flex-wrap: wrap; gap: 4px; }
.methode.off { opacity: .55; }
.badge { font-size: .68rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.ko { background: var(--ko-soft); color: var(--ko); }

/* ---------- cartes ---------- */
.card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); }
p.vide { text-align: center; color: var(--muted); padding: 60px 20px; }

/* ---------- surimpressions ---------- */
.scrim { position: fixed; inset: 0; background: rgba(16, 32, 74, .35); z-index: 39; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--panel); z-index: 40; display: flex; flex-direction: column; box-shadow: var(--shadow); animation: slide .3s var(--ease); }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 1.05rem; color: var(--ink); }
.drawer-head p { margin: 4px 0 0; font-size: .8rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 18px 24px; }
.eyebrow { margin: 0 0 2px; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

/* ---------- infobulles et notifications ---------- */
.tip { position: fixed; z-index: 45; max-width: min(420px, calc(100vw - 16px)); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font-size: .82rem; box-shadow: var(--shadow); pointer-events: none; }
.tip strong { display: block; color: var(--ink); margin-bottom: 2px; }
.hint-tip { white-space: pre-line; position: fixed; z-index: 70; max-width: 300px; padding: 7px 10px; border-radius: 10px; background: var(--ink); color: #f2f4fa; font-size: .8rem; line-height: 1.4; pointer-events: none; box-shadow: var(--shadow); }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--ink); color: #fff; font-size: .86rem; box-shadow: var(--shadow); animation: rise .2s var(--ease); transition: opacity .5s; }
.toast.error { background: #8a1c12; }
.toast.fade { opacity: 0; }
/* L'avis des limites de la démonstration : reste jusqu'à sa fermeture, avec le contact. */
.toast.limite { align-items: flex-start; padding: 16px 12px 16px 18px; border-radius: 18px; }
.limite-corps { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; line-height: 1.45; }
.limite-corps b { font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.limite-note { font-size: .8rem; opacity: .72; }
.limite-corps .btn { margin-top: 6px; }
.toast-fermer { border: 0; background: none; color: inherit; cursor: pointer; font-size: 18px; line-height: 1; padding: 0 4px; }
.topbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; }
.topbar-fill { height: 100%; width: 4%; background: var(--accent); transition: width .4s ease; }
.spin { width: 12px; height: 12px; border: 2px solid var(--soft-2); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- fenêtre moyenne et téléphone ---------- */
@media (max-width: 1100px) {
  .top-in { flex-wrap: wrap; }
  .brand-sub { display: none; }
}
.court { display: none; }
@media (max-width: 560px) {
  .app { padding: 10px 16px 20px; }
  .pill { display: none; }
  .btn.sm { min-height: 44px; }
  .btn.icon { width: 44px; }
  .seg button { min-height: 40px; padding: 6px 12px; }
  .ideas { grid-template-columns: 1fr; }
}

/* ---------- l'espace de travail : le document, et les étapes ---------- */
.work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); gap: 20px; align-items: start; }
.doc { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; position: sticky; top: calc(var(--head) + 16px); }
.doc-head { display: flex; align-items: center; gap: 12px; }
.doc-title { flex: 1; min-width: 0; }
.doc-title h2 { margin: 0; font-size: 1.05rem; line-height: 1.3; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.doc-title p { margin: 0; font-size: .8rem; }

/* La visionneuse : la page tient dans la place qui reste (`--ar` = ses proportions). */
.visionneuse { display: flex; flex-direction: column; gap: 8px; }
.vis-barre { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
.pages { display: flex; gap: 4px; flex-wrap: wrap; }
.pages button { border: 1px solid var(--soft-2); background: var(--panel); border-radius: 999px; min-width: 34px; height: 32px; padding: 0 10px; cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--ink); }
.pages button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pages button.a-zones::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-left: 5px; vertical-align: 2px; }
.page-boite { display: flex; justify-content: center; }
.page {
  position: relative;
  --ar: .707;
  --chrome: 190px;
  aspect-ratio: var(--ar);
  width: min(100%, calc((100dvh - var(--head) - var(--chrome)) * var(--ar)));
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: repeating-linear-gradient(45deg, #fafbfd 0 12px, #f2f4f8 12px 24px);
}
.page img { display: block; width: 100%; height: 100%; }
.zones { position: absolute; inset: 0; pointer-events: none; }
.zones .z { position: absolute; border: 2px solid var(--zc, var(--zone)); background: color-mix(in srgb, var(--zc, var(--zone)) 14%, transparent); border-radius: 2px; pointer-events: auto; cursor: pointer; transition: background-color .15s, box-shadow .15s; }
.zones .z.a_verifier { border-style: dashed; --zc: var(--warn); }
.zones .z.contredit { --zc: var(--ko); }
.zones .z.mot { border: 1px solid rgba(0, 114, 178, .55); background: rgba(0, 114, 178, .06); pointer-events: none; }
.zones .z.faible { border-color: rgba(213, 94, 0, .7); background: rgba(213, 94, 0, .08); }
.zones .z.hl { background: color-mix(in srgb, var(--zc, var(--zone)) 32%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--zc, var(--zone)) 45%, transparent); z-index: 2; }
.zones.calme .z:not(.hl):not(.mot) { opacity: .35; }
.zones .z[data-tag]::before { content: attr(data-tag); position: absolute; left: -2px; top: -15px; font-size: 10px; line-height: 13px; padding: 0 4px; border-radius: 3px; white-space: nowrap; color: #fff; background: var(--zc, var(--zone)); pointer-events: none; }
.legende { margin: 0; font-size: .78rem; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.legende i { display: inline-block; width: 12px; height: 10px; border: 2px solid var(--zone); border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.legende i.av { border-style: dashed; border-color: var(--warn); }

/* ---------- le panneau des étapes ---------- */
.panel { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--head) + 16px); max-height: calc(100dvh - var(--head) - 32px); overflow-y: auto; overscroll-behavior: contain; }
.stepper { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.stepper .step { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border: 1px solid var(--soft-2); border-radius: 999px; background: var(--panel); cursor: pointer; font-size: .78rem; min-height: 32px; }
.step-num { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .68rem; font-weight: 700; background: var(--soft); color: var(--ink); flex: none; }
.step-num svg { stroke-width: 3; }
.step-label { font-weight: 700; color: var(--ink); white-space: nowrap; }
.stepper .step.fait .step-num { background: var(--ok); color: #fff; }
.stepper .step[aria-current="step"] { border-color: var(--accent); background: var(--accent-soft); }
.panel-corps { display: flex; flex-direction: column; gap: 10px; }
.panel-corps h3 { margin: 0; font-size: 1rem; color: var(--ink); }
.panel-corps > p { margin: 0; font-size: .85rem; color: var(--muted); }
.ligne-choix { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
select.pill-select, .champ-edit input, .champ-edit select, .champ-edit textarea { border: 1px solid var(--soft-2); border-radius: 10px; padding: 7px 10px; background: var(--panel); font-size: .86rem; min-width: 0; }
select.pill-select { border-radius: 999px; padding: 6px 12px; font-weight: 600; color: var(--ink); max-width: 100%; }
.faits { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .86rem; }
.faits dt { color: var(--muted); }
.faits dd { margin: 0; color: var(--ink); font-weight: 600; }
.barre { height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.barre > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.probas { display: flex; flex-direction: column; gap: 6px; }
.proba { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 2px 10px; align-items: center; font-size: .84rem; }
.proba .barre { grid-column: 1 / -1; }
.proba b { color: var(--ink); }
.proba .pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* La fiche, éditable. */
.groupe-titre { margin: 8px 0 2px; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.champs { display: flex; flex-direction: column; }
.champ { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 8px 0; border-top: 1px solid var(--line); align-items: start; }
.champ:first-child { border-top: 0; }
.champ b { color: var(--ink); font-size: .86rem; }
.champ small { grid-column: 1; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.champ .outils { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 2px; }
.champ.modifie b::after { content: " •"; color: var(--accent); }
.icone { border: 0; background: none; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
@media (hover: hover) { .icone:hover { background: var(--soft); color: var(--ink); } }
.champ-edit { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }
.champ-edit textarea, .champ-edit .large { grid-column: 1 / -1; }
.champ-edit textarea { min-height: 54px; resize: vertical; font: inherit; font-size: .84rem; }
.note { font-size: .8rem; padding: 8px 10px; border-radius: 10px; background: var(--soft); color: var(--ink); }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Le résultat : une valeur par ligne, sa preuve au survol. */
.valeurs { display: flex; flex-direction: column; }
.valeur { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding: 8px 8px; border-top: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: background-color .15s; }
.valeur:first-child { border-top: 0; }
@media (hover: hover) { .valeur:hover { background: var(--soft); } }
.valeur.hl, .valeur.ouverte { background: var(--accent-soft); }
.valeur .lib { font-size: .74rem; color: var(--muted); grid-column: 1; }
.valeur .val { color: var(--ink); font-weight: 700; font-size: .95rem; overflow-wrap: anywhere; grid-column: 1; }
.valeur .val.vide { color: var(--muted); font-weight: 500; font-style: italic; }
.valeur .marque { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); }
.valeur .marque.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.valeur .marque.ko { background: var(--ko); box-shadow: 0 0 0 3px var(--ko-soft); }
.valeur .marque.vide { background: var(--soft-2); }
.valeur > .mini-defile, .valeur > .detail-valeur { grid-column: 1 / -1; }
.detail-valeur { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: .8rem; cursor: default; }
.det { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.det-ic { width: 18px; flex: none; text-align: center; font-weight: 800; color: var(--muted); }
.det.ok .det-ic { color: var(--ok); }
.det.ko .det-ic { color: var(--ko); }
.det.warn .det-ic { color: var(--warn); }
.det q { font-weight: 600; }
.conf { display: inline-flex; align-items: center; gap: 8px; }
.jauge { width: 90px; height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; display: inline-block; }
.jauge i { display: block; height: 100%; background: var(--accent); border-radius: 0 3px 3px 0; }
.det.warn .jauge i { background: var(--warn); }
/* Le contrôle en phrases, et la raison de chaque relecture, écrite sous la valeur. */
.resume-controle { margin: 0 0 4px; padding: 10px 12px; border-radius: 10px; font-size: .86rem; line-height: 1.45; color: var(--ink); background: var(--ok-soft); }
.resume-controle.warn { background: var(--warn-soft); }
.muted.petit { font-size: .74rem; margin: 0 0 8px; }
.valeur .raison { grid-column: 1 / -1; margin-top: 4px; padding-left: 8px; border-left: 2px solid var(--warn); font-size: .78rem; line-height: 1.4; color: var(--text); }
.voir-page { display: none; }
@media (max-width: 760px) { .voir-page { display: inline-flex; align-self: flex-start; } }
.pastille.warn { background: var(--warn-soft); color: var(--warn); }
.lu-par { margin: 0 0 6px; font-size: .82rem; }
.lu-par b { color: var(--ink); cursor: help; border-bottom: 1px dotted currentColor; }
.pied-resultat { margin: 0; font-size: .74rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }
.mini-table td.av { background: var(--warn-soft); }
.mini-table td.ouverte { outline: 2px solid var(--accent); }
.chargement { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .86rem; padding: 10px 0; }

/* La fiche d'une valeur au survol : lecture, extraction, vérification. */
.tip .tip-sec { padding: 5px 0; border-top: 1px solid var(--line); }
.tip .tip-sec:first-of-type { border-top: 0; }
.tip .sec-title { display: flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.tip .sec-title .num { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--line); color: var(--ink); font-size: .64rem; letter-spacing: 0; }
.tip .chk { display: flex; gap: 6px; align-items: baseline; }
.tip .chk .mark { font-weight: 800; width: 1em; flex: none; text-align: center; }
.tip .chk.ok .mark { color: var(--ok); }
.tip .chk.ko .mark { color: var(--ko); }
.tip q { color: var(--ink); font-weight: 600; }

/* ---------- comparer ---------- */
.comparer { display: flex; flex-direction: column; gap: 14px; }
.comparer-barre { padding: 10px 14px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.choix-doc { display: flex; gap: 8px; align-items: center; font-size: .86rem; }
.choix-doc { min-width: 0; max-width: 100%; }
.choix-doc select { border: 1px solid var(--soft-2); border-radius: 999px; padding: 6px 12px; background: var(--panel); font-weight: 600; color: var(--ink); max-width: min(380px, 100%); min-width: 0; }
.puces { display: flex; gap: 6px; flex-wrap: wrap; }
.puce { border: 1.5px solid var(--soft-2); background: var(--panel); border-radius: 999px; padding: 4px 12px 4px 8px; font-size: .8rem; font-weight: 600; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.puce::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--mc, var(--muted)); }
.puce[aria-pressed="true"] { border-color: var(--mc); background: color-mix(in srgb, var(--mc) 10%, var(--panel)); }
.puce:disabled, .puce.off { opacity: .5; }
.puce.off[aria-pressed="true"] { opacity: 1; }
.comparer-corps { display: grid; grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.4fr); gap: 16px; align-items: start; }
.comparer-corps .doc { --chrome: 150px; }
.grille-carte { padding: 6px 0; min-width: 0; }
.grille-defile { overflow-x: auto; }
.grille { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .82rem; }
.grille th, .grille td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.grille thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; font-size: .78rem; }
.grille thead th .m { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.grille thead th .m::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--mc); flex: none; }
.grille thead th small { display: block; color: var(--muted); font-weight: 500; }
.grille thead th .btn { margin-top: 6px; }
.grille tbody th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.grille td { cursor: pointer; min-width: 120px; }
.grille td .v { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.grille td .v.vide { color: var(--muted); font-weight: 400; font-style: italic; }
.grille td.faux { background: var(--ko-soft); }
.grille td.faux .v { color: var(--ko); }
.grille td.av { box-shadow: inset 3px 0 0 var(--warn); }
.grille thead th .pastille { display: inline-block; margin-top: 4px; font-size: .74rem; padding: 2px 10px; }
.pastille.ko { background: var(--ko-soft); color: var(--ko); }
.grille tbody th, .grille thead th:first-child { position: sticky; left: 0; z-index: 2; background: var(--panel); box-shadow: 1px 0 0 var(--line); }
.grille thead th:first-child { z-index: 3; }
.grille tr.hl td, .grille tr.hl th { background: var(--accent-soft); }
.grille .verite { color: var(--ink); font-weight: 600; }

/* ---------- mesures ---------- */
.mesures { display: flex; flex-direction: column; gap: 16px; max-width: 980px; margin: 0 auto; width: 100%; }
.mesures .card { padding: 16px 18px; overflow-x: auto; }
.mesures h2 { margin: 0 0 4px; font-size: 1.2rem; color: var(--ink); }
.mesures h3 { margin: 0 0 2px; font-size: 1rem; color: var(--ink); }
.mesures p { margin: 0 0 10px; font-size: .86rem; }
.mesures-tete .seg { flex-wrap: wrap; }
/* Les graphiques : traits fins, grille discrète, étiquettes à l'encre du texte. */
.graphe-bloc { width: 100%; }
.graphe { width: 100%; min-width: 540px; height: auto; display: block; stroke: none; fill: none; }
.graphe text { stroke: none; }
.graphe .grille { stroke: var(--line); stroke-width: 1; }
.graphe .axe { fill: var(--muted); font-size: 11px; }
.graphe .axe-titre { fill: var(--muted); font-size: 12px; font-weight: 600; }
/* Qui gagne, en une phrase, au-dessus du graphique. */
.verdict { margin: 0; font-size: .9rem; font-weight: 600; color: var(--ink); }
.verdict.second { font-weight: 500; color: var(--muted); }
.graphe .cible { fill: transparent; cursor: default; }
.graphe .rond { stroke: var(--panel); stroke-width: 2; }
.graphe .etiquette { fill: var(--ink); font-size: 12px; font-weight: 600; }
.graphe .serie { fill: none; stroke-width: 2; }
.tableau.chaleur td, .tableau.chaleur th:not(:first-child) { text-align: center; font-weight: 600; }
.tableau.chaleur td.chaud { background: color-mix(in srgb, var(--accent) calc(var(--t) * 42%), var(--panel)); color: var(--ink); }
.nom-methode { text-align: left !important; color: var(--ink) !important; font-weight: 600 !important; }
.nom-methode i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.tableau { width: 100%; border-collapse: collapse; font-size: .82rem; font-variant-numeric: tabular-nums; }
.tableau th, .tableau td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.tableau th:first-child, .tableau td:first-child { text-align: left; }
.tableau th { color: var(--muted); font-weight: 600; font-size: .76rem; }

@media (max-width: 1100px) {
  .work { grid-template-columns: minmax(0, 1fr) minmax(280px, 330px); gap: 14px; }
  .doc-head .lbl { display: none; }
  .comparer-corps { grid-template-columns: minmax(0, 1fr); }
  .comparer-corps .doc { position: static; }
  .comparer-corps .page { width: min(100%, 520px); --chrome: 0px; }
}
@media (max-width: 760px) {
  .grille tbody th { white-space: normal; min-width: 92px; max-width: 120px; }
  .grille td { min-width: 132px; }
  .work { grid-template-columns: minmax(0, 1fr); }
  .doc, .panel { position: static; max-height: none; }
  .page { width: 100%; --chrome: 0px; }
  .doc-head .lbl { display: none; }
}

/* ---------- le tableau des documents ---------- */
.onglets-carte { padding: 12px 14px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.filtres { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filtre { display: inline-flex; gap: 4px; align-items: center; background: var(--soft); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: .8rem; }
.filtre select, .filtre input { border: 1px solid var(--soft-2); border-radius: 8px; padding: 3px 6px; background: var(--panel); font-size: .8rem; max-width: 150px; }
.table-fonds { width: 100%; border-collapse: collapse; font-size: .8rem; }
.table-fonds th, .table-fonds td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.table-fonds th { color: var(--muted); font-weight: 600; font-size: .74rem; position: sticky; top: 0; background: var(--panel); }
.table-fonds tbody tr { cursor: pointer; }
@media (hover: hover) { .table-fonds tbody tr:hover td { background: var(--soft); } }
.table-fonds td.av { color: var(--warn); font-weight: 600; }
.table-fonds td.num { text-align: right; font-variant-numeric: tabular-nums; }
.defile { overflow-x: auto; max-height: calc(100dvh - var(--head) - 300px); overflow-y: auto; }
.revue { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 8px 0; border-top: 1px solid var(--line); align-items: center; font-size: .82rem; }
.revue:first-child { border-top: 0; }
.revue .doc-lien { color: var(--accent); cursor: pointer; font-weight: 600; background: none; border: 0; padding: 0; text-align: left; }
.revue .muted { font-size: .76rem; }
.revue .actions input, .revue .actions select { border: 1px solid var(--soft-2); border-radius: 8px; padding: 4px 8px; font-size: .8rem; max-width: 170px; }
/* ---------- interroger : la réponse et ses sources ---------- */
.questions { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; padding-bottom: 96px; }
.questions .hello { margin-bottom: 0; }
.reglage-q { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; font-size: .84rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chips.apres { justify-content: flex-start; }
.chip-q { border: 1px solid var(--soft-2); background: var(--panel); border-radius: 999px; padding: 8px 14px; font-size: .86rem; color: var(--ink); cursor: pointer; text-align: left; min-height: 38px; }
@media (hover: hover) { .chip-q:hover { border-color: var(--accent); background: var(--accent-soft); } }
.fil { display: flex; flex-direction: column; gap: 28px; }
.tour-q { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: calc(var(--head) + 12px); }
.bulle { max-width: 86%; padding: 11px 15px; border-radius: 18px; font-size: .95rem; line-height: 1.5; }
.bulle.moi { align-self: flex-end; background: linear-gradient(135deg, #2a5fd0, var(--ink)); color: #fff; border-bottom-right-radius: 5px; }
.attendu-q { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .86rem; color: var(--ink); }
.attendu-q .ic { width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; }
.attendu-q .ic svg { width: 12px; height: 12px; stroke-width: 3; }
/* Le verdict : combien des bons documents. */
.verdict-q { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; }
.verdict-q b { font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.verdict-q span:last-child { font-size: .84rem; }
.verdict-q .verdict-libelle { font-size: .84rem; }
.verdict-q .ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.verdict-q .ic svg { width: 15px; height: 15px; stroke-width: 3; }
.verdict-q.ok { background: var(--ok-soft); color: var(--ok); } .verdict-q.ok .ic { background: var(--ok); }
.verdict-q.warn { background: var(--warn-soft); color: var(--warn); } .verdict-q.warn .ic { background: var(--warn); }
.verdict-q.ko { background: var(--ko-soft); color: var(--ko); } .verdict-q.ko .ic { background: var(--ko); }
.attente-q { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .84rem; }
.texte-q p { margin: 0 0 6px; }
.texte-q p.italique { font-style: italic; color: var(--muted); }
.texte-q.replie { max-height: 170px; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent); mask-image: linear-gradient(to bottom, #000 65%, transparent); }
.deplier { align-self: flex-start; padding-left: 0; min-height: 28px; }
.texte-q ul { margin: 0 0 6px; padding-left: 20px; }
.cite { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 5px; margin: 0 1px; border-radius: 999px; border: 0; background: var(--accent-soft); color: var(--accent); font-size: .7rem; font-weight: 800; cursor: pointer; vertical-align: 1px; }
@media (hover: hover) { .cite:hover { background: var(--accent); color: #fff; } }
.sources-q summary { cursor: pointer; font-size: .8rem; font-weight: 700; color: var(--accent); min-height: 28px; display: flex; align-items: center; }
.sources-q[open] { display: flex; flex-direction: column; gap: 4px; }
.src { display: flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--ink); min-width: 0; }
.src b { display: inline-grid; place-items: center; min-width: 20px; height: 18px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .68rem; flex: none; }
.src-titre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1 auto; }
.src-page { border: 1px solid var(--soft-2); background: var(--panel); border-radius: 999px; padding: 1px 8px; font-size: .7rem; color: var(--ink); cursor: pointer; flex: none; }
@media (hover: hover) { .src-page:hover { border-color: var(--accent); color: var(--accent); } }
@media (hover: none) { .src-page { padding: 6px 10px; } }
.pied-q { font-size: .76rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; line-height: 1.6; }
.pied-q b { color: var(--ink); font-size: .84rem; }
.pied-q [data-tip] { border-bottom: 1px dotted var(--soft-2); cursor: help; }
/* La courbe : le temps selon le nombre de documents concernés, sans phrase (les mots au survol). */
.courbe-q { width: 100%; max-width: 460px; cursor: help; border-top: 1px solid var(--line); padding-top: 10px; }
.courbe-q svg { display: block; width: 100%; height: auto; overflow: visible; }
.courbe-q .grille { stroke: var(--line); stroke-width: 1; }
.courbe-q .axe { stroke: var(--soft-2); stroke-width: 1; }
.courbe-q text { font-weight: 500; stroke: none; }
.courbe-q .graduation { font-size: 9px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.courbe-q .etiquette { font-size: 9.5px; fill: var(--ink); font-weight: 600; }
.courbe-q .picto { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-linejoin: round; stroke-linecap: round; }
.courbe-q .trace { stroke-width: 2.5; stroke-linecap: round; fill: none; }
.courbe-q .trace.donnees { stroke: var(--accent); }
.courbe-q .trace.texte { stroke: var(--muted); }
.courbe-q .trace.projete { stroke-dasharray: 3 4; }
.courbe-q .trace.reference { stroke-width: 2; }
.courbe-q .fleche { stroke: none; }
.courbe-q .fleche.donnees { fill: var(--accent); }
.courbe-q .fleche.texte { fill: var(--muted); }
.courbe-q .au-dela { fill: var(--ko-soft); opacity: .7; stroke: none; }
.courbe-q .mur { stroke: var(--ko); stroke-width: 2.5; stroke-linecap: round; }
.courbe-q .cadenas { fill: none; stroke: var(--ko); stroke-width: 1.6; stroke-linejoin: round; }
.courbe-q .cadenas rect { fill: var(--ko); }
.courbe-q .point { stroke: var(--panel); stroke-width: 2; }
.courbe-q .point.donnees { fill: var(--accent); }
.courbe-q .point.texte { fill: var(--ink); }
.reponse-q.texte .courbe-q .point { stroke: var(--soft); }
.verdict-libelle { display: flex; flex-direction: column; gap: 1px; }
.verdict-libelle small { font-size: .74rem; opacity: .85; }
.pastille { border-radius: 999px; padding: 4px 12px; background: var(--soft); font-weight: 700; font-size: .84rem; }
.pastille.ok { background: var(--ok-soft); color: var(--ok); }
.saisie-q { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 35%); z-index: 20; }
.saisie-q form { max-width: 880px; margin: 0 auto; display: flex; gap: 8px; background: var(--panel); border-radius: 999px; box-shadow: var(--shadow); padding: 6px 6px 6px 18px; border: 1px solid var(--line); }
.saisie-q input { flex: 1; border: 0; outline: 0; font-size: 1rem; background: transparent; min-width: 0; }
.zones .z.source { --zc: var(--m3); }

@media (hover: none) {
  .tip { left: 8px !important; right: 8px !important; top: auto !important; bottom: max(8px, env(safe-area-inset-bottom)) !important; max-width: none; pointer-events: auto; }
}

/* La page, sans motif d'attente une fois l'image là. */
.page:has(img[src]) { background: #fff; }

/* ---------- le document : ce que fait la solution, en cinq étapes ---------- */
.panel-head h2 { margin: 0; font-size: 1.05rem; color: var(--ink); }
.panel-head p { margin: 2px 0 0; font-size: .8rem; }
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.st { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.st.open { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.st-head { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; background: none; border: 0; cursor: pointer; text-align: left; }
.st-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 800; background: var(--soft); color: var(--ink); }
.st-num.fait { background: var(--ok); color: #fff; }
.st-num svg { stroke-width: 3; }
.st-name { display: flex; flex-direction: column; min-width: 0; }
.st-name b { color: var(--ink); font-size: .92rem; }
.st-name small { color: var(--muted); font-size: .76rem; }
.st-fig { font-size: .78rem; font-weight: 700; color: var(--ink); background: var(--soft); border-radius: 999px; padding: 2px 10px; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.st-fig.warn { background: var(--warn-soft); color: var(--warn); }
.st-fig.ok { background: var(--ok-soft); color: var(--ok); }
.st-body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.st-what { margin: 0; font-size: .84rem; color: var(--muted); line-height: 1.5; }
.panel-foot { display: flex; flex-direction: column; gap: 6px; align-items: stretch; padding-top: 4px; }
.panel-foot .btn { white-space: normal; }

/* ---------- interroger ---------- */
.fonds-ligne { display: flex; align-items: center; gap: 12px; margin: 0 auto; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); cursor: pointer; font-size: .86rem; color: var(--muted); max-width: 100%; }
.fonds-ligne b { color: var(--accent); white-space: nowrap; }
@media (hover: hover) { .fonds-ligne:hover { border-color: var(--accent); } }
.mini-pile { display: inline-flex; flex: none; }
.mini-pile img { width: 26px; height: 34px; object-fit: cover; object-position: top; border-radius: 3px; border: 1px solid var(--line); background: #fff; margin-left: -8px; }
.mini-pile img:first-child { margin-left: 0; }
.reponse-q { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; font-size: .92rem; line-height: 1.5; }
.reponse-q.texte { background: var(--soft); border-style: dashed; }
.reponse-tete { display: flex; flex-direction: column; gap: 2px; }
.reponse-tete b { color: var(--ink); font-size: .92rem; }
.rt-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.badge-gardee { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--soft-2); background: var(--panel); color: var(--muted); border-radius: 999px; padding: 2px 4px 2px 8px; font: inherit; font-size: .72rem; font-weight: 600; cursor: pointer; }
.badge-gardee svg { width: 13px; height: 13px; }
/* Sans le « + » d'un détail, la pastille garde des marges égales. */
.badge-gardee:not(:has(.plus)) { padding-right: 8px; }
.badge-gardee .plus { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--soft); color: var(--ink); font-size: .66rem; }
.badge-gardee[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
@media (hover: hover) { .badge-gardee:hover { border-color: var(--accent); color: var(--accent); } }
.gardee-detail { margin: 2px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--soft); color: var(--text); font-size: .78rem; line-height: 1.45; }
.reponse-q.texte .gardee-detail { background: var(--panel); }
.reponse-tete span { color: var(--muted); font-size: .8rem; }
.reponse-tete .badge-gardee > span { color: inherit; font-size: .72rem; }
.reponse-tete .badge-gardee > .plus { font-size: .66rem; color: var(--ink); }
.comparer-q { align-self: flex-start; }

/* ---------- le tableau des documents (suite) ---------- */
.tableau-vue { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.tableau-tete { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tableau-tete > .btn { align-self: flex-start; }
.tableau-tete .hello { margin-bottom: 0; }
.tableau-corps { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.types-pastilles { display: flex; flex-wrap: wrap; gap: 6px; }
.pastille-type { border: 1px solid var(--soft-2); background: var(--panel); border-radius: 999px; padding: 5px 12px; font-size: .82rem; color: var(--ink); cursor: pointer; min-height: 34px; }
.pastille-type[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.compte { margin: 0; font-size: .8rem; }

/* ---------- comment ça marche ----------
   La hiérarchie : un en-tête (titre et frise des étapes), puis trois formes de section en
   alternance — ouverte (texte à gauche, schéma à droite), carte (un outil qu'on manipule),
   appel (la suite, en bandeau de couleur). Les sections se séparent par l'espace. */
.comment-page { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(36px, 6vw, 64px); }
.comment-tete { display: flex; flex-direction: column; gap: 8px; }
.comment-tete > .btn { align-self: flex-start; }
.comment-tete h1 { margin: 6px 0 0; font-size: clamp(1.6rem, 3.8vw, 2.2rem); line-height: 1.2; color: var(--ink); }
.comment-tete > p { margin: 0 0 18px; color: var(--muted); font-size: 1rem; }
/* Les cinq étapes en cartes ; la carte choisie ouvre son détail (texte et illustration). */
.chain { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .chain { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .chain { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chain li { display: flex; }
.chain button { width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 4px; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
@media (hover: hover) { .chain button:hover { border-color: var(--accent); transform: translateY(-2px); } }
.chain button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1.5px var(--accent); }
.chain .n { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.chain button[aria-pressed="true"] .n { background: var(--accent); }
.chain b { color: var(--ink); font-size: .9rem; }
.chain span:not(.n) { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.step-detail { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; align-items: center; background: var(--panel); border: 1px solid var(--accent); border-radius: var(--radius); padding: clamp(16px, 2.6vw, 22px); box-shadow: var(--shadow); animation: rise .3s var(--ease) both; scroll-margin-top: calc(var(--head) + 16px); }
.sd-text { display: flex; flex-direction: column; gap: 8px; }
.sd-text .eyebrow { margin: 0; }
.sd-text h3 { margin: 0; font-size: 1.2rem; color: var(--ink); }
.sd-text p { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--ink); }
.sd-text p.muted { color: var(--muted); font-size: .86rem; }
.sd-text .btn { align-self: flex-start; margin-top: 4px; }
.sd-illu { min-width: 0; }
.sd-extra { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.sd-extra h4 { margin: 0; font-size: 1rem; color: var(--ink); }
.sd-extra > p { margin: 0; font-size: .88rem; line-height: 1.5; max-width: 720px; }
@media (max-width: 760px) { .step-detail { grid-template-columns: minmax(0, 1fr); } }
/* Le comparatif des moteurs : ce qui les distingue, sans verdict. */
.moteurs-defile { overflow-x: auto; }
.moteurs { width: 100%; border-collapse: collapse; font-size: .82rem; line-height: 1.4; }
.moteurs th, .moteurs td { text-align: left; vertical-align: top; padding: 9px 10px; border-top: 1px solid var(--line); color: var(--ink); }
.moteurs thead th { border-top: 0; font-size: .72rem; font-weight: 700; color: var(--muted); }
.moteurs tbody th b { display: block; font-size: .88rem; }
.moteurs tbody th small { display: block; color: var(--muted); font-weight: 400; font-size: .74rem; }
.moteurs td.plus::before { content: "+ "; color: var(--ok); font-weight: 800; }
.moteurs td.moins::before { content: "− "; color: var(--warn); font-weight: 800; }
@media (max-width: 760px) {
  .moteurs thead { display: none; }
  .moteurs tr { display: block; padding: 10px 0; border-top: 1px solid var(--line); }
  .moteurs th, .moteurs td { display: block; border: 0; padding: 2px 0; }
  .moteurs td:not(.plus):not(.moins)::before { content: attr(data-label) " : "; color: var(--muted); font-weight: 600; }
}
/* Les dessins : des SVG aux couleurs de la page (thème clair ou sombre), jamais une image
   réelle. Le `svg` global (pictos 18 px, trait) est neutralisé dans une figure. */
.dg { margin: 0; padding: 10px; border-radius: 14px; background: var(--soft); }
.dg svg { display: block; width: 100%; height: auto; fill: var(--ink); stroke: none; stroke-width: 1; }
.d-papier { fill: var(--panel); stroke: var(--soft-2); stroke-width: 1.5; }
.d-derriere { opacity: .7; }
.d-logo, .d-titre { fill: var(--ink); }
.d-ligne { fill: var(--soft-2); }
.d-encre { fill: none; stroke: #2f4aa8; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.d-case { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.d-croix { fill: none; stroke: #2f4aa8; stroke-width: 1.6; stroke-linecap: round; }
.d-mot { fill: color-mix(in srgb, var(--accent) 12%, transparent); stroke: var(--accent); stroke-width: 1; }
.d-valeur { fill: color-mix(in srgb, var(--accent) 14%, transparent); stroke: var(--accent); stroke-width: 1.6; }
.d-juste { fill: color-mix(in srgb, var(--ok) 14%, transparent); stroke: var(--ok); stroke-width: 1.6; }
.d-relire { fill: color-mix(in srgb, var(--warn) 16%, transparent); stroke: var(--warn); stroke-width: 1.6; }
.d-carte { fill: var(--panel); stroke: var(--line); stroke-width: 1; }
.d-fil { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 3 3; }
.d-tete { fill: var(--accent); }
.d-t { font-size: 9.5px; font-weight: 600; fill: var(--ink); }
.d-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.d-cap { font-size: 7.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; fill: var(--muted); }
.d-note { font-size: 8.5px; font-style: italic; fill: var(--muted); }
.d-gros { font-size: 12px; font-weight: 800; fill: var(--ink); letter-spacing: .04em; }
.d-pill { fill: var(--accent); }
.d-pill-t { font-size: 10px; font-weight: 700; fill: var(--accent-ink); }
.d-gris { fill: var(--panel); stroke: var(--line); }
.d-gris-t { font-size: 10px; fill: var(--muted); }
.d-barre { stroke: var(--muted); stroke-width: 1.2; }
.d-ok { fill: var(--ok); }
.d-warn { fill: var(--warn); }
.d-signe { font-size: 10px; font-weight: 800; fill: #fff; }
.mini-page { display: block; width: 100%; height: auto; fill: var(--ink); stroke: none; }
.illu-fiche { background: var(--panel); border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 16px 18px; }
.illu-fiche-titre { margin: 0 0 10px; font-weight: 800; color: var(--ink); font-size: .9rem; }
.illu-fiche ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.illu-fiche li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: var(--soft); font-size: .82rem; color: var(--ink); }
.illu-fiche li i { font-style: normal; font-size: .7rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.illu-fiche .muted { margin: 10px 0 0; font-size: .76rem; }

/* Interroger : une question, sa réponse, ses pages. */
.illu-chat { display: flex; flex-direction: column; gap: 10px; }
.bulle-q { align-self: flex-end; margin: 0; max-width: 85%; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: var(--accent); color: var(--accent-ink); font-size: .88rem; }
.bulle-r { max-width: 92%; padding: 12px 14px; border-radius: 16px 16px 16px 4px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.bulle-r p { margin: 0; font-size: .88rem; color: var(--ink); }
.bulle-r .cites { display: flex; flex-wrap: wrap; gap: 4px 14px; font-weight: 700; }
.bulle-r .cite sup { margin-left: 2px; color: var(--accent); font-weight: 800; }
.illu-pages { display: flex; gap: 10px; }
.illu-pages figure { position: relative; margin: 0; width: 56px; }
.illu-pages svg { display: block; width: 100%; height: auto; fill: var(--ink); stroke: none; }
.illu-pages figcaption { position: absolute; top: -6px; left: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: .66rem; font-weight: 800; display: grid; place-items: center; }
/* Sans clic : le tableau qui se remplit tout seul. */
.illu-tableau { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; display: flex; flex-direction: column; }
.illu-tableau-titre { margin: 0 0 6px; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.illu-ligne { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: .8rem; }
.illu-ligne .mini { width: 28px; display: block; }
.illu-ligne .nom { font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.illu-ligne .type { font-size: .72rem; color: var(--muted); }
.illu-ligne .etat { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); white-space: nowrap; }
.illu-ligne .etat.warn { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 480px) { .illu-ligne { grid-template-columns: 28px minmax(0, 1fr) auto; } .illu-ligne .type { display: none; } }
/* Le diagnostic : quatre temps numérotés, en mots. */
.temps { list-style: none; counter-reset: temps; margin: 0; padding: 0; width: 100%; max-width: 760px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; text-align: left; }
.temps li { counter-increment: temps; display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--ink); }
.temps li::before { content: counter(temps, decimal-leading-zero); font-size: 1.6rem; font-weight: 800; line-height: 1; color: var(--accent); }
@media (max-width: 600px) { .temps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Une section : surtitre, titre, deux phrases ; le schéma, le graphique ou le calcul. */
.section-comment { scroll-margin-top: calc(var(--head) + 16px); }
.sc-texte { display: flex; flex-direction: column; gap: 8px; }
.sc-texte .eyebrow { margin: 0; }
.sc-texte h2 { margin: 0; font-size: clamp(1.2rem, 2.6vw, 1.45rem); line-height: 1.25; color: var(--ink); }
.sc-texte .texte { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.55; max-width: 620px; }
.sc-texte .btn { align-self: flex-start; margin-top: 6px; }
.section-comment.ouverte { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(20px, 4vw, 44px); align-items: center; }
.section-comment.carte { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 3vw, 28px); display: flex; flex-direction: column; gap: 16px; }
.section-comment.appel { background: var(--accent-soft); border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); display: flex; flex-direction: column; gap: 20px; align-items: center; text-align: center; }
.section-comment.appel .sc-texte { align-items: center; }
@media (max-width: 760px) { .section-comment.ouverte { grid-template-columns: 1fr; } }
/* Un schéma : des pictos reliés par des flèches, sans fond ni cadre. */
.flux { display: flex; align-items: flex-start; gap: 8px; }
.flux > .fleche { align-self: flex-start; margin-top: 22px; }
.flux .case { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0; }
.flux .case .ic { width: 46px; height: 46px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 2px; }
.flux .case b { color: var(--ink); font-size: .88rem; }
.flux .case small { color: var(--muted); font-size: .74rem; line-height: 1.3; }
.flux .case.accent .ic { background: var(--accent); color: var(--accent-ink); }
.flux .case.accent b { color: var(--accent); }
.fleche { width: 18px; height: 2px; background: var(--soft-2); position: relative; flex: none; }
.fleche::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--soft-2); border-right: 0; }
@media (max-width: 600px) {
  .flux { flex-direction: column; align-items: stretch; }
  .flux .case { flex: 0 0 auto; flex-direction: row; text-align: left; gap: 12px; }
  .flux .case .ic { flex: none; margin: 0; }
  .flux > .fleche { transform: rotate(90deg); margin: 2px 0 2px 14px; align-self: flex-start; }
  .section-comment.appel { text-align: left; align-items: stretch; }
  .section-comment.appel .sc-texte { align-items: flex-start; }
}
/* Le graphique et le calcul, dans leur carte : pas de carte dans la carte. */
.projection-place { display: flex; flex-direction: column; gap: 16px; }
.zone-mesures .mesures { max-width: none; }
.zone-mesures .mesures .card { background: none; box-shadow: none; border: 0; padding: 0; overflow-x: auto; }
.mesures-tete.compact { display: flex; flex-direction: column; gap: 6px; }
.comment-pied { display: flex; justify-content: center; padding: 8px 0 24px; }

/* ---------------------------------------------------------------- documents difficiles */
.vue[hidden] { display: none !important; }
.dd-h2 { margin: 34px 0 4px; font-size: 1.1rem; color: var(--ink); }
.dd-note { margin: 0 0 14px; font-size: .9rem; }
/* « Voir aussi » : les autres vitrines, des cartes discrètes au pied de l'accueil, côte à
   côte quand la place le permet. */
.dd-voir-aussi { display: grid; gap: 10px; margin: 40px 0 8px; text-align: center; }
.dd-voir-aussi .surtitre { font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.dd-voir-aussi-liste { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.dd-voir-aussi-carte { flex: 1 1 260px; max-width: 480px; display: grid; gap: 4px; align-content: start; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); text-decoration: none; }
.dd-voir-aussi-carte b { font-size: 1.05rem; }
.dd-voir-aussi-carte b::after { content: " ↗"; color: var(--accent); }
.dd-voir-aussi-carte .muted { font-size: .88rem; }
@media (hover: hover) { .dd-voir-aussi-carte:hover { border-color: var(--accent); } }
.petit { font-size: .82rem; }
.dd-chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 720px; margin: 0 auto; }
.dd-chiffre { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 12px; text-align: center; }
.dd-chiffre b { display: block; font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.1; }
.dd-chiffre span { color: var(--muted); font-size: .82rem; }
.dd-chiffre.ko b { color: var(--ko); }
.dd-chiffre.ok b { color: var(--ok); }
.dd-chiffre.neutre b { color: var(--accent); }
.dd-familles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.dd-familles.petites { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.dd-famille { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: start; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; cursor: pointer; font: inherit; color: inherit; animation: rise .35s ease both; animation-delay: calc(var(--i, 0) * 40ms); }
.dd-famille:hover { border-color: var(--accent); }
.dd-famille.petite { grid-template-columns: 70px minmax(0, 1fr); opacity: .92; }
.dd-famille .apercu { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.dd-famille-texte { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dd-famille-texte .pitch { color: var(--muted); font-size: .86rem; line-height: 1.4; }
.dd-barres { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px; align-items: center; margin-top: 4px; font-size: .74rem; color: var(--muted); }
.barre { height: 9px; border-radius: 999px; background: var(--soft, #eef1f6); overflow: hidden; }
.barre .remplie { display: block; height: 100%; border-radius: 999px; }
.barre.ko .remplie { background: var(--ko); }
.barre.ok .remplie { background: var(--ok); }
.dd-cta-zone { text-align: center; margin: 24px auto 0; max-width: 620px; }
.dd-cta-zone p { margin: 8px 0 0; font-size: .86rem; }
.dd-doc-tete { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.dd-doc-tete h1 { margin: 0 0 4px; font-size: clamp(1.15rem, 3vw, 1.5rem); }
.dd-doc-tete p { margin: 0; }
.dd-doc-corps { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dd-carte { padding: 16px; min-width: 0; }
.dd-carte h2 { font-size: 1rem; margin: 6px 0 2px; }
.dd-carte h2 + p { margin: 0 0 10px; }
.dd-vues { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dd-vue { margin: 0; min-width: 0; }
.dd-vue figcaption { font-weight: 600; font-size: .86rem; margin-bottom: 6px; border-bottom: 1px dotted var(--muted); display: inline-block; cursor: help; }
.dd-vue.dd-v-modele figcaption { color: var(--ko); }
.dd-vue.dd-v-page figcaption { color: var(--ok); }
.dd-vue-img { display: block; }
.dd-vue img { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; display: block; }
.dd-pages { margin-top: 8px; text-align: center; }
.dd-route { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 8px; }
.dd-etape { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .84rem; font-weight: 600; }
.dd-etape[data-tip] { cursor: help; }
.dd-etape svg { stroke: currentColor; fill: none; stroke-width: 1.8; }
.dd-etape + .dd-etape::before { content: "→"; margin-right: 4px; color: var(--muted); }
.dd-questions { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.dd-q { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.dd-q.choisie { border-color: var(--accent); background: var(--accent-soft); }
.dd-q-tete { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; font-size: .9rem; }
.dd-temoin { font-size: .7rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; white-space: nowrap; cursor: help; }
.dd-reps { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.dd-rep { display: flex; flex-direction: column; border-radius: 6px; padding: 4px 8px; min-width: 0; }
.dd-rep small { font-size: .7rem; opacity: .85; }
.dd-rep b { font-size: .86rem; overflow-wrap: anywhere; }
.dd-rep.ok { background: var(--ok-soft); color: var(--ok); }
.dd-rep.ko { background: var(--ko-soft); color: var(--ko); }
.dd-rep.neutre { background: var(--soft, #eef1f6); color: var(--muted); }
.dd-q-detail { margin-top: 6px; }
.dd-choix { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.dd-puce { font: inherit; font-size: .82rem; text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 6px 10px; cursor: pointer; max-width: 100%; }
.dd-puce.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.dd-question { padding: 14px 16px; margin-bottom: 12px; }
.dd-question h2 { font-size: 1.02rem; margin: 0 0 6px; }
.dd-attendu { margin: 0; color: var(--muted); }
.dd-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dd-col { padding: 14px 16px; min-width: 0; }
.dd-col h2 { font-size: 1rem; margin: 0; }
.dd-col > p { margin: 2px 0 10px; }
.dd-verdict { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 8px; margin-bottom: 8px; overflow-wrap: anywhere; }
.dd-verdict.ok { background: var(--ok-soft); color: var(--ok); }
.dd-verdict.ko { background: var(--ko-soft); color: var(--ko); }
.dd-verdict.neutre { background: var(--soft, #eef1f6); color: var(--muted); }
.dd-texte { font-size: .88rem; line-height: 1.5; max-height: 340px; overflow: auto; }
.dd-texte p { margin: 0 0 6px; overflow-wrap: anywhere; }
.dd-pied { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dd-temps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dd-temps li { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.dd-temps svg { stroke: var(--accent); fill: none; stroke-width: 1.8; }
.dd-temps p { margin: 0; font-size: .88rem; }
.dd-num { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
@media (max-width: 860px) {
  .dd-doc-corps, .dd-colonnes, .dd-temps { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .dd-chiffres { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .dd-chiffre { padding: 10px 6px; }
  .dd-vues { grid-template-columns: 1fr; }
  .dd-famille { grid-template-columns: 80px minmax(0, 1fr); }
}

/* La recherche : une barre, deux recherches côte à côte, leur course. */
.dd-barre-recherche { display: flex; gap: 8px; max-width: 760px; margin: 0 auto 8px; }
.dd-barre-recherche input { flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.dd-barre-recherche input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.dd-choix { justify-content: center; align-items: center; }
.dd-resultat { margin-top: 6px; }
.dd-col-tete { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.dd-col-tete > div { flex: 1; min-width: 0; }
.dd-col-tete h2 { margin: 0; font-size: 1rem; }
.dd-col-tete p { margin: 2px 0 0; }
.dd-pastille { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: none; }
.dd-pastille.normal { background: var(--ko); }
.dd-pastille.solution { background: var(--ok); }
.dd-chrono { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); background: var(--soft, #eef1f6); border-radius: 999px; padding: 3px 10px; font-size: .9rem; white-space: nowrap; }
.dd-chrono svg { width: 14px; height: 14px; }
.dd-chrono.fini { color: var(--ink); }
.dd-reponse { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 10px; margin-bottom: 10px; overflow-wrap: anywhere; }
.dd-reponse b { font-size: 1.15rem; line-height: 1.3; }
.dd-reponse.ok { background: var(--ok-soft); color: var(--ok); }
.dd-reponse.ko { background: var(--ko-soft); color: var(--ko); }
.dd-reponse.neutre, .dd-reponse.libre { background: var(--soft, #eef1f6); color: var(--ink); }
.dd-verdict-pastille { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.dd-sources { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; margin-bottom: 8px; }
.dd-source { font-size: .78rem; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--ink); text-decoration: none; background: var(--panel); }
a.dd-source:hover, button.dd-source:hover { border-color: var(--accent); color: var(--accent); }
button.dd-source { font: inherit; font-size: .78rem; cursor: pointer; }

/* Les pages citées en vignettes, sous la réponse de notre solution. */
.dd-citees { margin-bottom: 10px; }
.dd-citees-rangee { display: grid; grid-template-columns: repeat(4, minmax(0, 104px)); gap: 6px; }
.dd-citee { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: zoom-in; font: inherit; color: var(--ink); text-align: left; }
.dd-citee:hover, .dd-citee:focus-visible { border-color: var(--accent); }
.dd-citee img { width: 100%; height: auto; aspect-ratio: 5 / 6; object-fit: cover; object-position: top; border-radius: 4px; background: #fff; display: block; }
.dd-citee > b { font-size: .78rem; color: var(--ink); }
.dd-citee span { font-size: .7rem; line-height: 1.25; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-citee.plus { justify-content: center; align-items: center; text-align: center; cursor: pointer; background: var(--soft); }
.dd-citee.plus b { font-size: 1.2rem; color: var(--accent); }

/* La page citée en grand : la fenêtre tient dans l'écran, la page y défile. */
.dd-apercu { border: 0; padding: 0; border-radius: var(--radius); background: var(--panel); color: var(--text); box-shadow: var(--shadow); width: min(900px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); display: none; flex-direction: column; overflow: hidden; }
.dd-apercu[open] { display: flex; }
.dd-apercu::backdrop { background: rgba(16, 32, 74, .55); }
.dd-apercu-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 14px 6px; }
.dd-apercu-titre { margin: 0; font-weight: 800; color: var(--ink); font-size: .95rem; overflow-wrap: anywhere; }
.dd-apercu-rep { margin: 0; padding: 0 14px 8px; font-size: .86rem; color: var(--muted); }
.dd-apercu-rep b { color: var(--ink); }
.dd-apercu-cadre { flex: 1; min-height: 0; overflow: auto; background: var(--soft); border-block: 1px solid var(--line); }
.dd-apercu-cadre img { display: block; width: 100%; height: auto; cursor: zoom-in; background: #fff; }
.dd-apercu-cadre.zoom img { width: 220%; max-width: none; cursor: zoom-out; }
.dd-apercu-pied { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; }
.dd-apercu-pied .dd-pages { margin: 0; }
.dd-apercu-espace { flex: 1; }
.dd-details { font-size: .86rem; line-height: 1.5; margin-bottom: 6px; }
.dd-details summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.dd-details p { margin: 0 0 6px; overflow-wrap: anywhere; }
.dd-attente { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 18px 4px; }
.dd-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: dd-tourne 1s linear infinite; }
@keyframes dd-tourne { to { transform: rotate(360deg); } }
/* Le score des exemples de la recherche : une phrase, puis deux pastilles bien séparées. */
.dd-score { display: grid; justify-items: center; gap: 10px; margin: 20px auto 0; padding: 16px; max-width: 520px; text-align: center; }
.dd-score p { margin: 0; }
.dd-score .dd-doc-score { gap: 16px; }
.dd-score b.ok { color: var(--ok); }
.dd-score b.ko { color: var(--ko); }
.dd-erreur { color: var(--ko); }
@media (max-width: 520px) {
  .dd-barre-recherche { flex-direction: column; }
}

/* Comment ça marche : les dessins des parades (le reste en fin de fichier). */
.dd-fleche { color: var(--muted); }
.dd-dessin { width: 100%; max-width: 200px; height: auto; stroke: var(--accent); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dd-dessin .plein { fill: var(--accent-soft); }
.dd-dessin .oeil { fill: var(--panel); }
.dd-dessin text.grand { fill: var(--accent); stroke: none; font-size: 26px; font-weight: 700; }

/* Passe UI/UX : navigation, actions visibles, détails techniques repliés. */
.dd-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.dd-nav a[aria-current="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.dd-familles { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.dd-familles.petites { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.dd-famille { text-decoration: none; animation: none; grid-template-columns: 90px minmax(0, 1fr); transition: border-color .15s, box-shadow .15s, transform .15s; }
.dd-famille:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20, 30, 60, .12); }
.dd-famille.petite { grid-template-columns: 64px minmax(0, 1fr); }
.dd-voir { margin-top: 4px; color: var(--accent); font-weight: 700; font-size: .84rem; }
.dd-legende { display: inline; }
/* Les deux chiffres de l'accueil : le modèle seul, notre solution. */
.dd-chiffres.deux { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; }
.dd-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 18px 0 6px; }
.dd-actions .btn { text-decoration: none; }
.dd-tech-titre { font-weight: 700; font-size: .82rem; margin: 10px 0 4px; color: var(--ink); }
.dd-doc-score { margin: 6px 0 0; font-weight: 700; font-size: .92rem; }
.dd-score-ko { color: var(--ko); }
.dd-score-ok { color: var(--ok); }
.dd-colle { position: sticky; top: 72px; }
.dd-seg { display: inline-flex; margin-bottom: 6px; }
.dd-seg button { font-size: .78rem; }
.dd-v-droite img { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; display: block; }
.dd-v-droite > p { margin: 6px 0 0; }
.dd-lecture-page { max-height: 520px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.dd-lecture-page img { width: 100%; border: 1px solid var(--line); border-radius: 6px; }
.dd-texte-lu { white-space: pre-wrap; font: inherit; font-size: .8rem; line-height: 1.45; background: var(--soft, #eef1f6); border-radius: 6px; padding: 8px 10px; margin: 0; }
.dd-etiquette { margin: 0; font-weight: 700; font-size: .82rem; color: var(--accent); }
.dd-pages { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; }
.dd-attendu-q { margin: 4px 0 0; font-size: .76rem; }
.dd-etapes-agent { margin: 0; padding-left: 18px; font-size: .8rem; }
.dd-etapes-agent li { margin-bottom: 6px; }
@media (max-width: 860px) {
  .dd-colle { position: static; }
}
@media (max-width: 520px) {
  .dd-nav .btn { padding-left: 8px; padding-right: 8px; }
  .dd-famille { grid-template-columns: 70px minmax(0, 1fr); }
}
/* Cartes de famille verticales : la vignette en haut, des barres sur toute la largeur. */
.dd-famille, .dd-famille.petite { grid-template-columns: 1fr; gap: 10px; padding: 10px; }
.dd-famille .apercu { aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; }
.dd-familles.petites .dd-famille .apercu { aspect-ratio: 21 / 9; }
.dd-barres { grid-template-columns: 92px minmax(0, 1fr); }
.dd-actions .btn.ghost { border: 1px solid var(--accent); color: var(--accent); background: var(--panel); }
@media (max-width: 520px) {
  .dd-famille, .dd-famille.petite { grid-template-columns: 1fr; }
}
.dd-famille { grid-template-rows: auto 1fr; }
.dd-famille-texte { height: 100%; }
.dd-famille-texte .dd-barres { margin-top: auto; padding-top: 6px; }
.dd-vues { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dd-v-droite { min-width: 0; }
/* Téléphone : en-tête sur deux lignes (marque et langue, puis les trois sections), vues
   empilées, titre du document sous le bouton retour. */
@media (max-width: 640px) {
  .dd-vues { grid-template-columns: minmax(0, 1fr); }
  .dd-doc-tete { flex-direction: column; gap: 8px; }
  .dd-seg { display: flex; }
  .dd-seg button { flex: 1; }
}
@media (max-width: 520px) {
  .top-in { position: relative; flex-wrap: wrap; row-gap: 8px; }
  .top-actions { width: 100%; }
  .top-actions .seg.langue { position: absolute; right: 16px; top: 12px; }
  .dd-nav { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dd-nav .btn { justify-content: center; text-align: center; }
}

/* Le document original (réponse encadrée) et notre lecture en JSON. */
.dd-original { position: relative; display: block; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.dd-original img { display: block; width: 100%; }
.dd-v-page figcaption { color: var(--ink); }
.dd-v-droite > .muted { margin: 2px 0 8px; }
.dd-json { margin: 0; max-height: 560px; overflow: auto; background: #0f1830; color: #c8d3ea; border-radius: 8px; padding: 10px 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .74rem; line-height: 1.5; white-space: pre; tab-size: 2; }
.dd-json .j-cle { color: #8fb4ff; }
.dd-json .j-chaine { color: #b5e3a1; }
.dd-json .j-nombre { color: #ffcf7a; }
.dd-json .j-mot { color: #f59db0; }
@media (max-width: 640px) { .dd-json { max-height: 380px; } }

/* L'écran d'un document, refait : en-tête et score, bandeau de la route, puis le document
   en grand à côté de ses questions ; le technique replié. */
.dd-doc-tete { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 16px; margin-bottom: 14px; }
.dd-doc-titre h1 { margin: 0 0 4px; font-size: clamp(1.2rem, 2.6vw, 1.6rem); line-height: 1.25; }
.dd-doc-titre p { margin: 0; }
.dd-doc-score { display: flex; gap: 10px; }
.dd-score-pastille { display: flex; flex-direction: column; align-items: center; min-width: 108px; padding: 8px 14px; border-radius: 12px; }
.dd-score-pastille b { font-size: 1.5rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dd-score-pastille span { font-size: .76rem; font-weight: 600; }
.dd-score-pastille.ko { background: var(--ko-soft); color: var(--ko); }
.dd-score-pastille.ok { background: var(--ok-soft); color: var(--ok); }
.dd-score-pastille.neutre { background: var(--soft); color: var(--ink); }
.dd-bandeau { padding: 12px 16px; margin-bottom: 16px; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; row-gap: 6px; align-items: center; }
.dd-bandeau h2 { margin: 0; font-size: .95rem; white-space: nowrap; }
.dd-bandeau .dd-route { margin: 0; }
.dd-doc-corps { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.dd-doc-carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.dd-doc-carte-tete h2 { margin: 0; font-size: 1rem; }
.dd-doc-carte-tete .dd-pages { margin: 0; }
.dd-original { display: flex; justify-content: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; cursor: zoom-in; }
.dd-original img { display: block; width: 100%; max-height: calc(100vh - 210px); object-fit: contain; }
.dd-colle { position: sticky; top: 72px; }
.dd-pli { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.dd-pli > summary { cursor: pointer; font-weight: 700; color: var(--accent); font-size: .88rem; }
.dd-q .dd-pli { margin-top: 6px; padding-top: 6px; }
.dd-q .dd-pli > summary { font-size: .8rem; }
@media (max-width: 980px) {
  .dd-doc-corps { grid-template-columns: minmax(0, 1fr); }
  .dd-colle { position: static; }
  .dd-original img { max-height: none; }
}
@media (max-width: 640px) {
  .dd-doc-tete { grid-template-columns: minmax(0, 1fr); }
  .dd-doc-score { justify-content: stretch; }
  .dd-score-pastille { flex: 1; min-width: 0; }
  .dd-bandeau { grid-template-columns: minmax(0, 1fr); }
}

/* La page cliquable : la donnée lue à l'endroit cliqué, en surimpression. */
.dd-indice { margin: -4px 0 8px; display: flex; align-items: center; gap: 6px; }
.dd-indice svg { width: 14px; height: 14px; }
.dd-doc-carte-actions { display: flex; align-items: center; gap: 8px; }
.dd-doc-carte-actions .btn { text-decoration: none; }
.dd-original { display: flex; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: visible; cursor: auto; }
.dd-page-cadre { position: relative; display: inline-block; max-width: 100%; line-height: 0; }
.dd-page-cadre img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 230px); cursor: crosshair; }
.dd-reflet { position: absolute; background: rgba(255, 196, 0, .28); border-radius: 3px; pointer-events: none; }
.dd-bulle { position: absolute; z-index: 20; width: min(440px, 92%); max-height: 62vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 36px rgba(15, 24, 48, .22); padding: 10px 12px; line-height: 1.4; display: flex; flex-direction: column; gap: 6px; }
.dd-bulle-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .86rem; }
.dd-bulle-fermer { border: 0; background: transparent; font-size: 1.2rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.dd-bulle-chemin { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; color: var(--muted); overflow-wrap: anywhere; }
.dd-bulle .dd-json { max-height: 260px; }
@media (max-width: 980px) { .dd-page-cadre img { max-height: none; } }
.dd-bulle .dd-json { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- comment nous l'avons lue : une notice numérotée ---------- */
.dd-parcours { padding: 16px 18px; margin-bottom: 16px; }
.dd-parcours-tete h2 { margin: 0 0 4px; font-size: 1.05rem; color: var(--ink); }
.dd-parcours-tete p { margin: 0 0 12px; font-size: .88rem; line-height: 1.45; max-width: 80ch; }
.dd-pas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.dd-pas-item { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--panel); transition: border-color .15s, box-shadow .15s; }
.dd-pas-item.actif { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dd-pas-item.fin { background: var(--ok-soft); border-color: transparent; }
.dd-pas-num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: .82rem; }
.dd-pas-num.petit { width: 22px; height: 22px; font-size: .74rem; }
.dd-pas-num svg { stroke: currentColor; fill: none; stroke-width: 2.4; }
.dd-pas-item.fin .dd-pas-num { background: var(--ok); }
.dd-pas-corps { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dd-pas-titre { display: flex; align-items: center; gap: 6px; min-height: 26px; color: var(--ink); font-size: .92rem; line-height: 1.25; }
.dd-pas-titre svg { stroke: var(--accent); fill: none; stroke-width: 1.8; flex: none; }
.dd-pas-ici { margin: 0; font-size: .84rem; line-height: 1.4; color: var(--text); }
.dd-pas-sans { margin: 0; font-size: .8rem; line-height: 1.4; color: var(--muted); }
.dd-pas-sans span { color: var(--ko); font-weight: 700; }
.dd-pas-voir { align-self: flex-start; margin-top: 2px; border: 1.5px solid var(--soft-2); background: var(--panel); color: var(--accent); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: .8rem; cursor: pointer; }
.dd-pas-voir[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (hover: hover) { .dd-pas-voir:hover { border-color: var(--accent); } }

/* L'effet d'une étape, montré sur la page. */
.dd-effet { position: relative; border: 1.5px solid var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 8px 36px 8px 12px; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
.dd-effet .dd-bulle-fermer { position: absolute; top: 6px; right: 6px; }
.dd-effet-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .9rem; color: var(--ink); }
.dd-effet-tete .seg { margin-left: auto; }
.dd-effet-legende { margin: 0; font-size: .84rem; line-height: 1.4; color: var(--ink); }
.dd-effet-puces { display: flex; flex-wrap: wrap; gap: 4px; max-height: 92px; overflow: auto; }
.dd-effet-puces .dd-puce { font-size: .74rem; padding: 3px 9px; }
.dd-calque { position: absolute; inset: 0; pointer-events: none; }
.dd-calque.tuiles { display: grid; grid-template-columns: repeat(var(--colonnes, 4), 1fr); grid-template-rows: repeat(var(--rangees, 3), 1fr); }
.dd-tuile { border: 2px dashed var(--accent); background: rgba(31, 95, 214, .06); color: var(--accent); font-weight: 800; font-size: .8rem; display: grid; place-items: start; padding: 4px 6px; line-height: 1; }
.dd-trace { position: absolute; background: rgba(31, 95, 214, .14); outline: 1px solid rgba(31, 95, 214, .45); border-radius: 2px; }
.dd-trace.impair { background: rgba(0, 158, 115, .14); outline-color: rgba(0, 158, 115, .5); }
.dd-page-cadre.apres img { cursor: default; }

/* Le cadre tracé à la souris, et les données qu'il contient. */
.dd-page-cadre img { user-select: none; -webkit-user-drag: none; touch-action: pan-x pan-y pinch-zoom; }
.dd-reflets { position: absolute; inset: 0; pointer-events: none; }
.dd-selection { position: absolute; border: 2px solid var(--accent); background: rgba(31, 95, 214, .10); border-radius: 3px; pointer-events: none; }
.dd-bulle.large { width: min(620px, 96%); }
.dd-bulle-tete .seg { margin-left: auto; }
.dd-bulle-tete .seg button { min-height: 28px; padding: 3px 10px; font-size: .76rem; }
.dd-bulle-corps { overflow: auto; max-height: 46vh; }
.dd-donnees { display: flex; flex-direction: column; gap: 6px; }
.dd-donnees-titre { margin: 4px 0 0; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.dd-mini-zone { overflow-x: auto; }
.dd-mini { border-collapse: collapse; font-size: .78rem; width: 100%; }
.dd-mini th, .dd-mini td { border-bottom: 1px solid var(--line); padding: 3px 6px; text-align: left; white-space: nowrap; }
.dd-mini th { color: var(--muted); font-weight: 700; background: var(--soft); position: sticky; top: 0; }
.dd-mini td.nb { text-align: right; font-variant-numeric: tabular-nums; }
.dd-champs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 0; font-size: .82rem; }
.dd-champs dt { color: var(--muted); }
.dd-champs dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.dd-lignes-texte { margin: 0; padding-left: 16px; font-size: .82rem; line-height: 1.4; }
.dd-refs { display: flex; flex-wrap: wrap; gap: 4px; }
.dd-ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .74rem; background: var(--soft); border-radius: 6px; padding: 2px 6px; cursor: help; }

/* Comment notre solution a trouvé la réponse. */
.dd-recit { margin-top: 8px; border-top: 1px dashed var(--soft-2); padding-top: 8px; cursor: default; }
.dd-recit-titre { margin: 0 0 2px; font-weight: 800; font-size: .84rem; color: var(--ink); }
.dd-recit > .muted { margin: 0 0 6px; }
.dd-recit-pas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: pas; }
.dd-recit-pas li { display: flex; gap: 8px; align-items: flex-start; font-size: .82rem; line-height: 1.4; counter-increment: pas; }
.dd-recit-pas li p { margin: 0; }
/* Sans min-width: 0, un tableau large pousse l'étape hors de la carte au lieu de défiler. */
.dd-recit-pas li > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dd-recit-ic { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.dd-recit-ic svg { stroke: currentColor; fill: none; stroke-width: 1.9; }
.dd-recit-pas li.echec .dd-recit-ic { background: var(--warn-soft); color: var(--warn); }
.dd-recit-res { color: var(--ok); font-weight: 700; }
.dd-recit-pas li.echec .dd-recit-res { color: var(--warn); }
.dd-recit-pas .dd-mini-zone { margin-top: 4px; max-width: 100%; }
.dd-recit-fin { margin: 8px 0 0; font-size: .86rem; color: var(--ink); }

/* Les questions : score, filtre, question libre. */
.dd-q-entete { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dd-q-entete h2 { margin: 0; }
.dd-q-score { display: flex; gap: 6px; cursor: help; }
.dd-q-score .dd-score-pastille { padding: 4px 10px; }
.dd-filtre { flex-wrap: wrap; margin: 10px 0 8px; }
.dd-filtre button { font-size: .78rem; padding: 5px 10px; min-height: 30px; display: inline-flex; align-items: center; gap: 6px; }
.dd-compte { background: var(--soft-2); border-radius: 999px; padding: 0 7px; font-size: .72rem; line-height: 1.6; }
.dd-filtre button[aria-pressed="true"] .dd-compte { background: var(--accent); color: var(--accent-ink); }
.dd-poser-btn { margin: 4px 0 2px; }
.dd-poser-btn svg { stroke: currentColor; fill: none; stroke-width: 2.4; }
.dd-poser { margin: 6px 0 4px; }
.dd-poser-ligne { display: flex; gap: 6px; }
.dd-poser-ligne input { flex: 1; min-width: 0; border: 1.5px solid var(--soft-2); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: .88rem; }
.dd-poser-ligne input:focus { outline: none; border-color: var(--accent); }
.dd-poser p { margin: 4px 2px 0; }
.dd-libres { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.dd-libres:empty { display: none; }
.dd-libre { border: 1.5px solid var(--accent); border-radius: 12px; padding: 8px 10px; background: var(--panel); }
.dd-libre-q { margin: 0 0 6px; font-weight: 700; color: var(--ink); font-size: .9rem; display: flex; flex-direction: column; }
.dd-libre-q small { color: var(--accent); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.dd-rep.libre { background: var(--soft); }
.dd-rep.attente { background: var(--soft); color: var(--muted); }
.dd-rep.attente .dd-spin { width: 12px; height: 12px; display: inline-block; vertical-align: -2px; }
.dd-rep-pied { display: block; color: var(--muted); font-size: .7rem; margin-top: 2px; }
.dd-q-plus { margin: 4px 0 0; font-size: .76rem; color: var(--accent); }
.dd-q-vide { list-style: none; padding: 12px; font-size: .86rem; }
.dd-libre .dd-pli { margin-top: 6px; }
@media (max-width: 640px) {
  .dd-pas { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .dd-pas-item { scroll-snap-align: start; }
  .dd-q-entete { align-items: flex-start; }
  .dd-filtre button { flex: 1 1 auto; justify-content: center; }
}

/* La lecture croisée : les valeurs corrigées par le vote. */
.dd-croise { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: .84rem; }
.dd-croise li { cursor: help; }
.dd-croise s { color: var(--ko); }
.dd-croise b { color: var(--ok); }
.dd-croise small { margin-left: 6px; }
.dd-dessin text.moyen { font-size: 13px; font-weight: 800; text-anchor: middle; fill: currentColor; stroke: none; }

/* ---------- Comment ça marche : une page autonome, le schéma puis les étapes ---------- */
.dd-fleche.grosse { font-size: 1.4rem; font-weight: 700; color: var(--accent); }

/* 2. Le schéma : une grille, un couloir par chemin ; « envoyé tel quel » couvre les trois
   étapes que nous ajoutons, et les deux modèles sont dans la même colonne. Sur un écran étroit,
   la grille pivote : les deux chemins deviennent deux colonnes. */
.dd-schema { display: grid; grid-template-columns: minmax(84px, 108px) repeat(6, minmax(0, 1fr)); grid-template-rows: auto 30px auto; column-gap: 24px; padding: 18px 20px; align-items: stretch; }
.dd-schema > * { grid-column: var(--gc); grid-row: var(--gr); }
.dd-couloir { align-self: center; font-weight: 800; font-size: .84rem; line-height: 1.25; }
.dd-couloir.marche { color: var(--muted); }
.dd-couloir.notre { color: var(--accent); }
.dd-boite { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 10px 8px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--panel); min-width: 0; }
.dd-boite b { font-size: .84rem; line-height: 1.25; color: var(--ink); }
.dd-boite small { font-size: .72rem; line-height: 1.35; color: var(--muted); }
.dd-picto { width: 64px; height: 38px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 2px; }
.dd-picto .plein { fill: currentColor; fill-opacity: .18; }
.dd-picto .plein-fort { fill: currentColor; stroke: none; }
.dd-picto .fort { stroke-width: 3.2; }
.dd-boite.gris { color: var(--muted); background: var(--soft); border-color: transparent; }
.dd-boite.ko { color: var(--ko); background: var(--ko-soft); border-color: transparent; }
.dd-boite.ko b { color: var(--ko); }
.dd-boite.ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok); }
.dd-boite.ok b { color: var(--ok); }
.dd-boite.accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.dd-boite.accent b { color: var(--accent); }
.dd-boite.suite::after { content: ""; position: absolute; top: 50%; right: -20px; width: 16px; height: 12px; transform: translateY(-50%); background: var(--muted); clip-path: polygon(0 40%, 60% 40%, 60% 0, 100% 50%, 60% 100%, 60% 60%, 0 60%); }
.dd-boite.accent.suite::after { background: var(--accent); }
.dd-meme { display: grid; place-items: center; position: relative; }
.dd-meme::before { content: ""; position: absolute; top: -6px; bottom: -6px; left: 50%; border-left: 2px dashed var(--accent); }
.dd-meme span { position: relative; background: var(--panel); color: var(--accent); font-size: .7rem; font-weight: 700; padding: 0 6px; white-space: nowrap; }
@media (max-width: 860px) {
  .dd-schema { grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr); grid-template-rows: auto; column-gap: 0; row-gap: 22px; padding: 14px; }
  .dd-schema > * { grid-column: var(--vc); grid-row: var(--vr); }
  .dd-couloir { text-align: center; align-self: end; }
  .dd-boite.suite::after { top: auto; right: auto; bottom: -19px; left: 50%; width: 12px; height: 16px; transform: translateX(-50%); clip-path: polygon(40% 0, 60% 0, 60% 60%, 100% 60%, 50% 100%, 0 60%, 40% 60%); }
  .dd-boite[style*="span 3"] { justify-content: center; }
  .dd-meme::before { top: 50%; bottom: auto; left: -4px; right: -4px; border-left: 0; border-top: 2px dashed var(--accent); }
  .dd-meme span { display: none; }
}
@media (max-width: 420px) { .dd-picto { width: 52px; height: 32px; } .dd-boite { padding: 8px 6px 10px; } .dd-boite small { font-size: .68rem; } }

/* Les étapes, une carte chacune : l'en-tête numéroté, l'idée en une phrase, le dessin. */
.dd-cm-etapes { display: flex; flex-direction: column; gap: 16px; }
.dd-cm-etape { padding: 18px 20px; }
.dd-cm-etape-tete { display: flex; align-items: center; gap: 8px; }
.dd-cm-etape-tete h3 { margin: 0 0 0 4px; font-size: 1.05rem; color: var(--ink); }
.dd-cm-etape-intro { margin: 8px 0 16px; line-height: 1.55; max-width: 860px; }
@media (max-width: 640px) { .dd-cm-etape { padding: 14px; } }

/* ① ② Les règles : ce qu'on mesure, quand la règle s'applique, l'étape ajoutée à la route. */
.dd-regles { display: flex; flex-direction: column; }
.dd-regle { display: grid; grid-template-columns: 34px minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; line-height: 1.4; }
.dd-regle:last-child { border-bottom: 0; }
.dd-regle.tete { padding-top: 0; }
.dd-regle.tete small { color: var(--muted); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.dd-regle-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--soft); color: var(--ink); display: grid; place-items: center; }
.dd-regle-ic svg { stroke: currentColor; }
.dd-regle-mesure { color: var(--ink); font-weight: 600; }
.dd-regle-si { color: var(--muted); }
.dd-regle-alors { display: flex; align-items: center; gap: 8px; }
/* La règle qu'on ajoute : en pointillé, pour dire qu'elle n'existe pas encore. */
.dd-regle.ajout { border-bottom: 0; }
.dd-regle.ajout .dd-regle-ic { background: none; border: 1.5px dashed var(--accent); color: var(--accent); }
.dd-regle.ajout .dd-regle-mesure { color: var(--accent); }
.dd-route-etape.ajout { background: none; border: 1.5px dashed var(--accent); white-space: normal; }
.dd-ajout-note { margin: 10px 0 18px; padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: .9rem; line-height: 1.5; }
@media (max-width: 760px) {
  .dd-regle { grid-template-columns: 34px minmax(0, 1fr); gap: 2px 12px; }
  .dd-regle.tete { display: none; }
  .dd-regle-ic { grid-row: 1 / span 3; align-self: start; }
  .dd-regle-alors { margin-top: 4px; }
}

/* Des étapes en pastilles, enchaînées par des flèches. */
.dd-route-etapes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dd-route-etape { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; padding: 6px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.dd-route-etape svg { stroke: currentColor; }

/* Deux documents imaginaires, deux routes. */
.dd-routes-ex { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--soft); display: flex; flex-direction: column; gap: 10px; }
.dd-routes-ex-titre { margin: 0; font-weight: 800; color: var(--ink); font-size: .9rem; }
.dd-route-ex { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 12px; align-items: center; }
.dd-route-doc { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.dd-route-doc .dd-picto { width: 40px; height: 26px; margin: 0; color: var(--muted); }
.dd-route-ex .dd-route-etape { background: var(--panel); }
.dd-routes-ex .muted.petit { margin: 2px 0 0; font-size: .8rem; }
@media (max-width: 640px) { .dd-route-ex { grid-template-columns: minmax(0, 1fr); gap: 6px; } }

/* ③ Les six parades, dessinées avant → après. */
.dd-parades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dd-parade { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.dd-parade b { color: var(--ink); }
.dd-parade p { margin: 0; font-size: .88rem; line-height: 1.45; }
.dd-parade p.muted.petit { margin-top: auto; padding-top: 4px; font-size: .78rem; }
@media (max-width: 860px) { .dd-parades { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .dd-parades { grid-template-columns: minmax(0, 1fr); } }

/* ④ La question, les trois outils, la réponse et sa page. */
.dd-outils { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 2.2fr) auto minmax(0, 1fr); gap: 12px; align-items: center; }
.dd-cm-bulle { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px; border-radius: 14px; font-size: .88rem; line-height: 1.35; }
.dd-cm-bulle.question { background: var(--soft); color: var(--muted); }
.dd-cm-bulle.question b { color: var(--ink); }
.dd-cm-bulle.reponse { background: var(--ok-soft); color: var(--ok); border: 1.5px solid var(--ok); }
.dd-outils-liste { display: flex; flex-direction: column; gap: 8px; }
.dd-outil { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.dd-outil b { color: var(--accent); font-size: .9rem; }
.dd-outil p { margin: 2px 0 0; font-size: .84rem; line-height: 1.4; }
.dd-outil-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--panel); color: var(--accent); display: grid; place-items: center; }
.dd-outil-ic svg { stroke: currentColor; }
@media (max-width: 760px) {
  .dd-outils { grid-template-columns: minmax(0, 1fr); }
  .dd-outils > .dd-fleche.grosse { transform: rotate(90deg); justify-self: center; }
}

/* L'accueil sans données (un clone neuf, avant `task donnees`). */
.dd-sans-donnees { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 3vw, 28px); margin: 24px auto 0; max-width: 720px; }
.dd-sans-donnees h2 { margin-top: 0; }
.dd-sans-donnees pre { background: var(--bg); border-radius: 8px; padding: 12px 16px; margin: 12px 0; overflow-x: auto; }

/* ---------- votre document : le dépôt, puis chaque étape de sa lecture ---------- */
/* La carte de dépôt de l'accueil : pointillée, sur toute la largeur, après les familles. */
.dd-depot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; margin: 16px 0 0; padding: 18px 20px; border: 2px dashed var(--soft-2); border-radius: var(--radius); background: var(--panel); transition: border-color .15s, background-color .15s; }
.dd-depot.survol { border-color: var(--accent); background: var(--accent-soft); }
.dd-depot-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.dd-depot-ic svg { width: 26px; height: 26px; }
.dd-depot h2 { margin: 0 0 4px; font-size: 1.05rem; color: var(--ink); }
.dd-depot p { margin: 0 0 4px; font-size: .9rem; line-height: 1.45; }
.dd-depot-prudence { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 6px; padding: 10px 12px; border-left: 3px solid var(--warn); border-radius: 6px; background: var(--warn-soft); color: var(--ink); text-align: left; }
.dd-depot-prudence-ic { flex: none; color: var(--warn); line-height: 0; padding-top: 1px; }
.dd-depot-prudence strong { display: block; margin-bottom: 2px; color: var(--warn); font-size: .9rem; }
.dd-depot .dd-depot-prudence p { margin: 0; font-size: .84rem; }
.dd-depot-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dd-depot-actions .muted.petit { margin: 0; }
@media (max-width: 640px) {
  .dd-depot { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 16px; }
}

/* La frise : cinq étapes, faite / en cours / à venir. En ligne sur un écran large, en
   colonne sur un téléphone. */
.dd-frise-carte { padding: 16px 18px; margin-bottom: 16px; }
.dd-frise { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.dd-frise-pas { width: 100%; height: 100%; display: flex; gap: 10px; align-items: flex-start; text-align: left; font: inherit; color: inherit; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--panel); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.dd-frise-pas:disabled { cursor: default; opacity: .6; }
.dd-frise-pas.choisie { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dd-frise-num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .82rem; background: var(--soft); color: var(--muted); }
.dd-frise-num svg { stroke: currentColor; stroke-width: 2.6; }
.dd-frise-num .dd-spin { width: 18px; height: 18px; }
.dd-frise-pas.fait .dd-frise-num { background: var(--ok); color: #fff; }
.dd-frise-pas.en_cours .dd-frise-num { background: var(--accent-soft); }
.dd-frise-pas.attente .dd-frise-num { background: var(--warn-soft); color: var(--warn); }
.dd-frise-pas.erreur .dd-frise-num { background: var(--ko); color: #fff; }
.dd-frise-corps { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dd-frise-titre { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); font-size: .9rem; }
.dd-frise-titre svg { stroke: var(--accent); width: 15px; height: 15px; }
.dd-frise-phrase { font-size: .8rem; line-height: 1.35; color: var(--text); overflow-wrap: anywhere; }
.dd-frise-etat { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.dd-frise-pas.fait .dd-frise-etat { color: var(--ok); }
.dd-frise-pas.en_cours .dd-frise-etat { color: var(--accent); }
.dd-frise-pas.attente .dd-frise-etat { color: var(--warn); }
.dd-frise-pas.erreur .dd-frise-etat { color: var(--ko); }
@media (max-width: 860px) {
  .dd-frise { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .dd-frise-pas { padding: 8px 10px; }
}

/* Le détail de l'étape. */
.dd-envoi-panneau { padding: 16px 18px; }
.dd-envoi-panneau h2 { margin: 0 0 4px; font-size: 1.02rem; color: var(--ink); }
.dd-envoi-panneau > p:not(.muted) { margin: 0 0 10px; font-size: .9rem; line-height: 1.45; }
.dd-envoi-erreur { border: 1.5px solid var(--ko); background: var(--ko-soft); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.dd-envoi-erreur p { margin: 0; color: var(--ko); font-weight: 600; font-size: .9rem; }
.dd-envoi-erreur p.muted { color: var(--muted); font-weight: 400; }

/* Mesurer : une vignette par page et ce que la mesure y voit. */
.dd-envoi-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 8px; }
.dd-envoi-page { margin: 0; display: flex; flex-direction: column; gap: 6px; transition: opacity .2s; }
.dd-envoi-page.attente { opacity: .55; }
.dd-envoi-page figcaption { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--ink); }
.dd-envoi-vignette { position: relative; aspect-ratio: 3 / 4; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.dd-envoi-vignette img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.dd-envoi-vignette > .dd-spin { position: absolute; top: 8px; right: 8px; }
.dd-envoi-page.en-cours .dd-envoi-vignette { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dd-envoi-vignette.petite { width: 56px; flex: none; border-radius: 6px; }
.dd-envoi-puces { display: flex; flex-wrap: wrap; gap: 4px; }
.dd-envoi-puce { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; border-radius: 999px; padding: 2px 8px; background: var(--soft); color: var(--ink); }
.dd-envoi-puce svg { width: 12px; height: 12px; stroke-width: 2.6; }
.dd-envoi-puce .dd-spin { width: 11px; height: 11px; border-width: 2px; }
.dd-envoi-puce.ok { background: var(--ok-soft); color: var(--ok); }
.dd-envoi-puce.att { background: var(--warn-soft); color: var(--warn); }
.dd-envoi-puce.cours { background: var(--accent-soft); color: var(--accent); }
.dd-envoi-puce.neutre { color: var(--muted); }

/* Choisir la route : chaque préparation et sa raison ; puis l'accord. */
.dd-envoi-decisions { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dd-envoi-decisions li { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: .88rem; line-height: 1.45; cursor: help; }
.dd-envoi-decision-tete { display: flex; flex-wrap: wrap; gap: 10px; }
.dd-envoi-decision-tete b { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.dd-envoi-decision-tete svg { stroke: var(--accent); width: 15px; height: 15px; }
.dd-envoi-accord { margin-top: 14px; border: 1.5px solid var(--accent); background: var(--accent-soft); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.dd-envoi-accord h3 { margin: 0; font-size: 1rem; color: var(--ink); }
.dd-envoi-accord p { margin: 0 !important; }
@media (max-width: 520px) { .dd-envoi-accord .btn { width: 100%; white-space: normal; } }

/* Préparer et lire : une ligne par page, ses opérations faites et celle en cours. */
.dd-envoi-barre { height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; margin: 8px 0 12px; }
.dd-envoi-barre span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s var(--ease); }
.dd-envoi-lignes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dd-envoi-ligne { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 8px; transition: opacity .2s, border-color .2s; }
.dd-envoi-ligne.attente { opacity: .55; }
.dd-envoi-ligne.en_cours { border-color: var(--accent); }
.dd-envoi-ligne-corps { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: .86rem; color: var(--ink); }

/* Assembler, puis prêt. */
.dd-envoi-assemblage { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.dd-envoi-assemblage li { display: flex; align-items: center; gap: 8px; }
.dd-envoi-assemblage li.fait svg { stroke: var(--ok); stroke-width: 2.6; }
.dd-envoi-chiffres { margin: 6px auto 4px; }
.dd-envoi-pied { text-align: center; margin: 6px 0 0 !important; }

/* Les questions d'un envoi : vérifier d'abord, puis des questions suggérées. */
.dd-verifier { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 10px; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: .84rem; line-height: 1.4; }
.dd-verifier svg { stroke: var(--accent); flex: none; margin-top: 1px; }
.dd-suggestions-titre { margin: 0 0 6px; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dd-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dd-suggestions:empty { display: none; }
.dd-suggestion { font: inherit; font-size: .84rem; text-align: left; border: 1.5px solid var(--soft-2); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 6px 12px; cursor: pointer; max-width: 100%; }
@media (hover: hover) { .dd-suggestion:hover { border-color: var(--accent); background: var(--accent-soft); } }
.dd-reps.seule { grid-template-columns: minmax(0, 1fr); }

/* Le choix des pages d'un PDF trop long (`choix-pages.js`, même fichier que la vitrine d'anonymisation). */
.choix-pages { border: 0; padding: 0; border-radius: var(--radius); background: var(--panel); color: var(--text); box-shadow: var(--shadow); width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
.choix-pages::backdrop { background: rgba(16, 32, 74, .45); }
.choix-pages form { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.choix-pages h2 { margin: 0; padding: 18px 18px 4px; font-size: 1.15rem; color: var(--ink); }
.choix-pages-texte { margin: 0; padding: 0 18px 12px; color: var(--muted); font-size: .9rem; }
.choix-pages-grille { list-style: none; margin: 0; padding: 4px 18px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; overflow: auto; min-height: 0; flex: 1; }
.choix-pages-grille label { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font-size: .84rem; color: var(--muted); }
.choix-pages-grille canvas { width: 100%; height: auto; background: var(--soft); border: 2px solid var(--line); border-radius: 6px; }
.choix-pages-grille canvas.dessinee { background: #fff; }
.choix-pages-grille input { position: absolute; top: 8px; left: 8px; width: 20px; height: 20px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.choix-pages-grille input:checked ~ canvas { border-color: var(--accent); }
.choix-pages-grille input:checked ~ span { color: var(--ink); font-weight: 600; }
.choix-pages-grille input:disabled ~ canvas { opacity: .5; }
.choix-pages-grille input:disabled { cursor: default; }
.choix-pages-grille input:focus-visible ~ canvas { outline: 3px solid var(--accent); outline-offset: 2px; }
.choix-pages-pied { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.choix-pages-compte { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.choix-pages-espace { flex: 1; }

/* Passe « un visiteur s'y retrouve » (02/12) : la réponse en clair, les candidats d'une réponse
   « à préciser », le modèle seul sur demande, l'en-tête d'un document sans bouton retour. */
.dd-explication { margin: 0 0 10px; font-size: .86rem; line-height: 1.5; }
.dd-explication-titre { margin: 0 0 4px; font-weight: 700; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dd-explication-corps { border-left: 3px solid var(--soft-2, var(--line)); padding-left: 10px; }
.dd-explication-corps p { margin: 0 0 4px; overflow-wrap: anywhere; }
.dd-explication-corps.replie { max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.dd-lien { border: 0; background: none; padding: 2px 0; font: inherit; font-size: .82rem; font-weight: 700; color: var(--accent); cursor: pointer; }
.dd-q .dd-explication { margin: 8px 0 0; cursor: default; }
.dd-candidats { display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px; }
.dd-candidat { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; text-align: left; font: inherit; font-size: .86rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); padding: 8px 10px; overflow-wrap: anywhere; }
.dd-candidat b { white-space: nowrap; }
button.dd-candidat { cursor: pointer; }
@media (hover: hover) { button.dd-candidat:hover { border-color: var(--accent); background: var(--accent-soft); } }
.dd-comparer { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 2px; }
.dd-comparer p { margin: 0; }
.dd-comparer-doc { margin: 6px 0 2px; }
.dd-temoins { margin-top: 12px; }
.dd-temoins > summary { font-size: .84rem; color: var(--muted); }
.dd-temoins .dd-questions { margin-top: 8px; }
.dd-doc-tete { grid-template-columns: minmax(0, 1fr); }
.dd-doc-carte-tete { flex-wrap: wrap; }
.dd-doc-carte-actions { flex-wrap: wrap; margin-left: auto; }
@media (max-width: 520px) { .dd-candidat { flex-direction: column; gap: 2px; } .dd-candidat b { white-space: normal; } }
.dd-candidats > .dd-explication-titre { text-transform: none; letter-spacing: 0; font-size: .86rem; color: var(--ink); }
