/* =====================================================================
   printrz — composants (refonte 2026-10)
   Base, puis composants dans l'ordre du brief. N'utilise que les variables de tokens.css.
   Aucun style inline ailleurs (CSP) : tout état passe par une classe ou un attribut ARIA.
   ===================================================================== */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text-2);
  font-family: var(--font); font-size: var(--fs-body); line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { margin: 0; color: var(--text); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0; }
a { color: var(--accent-t); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.num, .tabular { font-variant-numeric: tabular-nums; }
::selection { background: var(--selection); color: var(--text); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100; padding: 10px 16px;
  background: var(--accent-btn); color: #FFFFFF; border-radius: var(--r-ctl); font-weight: 600;
}
.skip-link:focus { top: var(--s-4); }

.ico { flex: none; width: 18px; height: 18px; }
.ico--20 { width: 20px; height: 20px; }
.ico--16 { width: 16px; height: 16px; }

.muted { color: var(--text-3); }
.label { font-size: var(--fs-label); font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.section-label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 24px; height: 24px; }
.logo-mark .c { fill: var(--logo-c); } .logo-mark .m { fill: var(--logo-m); }
.logo-mark .y { fill: var(--logo-y); } .logo-mark .k { fill: var(--logo-k); }
.logo-word { display: inline-block; width: 3.3em; font-size: 21px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.045em; line-height: 1; white-space: nowrap; } /* largeur fixe : le mot ne bouge pas à l'arrivée de la police */
/* Logo animé (Lorenzo, 2026-10-23 : « léger mais cool ») : CSS seul, transform et opacité uniquement.
   - arrivée : les disques apparaissent l'un après l'autre avec un petit rebond, une fois par page (0,6 s) ;
   - survol ou focus du lien : le carré de disques fait un quart de tour, effet ressort ;
   - tout est coupé avec prefers-reduced-motion. */
.logo-mark { transition: transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.logo-mark circle { transform-box: fill-box; transform-origin: center; animation: logo-dot 520ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.logo-mark .m { animation-delay: 70ms; }
.logo-mark .k { animation-delay: 140ms; }
.logo-mark .y { animation-delay: 210ms; }
.logo-word { animation: logo-word 420ms 120ms ease-out both; }
.logo:hover .logo-mark, .logo:focus-visible .logo-mark { transform: rotate(90deg); }
@keyframes logo-dot { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: scale(1); } }
@keyframes logo-word { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .logo-mark, .logo-mark circle, .logo-word { animation: none; transition: none; }
  .logo:hover .logo-mark, .logo:focus-visible .logo-mark { transform: none; }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: var(--r-ctl); border: 1px solid transparent;
  font-size: var(--fs-ui); font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer;
  text-decoration: none; transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn .ico { width: 16px; height: 16px; }
.btn--primary { background: var(--accent-btn); color: #FFFFFF; }
.btn--primary:hover { background: var(--accent-btn-h); }
.btn--secondary { background: var(--card); border-color: var(--line-2); color: var(--text); }
.btn--secondary:hover { background: var(--hover); }
.btn--ghost { background: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--hover); color: var(--text); }
.btn--danger { background: var(--card); border-color: var(--line-2); color: var(--err); }
.btn--danger:hover { background: var(--err-bg); }
.btn--lg { min-height: 50px; padding: 0 22px; font-size: var(--fs-body); }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: var(--fs-small); }
.btn--block { display: flex; width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

.btn-icon {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border-radius: var(--r-ctl); background: var(--card-2); border: 1px solid var(--line-2); color: var(--text-2);
  cursor: pointer; transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.btn-icon:hover { background: var(--hover); color: var(--text); }
.btn-icon[aria-pressed="true"] { color: var(--text); border-color: var(--accent); }

/* Bouton d'action d'outil : un seul par écran, en bas du panneau */
.btn-action {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px;
  border: 0; border-radius: var(--r-ctl); background: var(--action); color: #FFFFFF;
  font-size: var(--fs-body); font-weight: 700; cursor: pointer;
  box-shadow: var(--action-shadow);
  transition: filter var(--t) var(--ease);
}
.btn-action:hover { filter: brightness(1.08); }
.btn-action:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }

/* ---------- Champs ---------- */
.field { display: grid; gap: 6px; align-content: start; }
.field > label, .field-label { font-size: var(--fs-small); font-weight: 600; color: var(--text); }
.field-hint { font-size: var(--fs-label); color: var(--muted); }
.field-error { display: flex; gap: 6px; align-items: center; font-size: var(--fs-label); color: var(--err); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: var(--r-ctl);
  background: var(--field-bg); border: 1px solid var(--line-ctl); color: var(--text); font-size: var(--fs-ui);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.textarea { min-height: 110px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.select { appearance: none; padding-right: 36px; background-image: none; }
.select-wrap { position: relative; }
.select-wrap .ico { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input[aria-invalid="true"] { border-color: var(--err); }
.input--sm, .select--sm { min-height: 38px; padding: 0 10px; font-size: var(--fs-small); }
.input-unit { display: flex; align-items: center; gap: 8px; }
.input-unit .input { text-align: right; }
.input-unit span { font-size: var(--fs-label); color: var(--muted); min-width: 24px; }

/* Mot de passe : bouton « Afficher » dans le champ */
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 92px; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 34px; padding: 0 10px;
  border: 0; border-radius: var(--r-seg); background: transparent; color: var(--text-3); font-size: var(--fs-label); font-weight: 600; cursor: pointer;
}
.password-toggle:hover { color: var(--text); background: var(--hover); }
.field--invalid .input { border-color: var(--err); }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 40px; padding: 10px 0; cursor: pointer; font-size: var(--fs-ui); color: var(--text-2); }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }

/* Curseur fin */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: 0; background: transparent; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--line-2); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--thumb); border: 3px solid var(--accent); }
.range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line-2); }
.range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--thumb); border: 3px solid var(--accent); }

/* ---------- Contrôle segmenté et choix en pilules ---------- */
.seg { display: flex; gap: 2px; padding: 3px; background: var(--seg-bg); border: 1px solid var(--seg-line); border-radius: var(--r-ctl); }
.seg button {
  flex: 1; min-height: 34px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--r-seg);
  background: transparent; color: var(--text-3); font-size: var(--fs-small); font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--seg-on); border-color: var(--seg-on-line); color: var(--text); box-shadow: var(--seg-shadow); }
.seg--pill { border-radius: var(--r-pill); }
.seg--pill button { border-radius: var(--r-pill); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  min-height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2);
  background: transparent; color: var(--text-3); font-size: var(--fs-label); font-weight: 600; cursor: pointer;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--line-ctl); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: rgba(59, 130, 246, 0.55); color: var(--accent-t); }

/* ---------- Statuts et badges ---------- */
.status {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  font-size: var(--fs-label); font-weight: 600; white-space: nowrap; background: var(--card-2); color: var(--text-2);
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--ok { background: var(--ok-bg); color: var(--ok); }
.status--warn { background: var(--warn-bg); color: var(--warn); }
.status--err { background: var(--err-bg); color: var(--err); }
.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent-t); font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em;
}

/* ---------- Cartes ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; }
.card--lg { border-radius: var(--r-card-lg); padding: 24px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; }
.card-title { font-size: var(--fs-card-title); font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.inset { background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r-inset); padding: 14px; }

/* Indicateur (KPI) */
.kpi { display: grid; gap: 10px; }
.kpi-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-ctl); background: var(--hover); color: var(--text-2); }
.kpi-label { font-size: var(--fs-small); color: var(--text-3); }
.kpi-value { font-size: 30px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-delta { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-label); font-weight: 600; }
.kpi-delta--up { color: var(--ok); } .kpi-delta--down { color: var(--err); }

/* ---------- Tableau ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-inset); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.table th { background: var(--card-2); color: var(--muted); font-size: var(--fs-label); font-weight: 600; text-align: left; padding: 10px 14px; white-space: nowrap; }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); color: var(--text-2); vertical-align: middle; }
.table tbody tr { transition: background-color var(--t) var(--ease); }
.table tbody tr:hover { background: var(--card-2); }
.table .num, .table th.num { text-align: right; }

/* ---------- Barre de l'atelier (une seule barre en haut, refonte du 2026-10-22) ---------- */
.appbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar-h); display: flex; align-items: center; gap: 20px;
  padding: 0 12px 0 20px; background: var(--card); border-bottom: 1px solid var(--line);
}
.appbar-logo { flex: none; gap: 8px; border-radius: var(--r-menu); }
.appbar-logo .logo-mark { width: 22px; height: 22px; }
.appbar-logo .logo-word { font-size: 20px; }
.apptabs { display: flex; gap: 4px; min-width: 0; padding: 4px; margin: -4px 0; overflow-x: auto; scrollbar-width: none; } /* défile plutôt que de déborder sur une largeur intermédiaire */
.apptabs::-webkit-scrollbar { display: none; }
.apptab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: var(--r-ctl);
  color: var(--muted); font-size: var(--fs-ui); font-weight: 600; white-space: nowrap; text-decoration: none;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.apptab:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.apptab[aria-current="page"] { background: var(--hover); color: var(--text); }
.apptab[aria-current="page"] .ico { color: var(--tc, var(--accent)); }
.apptab--tramedtf { --tc: var(--tool-tramedtf); }
.apptab--controle-fichier { --tc: #D4A800; } /* jaune d'outil assombri : picto lisible sur fond clair (décor, libellé à côté) */
.apptab--bat { --tc: var(--tool-bat); }
.apptab--dtf-ready { --tc: var(--tool-dtfready); }
.apptab--separation { --tc: var(--tool-separation); }
.apptab--seuilshold { --tc: var(--tool-seuilshold); }
.pro-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--r-pill); background: var(--pro-bg); color: var(--pro-t); font-size: 11px; font-weight: 700; }
.appbar-end { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.plan-chip {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; margin-right: 4px; border-radius: var(--r-pill);
  border: 1px solid var(--line); color: var(--text-2); font-size: var(--fs-small); font-weight: 600; white-space: nowrap; text-decoration: none;
}
a.plan-chip:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.plan-chip--pro { border-color: transparent; background: var(--pro-bg); color: var(--pro-t); }
.btn-icon--plain { background: transparent; border-color: transparent; color: var(--muted); width: 40px; height: 40px; }
.btn-icon--plain:hover { background: var(--hover); color: var(--text); }

/* Menu du compte : <details>, ouvert sans script */
.usermenu { position: relative; }
.avatar-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; list-style: none; cursor: pointer;
  background: var(--accent-soft); color: var(--accent-t); font-size: var(--fs-small); font-weight: 700;
  transition: box-shadow var(--t) var(--ease);
}
.avatar-btn::-webkit-details-marker { display: none; }
.avatar-btn:hover, .usermenu[open] .avatar-btn, .avatar-btn[data-current] { box-shadow: 0 0 0 2px var(--accent); }
.avatar-btn:focus-visible { border-radius: 50%; }
.usermenu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 280px; display: grid; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-inset); box-shadow: var(--pop-shadow);
}
.usermenu-who { display: grid; gap: 2px; padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.usermenu-email { font-size: var(--fs-ui); font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.usermenu-plan { font-size: var(--fs-small); color: var(--muted); }
.usermenu-label { padding: 8px 10px 2px; font-size: var(--fs-label); font-weight: 700; color: var(--muted); }
.usermenu-sep { height: 1px; margin: 4px; border: 0; background: var(--line); }
.usermenu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: var(--r-menu);
  background: transparent; color: var(--text); font-size: var(--fs-ui); font-weight: 500; text-align: left; text-decoration: none; cursor: pointer;
}
.usermenu-item .ico { color: var(--muted); }
.usermenu-item:hover { background: var(--hover); text-decoration: none; }
.usermenu-item[aria-current="page"] { background: var(--hover); font-weight: 600; }
.usermenu form { margin: 0; }

kbd, .kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 6px;
  border-radius: 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--card-2);
  color: var(--text-3); font-family: var(--font); font-size: 11.5px; font-weight: 600;
}

/* ---------- Panneau d'outil ---------- */
.setting { display: grid; gap: 8px; }
.setting-head { display: flex; align-items: center; gap: 6px; }
.setting-head .field-label { font-size: 13.5px; }
.setting-value { margin-left: auto; font-size: var(--fs-small); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

/* Aide « i » : details/summary, sans script */
.help { position: relative; display: inline-block; }
.help summary {
  display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; list-style: none; cursor: pointer;
  border: 1px solid var(--line-ctl); color: var(--text-3); font-size: 11px; font-weight: 700; font-style: italic;
}
.help summary::-webkit-details-marker { display: none; }
.help summary::after { content: ""; position: absolute; inset: -11px; } /* zone cliquable de 40 px */
.help[open] summary { border-color: var(--accent); color: var(--text); }
.help-body {
  position: absolute; z-index: 20; left: -8px; top: 26px; width: 260px; padding: 12px 14px;
  background: var(--card-2); border: 1px solid var(--line-2); border-radius: var(--r-inset);
  font-size: var(--fs-small); color: var(--text-2); line-height: 1.5; box-shadow: var(--pop-shadow);
}

/* Section repliée */
.fold { border-top: 1px solid var(--line); }
.fold > summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 44px; list-style: none; cursor: pointer;
  font-size: var(--fs-small); font-weight: 600; color: var(--text-2);
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary .ico { color: var(--muted); transition: transform var(--t) var(--ease); }
.fold[open] > summary .ico { transform: rotate(180deg); }
.fold-body { display: grid; gap: 16px; padding: 4px 0 16px; }
.danger-zone > summary { color: var(--err); }
.danger-zone > form { padding: 4px 0 4px; }

/* Indicateur « Encre déposée » */
.meter { display: grid; gap: 8px; }
.meter-row { display: flex; align-items: baseline; justify-content: space-between; font-size: var(--fs-small); color: var(--text-3); }
.meter-row strong { font-size: var(--fs-body); color: var(--text); font-variant-numeric: tabular-nums; }
.meter-bar { height: 6px; border-radius: 3px; background: var(--bg); overflow: hidden; }
.meter-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--accent); }

/* ---------- Zone de travail ---------- */
.empty {
  display: grid; place-items: center; text-align: center; gap: 14px; padding: 48px 24px; min-height: 360px;
  background: var(--canvas); border: 1px dashed var(--line-2); border-radius: var(--r-card);
}
.empty-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line-2); color: var(--text-2); }
.empty-title { font-size: 18px; font-weight: 700; color: var(--text); }
.empty-hint { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); color: var(--text-3); }

.floatbar {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: var(--r-pill);
  background: var(--float-bg); border: 1px solid var(--line-2); backdrop-filter: blur(8px);
}
.floatbar .seg { border: 0; background: transparent; padding: 0; }
.floatbar .btn-icon { width: 34px; height: 34px; border-radius: 50%; background: transparent; border: 0; }
.floatbar output { min-width: 52px; text-align: center; font-size: var(--fs-label); font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }

.metas { display: flex; flex-wrap: wrap; gap: 6px; }
.meta { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-pill); background: var(--card-2); border: 1px solid var(--line); font-size: var(--fs-label); color: var(--text-2); }
.meta .ico { width: 14px; height: 14px; color: var(--muted); }

/* ---------- Contrôle fichier : verdict et lignes de contrôle ---------- */
.verdict { display: flex; align-items: center; gap: 14px; }
.verdict-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; }
.verdict--ok .verdict-icon { background: var(--ok-bg); color: var(--ok); }
.verdict--warn .verdict-icon { background: var(--warn-bg); color: var(--warn); }
.verdict--err .verdict-icon { background: var(--err-bg); color: var(--err); }
.verdict-text { display: grid; gap: 2px; }
.verdict-title { font-size: var(--fs-body); font-weight: 700; color: var(--text); }
.verdict-count { font-size: var(--fs-small); color: var(--text-3); }

.check-row { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.check-row:first-child { border-top: 0; }
.check-dot { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.check-dot .ico { width: 14px; height: 14px; }
.check-row--ok .check-dot { background: var(--ok-bg); color: var(--ok); }
.check-row--warn .check-dot { background: var(--warn-bg); color: var(--warn); }
.check-row--err .check-dot { background: var(--err-bg); color: var(--err); }
.check-title { font-size: var(--fs-ui); font-weight: 700; color: var(--text); }
.check-detail { font-size: var(--fs-small); color: var(--text-2); margin-top: 2px; }
.check-fix { font-size: var(--fs-small); color: var(--muted); margin-top: 4px; }

/* ---------- Messages ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-inset); font-size: var(--fs-small); border: 1px solid transparent; }
.alert .ico { margin-top: 1px; }
.alert--ok { background: var(--ok-bg); color: var(--ok); }
.alert--warn { background: var(--warn-bg); color: var(--warn); }
.alert--err { background: var(--err-bg); color: var(--err); }
.alert--info { background: var(--accent-soft); color: var(--accent-t); }
.alert p { color: var(--text-2); }
.alert strong { color: var(--text); }

/* Code à six chiffres */
.otp { display: flex; gap: 8px; justify-content: center; }
.otp input {
  flex: 1 1 0; min-width: 0; width: 100%; max-width: 56px; height: 56px; text-align: center; border-radius: var(--r-ctl); background: var(--field-bg);
  border: 1px solid var(--line-ctl); color: var(--text); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.otp input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

/* Accordéon (FAQ) */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-inset); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 18px; list-style: none; cursor: pointer; font-weight: 600; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { color: var(--muted); }
.faq summary .ico-open, .faq details[open] summary .ico-closed { display: none; }
.faq details[open] summary .ico-open { display: block; }
.faq details > div { padding: 0 18px 18px; color: var(--text-2); }

/* Squelette (rapport en attente) */
.skeleton { display: block; height: 12px; border-radius: 6px; background: var(--card-2); }
.skeleton--lg { height: 18px; } .skeleton--w60 { width: 60%; } .skeleton--w40 { width: 40%; } .skeleton--w80 { width: 80%; }

/* ---------- Réglages enregistrés (tools/shared/presets.js) ---------- */
.presets { display: grid; gap: 8px; }
.presets-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px; }
.presets-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.presets-row[hidden], .presets-form[hidden] { display: none; }
.presets-select { min-width: 0; appearance: auto; cursor: pointer; }
.presets-select:disabled { cursor: default; color: var(--muted); }
.presets-form .input { flex: 1 1 100%; min-width: 0; }
.presets-del { width: 38px; height: 38px; flex: none; }
.presets-del:disabled { opacity: 0.45; cursor: not-allowed; }
.presets-status { margin: 0; }
.presets-status:empty { display: none; }

/* ---------- Petits écrans ---------- */
@media (max-width: 1000px) {
  .table { min-width: 520px; } /* les tableaux défilent dans leur carte */
  .appbar { gap: 12px; padding: 0 8px 0 14px; }
  .apptab { padding: 0 12px; }
}
@media (max-width: 760px) {
  /* Onglets d'outils réduits à leur picto (libellé dans title et pour les lecteurs d'écran) */
  .apptab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .apptab .pro-tag, .plan-chip { display: none; }
  .appbar-logo .logo-word { display: none; }
  .apptab { padding: 0 11px; }
}
@media (max-width: 600px) {
  /* Téléphone : un libellé long passe à la ligne au lieu d'élargir la page */
  .btn { white-space: normal; text-align: center; line-height: 1.25; padding-top: 8px; padding-bottom: 8px; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; }
}
