/* Tool page, LE LABO IA design system 8.2.0. Visual vocabulary of the models radar (/modeles/),
   reading column and side rail of the guide articles. Source: .dev/outils-pipeline/template-tool.html. */
.tf-main {
  --tf-ink: #030712;
  --tf-charcoal: #0e1630;
  --tf-deep: #0b1026;
  --tf-violet-wash: color-mix(in srgb, var(--primary) 18%, transparent);
  --tf-paper: #f4efe5;
  --tf-paper-card: #fbf8f1;
  --tf-paper-text: #0c1429;
  --tf-paper-muted: #3f4250;
  --tf-paper-hair: rgba(12, 20, 41, 0.16);
  --tf-primary-deep: #4a56d4;
  --tf-hair: color-mix(in srgb, var(--primary) 14%, transparent);
  --tf-hair-strong: color-mix(in srgb, var(--primary) 32%, transparent);
  --tf-lift: 0 24px 64px rgba(0, 0, 0, 0.5);
  --tf-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: block;
  background: var(--tf-ink);
}
.tf-main :is(h1, h2, h3, p, ul, ol, dl, dd, figure) { margin: 0; }
.tf-main :is(ul, ol) { padding: 0; list-style: none; }
.tf-main :is(a, summary):focus-visible { outline: 2px solid var(--primary-soft); outline-offset: 3px; }
.tf-shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.tf-shell > *, .tf-hero__grid > *, .tf-brief > *, .tf-body__grid > * { min-width: 0; }
.tf-label {
  color: var(--primary-soft);
  font: 600 0.74rem/1.3 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tf-arrow {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--primary-soft);
  font-weight: 700;
  text-decoration: none;
  transition: color 150ms var(--tf-ease);
}
.tf-arrow::after { content: "→"; margin-left: 8px; transition: transform 200ms var(--tf-ease); }
.tf-arrow--out::after { content: "↗"; }
.tf-arrow:hover, .tf-arrow:focus-visible { color: var(--text-primary); }
.tf-arrow:hover::after { transform: translateX(4px); }
.tf-arrow--out:hover::after { transform: translate(2px, -2px); }
.tf-main .btn-gold svg { flex: none; }

/* Logo tile: the official mark on the plate that keeps it readable. */
.tf-logo {
  display: grid;
  flex: none;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--tf-hair-strong);
  background: var(--tf-deep);
  color: #f4f5fb;
  font: 800 1.1rem/1 var(--font-sans);
}
.tf-logo img { display: block; width: 100%; height: 100%; padding: 12%; object-fit: contain; }
.tf-logo[data-plate="light"] { border-color: var(--tf-paper-hair); background: var(--tf-paper-card); }
.tf-logo--lg { width: 76px; height: 76px; font-size: 2.1rem; }
.tf-logo--md { width: 48px; height: 48px; }

/* Hero: identity and action on the left, the tool's homepage on the right. */
.tf-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: 116px 0 clamp(48px, 6vw, 76px);
  background:
    radial-gradient(ellipse 55% 65% at 88% 22%, var(--tf-violet-wash), transparent 70%),
    radial-gradient(ellipse 45% 50% at 0% 0%, color-mix(in srgb, var(--gold) 7%, transparent), transparent 70%),
    var(--tf-ink);
}
.tf-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 40px 56px; align-items: center; }
.tf-hero__grid--solo { grid-template-columns: minmax(0, 760px); }
.tf-hero__copy { display: grid; gap: 22px; justify-items: start; }
.tf-crumb ol { display: flex; flex-wrap: wrap; gap: 8px; color: var(--text-tertiary); font-size: 0.86rem; }
.tf-crumb li + li::before { content: "/"; margin-right: 8px; color: var(--text-muted); }
.tf-crumb a { color: var(--text-secondary); text-decoration: none; }
.tf-crumb a:hover, .tf-crumb a:focus-visible { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }
.tf-title { display: flex; align-items: center; gap: 20px; }
.tf-title h1 {
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font: 800 clamp(2.5rem, 1.5rem + 3.2vw, 4rem)/1.02 var(--font-sans);
  letter-spacing: -0.035em;
}
.tf-lead { max-width: 30ch; color: var(--text-primary); font: 600 clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem)/1.3 var(--font-sans); letter-spacing: -0.015em; text-wrap: balance; }
.tf-summary { max-width: 56ch; color: var(--body-text); font-size: 1.04rem; line-height: 1.7; }
.tf-meta { color: var(--text-tertiary); font: 600 0.72rem/1.4 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.tf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; margin-top: 4px; }
.tf-disclosure { max-width: 60ch; color: var(--text-tertiary); font-size: 0.82rem; line-height: 1.55; }
.tf-shot { border: 1px solid var(--tf-hair-strong); background: var(--tf-deep); box-shadow: var(--tf-lift); }
.tf-shot__bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--tf-hair-strong); }
.tf-shot__bar i { width: 9px; height: 9px; border-radius: 50%; background: color-mix(in srgb, #f4f5fb 22%, transparent); }
.tf-shot__bar b { margin-left: 10px; color: var(--text-tertiary); font: 600 0.72rem/1 var(--font-mono); letter-spacing: 0.08em; }
.tf-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.tf-shot figcaption { padding: 10px 14px; border-top: 1px solid var(--tf-hair); color: var(--text-tertiary); font-size: 0.8rem; line-height: 1.45; }

/* Bands. */
.tf-band { padding-block: clamp(56px, 7vw, 88px); }
.tf-band--charcoal { border-block: 1px solid var(--tf-hair); background: var(--tf-charcoal); }
.tf-band--paper {
  --text-primary: var(--tf-paper-text);
  --text-secondary: var(--tf-paper-muted);
  --text-tertiary: var(--tf-paper-muted);
  --body-text: var(--tf-paper-muted);
  background: var(--tf-paper);
  color: var(--tf-paper-text);
}
.tf-band--paper .tf-label { color: var(--tf-primary-deep); }
.tf-band--paper .tf-arrow { color: var(--tf-primary-deep); }
.tf-band--paper .tf-arrow:hover { color: var(--tf-paper-text); }
.tf-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 32px; margin-bottom: 28px; }
.tf-head h2, .tf-block > h2, .tf-cta h2 {
  color: var(--text-primary);
  font: 800 clamp(1.7rem, 1.3rem + 1.5vw, 2.3rem)/1.08 var(--font-sans);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* In brief: verdict, audience, price and scores in one screen. */
.tf-brief { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.tf-brief--solo { grid-template-columns: minmax(0, 1fr); }
.tf-brief__main { display: grid; gap: 16px; align-content: start; }
.tf-card { display: grid; gap: 12px; align-content: start; padding: 24px; border: 1px solid var(--tf-paper-hair); background: var(--tf-paper-card); scroll-margin-top: 104px; }
.tf-card p { color: var(--tf-paper-muted); font-size: 1rem; line-height: 1.62; }
.tf-card .tf-card__note { font-size: 0.84rem; }
.tf-card--verdict p:not(.tf-card__note) { color: var(--tf-paper-text); font: 500 clamp(1.12rem, 1rem + 0.5vw, 1.36rem)/1.45 var(--font-sans); letter-spacing: -0.01em; }
.tf-marks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.tf-panel {
  --text-primary: #f4f5fb;
  --text-secondary: rgba(244, 245, 251, 0.72);
  --text-tertiary: rgba(244, 245, 251, 0.48);
  --body-text: #b0b8cc;
  display: grid;
  gap: 20px;
  align-content: start;
  padding: 26px 24px;
  border: 1px solid var(--tf-hair-strong);
  background: radial-gradient(ellipse 90% 60% at 20% 0%, var(--tf-violet-wash), transparent 70%), var(--tf-charcoal);
  color: var(--text-primary);
}
.tf-panel .tf-label { color: var(--primary-soft); }
/* The panel keeps its own height: beside a long verdict, stretching it opened a void above the bars. */
.tf-panel { align-self: start; }
.tf-score__total { display: flex; align-items: baseline; gap: 8px; }
.tf-score__total b { color: var(--gold); font: 800 clamp(3.4rem, 2.4rem + 3vw, 4.6rem)/0.9 var(--font-sans); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.tf-score__total span { color: var(--text-tertiary); font: 600 1rem/1 var(--font-mono); }
.tf-score__rows { display: grid; gap: 14px; }
.tf-score__rows div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; align-items: baseline; }
.tf-score__rows dt { color: var(--text-secondary); font-size: 0.9rem; }
.tf-score__rows dd { display: contents; color: var(--text-primary); font-weight: 700; font-variant-numeric: tabular-nums; }
.tf-meter { grid-column: 1 / -1; grid-row: 2; height: 4px; background: color-mix(in srgb, #f4f5fb 10%, transparent); }
.tf-meter::after { content: ""; display: block; width: var(--value); height: 100%; background: var(--gold); }
.tf-steps { display: grid; counter-reset: step; }
.tf-steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 4px 12px; padding: 14px 0; border-top: 1px solid var(--tf-hair-strong); counter-increment: step; }
.tf-steps li::before { content: "0" counter(step); grid-row: 1 / 3; color: var(--primary-soft); font: 600 0.8rem/1.6 var(--font-mono); }
.tf-steps b { color: var(--text-primary); font-size: 1rem; }
.tf-steps span { color: var(--body-text); font-size: 0.9rem; line-height: 1.5; }
.tf-panel__note { color: var(--text-tertiary); font-size: 0.8rem; }

/* Body: reading column and sticky rail. */
.tf-body__grid { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 0 64px; align-items: start; }
.tf-rail { grid-column: 2; grid-row: 1; position: sticky; top: 104px; display: grid; gap: 24px; }
.tf-rail__tool { display: flex; align-items: center; gap: 14px; }
.tf-rail__tool p { display: grid; gap: 2px; }
.tf-rail__tool b { color: var(--text-primary); font-size: 1.05rem; line-height: 1.2; }
.tf-rail__tool span { color: var(--text-tertiary); font-size: 0.84rem; line-height: 1.3; }
.tf-toc { display: grid; gap: 14px; }
.tf-toc ol { display: grid; border-left: 1px solid var(--tf-hair-strong); }
.tf-toc a { display: flex; align-items: center; min-height: 36px; margin-left: -1px; padding: 4px 0 4px 16px; border-left: 1px solid transparent; color: var(--text-secondary); font-size: 0.92rem; line-height: 1.3; text-decoration: none; transition: color 150ms var(--tf-ease), border-color 150ms var(--tf-ease); }
.tf-toc a:hover, .tf-toc a:focus-visible { border-left-color: var(--primary); color: var(--text-primary); }
.tf-content { grid-column: 1; grid-row: 1; display: grid; }
.tf-block { display: grid; gap: 26px; scroll-margin-top: 104px; }
.tf-block + .tf-block { margin-top: 60px; padding-top: 60px; border-top: 1px solid var(--tf-hair); }
.tf-prose { max-width: 68ch; }
.tf-prose p { color: var(--body-text); font-size: 1.04rem; line-height: 1.78; }
.tf-prose p + p { margin-top: 1.1em; }
.tf-prose--lead p { color: var(--text-secondary); font-size: clamp(1.1rem, 1.02rem + 0.3vw, 1.22rem); line-height: 1.7; }
.tf-main :is(.tf-prose, .tf-faq, .tf-list) a { color: var(--primary-soft); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tf-main :is(.tf-prose, .tf-faq, .tf-list) a:hover { color: var(--text-primary); }
.tf-prose :is(strong, b) { color: var(--text-primary); font-weight: 700; }
.tf-chapters { display: grid; }
.tf-chapter { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 12px 32px; padding: 26px 0; border-top: 1px solid var(--tf-hair); }
.tf-chapter:last-child { padding-bottom: 0; }
.tf-chapter h3 { color: var(--text-primary); font: 700 1.06rem/1.3 var(--font-sans); letter-spacing: -0.01em; text-wrap: balance; }
.tf-figure { border: 1px solid var(--tf-hair-strong); background: var(--tf-deep); }
.tf-figure img { display: block; width: 100%; height: auto; }
.tf-figure figcaption { padding: 10px 14px; color: var(--text-tertiary); font-size: 0.84rem; }
.tf-video { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--tf-hair-strong); background: var(--tf-deep); }
.tf-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; counter-reset: item; }
.tf-grid > li { display: grid; gap: 8px; align-content: start; padding: 20px; border: 1px solid var(--tf-hair); background: var(--tf-deep); counter-increment: item; }
.tf-grid > li::before { content: counter(item, decimal-leading-zero); color: var(--primary-soft); font: 600 0.74rem/1 var(--font-mono); letter-spacing: 0.12em; }
.tf-grid h3 { color: var(--text-primary); font: 700 1.06rem/1.3 var(--font-sans); }
.tf-grid p { color: var(--body-text); font-size: 0.96rem; line-height: 1.6; }
.tf-balance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tf-balance > div { display: grid; gap: 16px; align-content: start; padding: 24px; border: 1px solid var(--tf-hair); background: var(--tf-deep); }
.tf-balance h3 { display: flex; align-items: center; gap: 10px; color: var(--text-primary); font: 700 1.06rem/1.3 var(--font-sans); }
.tf-balance h3::before { content: ""; width: 10px; height: 10px; background: var(--tf-tone); }
.tf-balance ul, .tf-list { display: grid; gap: 14px; }
.tf-balance li, .tf-list li { position: relative; padding-left: 26px; color: var(--body-text); font-size: 0.98rem; line-height: 1.55; }
.tf-balance li::before, .tf-list li::before { position: absolute; top: 0; left: 0; color: var(--tf-tone); font: 700 1rem/1.55 var(--font-mono); }
.tf-balance__pro { --tf-tone: var(--success); }
.tf-balance__pro li::before { content: "+"; }
.tf-balance__con { --tf-tone: #e08d88; }
.tf-balance__con li::before { content: "−"; }
.tf-list { --tf-tone: var(--primary-soft); }
.tf-list li::before { content: "→"; }
.tf-table-wrap { overflow-x: auto; border: 1px solid var(--tf-hair-strong); background: rgba(3, 7, 18, 0.35); }
.tf-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.92rem; }
.tf-table :is(th, td) { padding: 12px 14px; border-bottom: 1px solid var(--tf-hair); color: var(--text-secondary); text-align: left; vertical-align: top; }
.tf-table thead th { background: var(--tf-deep); color: var(--text-tertiary); font: 600 0.7rem/1.3 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.tf-table tbody th { color: var(--text-primary); font-weight: 600; }
.tf-table tbody tr:last-child :is(th, td) { border-bottom: 0; }
.tf-table td.is-current { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--text-primary); }
.tf-table a { color: var(--primary-soft); }
.tf-faq { border-top: 1px solid var(--tf-hair-strong); }
.tf-faq details { border-bottom: 1px solid var(--tf-hair-strong); }
.tf-faq summary { position: relative; display: block; padding: 20px 48px 20px 0; color: var(--text-primary); font-size: 1.06rem; font-weight: 700; line-height: 1.45; list-style: none; cursor: pointer; transition: color 150ms var(--tf-ease); }
.tf-faq summary::-webkit-details-marker { display: none; }
.tf-faq summary::after { content: "+"; position: absolute; top: 50%; right: 2px; display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--tf-hair-strong); color: var(--primary-soft); font: 400 1.25rem/1 var(--font-mono); transform: translateY(-50%); }
.tf-faq details[open] summary::after { content: "−"; border-color: var(--primary); background: var(--primary); color: var(--tf-ink); }
.tf-faq summary:hover { color: var(--primary-soft); }
.tf-faq details p { max-width: 68ch; margin-bottom: 22px; color: var(--body-text); line-height: 1.75; }
.tf-main .content-provenance { width: auto; margin: 44px 0 0; padding: 20px 0 0; border: 0; border-top: 1px solid var(--tf-hair); background: none; color: var(--text-tertiary); font-size: 0.88rem; }
.tf-main .content-provenance a { color: var(--text-secondary); text-underline-offset: 3px; }

/* Similar tools and further reading. */
.tf-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tf-tool { display: grid; gap: 16px; align-content: start; height: 100%; padding: 20px; border: 1px solid var(--tf-hair); background: var(--tf-deep); color: inherit; text-decoration: none; transition: border-color 200ms var(--tf-ease), transform 200ms var(--tf-ease), box-shadow 200ms var(--tf-ease); }
.tf-tool:hover, .tf-tool:focus-visible { border-color: var(--primary); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); transform: translateY(-2px); }
.tf-tool__body { display: grid; gap: 6px; }
.tf-tool__body b { color: var(--text-primary); font-size: 1.1rem; line-height: 1.25; }
.tf-tool:hover .tf-tool__body b { color: var(--primary-soft); }
.tf-tool__body span { color: var(--body-text); font-size: 0.9rem; line-height: 1.5; }
.tf-guides { display: grid; gap: 12px; }
.tf-guide { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 20px; align-items: center; padding: 12px; border: 1px solid var(--tf-hair); background: var(--tf-deep); color: inherit; text-decoration: none; transition: border-color 200ms var(--tf-ease); }
.tf-guide--plain { grid-template-columns: minmax(0, 1fr); padding: 18px 20px; }
.tf-guide:hover, .tf-guide:focus-visible { border-color: var(--primary); }
.tf-guide img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.tf-guide b { color: var(--text-primary); font-size: 1.06rem; line-height: 1.35; }
.tf-guide:hover b { color: var(--primary-soft); }
.tf-more { display: grid; gap: 14px; }
.tf-compare { margin-top: 28px; }
.tf-tools:empty { display: none; }
.tf-tools:empty + .tf-compare { margin-top: 0; }
.tf-prose .tf-table-wrap { margin: 4px 0 22px; }
.tf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tf-chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--tf-hair-strong); background: rgba(3, 7, 18, 0.45); color: var(--text-primary); font-size: 0.92rem; font-weight: 600; text-decoration: none; transition: border-color 150ms var(--tf-ease), background 150ms var(--tf-ease); }
.tf-chips a:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 18%, transparent); }

/* Closing programme invitation: one compact band. */
.tf-main .tf-cta { --body-text: rgba(26, 20, 8, 0.84); padding-block: clamp(48px, 6vw, 72px); border: 0; background: var(--gold); color: #1a1408; }
.tf-cta .tf-shell { display: grid; gap: 14px; justify-items: center; }
.tf-cta h2 { color: #1a1408; }
.tf-cta p { margin-inline: auto; max-width: 60ch; color: rgba(26, 20, 8, 0.84); line-height: 1.6; }
.tf-cta .btn-gold { justify-content: center; margin-top: 14px; background: #030712; color: var(--gold); box-shadow: none; }
.tf-cta .btn-gold:hover { background: #0c1429; color: var(--gold-soft); }
.tf-cta .btn-gold:focus-visible { outline: 3px solid #030712; outline-offset: 4px; }

@media (max-width: 1100px) {
  .tf-body__grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .tf-rail, .tf-content { grid-column: 1; grid-row: auto; }
  .tf-rail { position: static; }
  .tf-rail__tool { display: none; }
  .tf-toc ol { display: flex; flex-wrap: wrap; gap: 8px; border: 0; }
  .tf-toc a { min-height: 44px; margin: 0; padding: 0 14px; border: 1px solid var(--tf-hair-strong); background: rgba(3, 7, 18, 0.45); }
  .tf-toc a:hover, .tf-toc a:focus-visible { border-color: var(--primary); }
}
@media (max-width: 980px) {
  .tf-hero { padding-top: 104px; }
  .tf-hero__grid, .tf-brief { grid-template-columns: minmax(0, 1fr); }
  .tf-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .tf-title { gap: 14px; }
  .tf-logo--lg { width: 60px; height: 60px; }
  .tf-actions .btn-gold { width: 100%; justify-content: center; }
  .tf-chapter, .tf-balance, .tf-tools { grid-template-columns: minmax(0, 1fr); }
  .tf-chapter { gap: 10px; padding: 22px 0; }
  .tf-card, .tf-balance > div { padding: 20px; }
  .tf-guide { grid-template-columns: 96px minmax(0, 1fr); }
  .tf-block + .tf-block { margin-top: 44px; padding-top: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .tf-main *, .tf-main *::after { transition: none; }
  .tf-tool:hover, .tf-arrow:hover::after { transform: none; }
}
