/* Interface riskdoc, direction éditoriale (décision D-22) :
   - fond clair à grille fine et halos pastel, surfaces blanches aux rayons larges ;
   - une seule famille, Inter : titres gras et resserrés, texte courant plus léger ;
   - violet-700 pour l'action principale et l'accent, noir pour l'action forte secondaire ;
   - peu d'information par écran : trois chiffres clés au plus, le détail à la demande ;
   - mouvements courts : 150 ms pour un menu, 400 ms pour un panneau.
   Ce fichier n'écrit aucune couleur : uniquement les jetons de tokens.css (et le blanc translucide). */

/* ======================================================================================
   Base
   ====================================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--canvas); -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
  margin: 0;
  color: var(--fg-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 22px;
  font-weight: 450;
  letter-spacing: -0.006em;
  font-feature-settings: "cv11" 1, "ss03" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--violet-200); color: var(--ink); }

a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; }
ol, ul { padding: 0; list-style: none; }
p { font-weight: 400; }

:focus-visible { outline: 2px solid var(--violet-600); outline-offset: 2px; border-radius: var(--radius-md); }

/* Barres de défilement : gris clair sur fond transparent ; fines dans les panneaux, menus et zones
   de texte (sans spécificité, une règle « scrollbar-width: none » d'un composant l'emporte). */
html { scrollbar-color: var(--stroke-strong) transparent; }
:where(body *) { scrollbar-width: thin; }

[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.icon {
  width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}

.mono { font-family: var(--font-mono); font-size: 0.9em; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--fg-tertiary); }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.text { font-size: 14.5px; line-height: 23px; font-weight: 400; color: var(--fg-secondary); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.eyebrow { margin-bottom: 10px; font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--violet-700); }

/* ======================================================================================
   Fond : grille fine qui s'efface vers le bas, halos pastel en pied de page
   ====================================================================================== */

.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.backdrop__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(to right, var(--stroke-weak) 1px, transparent 1px), linear-gradient(to bottom, var(--stroke-weak) 1px, transparent 1px);
  background-size: 72px 72px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 0%, black 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 60% at 50% 0%, black 20%, transparent 78%);
  opacity: .75;
  /* Défilement lent et continu, d'une case exactement : la boucle ne se voit pas. */
  animation: grid-drift 60s linear infinite;
}
.backdrop__glow {
  position: absolute; left: -15%; right: -15%; bottom: -34vh; height: 78vh;
  background:
    radial-gradient(38% 52% at 20% 58%, var(--glow-cyan), transparent 70%),
    radial-gradient(34% 50% at 80% 60%, var(--glow-pink), transparent 70%),
    radial-gradient(44% 60% at 56% 72%, var(--glow-violet), transparent 72%),
    radial-gradient(30% 40% at 38% 80%, var(--glow-lilac), transparent 70%);
  opacity: .95;
  transition: opacity 600ms var(--ease-in-out);
  /* Les halos glissent de quelques pour cent, à vitesse constante, puis reviennent. */
  animation: glow-drift 40s linear infinite alternate;
  will-change: transform;
}
body[data-route="page"] .backdrop__glow { opacity: .4; }
body[data-route="page"] .backdrop__grid { opacity: .45; }

/* ======================================================================================
   Barre de navigation : marque, onglets en pilule au centre, réglages à droite
   ====================================================================================== */

.nav {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur-base) var(--ease-in-out), border-color var(--dur-base) var(--ease-in-out);
}
/* Défilement : pas de barre pleine, un voile flou qui s'efface vers le bas (liquid-glass.css). */
.nav__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
  width: min(100% - 48px, 1200px); height: 68px; margin: 0 auto;
}

.brand {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 2px;
  border-radius: var(--radius-full); color: var(--ink); text-decoration: none;
  font-size: 19px; font-weight: 700; letter-spacing: -0.035em;
}
.brand img { width: 24px; height: 24px; }
.nav__start { justify-self: start; display: flex; align-items: center; gap: 10px; min-width: 0; }

.nav__tabs {
  position: relative; isolation: isolate; display: flex; gap: 2px; padding: 4px;
  background: var(--white); border: 1px solid var(--stroke-weak); border-radius: var(--radius-full); box-shadow: var(--shadow-soft);
}
.nav__link {
  display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: var(--radius-full);
  color: var(--fg-tertiary); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-in-out), color var(--dur-fast) var(--ease-in-out);
}
.nav__link:hover { color: var(--ink); }
.nav__link[aria-current="page"] { color: var(--ink); }
/* Pastille qui suit la souris : légère inertie en fin de course, comme un ressort amorti. */
.nav__thumb {
  position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: var(--radius-full);
  background: var(--bg-hover); opacity: 0; pointer-events: none;
  transition: translate 420ms cubic-bezier(0.25, 1.25, 0.5, 1), width 420ms cubic-bezier(0.25, 1.25, 0.5, 1), scale 260ms var(--lg-ease-spring), opacity var(--dur-fast) var(--ease-in-out);
}
.nav__thumb.no-anim { transition: none; }
/* En glissant d'un onglet de page à l'autre, la pastille gonfle un instant (goutte de verre). */
.pills__thumb.is-moving { scale: 1.06 1.16; }

.nav__end { justify-self: end; display: flex; align-items: center; gap: 4px; }
.nav__end .status { height: 36px; padding: 0 10px; }
.secure {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 4px;
  background: var(--white); border: 1px solid var(--stroke-weak); border-radius: var(--radius-full); box-shadow: var(--shadow-soft);
  color: var(--ink); font-size: 12.5px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; cursor: default;
}
.secure__seal {
  position: relative; display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--glow-cyan), var(--glow-violet), var(--glow-pink), var(--glow-lilac), var(--glow-cyan));
}
.secure__seal::before { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: rgba(255, 255, 255, 0.72); }
.secure__seal svg { position: relative; width: 16px; height: 16px; }
.secure[data-tip]::after { white-space: nowrap; }
@media (max-width: 1080px) {
  .secure__label { display: none; }
  .secure { width: 32px; padding: 0; justify-content: center; }
}

.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none;
  border: 0; border-radius: var(--radius-full); background: transparent; color: var(--fg-secondary);
  transition: background-color var(--dur-fast) var(--ease-in-out), color var(--dur-fast) var(--ease-in-out);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--ink); }
.icon-btn:active { background: var(--bg-active); }

.switch {
  display: inline-flex; align-items: center; gap: 9px; height: 36px; padding: 0 14px 0 9px;
  border: 1px solid var(--stroke-weak); border-radius: var(--radius-full); background: var(--white);
  font-size: 13.5px; font-weight: 500; color: var(--fg-secondary); white-space: nowrap;
  transition: border-color var(--dur-fast) var(--ease-in-out), color var(--dur-fast) var(--ease-in-out);
}
.switch:hover { border-color: var(--stroke-strong); color: var(--ink); }
.switch__track {
  position: relative; width: 28px; height: 16px; border-radius: var(--radius-full); flex: none;
  background: var(--stroke-strong); transition: background-color var(--dur-base) var(--ease-in-out);
}
.switch__track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--white); box-shadow: var(--shadow-xs); transition: transform var(--dur-base) var(--ease-in-out);
}
.switch[aria-pressed="true"] { color: var(--ink); }
.switch[aria-pressed="true"] .switch__track { background: var(--violet-700); }
.switch[aria-pressed="true"] .switch__track::after { transform: translateX(12px); }

.reveal-banner {
  width: min(100% - 48px, 1120px); margin: 4px auto 0; padding: 9px 16px;
  border: 1px solid var(--violet-300); border-radius: var(--radius-full); background: var(--violet-100);
  color: var(--violet-1000); font-size: 13px; text-align: center;
}

/* ======================================================================================
   Page
   ====================================================================================== */

.content { --content-w: 1120px; width: min(100% - 48px, var(--content-w)); min-height: calc(100vh - 140px); margin: 0 auto; padding: 16px 0 88px; }
.content:focus { outline: none; }
.enter > * { animation: enter 600ms var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 60ms); }


.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; padding: 36px 0 32px; }
.head__text { min-width: 0; max-width: 840px; }
.head__back {
  display: inline-flex; align-items: center; gap: 4px; margin: 0 0 16px -4px; padding: 4px 8px 4px 4px; border-radius: var(--radius-full);
  color: var(--fg-tertiary); text-decoration: none; font-size: 13.5px; font-weight: 500;
  transition: color var(--dur-fast) var(--ease-in-out), background-color var(--dur-fast) var(--ease-in-out);
}
.head__back:hover { color: var(--ink); background: var(--white); }
.head__title {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 4vw, 48px); line-height: 1.06;
  letter-spacing: -0.04em; color: var(--ink); text-wrap: balance; overflow-wrap: anywhere;
}
.head__lead { margin-top: 12px; font-size: 16px; line-height: 25px; color: var(--fg-secondary); }
.head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.section { margin-top: 48px; }
.section--narrow { width: min(100%, 760px); margin-left: auto; margin-right: auto; }
.section--tight { margin-top: 16px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section__title { font-size: 20px; line-height: 28px; font-weight: 650; letter-spacing: -0.025em; color: var(--ink); }
.section__sub { margin-top: 2px; font-size: 14px; color: var(--fg-tertiary); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid-2--wide { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

.footnote { margin-top: 28px; max-width: 720px; font-size: 13px; line-height: 20px; color: var(--fg-muted); }

/* ======================================================================================
   Accueil : titre, compositeur de dépôt, suivi de l'analyse, derniers rapports
   ====================================================================================== */

.hero {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: calc(100vh - 190px); padding: 2vh 0 4vh; text-align: center;
}
.hero__title {
  max-width: 900px; font-family: var(--font-sans); font-weight: 700; font-size: clamp(38px, 5.6vw, 66px); line-height: 1.02;
  letter-spacing: -0.045em; color: var(--ink); text-wrap: balance;
}
.hero__art {
  width: clamp(160px, min(30vw, 34vh), 340px); height: auto; margin-bottom: -18px;
  animation: float 7s var(--ease-in-out) infinite;
}
.trust { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: min(100%, 760px); margin-top: 16px; text-align: left; }
.trust__item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--stroke-weak); border-radius: 18px; background: rgba(255, 255, 255, 0.7); }
.trust__icon { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 10px; background: var(--violet-100); color: var(--violet-700); }
.trust__icon .icon { width: 15px; height: 15px; }
.trust__title { font-size: 13px; line-height: 18px; font-weight: 650; color: var(--ink); }
.trust__text { margin-top: 1px; font-size: 12px; line-height: 17px; color: var(--fg-tertiary); }
@media (max-width: 480px) { .trust { grid-template-columns: minmax(0, 1fr); } }

.composer {
  width: min(100%, 680px); margin-top: 24px; text-align: left;
  background: var(--white); border: 1px solid var(--stroke-subtle); border-radius: var(--radius-4xl); box-shadow: var(--shadow-float);
  transition: border-color var(--dur-fast) var(--ease-in-out), box-shadow var(--dur-base) var(--ease-in-out);
}
.composer.is-over { border-color: var(--violet-600); box-shadow: 0 0 0 5px var(--violet-ring), var(--shadow-float); }
.composer__drop {
  display: grid; place-items: center; gap: 10px; padding: 24px 24px 20px; border-radius: var(--radius-4xl) var(--radius-4xl) 0 0; cursor: pointer;
}
.composer__icon { position: relative; display: grid; place-items: center; width: 56px; height: 64px; }
.paper { display: block; width: 46px; height: 56px; overflow: visible; transition: transform var(--dur-slow) var(--ease-out); }
.paper__sheet { fill: var(--white); stroke: var(--stroke-strong); stroke-width: 1.3; transition: stroke var(--dur-fast) var(--ease-in-out); }
.paper__fold { fill: var(--bg-hover); stroke: var(--stroke-strong); stroke-width: 1.3; stroke-linejoin: round; }
.paper__line { fill: none; stroke: var(--stroke-subtle); stroke-width: 2.4; stroke-linecap: round; }
.composer__plus {
  position: absolute; right: -2px; bottom: -1px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); color: var(--white); box-shadow: 0 0 0 2.5px var(--white); transition: background-color var(--dur-fast) var(--ease-in-out);
}
.composer__plus .icon { width: 13px; height: 13px; stroke-width: 3; }
.composer__drop:hover .paper, .composer.is-over .paper { transform: translateY(-3px) rotate(-3deg); }
.composer__drop:hover .composer__plus, .composer.is-over .composer__plus { background: var(--violet-700); }
.composer.is-over .paper__sheet { stroke: var(--violet-600); }
.composer__hint { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); transition: color var(--dur-fast) var(--ease-in-out); }
.composer__drop:hover .composer__hint, .composer.is-over .composer__hint { color: var(--violet-700); }
.composer__file { display: flex; align-items: center; gap: 14px; padding: 22px 20px 18px 24px; }
.composer__file-text { flex: 1; min-width: 0; }
.composer__file-name { font-size: 15px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer__file-meta { font-size: 13px; color: var(--fg-tertiary); }
.composer__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 16px; border-top: 1px solid var(--stroke-weak); }
.composer__opts { display: flex; flex-wrap: wrap; gap: 6px; }


.run { width: min(100%, 680px); margin: 0 auto; padding: 8px; text-align: left; }
.run__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 14px 10px 16px; }
.run__head > div:first-child { min-width: 0; }
.run__title { font-size: 16px; line-height: 22px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run__sub { margin-top: 2px; font-size: 13.5px; color: var(--fg-tertiary); }
.run > .callout { margin: 4px 8px 8px; }

/* Suivi en ligne droite : pastilles reliées par un trait qui se remplit de violet. */
.track { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 14px 8px 6px; }
.track__step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; text-align: center; }
.track__step + .track__step::before, .track__step + .track__step::after {
  content: ""; position: absolute; z-index: 0; top: 11px; left: calc(-50% + 16px); right: calc(50% + 16px); height: 2px; border-radius: 2px;
}
.track__step + .track__step::before { background: var(--stroke-subtle); }
.track__step + .track__step::after { background: var(--violet-700); transform: scaleX(0); transform-origin: left; transition: transform 600ms var(--ease-out); }
.track__step.is-done + .track__step::after { transform: scaleX(1); }
.track__node {
  position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--stroke-subtle); background: var(--white); color: var(--white);
  transition: background-color var(--dur-base) var(--ease-in-out), border-color var(--dur-base) var(--ease-in-out), box-shadow var(--dur-base) var(--ease-in-out);
}
.track__node .icon { width: 12px; height: 12px; stroke-width: 3; animation: pop-in 300ms var(--ease-out); }
.track__node .spinner { width: 12px; height: 12px; }
.track__label { font-size: 12.5px; line-height: 16px; font-weight: 500; color: var(--fg-tertiary); white-space: nowrap; }
.track__step.is-done .track__node { background: var(--violet-700); border-color: var(--violet-700); }
.track__step.is-done .track__label { color: var(--ink); }
.track__step.is-current .track__node { border-color: var(--violet-300); box-shadow: 0 0 0 5px var(--violet-ring); }
.track__step.is-current .track__label { color: var(--violet-700); font-weight: 600; }
.track__step.is-error .track__node { background: var(--ink); border-color: var(--ink); }
.track__step.is-error .track__label { color: var(--ink); }
.track__step.is-skipped .track__node { border-style: dashed; }
.track__step.is-skipped .track__label { color: var(--fg-muted); }
.track__detail {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 10px; margin: 14px 8px 8px; padding: 12px 16px;
  border-radius: 18px; background: var(--canvas); text-align: center;
}
.track__what { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.track__msg { font-size: 13.5px; color: var(--fg-tertiary); overflow-wrap: anywhere; }
.track__detail .meter { flex-basis: 100%; margin-top: 8px; }
.track__count {
  min-width: 28px; padding: 1px 7px; border-radius: 999px; background: var(--violet-ring); color: var(--violet-700);
  font-size: 11.5px; line-height: 16px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: -4px;
}
.track__step.is-done .track__count { background: var(--canvas); color: var(--fg-tertiary); }
.track__questions { margin-top: -4px; font-size: 11px; line-height: 14px; color: var(--fg-tertiary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.track__ops { font-size: 13.5px; font-weight: 600; color: var(--violet-700); font-variant-numeric: tabular-nums; }


/* ======================================================================================
   Boutons, champs, étiquettes, états
   ====================================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--radius-full); background: none;
  font-size: 14px; font-weight: 500; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-in-out), border-color var(--dur-fast) var(--ease-in-out), color var(--dur-fast) var(--ease-in-out), transform var(--dur-fast) var(--ease-out);
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { cursor: not-allowed; }
.btn--primary { background: var(--violet-700); color: var(--white); }
.btn--primary:hover:not(:disabled) { background: var(--violet-800); }
.btn--primary:disabled { background: var(--violet-400); }
.btn--ink { background: var(--ink); color: var(--white); }
.btn--ink:hover { background: var(--ink-hover); }
.btn--secondary { background: var(--white); border-color: var(--stroke-subtle); color: var(--ink); }
.btn--secondary:hover { border-color: var(--stroke-strong); }
.btn--ghost { color: var(--fg-secondary); }
.btn--ghost:hover { background: var(--bg-hover); color: var(--ink); }
.btn--sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn--lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn--icon { width: 40px; padding: 0; }
.btn .icon { width: 16px; height: 16px; }
.btn > .icon:last-child:not(:first-child) { margin-right: -3px; }

.link-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none;
  font-size: 13.5px; font-weight: 500; color: var(--violet-700); text-decoration: none; white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-in-out);
}
.link-btn:hover { color: var(--violet-1000); }
.link-btn .icon { width: 14px; height: 14px; transition: transform var(--dur-base) var(--ease-out); }
.link-btn[aria-expanded="true"] .icon { transform: rotate(180deg); }
a.link-btn:hover .icon { transform: translateX(2px); }

.input, .select {
  height: 40px; padding: 0 14px; border: 1px solid var(--stroke-subtle); border-radius: 14px; background: var(--white);
  font-size: 14px; color: var(--ink); outline: none; min-width: 0;
  transition: border-color var(--dur-fast) var(--ease-in-out), box-shadow var(--dur-fast) var(--ease-in-out);
}
.input { width: 100%; }
.input::placeholder { color: var(--fg-muted); }
.input:focus, .select:focus-visible { border-color: var(--violet-600); box-shadow: 0 0 0 4px var(--violet-ring); outline: none; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; border-radius: var(--radius-full); cursor: pointer; max-width: 100%;
  background-image: url("../img/chevron.svg"); background-repeat: no-repeat; background-position: right 14px center;
}
/* Bouton d'une liste déroulante (js/select.js) : la plus longue option fixe la largeur, la choisie
   seule est visible ; trop long pour la place, le texte s'arrête sur des points de suspension. */
.select-btn {
  display: inline-grid; grid-template-columns: minmax(0, 1fr); align-items: center; text-align: left;
  font-weight: 450; line-height: 20px;
}
.select-btn:hover:not(:disabled) { border-color: var(--stroke-strong); }
.select-btn[aria-expanded="true"] { border-color: var(--violet-600); box-shadow: 0 0 0 4px var(--violet-ring); }
.select-btn:disabled { cursor: default; color: var(--fg-disabled); background-color: var(--bg-secondary); }
.select-btn__stack { display: grid; min-width: 0; }
.select-btn__value, .select-btn__ghost { grid-area: 1 / 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-btn__ghost { visibility: hidden; }

.search {
  display: flex; align-items: center; gap: 10px; width: min(100%, 360px); height: 42px; padding: 0 16px;
  border: 1px solid var(--stroke-subtle); border-radius: var(--radius-full); background: var(--white); color: var(--fg-muted);
  transition: border-color var(--dur-fast) var(--ease-in-out), box-shadow var(--dur-fast) var(--ease-in-out);
}
.search:focus-within { border-color: var(--violet-600); box-shadow: 0 0 0 4px var(--violet-ring); }
.search__input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font-size: 14.5px; color: var(--ink); }
.search__input::placeholder { color: var(--fg-muted); }
/* Croix d'effacement des champs de recherche : celle du navigateur, redessinée au trait de l'interface. */
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin: 0 0 0 6px; cursor: pointer;
  background-color: var(--fg-muted); -webkit-mask: url("../img/x.svg") center / 14px no-repeat; mask: url("../img/x.svg") center / 14px no-repeat;
  transition: background-color var(--dur-fast) var(--ease-in-out);
}
input[type="search"]::-webkit-search-cancel-button:hover { background-color: var(--fg-secondary); }

/* Remplissage automatique (mot de passe enregistré) : le fond bleu ou jaune du navigateur est
   recouvert par le blanc du champ, l'anneau de focus reste visible. */
.input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px var(--white) inset; box-shadow: 0 0 0 100px var(--white) inset; -webkit-text-fill-color: var(--ink); caret-color: var(--ink); }
.input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 100px var(--white) inset, 0 0 0 4px var(--violet-ring); box-shadow: 0 0 0 100px var(--white) inset, 0 0 0 4px var(--violet-ring); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .pills { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.toolbar .pills::-webkit-scrollbar { display: none; }

.tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--radius-full);
  background: var(--bg-hover); color: var(--fg-secondary); font-size: 12.5px; font-weight: 500; white-space: nowrap;
}
.tag--strong { background: var(--violet-700); color: var(--white); }
.tag--violet { background: var(--violet-200); color: var(--violet-800); }
.tag--dashed { background: transparent; border: 1px dashed var(--stroke-strong); color: var(--fg-tertiary); }

.flag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border: 1px dashed var(--stroke-strong); border-radius: var(--radius-full);
  font-size: 12px; font-weight: 500; color: var(--fg-tertiary); white-space: nowrap;
}

.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--fg-secondary); white-space: nowrap; }
.status__dot { position: relative; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.status--ready .status__dot { background: var(--violet-700); }
.status--progress .status__dot { background: var(--violet-600); }
.status--live .status__dot::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1.5px solid var(--violet-600); animation: ping 1.4s var(--ease-out) infinite; }
.status--waiting .status__dot { border: 1.5px solid var(--fg-muted); }

.spinner {
  display: block; width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--violet-200); border-top-color: var(--violet-700); animation: spin .7s linear infinite;
}

.kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border: 1px solid var(--stroke-subtle); border-radius: 6px; background: var(--white);
  color: var(--fg-tertiary); font-size: 11px; font-weight: 500; line-height: 1; white-space: nowrap;
}
.kbd-hints { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--fg-tertiary); }
.kbd-hints > span { display: inline-flex; gap: 4px; align-items: center; }

.meter { height: 4px; border-radius: var(--radius-full); background: var(--bg-active); overflow: hidden; }
.meter__fill {
  height: 100%; width: 100%; border-radius: inherit; background: var(--violet-700);
  transform: scaleX(var(--v, 0)); transform-origin: left; transition: transform 700ms var(--ease-out);
  animation: grow-x 900ms var(--ease-out) backwards;
}

/* Info-bulle d'un bouton (attribut data-tip) */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; z-index: 60; top: calc(100% + 8px); left: 50%;
  padding: 5px 9px; border-radius: 8px; background: var(--ink); color: var(--white);
  font-size: 12px; font-weight: 500; line-height: 16px; white-space: pre; pointer-events: none;
  opacity: 0; transform: translate(-50%, -2px); transition: opacity var(--dur-fast) var(--ease-in-out), transform var(--dur-fast) var(--ease-in-out);
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); transition-delay: 350ms; }

/* Infobulle d'un attribut title (js/hints.js), au même dessin que data-tip mais placée par script :
   jamais rognée par une carte, retournée au-dessus en bas d'écran, texte long sur plusieurs lignes. */
.hint {
  position: fixed; z-index: 90; top: 0; left: 0; max-width: min(320px, calc(100vw - 16px));
  padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--white);
  font-size: 12px; font-weight: 500; line-height: 16px; white-space: pre-line; overflow-wrap: anywhere; pointer-events: none;
  opacity: 0; transform: translateY(-2px); transition: opacity var(--dur-fast) var(--ease-in-out), transform var(--dur-fast) var(--ease-in-out);
}
.hint.is-above { transform: translateY(2px); }
.hint.is-on { opacity: 1; transform: none; }

/* ======================================================================================
   Cartes, chiffres clés, listes, encadrés, états vides
   ====================================================================================== */

.card {
  min-width: 0; overflow: hidden;
  background: var(--white); border: 1px solid var(--stroke-weak); border-radius: var(--radius-4xl); box-shadow: var(--shadow-soft);
}
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 0; }
.card__title { font-size: 16px; line-height: 22px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.card__sub { margin-top: 4px; font-size: 13.5px; line-height: 20px; color: var(--fg-tertiary); }
.card__body { padding: 18px 24px 24px; }
.card__foot { padding: 16px 24px; border-top: 1px solid var(--stroke-weak); }
.card--list { padding: 0; }
.card--table { overflow-x: auto; }

.kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  background: var(--white); border: 1px solid var(--stroke-weak); border-radius: var(--radius-4xl); box-shadow: var(--shadow-soft); overflow: hidden;
}
.kpi { position: relative; padding: 24px 28px 24px; min-width: 0; }
.kpi + .kpi::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 1px; background: var(--stroke-weak); }
.kpi__label { font-size: 13.5px; font-weight: 500; color: var(--fg-tertiary); }
.kpi__value {
  display: flex; align-items: baseline; gap: 6px; margin-top: 12px;
  font-family: var(--font-display); font-size: 52px; font-weight: 700; line-height: 1; letter-spacing: -0.045em; color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kpi__value small { font-family: var(--font-sans); font-size: 15px; font-weight: 500; letter-spacing: -0.01em; color: var(--fg-muted); }
.kpi .meter { margin-top: 18px; }
.kpi__note { margin-top: 12px; font-size: 13px; line-height: 19px; font-weight: 400; color: var(--fg-tertiary); }
/* Jambages (g, p) d'un libellé : de la place sous la ligne, sans décaler la mise en page. */
.kpi__value { padding-bottom: 0.12em; margin-bottom: -0.12em; }
/* Texte réduit à la taille minimale et toujours trop long (js/ui.js, fitText) : à la ligne, en entier. */
.kpi__value.is-wrapped { flex-wrap: wrap; white-space: normal; overflow-wrap: anywhere; line-height: 1.1; }

.notices { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.notices:first-child { margin-top: 0; margin-bottom: 16px; }

.list { display: flex; flex-direction: column; padding: 8px; }
.row-link {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 16px;
  padding: 12px 14px; border-radius: 20px; color: inherit; text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-in-out);
}
.row-link + .row-link::before { content: ""; position: absolute; top: 0; left: 70px; right: 16px; height: 1px; background: var(--stroke-weak); transition: opacity var(--dur-fast) var(--ease-in-out); }
.row-link:hover { background: var(--canvas); }
.row-link:hover::before, .row-link:hover + .row-link::before { opacity: 0; }
.row-link__text { display: flex; flex-direction: column; min-width: 0; }
.row-link__title { font-size: 15px; line-height: 22px; font-weight: 600; letter-spacing: -0.012em; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-link__sub { margin-top: 1px; font-size: 13px; line-height: 19px; font-weight: 400; color: var(--fg-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-link__end { display: flex; align-items: center; }
.row-link__chev { color: var(--fg-muted); transition: transform var(--dur-base) var(--ease-out), color var(--dur-fast) var(--ease-in-out); }
.row-link:hover .row-link__chev { color: var(--ink); transform: translateX(2px); }
.list.is-entering > * { animation: row-in 400ms var(--ease-out) backwards; animation-delay: calc(min(var(--i, 0), 20) * 30ms); }

.obj {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 14px;
  background: var(--violet-100); border: 1px solid var(--violet-200); color: var(--violet-700);
}
.obj .icon { width: 18px; height: 18px; stroke-width: 1.8; }
.obj--lg { width: 44px; height: 44px; border-radius: 15px; }
.obj--lg .icon { width: 20px; height: 20px; }
.obj--sm { width: 34px; height: 34px; border-radius: 12px; }
.obj--sm .icon { width: 16px; height: 16px; }

.score { display: inline-flex; align-items: baseline; gap: 2px; white-space: nowrap; }
.score b { font-family: var(--font-display); font-size: 28px; line-height: 1; font-weight: 700; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: lining-nums; }
.score[class*="tone-"] b { color: var(--t-ink); }
.score small { font-size: 12.5px; font-weight: 500; color: var(--fg-muted); }

.callout {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px;
  border: 1px solid var(--stroke-subtle); border-radius: 18px; background: var(--white);
  font-size: 13.5px; line-height: 20px; font-weight: 400; color: var(--fg-secondary);
}
.callout > .icon { margin-top: 2px; color: var(--fg-tertiary); }
.callout--violet { background: var(--violet-100); border-color: var(--violet-300); color: var(--violet-1000); }
.callout--violet > .icon { color: var(--violet-700); }

.empty { display: flex; flex-direction: column; align-items: center; padding: 80px 24px; text-align: center; }
.empty--sm { padding: 36px 20px; }
.empty__icon {
  display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 18px; border-radius: 20px;
  background: var(--violet-100); border: 1px solid var(--violet-200); color: var(--violet-700);
}
.empty__icon .icon { width: 24px; height: 24px; stroke-width: 1.7; }
.empty--sm .empty__icon { width: 40px; height: 40px; margin-bottom: 12px; border-radius: 13px; }
.empty--sm .empty__icon .icon { width: 22px; height: 22px; }
.empty__title { font-size: 20px; line-height: 28px; font-weight: 650; letter-spacing: -0.025em; color: var(--ink); }
.empty--sm .empty__title { font-size: 15px; line-height: 22px; font-weight: 600; letter-spacing: -0.012em; }
.empty__text { max-width: 440px; margin-top: 6px; font-size: 14.5px; line-height: 22px; color: var(--fg-tertiary); }
.empty .btn { margin-top: 22px; }
.empty-list { padding: 40px 16px; text-align: center; font-size: 14px; font-weight: 400; color: var(--fg-tertiary); }

.skeleton { display: flex; flex-direction: column; gap: 12px; padding-top: 40px; }
.skeleton i { position: relative; display: block; height: 14px; border-radius: 8px; background: var(--bg-active); overflow: hidden; opacity: .7; }
.skeleton i::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent); animation: shimmer 1.3s infinite; }
.skeleton .sk-title { width: 42%; height: 48px; border-radius: 14px; }
.skeleton .sk-line { width: 30%; }
.skeleton .sk-block { height: 148px; margin-top: 20px; border-radius: var(--radius-4xl); }
.skeleton .sk-row { height: 52px; border-radius: 18px; }

.collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-base) var(--ease-in-out); }
.collapse.is-open { grid-template-rows: 1fr; }
.collapse > div { overflow: hidden; min-height: 0; }

/* Jetons de pseudonymisation et noms réels */
.token {
  display: inline-block; padding: 0 6px; border: 1px solid var(--violet-300); border-radius: 6px; background: var(--violet-100);
  font-family: var(--font-mono); font-size: 0.8em; line-height: 1.55; color: var(--violet-800); white-space: nowrap; vertical-align: baseline;
}
.revealed { text-decoration: underline dotted var(--violet-600); text-underline-offset: 3px; }

/* ======================================================================================
   Tableau de bord : onglets, liste des 85 points, panneau d'un point
   ====================================================================================== */

.tabbar { display: flex; margin: 36px 0 20px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.tabbar::-webkit-scrollbar { display: none; }
.tabpanel { animation: fade-up 300ms var(--ease-out); }

.pills {
  position: relative; isolation: isolate; display: inline-flex; gap: 2px; padding: 4px; flex: none;
  background: var(--white); border: 1px solid var(--stroke-weak); border-radius: var(--radius-full); box-shadow: var(--shadow-xs);
}
.pills__thumb {
  position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: var(--radius-full); background: var(--ink);
  transition: translate 380ms var(--ease-drawer), width 380ms var(--ease-drawer), scale 240ms var(--lg-ease-spring);
}
.pills__thumb.no-anim { transition: none; }
.pills__btn {
  display: inline-flex; align-items: center; height: 36px; padding: 0 17px; border: 0; border-radius: var(--radius-full); background: none;
  font-size: 14px; font-weight: 500; color: var(--fg-secondary); white-space: nowrap; transition: color var(--dur-base) var(--ease-in-out);
}
.pills__btn:hover { color: var(--ink); }
.pills__btn[aria-selected="true"], .pills__btn[aria-selected="true"]:hover { color: var(--white); }
.pills--sm .pills__thumb { background: var(--bg-active); }
.pills--sm .pills__btn { height: 32px; padding: 0 13px; font-size: 13.5px; }
.pills--sm .pills__btn[aria-pressed="true"] { color: var(--ink); }
.pills__count { margin-left: 6px; font-size: 12px; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.pills__btn[aria-pressed="true"] .pills__count { color: var(--fg-secondary); }

.explorer { transition: margin-right var(--dur-slow) var(--ease-drawer); }
.point-list { padding: 6px; }
.group + .group { border-top: 1px solid var(--stroke-weak); }
.group__head {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 16px; align-items: center; gap: 10px;
  width: 100%; padding: 14px 14px; border: 0; border-radius: 18px; background: none; text-align: left;
  transition: background-color var(--dur-fast) var(--ease-in-out);
}
.group__head:hover { background: var(--canvas); }
.group__head > .icon { color: var(--fg-muted); transition: transform var(--dur-base) var(--ease-out); }
.group__head[aria-expanded="false"] > .icon { transform: rotate(-90deg); }
.group__num { font-size: 13px; font-weight: 600; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.group__title { font-size: 15px; font-weight: 600; letter-spacing: -0.012em; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group__count { font-size: 13px; color: var(--fg-tertiary); white-space: nowrap; }
.group__count.is-fix { color: var(--violet-700); font-weight: 600; }
.group__body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows var(--dur-base) var(--ease-in-out); }
.group__head[aria-expanded="false"] + .group__body { grid-template-rows: 0fr; }
.group__body > div { overflow: hidden; min-height: 0; padding-bottom: 6px; }
.group__head[aria-expanded="false"] + .group__body > div { padding-bottom: 0; }

.point-row {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  width: 100%; min-height: 46px; padding: 8px 14px; border: 0; border-radius: 14px; background: none; text-align: left;
  font-size: 14.5px; color: var(--fg-primary); transition: background-color var(--dur-fast) var(--ease-in-out), box-shadow var(--dur-fast) var(--ease-in-out);
}
.point-row:hover { background: var(--canvas); }
.point-row[aria-selected="true"] { background: var(--violet-100); box-shadow: inset 0 0 0 1px var(--violet-300); }
.point-row__num { font-size: 13px; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.point-row__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.point-row__end { display: flex; align-items: center; gap: 8px; }
.reviewed { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--violet-200); color: var(--violet-800); }
.reviewed .icon { width: 11px; height: 11px; stroke-width: 3; }
.point-list.is-entering .point-row { animation: row-in 300ms var(--ease-out) backwards; animation-delay: calc(min(var(--i, 0), 30) * 12ms); }

.sheet {
  --sheet-w: 480px;
  position: fixed; top: 80px; right: 12px; bottom: 12px; z-index: 50; width: min(var(--sheet-w), calc(100vw - 24px));
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--stroke-subtle); border-radius: var(--radius-4xl); box-shadow: var(--shadow-dialog);
  transform: translateX(calc(100% + 24px)); visibility: hidden;
  transition: transform var(--dur-slow) var(--ease-drawer), visibility 0s linear var(--dur-slow);
}
.sheet.is-open { transform: none; visibility: visible; transition: transform var(--dur-slow) var(--ease-drawer), visibility 0s; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 6px 24px; flex: none; }
.sheet__crumb { min-width: 0; font-size: 13px; font-weight: 500; color: var(--fg-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet__tools { display: flex; gap: 2px; }
.sheet__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.sheet__body { padding: 8px 24px 28px; }
.sheet__title { margin-bottom: 16px; font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.18; letter-spacing: -0.03em; color: var(--ink); text-wrap: balance; }
.sheet__source { margin-top: 10px; font-size: 13px; color: var(--fg-tertiary); }
.sheet__section { margin-top: 26px; }
.sheet__label { margin-bottom: 10px; font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: -0.005em; color: var(--ink); }
.sheet__form { display: flex; flex-direction: column; gap: 10px; padding: 16px 24px 20px; border-top: 1px solid var(--stroke-weak); flex: none; }
.sheet__form .sheet__label { margin-bottom: 0; }
.sheet__controls { display: flex; gap: 8px; }
.sheet__controls .select { flex: 1; }
.sheet__meta { font-size: 12.5px; color: var(--fg-tertiary); }

.kv { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px 14px; margin-top: 12px; font-size: 13.5px; line-height: 20px; }
.kv dt { color: var(--fg-tertiary); }
.kv dd { color: var(--ink); }

.proof { padding: 18px 18px 16px; border: 1px solid var(--stroke-weak); border-radius: 20px; background: var(--canvas); }
.proof + .proof { margin-top: 10px; }
.proof__text { font-family: var(--font-display); font-size: 15px; font-weight: 500; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.proof__text::before { content: "\00AB\00A0"; color: var(--fg-muted); }
.proof__text::after { content: "\00A0\00BB"; color: var(--fg-muted); }
.proof__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--fg-tertiary); }
.proof__meta .link-btn { margin-left: auto; font-size: 12.5px; }
.passage {
  margin-top: 12px; padding: 14px 16px; max-height: 320px; overflow: auto; border: 1px solid var(--stroke-weak); border-radius: 14px; background: var(--white);
  font-size: 13.5px; line-height: 21px; font-weight: 400; color: var(--fg-secondary); white-space: pre-wrap;
}
.passage mark { background: var(--violet-200); color: var(--ink); border-radius: 3px; padding: 1px 0; }

/* ======================================================================================
   Scénarios, recommandations, RETEX, fiche site
   ====================================================================================== */

.matrix-legend { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.matrix-legend span { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fg-tertiary); }
.matrix-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }


.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  padding: 16px 18px 10px; border-bottom: 1px solid var(--stroke-weak); text-align: left; white-space: nowrap;
  font-size: 12.5px; font-weight: 500; color: var(--fg-tertiary);
}
.table td { padding: 14px 18px; border-bottom: 1px solid var(--stroke-weak); vertical-align: top; color: var(--ink); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color var(--dur-fast) var(--ease-in-out); }
.table tbody tr:hover { background: var(--canvas); }
.table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.table .is-wrap { min-width: 280px; }
.table .sub { display: block; margin-top: 4px; font-size: 13px; line-height: 19px; font-weight: 400; color: var(--fg-tertiary); }
.ref { display: inline-block; margin-right: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted); }

.retex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.retex { display: flex; flex-direction: column; gap: 14px; padding: 24px; }
.retex .eyebrow { margin-bottom: 0; }
.retex__title { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.28; letter-spacing: -0.025em; color: var(--ink); text-wrap: balance; }
.retex__body { display: flex; flex-direction: column; gap: 12px; }
.retex__body dt { font-size: 12.5px; font-weight: 600; color: var(--fg-tertiary); }
.retex__body dd { margin-top: 3px; font-size: 14px; line-height: 21px; font-weight: 400; color: var(--fg-secondary); }
.retex .card__foot { margin: auto -24px -24px; }
.retex > div:has(> .collapse) .text { margin-top: 10px; }

/* ======================================================================================
   Document : Markdown d'origine et version pseudonymisée
   ====================================================================================== */

.entity-row { margin-top: 16px; }
.panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.pane .card__head { padding-bottom: 18px; }
.pane__body {
  margin: 0; padding: 18px 24px; height: 62vh; min-height: 360px; overflow: auto; border-top: 1px solid var(--stroke-weak);
  font-family: var(--font-mono); font-size: 12.5px; line-height: 20px; font-weight: 400; color: var(--ink);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.pane__body--hidden { display: flex; align-items: center; justify-content: center; background: var(--canvas); font-family: var(--font-sans); white-space: normal; }

/* ======================================================================================
   Graphiques : une teinte, barres arrondies, info-bulle à filet vertical
   ====================================================================================== */

.chart { display: block; width: 100%; height: auto; max-width: 440px; overflow: visible; }
.chart .axis { font-family: var(--font-sans); font-size: 12px; font-weight: 500; fill: var(--fg-tertiary); }
.chart .mark { transition: opacity var(--dur-fast) var(--ease-in-out); }
.chart.is-hovering .mark { opacity: .55; }
.chart.is-hovering .mark.is-hover { opacity: 1; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:focus-visible { outline: none; stroke: var(--violet-600); stroke-width: 1.5; }
.chart .matrix-id { font-family: var(--font-sans); font-size: 12px; font-weight: 600; fill: var(--ink); pointer-events: none; }
.chart .matrix-id.on-dark { fill: var(--white); }
.chart .matrix-arrow { stroke: var(--ink); stroke-width: 1.4; pointer-events: none; }
.chart .arrow-head { fill: var(--ink); }
.chart .cellm { transform-box: fill-box; transform-origin: center; animation: pop-in .4s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 25ms); }

.tip {
  position: fixed; z-index: 70; display: grid; grid-template-columns: 2px minmax(0, 1fr); gap: 0 10px;
  min-width: 150px; max-width: 320px; padding: 9px 13px 10px 11px; pointer-events: none;
  background: var(--white); border: 1px solid var(--stroke-subtle); border-radius: 14px; box-shadow: var(--shadow-popover);
  opacity: 0; transform: translateY(4px) scale(.98); transition: opacity var(--dur-fast) var(--ease-in-out), transform var(--dur-fast) var(--ease-in-out);
}
.tip.is-on { opacity: 1; transform: none; }
.tip__bar { grid-row: 1 / span 9; border-radius: 2px; background: var(--violet-700); }
.tip__title { font-size: 13px; font-weight: 600; color: var(--ink); }
.tip__row { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--fg-tertiary); white-space: nowrap; }
.tip__row b { padding: 1px 6px; border-radius: 6px; background: var(--bg-hover); color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.bars { display: flex; flex-direction: column; gap: 2px; }
.bars__row {
  display: grid; grid-template-columns: minmax(96px, 36%) minmax(0, 1fr) 56px; align-items: center; gap: 14px;
  width: calc(100% + 16px); height: 34px; margin: 0 -8px; padding: 0 8px; border: 0; border-radius: 12px;
  background: none; text-align: left; font-size: 13.5px; color: var(--fg-secondary); transition: background-color var(--dur-fast) var(--ease-in-out);
}
.bars__row:hover { background: var(--canvas); }
.bars__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars__track { height: 10px; }
.bars__fill {
  display: block; height: 100%; width: calc(var(--w, 0) * 100%); min-width: 3px; border-radius: var(--radius-full);
  transform-origin: left; animation: grow-x .7s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 60ms);
  transition: opacity var(--dur-fast) var(--ease-in-out);
}
.bars__fill.s1 { background: var(--violet-700); }
.bars__fill.s0 { background: var(--violet-400); }
.bars__value { text-align: right; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bars.is-hovering .bars__row:not(.is-hover) .bars__fill { opacity: .45; }

/* ======================================================================================
   Menu déroulant, palette de commandes, notifications
   ====================================================================================== */

.menu {
  position: fixed; z-index: 75; min-width: 240px; max-width: 340px; max-height: min(380px, 60vh); overflow-y: auto; padding: 6px;
  background: var(--white); border: 1px solid var(--stroke-subtle); border-radius: 20px; box-shadow: var(--shadow-popover);
  animation: menu-in var(--dur-fast) var(--ease-out);
}
.menu.is-closing { animation: menu-out 120ms var(--ease-in-out) forwards; }
.menu__item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 7px 10px; border: 0; border-radius: 14px;
  background: none; text-align: left; font-size: 14px; color: var(--ink); transition: background-color var(--dur-instant) var(--ease-in-out);
}
.menu__item:hover, .menu__item:focus-visible { outline: none; background: var(--bg-hover); }
.menu__item > .icon { color: var(--fg-tertiary); }
.menu__label { display: flex; flex-direction: column; min-width: 0; }
.menu__sub { font-size: 12.5px; color: var(--fg-tertiary); }
.menu__meta { margin-left: auto; padding-left: 8px; font-size: 12px; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.menu__check { margin-left: 4px; color: var(--violet-700) !important; }
.menu__sep { height: 1px; margin: 4px -6px; background: var(--stroke-weak); }

.overlay {
  position: fixed; inset: 0; z-index: 80; display: flex; justify-content: center; align-items: flex-start;
  padding: 14vh 16px 16px; background: var(--overlay);
  animation: fade-in var(--dur-fast) var(--ease-out);
}
.overlay.is-closing { animation: fade-out var(--dur-fast) var(--ease-in-out) forwards; }
.cmdk {
  width: 100%; max-width: 640px; overflow: hidden;
  background: var(--white); border: 1px solid var(--stroke-subtle); border-radius: 24px; box-shadow: var(--shadow-dialog);
  animation: dialog-in 200ms var(--ease-out);
}
.overlay.is-closing .cmdk { animation: dialog-out var(--dur-fast) var(--ease-in-out) forwards; }
.cmdk__input { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--stroke-weak); }
.cmdk__input > .icon { width: 18px; height: 18px; color: var(--fg-muted); }
.cmdk__input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font-size: 16px; font-weight: 500; }
.cmdk__input input::placeholder { color: var(--fg-muted); }
.cmdk__list { max-height: min(440px, 56vh); overflow: auto; padding: 8px; scroll-padding: 8px; }
.cmdk__group { padding: 10px 12px 6px; font-size: 12px; font-weight: 500; color: var(--fg-tertiary); }
.cmdk__item {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 42px; padding: 0 12px;
  border: 0; border-radius: 14px; background: none; text-align: left; font-size: 14px; color: var(--ink);
}
.cmdk__item > .icon { color: var(--fg-tertiary); }
.cmdk__item > .obj { width: 24px; height: 24px; border-radius: 8px; }
.cmdk__item > .obj .icon { width: 13px; height: 13px; }
.cmdk__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk__sub { margin-left: auto; padding-left: 12px; font-size: 12.5px; color: var(--fg-tertiary); white-space: nowrap; }
.cmdk__item[aria-selected="true"] { background: var(--bg-hover); }
.cmdk__foot { display: flex; align-items: center; gap: 16px; height: 42px; padding: 0 20px; border-top: 1px solid var(--stroke-weak); background: var(--bg-secondary); }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(400px, calc(100vw - 40px)); padding: 12px 18px 12px 14px;
  background: var(--ink); border-radius: 18px; box-shadow: var(--shadow-popover);
  color: var(--white); font-size: 13.5px; pointer-events: auto; cursor: default;
  animation: toast-in var(--dur-slow) var(--ease-drawer);
}
.toast .icon { width: 16px; height: 16px; flex: none; }
.toast--ready .icon { color: var(--violet-500); }
.toast--progress .icon { color: var(--violet-500); }
.toast--waiting .icon { color: var(--fg-muted); }
.toast.is-leaving { animation: toast-out 200ms var(--ease-in-out) forwards; }

/* ======================================================================================
   Couleurs de statut : chaque .tone-x pose trois variables (trait, fond pâle, encre).
   Le violet porte les écarts ; rouge pour l'urgence, vert pour la conformité, gris sinon.
   ====================================================================================== */

.tone-red { --t: var(--st-red); --t-bg: var(--st-red-bg); --t-ink: var(--st-red-ink); }
.tone-green { --t: var(--st-green); --t-bg: var(--st-green-bg); --t-ink: var(--st-green-ink); }
.tone-violet { --t: var(--violet-700); --t-bg: var(--violet-200); --t-ink: var(--violet-800); }
.tone-lilac { --t: var(--violet-500); --t-bg: var(--violet-100); --t-ink: var(--violet-900); }
.tone-gray { --t: var(--st-gray); --t-bg: var(--st-gray-bg); --t-ink: var(--st-gray-ink); }
.tone-slate { --t: var(--fg-muted); --t-bg: var(--bg-hover); --t-ink: var(--fg-secondary); }
.tone-mist { --t: var(--stroke-strong); --t-bg: var(--bg-secondary); --t-ink: var(--fg-tertiary); }

/* Étiquette d'avis */
.vtag {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px 0 9px; border-radius: var(--radius-full);
  background: var(--t-bg); color: var(--t-ink); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.vtag__dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--t); }
.tone-gray .vtag__dot { background: transparent; border: 1.5px dashed var(--t); }
.tone-mist .vtag__dot { background: transparent; border: 1.5px solid var(--t); }

/* Puces (lieu, date, type de barrière, point ciblé) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 3px 10px; border-radius: var(--radius-full);
  background: var(--t-bg, var(--bg-hover)); color: var(--t-ink, var(--fg-secondary)); font-size: 12.5px; font-weight: 550; line-height: 18px;
  text-decoration: none;
}
.chip .icon { width: 13px; height: 13px; margin-left: -1px; }
.chip--link { background: var(--violet-100); color: var(--violet-800); transition: background-color var(--dur-fast) var(--ease-in-out); }
.chip--link:hover { background: var(--violet-200); }
.chip--ref { font-family: var(--font-mono); font-weight: 500; }
.chip--soft { background: var(--canvas); border: 1px solid var(--stroke-weak); border-radius: 10px; color: var(--ink); font-weight: 500; padding: 5px 10px; line-height: 18px; }

/* ======================================================================================
   85 points : répartition cliquable, filtres par avis, lignes colorées
   ====================================================================================== */

.overview { margin-bottom: 20px; }
.overview__card { padding: 20px 22px; }
.overview__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }

.dist { display: flex; gap: 3px; height: 34px; margin-top: 16px; }
.dist__seg {
  flex: var(--w) 1 0; min-width: 8px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px;
  background: var(--t); color: var(--white); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: opacity var(--dur-base) var(--ease-in-out), transform var(--dur-fast) var(--ease-out);
}
.dist__seg.tone-lilac, .dist__seg.tone-mist { color: var(--t-ink); }
.dist__seg.tone-gray { background: var(--st-gray-bg); color: var(--t-ink); box-shadow: inset 0 0 0 1.5px var(--st-gray); }
.dist__seg:hover { transform: translateY(-2px); }
.dist__seg.is-dim { opacity: .28; }
.dist.is-animated .dist__seg { transform-origin: left; animation: grow-x 700ms var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 70ms); }

.vchips { display: flex; flex-wrap: wrap; gap: 2px 4px; margin-top: 10px; }
.vchip {
  display: inline-flex; align-items: baseline; gap: 5px; height: 24px; padding: 0 8px; border: 0; border-radius: var(--radius-full);
  background: transparent; font-size: 12px; font-weight: 500; line-height: 24px; color: var(--fg-secondary);
  transition: background-color var(--dur-fast) var(--ease-in-out), color var(--dur-fast) var(--ease-in-out);
}
.vchip:hover:not(:disabled) { background: var(--bg-hover); color: var(--ink); }
.vchip:disabled { opacity: .4; cursor: default; }
.vchip__count { font-weight: 700; color: var(--t-ink); font-variant-numeric: tabular-nums; }
.vchip[aria-pressed="true"] { background: var(--t-bg); color: var(--t-ink); }

.toolbar--points { margin-top: 4px; }
.point-row { position: relative; }
.point-row::before { content: ""; position: absolute; left: 4px; top: 11px; bottom: 11px; width: 3px; border-radius: 3px; background: var(--t); }
.point-row.tone-gray::before { background: transparent; border-left: 2px dashed var(--st-gray); }
.group__count.is-fix { padding: 2px 10px; border-radius: var(--radius-full); background: var(--violet-200); color: var(--violet-800); }

/* Bandeau d'avis en tête du panneau */
.verdict-banner { margin-bottom: 16px; padding: 14px 16px; border-radius: 18px; background: var(--t-bg); color: var(--t-ink); }
.verdict-banner__top { display: flex; align-items: center; gap: 9px; }
.verdict-banner .vtag__dot { width: 12px; height: 12px; }
.verdict-banner__label { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.verdict-banner__text { margin-top: 4px; font-size: 13.5px; line-height: 20px; opacity: .9; }

/* Chemin de décision : étapes reliées */
.dpath { position: relative; display: flex; flex-direction: column; gap: 6px; }
.dpath li { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px 12px 8px 26px; border-radius: 12px; background: var(--canvas); font-size: 13.5px; }
.dpath li::before { content: ""; position: absolute; left: 11px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--violet-600); }
.dpath li + li::after { content: ""; position: absolute; left: 14px; top: -10px; height: 14px; width: 2px; background: var(--violet-300); }
.dpath__q { color: var(--fg-tertiary); font-size: 12.5px; }
.dpath__a { font-weight: 600; color: var(--ink); }
.dpath__end { background: var(--white) !important; box-shadow: inset 0 0 0 1px var(--stroke-weak); }

/* ======================================================================================
   Scénarios : bento, les deux scénarios à gauche, la criticité à droite
   ====================================================================================== */

.scn-bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(260px, 0.9fr); gap: 14px; align-items: stretch; }
.scn-bento__cards { display: contents; }
.scn-bento__side { display: flex; }
.scn-bento__side > .card { flex: 1; }
.scn-matrix { padding: 20px 22px; background: var(--violet-100); border-color: var(--violet-200); }
.scn-matrix__head { margin-bottom: 14px; }
.scn-matrix .chart { max-width: 100%; }
.scn-matrix .matrix-legend { flex-direction: row; flex-wrap: wrap; gap: 6px 12px; margin-top: 14px; padding-top: 0; }

.scn { padding: 18px 20px 14px; }
.scn__head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 12px; }
.scn__period { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 9px; border-radius: var(--radius-full);
  background: var(--violet-700); color: var(--white); font-size: 12.5px; font-weight: 700;
}
.scn.is-night .scn__period { background: var(--violet-1000); }
.scn__period small { display: none; }
.scn__period .icon { width: 14px; height: 14px; }
.scn__title { font-size: 16px; line-height: 21px; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); overflow-wrap: anywhere; }
.scn__start { grid-column: 1 / -1; font-size: 12.5px; line-height: 18px; color: var(--fg-tertiary); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

.scn__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.stat { min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--canvas); }
.stat dt { font-size: 12px; color: var(--fg-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat dd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 4px; font-size: 14.5px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat dd > .icon { width: 13px; height: 13px; color: var(--fg-muted); }
.stat__after { color: var(--violet-700); }
.lvl-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--radius-full); font-size: 12.5px; font-weight: 700; letter-spacing: 0; white-space: nowrap; }
.lvl-0 { background: var(--violet-100); color: var(--violet-800); }
.lvl-1 { background: var(--violet-300); color: var(--violet-1000); }
.lvl-2 { background: var(--violet-600); color: var(--white); }
.lvl-3 { background: var(--violet-1000); color: var(--white); }

.scn__more { margin-top: 12px; }
.scn__more .row { gap: 6px 16px; }
.scn__more .collapse > div > * { margin-top: 12px; }
.tl { position: relative; display: flex; flex-direction: column; }
.tl__step { --c: color-mix(in srgb, var(--violet-1000) calc(var(--k, 0) * 100%), var(--violet-400)); position: relative; display: grid; grid-template-columns: 66px 12px minmax(0, 1fr); gap: 10px; padding-bottom: 10px; }
.tl__step:not(:last-child)::after { content: ""; position: absolute; left: 81px; top: 14px; bottom: -2px; width: 2px; background: var(--violet-200); }
.tl__time { justify-self: start; height: 20px; padding: 0 8px; border-radius: var(--radius-full); background: var(--violet-100); font-size: 11.5px; line-height: 20px; font-weight: 700; color: var(--violet-800); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tl__dot { z-index: 1; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--white); }
.tl__text { font-size: 13px; line-height: 19px; color: var(--fg-secondary); }

/* ======================================================================================
   Recommandations : synthèse, cartes, pastilles d'effet
   ====================================================================================== */

.reco-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr); gap: 12px; }
.sum { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--stroke-weak); border-radius: 20px; background: var(--white); box-shadow: var(--shadow-soft); }
.sum .obj { width: 36px; height: 36px; border-radius: 12px; }
.sum__value { font-size: 24px; line-height: 28px; font-weight: 700; letter-spacing: -0.04em; color: var(--ink); }
.sum__label { font-size: 12.5px; color: var(--fg-tertiary); }
.sum--split { flex-direction: column; align-items: stretch; gap: 8px; }
.split { display: flex; gap: 3px; height: 10px; }
.split__seg { flex: var(--w) 1 0; border-radius: var(--radius-full); background: var(--t); }
.split__legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--fg-secondary); }
.split__legend span { display: inline-flex; align-items: center; gap: 6px; }
.split__legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--t); }

.reco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.reco { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; }
.reco--alt { border-color: var(--violet-200); background: linear-gradient(180deg, var(--violet-100), var(--white) 110px); }
.reco__title { font-size: 14.5px; line-height: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.clamp { font-size: 13.5px; line-height: 20px; font-weight: 400; color: var(--fg-secondary); overflow-wrap: anywhere; }
.clamp.is-clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.clamp-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.effects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; margin-top: auto; padding: 10px 12px; border-radius: 14px; background: var(--canvas); }
.eff__name { display: block; font-size: 11.5px; color: var(--fg-tertiary); }
.eff__row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 14px; height: 7px; border-radius: var(--radius-full); background: var(--bg-active); }
.pips i.is-on { background: var(--violet-700); }
.eff__value { font-size: 12.5px; font-weight: 600; color: var(--violet-800); white-space: nowrap; }
.reco__foot .collapse .stack { gap: 8px; margin-top: 8px; }
.reco__foot .text b { color: var(--ink); font-weight: 600; }

/* ======================================================================================
   RETEX : numéro, puces, deux blocs
   ====================================================================================== */

.retex-grid { gap: 12px; }
.retex { gap: 12px; padding: 20px; }
.retex .card__foot { margin: auto -20px -20px; }
.retex__top { display: flex; align-items: flex-start; gap: 10px; }
.retex__num {
  display: inline-flex; align-items: center; flex: none; height: 26px; padding: 0 11px; border-radius: var(--radius-full);
  background: var(--violet-700); color: var(--white); font-size: 12.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.retex__theme { flex: 1; min-width: 0; padding-top: 4px; font-size: 12.5px; line-height: 18px; font-weight: 600; color: var(--violet-700); }
.retex__sector { font-size: 12.5px; line-height: 18px; color: var(--fg-tertiary); }
.retex__blocks { display: flex; flex-direction: column; gap: 8px; }
.rblock { padding: 12px 14px; border-radius: 16px; background: var(--canvas); }
.rblock--key { background: var(--violet-100); }
.rblock__head { margin-bottom: 4px; font-size: 12.5px; font-weight: 700; color: var(--fg-secondary); }
.rblock--key .rblock__head { color: var(--violet-700); }
.rblock p { font-size: 13.5px; line-height: 20px; color: var(--ink); }

/* ======================================================================================
   Fiche site : complétude, tuiles de faits, inventaire en puces
   ====================================================================================== */

.profile-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding: 18px 22px; }
.profile-head__meter { width: min(100%, 260px); }
.profile-head__value { display: block; margin-bottom: 8px; font-size: 28px; line-height: 1; font-weight: 700; letter-spacing: -0.045em; color: var(--ink); }
.profile-head__value small { margin-left: 4px; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--fg-tertiary); }
.fact-group { margin: 18px 0 10px; font-size: 14.5px; font-weight: 650; letter-spacing: -0.015em; color: var(--ink); }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.fact { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--stroke-weak); border-radius: 16px; background: var(--white); }
.fact__text { min-width: 0; }
.fact dt { font-size: 12px; color: var(--fg-tertiary); }
.fact dd { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 1px; font-size: 13.5px; line-height: 19px; font-weight: 550; color: var(--ink); overflow-wrap: anywhere; }
.fact.is-missing { border-style: dashed; background: transparent; }
.fact.is-missing .obj { background: var(--bg-hover); border-color: var(--stroke-weak); color: var(--fg-muted); }
.fact.is-missing dd { font-weight: 400; color: var(--fg-muted); }
.plist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.plist { padding: 16px 18px 18px; }
.plist__title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; font-weight: 650; color: var(--ink); }
.plist__title .icon { width: 16px; height: 16px; color: var(--violet-700); }
.plist__count { margin-left: auto; min-width: 24px; height: 22px; padding: 0 8px; display: grid; place-items: center; border-radius: var(--radius-full); background: var(--violet-100); color: var(--violet-800); font-size: 12px; font-weight: 700; }

/* Recherche assistée de la fiche site */
.ask { margin-bottom: 14px; }
.ask__bar {
  display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 6px 0 20px;
  border: 1px solid var(--violet-300); border-radius: var(--radius-full); background: var(--white); box-shadow: var(--shadow-soft);
  transition: border-color var(--dur-fast) var(--ease-in-out), box-shadow var(--dur-fast) var(--ease-in-out);
}
.ask__bar:focus-within { border-color: var(--violet-600); box-shadow: 0 0 0 4px var(--violet-ring); }
.ask__input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font-size: 14.5px; color: var(--ink); }
.ask__input::placeholder { color: var(--fg-muted); }
.ask__mic, .ask__send { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; transition: background-color var(--dur-fast) var(--ease-in-out); }
.ask__mic { background: transparent; color: var(--fg-secondary); }
.ask__mic:hover { background: var(--bg-hover); color: var(--ink); }
.ask__mic[aria-pressed="true"] { background: var(--st-red-bg); color: var(--st-red-ink); animation: ping-soft 1.4s var(--ease-out) infinite; }
.ask__send { background: var(--violet-700); color: var(--white); }
.ask__send:hover:not(:disabled) { background: var(--violet-800); }
.ask__send:disabled { background: var(--violet-400); }
.ask__card { margin-top: 10px; padding: 16px 18px; border: 1px solid var(--violet-200); border-radius: 20px; background: var(--violet-100); }
.ask__card.is-loading { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--fg-secondary); }
.ask__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; }
.ask__meta { font-size: 12px; color: var(--fg-tertiary); }
.ask__answer { font-size: 15px; line-height: 23px; font-weight: 500; color: var(--ink); }
.ask__card .link-btn { margin-top: 10px; }
.ask__terms { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 10px; }
.ask__term { padding: 1px 8px; border-radius: var(--radius-full); background: var(--white); font-size: 12px; color: var(--violet-800); }
.ask__passages { margin-top: 10px; gap: 8px; }
.ask__passage { padding: 10px 12px; border-radius: 14px; background: var(--white); }
.ask__passage p { margin-top: 2px; font-size: 13px; line-height: 19px; color: var(--fg-secondary); }
@keyframes ping-soft { 50% { box-shadow: 0 0 0 5px var(--st-red-bg); } }

/* Interrupteurs d'options sur l'accueil (même geste que « Noms réels ») */
.switch--opt { height: 34px; font-size: 13.5px; }
.switch--opt:disabled { opacity: .45; cursor: not-allowed; }
.switch[aria-checked="true"] { color: var(--ink); border-color: var(--violet-300); background: var(--violet-100); }
.switch[aria-checked="true"] .switch__track { background: var(--violet-700); }
.switch[aria-checked="true"] .switch__track::after { transform: translateX(12px); }

@media (max-width: 1000px) {
  .scn-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scn-bento__side { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .scn-bento { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 880px) {
  .reco-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sum--split { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .reco-sum { grid-template-columns: minmax(0, 1fr); }
  .effects { grid-template-columns: minmax(0, 1fr); }
  .reco-grid, .plist-grid, .facts-grid { grid-template-columns: minmax(0, 1fr); }
  .tl__step { grid-template-columns: 52px 12px minmax(0, 1fr); }
  .tl__step:not(:last-child)::after { left: 67px; }
  .dist { height: 30px; }
}

/* ======================================================================================
   Animations
   ====================================================================================== */

@keyframes enter { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } }
@keyframes row-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.8); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes menu-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
@keyframes menu-out { to { opacity: 0; transform: scale(.98); } }
@keyframes dialog-in { from { opacity: 0; transform: scale(.97) translateY(-6px); } }
@keyframes dialog-out { to { opacity: 0; transform: scale(.97); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes grid-drift { to { background-position: center 72px; } }
@keyframes glow-drift { from { transform: translate3d(-3%, 0, 0) scale(1); } to { transform: translate3d(3%, -2vh, 0) scale(1.04); } }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 80%, 100% { transform: scale(1.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .spinner { animation: spin 1.6s linear infinite !important; }
}

/* ======================================================================================
   Écrans larges et étroits
   ====================================================================================== */

/* Panneau ouvert : la liste se décale juste assez pour rester lisible à côté. */
@media (min-width: 1101px) {
  body.has-sheet .explorer { margin-right: max(0px, calc(504px - (100vw - min(100vw - 48px, 1120px)) / 2)); }
}

@media (max-width: 1100px) {
  .sheet { top: auto; left: 8px; right: 8px; width: auto; height: min(80vh, 760px); transform: translateY(calc(100% + 24px)); }
  .sheet.is-open { transform: none; }
}

@media (max-width: 880px) {
  .nav__inner { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 60px auto; height: auto; row-gap: 0; padding-bottom: 10px; }
  .nav__tabs { grid-column: 1 / -1; grid-row: 2; justify-self: center; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .switch__label { display: none; }
  .switch { padding: 0 9px; }
  .sheet { top: auto; }
  .grid-2, .grid-2--wide, .panes { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 6vh; }
}

@media (max-width: 560px) {
  .nav__inner, .content, .reveal-banner { width: calc(100% - 32px); }
  .nav__tabs { justify-self: stretch; justify-content: space-between; }
  .nav__link { padding: 0 11px; font-size: 13.5px; }
  .head { padding: 24px 0 24px; }
  .head__title { font-size: 38px; }
  .hero__title { font-size: 38px; }
  .hero { min-height: 0; padding-top: 5vh; }
  .track { grid-template-columns: minmax(0, 1fr); row-gap: 14px; padding: 8px 12px 4px; }
  .track__step { flex-direction: row; gap: 12px; text-align: left; }
  .track__step + .track__step::before, .track__step + .track__step::after { top: -14px; left: 11px; right: auto; width: 2px; height: 14px; }
  .track__step + .track__step::after { transform: scaleY(0); transform-origin: top; }
  .track__step.is-done + .track__step::after { transform: scaleY(1); }
  .track__label { font-size: 13.5px; }
  .track__detail { justify-content: flex-start; text-align: left; }
  .composer__bar { flex-direction: column; align-items: stretch; }
  .composer__bar .btn { width: 100%; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi { padding: 16px 14px; }
  .kpi + .kpi::before { top: 16px; bottom: 16px; }
  .kpi__label { font-size: 12px; line-height: 16px; min-height: 32px; }
  .kpi__value { margin-top: 6px; font-size: 38px; }
  .kpi__value small { font-size: 12px; }
  .kpi .meter { margin-top: 12px; }
  .kpi__note { display: none; }
  .row-link { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; }
  .row-link__chev { display: none; }
  .search { width: 100%; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .point-row { grid-template-columns: 28px minmax(0, 1fr); }
  .point-row__end { grid-column: 2; }
}

/* ======================================================================================
   Encadré développeur (page Mesures) : modèles, appels, tokens et coûts
   ====================================================================================== */

.dev {
  display: grid; gap: 16px; margin-top: 28px; padding: 24px;
  background: var(--violet-100); border: 1px solid var(--violet-300); border-radius: var(--radius-4xl);
}
.dev__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dev__eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--violet-700); }
.dev__title { margin-top: 4px; font-size: 16px; line-height: 22px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.dev__lead, .dev__label { margin-top: 4px; font-size: 13.5px; line-height: 20px; color: var(--fg-tertiary); }
.dev__total { text-align: right; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.04em; font-size: 36px; line-height: 1; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.dev__total small { display: block; margin-top: 6px; font-family: var(--font-sans); font-size: 13px; line-height: 18px; color: var(--fg-tertiary); }
.dev__config { display: flex; flex-wrap: wrap; gap: 8px; }
.dev__sub { margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--fg-muted); }
.dev .card { box-shadow: none; }
@media (max-width: 640px) { .dev { padding: 18px 16px; } .dev__total { text-align: left; } }
