/* visible aussi sur bureau : replie/affiche le panneau */
/* Toute icône dans un bouton garde une taille fixe (sinon un SVG sans dimension s'étire). */
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
/* ---------- Vues « panneau » (sauvegarde) ---------- */
.view-head { margin: 0 0 22px; }
.view-title { font-size: clamp(24px, 3vw, 32px); margin: 0 0 6px; }
.view-sub { font-family: var(--sans); font-size: 13.5px; color: var(--ink-soft); margin: 0; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.panel { display: flex; flex-direction: column; gap: 10px; }
.panel-t { font-size: 18px; margin: 0; }
.panel-lede { font-family: var(--sans); font-size: 12.5px; color: var(--ink-soft); margin: -2px 0 4px; line-height: 1.5; }
.row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-l { font-family: var(--sans); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.muted { font-family: var(--sans); font-size: 12px; color: var(--ink-soft); line-height: 1.5; margin: 0; }
.confirm { margin-top: 6px; }
.confirm p { margin: 0 0 9px; font-size: 14px; }
/* flex-basis devenait une HAUTEUR dans les .field en colonne (bug d'audit) */
.panel .input { min-width: 0; flex: 1 1 auto; }
.panel .row .input { flex-basis: 180px; }
/* Segments (thème, taille, modèle) */
.seg { display: inline-flex; border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; background: var(--card); width: fit-content; }
.segbtn { font-family: var(--sans); font-size: 13px; padding: 7px 14px; border: none; background: none; color: var(--ink-soft); cursor: pointer; border-right: 1px solid var(--hairline); }
.segbtn:last-child { border-right: none; }
.segbtn[data-on="true"] { background: var(--a-surface); color: var(--a-on); font-weight: 600; }
.segbtn:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.view-title-ic { width: 22px; height: 22px; vertical-align: -3px; margin-right: 8px; color: var(--c-c); }
/* Bouton-lien inline (vers le Sceau) */
.linklike { background: none; border: none; padding: 0; color: var(--c-a); font: inherit; cursor: pointer; text-decoration: underline; }

/* =====================================================================
   Recettes d'état AA (vague UX, lot 2) — surclassent les génériques de
   theme.css. Doctrine DIRECTION-UX §2.1 : surfaces constantes entre
   thèmes, encre `-on` prouvée ; plus jamais de #fff sur token retourné.
   ===================================================================== */
.btn-primary { background: var(--a-surface); color: var(--a-on); border-color: var(--a-surface); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--a-surface); }
.chip.on { background: var(--a-surface); color: var(--a-on); border-color: var(--a-surface); }
.pill.y-l1 { background: var(--y1-surface); }
.pill.y-l2 { background: var(--y2-surface); }
.pill.y-l3 { background: var(--y3-surface); }

/* Focus dessiné partout (DIRECTION §7.1) — :where() : specificité nulle,
   les anneaux dédiés existants (btn, iconbtn, cal-cell…) restent maîtres. */
:where(a, button, [role='button'], input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-text, var(--c-a));
  outline-offset: 2px;
}

/* Désactivé : jamais un bouton mort muet (la raison s'affiche à côté — doctrine §7.4) */
.btn:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }


/* Pastilles d'état (lot 3) — les voyants dessinés, forme + couleur */
.pastille { width: 15px; height: 15px; flex: 0 0 auto; vertical-align: -2px; }
.pastille-ok { color: var(--ok-text); }
.pastille-verifier { color: var(--react-text); }
.pastille-alerte { color: var(--danger-text); }
.pastille-inconnu { color: var(--ink-soft); }
.pastille-demarrer { color: var(--a-text); }
.pastille-maitrise { color: var(--gold-text); }

/* Boutons partagés (lot 3) — remplacent 17 « -mini » et 16 « -del » par vue */
.btn-mini { padding: 5px 10px; font-size: var(--t-small); }
.btn-mini svg { width: 14px; height: 14px; }
.btn-del { color: var(--ink-soft); font-size: 16px; line-height: 1; padding: 4px 9px; }
.btn-del:hover { color: var(--danger-text); border-color: var(--danger-line); }


/* La célébration sobre (lot 7) : l'anneau d'or se trace, une fois */
.celebration { width: 44px; height: 44px; color: var(--gold-text); flex: 0 0 auto; }
.celebration circle, .celebration path { stroke-width: 2.4; }
.celebration-trace { stroke-dasharray: 107; stroke-dashoffset: 107; animation: celeb-trace .6s var(--ease) forwards; }
.celebration-coche { stroke-dasharray: 22; stroke-dashoffset: 22; animation: celeb-trace .45s var(--ease) .35s forwards; }
@keyframes celeb-trace { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .celebration-trace, .celebration-coche { animation: none; stroke-dashoffset: 0; }
}


/* États vides illustrés (lot 14) — une invitation, pas un constat d'absence */
.vide-illu { display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; padding: 26px 16px; }
.vide-illu-svg { width: 88px; height: 88px; color: var(--ink-soft); opacity: .75; }
.vide-illu .spot-or { stroke: var(--gold); }
.vide-illu-p { max-width: 44ch; line-height: 1.55; margin: 0; }


/* =====================================================================
   Cibles tactiles (lot 15) : au doigt (pointer coarse), la ZONE DE FRAPPE
   s'etend a ~44 px via ::after — la boite visuelle reste fine (DIRECTION
   §4). Mesure executable : node outils/ux/cibles.mjs (166 → voir PR).
   ===================================================================== */
@media (pointer: coarse) {
  .btn-mini, .btn-del, .iconbtn, .chip, .scope-chip, .segbtn, .cal-chip, .tb-auj-chip,
  .greffier-chip, .topbar-brand, .cal-plus, .fo-star, .cal-x, .greffier-x, .ing-mini,
  .sceau-cell, .cal-vue, .ve-fdel, .cp-axe-del, .btn, summary, .cal-fil, .mn-switch { position: relative; }
  .btn-mini::after, .btn-del::after, .iconbtn::after, .chip::after, .scope-chip::after,
  .segbtn::after, .cal-chip::after, .tb-auj-chip::after, .greffier-chip::after,
  .topbar-brand::after, .cal-plus::after, .fo-star::after, .cal-x::after, .greffier-x::after,
  .ing-mini::after, .sceau-cell::after, .cal-vue::after, .ve-fdel::after, .cp-axe-del::after, .btn::after, summary::after, .cal-fil::after, .mn-switch::after {
    content: ''; position: absolute; inset: -7px;
  }
  .mn-switch::after { inset: -9px; }
  .input { min-height: 42px; }
  input[type='range'] { min-height: 40px; }
}
