/* ==========================================================================
   /shared/ui.css — design system partagé
   outilscompta.fr · storepaperwork.com · filechores.com

   Intégration sur les 10 pages outils existantes, sans toucher au markup :
     <link rel="stylesheet" href="../../shared/ui.css">   APRÈS le <style> inline.
   À spécificité égale la règle la plus tardive gagne : ce fichier écrase
   les styles de base inline. Il est volontairement HORS @layer (une règle
   en @layer perd toujours contre du CSS non-layered, donc contre le <style>
   inline). Les propriétés inline que ce fichier ne redéfinit pas sont
   remises à zéro explicitement (ex. .lang{float}).

   Le site est choisi par <html data-site="outilscompta|storepaperwork|filechores">
   (injecté par le script Node de build). Sans attribut : tokens outilscompta.

   Sommaire
     01 Polices (self-hosted, OFL)          10 Tableaux
     02 Tokens : primitives                 11 KPI, bannières de contrôle
     03 Tokens : sites                      12 Onglets, langue, badges, tags
     04 Base & reset                        13 FAQ, confidentialité
     05 Layout                              14 Header & footer de site
     06 Typographie & utilitaires           15 Hero d'outil, chips, confiance, étapes
     07 Formulaires                         16 Cartes d'outils (home)
     08 Boutons                             17 Paywall (pay.js) & prix
     09 Cartes, zone de dépôt, fichiers     18 Article · 19 Icônes · 20 Médias
   ========================================================================== */


/* ==========================================================================
   01 · POLICES — IBM Plex Sans (variable 400–700) + IBM Plex Mono 400
   Fichiers servis depuis /shared/fonts/ (chemin relatif à ce CSS). Licence :
   SIL OFL 1.1, copie de LICENSE.txt dans /shared/fonts/.
   Sous-ensemble « latin » (Latin-1, Œœ, guillemets, espace fine insécable
   U+202F utilisée par Intl.NumberFormat fr-FR, €, −, ™).
   ========================================================================== */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-latin-var.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-latin-italic-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap; /* téléchargé seulement si de l'italique est rendu (articles) */
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: optional; /* décoratif (code, noms de colonnes) : jamais de reflow */
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Fallback métriquement ajusté : limite le décalage (CLS) au moment du swap.
   VALEURS PROVISOIRES : à recalculer par le script de build (fontkit) à
   partir des métriques hhea du fichier téléchargé, cf. rapport §5. */
@font-face {
  font-family: "Plex Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Roboto");
  size-adjust: 103%;
  ascent-override: 99.5%;
  descent-override: 26.7%;
  line-gap-override: 0%;
}


/* ==========================================================================
   02 · TOKENS — PRIMITIVES (communes aux trois sites)
   ========================================================================== */

:root {
  color-scheme: light;

  /* — Familles — */
  --font-sans: "IBM Plex Sans", "Plex Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* — Échelle typographique fluide (360 px → 1280 px de viewport) —
     rem + vw : reste zoomable à 200 % (WCAG 1.4.4). */
  --fs-xs:   0.75rem;                                         /* 12   badges, tags */
  --fs-sm:   0.875rem;                                        /* 14   hint, tableaux, statut */
  --fs-base: clamp(1rem, 0.976rem + 0.109vw, 1.0625rem);      /* 16→17 corps */
  --fs-lg:   clamp(1.125rem, 1.076rem + 0.217vw, 1.25rem);    /* 18→20 h3, titre de carte */
  --fs-xl:   clamp(1.25rem, 1.152rem + 0.435vw, 1.5rem);      /* 20→24 h2, valeur KPI */
  --fs-2xl:  clamp(1.625rem, 1.429rem + 0.87vw, 2.125rem);    /* 26→34 h1 d'outil */
  --fs-3xl:  clamp(2rem, 1.658rem + 1.522vw, 2.875rem);       /* 32→46 h1 home / article */

  --lh-tight: 1.2;
  --lh-snug: 1.35;
  --lh-base: 1.55;
  --lh-prose: 1.65;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* — Espacement (base 4 px) — */
  --sp-1: 0.25rem;  /*  4 */
  --sp-2: 0.5rem;   /*  8 */
  --sp-3: 0.75rem;  /* 12 */
  --sp-4: 1rem;     /* 16 */
  --sp-5: 1.25rem;  /* 20 */
  --sp-6: 1.5rem;   /* 24 */
  --sp-8: 2rem;     /* 32 */
  --sp-10: 2.5rem;  /* 40 */
  --sp-12: 3rem;    /* 48 */
  --sp-16: 4rem;    /* 64 */
  --gutter: clamp(1rem, 0.6rem + 1.8vw, 2rem);               /* marge latérale de page */

  /* — Rayons (surchargés par site, cf. §03) — */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-pill: 999px;

  /* — Ombres : discrètes, teinte encre froide — */
  --shadow-1: 0 1px 2px rgb(16 24 40 / 0.05);
  --shadow-2: 0 1px 3px rgb(16 24 40 / 0.08), 0 4px 12px rgb(16 24 40 / 0.06);
  --shadow-3: 0 4px 8px rgb(16 24 40 / 0.06), 0 16px 40px rgb(16 24 40 / 0.16);
  --shadow-inset-drop: inset 0 0 0 4px var(--accent-soft);

  /* — Z-index — */
  --z-base: 0;
  --z-sticky: 2;        /* en-têtes de tableau collants (dans .scroll) */
  --z-header: 50;       /* header de site */
  --z-dropdown: 100;    /* menu « Outils » */
  --z-overlay: 900;
  --z-modal: 1000;      /* paywall */
  --z-toast: 1100;

  /* — Largeurs — */
  --w-page: 75rem;      /* 1200 header, footer, home */
  --w-tool: 70rem;      /* 1120 pages outils (tableaux larges) */
  --w-prose: 40rem;     /* mesure de lecture ~70 car. (le ch de Plex/Inter donnait ~90 car.) */
  --w-narrow: 40rem;    /* formulaires simples, modales */

  /* — Cibles & focus (WCAG 2.2 : 2.5.8 ≥ 24 px ; on vise 44 px pour l'action principale) — */
  --target-min: 1.5rem;   /* 24 */
  --target-sm: 2.25rem;   /* 36 */
  --target: 2.75rem;      /* 44 */
  --target-lg: 3.25rem;   /* 52 */
  --focus-width: 2px;
  --focus-offset: 2px;

  /* — Mouvement — */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur-1: 120ms;
  --dur-2: 200ms;

  /* — Points de rupture (documentation : les var() ne marchent pas dans @media)
       sm 30em/480 · md 48em/768 · lg 64em/1024 · xl 80em/1280 — */

  /* — Statuts (communs ; surchargés si nécessaire par site) — */
  --ok: #18704A;   --ok-soft: #E6F3EC;
  --warn: #9A4A00; --warn-soft: #FDF1E0;
  --bad: #B3261E;  --bad-soft: #FCEBEA;
  --on-bad: #FFFFFF;
}


/* ==========================================================================
   03 · TOKENS — SITES (options recommandées ; variantes dans le rapport)
   Rôles :
     --accent         remplissage du bouton principal, étape courante
     --on-accent      texte posé sur --accent
     --accent-hover   remplissage au survol
     --accent-strong  liens, texte sur fond teinté (≥ 4,5:1 partout)
     --accent-line    traits porteurs d'info : onglet actif, drag-over (≥ 3:1)
     --accent-soft    fonds teintés : badge, survol, drag-over
     --focus          anneau de focus (≥ 3:1 sur bg et surface)
   Les alias --card / --line / --muted / --ink / --accent / --ok… gardent les
   noms utilisés par le CSS inline des pages : les règles inline restantes
   (spécifiques à un outil) héritent donc automatiquement de la palette.
   ========================================================================== */

/* outilscompta.fr — option A « Pétrole » : rigueur, sobriété, encre bleu-vert.
   Défaut quand data-site est absent. */
:root,
html[data-site="outilscompta"] {
  --accent: #0B5F73;
  --on-accent: #FFFFFF;
  --accent-hover: #084A59;
  --accent-strong: #084A59;
  --accent-line: #0B5F73;
  --accent-soft: #E4F0F2;
  --ink: #14212B;
  --ink-2: #34434F;
  --muted: #566470;
  --line: #DCE3E6;
  --line-strong: #7D8B94;
  --bg: #F5F7F7;
  --surface: #FFFFFF;
  --surface-2: #EFF3F4;
  --focus: #0B5F73;
  --radius-sm: 3px; --radius-md: 4px; --radius-lg: 6px; --radius-xl: 8px;
  --heading-weight: 600;
}

/* storepaperwork.com — option B « Cobalt » : propre, transactionnel,
   volontairement distinct du vert de l'admin Shopify (pas d'affiliation suggérée). */
html[data-site="storepaperwork"] {
  --accent: #2347C5;
  --on-accent: #FFFFFF;
  --accent-hover: #1A3596;
  --accent-strong: #1A3596;
  --accent-line: #2347C5;
  --accent-soft: #EAEFFC;
  --ink: #141826;
  --ink-2: #353B4C;
  --muted: #5A6072;
  --line: #DEE1EA;
  --line-strong: #818899;
  --bg: #F7F7F9;
  --surface: #FFFFFF;
  --surface-2: #F0F2F7;
  --focus: #2347C5;
  --radius-sm: 4px; --radius-md: 6px; --radius-lg: 10px; --radius-xl: 14px;
  --heading-weight: 650;
}

/* filechores.com — option A « Tangerine » : chaleureux, direct, efficace. */
html[data-site="filechores"] {
  --accent: #C2410C;
  --on-accent: #FFFFFF;
  --accent-hover: #9A3412;
  --accent-strong: #9A3412;
  --accent-line: #C2410C;
  --accent-soft: #FFF0E6;
  --ink: #1F1A17;
  --ink-2: #433A35;
  --muted: #675C55;
  --line: #E8E1DC;
  --line-strong: #8F837B;
  --bg: #FAF8F6;
  --surface: #FFFFFF;
  --surface-2: #F6F1ED;
  --focus: #9A3412;
  --warn: #835400; --warn-soft: #FCF3DC; /* ocre : se distingue de l'accent orange */
  --info: #2F5A86; --info-soft: #EBF1F7;  /* info en bleu : l'orange se confondrait avec l'alerte */
  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px;
  --heading-weight: 600;
}

/* Alias de compatibilité (noms des :root inline existants). */
:root,
html[data-site] {
  --card: var(--surface);
  --accent-ink: var(--on-accent);
}
:root { --info: var(--accent-strong); --info-soft: var(--accent-soft); }


/* ==========================================================================
   04 · BASE & RESET
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--sp-6);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  font-weight: var(--fw-regular);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video, canvas { max-width: 100%; }
img, video { height: auto; }

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: var(--heading-weight, 600);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-2xl); margin: 0 0 var(--sp-2); }
h2 { font-size: var(--fs-xl);  margin: 0 0 var(--sp-2); }
h3 { font-size: var(--fs-lg);  margin: 0 0 var(--sp-2); }
p  { margin: 0 0 var(--sp-3); text-wrap: pretty; }

a {
  color: var(--accent-strong);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }

b, strong { font-weight: var(--fw-semibold); }

code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.92em; }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-6) 0; }

::selection { background: var(--accent-soft); color: var(--ink); }

/* Focus visible : un seul anneau, partout, ≥ 3:1 (WCAG 2.4.7 / 2.4.13 approché). */
:focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: var(--focus-offset);
}
:focus:not(:focus-visible) { outline: none; }

[hidden] { display: none !important; }

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

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100%;
  z-index: var(--z-toast);
  padding: var(--sp-2) var(--sp-4);
  background: var(--ink);
  color: #FFFFFF;
  border-radius: var(--radius-md);
}
.skip-link:focus { top: var(--sp-2); }


/* ==========================================================================
   05 · LAYOUT
   ========================================================================== */

main {
  max-width: var(--w-tool);
  margin-inline: auto;
  padding: var(--sp-3) var(--gutter) var(--sp-16);
}

.container      { max-width: var(--w-page); margin-inline: auto; padding-inline: var(--gutter); }
.container.tool { max-width: var(--w-tool); }

/* .row : grille auto-adaptative (2, 3 ou 4 champs) — remplace les colonnes
   fixes + media queries inline, sans markup. */
.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-4);
}
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); margin-top: var(--sp-4); }
.row4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); margin-top: var(--sp-3); }

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
}

@media (max-width: 48em) {
  .grid2, .row3 { grid-template-columns: minmax(0, 1fr); }
  .row4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.stack > * + * { margin-top: var(--sp-4); }


/* ==========================================================================
   06 · TYPOGRAPHIE & UTILITAIRES
   ========================================================================== */

.sub {
  color: var(--muted);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  margin: 0;
  max-width: 70ch;
}

.hint {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  margin: 0 0 var(--sp-3);
}

.ex,
.pvnote { color: var(--muted); font-size: var(--fs-xs); margin-top: var(--sp-1); }

.muted { color: var(--muted); }

/* .small est employé à la fois comme texte, comme taille de bouton et de zone
   de dépôt : chaque cas est traité séparément. */
.small:not(.btn):not(.drop) { font-size: var(--fs-sm); }

.num {
  text-align: right;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
.tnum { font-variant-numeric: tabular-nums lining-nums; }

.ok   { color: var(--ok); }
.warn { color: var(--warn); }
.bad  { color: var(--bad); }

.status {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: var(--sp-2);
  min-height: 1.25rem;  /* réserve la ligne : pas de saut de mise en page */
}
.status.ok { color: var(--ok); }
.status.warn { color: var(--warn); }
.status.bad { color: var(--bad); }
/* pay.js remplace la className de #mt-status : on cible aussi l'id. */
#mt-status, #mt-access { font-size: var(--fs-sm); color: var(--muted); margin-top: var(--sp-2); }
#mt-status.ok { color: var(--ok); }

.colname { font-family: var(--font-mono); font-size: var(--fs-xs); }


/* ==========================================================================
   07 · FORMULAIRES
   Bord --line-strong (≥ 3:1, WCAG 1.4.11), hauteur 40 px, focus net.
   ========================================================================== */

label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--ink);
  margin-bottom: var(--sp-1);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="search"],
input[type="date"],
select,
textarea {
  width: 100%;
  min-height: 2.5rem;
  padding: var(--sp-2) var(--sp-3);
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--ink);
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
input[type="number"] { font-variant-numeric: tabular-nums; }
textarea { resize: vertical; line-height: var(--lh-base); min-height: 6rem; }

input[type="text"]:hover,
input[type="number"]:hover,
select:hover,
textarea:hover { border-color: var(--ink-2); }

input[type="text"]:focus-visible,
input[type="number"]:focus-visible,
input[type="email"]:focus-visible,
input[type="search"]:focus-visible,
input[type="date"]:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: 0;
  border-color: var(--focus);
}

select {
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23566470' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  background-size: 1.125rem;
  text-overflow: ellipsis;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--accent-line);
  margin: 0.15em 0 0;
  vertical-align: top;
}

/* Champs édités dans un tableau : compacts mais ≥ 24 px de haut. */
td input[type="text"],
td input[type="number"],
td input.cell,
td select {
  min-height: 1.75rem;
  padding: var(--sp-1) var(--sp-2);
  font-size: var(--fs-sm);
  border-color: var(--line);
  border-radius: var(--radius-sm);
}
td input[type="text"],
td input[type="number"],
td input.cell {
  border-color: transparent transparent var(--line-strong);   /* WCAG 1.4.11: >= 3:1 boundary */
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: transparent;
  max-width: 100%;
}
td input[type="text"]:hover, td input.cell:hover,
td input[type="text"]:focus, td input.cell:focus { border-color: var(--line-strong); background: var(--surface); }
tr:has(> td > input, > td > select) > td { vertical-align: middle; }
td.lbl { width: 100%; }
table td, table th, .kpi, .kpis { font-variant-numeric: tabular-nums; }

::placeholder { color: var(--muted); opacity: 1; }


/* ==========================================================================
   08 · BOUTONS
   .btn            principal (fond accent)
   .btn.ghost      secondaire contour — conserve l'usage actuel des pages
   .btn.secondary  alias de .ghost
   .btn.quiet      bouton texte, sans bord (le « ghost » des design systems)
   .btn.danger     destructif
   Tailles : .btn.small / .btn.sm (36 px), défaut 44 px, .btn.lg (52 px)
   Chargement : aria-busy="true" ou .is-loading
   ========================================================================== */

.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--on-accent);
  --btn-bd: transparent;
  --btn-bg-hover: var(--accent-hover);

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: var(--target);
  padding: 0.625rem 1.125rem;
  font: inherit;
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.btn:hover { background: var(--btn-bg-hover); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 1.125rem; height: 1.125rem; }

/* Accent clair (ex. jaune) : on borde le bouton pour qu'il se détache du fond. */
html[data-accent-fill="light"] .btn:not(.ghost):not(.secondary):not(.quiet):not(.danger) { --btn-bd: var(--ink); }

.btn.ghost,
.btn.secondary {
  --btn-bg: var(--surface);
  --btn-fg: var(--accent-strong);
  --btn-bd: var(--line-strong);
  --btn-bg-hover: var(--accent-soft);
}
.btn.ghost:hover,
.btn.secondary:hover { border-color: var(--accent-line); }

.btn.neutral {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink-2);
  --btn-bd: var(--line-strong);
  --btn-bg-hover: var(--surface-2);
}

.btn.quiet {
  --btn-bg: transparent;
  --btn-fg: var(--accent-strong);
  --btn-bd: transparent;
  --btn-bg-hover: var(--accent-soft);
}

.btn.danger {
  --btn-bg: var(--bad);
  --btn-fg: var(--on-bad);
  --btn-bg-hover: #8F1D17;
}
.btn.danger.ghost {
  --btn-bg: var(--surface);
  --btn-fg: var(--bad);
  --btn-bd: var(--bad);
  --btn-bg-hover: var(--bad-soft);
}

.btn.small,
.btn.sm {
  min-height: var(--target-sm);
  padding: 0.375rem 0.75rem;
  font-size: var(--fs-sm);
  gap: var(--sp-1);
}
.btn.lg {
  min-height: var(--target-lg);
  padding: 0.75rem 1.5rem;
  font-size: var(--fs-lg);
}
.btn.block { display: flex; width: 100%; }

.btn[disabled],
.btn[aria-disabled="true"] {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--muted);
  --btn-bd: var(--line);
  --btn-bg-hover: var(--surface-2);
  opacity: 1;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn[disabled]:hover { background: var(--btn-bg); }

/* Chargement : le libellé reste lu par les lecteurs d'écran, un spinner le remplace visuellement. */
.btn[aria-busy="true"],
.btn.is-loading {
  color: transparent;
  pointer-events: none;
}
.btn[aria-busy="true"]::after,
.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid var(--btn-fg);
  border-right-color: transparent;
  border-radius: 50%;
  animation: ui-spin 0.7s linear infinite;
}
@keyframes ui-spin { to { transform: rotate(360deg); } }


/* ==========================================================================
   09 · CARTES, ZONE DE DÉPÔT, PUCES DE FICHIERS
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: clamp(1rem, 0.75rem + 1.1vw, 1.5rem);
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-1);
}
.card h2 {
  font-size: var(--fs-lg);
  margin: 0 0 var(--sp-1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}
.card > h2 + .hint { margin-top: 0; }

/* — Zone de dépôt —
   Accessibilité clavier SANS changer le markup : l'<input type=file> passe de
   display:none à « visuellement masqué ». Il reçoit le focus (Tab), s'ouvre
   avec Entrée/Espace, et la zone affiche l'anneau via :focus-within. */
.drop {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: var(--sp-2);
  min-height: 11rem;
  padding: var(--sp-8) var(--sp-6);
  text-align: center;
  color: var(--ink-2);
  font-weight: var(--fw-medium);
  background: var(--surface);
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.drop::before {          /* icône « upload » (Lucide, ISC) */
  content: "";
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: var(--sp-1);
  background: var(--accent-strong);
  -webkit-mask: var(--i-upload) center / contain no-repeat;
          mask: var(--i-upload) center / contain no-repeat;
}
.drop input[type="file"] {
  display: block;
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
  pointer-events: none;
}
.drop {
  background: color-mix(in srgb, var(--accent-soft) 40%, var(--surface));
  border-color: color-mix(in srgb, var(--accent-line) 50%, var(--line-strong));
}
.drop:hover {
  border-color: var(--accent-line);
  background: color-mix(in srgb, var(--accent-soft) 75%, var(--surface));
}
.drop__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--target);
  margin-top: var(--sp-2);
  padding: 0.5rem 1.25rem;
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--on-accent);
  background: var(--accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  pointer-events: none;                /* the click goes to the drop zone, which opens the file picker */
}
.drop:hover .drop__btn { background: var(--accent-hover); }
.drop.small .drop__btn { margin-top: 0; min-height: var(--target-sm); padding: 0.375rem 0.875rem; font-size: var(--fs-sm); }
.drop:focus-within {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: var(--focus-offset);
  border-color: var(--accent-line);
}
.drop.over {
  border-style: solid;
  border-color: var(--accent-line);
  background: var(--accent-soft);
  box-shadow: var(--shadow-inset-drop);
  color: var(--accent-strong);
}
.drop.small {
  min-height: 0;
  grid-auto-flow: column;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
}
.drop.small::before { width: 1.5rem; height: 1.5rem; margin: 0; }
.drop .fn {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  color: var(--muted);
  margin-top: var(--sp-1);
  overflow-wrap: anywhere;
}
.drop .drop-meta { font-size: var(--fs-sm); font-weight: var(--fw-regular); color: var(--muted); }

/* — Puces de fichiers chargés —
   <ul class="file-chips"><li class="file-chip"><svg class="icon">…</svg>
   <span class="file-chip__name">releve-mars.pdf</span><span class="file-chip__size">212 Ko</span>
   <button class="file-chip__remove" aria-label="Retirer releve-mars.pdf">…x…</button></li></ul> */
.file-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  list-style: none;
  margin: var(--sp-3) 0 0;
  padding: 0;
}
.file-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  max-width: 100%;
  min-height: 2.25rem;
  padding: var(--sp-1) var(--sp-1) var(--sp-1) var(--sp-3);
  font-size: var(--fs-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}
.file-chip .icon { width: 1rem; height: 1rem; color: var(--accent-strong); }
.file-chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
.file-chip__size { color: var(--muted); font-variant-numeric: tabular-nums; }
.file-chip.ok  { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.file-chip.bad { border-color: var(--bad); background: var(--bad-soft); }
.file-chip__remove {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.file-chip__remove:hover { color: var(--bad); background: var(--bad-soft); }
.file-chip__remove .icon { width: 1rem; height: 1rem; color: inherit; }


/* ==========================================================================
   10 · TABLEAUX
   Pas de zébrage par défaut (filets + survol de ligne) ; table.zebra en option.
   En-tête collant dans .scroll ; ombres de défilement horizontal en CSS pur.
   ========================================================================== */

table {
  width: 100%;
  border-collapse: separate;   /* requis pour un th sticky avec bordure */
  border-spacing: 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  margin-top: var(--sp-3);
  font-variant-numeric: lining-nums;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--ink-2);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: var(--surface-2);
  border-bottom-color: var(--line-strong);
}
thead th { position: sticky; top: 0; z-index: var(--z-sticky); }
tbody tr:hover > td { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
tbody tr:last-child > td { border-bottom: 0; }
td.num, th.num {
  text-align: right;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
td.num { font-feature-settings: "tnum" 1, "lnum" 1; }  /* filet de sécurité si font-variant ignoré */
tfoot td, tr.total > td {
  font-weight: var(--fw-semibold);
  background: var(--surface-2);
  border-top: 1px solid var(--line-strong);
}
table.zebra tbody tr:nth-child(even) > td { background: var(--surface-2); }
table.dense th, table.dense td { padding: var(--sp-1) var(--sp-2); }
caption { text-align: left; font-weight: var(--fw-semibold); padding-bottom: var(--sp-2); }

/* Conteneur défilant : ombres gauche/droite tant qu'il reste du contenu caché
   (technique background-attachment local/scroll). */
.scroll {
  overflow: auto;
  margin-top: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(to right, var(--surface) 30%, rgb(255 255 255 / 0)) left center / 2.5rem 100% no-repeat local,
    linear-gradient(to left,  var(--surface) 30%, rgb(255 255 255 / 0)) right center / 2.5rem 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgb(16 24 40 / 0.14), rgb(16 24 40 / 0)) left center / 0.75rem 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgb(16 24 40 / 0.14), rgb(16 24 40 / 0)) right center / 0.75rem 100% no-repeat scroll,
    linear-gradient(to top, var(--surface) 30%, rgb(255 255 255 / 0)) center bottom / 100% 2rem no-repeat local,
    radial-gradient(farthest-side at 50% 100%, rgb(16 24 40 / 0.16), rgb(16 24 40 / 0)) center bottom / 100% 0.75rem no-repeat scroll,
    var(--surface);
}
.scroll table { margin: 0; }
/* Mobile : on fait défiler plutôt que d'écraser les libellés mot par mot. */
@media (max-width: 48em) { .scroll table { min-width: 40rem; } }
.scroll:focus-visible { outline-offset: 0; }


/* ==========================================================================
   11 · KPI & BANNIÈRES DE CONTRÔLE
   ========================================================================== */

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}
.kpi {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.kpi b {
  display: block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--muted);
  letter-spacing: 0.02em;
}
.kpi span {
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.kpi.ok   { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.kpi.ok span { color: var(--ok); }
.kpi.bad  { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.kpi.bad span { color: var(--bad); }
.kpi.warn span { color: var(--warn); }

/* .check : bannière d'état. Icône ajoutée en CSS (le statut n'est pas porté
   par la seule couleur, WCAG 1.4.1). Vide → masquée. */
.check {
  --check-fg: var(--ink-2);
  --check-bg: var(--surface-2);
  --check-bd: var(--line);
  --check-icon: var(--i-info);
  position: relative;
  margin-top: var(--sp-3);
  padding: var(--sp-3) var(--sp-4) var(--sp-3) calc(var(--sp-4) + 1.25rem + var(--sp-3));
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  color: var(--check-fg);
  background: var(--check-bg);
  border: 1px solid var(--check-bd);
  border-left-width: 4px;
  border-radius: var(--radius-md);
}
/* Icône en position absolue : le contenu (texte + <b>, <ul>…) reste en flux inline normal. */
.check::before {
  content: "";
  position: absolute;
  left: var(--sp-4);
  top: calc(var(--sp-3) + 0.0625rem);
  width: 1.25rem;
  height: 1.25rem;
  background: currentColor;
  -webkit-mask: var(--check-icon) center / contain no-repeat;
          mask: var(--check-icon) center / contain no-repeat;
}
.check:empty { display: none; }
.check.ok   { --check-fg: var(--ok);   --check-bg: var(--ok-soft);   --check-bd: var(--ok);   --check-icon: var(--i-circle-check); }
.check.warn { --check-fg: var(--warn); --check-bg: var(--warn-soft); --check-bd: var(--warn); --check-icon: var(--i-triangle-alert); }
.check.bad  { --check-fg: var(--bad);  --check-bg: var(--bad-soft);  --check-bd: var(--bad);  --check-icon: var(--i-circle-x); }
.check.info { --check-fg: var(--info); --check-bg: var(--info-soft); --check-bd: var(--info); --check-icon: var(--i-info); }
.check ul { margin: var(--sp-1) 0 0; padding-left: 1.1rem; }
.check b, .check strong { color: inherit; }


/* ==========================================================================
   12 · ONGLETS, SÉLECTEUR DE LANGUE, BADGES, TAGS
   ========================================================================== */

/* .tabs button(.on) — onglets soulignés. Reconnaît aussi aria-selected. */
.tabs {
  display: flex;
  gap: var(--sp-1);
  margin: var(--sp-2) 0 var(--sp-4);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
}
.tabs button,
.tabs [role="tab"] {
  flex: none;
  min-height: var(--target);
  padding: var(--sp-2) var(--sp-4);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: inset 0 -2px 0 transparent;
  cursor: pointer;
  white-space: nowrap;
}
.tabs button:hover { color: var(--ink); background: var(--surface-2); }
.tabs button.on,
.tabs [aria-selected="true"] {
  color: var(--accent-strong);
  font-weight: var(--fw-semibold);
  box-shadow: inset 0 -3px 0 var(--accent-line);
  border-color: transparent;
}
.tabs button:focus-visible { outline-offset: -2px; }

/* .lang button(.on) — contrôle segmenté, cibles ≥ 32 px. */
.lang {
  display: inline-flex;
  float: none;
  gap: 0;
  padding: 2px;
  font-size: var(--fs-sm);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
}
.lang button {
  min-width: 2.5rem;
  min-height: 2rem;
  margin: 0;
  padding: 0 var(--sp-3);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.lang button:hover { background: var(--surface-2); }
.lang button.on,
.lang button[aria-pressed="true"] {
  color: #FFFFFF;
  background: var(--ink);
  border-color: var(--ink);
}

/* .badge — pastille d'information (compteur, état). */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  margin-left: var(--sp-2);
  padding: 0.125rem 0.625rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
}
.card h2 .badge { margin-left: 0; }
.badge:empty { display: none; }
.badge.gray { color: var(--ink-2); background: var(--surface-2); }
.badge.ok   { color: var(--ok);   background: var(--ok-soft); }
.badge.warn { color: var(--warn); background: var(--warn-soft); }
.badge.bad  { color: var(--bad);  background: var(--bad-soft); }

/* .tag — étiquette compacte (dans les tableaux). Neutre : bordée ;
   statuts de diff : pleins. */
.tag {
  display: inline-block;
  padding: 0 0.375rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: 1.5;
  white-space: nowrap;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.tag.ok,   .tag.added   { color: var(--ok);   background: var(--ok-soft);   border-color: transparent; }
.tag.warn, .tag.changed { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.tag.bad,  .tag.removed { color: var(--bad);  background: var(--bad-soft);  border-color: transparent; }
.tag.same  { color: var(--ink-2); background: var(--surface-2); border-color: transparent; }


/* ==========================================================================
   13 · FAQ & CONFIDENTIALITÉ
   ========================================================================== */

/* FAQ existante : h3 + p */
.faq h3 {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  margin: var(--sp-5) 0 var(--sp-1);
}
.faq h2 + h3 { margin-top: var(--sp-3); }
.faq p { margin: 0 0 var(--sp-2); color: var(--ink-2); max-width: var(--w-prose); }

/* FAQ accordéon : <div class="faq"><details><summary>Question</summary><p>Réponse</p></details>…</div>
   Natif, accessible clavier, indexable (le contenu replié reste dans le DOM). */
.faq details,
details.faq-item {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
  margin: 0;
}
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary,
details.faq-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--target);
  padding: var(--sp-3) 0;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker,
details.faq-item > summary::-webkit-details-marker { display: none; }
.faq summary::after,
details.faq-item > summary::after {
  content: "";
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--muted);
  -webkit-mask: var(--i-chevron-down) center / contain no-repeat;
          mask: var(--i-chevron-down) center / contain no-repeat;
  transition: transform var(--dur-2) var(--ease);
}
.faq details[open] > summary::after,
details.faq-item[open] > summary::after { transform: rotate(180deg); }
.faq summary:hover { color: var(--accent-strong); }
.faq details > :not(summary) { margin: 0 0 var(--sp-4); }

/* Note de confidentialité : encadré avec cadenas. */
.privacy {
  position: relative;
  margin-top: var(--sp-6);
  padding: var(--sp-4) var(--sp-4) var(--sp-4) calc(var(--sp-4) + 1.25rem + var(--sp-3));
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.privacy::before {
  content: "";
  position: absolute;
  left: var(--sp-4);
  top: var(--sp-4);
  width: 1.25rem;
  height: 1.25rem;
  background: var(--accent-strong);
  -webkit-mask: var(--i-lock) center / contain no-repeat;
          mask: var(--i-lock) center / contain no-repeat;
}


/* ==========================================================================
   14 · HEADER & FOOTER DE SITE
   <header class="site-header"><div class="site-header__inner">
     <a class="brand" href="/"><span class="brand__mark">…svg…</span><span class="brand__name">OutilsCompta</span></a>
     <nav class="site-nav" aria-label="Principal">
       <details class="menu"><summary>Outils</summary>
         <div class="menu__panel"><ul class="menu__grid">
           <li><a href="/releve-bancaire/"><svg class="icon">…</svg><span><b>Relevé bancaire</b><small>PDF → Excel, OFX</small></span></a></li>…
         </ul><a class="menu__all" href="/">Tous les outils</a></div>
       </details>
       <a class="site-nav__link" href="/guides/">Guides</a>
     </nav>
     <div class="lang">…</div>
   </div></header>
   (Fermeture du <details> au clic extérieur / Échap : 6 lignes de JS, cf. rapport.)
   ========================================================================== */

.site-header {
  position: relative;
  z-index: var(--z-header);
  max-width: none;                    /* neutralise header{max-width…} inline */
  margin: 0;
  padding: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  max-width: var(--w-page);
  min-height: 3.75rem;
  margin-inline: auto;
  padding: var(--sp-2) var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-right: auto;
  font-weight: var(--fw-bold);
  font-size: var(--fs-base);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  min-height: var(--target);
}
.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: var(--radius-md);
}
.brand__mark .icon { width: 1.25rem; height: 1.25rem; }
.site-header .lang { float: none; margin: 0; }

.site-nav { display: flex; align-items: center; gap: var(--sp-1); }
.site-nav > .menu { display: flex; align-items: center; }
.menu > summary { line-height: 1.2; }
.site-header .menu > summary { margin: 0; font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.site-nav__link,
.menu > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  min-height: var(--target);
  padding: 0 var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--ink-2);
  text-decoration: none;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.site-nav__link:hover,
.menu > summary:hover { color: var(--ink); background: var(--surface-2); }
.site-nav__link[aria-current="page"] { color: var(--accent-strong); box-shadow: inset 0 -2px 0 var(--accent-line); }

.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after {
  content: "";
  width: 1rem;
  height: 1rem;
  background: currentColor;
  -webkit-mask: var(--i-chevron-down) center / contain no-repeat;
          mask: var(--i-chevron-down) center / contain no-repeat;
  transition: transform var(--dur-1) var(--ease);
}
.menu[open] > summary { color: var(--accent-strong); background: var(--accent-soft); }
.menu[open] > summary::after { transform: rotate(180deg); }

.menu__panel {
  position: absolute;
  z-index: var(--z-dropdown);
  top: calc(100% + var(--sp-2));
  right: 0;                               /* la nav est à droite du header */
  width: min(40rem, calc(100vw - 2 * var(--gutter)));
  padding: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-3);
}
.menu__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: var(--sp-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu__grid a {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3);
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-md);
}
.menu__grid a:hover { background: var(--surface-2); }
.menu__grid a[aria-current="page"] { background: var(--accent-soft); }
.menu__grid .icon { margin-top: 0.1rem; color: var(--accent-strong); }
.menu__grid b { display: block; font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.menu__grid small { display: block; font-size: var(--fs-xs); color: var(--muted); }
.menu__all {
  display: block;
  margin-top: var(--sp-2);
  padding: var(--sp-3) var(--sp-3) var(--sp-1);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  border-top: 1px solid var(--line);
}

/* Mobile : header compact sur une ligne ; le panneau devient pleine largeur. */
@media (max-width: 40em) {
  .site-header__inner { gap: var(--sp-1); min-height: 3.25rem; }
  .brand__name { font-size: var(--fs-sm); }
  .site-nav__link, .menu > summary { padding: 0 var(--sp-2); }
  .menu { position: static; }
  .site-header__inner { position: relative; }
  .menu__panel {
    left: 0;
    right: 0;
    width: auto;
    top: 100%;
    max-height: calc(100dvh - 4rem);
    overflow-y: auto;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    border-inline: 0;
  }
}

/* Footer en colonnes */
.site-footer {
  margin-top: var(--sp-16);
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.site-footer__inner {
  max-width: var(--w-page);
  margin-inline: auto;
  padding: var(--sp-10) var(--gutter) var(--sp-8);
}
.footer-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--sp-8);
}
.footer-cols h2 {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--sp-3);
}
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li a {
  display: inline-block;
  padding: 0.3rem 0;              /* hauteur de cible ≥ 24 px */
  color: var(--ink-2);
  text-decoration: none;
}
.footer-cols li a:hover { color: var(--accent-strong); text-decoration: underline; }
.footer-about p { color: var(--muted); max-width: 36ch; }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-6);
  justify-content: space-between;
  margin-top: var(--sp-8);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.footer-legal a { color: var(--muted); }
@media (max-width: 40em) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-about { grid-column: 1 / -1; }
}


/* ==========================================================================
   15 · HERO D'OUTIL, PUCES DE FORMAT, RANGÉE DE CONFIANCE, ÉTAPES
   Le <header> actuel des pages (h1 + p.sub + .lang) est stylé comme hero
   sans changer le markup ; .hero sert aux pages neuves.
   ========================================================================== */

body > header:not(.site-header),
.hero {
  max-width: var(--w-tool);
  margin: 0 auto;
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem) var(--gutter) var(--sp-4);
}
body > header:not(.site-header) h1,
.hero h1 {
  font-size: var(--fs-2xl);
  margin: 0 0 var(--sp-2);
  max-width: 28ch;
}
/* Les sous-titres existants sont longs (3–5 lignes) : taille corps ; .hero (pages neuves, sous-titre court) : plus grand. */
body > header:not(.site-header) .sub { font-size: var(--fs-base); line-height: var(--lh-base); max-width: 70ch; }
.hero .sub { font-size: var(--fs-lg); line-height: var(--lh-snug); max-width: 62ch; }
body > header:not(.site-header) > .lang {
  float: right;
  margin: 0 0 var(--sp-3) var(--sp-4);
}
@media (max-width: 40em) {
  body > header:not(.site-header) > .lang { float: none; display: flex; width: fit-content; margin: 0 0 var(--sp-4) auto; }
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--accent-strong);
}

/* Puces de format : <ul class="format-chips"><li>PDF</li><li class="to">Excel</li>… */
.format-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  list-style: none;
  margin: var(--sp-4) 0 0;
  padding: 0;
}
.format-chips > li {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  min-height: 1.75rem;
  padding: 0 var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: 0.02em;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
}
.format-chips > li.arrow {               /* <li class="arrow" aria-hidden="true"><svg class="icon">arrow-right</svg></li> */
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
}
.format-chips > li.to { color: var(--accent-strong); border-color: var(--accent-line); background: var(--accent-soft); }

/* Rangée de confiance : 3–4 items, icône + texte court. */
.trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: var(--sp-3) var(--sp-6);
  list-style: none;
  margin: var(--sp-5) 0 0;
  padding: 0;
}
.trust > li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  color: var(--ink-2);
}
.trust .icon { width: 1.25rem; height: 1.25rem; color: var(--accent-strong); margin-top: -0.05rem; }
.trust b { color: var(--ink); }

/* Indicateur d'étapes :
   <ol class="steps"><li class="is-done">Déposer</li><li aria-current="step">Vérifier l'aperçu</li><li>Télécharger</li></ol> */
.steps {
  display: flex;
  gap: var(--sp-2);
  list-style: none;
  margin: var(--sp-4) 0 var(--sp-5);
  padding: 0;
  counter-reset: step;
}
.steps > li {
  counter-increment: step;
  display: flex;
  flex: 1 1 0;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--muted);
}
.steps > li::before {
  content: counter(step);
  flex: none;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
}
.steps > li:not(:last-child)::after {   /* trait de liaison */
  content: "";
  flex: 1 1 1.5rem;
  min-width: 1rem;
  height: 2px;
  margin-inline: var(--sp-1);
  background: var(--line);
  border-radius: 2px;
}
.steps > li[aria-current="step"] { color: var(--ink); font-weight: var(--fw-semibold); }
.steps > li[aria-current="step"]::before {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.steps > li.is-done { color: var(--ink-2); }
.steps > li.is-done::before {
  content: "";
  background: var(--accent-strong) var(--i-check-white) center / 1rem no-repeat;
  border-color: var(--accent-strong);
}
.steps > li.is-done:not(:last-child)::after { background: var(--accent-line); }
.steps__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 30em) {
  /* Mobile : seules les pastilles + le libellé de l'étape courante. */
  .steps > li:not([aria-current="step"]) { flex: 0 1 auto; font-size: 0; }
  .steps > li:not([aria-current="step"])::after { flex-basis: 1rem; }
  .steps > li[aria-current="step"] { flex: 1 1 auto; }
}


/* ==========================================================================
   16 · CARTES D'OUTILS (home)
   <ul class="tool-grid"><li><a class="tool-card" href="/releve-bancaire/">
     <span class="tool-card__icon"><svg class="icon">…</svg></span>
     <span class="tool-card__title">Relevé bancaire PDF → Excel</span>
     <span class="tool-card__desc">Pennylane, Sage, EBP. Contrôle de solde.</span>
     <span class="tool-card__meta"><span class="price-chip"><b>2,99 €</b></span><span class="tool-card__go">Ouvrir →</span></span>
   </a></li></ul>
   ========================================================================== */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: var(--sp-4);
  list-style: none;
  margin: var(--sp-6) 0 0;
  padding: 0;
}
.tool-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  height: 100%;
  padding: var(--sp-5);
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-1);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.tool-card:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}
.tool-card__icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: var(--sp-1);
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
}
.tool-card__icon .icon { width: 1.5rem; height: 1.5rem; }
.tool-card__title { font-size: var(--fs-lg); font-weight: var(--heading-weight, 600); line-height: var(--lh-tight); }
.tool-card__desc { font-size: var(--fs-sm); color: var(--muted); line-height: var(--lh-snug); }
.tool-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: var(--sp-3);
}
.tool-card__go { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--accent-strong); }
.tool-card:hover .tool-card__go { text-decoration: underline; }
.tool-card .price-chip { white-space: normal; border: 0; background: var(--surface-2); border-radius: var(--radius-sm); padding: 0.25rem 0.625rem; line-height: var(--lh-snug); color: var(--ink-2); }
.price-chip b { white-space: nowrap; }
.tool-card__meta { flex-wrap: wrap; }



/* ==========================================================================
   17 · PRIX (la modale de paiement est stylée par /shared/pay.js)
   ========================================================================== */

.price-chip {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-1);
  padding: 0.125rem 0.625rem;
  font-size: var(--fs-sm);
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
.price-chip b { color: var(--ink); font-weight: var(--fw-bold); }
.price-chip.free { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); background: var(--ok-soft); }

/* Ligne de prix existante <p class="sub" data-pay-price> : rendue en encart.
   :root:root pour passer devant « body > header:not(.site-header) .sub + .sub ». */
:root:root [data-pay-price] b { font-weight: var(--fw-bold); white-space: nowrap; }
:root:root [data-pay-price]:not(:empty) {
  display: inline-block;
  max-width: 100%;
  margin-top: var(--sp-3) !important;
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
  color: var(--ink);
  background: var(--surface-2);
  border: 0;
  border-left: 3px solid var(--accent-line);
  border-radius: var(--radius-sm);
  text-wrap: balance;
}

/* La modale de paiement est stylée par /shared/pay.js avec ces mêmes tokens. */

@keyframes ui-pop   { from { opacity: 0; transform: translateY(6px) scale(0.98); } }
@keyframes ui-sheet { from { transform: translateY(100%); } }


/* ==========================================================================
   18 · ARTICLE (guides)
   <main class="article"><article class="prose" lang="fr">…</article></main>
   ========================================================================== */

main.article { max-width: calc(var(--w-prose) + 2 * var(--gutter)); }

.prose {
  max-width: var(--w-prose);
  font-size: var(--fs-base);
  line-height: var(--lh-prose);
  color: var(--ink);
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}
.prose > * + * { margin-top: var(--sp-4); }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose h1 { font-size: var(--fs-3xl); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 var(--sp-4); hyphens: manual; }
.prose h2 { font-size: var(--fs-xl);  margin: var(--sp-12) 0 var(--sp-3); hyphens: manual; }
.prose h3 { font-size: var(--fs-lg);  margin: var(--sp-8) 0 var(--sp-2); hyphens: manual; }
.prose h2 + *, .prose h3 + * { margin-top: 0; }
.prose .lede { font-size: var(--fs-lg); line-height: var(--lh-snug); color: var(--ink-2); }
.prose .meta { font-size: var(--fs-sm); color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: var(--sp-2); }
.prose li::marker { color: var(--muted); }
.prose ol li::marker { font-variant-numeric: tabular-nums; font-weight: var(--fw-semibold); }
.prose a { font-weight: var(--fw-medium); }
.prose img, .prose figure { margin-block: var(--sp-6); border-radius: var(--radius-lg); }
.prose figcaption { font-size: var(--fs-sm); color: var(--muted); margin-top: var(--sp-2); }
.prose blockquote {
  margin-inline: 0;
  padding-left: var(--sp-4);
  border-left: 3px solid var(--line-strong);
  color: var(--ink-2);
}
.prose :not(pre) > code {
  padding: 0.1em 0.35em;
  font-size: 0.875em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  hyphens: none;
}
.prose pre {
  padding: var(--sp-4);
  overflow-x: auto;
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  hyphens: none;
}
.prose kbd {
  padding: 0.05em 0.4em;
  font-size: 0.85em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.prose table { display: block; overflow-x: auto; font-size: var(--fs-sm); hyphens: none; }
.prose th { position: static; }

/* Encadrés : <aside class="callout warn"><p><b>Attention</b> …</p></aside> */
.callout {
  --co-fg: var(--accent-strong);
  --co-bg: var(--accent-soft);
  --co-icon: var(--i-info);
  position: relative;
  padding: var(--sp-4) var(--sp-4) var(--sp-4) calc(var(--sp-4) + 1.25rem + var(--sp-3));
  color: var(--ink);
  background: var(--co-bg);
  border-left: 4px solid var(--co-fg);
  border-radius: var(--radius-md);
  line-height: var(--lh-base);
}
.callout::before {
  content: "";
  position: absolute;
  left: var(--sp-4);
  top: calc(var(--sp-4) + 0.15rem);
  width: 1.25rem;
  height: 1.25rem;
  background: var(--co-fg);
  -webkit-mask: var(--co-icon) center / contain no-repeat;
          mask: var(--co-icon) center / contain no-repeat;
}
.callout > * { margin: 0; }
.callout > * + * { margin-top: var(--sp-2); }
.callout.ok   { --co-fg: var(--ok);   --co-bg: var(--ok-soft);   --co-icon: var(--i-circle-check); }
.callout.warn { --co-fg: var(--warn); --co-bg: var(--warn-soft); --co-icon: var(--i-triangle-alert); }
.callout.bad  { --co-fg: var(--bad);  --co-bg: var(--bad-soft);  --co-icon: var(--i-circle-x); }
.callout.tip  { --co-icon: var(--i-check); }

/* Encadré « essayer l'outil » en fin de guide */
.cta-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-xl);
}


/* ==========================================================================
   19 · ICÔNES
   Inline : <svg class="icon" viewBox="0 0 24 24" aria-hidden="true">…</svg>
   Tracés Lucide (ISC). Le style (trait 1.75, arrondis) vient d'ici, les SVG
   n'ont besoin que des <path>.
   En CSS (pseudo-éléments, aucune requête réseau) : masques data-URI.
   ========================================================================== */

.icon {
  display: inline-block;
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  vertical-align: -0.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon.sm { width: 1rem; height: 1rem; }
.icon.lg { width: 1.5rem; height: 1.5rem; }

:root {
  --i-upload: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m17 8-5-5-5 5'/%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3C/svg%3E");
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  --i-check-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  --i-circle-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m16 9-5.5 5.5L8 12'/%3E%3C/svg%3E");
  --i-triangle-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
  --i-circle-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m15 9-6 6'/%3E%3Cpath d='m9 9 6 6'/%3E%3C/svg%3E");
  --i-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
  --i-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='11' x='3' y='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  --i-chevron-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}


/* ==========================================================================
   21 · DIRECTION A (stratégie de marque) — activée par <html data-dir="a">
   Sans attribut : direction B (design system), tokens §03.
   Toutes les paires texte/fond vérifiées WCAG AA (script de contraste, 0 échec).
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Deux Colonnes / Outils Compta — papier, encre, vert sapin. Sobre, sans ombre. */
html[data-dir="a"][data-site="outilscompta"],
html[data-dir="a"]:not([data-site]) {
  --accent: #0F6B4F;
  --on-accent: #FFFFFF;
  --accent-hover: #0B523C;
  --accent-strong: #0B523C;
  --accent-line: #0F6B4F;
  --accent-soft: #E6F2EC;
  --highlight: #E6F2EC;
  --ink: #14201B;
  --ink-2: #33433B;
  --muted: #56645D;
  --line: #DCE4DF;
  --line-strong: #7C8B83;
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --surface-2: #F1F4F0;
  --focus: #0F6B4F;
  --bad: #B4432F; --bad-soft: #FBEDE9;
  --radius-sm: 4px; --radius-md: 6px; --radius-lg: 6px; --radius-xl: 8px;
  --shadow-1: none;
  --shadow-2: 0 0 0 1px var(--line-strong);
  --heading-weight: 600;
}

/* Store Paperwork — bleu nuit pour l'action, ambre seulement en surlignage. */
html[data-dir="a"][data-site="storepaperwork"] {
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --accent: #13243A;
  --on-accent: #FFFFFF;
  --accent-hover: #0B1727;
  --accent-strong: #13243A;
  --accent-line: #13243A;
  --accent-soft: #FDF1DC;
  --highlight: #E8A33D;
  --ink: #13243A;
  --ink-2: #34445A;
  --muted: #56637A;
  --line: #DDE1E8;
  --line-strong: #7F8899;
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-2: #EEF0F4;
  --focus: #13243A;
  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 10px; --radius-xl: 14px;
  --heading-weight: 650;
}
/* Inter : chiffres proportionnels par défaut, on force les chiffres tabulaires. */
html[data-dir="a"][data-site="storepaperwork"] :is(table, td, th, .kpi, .kpis, .tnum, input) { font-variant-numeric: tabular-nums; }

/* File Chores — encre presque noire, jaune en accent, police système. */
html[data-dir="a"][data-site="filechores"] {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --accent: #1B1B1F;
  --on-accent: #FFFFFF;
  --accent-hover: #000000;
  --accent-strong: #1B1B1F;
  --accent-line: #1B1B1F;
  --accent-soft: #FDF3D6;
  --highlight: #F5C542;
  --ink: #1B1B1F;
  --ink-2: #3E3D44;
  --muted: #5F5E66;
  --line: #E6E3DC;
  --line-strong: #8B8880;
  --bg: #FBFAF8;
  --surface: #FFFFFF;
  --surface-2: #F5F2EC;
  --focus: #1B1B1F;
  --warn: #835400; --warn-soft: #FCF3DC;
  --info: #2F5A86; --info-soft: #EBF1F7;
  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 8px; --radius-xl: 12px;
  --heading-weight: 700;
}
html[data-dir="a"][data-site="filechores"] h1,
html[data-dir="a"][data-site="filechores"] h2 { letter-spacing: -0.012em; }

html[data-dir="a"][data-site="storepaperwork"] { --link: #1D4ED8; --warn: #9C3D10; --warn-soft: #FCEDE6; }
html[data-dir="a"][data-site="filechores"] { --link: #2457B8; }
html[data-dir="a"] :where(main) a:where(:not(.btn, .tool-card, .crumbs a, .link-list a)) { color: var(--link, var(--accent-strong)); }
html[data-dir="a"] .tool-card__go { color: var(--link, var(--accent-strong)); }
html[data-dir="a"][data-site="storepaperwork"] .hero__eyebrow,
html[data-dir="a"][data-site="filechores"] .hero__eyebrow {
  padding: 0.25rem 0.75rem;
  color: var(--ink);
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
}
html[data-dir="a"][data-site="storepaperwork"] .hero__eyebrow .icon,
html[data-dir="a"][data-site="filechores"] .hero__eyebrow .icon { color: var(--ink); }

/* Surlignage de marque (ambre / jaune en A ; teinte d'accent en B). */
:root { --highlight: var(--accent-soft); }
.nw { white-space: nowrap; }
.brand__name { font-size: 1.0625rem; letter-spacing: -0.01em; }
mark, .hl {
  background: linear-gradient(transparent 58%, var(--highlight) 58%, var(--highlight) 92%, transparent 92%);
  color: inherit;
  padding: 0 0.05em;
}


/* ==========================================================================
   22 · LOGOS (SVG inline, couleurs par tokens)
   ========================================================================== */

.logo { width: 2rem; height: 2rem; flex: none; display: block; }
.logo__bg { fill: var(--accent); }
.logo__fg { fill: none; stroke: var(--on-accent); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.logo__hl { fill: none; stroke: var(--logo-hl, var(--on-accent)); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
html[data-dir="a"][data-site="storepaperwork"],
html[data-dir="a"][data-site="filechores"] { --logo-hl: var(--highlight); }
.brand__mark { background: none; width: auto; height: auto; }
.brand__name { white-space: nowrap; }


/* ==========================================================================
   23 · FIL D'ARIANE, SECTIONS DE HOME, GUIDES, 404
   ========================================================================== */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-2);
  list-style: none;
  margin: 0 0 var(--sp-4);
  padding: 0;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.crumbs { flex-wrap: nowrap; min-width: 0; }
.crumbs li { white-space: nowrap; }
.crumbs li[aria-current] { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.crumbs li + li::before { content: "/"; margin-right: var(--sp-2); color: var(--line-strong); }
.crumbs a { color: var(--muted); display: inline-block; padding: 0.25rem 0; }
.prose .crumbs { padding-left: 0; }
.prose .crumbs li + li { margin-top: 0; }
.prose .crumbs li::marker { content: none; }
.crumbs a:hover { color: var(--accent-strong); }

.page { max-width: var(--w-page); margin-inline: auto; padding: 0 var(--gutter) var(--sp-8); }
main.page { padding-top: 0; }

.home-hero {
  display: grid;
  gap: var(--sp-10);
  align-items: center;
  padding: clamp(2rem, 1rem + 4vw, 4.5rem) 0 var(--sp-8);
}
.home-hero__text { max-width: 46rem; }
@media (min-width: 64em) {
  .home-hero:has(.demo) { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); }
}
@media (max-width: 63.99em) { .home-hero .demo { display: none; } }
@media (max-width: 40em) {
  .home-hero { padding-top: var(--sp-6); gap: var(--sp-6); }
  .home-hero .trust { gap: var(--sp-2) var(--sp-3); }
  .home-hero .trust__rest { display: none; }
  .home-hero .actions .btn { flex: 1 1 100%; }
}
td.num, th.num { white-space: nowrap; }
.home-hero .actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin: var(--sp-6) 0 0; }

@media (max-width: 40em) {
  body > header:not(.site-header) > nav[aria-label="Breadcrumb"] { display: none; }
  body > header:not(.site-header) { padding-top: var(--sp-5); }
  body > header:not(.site-header) .sub { font-size: var(--fs-sm); line-height: 1.45; }
  body > header:not(.site-header) .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-3); margin-top: var(--sp-3); }
  body > header:not(.site-header) .trust > li { font-size: var(--fs-xs); align-items: center; }
  body > header:not(.site-header) .trust .icon { width: 1rem; height: 1rem; margin: 0; }
  body > header:not(.site-header) .trust__rest { display: none; }
  body > header:not(.site-header) .format-chips { margin-top: var(--sp-3); }
  .drop { min-height: 0; padding: var(--sp-5) var(--sp-4); }
  .drop__btn { width: 100%; }
}
@media (hover: none) and (pointer: coarse) {
  .drop > span[data-i18n], .drop > b[data-i18n] { display: none; }
}

/* — Exemple de résultat (accueil) — */
.demo { margin: 0; }
.demo__cap { font-size: var(--fs-xs); font-weight: var(--fw-semibold); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--sp-2); }
.demo__card {
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2);
}
.demo__title { margin: 0 0 var(--sp-3); font-weight: var(--fw-semibold); font-size: var(--fs-sm); color: var(--ink); }
.demo__table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.demo__table th { text-align: left; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--muted); padding: 0 0 var(--sp-2); border-bottom: 1px solid var(--line); }
.demo__table td { padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.demo__table td + td, .demo__table th + th { padding-left: var(--sp-3); }
.demo__table .num { text-align: right; }
.demo__lines { margin: 0; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.demo__lines > div { display: flex; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.demo__lines dt { color: var(--ink-2); }
.demo__lines dd { margin: 0; white-space: nowrap; }
.demo__lines > .total { font-weight: var(--fw-bold); border-bottom: 0; }
.demo__files { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.demo__files li { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.demo__files .icon { color: var(--accent-strong); }
.demo__more { margin: var(--sp-2) 0 0; font-size: var(--fs-xs); color: var(--muted); }
.demo .check { margin-top: var(--sp-4); font-size: var(--fs-sm); }
.demo .format-chips { margin-top: var(--sp-3); }
.home-hero h1 { font-size: var(--fs-3xl); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 var(--sp-4); max-width: 22ch; }
.home-hero .lede { font-size: var(--fs-lg); line-height: var(--lh-snug); color: var(--ink-2); max-width: 60ch; margin: 0; }
.home-hero .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 46rem; }
@media (max-width: 40em) { .home-hero .trust { grid-template-columns: minmax(0, 1fr); } }


.section { padding: var(--sp-12) 0 0; }
.section > h2 { font-size: var(--fs-xl); margin: 0 0 var(--sp-2); }
.section > .section__sub { color: var(--muted); margin: 0 0 var(--sp-2); max-width: 62ch; }
.section .tool-grid { margin-top: var(--sp-5); }

.how {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--sp-4);
  list-style: none;
  margin: var(--sp-5) 0 0;
  padding: 0;
  counter-reset: how;
}
.how > li {
  counter-increment: how;
  position: relative;
  padding: var(--sp-5) var(--sp-5) var(--sp-5) calc(var(--sp-5) + 2.25rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font-size: var(--fs-sm);
  color: var(--ink-2);
  line-height: var(--lh-snug);
}
.how > li::before {
  content: counter(how);
  position: absolute;
  left: var(--sp-4);
  top: var(--sp-5);
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 50%;
}
.how b { display: block; color: var(--ink); font-size: var(--fs-base); margin-bottom: var(--sp-1); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--sp-6) var(--sp-8);
  margin-top: var(--sp-5);
}
.why-grid > div { display: flex; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--ink-2); line-height: var(--lh-snug); }
.why-grid .icon { width: 1.5rem; height: 1.5rem; color: var(--accent-strong); flex: none; }
.why-grid b { display: block; color: var(--ink); font-size: var(--fs-base); margin-bottom: var(--sp-1); }

.for-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: var(--sp-2) var(--sp-8);
  list-style: none;
  margin: var(--sp-4) 0 0;
  padding: 0;
}
.for-list li { position: relative; padding-left: 1.75rem; color: var(--ink-2); }
.for-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 1.15rem;
  height: 1.15rem;
  background: var(--accent-strong);
  -webkit-mask: var(--i-check) center / contain no-repeat;
          mask: var(--i-check) center / contain no-repeat;
}

.guide-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: var(--sp-6) var(--sp-8);
  margin-top: var(--sp-5);
}
.guide-groups h3 {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0 0 var(--sp-2);
}
.guide-groups h3 .icon { color: var(--accent-strong); }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-top: 1px solid var(--line); }
.link-list li:last-child { border-bottom: 1px solid var(--line); }
.link-list a {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  color: var(--ink);
  text-decoration: none;
  line-height: var(--lh-snug);
}
.link-list a::after {
  content: "";
  flex: none;
  width: 1rem;
  height: 1rem;
  margin-top: 0.15em;
  background: var(--muted);
  -webkit-mask: var(--i-arrow-right) center / contain no-repeat;
          mask: var(--i-arrow-right) center / contain no-repeat;
}
.link-list a:hover { color: var(--accent-strong); }
.link-list a:hover::after { background: var(--accent-strong); }

.disclaimer { margin-top: var(--sp-12); font-size: var(--fs-sm); color: var(--muted); max-width: 72ch; }

/* — Guide : article + colonne latérale collante (CTA + sommaire) — */
.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-8);
  padding-top: var(--sp-6);
}
@media (min-width: 64em) {
  .guide-layout { grid-template-columns: minmax(0, var(--w-prose)) 19rem; justify-content: space-between; }
  .guide-aside { position: sticky; top: var(--sp-6); align-self: start; }
}
.guide-aside { display: flex; flex-direction: column; gap: var(--sp-5); }
.guide-aside .cta-card { flex-direction: column; align-items: stretch; gap: var(--sp-3); }
.cta-card__title { font-weight: var(--fw-semibold); font-size: var(--fs-base); color: var(--ink); margin: 0; }
.cta-card__meta { font-size: var(--fs-sm); color: var(--muted); margin: 0; }
.cta-card .format-chips { margin: 0; }
.toc { font-size: var(--fs-sm); }
.toc h2 { font-size: var(--fs-xs); font-weight: var(--fw-semibold); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--sp-2); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: var(--sp-1) var(--sp-3); color: var(--ink-2); text-decoration: none; line-height: var(--lh-snug); }
.toc a:hover { color: var(--accent-strong); }
@media (max-width: 63.99em) { .toc { display: none; } }
.prose .cta-card { margin-top: var(--sp-10); }
.related { margin-top: var(--sp-12); }
.related h2 { font-size: var(--fs-lg); margin: 0 0 var(--sp-3); }

/* — Pages légales et journal : simple colonne de lecture — */
main.legal { max-width: calc(var(--w-prose) + 2 * var(--gutter)); padding-top: var(--sp-8); }

/* — 404 — */
.notfound { padding: var(--sp-16) 0 var(--sp-8); max-width: 40rem; }
.notfound h1 { font-size: var(--fs-3xl); margin-bottom: var(--sp-3); }

/* — Outils : FAQ propre au placement (remplace la FAQ du gabarit) — */
.tool-faq { margin-top: var(--sp-6); }
.tool-faq h2 { font-size: var(--fs-xl); margin-bottom: var(--sp-3); }

/* — Footer : marque — */
.footer-about .brand { margin: 0 0 var(--sp-3); min-height: 0; }



:root {
  --i-arrow-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E");
}


/* ==========================================================================
   20 · PRÉFÉRENCES & MÉDIAS
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .tool-card:hover, .btn:active { transform: none; }
}

/* Contraste forcé (Windows) : les masques CSS disparaissent, on garde des bords. */
@media (forced-colors: active) {
  .btn, .lang, .tabs button.on, .drop, .check, .callout, .kpi, .card { border: 1px solid CanvasText; }
  .tabs button.on { text-decoration: underline; }
  .drop.over { border-style: solid; }
  .check::before, .callout::before, .privacy::before, .drop::before { forced-color-adjust: none; background: CanvasText; }
}

@media print {
  body { background: #FFFFFF; font-size: 10.5pt; }
  .site-header, .site-footer, .lang, .actions, .drop, .tabs, #mt-paywall, .btn { display: none !important; }
  main, body > header:not(.site-header) { max-width: none; padding: 0; }
  .card { border: 0; box-shadow: none; padding: 0; break-inside: avoid; }
  .scroll { overflow: visible; max-height: none !important; border: 0; background: none; }
  thead th { position: static; }
  thead { display: table-header-group; }
  tr { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
