/* ===========================================================================
   Home « cockpit » (phase 6) — mini-app/views/dashboards.php
   ---------------------------------------------------------------------------
   Cinq zones : état global, signal principal, Apps, situations, actions.
   Les miniatures (.ap-pv, .ap-mini) sont produites par le renderer présenté
   (apHomePreview()) depuis la variante HOME_PREVIEW des manifestes : aucune
   règle ici ne vise une App ou un widget, seulement un layout, une taille, une
   forme de donnée ou un ton. Couleurs : jetons uniquement (tokens.css).
   =========================================================================== */

.hc { display: flex; flex-direction: column; gap: var(--ax-s5); min-width: 0; }

/* ── En-tête compact : la place va aux données ───────────────────────────── */
.hc-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--ax-s3) var(--ax-s6); }
.hc-top__text { display: flex; flex-direction: column; gap: var(--ax-s2); min-width: 0; }
.hc-top__title { margin: 0; font-size: var(--ax-fs-h1-page); font-weight: var(--ax-fw-strong); letter-spacing: var(--ax-tracking-tight); line-height: 1.1; }
.hc-eyebrow { margin: 0; font-size: var(--ax-fs-xs); font-weight: var(--ax-fw-semi); color: var(--ax-muted); text-transform: uppercase; letter-spacing: var(--ax-tracking-caps); }

/* ── 1. État global : bandeau de chiffres, sans cartes ───────────────────── */
.hc-global__list {
  margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  border-top: 1px solid var(--ax-line); border-bottom: 1px solid var(--ax-line);
}
.hc-global__item { display: flex; flex-direction: column; gap: 1px; padding: var(--ax-s3) var(--ax-s5) var(--ax-s3) 0; min-width: 0; }
.hc-global__item + .hc-global__item { padding-left: var(--ax-s5); border-left: 1px solid var(--ax-line-soft); }
.hc-global__item dt { font-size: var(--ax-fs-label); color: var(--ax-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-global__note { font-size: var(--ax-fs-xs); color: var(--ax-ink-2); font-weight: var(--ax-fw-semi); }
.hc-global__item dd { margin: 0; text-align: left; }
.hc-global__value { font-size: var(--ax-fs-kpi); font-weight: var(--ax-fw-bold); letter-spacing: var(--ax-tracking-tight); color: var(--ax-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hc-global__value.aw-tone-warning, .hc-global__value.aw-tone-negative { color: var(--aw-ink); }
.hc-global__src { font-size: var(--ax-fs-xs); }
.hc-global__src a { color: var(--ax-muted); text-decoration: none; }
.hc-global__src a:hover { color: var(--ax-link); text-decoration: underline; }

/* ── 2. Signal principal : bloc dominant, teinté par le ton du signal ────── */
.hc-insight {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--ax-s3) var(--ax-s6); align-items: baseline;
  padding: var(--ax-s5) var(--ax-s6); border-radius: var(--ax-r-2xl);
  background: var(--aw-bg); box-shadow: inset 4px 0 0 var(--aw);
}
.hc-insight.aw-tone-negative { background: var(--ax-negative-surface); box-shadow: inset 4px 0 0 var(--aw), 0 0 0 1px var(--ax-negative-line); }
.hc-insight.aw-tone-neutral { background: var(--ax-surface); box-shadow: var(--ax-shadow-sm); }
.hc-insight__body { grid-column: 1 / -1; min-width: 0; }
.hc-insight__head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--ax-s1) var(--ax-s3); }
.hc-insight__title { margin: 0; font-size: var(--ax-fs-h2); font-weight: var(--ax-fw-semi); }
.hc-insight__title a { color: inherit; text-decoration: none; }
.hc-insight__text { margin: 0; max-width: 90ch; font-size: var(--ax-fs-ui); color: var(--ax-ink-2); }
.hc-insight__open { justify-self: start; font-size: var(--ax-fs-ui); font-weight: var(--ax-fw-semi); color: var(--ax-link); text-decoration: none; }
.hc-insight__open:hover { text-decoration: underline; }

/* ── 3. Apps : grille rythmée (large / normale / compacte), identité par layout ── */
.hc-apps { display: flex; flex-direction: column; gap: var(--ax-s3); min-width: 0; }
.hc-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-flow: row dense; gap: var(--ax-s4); }
.hc-card--wide    { grid-column: span 3; }
.hc-card--normal  { grid-column: span 2; }
.hc-card--compact { grid-column: span 2; align-self: start; }

/* Identité de layout : une teinte d'accent, un glyphe, un libellé. */
.hc-layout--trend       { --hc-accent: var(--ax-series-0); }
.hc-layout--comparison  { --hc-accent: var(--ax-info); }
.hc-layout--composition { --hc-accent: var(--ax-series-3); }
.hc-layout--entity360   { --hc-accent: var(--ax-series-4); }
.hc-layout--anomaly     { --hc-accent: var(--ax-warning); }
.hc-layout--legacy, .hc-layout--unknown { --hc-accent: var(--ax-neutral); }

.hc-card {
  position: relative; display: flex; flex-direction: column; gap: var(--ax-s2); min-width: 0;
  padding: var(--ax-s5); border-radius: var(--ax-r-xl);
  background: var(--ax-surface); box-shadow: var(--ax-shadow-xs);
  color: var(--ax-ink); text-decoration: none;
  transition: box-shadow var(--ax-ease), transform var(--ax-ease);
}
.hc-card::before { content: ""; position: absolute; inset: 0 var(--ax-s5) auto; height: 3px; border-radius: 0 0 3px 3px; background: var(--hc-accent); }
.hc-card:hover { box-shadow: var(--ax-shadow-hover); transform: translateY(-1px); }
.hc-card:focus-visible { outline: 2px solid var(--ax-focus); outline-offset: 2px; }
.hc-card--compact { background: transparent; box-shadow: inset 0 0 0 1px var(--ax-line); }
.hc-card--compact::before { opacity: 0.5; }
.hc-state--featured { box-shadow: inset 0 0 0 1px var(--ax-line); }
.ap-pv-compact { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--ax-s1) var(--ax-s2); font-size: var(--ax-fs-label); color: var(--ax-muted); }
.ap-pv-compact b { font-size: var(--ax-fs-lead); color: var(--ax-ink); font-variant-numeric: tabular-nums; }
.hc-card__kind { display: inline-flex; align-items: center; gap: var(--ax-s2); font-size: var(--ax-fs-xs); font-weight: var(--ax-fw-semi); color: var(--ax-muted); text-transform: uppercase; letter-spacing: var(--ax-tracking-caps); }
.hc-card__title { margin: 0; font-size: var(--ax-fs-card); font-weight: var(--ax-fw-semi); line-height: 1.25; }
.hc-card--wide .hc-card__title { font-size: var(--ax-fs-h2); }
.hc-card__body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.hc-card__open { align-self: flex-end; font-size: var(--ax-fs-label); font-weight: var(--ax-fw-semi); color: var(--ax-link); opacity: 0; transition: opacity var(--ax-ease); }
.hc-card:hover .hc-card__open, .hc-card:focus-visible .hc-card__open { opacity: 1; }

/* Glyphe de layout (formes CSS, couleur d'accent). */
.hc-glyph { width: 14px; height: 12px; flex: none; color: var(--hc-accent); background: currentColor; border-radius: 2px; }
.hc-layout--trend .hc-glyph { background: linear-gradient(to right, currentColor 0 26%, transparent 26% 37%, currentColor 37% 63%, transparent 63% 74%, currentColor 74%);
                              -webkit-mask: linear-gradient(to top, #fff 0 100%); mask: linear-gradient(to top left, #fff 50%, transparent 50%); }
.hc-layout--comparison .hc-glyph { background: linear-gradient(to right, currentColor 0 42%, transparent 42% 58%, currentColor 58%); clip-path: polygon(0 40%, 42% 40%, 42% 100%, 58% 100%, 58% 0, 100% 0, 100% 100%, 0 100%); }
.hc-layout--composition .hc-glyph { height: 8px; background: linear-gradient(to right, currentColor 0 55%, transparent 55% 62%, currentColor 62% 85%, transparent 85% 90%, currentColor 90%); }
.hc-layout--entity360 .hc-glyph { width: 12px; border-radius: 50%; }
.hc-layout--anomaly .hc-glyph { clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 0; }

/* ── Miniature (apHomePreview) ───────────────────────────────────────────── */
.ap-pv { display: flex; flex-direction: column; gap: var(--ax-s3); min-width: 0; }
.ap-pv-lead { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ap-pv-lead__label { margin: 0; font-size: var(--ax-fs-label); color: var(--ax-muted); }
.ap-pv-lead__value { margin: 0; font-size: 30px; font-weight: var(--ax-fw-bold); letter-spacing: var(--ax-tracking-tight); line-height: 1.05; color: var(--ax-ink); font-variant-numeric: tabular-nums; }
.ap-pv-lead__value.aw-tone-warning, .ap-pv-lead__value.aw-tone-negative { color: var(--aw-ink); }
.ap-pv-lead__sub { margin: 0; font-size: var(--ax-fs-label); color: var(--ax-muted); }
.ap-pv-lead__sub b { color: var(--ax-ink); font-weight: var(--ax-fw-semi); }
.ap-pv-lead--verdict .aw-badge { font-size: var(--ax-fs-ui); padding: 4px 12px; }
.ap-pv-signal { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--ax-s1) var(--ax-s3); font-size: var(--ax-fs-label); }
.ap-pv-signal__ab { font-variant-numeric: tabular-nums; color: var(--ax-ink-2); }
.ap-pv-signal__what { color: var(--ax-muted); font-size: var(--ax-fs-xs); }
.ap-pv-counters { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ax-s3) var(--ax-s4); }
.ap-pv-counters div { min-width: 0; }
.ap-pv-counters dt { font-size: var(--ax-fs-xs); color: var(--ax-muted); line-height: 1.3; }
.ap-pv-counters dd { margin: 2px 0 0; text-align: left; font-size: 22px; font-weight: var(--ax-fw-bold); color: var(--ax-ink); font-variant-numeric: tabular-nums; }
.ap-pv-counters dd.aw-tone-warning, .ap-pv-counters dd.aw-tone-negative { color: var(--aw-ink); }
.ap-pv-kv { margin: 0; display: flex; flex-direction: column; border-top: 1px solid var(--ax-line-soft); }
.ap-pv-kv div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--ax-s3); padding: 5px 0; border-bottom: 1px solid var(--ax-line-soft); font-size: var(--ax-fs-label); }
.ap-pv-kv dt { color: var(--ax-muted); min-width: 0; }
.ap-pv-kv dd { margin: 0; font-weight: var(--ax-fw-semi); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ap-pv-rows { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.ap-pv-rows li { display: flex; justify-content: space-between; gap: var(--ax-s3); padding: 5px 0; border-bottom: 1px solid var(--ax-line-soft); font-size: var(--ax-fs-label); }
.ap-pv-rows b { font-weight: var(--ax-fw-semi); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ap-pv-note { margin: 0; font-size: var(--ax-fs-label); color: var(--ax-muted); }
.ap-pv .ap-missing { font-size: var(--ax-fs-label); font-weight: var(--ax-fw-medium); color: var(--ax-muted); }
.ap-pv-lead__value .ap-missing { font-size: var(--ax-fs-lead); }
/* Sans donnée : la silhouette du layout (traits), la cause en une ligne — jamais une grande carte vide. */
.ap-pv-skeleton { display: flex; flex-direction: column; gap: 6px; }
.ap-pv-skeleton i { display: block; height: 8px; border-radius: 4px; background: var(--ax-fill); }
.ap-pv-skeleton i:first-child { width: 45%; height: 14px; background: var(--hc-accent, var(--ax-fill)); opacity: 0.25; }
.ap-pv-skeleton i:nth-child(2) { width: 80%; }
.ap-pv-skeleton i:nth-child(3) { width: 60%; }

/* Mini-visualisations (forme de donnée). */
.ap-mini { display: flex; flex-direction: column; gap: var(--ax-s1); min-width: 0; }
.ap-mini-cols { display: flex; align-items: flex-end; gap: 4px; height: 64px; }
.ap-mini-cols__group { flex: 1; display: flex; align-items: flex-end; gap: 2px; height: 100%; min-width: 0; }
.ap-mini-cols__bar { flex: 1; height: var(--h); min-height: 2px; border-radius: 2px 2px 0 0; background: var(--aw); }
.ap-mini-line { width: 100%; height: 56px; overflow: visible; }
.ap-mini-line path { fill: none; stroke: var(--aw); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.ap-mini__axis { display: flex; justify-content: space-between; gap: var(--ax-s2); font-size: var(--ax-fs-xxs); color: var(--ax-muted); font-variant-numeric: tabular-nums; }
.ap-mini__axis b { color: var(--ax-ink); font-weight: var(--ax-fw-semi); }
.ap-mini__axis > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-mini__legend { display: inline-flex; align-items: center; gap: 4px; }
.ap-mini__legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--aw); }
.ap-mini-band { display: flex; gap: 2px; height: 14px; border-radius: var(--ax-r-xs); overflow: hidden; }
.ap-mini-band__seg { width: var(--w); background: var(--aw); }
.ap-mini-legend { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.ap-mini-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: var(--ax-s2); font-size: var(--ax-fs-label); }
.ap-mini-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--aw); }
.ap-mini-legend span { color: var(--ax-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-mini-legend b { font-weight: var(--ax-fw-semi); font-variant-numeric: tabular-nums; }
.ap-mini-legend__ref i { background: none; border: 1px dashed var(--ax-track); }
.ap-mini-legend__ref span, .ap-mini-legend__ref b { color: var(--ax-muted); font-weight: var(--ax-fw-regular); }
.ap-mini--bars { gap: 6px; }
.ap-mini-bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(48px, 34%) auto; align-items: center; gap: var(--ax-s2); font-size: var(--ax-fs-label); }
.ap-mini-bar__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ax-ink-2); }
.ap-mini-bar__track { height: 6px; border-radius: 3px; background: var(--ax-fill-soft); overflow: hidden; }
.ap-mini-bar__fill { display: block; width: var(--w); height: 100%; border-radius: 3px; background: var(--aw); }
.ap-mini--attention .ap-mini-bar__fill { background: var(--ax-warning); }
.ap-mini-bar__value { font-weight: var(--ax-fw-semi); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ap-mini--ab { flex-direction: row; align-items: flex-end; gap: var(--ax-s3); font-variant-numeric: tabular-nums; }
.ap-mini-ab__a, .ap-mini-ab__b { display: flex; flex-direction: column; gap: 2px; }
.ap-mini-ab__a { font-size: var(--ax-fs-lead); color: var(--ax-muted); }
.ap-mini-ab__b { font-size: 24px; font-weight: var(--ax-fw-bold); color: var(--ax-ink); }
.ap-mini-ab__a small, .ap-mini-ab__b small { font-size: var(--ax-fs-xxs); font-weight: var(--ax-fw-regular); color: var(--ax-muted); }
.ap-mini-ab__arrow { padding-bottom: 4px; color: var(--ax-faint); }
/* Couleurs de la miniature : celles de la page complète (layout anomalie → teinte d'attention, série unique). */
.ap-pv-l--anomaly .ap-mini-cols:not(.ap-mini-cols--pair) .ap-mini-cols__bar { background: var(--ax-warning); }

/* Signal principal : la même miniature, à grande échelle, visualisation à droite. */
.ap-pv--insight { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr); grid-auto-rows: min-content; gap: var(--ax-s2) var(--ax-s8); }
.ap-pv--insight > * { grid-column: 1; }
.ap-pv--insight > .ap-mini { grid-column: 2; grid-row: 1 / span 4; align-self: end; }
.ap-pv--insight > .ap-pv-kv { display: none; }   /* le détail reste dans l'App : la mise en avant garde chiffre, verdict, visuel */
.ap-pv--insight .ap-pv-lead__value { font-size: clamp(34px, 3.2vw, 44px); }
.ap-pv--insight .ap-pv-lead--verdict .aw-badge { font-size: var(--ax-fs-lead); padding: 6px 14px; }
.ap-pv--insight .ap-mini-cols { height: 92px; gap: 8px; }
.ap-pv--insight .ap-mini-line { height: 92px; }
.ap-pv--insight .ap-mini-band { height: 26px; }
.ap-pv--insight .ap-mini-bar { font-size: var(--ax-fs-ui); }
.ap-pv--insight .ap-mini-bar__track { height: 9px; }
.ap-pv--insight .ap-mini__axis { font-size: var(--ax-fs-xs); }
.ap-pv--insight .ap-pv-kv { max-width: 360px; }

/* ── 4–5. Situations et actions : lignes courtes, deux colonnes ──────────── */
.hc-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: var(--ax-s8); }
.hc-panel { display: flex; flex-direction: column; gap: var(--ax-s3); min-width: 0; }
.hc-lines { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--ax-line); }
.hc-line a { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: var(--ax-s3); padding: var(--ax-s3) 0; border-bottom: 1px solid var(--ax-line-soft); color: var(--ax-ink); text-decoration: none; }
.hc-line a:hover { background: var(--ax-bg-hover); }
.hc-line__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--aw); }
.hc-line__main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hc-line__main b { font-size: var(--ax-fs-ui); font-weight: var(--ax-fw-semi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-line__main small { font-size: var(--ax-fs-xs); color: var(--ax-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-line__value { font-size: var(--ax-fs-ui); font-weight: var(--ax-fw-semi); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hc-line__go { color: var(--ax-link); }
.hc-lines--actions .hc-line a { grid-template-columns: minmax(0, 1fr) auto auto; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1366px) {
  .hc { gap: var(--ax-s6); }
  .hc-insight { padding: var(--ax-s6); }
}
/* Tablette : deux colonnes au plus, signal principal avant les Apps. */
@media (max-width: 1100px) {
  .hc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hc-card--wide, .hc-card--normal, .hc-card--compact { grid-column: span 1; }
  .hc-global__list { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .hc-global__value { font-size: 22px; }
  .ap-pv--insight { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}
/* Mobile : une colonne ; les cartes deviennent des lignes compactes (titre, chiffre, mini-visuel). */
@media (max-width: 640px) {
  .hc { gap: var(--ax-s5); }
  .hc-global__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hc-global__item, .hc-global__item + .hc-global__item { padding: var(--ax-s3) var(--ax-s3) var(--ax-s3) 0; border-left: 0; border-bottom: 1px solid var(--ax-line-soft); }
  .hc-global__value { font-size: 20px; }
  .hc-global__src, .hc-global__item:nth-child(n+5) { display: none; }
  .hc-insight { padding: var(--ax-s5); }
  .ap-pv--insight { grid-template-columns: minmax(0, 1fr); }
  .ap-pv--insight > .ap-mini { grid-column: 1; grid-row: auto; }
  .ap-pv--insight .ap-mini-cols { height: 96px; gap: 4px; }
  .ap-pv--insight .ap-pv-lead__value { font-size: 36px; }
  .hc-grid { grid-template-columns: minmax(0, 1fr); gap: var(--ax-s2); }
  .hc-card--wide, .hc-card--normal, .hc-card--compact { grid-column: auto; }
  .hc-card { padding: var(--ax-s3) var(--ax-s4); gap: var(--ax-s1); }
  .hc-card::before { inset: var(--ax-s3) auto var(--ax-s3) 0; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
  .hc-card__title, .hc-card--wide .hc-card__title { font-size: var(--ax-fs-ui); }
  .hc-card__kind { font-size: var(--ax-fs-xxs); }
  .hc-card__open, .ap-pv-kv, .ap-pv-rows, .ap-pv-signal__what, .ap-pv-skeleton, .ap-mini-legend li:nth-child(n+3) { display: none; }
  .hc-card .ap-pv { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--ax-s2) var(--ax-s4); }
  .hc-card .ap-pv > * { flex: 1 1 120px; min-width: 0; }
  .hc-card .ap-pv-lead__value { font-size: 22px; }
  .hc-card .ap-mini-cols { height: 36px; }
  .hc-card .ap-mini-line { height: 34px; }
  .hc-card .ap-mini-bar:nth-child(n+3) { display: none; }
  .hc-card .ap-pv-counters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ax-s1) var(--ax-s3); }
  .hc-card .ap-pv-counters dd { font-size: var(--ax-fs-lead); }
  .hc-line a { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .hc-line__go { display: none; }
  .hc-card .ap-mini__legend { display: none; }
  .hc-card .ap-pv-counters div:nth-child(n+3) { display: none; }
  .hc-card .ap-pv-counters { flex-basis: 100%; }
}

/* ===========================================================================
   Dashboards multiples et catalogue (mini-app/views/dashboards*.php, catalogue.php)
   =========================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.dash-flash { margin: 0; padding: var(--ax-s2) var(--ax-s4); border-radius: var(--ax-r-md); background: var(--aw-bg); color: var(--aw-ink); font-size: var(--ax-fs-ui); }

/* Sélecteur de dashboards (Home) : onglets légers, défaut marqué ★. */
.dash-switch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ax-s2) var(--ax-s4); border-bottom: 1px solid var(--ax-line); }
.dash-switch__list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--ax-s1); }
.dash-switch__list a { display: inline-flex; align-items: center; gap: 6px; padding: var(--ax-s2) var(--ax-s3); border-bottom: 2px solid transparent; color: var(--ax-muted); text-decoration: none; font-size: var(--ax-fs-ui); font-weight: var(--ax-fw-medium); }
.dash-switch__list a:hover { color: var(--ax-ink); }
.dash-switch__list a[aria-current="page"] { color: var(--ax-ink); border-bottom-color: var(--ax-action); font-weight: var(--ax-fw-semi); }
.dash-switch__actions { display: inline-flex; gap: var(--ax-s4); font-size: var(--ax-fs-label); }
.dash-switch__actions a { color: var(--ax-link); text-decoration: none; }
.dash-switch__actions a:hover { text-decoration: underline; }
.dash-star { color: var(--ax-warning); }

/* Pages de gestion. */
.dash-page { display: flex; flex-direction: column; gap: var(--ax-s6); min-width: 0; }
.dash-list, .dash-apps, .dash-catalogue { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--ax-line); }
.dash-row, .dash-app, .dash-cat { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ax-s3) var(--ax-s5); padding: var(--ax-s4) 0; border-bottom: 1px solid var(--ax-line-soft); }
.dash-row__main, .dash-app__name { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.dash-row__name { font-size: var(--ax-fs-lead); font-weight: var(--ax-fw-semi); color: var(--ax-ink); text-decoration: none; }
.dash-row__name:hover { text-decoration: underline; }
.dash-row__meta, .dash-app__name small { font-size: var(--ax-fs-label); color: var(--ax-muted); }
.dash-row__desc { font-size: var(--ax-fs-label); color: var(--ax-ink-2); }
.dash-row__actions, .dash-app__actions { display: flex; flex-wrap: wrap; gap: var(--ax-s2); }
.dash-row__actions form, .dash-app__actions form { margin: 0; }
.dash-danger { color: var(--ax-negative-ink); }
.dash-app__pos { width: 28px; flex: none; font-variant-numeric: tabular-nums; color: var(--ax-muted); font-weight: var(--ax-fw-semi); }
.dash-app--off .dash-app__name b { color: var(--ax-muted); text-decoration: line-through; }
.dash-form { display: flex; flex-direction: column; gap: var(--ax-s4); max-width: 720px; }
.dash-form--inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; max-width: none; }
.dash-field { display: flex; flex-direction: column; gap: var(--ax-s1); font-size: var(--ax-fs-label); color: var(--ax-muted); min-width: 0; }
.dash-field input, .dash-field select { min-height: var(--ax-control-h); padding: 0 var(--ax-s3); border: 1px solid var(--ax-line-strong); border-radius: var(--ax-r-sm); background: var(--ax-surface); color: var(--ax-ink); font: inherit; font-size: var(--ax-fs-ui); min-width: 0; }
.dash-templates { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--ax-s2); }
.dash-templates legend { margin-bottom: var(--ax-s2); font-size: var(--ax-fs-label); color: var(--ax-muted); }
.dash-template { display: flex; gap: var(--ax-s2); align-items: flex-start; padding: var(--ax-s3); border: 1px solid var(--ax-line); border-radius: var(--ax-r-md); background: var(--ax-surface); cursor: pointer; }
.dash-template span { display: flex; flex-direction: column; gap: 2px; }
.dash-template small { color: var(--ax-muted); font-size: var(--ax-fs-xs); }
.dash-template:has(input:checked) { border-color: var(--ax-action); box-shadow: inset 0 0 0 1px var(--ax-action); }
.dash-cat { align-items: flex-start; flex-direction: column; }
.dash-cat__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--ax-s3); }
.dash-cat__name { font-size: var(--ax-fs-lead); font-weight: var(--ax-fw-semi); color: var(--ax-ink); text-decoration: none; }
.dash-cat__category { font-size: var(--ax-fs-xs); font-weight: var(--ax-fw-semi); color: var(--ax-muted); text-transform: uppercase; letter-spacing: var(--ax-tracking-caps); }
.dash-cat__desc { margin: 0; max-width: 90ch; font-size: var(--ax-fs-label); color: var(--ax-ink-2); }
.dash-cat__in { margin: 0; font-size: var(--ax-fs-label); }
.dash-cat__in a { color: var(--ax-positive-ink); text-decoration: none; }
@media (max-width: 640px) {
  .dash-switch__actions { width: 100%; }
  .dash-form--inline { flex-direction: column; align-items: stretch; }
}
