/* TOBY Software : habillage des outils du Labo sur le design system « Ingénierie ».
   Les outils gardent leur balisage et leurs scripts : cette feuille traduit leurs anciennes
   classes et variables (charte v1.1) vers les tokens du design system. Chargée après
   tokens.css, system.css et site.css. Ne pas y ajouter de valeur en dur : passer par les tokens. */

/* ---------- Anciennes variables → tokens (recalculées dans chaque thème) ---------- */
:root, [data-theme] {
  --paper: var(--text-strong);
  --ink: var(--bg);
  --carbon: var(--surface);
  --graphite: var(--border);
  --line: var(--border);
  --fog: var(--text-muted);
  --chalk: var(--surface-hover);
  --error: var(--danger);
  --display: var(--font-sans);
  --body: var(--font-sans);
  --mono: var(--font-mono);
  --ease: cubic-bezier(.2, 0, 0, 1);
  --cut: var(--bg);
}
[data-theme="light"], :root { --acc-rgb: 217, 56, 30; --warning-soft: rgba(138, 88, 0, .1); --danger-soft: rgba(179, 18, 58, .08); --success-soft: rgba(29, 112, 72, .1); }
[data-theme="dark"] { --acc-rgb: 255, 92, 58; --warning-soft: rgba(233, 176, 76, .14); --danger-soft: rgba(255, 122, 149, .12); --success-soft: rgba(86, 197, 143, .14); }

/* ---------- Typographie des pages outils ---------- */
:where(body.tool main) :where(h1, h2, h3) { margin: 0; color: var(--text-strong); font-family: var(--font-sans); font-weight: 600; text-wrap: balance; }
:where(body.tool main) h1 { font-size: clamp(36px, 6vw, 72px); line-height: 1; letter-spacing: -.04em; font-variation-settings: "wdth" 90; }
:where(body.tool main) h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.12; letter-spacing: -.025em; }
:where(body.tool main) h3 { font-size: 21px; line-height: 1.25; letter-spacing: -.012em; }
:where(body.tool main) p { margin: 0; max-width: var(--measure); color: var(--text); text-wrap: pretty; }
:where(body.tool main) a { color: var(--text-strong); text-underline-offset: 3px; }
.eyebrow { display: flex; align-items: center; gap: var(--space-3); margin: 0; font-family: var(--font-mono); font-weight: 500; font-size: 12px; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; color: var(--text-strong); }
.eyebrow::before { content: ""; flex: none; width: var(--mark); height: var(--mark); background: var(--accent); }
.lede { font-size: clamp(19px, 1.8vw, 22px); line-height: 1.45; letter-spacing: -.01em; color: var(--text-strong) !important; }
.cap { font-family: var(--font-mono); font-size: 12px; line-height: 1.4; letter-spacing: .02em; color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.opt { font-weight: 400; color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.todo { padding: 0 .3em; border-radius: var(--radius-sm); background: var(--warning-soft); color: var(--warning); font-family: var(--font-mono); font-size: .9em; }

/* ---------- Boutons et liens ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--control-lg); padding: 0 var(--space-5);
  background: var(--accent); color: var(--on-accent) !important;
  border: var(--stroke-1) solid transparent; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-weight: 500; font-size: 15px; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .18s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--surface-hover); border-color: var(--border); color: var(--text-muted) !important; cursor: not-allowed; }
.btn:focus-visible, .btn-ghost:focus-visible, .link-arrow:focus-visible { outline: var(--stroke-2) solid var(--accent); outline-offset: 2px; }
.btn-ghost:hover { background: var(--surface-hover); }
.link-arrow {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--control-md); padding: 0; background: none; border: 0; cursor: pointer;
  color: var(--text-strong); font-family: var(--font-sans); font-weight: 500; font-size: 15px;
  text-decoration: underline; text-decoration-thickness: var(--stroke-1); text-underline-offset: 5px; text-decoration-color: var(--border-control);
}
.link-arrow::after { content: "→"; text-decoration: none; display: inline-block; transition: transform .18s ease; }
.link-arrow:hover { text-decoration-color: var(--text-strong); }
.link-arrow:hover::after { transform: translateX(var(--space-1)); }
.link-back::after { content: none; }
.link-back::before { content: "←"; }

/* ---------- Champs ---------- */
.field { display: grid; align-content: start; gap: var(--space-2); min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label:not(.check), .field legend { padding: 0; font-family: var(--font-sans); font-weight: 500; font-size: 14px; line-height: 1.3; color: var(--text-strong); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="url"], .field input[type="password"], .field input[type="search"], .field textarea {
  width: 100%; min-height: var(--control-lg); padding: 11px 12px;
  background: var(--bg); color: var(--text-strong);
  border: 1px solid var(--border-control); border-radius: var(--radius-sm);
  font: 16px/1.4 var(--font-sans); -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); opacity: 1; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--text-muted); }
.field textarea:focus { border-color: var(--text-strong); outline: var(--stroke-2) solid var(--accent); outline-offset: 2px; }
.field [aria-invalid="true"] { border-color: var(--danger) !important; box-shadow: inset 0 0 0 1px var(--danger) !important; }
.err { font-size: 13px; color: var(--danger); }
.err:empty { display: none; }
.form-status { font-size: 14px; color: var(--danger); }
.form-status:empty { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chips label { position: relative; }
.chips input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chips span {
  display: inline-flex; align-items: center; min-height: var(--control-md); padding: 0 var(--space-4);
  background: var(--surface); border: 1px solid var(--border-control); border-radius: var(--radius-full);
  color: var(--text-strong); font-family: var(--font-sans); font-weight: 500; font-size: 14px; pointer-events: none;
}
.chips input:checked + span { background: var(--text-strong); border-color: var(--text-strong); color: var(--bg); }
.chips input:focus-visible + span { outline: var(--stroke-2) solid var(--accent); outline-offset: 2px; }
.check { display: flex; align-items: flex-start; gap: var(--space-3); cursor: pointer; font-size: 15px; line-height: 1.45; color: var(--text); }
.check input {
  -webkit-appearance: none; appearance: none; flex: none; display: grid; place-items: center;
  width: 20px; height: 20px; margin: 1px 0 0; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-control); border-radius: var(--radius-sm);
}
.check input::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--bg); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked { background: var(--text-strong); border-color: var(--text-strong); }
.check input:checked::after { opacity: 1; }
.check input:focus-visible { outline: var(--stroke-2) solid var(--accent); outline-offset: 2px; }

/* ---------- Statut ---------- */
.status { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 13px; color: var(--text-strong); }
.dot { width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--success); flex: none; }

/* ---------- Cartes d'outils (anciennes classes) ---------- */
.tools-grid { display: grid; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.tool-card { position: relative; display: grid; gap: var(--space-3); align-content: start; padding: var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.tool-card-ico { width: var(--icon-md); height: var(--icon-md); fill: none; stroke: var(--text-strong); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tool-card .link-arrow::before { content: ""; position: absolute; inset: 0; }
.stat { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
@media (min-width: 600px) { .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Intro ---------- */
.tool-hero { padding-block: 40px 32px; border-top: 0; }
.tool-hero .eyebrow { margin-bottom: 18px; }
.tool-hero h1 { font-size: clamp(32px, 8.5vw, 76px); max-width: 16ch; margin-bottom: 20px; overflow-wrap: break-word; }
.tool-hero .lede { max-width: 58ch; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding: 0; list-style: none; }
.badges li { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--paper); border: 1px solid var(--graphite); padding: 7px 10px; display: inline-flex; gap: 8px; align-items: center; }
.badges li::before { content: ""; width: 6px; height: 6px; background: var(--accent); }

.tool-section { padding-block: 40px 64px; }
.tool-section.flush { border-top: 0; padding-top: 0; }

/* ---------- Panneaux ---------- */
.panel { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--carbon); padding: 20px 16px; min-width: 0; }
.panel + .panel { margin-top: 16px; }
.panel-t { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-t h2, .panel-t h3 { font-size: 18px; margin: 0; font-stretch: 110%; letter-spacing: 0; }
.panel-n { font-family: var(--mono); font-size: 11px; color: var(--fog); letter-spacing: .1em; }

.fgrid { display: grid; gap: 14px; }
.fgrid-2 { display: grid; gap: 14px; }

/* Champs supplémentaires (nombre, date, select) */
.field input[type="number"], .field input[type="date"], .field select, .tool input[type="text"].cell-in, .tool input[type="number"].cell-in {
  width: 100%; min-height: 48px; padding: 11px 12px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--border-control); border-radius: var(--radius-sm);
  font: 16px/1.4 var(--body);
  -webkit-appearance: none; appearance: none;
}
.panel .field input[type="text"], .panel .field input[type="email"], .panel .field input[type="tel"], .panel .field textarea { background: var(--ink); min-height: 48px; padding: 11px 12px; }
.panel .field textarea { min-height: 84px; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--fog) 50%), linear-gradient(135deg, var(--fog) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field input:focus, .field select:focus { border-color: var(--paper); outline: var(--stroke-2) solid var(--accent); outline-offset: 2px; box-shadow: none; }
.hint { font-size: 13px; color: var(--fog); line-height: 1.5; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; background: transparent; color: var(--paper);
  border: 1px solid var(--border-control); border-radius: var(--radius-sm); font-family: var(--body); font-weight: 500; font-size: 14px; cursor: pointer; text-decoration: none;
}
.btn-ghost:hover { border-color: var(--paper); }
.btn-ghost.sm { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.btn-danger:hover { border-color: var(--error); color: var(--error); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Grille outil (formulaire + aperçu) ---------- */
.tool-grid { display: grid; gap: 24px; }
.tool-grid > * { min-width: 0; }
.field select { width: 100%; max-width: 100%; }

/* ---------- Résultats ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.kpi { background: var(--ink); padding: 16px 14px; min-width: 0; }
.kpi dt { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--fog); }
.kpi dd { margin: 6px 0 0; font-family: var(--display); font-stretch: 115%; font-weight: 700; font-size: clamp(20px, 5vw, 28px); color: var(--paper); letter-spacing: -.02em; overflow-wrap: anywhere; }
.kpi.main { grid-column: 1 / -1; }
.kpi.main dd { font-size: clamp(34px, 9vw, 54px); font-stretch: 125%; }
.kpi.main dd small { font-size: .38em; font-weight: 500; color: var(--fog); letter-spacing: 0; margin-left: 6px; font-stretch: 100%; }

.alert { border: 1px solid var(--line); border-left: 4px solid var(--text-strong); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--carbon); font-size: 14px; color: var(--text); }
.alert strong { color: var(--paper); }
.alert.warn { border-left-color: var(--warning); }
.alert.bad { border-left-color: var(--error); }
.alert.ok { border-left-color: var(--success); }
.alerts { display: grid; gap: 10px; margin-top: 16px; }

/* ---------- Barre empilée ---------- */
.stackbar { display: flex; height: 18px; margin: 20px 0 10px; background: var(--graphite); overflow: hidden; }
.stackbar span { display: block; height: 100%; transition: width .5s var(--ease); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--text); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; display: inline-block; }

/* ---------- Tableau détaillé ---------- */
.detail { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.detail th, .detail td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); font-weight: 400; }
.detail td { text-align: right; font-family: var(--mono); color: var(--paper); white-space: nowrap; padding-left: 12px; }
.detail tr.total th, .detail tr.total td { color: var(--paper); font-weight: 600; border-bottom: 0; padding-top: 14px; }

/* ---------- Score ---------- */
.score { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.score-n { font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 44px; line-height: 1; letter-spacing: -.03em; }

/* ---------- Checklist ---------- */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.checklist li { background: var(--ink); padding: 14px 14px; }
.checklist .check { font-size: 15px; color: var(--paper); }
.checklist .check small { display: block; color: var(--fog); font-size: 13px; margin-top: 4px; }
.checklist .check input:checked + span { color: var(--fog); text-decoration: line-through; text-decoration-color: var(--graphite); }
.progress-line { height: 4px; background: var(--graphite); margin: 14px 0 6px; }
.progress-line span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .4s var(--ease); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--graphite); display: grid; gap: 22px; }
.timeline li { position: relative; padding-left: 20px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; background: var(--ink); border: 2px solid var(--fog); }
.timeline li.done::before { background: var(--paper); border-color: var(--paper); }
.timeline li.next::before { background: var(--accent); border-color: var(--accent); }
.timeline .cap { display: block; margin-bottom: 4px; }
.timeline h3 { font-size: 17px; margin: 0 0 4px; }
.timeline p { font-size: 14px; }
.countdown { font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: clamp(54px, 16vw, 120px); line-height: .9; letter-spacing: -.04em; color: var(--paper); }
.countdown small { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--fog); font-weight: 400; margin-top: 10px; }

/* ---------- Contenu éditorial (SEO) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(24px, 4.4vw, 34px); margin: 48px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 28px; }
.prose p, .prose li { color: var(--text); max-width: 70ch; }
.prose p + p { margin-top: 14px; }
.prose ul, .prose ol { padding-left: 20px; display: grid; gap: 6px; }
.prose a { color: var(--paper); }
.prose .src { font-size: 13px; color: var(--fog); margin-top: 24px; }

/* ---------- Bandeau CTA ---------- */
.tool-cta { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--carbon); padding: 28px 20px; display: grid; gap: 16px; }
.tool-cta h2 { font-size: clamp(26px, 5vw, 40px); margin: 0; }
.tool-cta .btn { justify-self: start; }

/* ---------- Toast ---------- */
.toast { border-radius: var(--radius-sm); position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 140%); background: var(--paper); color: var(--ink); padding: 12px 18px; font-weight: 600; font-size: 14px; z-index: 90; transition: transform .35s var(--ease); max-width: calc(100% - 32px); }
.toast.is-on { transform: translate(-50%, 0); }

/* =========================================================
   ≥ 600px
   ========================================================= */
@media (min-width: 600px) {
  .tool-nav .tool-nav-hide { display: inline-flex; }
  .panel { padding: 24px; }
  .fgrid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fgrid-2 .full { grid-column: 1 / -1; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tool-cta { padding: 40px 36px; grid-template-columns: 1fr auto; align-items: center; }
  .tool-cta .btn { justify-self: end; }
}

/* =========================================================
   ≥ 900px
   ========================================================= */
@media (min-width: 900px) {
  .tool-hero { padding-block: 64px 40px; }
  .tool-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; gap: 32px; }
  .tool-grid.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sticky-col { position: sticky; top: calc(var(--header-h) + 24px); }
  .tool-footer .wrap { grid-template-columns: auto 1fr; align-items: center; }
  .tool-footer ul { justify-content: flex-end; }
}

@media print {
  .tool-header, .tool-footer, .tool-cta, .toast { display: none !important; }
}

/* ---------- Pages développeur (MCP) ---------- */
.code-block { position: relative; margin-top: 10px; border: 1px solid var(--graphite); background: var(--ink); }
.code-block pre { margin: 0; padding: 14px 14px; overflow-x: auto; font: 13px/1.6 var(--mono); color: var(--paper); white-space: pre; tab-size: 2; }
.code-block pre:focus-visible { outline: 2px solid var(--paper); outline-offset: -2px; }
.code-block .btn-ghost { position: absolute; top: 8px; right: 8px; background: var(--carbon); }
.code-block.has-copy pre { padding-top: 52px; }
.prose code, .mcp-steps code, .hint code { font-family: var(--mono); font-size: .92em; color: var(--paper); background: var(--ink); border: 1px solid var(--line); padding: 1px 5px; }
.mcp-tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.mcp-tools li { background: var(--ink); padding: 16px 14px; display: grid; gap: 6px; align-content: start; }
.mcp-tools .mono { font-size: 12px; color: var(--fog); }
.mcp-tools h3 { font-size: 18px; margin: 0; }
.mcp-tools p { font-size: 14.5px; }
.mcp-tools .mcp-ex { color: var(--paper); font-size: 13.5px; border-left: 2px solid var(--border-control); padding-left: 10px; margin-top: 4px; }
.mcp-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 26px; }
.mcp-steps > li { counter-increment: step; position: relative; padding-left: 44px; min-width: 0; }
.mcp-steps > li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--graphite); font: 500 13px var(--mono); color: var(--paper); }
.mcp-steps h3 { font-size: 18px; margin: 0 0 6px; }
.mcp-steps p { font-size: 15px; }
.mcp-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.mcp-tabs button { min-height: 40px; padding: 8px 14px; background: transparent; color: var(--text); border: 1px solid var(--graphite); font: 600 13.5px var(--body); cursor: pointer; }
.mcp-tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
@media (min-width: 700px) { .mcp-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mcp-tools li:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 520px) { .mcp-steps > li { padding-left: 0; padding-top: 40px; } }

/* ---------- Dépôt de fichier (pages récentes) ---------- */
.dropzone { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; border: 1px dashed var(--fog); cursor: pointer; padding: 28px 22px; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone:focus-visible, body.dragging .dropzone { border-color: var(--accent); background: rgba(var(--acc-rgb), .08); }
body.dragging .dropzone { outline: 2px solid var(--accent); outline-offset: 4px; }
.dropzone[aria-busy="true"] { opacity: .7; cursor: progress; }
.drop-ico { width: 40px; height: 40px; fill: none; stroke: var(--paper); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.drop-t { font-family: var(--display); font-stretch: 115%; font-weight: 700; font-size: clamp(19px, 3vw, 24px); color: var(--paper); }
.drop-s { font-size: 15px; margin: 6px 0; }
.drop-link { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Rapports d'analyse IA ---------- */
.ia-verdict { margin-bottom: 14px; }
.ia-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ia-kpis .kpi dd { font-size: clamp(22px, 5vw, 30px); }
.ia-k-critique dd { color: var(--error); } .ia-k-eleve dd { color: var(--warning); } .ia-k-moyen dd { color: var(--warning); }
.ia-facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 14px 0 0; }
.ia-facts div { background: var(--ink); padding: 10px 14px; min-width: 0; }
.ia-facts dt { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--fog); }
.ia-facts dd { margin: 4px 0 0; color: var(--paper); font-size: 14.5px; overflow-wrap: anywhere; }
@media (min-width: 700px) { .ia-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ia-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ia-filter .btn-ghost[aria-pressed="false"] { opacity: .55; text-decoration: line-through; }
.ia-list, .ia-list ul { list-style: none; margin: 0; padding: 0; }
.ia-group + .ia-group { margin-top: 18px; }
.ia-gt { font-size: 12.5px; color: var(--paper); margin-bottom: 6px; overflow-wrap: anywhere; }
.ia-item { border: 1px solid var(--line); border-left: 4px solid var(--graphite); background: var(--ink); padding: 10px 12px; margin-top: 6px; min-width: 0; }
.ia-item.ia-critique { border-left-color: var(--error); } .ia-item.ia-eleve { border-left-color: var(--warning); } .ia-item.ia-moyen { border-left-color: var(--warning); }
.ia-top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ia-sev { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fog); min-width: 62px; }
.ia-critique .ia-sev { color: var(--error); } .ia-eleve .ia-sev { color: var(--warning); } .ia-moyen .ia-sev { color: var(--warning); }
.ia-label { color: var(--paper); font-size: 14.5px; flex: 1 1 240px; min-width: 0; }
.ia-where { font-size: 12px; color: var(--fog); margin-top: 4px; overflow-wrap: anywhere; }
.ia-detail { font: 12.5px/1.5 var(--mono); color: var(--text); margin-top: 6px; overflow-wrap: anywhere; background: var(--carbon); border: 1px solid var(--line); padding: 6px 8px; }
.ia-fix { font-size: 13.5px; color: var(--text); margin-top: 6px; }
.ia-fix::before { content: "→ "; color: var(--accent); }
.sk-tabs { margin: 0 0 16px; }
.sk-preview { max-height: 520px; white-space: pre-wrap !important; overflow-wrap: anywhere; }
.sk-install summary { cursor: pointer; color: var(--paper); min-height: 40px; display: flex; align-items: center; }
.sk-install ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; color: var(--text); }
.sk-ex { border: 1px solid var(--line); background: var(--ink); padding: 12px; display: grid; gap: 10px; }
.sk-ex .field textarea, .sk-ex .field input { background: var(--carbon); }
#report > .panel { margin-top: 16px; }
.sk-badge { font: 500 11px var(--mono); color: var(--fog); }
.sk-badge.sk-critique { color: var(--error); } .sk-badge.sk-eleve { color: var(--warning); } .sk-badge.sk-moyen { color: var(--warning); }
.mono-area { font-family: var(--mono) !important; font-size: 13px !important; }
.am-table { min-width: 640px; }
.am-table td { vertical-align: top; overflow-wrap: anywhere; }
.am-fix { margin-top: 18px; }
.am-fix h3 { font-size: 17px; margin: 0 0 6px; }
.am-fix pre { max-height: 360px; }
.am-scroll { overflow-x: auto; border: 1px solid var(--line); }
.am-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.am-table th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--fog); border-bottom: 1px solid var(--graphite); padding: 8px 10px; background: var(--carbon); }
.am-table td { border-bottom: 1px solid var(--line); padding: 8px 10px; color: var(--text); }
.am-table td.mono { font-family: var(--mono); font-size: 12.5px; color: var(--paper); }
/* ---------- Schéma de workflow ---------- */
.wf-wrap { overflow: auto; border: 1px solid var(--line); background: var(--ink); max-height: 560px; }
.wf-svg { display: block; max-width: none; }
.wf-node rect { fill: var(--carbon); stroke: var(--graphite); stroke-width: 1; }
.wf-node .wf-bar { fill: var(--graphite); stroke: none; }
.wf-c-trigger .wf-bar { fill: var(--paper); } .wf-c-agent .wf-bar, .wf-c-llm .wf-bar, .wf-c-model .wf-bar, .wf-c-memory .wf-bar { fill: var(--accent); }
.wf-moyen rect:first-child { stroke: var(--warning); stroke-width: 2; } .wf-eleve rect:first-child { stroke: var(--warning); stroke-width: 2; } .wf-critique rect:first-child { stroke: var(--error); stroke-width: 2.5; }
.wf-off { opacity: .45; }
.wf-name { fill: var(--paper); font: 600 12.5px var(--body); }
.wf-type { fill: var(--fog); font: 10.5px var(--mono); }
.wf-edge { fill: none; stroke: var(--fog); stroke-width: 1.5; }
.wf-edge.wf-ai { stroke: var(--accent); stroke-dasharray: 5 4; }
.wf-arrowhead { fill: var(--fog); }
.wf-legend { margin-top: 10px; }
.wf-legend i { border: 2px solid; width: 12px; height: 12px; }
.wf-l-critique { border-color: var(--error) !important; } .wf-l-eleve { border-color: var(--warning) !important; } .wf-l-moyen { border-color: var(--warning) !important; } .wf-l-ai { border-color: var(--accent) !important; border-style: dashed !important; }

/* ---------- Ajustements au design system ---------- */
.badges li { min-height: 28px; padding: 0 var(--space-3); gap: var(--space-2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-full); font-family: var(--font-sans); font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-strong); }
.badges li::before { width: 6px; height: 6px; border-radius: var(--radius-full); }
.tool-hero { padding-block: var(--space-8) var(--space-7); }
.tool-hero .eyebrow { margin-bottom: var(--space-5); }
.tool-hero h1 { max-width: 18ch; margin-bottom: var(--space-5); }
.tool-section { padding-block: var(--space-6) var(--space-8); }
.panel-t h2, .panel-t h3 { font-size: 18px !important; letter-spacing: -.006em !important; }
.kpi dd, .score-n, .countdown { font-weight: 500; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.code-block, .mcp-tabs button, .dropzone { border-radius: var(--radius-sm); }
.mcp-tabs button { font-weight: 500; }
.mcp-tabs button[aria-selected="true"] { background: var(--text-strong); color: var(--bg); border-color: var(--text-strong); }
.prose h2 { font-size: clamp(24px, 3vw, 32px) !important; }
@media (min-width: 900px) {
  .tool-hero { padding-block: var(--space-9) var(--space-7); }
  .sticky-col { top: calc(var(--header-h) + var(--space-5)); }
}
