/* Anonari Apps — Composants
   Chaque bloc correspond à une fonction de mini-app/src/Ui.php. Les valeurs
   liées aux données (largeur d'une barre, position d'un événement) arrivent par
   des propriétés personnalisées posées sur l'élément (--w, --x…) : la feuille
   ne contient aucune valeur métier. */

/* ── Tons sémantiques ────────────────────────────────────────────────────────
   Un composant lit --t (couleur pleine), --t-ink (texte) et --t-bg (fond doux) ;
   la classe de ton les fixe. Même mécanisme pour les domaines métier. */
.ax-tone-positive { --t: var(--ax-positive); --t-ink: var(--ax-positive-ink); --t-bg: var(--ax-positive-bg); }
.ax-tone-warning  { --t: var(--ax-warning);  --t-ink: var(--ax-warning-ink);  --t-bg: var(--ax-warning-bg); }
.ax-tone-negative { --t: var(--ax-negative); --t-ink: var(--ax-negative-ink); --t-bg: var(--ax-negative-bg); }
.ax-tone-info     { --t: var(--ax-info);     --t-ink: var(--ax-info-ink);     --t-bg: var(--ax-info-bg); }
.ax-tone-neutral  { --t: var(--ax-neutral);  --t-ink: var(--ax-neutral-ink);  --t-bg: var(--ax-neutral-bg); }
.ax-tone-action   { --t: var(--ax-action);   --t-ink: var(--ax-action);       --t-bg: var(--ax-action-soft); }

.ax-dom-finance     { --t: var(--ax-dom-finance);     --t-ink: var(--ax-dom-finance-ink);     --t-bg: var(--ax-dom-finance-bg); }
.ax-dom-commercial  { --t: var(--ax-dom-commercial);  --t-ink: var(--ax-dom-commercial-ink);  --t-bg: var(--ax-dom-commercial-bg); }
.ax-dom-operational { --t: var(--ax-dom-operational); --t-ink: var(--ax-dom-operational-ink); --t-bg: var(--ax-dom-operational-bg); }
.ax-dom-relation    { --t: var(--ax-dom-relation);    --t-ink: var(--ax-dom-relation-ink);    --t-bg: var(--ax-dom-relation-bg); }
.ax-dom-signal      { --t: var(--ax-dom-signal);      --t-ink: var(--ax-dom-signal-ink);      --t-bg: var(--ax-dom-signal-bg); }
.ax-dom-none        { --t: var(--ax-negative);        --t-ink: var(--ax-negative-ink);        --t-bg: transparent; }

/* Catégories d'App : une teinte (hue) déclinée en badge, fond d'aperçu, série. */
.ax-cat-collections { --cat: var(--ax-cat-collections); }
.ax-cat-risk        { --cat: var(--ax-cat-risk); }
.ax-cat-forecast    { --cat: var(--ax-cat-forecast); }
.ax-cat-anomalies   { --cat: var(--ax-cat-anomalies); }
.ax-cat-reminders   { --cat: var(--ax-cat-reminders); }
.ax-cat-thirdparty  { --cat: var(--ax-cat-thirdparty); }
.ax-cat-default     { --cat: var(--ax-cat-default); }

/* ── Boutons ─────────────────────────────────────────────────────────────────
   .btn / .btn-primary / .btn-ghost : noms historiques encore émis par le
   Designer et le rendu des widgets, habillés ici comme les boutons Apps. */
.ax-btn, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ax-s2);
  min-height: var(--ax-control-h);
  padding: 0 16px;
  border-radius: var(--ax-r-md);
  border: 1px solid var(--ax-line-strong);
  background: var(--ax-surface);
  color: var(--ax-ink);
  font: var(--ax-fw-semi) var(--ax-fs-ui)/1.2 var(--ax-font);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--ax-ease), border-color var(--ax-ease), color var(--ax-ease);
}
.ax-btn:hover, .btn:hover { border-color: var(--ax-faint); color: var(--ax-ink); }
.ax-btn--primary, .btn-primary { background: var(--ax-action); border-color: var(--ax-action); color: #fff; }
.ax-btn--primary:hover, .btn-primary:hover { background: var(--ax-action-hover); border-color: var(--ax-action-hover); color: #fff; }
.ax-btn--dark { background: var(--ax-ink); border-color: var(--ax-ink); color: #fff; }
.ax-btn--dark:hover { color: #fff; opacity: .9; }
.ax-btn--link, .btn-ghost {
  border-color: transparent;
  background: transparent;
  padding: 0 12px;
  color: var(--ax-link);
}
.ax-btn--link:hover, .btn-ghost:hover { border-color: transparent; color: var(--ax-link-hover); text-decoration: underline; }
.ax-btn--sm { min-height: 36px; padding: 0 12px; font-size: var(--ax-fs-label); border-radius: 9px; }
.ax-btn--block { width: 100%; }
.ax-btn[disabled], .ax-btn[aria-disabled="true"], .btn[disabled] {
  background: var(--ax-fill); border-color: var(--ax-fill); color: var(--ax-disabled); cursor: not-allowed;
}
.ax-btn__plus { font-size: 16px; line-height: 1; }
/* Boutons de soumission sans classe (runtime à blocs, Designer historique). */
form button[type=submit]:not(.btn):not(.ax-btn):not(.ax-linkbtn) {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid var(--ax-line-strong);
  background: var(--ax-surface);
  font-size: var(--ax-fs-label);
  font-weight: var(--ax-fw-semi);
  cursor: pointer;
}
form button[type=submit]:not(.btn):not(.ax-btn):not(.ax-linkbtn):hover { border-color: var(--ax-faint); }

/* ── Cartes ──────────────────────────────────────────────────────────────── */
.ax-card, .box {
  background: var(--ax-surface);
  border: 1px solid var(--ax-line);
  border-radius: var(--ax-r-xl);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: var(--ax-s4);
  min-width: 0;
}
.box { margin-bottom: var(--ax-s4); gap: var(--ax-s3); }
.box > h2 { font-size: var(--ax-fs-ui); font-weight: var(--ax-fw-semi); }
.ax-card--lift { box-shadow: var(--ax-shadow-lift); }
.ax-card--compact { padding: 18px 20px; gap: var(--ax-s3); border-radius: var(--ax-r-lg); }
.ax-card--sunken { background: var(--ax-bg-sunken); }
.ax-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--ax-s3); flex-wrap: wrap; }
.ax-card__titles { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ax-card__title { font-size: 17px; font-weight: var(--ax-fw-semi); }
.ax-card__subtitle { font-size: var(--ax-fs-label); color: var(--ax-muted); }
.ax-eyebrow {
  font-size: var(--ax-fs-xs);
  font-weight: var(--ax-fw-semi);
  letter-spacing: var(--ax-tracking-caps);
  text-transform: uppercase;
  color: var(--ax-muted);
}
.ax-eyebrow--info { color: var(--ax-info-ink); }
.ax-eyebrow--negative { color: var(--ax-negative-ink); }

/* Grille historique des vues Designer / runtime à blocs. */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: var(--ax-s4); margin-bottom: var(--ax-s4); }
.grid > .box { margin: 0; }
.metric { font-size: var(--ax-fs-kpi); font-weight: var(--ax-fw-strong); letter-spacing: var(--ax-tracking-tight); line-height: 1.15; }
.metric span { font-size: var(--ax-fs-label); font-weight: var(--ax-fw-regular); color: var(--ax-muted); }
.table-wrap { overflow-x: auto; }
ul.tree { list-style: none; padding-left: 14px; border-left: 1px solid var(--ax-line); margin: var(--ax-s2) 0; }
ul.tree li { margin: 4px 0; font-size: var(--ax-fs-label); }
form.inline { display: inline; margin: 0; }
form.inline button {
  min-height: 28px; padding: 0 8px; margin-left: 3px;
  border-radius: var(--ax-r-sm); border: 1px solid var(--ax-line-strong);
  background: var(--ax-surface); color: var(--ax-ink-2); cursor: pointer; font-size: var(--ax-fs-xs);
}
form.inline button:hover { color: var(--ax-ink); border-color: var(--ax-faint); }
.param-bar { flex-direction: row; flex-wrap: wrap; gap: var(--ax-s3); align-items: flex-end; }
.param-bar label { flex: 0 1 220px; }
.param-bar p { flex: 1 1 100%; }

/* ── Bandeaux d'information ──────────────────────────────────────────────── */
.ax-notice, .err-box {
  display: flex;
  flex-direction: column;
  gap: var(--ax-s1);
  padding: 12px 14px;
  border-radius: var(--ax-r-md);
  border: 1px solid transparent;
  background: var(--t-bg, var(--ax-info-bg));
  color: var(--ax-ink);
  font-size: var(--ax-fs-ui);
}
.ax-notice strong { color: var(--t-ink, var(--ax-info-ink)); }
.err-box, .ax-notice--negative { --t-bg: var(--ax-negative-surface); --t-ink: var(--ax-negative-strong); border-color: var(--ax-negative-line); }
.err-box strong { color: var(--ax-negative-strong); }
.ax-notice--warning { --t-bg: var(--ax-warning-bg); --t-ink: var(--ax-warning-ink); }

/* ── StatusBadge : pastille ronde = lecture d'une situation ─────────────── */
.ax-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--ax-r-pill);
  background: var(--t-bg, var(--ax-neutral-bg));
  color: var(--t-ink, var(--ax-neutral-ink));
  font-size: var(--ax-fs-xs);
  font-weight: var(--ax-fw-semi);
  line-height: 1.35;
  white-space: nowrap;
}
.ax-badge__dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--t, var(--ax-neutral)); }
.ax-badge--square .ax-badge__dot { border-radius: 2px; }
.ax-badge--lg { padding: 6px 12px; font-size: 13.5px; font-weight: var(--ax-fw-strong); gap: 7px; }
.ax-badge--lg .ax-badge__dot { width: 8px; height: 8px; }
.ax-badge--solid { background: var(--t-ink); color: #fff; }

/* ContextBadge : tag de contexte métier — coins 6 px, couleur du domaine. */
.ax-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--ax-r-sm);
  background: var(--t-bg);
  color: var(--t-ink);
  font-size: var(--ax-fs-xxs);
  font-weight: var(--ax-fw-semi);
  line-height: 1.4;
  white-space: nowrap;
}
.ax-tag__dot { width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--t); }
.ax-tag--md { padding: 3px 8px; font-size: var(--ax-fs-xs); }
.ax-tag.ax-dom-none { border: 1px dashed var(--ax-negative-line); }
.ax-tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* Verbe d'action : étiquette carrée, capitales, fond plein. */
.ax-verb {
  display: inline-block;
  padding: 4px 9px;
  border-radius: var(--ax-r-sm);
  background: var(--t-ink);
  color: #fff;
  font-size: 11.5px;
  font-weight: var(--ax-fw-bold);
  letter-spacing: var(--ax-tracking-caps);
  text-transform: uppercase;
  white-space: nowrap;
}
.ax-verb.ax-tone-negative { background: var(--ax-verb-negative); }
.ax-verb.ax-tone-warning  { background: var(--ax-verb-warning); }
.ax-verb.ax-tone-positive { background: var(--ax-verb-positive); }

/* TrendIndicator : flèche + texte, jamais la couleur seule. */
.ax-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: var(--ax-r-pill);
  background: var(--t-bg);
  color: var(--t-ink);
  font-size: var(--ax-fs-xs);
  font-weight: var(--ax-fw-semi);
  white-space: nowrap;
}
.ax-trend--plain { padding: 0; background: none; }

.ax-id { font-family: var(--ax-font-mono); font-weight: 500; font-size: .93em; }

/* ── KpiCard ─────────────────────────────────────────────────────────────── */
.ax-kpi {
  background: var(--ax-surface);
  border: 1px solid var(--ax-line);
  border-radius: var(--ax-r-lg);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: var(--ax-s2);
  min-width: 0;
}
.ax-kpi__label { font-size: var(--ax-fs-xs); font-weight: var(--ax-fw-semi); letter-spacing: var(--ax-tracking-caps); text-transform: uppercase; color: var(--ax-muted); }
.ax-kpi__value { font-size: var(--ax-fs-kpi); font-weight: var(--ax-fw-strong); letter-spacing: var(--ax-tracking-tight); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-kpi__value small { font-size: var(--ax-fs-ui); font-weight: var(--ax-fw-medium); color: var(--ax-muted); }
.ax-kpi__row { display: flex; align-items: baseline; gap: var(--ax-s2); flex-wrap: wrap; }
.ax-kpi__note { font-size: var(--ax-fs-small); line-height: 1.4; color: var(--ax-ink-2); }
.ax-kpi__note strong { color: var(--ax-info-ink); }
.ax-kpi--alert { background: var(--ax-negative-surface); border-color: var(--ax-negative-line); }
.ax-kpi--alert .ax-kpi__label { color: var(--ax-negative-ink); }
.ax-kpi--info .ax-kpi__label, .ax-kpi--info .ax-kpi__value { color: var(--ax-info-ink); }

/* Jauge segmentée (part brute / part expliquée, composition). */
.ax-meter { display: flex; height: 6px; border-radius: 3px; overflow: hidden; gap: 2px; }
.ax-meter--lg { height: 10px; }
.ax-meter--xl { height: 28px; border-radius: var(--ax-r-sm); }
.ax-meter__seg { flex: var(--w) 1 0; min-width: 2px; background: var(--t, var(--ax-track)); display: flex; align-items: center; padding-left: 10px; color: #fff; font-size: var(--ax-fs-xs); font-weight: var(--ax-fw-strong); white-space: nowrap; overflow: hidden; }
.ax-meter__seg--track { --t: var(--ax-track); }
/* Pastilles de comptage (situations à examiner). */
.ax-pips { display: flex; gap: 3px; flex-wrap: wrap; }
.ax-pip { width: 14px; height: 6px; border-radius: 2px; background: var(--t); }

/* ── MetricBreakdown : brut → contexte → résiduel ────────────────────────── */
.ax-reading {
  background: var(--ax-surface);
  border: 1px solid var(--ax-line);
  border-radius: var(--ax-r-2xl);
  padding: clamp(20px, 2.6vw, 32px) clamp(18px, 2.6vw, 32px) 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  box-shadow: var(--ax-shadow-lift);
}
.ax-reading__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--ax-s5); }
.ax-reading__titles { display: flex; flex-direction: column; gap: 6px; }
.ax-reading__title { font-size: clamp(20px, 2vw, 26px); font-weight: var(--ax-fw-strong); letter-spacing: var(--ax-tracking-tight); line-height: 1.2; }
.ax-reading__link { font-size: 13.5px; font-weight: var(--ax-fw-semi); text-decoration: none; padding-top: 4px; }

.ax-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: var(--ax-r-lg); background: var(--ax-bg); overflow: hidden; }
.ax-step { padding: 16px 20px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ax-step + .ax-step { border-left: 1px solid var(--ax-line); }
.ax-step__label { font-size: var(--ax-fs-small); font-weight: var(--ax-fw-medium); color: var(--ax-muted); }
.ax-step__value { font-size: 24px; font-weight: var(--ax-fw-strong); white-space: nowrap; }
.ax-step__note { font-size: var(--ax-fs-xs); color: var(--ax-muted); }
.ax-step--context .ax-step__value { color: var(--ax-info-ink); }
.ax-step--residual { background: var(--ax-residual-bg); border-left-color: var(--ax-residual-line) !important; }
.ax-step--residual .ax-step__label { color: var(--ax-negative-ink); }
.ax-step--residual .ax-step__value { color: var(--ax-negative-strong); }
.ax-step--residual .ax-step__note { color: var(--ax-ink-2); }

.ax-waterfall { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ax-wf-row {
  display: grid;
  grid-template-columns: minmax(150px, 230px) minmax(0, 1fr) 96px minmax(120px, 190px);
  gap: var(--ax-s4);
  align-items: center;
  padding: 10px 0;
  margin: 0;
  border-bottom: 1px solid var(--ax-line-soft);
}
.ax-wf-row__label { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; font-size: var(--ax-fs-ui); }
.ax-wf-row__bar { position: relative; height: 22px; }
.ax-wf-row__fill { position: absolute; top: 0; bottom: 0; left: var(--x, 0%); width: var(--w, 0%); min-width: 2px; border-radius: var(--ax-r-xs); background: var(--t, var(--ax-track)); }
.ax-wf-row__guide { position: absolute; left: var(--x, 0%); top: -10px; bottom: -10px; border-left: 1px dashed var(--ax-axis-line); }
.ax-wf-row__amount { font-size: var(--ax-fs-body); font-weight: var(--ax-fw-strong); text-align: right; white-space: nowrap; }
.ax-wf-row__outcome { font-size: var(--ax-fs-small); font-weight: var(--ax-fw-semi); color: var(--t-ink, var(--ax-muted)); }
.ax-wf-row--head .ax-wf-row__label { font-weight: var(--ax-fw-semi); }
.ax-wf-row--head .ax-wf-row__outcome { color: var(--ax-muted); font-weight: var(--ax-fw-regular); }
.ax-wf-row--total { border-bottom: 0; padding: 12px 0 2px; }
.ax-wf-row--total .ax-wf-row__label { font-weight: var(--ax-fw-strong); color: var(--ax-negative-strong); }
.ax-wf-row--total .ax-wf-row__amount { font-size: 17px; font-weight: var(--ax-fw-bold); color: var(--ax-negative-strong); }

/* Légende de composition (forme compacte). */
.ax-legend-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; margin: 0; padding: 0; list-style: none; }
.ax-legend-list li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; margin: 0; border-bottom: 1px solid var(--ax-line-soft); font-size: 13.5px; }
.ax-legend-list i { width: 10px; height: 10px; border-radius: 3px; background: var(--t); }
.ax-legend-list strong { white-space: nowrap; }

@media (max-width: 760px) {
  .ax-steps { grid-template-columns: 1fr; }
  .ax-step + .ax-step { border-left: 0; border-top: 1px solid var(--ax-line); }
  .ax-wf-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .ax-wf-row__bar { grid-column: 1 / -1; grid-row: 2; height: 14px; }
  .ax-wf-row__outcome { grid-column: 1 / -1; }
  .ax-wf-row__guide { display: none; }
  .ax-legend-list { grid-template-columns: 1fr; }
}

/* ── AppCard + AppPreview ────────────────────────────────────────────────── */
.ax-appcard {
  --cat: var(--ax-cat-default);
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--ax-surface);
  border: 1px solid var(--ax-line);
  border-radius: var(--ax-r-xl);
  padding: var(--ax-s5);
  color: var(--ax-ink);
  text-decoration: none;
  box-shadow: var(--ax-shadow-xs);
  transition: box-shadow var(--ax-ease), transform var(--ax-ease), border-color var(--ax-ease);
  min-width: 0;
}
a.ax-appcard:hover { box-shadow: var(--ax-shadow-hover); transform: translateY(-2px); border-color: var(--ax-line-strong); color: var(--ax-ink); }
a.ax-appcard:focus-visible { outline: 2px solid var(--ax-focus); outline-offset: 3px; border-radius: var(--ax-r-xl); }
.ax-appcard__head { display: flex; align-items: center; justify-content: space-between; gap: var(--ax-s2); }
.ax-appcard__cat {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: var(--ax-r-pill);
  background: oklch(0.95 0.03 var(--cat)); color: oklch(0.42 0.11 var(--cat));
  font-size: var(--ax-fs-xs); font-weight: var(--ax-fw-semi);
}
.ax-appcard__cat::before { content: ''; width: 6px; height: 6px; border-radius: 2px; background: oklch(0.58 0.13 var(--cat)); }
.ax-appcard__meta { font-size: var(--ax-fs-xs); color: var(--ax-muted); }
.ax-appcard__meta--alert { color: var(--ax-negative-ink); font-weight: var(--ax-fw-semi); }
.ax-appcard__titles { display: flex; flex-direction: column; gap: 4px; }
.ax-appcard__title { font-size: var(--ax-fs-card); font-weight: var(--ax-fw-semi); letter-spacing: -0.01em; }
.ax-appcard__desc { font-size: 13.5px; color: var(--ax-muted); }
.ax-appcard__foot { display: flex; justify-content: space-between; gap: var(--ax-s3); border-top: 1px solid var(--ax-line-soft); padding-top: 12px; font-size: var(--ax-fs-label); margin-top: auto; }
.ax-appcard__summary { color: var(--ax-muted); }
.ax-appcard__open { font-weight: var(--ax-fw-semi); color: var(--ax-link); white-space: nowrap; }

.ax-preview {
  height: 124px;
  border-radius: var(--ax-r-md);
  background: oklch(0.985 0.006 var(--cat));
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  overflow: hidden;
  font-size: 11.5px;
}
.ax-preview__big { font-size: 22px; font-weight: var(--ax-fw-bold); letter-spacing: -0.01em; line-height: 1.1; }
.ax-preview__big small { font-size: var(--ax-fs-small); font-weight: var(--ax-fw-medium); color: var(--ax-muted); }
.ax-pv-bar { display: grid; grid-template-columns: 70px 1fr 60px; gap: var(--ax-s2); align-items: center; }
.ax-pv-bar__label { color: var(--ax-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-pv-bar__track { display: block; height: 8px; }
.ax-pv-bar__fill { display: block; width: var(--w); height: 100%; min-width: 2px; border-radius: 3px; background: var(--t, var(--ax-track)); }
.ax-pv-bar__value { text-align: right; font-weight: var(--ax-fw-strong); white-space: nowrap; }
.ax-pv-bar--alert .ax-pv-bar__label, .ax-pv-bar--alert .ax-pv-bar__value { color: var(--ax-negative-ink); font-weight: var(--ax-fw-semi); }
.ax-pv-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; }
.ax-pv-legend span { display: flex; justify-content: space-between; gap: 6px; min-width: 0; }
.ax-pv-legend em { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-pv-legend em::before { content: '●'; color: var(--t); margin-right: 4px; }
.ax-pv-score { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; height: 100%; }
.ax-pv-score__main { display: flex; flex-direction: column; gap: 2px; }
.ax-pv-score__value { font-size: 28px; font-weight: var(--ax-fw-bold); line-height: 1; }
.ax-pv-score__value small { font-size: var(--ax-fs-label); color: var(--ax-muted); font-weight: var(--ax-fw-medium); }
.ax-pv-chips { display: flex; flex-direction: column; gap: 5px; }
.ax-pv-chip { display: flex; justify-content: space-between; gap: 6px; padding: 3px 7px; border-radius: var(--ax-r-xs); background: var(--ax-surface); border: 1px solid oklch(0.93 0.01 var(--cat)); }
.ax-pv-chip b { white-space: nowrap; }
.ax-pv-list { display: flex; flex-direction: column; justify-content: space-around; height: 100%; gap: 4px; }
.ax-pv-list__row { display: flex; align-items: center; gap: var(--ax-s2); font-size: var(--ax-fs-xs); min-width: 0; }
.ax-pv-list__row .ax-verb { width: 112px; flex: none; padding: 2px 0; font-size: 10px; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.ax-pv-list__row .ax-id { font-size: var(--ax-fs-xxs); white-space: nowrap; }
.ax-pv-list__row span:last-child { color: var(--ax-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ax-pv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ax-s2); }
.ax-pv-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ax-pv-stat b { font-size: var(--ax-fs-body); font-weight: var(--ax-fw-strong); white-space: nowrap; }
.ax-pv-stat span { font-size: var(--ax-fs-xxs); color: var(--ax-muted); }
.ax-pv-compo { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 6px; height: 100%; padding: 0; }
.ax-pv-compo > span { border-radius: 7px; background: var(--ax-surface); border: 1px solid var(--ax-line); padding: 6px 8px; font-size: var(--ax-fs-xxs); color: var(--ax-muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ax-pv-compo > span.is-wide { grid-column: span 2; }
.ax-pv-compo > span.is-add { border: 1.5px dashed var(--ax-line-strong); background: none; display: grid; place-items: center; }
.ax-pv-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; border: 1.5px dashed var(--ax-line-strong); border-radius: var(--ax-r-md); }
.ax-preview--empty { padding: 0; background: none; }

/* Sparkline et anneau de score : SVG produits par Ui.php, couleurs ici. */
.ax-spark { display: block; width: 100%; height: 36px; overflow: visible; }
.ax-spark path { fill: none; stroke: var(--t, var(--ax-series-1)); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.ax-spark .ax-spark__area { fill: var(--t-bg, transparent); stroke: none; opacity: .7; }
.ax-spark .ax-spark__marker { stroke: var(--ax-axis-line); stroke-width: 1; stroke-dasharray: 2 2; }
.ax-ring { position: relative; width: var(--size, 64px); height: var(--size, 64px); flex: none; }
.ax-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ax-ring__track { fill: none; stroke: var(--t-bg, var(--ax-fill)); stroke-width: 3.4; }
.ax-ring__value { fill: none; stroke: var(--t, var(--ax-info)); stroke-width: 3.4; stroke-linecap: round; }
.ax-ring__label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-weight: var(--ax-fw-bold); font-size: calc(var(--size, 64px) * .28); line-height: 1; }
.ax-ring__label small { display: block; font-size: 10.5px; color: var(--ax-muted); font-weight: var(--ax-fw-medium); margin-top: 2px; }

/* ── SituationCard ───────────────────────────────────────────────────────── */
.ax-situations { background: var(--ax-surface); border: 1px solid var(--ax-line); border-radius: var(--ax-r-xl); overflow: hidden; margin: 0; padding: 0; list-style: none; }
.ax-situations > li { margin: 0; }
.ax-situations > li + li { border-top: 1px solid var(--ax-line-soft); }
.ax-situation {
  display: grid;
  grid-template-columns: 140px minmax(0, 1.5fr) 24px minmax(0, 1fr) 20px;
  gap: var(--ax-s4);
  align-items: center;
  padding: 16px 22px;
  color: inherit;
  text-decoration: none;
  transition: background var(--ax-ease);
}
a.ax-situation:hover { background: var(--ax-bg-sidebar); color: inherit; }
a.ax-situation:focus-visible { outline-offset: -2px; }
.ax-situation--alert { background: var(--ax-alert-row); }
a.ax-situation--alert:hover { background: var(--ax-alert-row-hover); }
.ax-situation__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ax-situation__who .ax-id { font-size: var(--ax-fs-label); }
.ax-situation__name { font-size: var(--ax-fs-xs); color: var(--ax-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ax-situation__facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ax-situation__plus { color: var(--ax-faint); font-weight: var(--ax-fw-semi); }
.ax-situation__arrow, .ax-situation__chevron { color: var(--ax-faint); font-size: 16px; }
.ax-situation__reading { display: flex; flex-direction: column; gap: 3px; }
.ax-situation__verdict { font-size: var(--ax-fs-ui); font-weight: var(--ax-fw-strong); color: var(--t-ink); }
.ax-situation__why { font-size: var(--ax-fs-small); color: var(--ax-muted); }
@media (max-width: 900px) {
  .ax-situation { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px 16px; }
  .ax-situation__facts, .ax-situation__reading { grid-column: 1 / -1; }
  .ax-situation__arrow { display: none; }
  .ax-situation__chevron { grid-column: 2; grid-row: 1; }
}

/* ── ActionCard ──────────────────────────────────────────────────────────── */
.ax-action-card {
  background: var(--ax-surface);
  border: 1px solid var(--ax-line);
  border-radius: var(--ax-r-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: var(--ax-s3);
  min-width: 0;
}
.ax-action-card--alert { border-color: var(--ax-negative-line); }
.ax-action-card--featured { border-color: var(--ax-info-line); box-shadow: 0 0 0 4px var(--ax-info-bg); border-radius: var(--ax-r-xl); padding: 22px; }
.ax-action-card__head { display: flex; justify-content: space-between; align-items: center; gap: var(--ax-s2); }
.ax-action-card__head .ax-id { font-size: var(--ax-fs-xs); }
.ax-action-card__title { font-size: 14.5px; font-weight: var(--ax-fw-semi); line-height: 1.35; }
.ax-action-card--featured .ax-action-card__title { font-size: 16px; }
.ax-action-card__reason { font-size: var(--ax-fs-small); color: var(--ax-muted); }
.ax-action-card .ax-btn { margin-top: auto; }
.ax-action-card__actions { display: flex; flex-wrap: wrap; gap: var(--ax-s2); margin-top: auto; }
.ax-steps-list { display: flex; flex-direction: column; gap: var(--ax-s2); margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.ax-steps-list li { display: flex; gap: 10px; margin: 0; counter-increment: ax-step; }
.ax-steps-list li::before {
  content: counter(ax-step);
  width: 20px; height: 20px; flex: none;
  border-radius: 50%;
  background: var(--ax-info-bg); color: var(--ax-info-ink);
  display: grid; place-items: center;
  font-size: var(--ax-fs-xxs); font-weight: var(--ax-fw-bold);
}
.ax-steps-list { counter-reset: ax-step; }

/* ── WhyPanel ────────────────────────────────────────────────────────────── */
.ax-factors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.ax-factor {
  border: 1px solid var(--ax-line-soft);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  min-width: 0;
}
.ax-factor__value { font-size: 22px; font-weight: var(--ax-fw-strong); white-space: nowrap; }
.ax-factor__label { font-size: var(--ax-fs-small); color: var(--ax-ink-2); }
.ax-factor .ax-tag { align-self: flex-start; font-size: 10.5px; }
.ax-factor--tempers { border-color: var(--ax-info-line); background: var(--ax-info-surface); }
.ax-why__notes { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.ax-why__notes li { display: flex; gap: var(--ax-s2); align-items: baseline; margin: 0; }
.ax-why__notes li::before { content: ''; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--t, var(--ax-neutral)); transform: translateY(-1px); }
.ax-why__trend { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--ax-s4); align-items: center; border-top: 1px solid var(--ax-line-soft); padding-top: 14px; }
.ax-why__trend-text { display: flex; flex-direction: column; gap: 2px; }
.ax-why__trend-value { font-size: var(--ax-fs-ui); font-weight: var(--ax-fw-strong); color: var(--t-ink, var(--ax-ink)); }

/* ── EntityHeader ────────────────────────────────────────────────────────── */
.ax-entity__title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ax-entity__title .ax-id { font-size: .9em; }
.ax-entity__identity { font-size: var(--ax-fs-ui); font-weight: var(--ax-fw-semi); color: var(--ax-ink-2); }
.ax-entity__identity .ax-tag { margin-left: 6px; vertical-align: 2px; }
.ax-entity__meta { font-size: 14.5px; color: var(--ax-muted); }
.ax-identity-toggle[hidden] { display: none; }

/* Objets reliés à un tiers. */
.ax-objects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ax-s2); margin: 0; padding: 0; list-style: none; font-size: var(--ax-fs-xs); }
.ax-objects li { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 8px; background: color-mix(in oklch, var(--t-bg) 70%, white); margin: 0; }
.ax-objects b { font-size: var(--ax-fs-lead); }
.ax-objects span { color: var(--t-ink); }

/* ── Timeline métier (couloirs par domaine) ──────────────────────────────── */
.ax-tl-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: var(--ax-fs-xs); color: var(--ax-ink-2); }
.ax-tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ax-tl-legend__anomaly { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--ax-anomaly-halo); }
.ax-tl-legend__late { width: 14px; height: 10px; border-radius: 2px; background: var(--ax-late-legend); }
.ax-tl { display: grid; grid-template-columns: 130px minmax(0, 1fr); column-gap: 12px; }
.ax-tl__axis { position: relative; height: 22px; font-size: 11.5px; color: var(--ax-muted); }
.ax-tl__tick { position: absolute; left: var(--x); white-space: nowrap; }
.ax-tl__tick--end { left: auto; right: 0; font-weight: var(--ax-fw-semi); color: var(--ax-ink); }
.ax-tl__lane-label {
  display: flex; align-items: center; gap: var(--ax-s2);
  min-height: calc(var(--rows, 1) * 46px + 18px);
  border-top: 1px solid var(--ax-line-soft);
  font-size: var(--ax-fs-label); font-weight: var(--ax-fw-semi);
}
.ax-tl__lane-label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--t); flex: none; }
.ax-tl__lane {
  position: relative;
  min-height: calc(var(--rows, 1) * 46px + 18px);
  border-top: 1px solid var(--ax-line-soft);
  margin: 0; padding: 0; list-style: none;
}
.ax-tl__lane-label.is-last, .ax-tl__lane.is-last { border-bottom: 1px solid var(--ax-line-soft); }
.ax-tl__late { position: absolute; left: var(--x0); right: 0; top: 0; bottom: 0; background: var(--ax-late-band); }
.ax-tl__ev {
  position: absolute;
  left: min(var(--x), calc(100% - 150px));
  top: calc(var(--row, 0) * 46px + 12px);
  display: flex;
  gap: var(--ax-s2);
  align-items: flex-start;
  margin: 0;
  max-width: 170px;
}
.ax-tl__dot { width: 12px; height: 12px; margin-top: 3px; border-radius: 50%; background: var(--t); flex: none; }
.ax-tl__ev--anomaly .ax-tl__dot { width: 16px; height: 16px; margin-top: 1px; border: 3px solid var(--ax-anomaly-halo); }
.ax-tl__ev--negative .ax-tl__title::after { content: ' •'; color: var(--ax-negative); }
.ax-tl__body { display: flex; flex-direction: column; min-width: 0; }
.ax-tl__title { font-size: var(--ax-fs-small); font-weight: var(--ax-fw-semi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-tl__sub { font-size: 11.5px; color: var(--ax-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-tl__dotonly { position: absolute; left: var(--x); bottom: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--t); opacity: .7; margin: 0; }
.ax-tl__markers { position: relative; height: 30px; }
.ax-tl__marker { position: absolute; left: var(--x); top: 6px; transform: translateX(-50%); white-space: nowrap; font-size: 11.5px; font-weight: var(--ax-fw-semi); color: var(--ax-negative-ink); }
.ax-tl__marker::before { content: ''; position: absolute; left: 50%; bottom: 100%; height: var(--h, 200px); border-left: 1.5px dashed var(--ax-negative); }
.ax-story { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px; border-radius: var(--ax-r-md); background: var(--ax-story-bg); font-size: 13.5px; }
.ax-story__label { font-size: var(--ax-fs-xs); font-weight: var(--ax-fw-semi); color: var(--ax-info-ink); white-space: nowrap; }

/* Forme compacte / liste (mobile, accessibilité, widget « Chronologie »). */
.ax-tl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ax-tl-list__ev { display: grid; grid-template-columns: 64px 14px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 0; margin: 0; border-bottom: 1px solid var(--ax-line-soft); font-size: var(--ax-fs-label); }
.ax-tl-list__ev:last-child { border-bottom: 0; }
.ax-tl-list__date { color: var(--ax-muted); font-size: var(--ax-fs-xs); padding-top: 1px; }
.ax-tl-list__dot { width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--t); }
.ax-tl-list__ev--anomaly .ax-tl-list__dot { box-shadow: 0 0 0 3px var(--ax-anomaly-halo); }
.ax-tl-list__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ax-tl-list__title { font-weight: var(--ax-fw-semi); }
.ax-tl-list__sub { font-size: var(--ax-fs-xs); color: var(--ax-muted); }
.ax-tl-list__amount { font-weight: var(--ax-fw-strong); white-space: nowrap; }
.ax-tl-list__ev--negative .ax-tl-list__title { color: var(--ax-negative-strong); }
.ax-tl-wrap .ax-tl-list { display: none; }
@media (max-width: 760px) {
  .ax-tl-wrap .ax-tl, .ax-tl-wrap .ax-tl-legend { display: none; }
  .ax-tl-wrap .ax-tl-list { display: flex; }
}

/* ── États ───────────────────────────────────────────────────────────────── */
.ax-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--ax-s3);
  padding: var(--ax-s6);
  background: var(--ax-surface);
  border: 1px solid var(--ax-line);
  border-radius: var(--ax-r-xl);
}
.ax-state__icon { width: 40px; height: 40px; border-radius: var(--ax-r-md); background: var(--ax-fill); display: grid; place-items: center; font-size: var(--ax-fs-xs); font-weight: var(--ax-fw-bold); color: var(--ax-ink-2); }
.ax-state__title { font-size: var(--ax-fs-h2); font-weight: var(--ax-fw-semi); letter-spacing: -0.01em; }
.ax-state__text { font-size: var(--ax-fs-ui); line-height: 1.5; color: var(--ax-ink-2); max-width: 64ch; }
.ax-state__actions { display: flex; flex-wrap: wrap; gap: var(--ax-s2); }
.ax-state__code { font-size: var(--ax-fs-xs); color: var(--ax-muted); }
.ax-state__code code { font-size: var(--ax-fs-xxs); }
.ax-state--empty { border-style: dashed; border-width: 1.5px; border-color: var(--ax-line-strong); background: transparent; align-items: center; text-align: center; }
.ax-state--empty .ax-state__text { margin: 0 auto; }
.ax-state--error .ax-state__panel { align-self: stretch; padding: 14px; border-radius: var(--ax-r-md); background: var(--ax-error-panel); border: 1px solid var(--ax-error-line); display: flex; flex-direction: column; gap: 6px; }
.ax-state--error .ax-state__title { color: var(--ax-negative-strong); font-size: var(--ax-fs-ui); }
.ax-state--inline { padding: var(--ax-s4); border-radius: var(--ax-r-md); }
.ax-state--inline .ax-state__title { font-size: var(--ax-fs-ui); }
.ax-state--inline .ax-state__text { font-size: var(--ax-fs-small); }

.ax-skeleton { display: flex; flex-direction: column; gap: 14px; }
.ax-skel { border-radius: 4px; background: var(--ax-fill-soft); height: 12px; }
.ax-skel--pill { width: 96px; height: 20px; border-radius: var(--ax-r-pill); background: var(--ax-fill); }
.ax-skel--title { width: 70%; height: 16px; background: var(--ax-fill); }
.ax-skel--block { height: 120px; border-radius: var(--ax-r-md); background: linear-gradient(90deg, var(--ax-fill-soft), var(--ax-bg-sidebar), var(--ax-fill-soft)); background-size: 200% 100%; animation: ax-shimmer 1.4s linear infinite; }
@keyframes ax-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── DateFilter : contrôle segmenté (liens, sans JavaScript) ─────────────── */
.ax-segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--ax-r-md); background: var(--ax-fill); }
.ax-segmented a, .ax-segmented span {
  display: inline-flex; align-items: center;
  min-height: 34px; padding: 0 12px;
  border-radius: 8px;
  font-size: var(--ax-fs-label); font-weight: var(--ax-fw-medium);
  color: var(--ax-ink-2); text-decoration: none;
}
.ax-segmented a:hover { color: var(--ax-ink); }
.ax-segmented [aria-current] { background: var(--ax-surface); color: var(--ax-ink); font-weight: var(--ax-fw-semi); box-shadow: 0 1px 2px var(--ax-shadow-control-color); }

/* ── Tableau de données ──────────────────────────────────────────────────── */
.ax-table-wrap { overflow-x: auto; border-radius: var(--ax-r-lg); }
.ax-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }

@media (max-width: 640px) {
  .ax-card, .box { padding: 18px 16px; }
  .ax-objects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ax-why__trend { grid-template-columns: 1fr; }
}

/* ── Références d'entités et recherche locale (assets/js/entities.js) ─────── */
.ax-entity[data-entity-state="resolved"] { font-family: inherit; }
.ax-entity-search { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: var(--ax-s2); min-width: 16rem; }
.ax-entity-search__input { flex: 1 1 12rem; min-width: 0; }
.ax-entity-search__current { font-size: var(--ax-fs-xs); color: var(--ax-ink-2); }
.ax-entity-search__status { flex-basis: 100%; font-size: var(--ax-fs-xxs); color: var(--ax-muted); }
.ax-entity-search__status:empty { display: none; }
.ax-entity-search__list {
  position: absolute; z-index: 20; top: 100%; left: 0; right: 0; margin: 2px 0 0; padding: var(--ax-s1) 0; list-style: none;
  max-height: 18rem; overflow-y: auto; background: var(--ax-surface); border: 1px solid var(--ax-line); border-radius: var(--ax-r-md);
  box-shadow: var(--ax-shadow-lift);
}
.ax-entity-search__option { padding: var(--ax-s2) var(--ax-s3); cursor: pointer; color: var(--ax-ink); font-size: var(--ax-fs-ui); }
.ax-entity-search__option[aria-selected="true"], .ax-entity-search__option:hover { background: var(--ax-bg-hover); }

/* Connexion du navigateur à l'API Dolibarr du tenant (canal dolibarr-rest). */
.ax-erp-link { position: relative; display: inline-flex; align-items: center; gap: var(--ax-s2); font-size: var(--ax-fs-xs); color: var(--ax-muted); }
.ax-erp-link__btn { font: inherit; padding: 2px var(--ax-s2); border: 1px solid var(--ax-line); border-radius: var(--ax-r-sm); background: var(--ax-surface); color: var(--ax-ink-2); cursor: pointer; }
.ax-erp-link__btn:hover { background: var(--ax-bg-hover); }
.ax-erp-link__panel {
  position: absolute; z-index: 30; top: 100%; right: 0; margin-top: 4px; width: min(22rem, 90vw); display: flex; flex-wrap: wrap; gap: var(--ax-s2);
  padding: var(--ax-s3); background: var(--ax-surface); border: 1px solid var(--ax-line); border-radius: var(--ax-r-md); box-shadow: var(--ax-shadow-lift);
}
.ax-erp-link__panel[hidden] { display: none; }
.ax-erp-link__key { flex: 1 1 12rem; min-width: 0; }
.ax-erp-link__msg:empty { display: none; }
.ax-erp-link__msg, .ax-erp-link__help { flex-basis: 100%; font-size: var(--ax-fs-xxs); color: var(--ax-muted); }
/* Variante barre latérale (grand écran) : le panneau s'ouvre dans le flux. */
.ax-erp-link--side { display: flex; flex-wrap: wrap; margin: var(--ax-s2) 0; }
.ax-erp-link--side[hidden] { display: none; }
.ax-erp-link--side .ax-erp-link__panel { position: static; width: 100%; margin-top: var(--ax-s1); box-shadow: none; }
.ax-erp-link[hidden] { display: none; }

/* ── Détail des indicateurs investigables (drill-down `details`, assets/js/details.js) ── */
a.aw-drill[data-detail] { text-decoration: underline dotted; text-underline-offset: .2em; cursor: pointer; }
.ax-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(760px, 100vw); display: flex; flex-direction: column;
  background: var(--ax-surface); box-shadow: var(--ax-shadow-lift), 0 0 0 1px var(--ax-line); }
.ax-drawer[hidden] { display: none; }
.ax-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--ax-s3); padding: var(--ax-s4) var(--ax-s5); border-bottom: 1px solid var(--ax-line-soft); }
.ax-drawer__title { margin: 0; font-size: 1.05rem; }
.ax-drawer__close { border: 0; background: var(--ax-bg-sunken); color: var(--ax-ink); width: 2rem; height: 2rem; border-radius: var(--ax-r-md); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.ax-drawer__close:focus-visible { outline: 2px solid var(--ax-focus); outline-offset: 2px; }
.ax-drawer__body { overflow: auto; padding: var(--ax-s4) var(--ax-s5); }
.ax-detail__count { margin: 0 0 var(--ax-s3); color: var(--ax-ink-2); }
.ax-detail__actions { white-space: nowrap; }
.ax-detail__action { display: inline-block; margin-right: var(--ax-s2); color: var(--ax-link); }
.ax-detail__more { margin-top: var(--ax-s4); }
.ax-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Navigation complémentaire compacte (app.related) et sorties vers le système source ── */
.ax-explore { display: flex; align-items: center; gap: var(--ax-s2); margin: 0 0 var(--ax-s4); min-width: 0; }
.ax-explore__label, .ax-exits__label { flex: none; font-size: .78rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ax-muted); }
.ax-explore__list { display: flex; gap: var(--ax-s2); margin: 0; padding: 0 0 2px; list-style: none; overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.ax-explore__list li { flex: none; }
.ax-chip { display: inline-block; padding: .3rem .75rem; border-radius: 999px; background: var(--ax-bg-sunken); color: var(--ax-ink); font-size: .88rem; white-space: nowrap; text-decoration: none; box-shadow: inset 0 0 0 1px var(--ax-line); }
.ax-chip:hover { background: var(--ax-bg-hover); }
.ax-chip:focus-visible, .ax-ext:focus-visible { outline: 2px solid var(--ax-focus); outline-offset: 2px; }
.ax-exits { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ax-s2) var(--ax-s3); margin: 0 0 var(--ax-s4); }
.ax-ext { color: var(--ax-link); white-space: nowrap; }
.ax-ext:hover { color: var(--ax-link-hover); }
.ax-ext__mark { margin-left: .15em; font-size: .9em; }
