/* ═══════════════════════════════════════════════════════════════════════
   Authentysens Core UI — composants (classes au-*, sans framework)
   Fichier GÉNÉRÉ dans les applications : ne pas le modifier là-bas.
   Source : ~/projets/authentysens/packages/core-ui/components.css
   Chaque composant, dans tous ses états : packages/core-ui/lab.html
   ═══════════════════════════════════════════════════════════════════════ */

.au, .au *, .au-shell, .au-shell *, .au-more, .au-more * { box-sizing: border-box; } /* la coque se suffit (29/09) */
.au-focus:focus-visible, .au-btn:focus-visible, .au-input:focus-visible, .au-select:focus-visible,
.au-check input:focus-visible, .au-switch input:focus-visible, .au-tab:focus-visible, .au-card--interactive:focus-visible,
.au-table th :is(button, a.au-sort):focus-visible { outline: 2px solid var(--auth-color-focus); outline-offset: 3px; }

/* ── Texte ─────────────────────────────────────────────────────────── */
.au-display { font: var(--auth-font-display); letter-spacing: var(--auth-tracking-display); margin: 0; }
.au-h1 { font: var(--auth-font-heading-lg); letter-spacing: var(--auth-tracking-heading); margin: 0; }
.au-h2 { font: var(--auth-font-heading-md); letter-spacing: var(--auth-tracking-heading); margin: 0; }
.au-h3 { font: var(--auth-font-heading-sm); margin: 0; }
.au-body { font: var(--auth-font-body); }
.au-label { font: var(--auth-font-label); color: var(--auth-color-ink-secondary); }
.au-caption { font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); }
.au-num { font: var(--auth-font-numeric); font-variant-numeric: tabular-nums; }
.au-wordmark { font: 600 0.9375rem/1 var(--auth-font-family); letter-spacing: var(--auth-tracking-wordmark); }
.au-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; }

/* ── Boutons : primary (encre) · secondary · ghost · icon · danger ── */
.au-btn {
  --h: var(--auth-control-md);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--auth-space-2);
  /* Révision d'affichage (28/09, Daniel : « certains écrits dépassent les boutons ») : jamais plus large que son conteneur ;
     un libellé trop long passe à la ligne au lieu de déborder ou d'être coupé. Hauteur minimale conservée. */
  min-height: var(--h); height: auto; max-width: 100%; padding: 6px calc(var(--h) / 2.2); border: 1px solid transparent; border-radius: var(--auth-radius-control);
  font: 600 0.8125rem/1.25 var(--auth-font-family); letter-spacing: 0.005em; white-space: normal; text-align: center; overflow-wrap: break-word; /* « anywhere » laissait comprimer le bouton lettre par lettre (« Cherche r », relevé du CRM) */ cursor: pointer;
  text-decoration: none; position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent;
  transition: background var(--auth-motion-fast) var(--auth-ease-standard), border-color var(--auth-motion-fast), color var(--auth-motion-fast),
    box-shadow var(--auth-motion-fast) var(--auth-ease-standard), transform var(--auth-motion-press) var(--auth-ease-standard);
}
.au-btn svg { width: 18px; height: 18px; flex: none; }
.au-btn:active:not(:disabled):not([aria-busy='true']) { transform: scale(var(--auth-press-scale)); }
.au-btn--primary { background: var(--auth-color-action); color: var(--auth-color-on-action); box-shadow: var(--auth-shadow-1); }
.au-btn--primary:hover:not(:disabled) { background: var(--auth-color-action-hover); } /* CUI-UX-1 : plus d'ombre de survol qui « décolle » le bouton principal */
.au-btn--secondary { background: var(--auth-color-surface-raised); color: var(--auth-color-ink); border-color: var(--auth-color-line-strong); box-shadow: var(--auth-highlight); }
.au-btn--secondary:hover:not(:disabled) { border-color: color-mix(in srgb, var(--auth-color-ink) 32%, transparent); }
.au-btn--ghost { background: transparent; color: var(--auth-color-ink-secondary); }
.au-btn--ghost:hover:not(:disabled) { background: color-mix(in srgb, var(--auth-color-ink) 6%, transparent); color: var(--auth-color-ink); }
.au-btn--danger { background: var(--auth-color-danger); color: var(--auth-color-on-danger); }
.au-btn--danger:hover:not(:disabled) { background: color-mix(in srgb, var(--auth-color-danger) 90%, var(--auth-color-ink)); }
.au-btn--icon { width: var(--h); padding: 0; }
.au-btn--sm { --h: var(--auth-control-sm); font-size: 0.75rem; }
.au-btn--lg { --h: var(--auth-control-lg); font-size: 0.875rem; }
.au-btn--block { width: 100%; }
.au-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
/* Chargement : le libellé reste (on sait ce qui se passe), une fine barre avance. */
.au-btn[aria-busy='true'] { cursor: progress; }
.au-btn[aria-busy='true']::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: currentColor; opacity: 0.55; transform-origin: left; animation: au-progress var(--auth-loop-progress) var(--auth-ease-standard) infinite; }

/* ── Champs ────────────────────────────────────────────────────────── */
.au-field { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: var(--auth-space-2); } /* peut rétrécir : un champ « mois » ou date débordait d’une colonne étroite (signalé par MARKETING, 27/09) */
.au-field > label, .au-field > .au-field-label { font: var(--auth-font-label); color: var(--auth-color-ink-secondary); }
.au-field-help { font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); margin: 0; }
.au-field-error { font: var(--auth-font-caption); color: var(--auth-color-danger); margin: 0; display: flex; gap: 6px; align-items: center; }
.au-input, .au-select, .au-textarea {
  width: 100%; height: var(--auth-control-md); padding: 0 var(--auth-space-4);
  font: 400 0.9375rem/1.2 var(--auth-font-family); color: var(--auth-color-ink);
  background: var(--auth-color-surface-raised); border: 1px solid var(--auth-color-line-strong); border-radius: var(--auth-radius-sm);
  box-shadow: var(--auth-highlight); -webkit-appearance: none; appearance: none;
  transition: border-color var(--auth-motion-fast) var(--auth-ease-standard), box-shadow var(--auth-motion-fast) var(--auth-ease-standard);
}
.au-textarea { height: auto; min-height: 96px; padding: var(--auth-space-3) var(--auth-space-4); line-height: 1.5; resize: vertical; }
.au-input--sm, .au-select--sm { height: var(--auth-control-sm); font-size: 0.875rem; }
.au-input::placeholder, .au-textarea::placeholder { color: var(--auth-color-ink-tertiary); }
.au-input:hover, .au-select:hover, .au-textarea:hover { border-color: color-mix(in srgb, var(--auth-color-ink) 30%, transparent); }
.au-input:focus, .au-select:focus, .au-textarea:focus { outline: none; border-color: var(--auth-color-focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--auth-color-focus) 18%, transparent); }
.au-input[aria-invalid='true'], .au-select[aria-invalid='true'], .au-textarea[aria-invalid='true'] { border-color: var(--auth-color-danger); }
.au-input:disabled, .au-select:disabled, .au-textarea:disabled { opacity: 0.55; cursor: not-allowed; }
.au-select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8e89' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.au-check, .au-radio { display: inline-flex; align-items: center; gap: var(--auth-space-3); min-height: 44px; font: var(--auth-font-body); cursor: pointer; }
.au-check input, .au-radio input { appearance: none; -webkit-appearance: none; margin: 0; width: 20px; height: 20px; flex: none; border: 1.5px solid var(--auth-color-line-strong); background: var(--auth-color-surface-raised); display: grid; place-items: center; transition: background var(--auth-motion-fast), border-color var(--auth-motion-fast); cursor: pointer; }
.au-check input { border-radius: 6px; }
.au-radio input { border-radius: 50%; }
.au-check input::after { content: ''; width: 12px; height: 12px; background: var(--auth-color-on-action); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2 5 8.6l4.5-5'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2 5 8.6l4.5-5'/%3E%3C/svg%3E") center/contain no-repeat; transform: scale(0); transition: transform var(--auth-motion-fast) var(--auth-ease-spring); }
.au-radio input::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--auth-color-on-action); transform: scale(0); transition: transform var(--auth-motion-fast) var(--auth-ease-spring); }
.au-check input:checked, .au-radio input:checked { background: var(--auth-color-action); border-color: var(--auth-color-action); }
.au-check input:checked::after, .au-radio input:checked::after { transform: scale(1); }
.au-switch { display: inline-flex; align-items: center; gap: var(--auth-space-3); min-height: 44px; cursor: pointer; font: var(--auth-font-body); }
.au-switch input { appearance: none; -webkit-appearance: none; margin: 0; width: 40px; height: 24px; border-radius: 999px; background: var(--auth-color-line-strong); position: relative; cursor: pointer; transition: background var(--auth-motion-normal) var(--auth-ease-standard); flex: none; }
.au-switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); transition: transform var(--auth-motion-normal) var(--auth-ease-spring); }
.au-switch input:checked { background: var(--auth-color-action); }
.au-switch input:checked::after { transform: translateX(16px); }
.au-form { display: grid; gap: var(--auth-space-5); }
.au-form-summary { padding: var(--auth-space-3) var(--auth-space-4); border-radius: var(--auth-radius-xs); background: var(--auth-color-danger-soft); color: var(--auth-color-danger); font: var(--auth-font-label); }
.au-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.au-fieldset legend { padding: 0; font: var(--auth-font-label); color: var(--auth-color-ink-secondary); }
.au-choice-group { display: flex; flex-wrap: wrap; gap: 0 var(--auth-space-4); }
.au-combobox { position: relative; }
.au-combobox-list { position: absolute; z-index: var(--auth-z-popover); top: calc(100% + 4px); left: 0; right: 0; max-height: 240px; overflow-y: auto; padding: var(--auth-space-1); border: 1px solid var(--auth-color-line-strong); border-radius: var(--auth-radius-sm); background: var(--auth-color-surface-overlay); box-shadow: var(--auth-shadow-2); }
.au-combobox-option { min-height: 40px; display: flex; align-items: center; padding: 0 var(--auth-space-3); border-radius: var(--auth-radius-xs); cursor: pointer; }
.au-combobox-option[aria-selected='true'], .au-combobox-option:hover { background: color-mix(in srgb, var(--auth-color-ink) 8%, transparent); }
.au-file { height: auto; min-height: var(--auth-control-md); padding-block: var(--auth-space-2); }
.au-file::file-selector-button { margin-right: var(--auth-space-3); padding: var(--auth-space-2) var(--auth-space-3); border: 1px solid var(--auth-color-line-strong); border-radius: var(--auth-radius-sm); background: var(--auth-color-surface); color: var(--auth-color-ink); font: var(--auth-font-label); cursor: pointer; }

/* ── Étapes (tunnel de référence : création d'affaire de Commission) ── */
.au-steps { display: flex; gap: var(--auth-space-2); list-style: none; margin: 0; padding: 0; counter-reset: step; overflow-x: auto; }
.au-steps li { counter-increment: step; display: flex; align-items: center; gap: var(--auth-space-2); padding: 0 var(--auth-space-3); height: 36px; border-radius: var(--auth-radius-pill); font: var(--auth-font-label); color: var(--auth-color-ink-tertiary); white-space: nowrap; }
.au-steps li::before { content: counter(step); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 0.75rem/1 var(--auth-font-family); border: 1.5px solid currentColor; }
.au-steps li[aria-current='step'] { color: var(--auth-color-ink); background: var(--auth-color-surface-raised); box-shadow: var(--auth-shadow-1); }
.au-steps li[aria-current='step']::before { background: var(--auth-accent); border-color: var(--auth-accent); color: #fff; }
.au-steps li[data-done]::before { content: '✓'; background: var(--auth-color-success-soft); border-color: transparent; color: var(--auth-color-success); }

/* ── Cartes : standard · interactive · metric · featured ─────────── */
.au-card { background: var(--auth-color-surface); border: 1px solid transparent; /* direction B : sans bord, l'ombre chaude détache */ border-radius: var(--auth-radius-lg); box-shadow: var(--auth-shadow-1), var(--auth-highlight); padding: var(--auth-space-6); }
.au-card--interactive { display: block; color: inherit; text-decoration: none; cursor: pointer; transition: transform var(--auth-motion-normal) var(--auth-ease-standard), box-shadow var(--auth-motion-normal) var(--auth-ease-standard), background var(--auth-motion-normal); }
@media (hover: hover) { .au-card--interactive:hover { transform: translateY(-2px); box-shadow: var(--auth-shadow-2), var(--auth-highlight); background: var(--auth-color-surface-raised); } }
.au-card--interactive:active { transform: scale(var(--auth-press-scale)); }
.au-card--metric { padding: var(--auth-space-5); display: grid; gap: var(--auth-space-1); align-content: start; container-type: inline-size; min-width: 0; } /* étirée par sa grille, la carte ne répartit plus la hauteur entre ses lignes : chiffres alignés (signalé par l’IA, 27/09) */
.au-card--metric .au-metric-value { font: 500 1.75rem/1.1 var(--auth-font-family); font-size: clamp(1.125rem, 11cqi, 1.75rem); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow-wrap: break-word; min-width: 0; } /* 28/09 : le chiffre suit la largeur de sa carte (les grands montants empiétaient sur le texte) */
.au-card--metric .au-metric-label, .au-card--metric > * { min-width: 0; overflow-wrap: break-word; }
.au-card--metric .au-metric-label { font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
/* Carte vedette (décision du 24/09) : une surface posée, l'accent en simple repère (barre + sur-titre), jamais en
   fond plein ; une seule action, à l'encre comme partout (le libellé dit exactement ce qu'elle lance). */
.au-card--featured { position: relative; overflow: hidden; padding: var(--auth-space-6); border-radius: var(--auth-radius-xl); background: var(--auth-color-surface-raised); box-shadow: var(--auth-shadow-2), var(--auth-highlight); }
.au-card--featured::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: var(--auth-color-action); }
.au-card--featured .au-eyebrow { font: var(--auth-font-label); letter-spacing: 0.04em; text-transform: uppercase; color: var(--auth-color-action); margin: 0; }

/* ── Statuts : success · warning · danger · info · neutral ─────────── */
.au-badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--auth-radius-pill); font: 500 0.75rem/1 var(--auth-font-family); white-space: nowrap; background: var(--auth-color-neutral-soft); color: var(--auth-color-neutral); }
.au-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.au-badge--success { background: var(--auth-color-success-soft); color: var(--auth-color-success); }
.au-badge--warning { background: var(--auth-color-warning-soft); color: var(--auth-color-warning); }
.au-badge--danger { background: var(--auth-color-danger-soft); color: var(--auth-color-danger); }
.au-badge--info { background: var(--auth-color-info-soft); color: var(--auth-color-info); }
.au-badge--accent { background: color-mix(in srgb, var(--auth-color-action) 12%, transparent); color: var(--auth-color-action); }

/* ── Onglets, fil d'Ariane ─────────────────────────────────────────── */
.au-tabs { display: flex; gap: 2px; padding: 3px; border-radius: var(--auth-radius-md); background: color-mix(in srgb, var(--auth-color-ink) 6%, transparent); overflow-x: auto; scrollbar-width: none; }
.au-tab { flex: none; min-height: 36px; padding: 0 var(--auth-space-4); border: 0; border-radius: var(--auth-radius-sm); background: transparent; font: var(--auth-font-label); color: var(--auth-color-ink-secondary); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; transition: background var(--auth-motion-fast), color var(--auth-motion-fast); }
.au-tab:hover { color: var(--auth-color-ink); }
.au-tab[aria-selected='true'], .au-tab[aria-current='page'] { background: var(--auth-color-surface-raised); color: var(--auth-color-ink); box-shadow: var(--auth-shadow-1); }
.au-tab[aria-pressed='true'] { background: var(--auth-color-surface-raised); color: var(--auth-color-ink); box-shadow: var(--auth-shadow-1); }
.au-tab-panel { padding: var(--auth-space-4) var(--auth-space-1); color: var(--auth-color-ink-secondary); }
.au-tab-panel:focus-visible { outline: 2px solid var(--auth-color-focus); outline-offset: 2px; }
.au-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-1); list-style: none; margin: 0; padding: 0; font: var(--auth-font-body); color: var(--auth-color-ink-secondary); }
.au-breadcrumb li + li::before { content: '/'; margin-right: var(--auth-space-1); color: var(--auth-color-ink-tertiary); }
.au-breadcrumb a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.au-breadcrumb a:hover { color: var(--auth-color-ink); }
.au-breadcrumb [aria-current='page'] { color: var(--auth-color-ink); }

/* ── Tableaux : comfortable 52 / compact 40, montants à droite ────── */
.au-table-wrap { overflow-x: auto; border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-lg); background: var(--auth-color-surface); }
.au-table { width: 100%; border-collapse: separate; border-spacing: 0; font: var(--auth-font-body); font-size: 0.875rem; }
.au-table th { position: sticky; top: 0; z-index: 1; background: var(--auth-color-fill); text-align: left; font: var(--auth-font-caption); font-weight: 600; letter-spacing: 0.04em; color: var(--auth-color-ink-secondary); height: 40px; padding: 0 var(--auth-space-4); border-bottom: 1px solid var(--auth-color-line); white-space: nowrap; }
.au-table th :is(button, a.au-sort) { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; min-height: 32px; }
.au-table th :is(button, a.au-sort)::after { content: ''; width: 5px; height: 5px; margin-left: 2px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; opacity: 0; transform: rotate(45deg) translateY(-2px); transition: opacity var(--auth-motion-fast), transform var(--auth-motion-normal) var(--auth-ease-standard); }
.au-table th :is(button, a.au-sort):hover::after { opacity: 0.45; }
.au-table th[aria-sort] button { color: var(--auth-color-ink); }
.au-table th[aria-sort] button::after { opacity: 1; }
.au-table th[aria-sort='ascending'] button::after { transform: rotate(-135deg) translateY(-2px); } /* v3 : un chevron, plus de ↑ ↓ bruts */
.au-table td { height: 52px; padding: var(--auth-space-2) var(--auth-space-4); /* marge verticale : une cellule sur deux lignes ne touche plus ses bordures (signalé par l’IA, 27/09) ; une ligne garde 52 px */ border-bottom: 1px solid var(--auth-color-line); }
.au-table--compact td { height: 40px; }
.au-table tr:last-child td { border-bottom: 0; }
.au-table tbody tr[data-href], .au-table tbody tr.au-row-link { cursor: pointer; }
.au-table tbody tr:hover td { background: color-mix(in srgb, var(--auth-color-ink) 3%, transparent); }
.au-table .au-num, .au-table td.num, .au-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.au-filterbar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-2); margin-bottom: var(--auth-space-4); }
.au-filterbar .au-input { max-width: 320px; height: var(--auth-control-sm); }
/* Un sélecteur de filtre se borne comme un champ : sans cela, quatre sélecteurs s'empilent en pleine largeur (CRM, 30/09). */
.au-filterbar .au-select { width: auto; min-width: min(160px, 100%); max-width: 320px; height: var(--auth-control-sm); flex: 0 1 auto; }
/* Au téléphone, le sélecteur cède la place : une étiquette, un sélecteur au nom long et un bouton doivent tenir sur
   358 px sans défilement latéral (régression de 3596117 relevée par le CRM sur /planning, 30/09). */
@media (max-width: 700px) { .au-filterbar .au-select { min-width: 0; max-width: 100%; } }
.au-chip { height: 32px; padding: 0 var(--auth-space-3); border-radius: var(--auth-radius-pill); border: 1px solid var(--auth-color-line-strong); background: var(--auth-color-surface-raised); font: var(--auth-font-label); color: var(--auth-color-ink-secondary); cursor: pointer; }
.au-chip[aria-pressed='true'] { background: var(--auth-color-action); border-color: var(--auth-color-action); color: var(--auth-color-on-action); }

/* ── Données : courbe, barres, progression, anneau ─────────────────── */
.au-chart-card { min-width: 0; margin: 0; display: grid; align-content: start; gap: var(--auth-space-3); }
.au-chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--auth-space-3); flex-wrap: wrap; }
.au-chart-head h3 { margin: 0; font: var(--auth-font-heading-sm); }
.au-chart { min-width: 0; overflow-x: auto; }
.au-chart-svg { display: block; width: 100%; height: auto; overflow: visible; } /* largeur minimale posée par charts.js, seulement si les libellés l'exigent */
.au-chart-grid { stroke: var(--auth-color-line-strong); stroke-width: 1; stroke-dasharray: 3 5; }
.au-chart-zero { stroke: var(--auth-color-ink-tertiary); stroke-width: 1; }
.au-chart-threshold { stroke: var(--auth-color-warning); stroke-width: 1.5; stroke-dasharray: 6 4; }
.au-chart-axis { fill: var(--auth-color-ink-tertiary); font: 12px var(--auth-font-family); font-variant-numeric: tabular-nums; }
.au-chart-line { fill: none; stroke: var(--auth-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--au-line-length); stroke-dashoffset: 0; animation: au-chart-draw var(--auth-motion-draw) var(--auth-ease-enter) both; }
.au-chart-line--2 { stroke: var(--auth-color-ink-secondary); stroke-width: 2; stroke-dasharray: 7 5; animation: none; }
.au-chart-line--3 { stroke: var(--auth-color-success); }
.au-chart-line--4 { stroke: var(--auth-color-warning); }
.au-chart-point { transform-box: fill-box; transform-origin: center; fill: var(--auth-color-surface-raised); stroke: var(--auth-accent); stroke-width: 2; animation: au-chart-point var(--auth-motion-chart-point) var(--auth-ease-enter) var(--auth-motion-chart-point) both; }
.au-chart-point--2 { stroke: var(--auth-color-ink-secondary); animation: none; }
.au-chart-point--3 { stroke: var(--auth-color-success); }
.au-chart-point--4 { stroke: var(--auth-color-warning); }
.au-chart-bar { fill: var(--auth-accent); transform-box: fill-box; transform-origin: center bottom; animation: au-chart-grow var(--auth-motion-chart) var(--auth-ease-enter) both; }
.au-chart-bar--2 { fill: var(--auth-color-ink-secondary); animation-delay: calc(var(--auth-stagger) * 1.5); }
.au-chart-bar--3 { fill: var(--auth-color-success); animation-delay: calc(var(--auth-stagger) * 3); }
.au-chart-bar--4 { fill: var(--auth-color-warning); animation-delay: calc(var(--auth-stagger) * 4.5); }
.au-chart-legend { display: flex; flex-wrap: wrap; gap: var(--auth-space-3) var(--auth-space-5); font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
.au-chart-key { display: inline-flex; align-items: center; gap: var(--auth-space-2); }
.au-chart-key::before { content: ''; width: 12px; height: 3px; border-radius: 3px; background: var(--auth-accent); }
.au-chart-key--2::before { background: var(--auth-color-ink-secondary); }
.au-chart-key--3::before { background: var(--auth-color-success); }
.au-chart-key--4::before { background: var(--auth-color-warning); }
.au-chart-data { margin-top: var(--auth-space-2); font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
.au-chart-data summary { width: fit-content; min-height: 32px; display: list-item; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
/* Parts d'un total (renderParts, 27/09) : barre découpée + légende chiffrée. Six teintes, « Autres » en neutre. */
.au-parts { display: grid; gap: var(--auth-space-3); overflow: visible; }
.au-parts-bar { display: flex; gap: 2px; height: 14px; border-radius: var(--auth-radius-pill); overflow: hidden; background: var(--auth-color-neutral-soft); }
.au-parts-seg { flex: var(--au-part) 1 0; min-width: 3px; background: var(--auth-accent); transform-origin: left; animation: au-chart-grow-x var(--auth-motion-chart) var(--auth-ease-enter) both; }
.au-parts-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--auth-space-2); }
.au-parts-key { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 3.5em; align-items: center; gap: var(--auth-space-3); font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
.au-parts-key::before { content: ''; width: 12px; height: 12px; border-radius: 4px; background: var(--auth-accent); }
.au-parts-name { color: var(--auth-color-ink); min-width: 0; overflow-wrap: anywhere; }
.au-parts-value, .au-parts-pct { font-variant-numeric: tabular-nums; text-align: right; }
.au-parts-pct { color: var(--auth-color-ink); font-weight: 600; }
.au-parts-seg--2, .au-parts-key--2::before { background: var(--auth-color-info); }
.au-parts-seg--3, .au-parts-key--3::before { background: var(--auth-color-success); }
.au-parts-seg--4, .au-parts-key--4::before { background: var(--auth-color-warning); }
.au-parts-seg--5, .au-parts-key--5::before { background: var(--auth-color-ink-secondary); }
.au-parts-seg--6, .au-parts-key--6::before { background: var(--auth-color-neutral); } /* jamais le rouge : une part n’est pas une alerte */
.au-parts-seg--other, .au-parts-key--other::before { background: var(--auth-color-line-strong); }
.au-chart-data summary:focus-visible { outline: 2px solid var(--auth-color-focus); outline-offset: 3px; }
.au-chart-data table { width: 100%; border-collapse: collapse; margin-top: var(--auth-space-2); font-variant-numeric: tabular-nums; }
.au-chart-data caption { text-align: left; font-weight: 600; margin-bottom: var(--auth-space-2); }
.au-chart-data th, .au-chart-data td { padding: var(--auth-space-2); border-bottom: 1px solid var(--auth-color-line); text-align: right; }
.au-chart-data th:first-child { text-align: left; }
.au-chart-data thead th { color: var(--auth-color-ink); }
.au-progress { width: 100%; height: 9px; border-radius: var(--auth-radius-pill); background: var(--auth-color-neutral-soft); overflow: hidden; }
.au-progress-fill { display: block; width: var(--au-progress, 0%); height: 100%; border-radius: inherit; background: var(--auth-accent); transform-origin: left; animation: au-chart-grow-x var(--auth-motion-chart) var(--auth-ease-enter) both; }
.au-ring { --au-progress: 0%; width: 104px; aspect-ratio: 1; border-radius: 50%; padding: 9px; background: conic-gradient(var(--auth-accent) var(--au-progress), var(--auth-color-neutral-soft) 0); flex: none; }
.au-ring-inner { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; background: var(--auth-color-surface); color: var(--auth-color-ink); font: 600 1.375rem/1 var(--auth-font-family); font-variant-numeric: tabular-nums; }
.au-dataview { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--auth-space-3); margin-top: var(--auth-space-3); font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
.au-dataview-actions { display: flex; gap: var(--auth-space-2); }
.au-dataview-actions .au-btn { min-width: 44px; }
.au-reveal { animation: au-rise var(--auth-motion-slow) var(--auth-ease-enter) both; }
.au-stagger > * { animation: au-rise var(--auth-motion-slow) var(--auth-ease-enter) both; }
.au-stagger > :nth-child(2) { animation-delay: var(--auth-stagger); }
.au-stagger > :nth-child(3) { animation-delay: calc(var(--auth-stagger) * 2); }
.au-stagger > :nth-child(4) { animation-delay: calc(var(--auth-stagger) * 3); }

/* ── Transitions de page (CORE-P3-017, 02/10) : la zone de contenu sort, puis entre ─────────────────
   Une classe par sens, posée par `pageLeave()` / `pageEnter()` (interactions.js) — jamais par une règle
   de style : le mouvement accompagne un changement d'écran réel, il ne prévient pas la lecture.
   Sous mouvement réduit, les deux fonctions ne posent aucune classe et résolvent tout de suite. */
@keyframes au-page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes au-page-out { to { opacity: 0; transform: translateY(-4px); } }
.au-page-enter { animation: au-page-in var(--auth-motion-slow) var(--auth-ease-enter) both; }
.au-page-leave { animation: au-page-out var(--auth-motion-normal) var(--auth-ease-standard) both; }
/* Micro-appui : la cible s'enfonce d'un pixel, la mise en page ne bouge pas (aucun décalage de flux). */
.au-btn:active:not(:disabled), .au-card--interactive:active { transform: scale(var(--auth-press-scale)); transition-duration: var(--auth-motion-press); } /* CUI-UX-1 : scale(.98) en 100 ms sur boutons ET cartes */

/* ── Overlays : feuille, tiroir, popover, infobulle, toast ─────────── */
.au-sheet { width: min(560px, calc(100% - 32px)); max-height: calc(100svh - 64px); padding: 0; border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-xl); background: var(--auth-color-surface); color: var(--auth-color-ink); box-shadow: var(--auth-shadow-2); }
.au-sheet[open] { animation: au-rise var(--auth-motion-normal) var(--auth-ease-enter) both; }
.au-sheet::backdrop, .au-drawer::backdrop { background: rgb(12 14 14 / 0.32); -webkit-backdrop-filter: blur(var(--auth-blur-backdrop)); backdrop-filter: blur(var(--auth-blur-backdrop)); }
.au-sheet-head { padding: var(--auth-space-6) var(--auth-space-6) var(--auth-space-4); display: flex; justify-content: space-between; gap: var(--auth-space-4); }
.au-sheet-body { padding: 0 var(--auth-space-6) var(--auth-space-6); overflow-y: auto; }
.au-sheet-foot { display: flex; justify-content: flex-end; gap: var(--auth-space-3); padding: var(--auth-space-4) var(--auth-space-6); border-top: 1px solid var(--auth-color-line); }
.au-drawer { margin: 0 0 0 auto; height: 100svh; max-height: 100svh; width: min(480px, 100%); padding: 0; border: 0; border-left: 1px solid var(--auth-color-line); background: var(--auth-color-surface); color: var(--auth-color-ink); box-shadow: var(--auth-shadow-2); }
.au-drawer[open] { animation: au-slide-in var(--auth-motion-normal) var(--auth-ease-enter) both; }
.au-popover { position: absolute; z-index: var(--auth-z-popover); min-width: 220px; padding: var(--auth-space-2); background: var(--auth-color-surface-overlay); -webkit-backdrop-filter: blur(var(--auth-blur-overlay)) saturate(1.4); backdrop-filter: blur(var(--auth-blur-overlay)) saturate(1.4); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-lg); box-shadow: var(--auth-shadow-2); animation: au-pop var(--auth-motion-normal) var(--auth-ease-standard) both; }
.au-menu-anchor { position: relative; }
.au-menu-anchor .au-popover { top: calc(100% + 6px); left: 0; }
.au-menu-item { width: 100%; display: flex; align-items: center; gap: var(--auth-space-3); min-height: 40px; padding: 0 var(--auth-space-3); border: 0; border-radius: var(--auth-radius-sm); background: transparent; color: var(--auth-color-ink); font: var(--auth-font-body); font-size: 0.875rem; text-align: left; cursor: pointer; text-decoration: none; }
.au-menu-item:hover, .au-menu-item:focus-visible { background: color-mix(in srgb, var(--auth-color-ink) 6%, transparent); outline: none; }
.au-menu-item--danger { color: var(--auth-color-danger); }
@media (pointer: coarse) { .au-menu-item { min-height: 44px; } } /* 40 px au doigt : relevé par le testeur de MARKETING sur la recherche (29/09) */
.au-tooltip { position: absolute; z-index: var(--auth-z-popover); padding: 6px 10px; border-radius: var(--auth-radius-xs); background: var(--auth-color-action); color: var(--auth-color-on-action); font: var(--auth-font-caption); pointer-events: none; animation: au-fade var(--auth-motion-fast) both; }
.au-toaster { position: fixed; z-index: var(--auth-z-toast); left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: var(--auth-space-2); width: min(420px, calc(100% - 32px)); pointer-events: none; }
.au-toast { pointer-events: auto; display: flex; align-items: center; gap: var(--auth-space-3); padding: var(--auth-space-3) var(--auth-space-4); border-radius: var(--auth-radius-md); background: var(--auth-color-action); color: var(--auth-color-on-action); font: var(--auth-font-label); box-shadow: var(--auth-shadow-2); animation: au-rise var(--auth-motion-normal) var(--auth-ease-enter) both; }
.au-toast[data-kind='error'] { background: var(--auth-color-danger); color: var(--auth-color-on-danger); }
.au-toast button { min-height: 32px; padding: 0 4px; margin-left: auto; background: transparent; border: 0; color: inherit; font: 600 0.8125rem var(--auth-font-family); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.au-toast.is-leaving { animation: au-sink var(--auth-motion-fast) var(--auth-ease-exit) both; }

/* ── Chargement, vide, erreur ──────────────────────────────────────── */
.au-skeleton { background: color-mix(in srgb, var(--auth-color-ink) 7%, transparent); border-radius: var(--auth-radius-xs); animation: au-breathe var(--auth-loop-breathe) ease-in-out infinite; min-height: 12px; }
.au-empty, .au-error { display: grid; justify-items: start; gap: var(--auth-space-3); max-width: 460px; padding: var(--auth-space-10) 0; }
.au-empty h2, .au-error h2 { font: var(--auth-font-heading-md); margin: 0; }
.au-empty p, .au-error p { margin: 0; color: var(--auth-color-ink-secondary); }
.au-empty .au-actions, .au-error .au-actions { display: flex; gap: var(--auth-space-3); flex-wrap: wrap; margin-top: var(--auth-space-2); }
.au-error-code { font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); }

/* ── AppShell : barre latérale (bureau), barre du haut, barre basse (téléphone) ── */
.au-shell > * { min-width: 0; }
.au-shell { display: grid; grid-template-columns: var(--au-sidebar-w, 240px) minmax(0, 1fr); min-height: 100svh; transition: grid-template-columns var(--auth-motion-normal) var(--auth-ease-standard); background: var(--auth-bg-gradient); color: var(--auth-color-ink); }
/* La coque règle SA typographie (menu, barres), pas celle du contenu : une application dont le corps n'est pas en 15 px
   changeait de taille de texte en l'adoptant, sans que rien le signale (COMMISSION, 29/09). */
.au-sidebar, .au-topbar, .au-bottom-nav { font: var(--auth-font-body); }
.au-sidebar { position: sticky; top: 0; height: 100svh; overflow-y: auto; overflow-x: hidden; padding: var(--auth-space-5) var(--auth-space-3); border-right: 1px solid var(--auth-color-line); display: flex; flex-direction: column; gap: var(--auth-space-1); }
.au-sidebar-group { font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); padding: var(--auth-space-4) var(--auth-space-3) var(--auth-space-1); }
.au-nav-link { display: flex; align-items: center; gap: var(--auth-space-3); min-height: 40px; padding: 0 var(--auth-space-3); border-radius: var(--auth-radius-sm); font: var(--auth-font-label); color: var(--auth-color-ink-secondary); text-decoration: none; position: relative; }
.au-nav-link svg { width: 18px; height: 18px; }
.au-nav-link:hover { color: var(--auth-color-ink); background: color-mix(in srgb, var(--auth-color-ink) 5%, transparent); }
.au-nav-link[aria-current='page'] { color: var(--auth-color-ink); font-weight: 600; background: var(--auth-color-surface-raised); box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 3px 8px rgb(0 0 0 / 0.05); }
.au-nav-link[aria-current='page'] svg { color: var(--auth-color-action); } /* v3 : actif = blanc + ombre courte + icône marine (COMMISSION) ; plus de barre d'accent */
:root { --au-topbar-h: 56px; } /* 52 px sous 760 px (plus bas) : la variable suit la barre, jamais l'inverse */
.au-topbar { position: sticky; top: 0; z-index: var(--auth-z-sticky); height: var(--au-topbar-h); min-height: var(--au-topbar-h); flex: none; display: flex; align-items: center; gap: var(--auth-space-4); padding: 0 var(--auth-gutter); background: color-mix(in srgb, var(--auth-color-bg) 55%, transparent); -webkit-backdrop-filter: blur(var(--auth-blur-overlay)) saturate(1.2); backdrop-filter: blur(var(--auth-blur-overlay)) saturate(1.2); /* 29/09, Daniel : à 88 %, la barre faisait une bande unie qui ne s'intégrait pas au fond vivant (IA) ; à 55 % le fond passe, voilé */ border-bottom: 1px solid var(--auth-color-line); }
.au-topbar .au-spacer { flex: 1; }
.au-content { width: min(var(--au-content-w, 100%), 100%); margin-inline: auto; padding: var(--auth-space-8) var(--auth-gutter) var(--auth-space-16); }
.au-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--auth-space-4); flex-wrap: wrap; margin-bottom: var(--auth-space-8); }
.au-bottom-nav { display: none; }
/* ── Coque commune v3 (29/09, Daniel : « les menus de navigation n'ont pas tous le même design, PC ou téléphone ») ──
   Référence visuelle : coque.html ; règles : docs/NAVIGATION_COMMUNE.md du Hub. Une seule anatomie pour toutes les apps :
   marque (logo, suite, app) → groupes de liens → pied (aide) ; barre du haut : titre ou fil, actions, sélecteur du Hub
   (qui porte le compte et la déconnexion) ; téléphone : marque ou retour en haut, 4 entrées + « Plus » en bas. */
.au-brand { display: flex; align-items: center; gap: var(--auth-space-3); min-height: 44px; padding: 0 var(--auth-space-3); color: var(--auth-color-ink); text-decoration: none; border-radius: var(--auth-radius-sm); min-width: 0; }
.au-brand > img, .au-brand > svg { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--auth-brand-disc, transparent); } /* logo rond ; en sombre, un disque clair le garde lisible (relevé de FORMATION, 29/09) */
.au-brand-text { display: grid; gap: 3px; min-width: 0; }
.au-brand-suite { font: 500 0.6875rem/1 var(--auth-font-family); letter-spacing: var(--auth-tracking-wordmark); text-transform: uppercase; color: var(--auth-color-ink-tertiary); white-space: nowrap; }
.au-brand-app { font: 600 0.9375rem/1.15 var(--auth-font-family); color: var(--auth-accent); overflow-wrap: anywhere; }
.au-sidebar > .au-brand { margin-bottom: var(--auth-space-3); }
.au-topbar > .au-brand, .au-topbar > .au-back { display: none; }
.au-sidebar-foot { margin-top: auto; padding-top: var(--auth-space-3); border-top: 1px solid var(--auth-color-line); display: grid; gap: var(--auth-space-1); }
.au-nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: color-mix(in srgb, var(--auth-color-action) 14%, transparent); color: var(--auth-color-action); font: 600 0.6875rem/20px var(--auth-font-family); text-align: center; font-variant-numeric: tabular-nums; }
.au-topbar-title { margin: 0; min-width: 0; font: 600 1rem/1.2 var(--auth-font-family); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-topbar-actions { display: flex; align-items: center; gap: var(--auth-space-2); flex: none; }
.au-icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0; border: 0; font: inherit; /* un <button> n'hérite pas de la police (relevé de MARKETING, 29/09) */ border-radius: var(--auth-radius-sm); background: none; color: var(--auth-color-ink-secondary); cursor: pointer; text-decoration: none; }
.au-icon-btn:hover { color: var(--auth-color-ink); background: color-mix(in srgb, var(--auth-color-ink) 5%, transparent); }
.au-icon-btn svg { width: 20px; height: 20px; }
.au-back { align-items: center; gap: 2px; min-height: 44px; padding: 0 var(--auth-space-2) 0 0; color: var(--auth-color-ink); text-decoration: none; font: var(--auth-font-label); }
.au-back svg { width: 20px; height: 20px; }
/* Feuille « Plus » (téléphone) : au-sheet, avec les mêmes groupes et liens que le menu latéral. */
.au-more { font: var(--auth-font-body); color: var(--auth-color-ink); background: var(--auth-color-surface); } /* opaque : la liste se lit d'un coup d'œil, clair comme sombre */
.au-more .au-sheet-head { align-items: center; padding-bottom: var(--auth-space-2); }
.au-more .au-sheet-head strong { font: var(--auth-font-heading-sm); }
.au-more .au-sheet-body { display: grid; gap: var(--auth-space-1); padding-bottom: calc(var(--auth-space-6) + env(safe-area-inset-bottom)); }
.au-more .au-nav-link { min-height: 48px; }
.au-more .au-nav-link[aria-current='page']::before { left: -8px; }
/* Tablette (761 à 1 100 px, 28/09, relevé de TECH) : le menu latéral de 240 px gardait un tiers de l'écran ; 200 px.
   La bascule vers la navigation du téléphone reste à 760 px : toutes les applications y ont aligné leurs règles. */
@media (min-width: 761px) and (max-width: 1100px) {
  .au-shell { --au-sidebar-w: 200px; }
  /* Marque dans le menu à 200 px (relevés du CRM et de MARKETING, 28/09 : « Authentysen ») : écartement et taille réduits
     par les jetons, pour que l'application qui change la police de la marque en hérite aussi. */
  .au-sidebar { --auth-tracking-wordmark: 0.08em; }
  .au-sidebar .au-wordmark { font-size: min(1em, 0.875rem); flex-wrap: wrap; } /* logo + nom (CRM) : le nom passe sous le logo plutôt que d'être coupé */
}
/* Barre latérale rétractable v2 (07/10, Daniel : « le même comportement que l'app IA » ; v1 en rail de 64 px abandonnée).
   `initSidebar()` (sidebar.js) pose `.au-sidebar-collapse` (icône seule, à droite de la marque) et `.au-sidebar-expand` (en tête du
   contenu) ; replié = `data-sidebar="masquee"` sur `.au-shell` : la colonne disparaît, la barre est hors écran et inerte.
   La largeur de la colonne s'anime (jeton de mouvement, instantanée sous prefers-reduced-motion). Téléphone : aucun bouton. */
.au-nav-link { white-space: nowrap; }
.au-nav-link svg { flex: none; }
.au-sidebar-collapse, .au-sidebar-expand { display: none; }
.au-sidebar-collapse svg { width: 18px; height: 18px; min-width: 18px; min-height: 18px; flex: none; }
.au-sidebar-expand svg { width: 20px; height: 20px; min-width: 20px; min-height: 20px; flex: none; }
@media (min-width: 761px) {
  .au-sidebar-collapse:not([hidden]), .au-sidebar-expand:not([hidden]) { display: inline-grid; }
  .au-sidebar > .au-sidebar-collapse { position: absolute; top: calc(var(--auth-space-5) + 2px); right: var(--auth-space-2); z-index: 1; }
  .au-sidebar:has(> .au-sidebar-collapse) > .au-brand { padding-right: 44px; }
  /* Le délai ne vaut qu'à la FERMETURE (la colonne se replie, puis la barre devient invisible). À l'ouverture, la barre est visible
     tout de suite : sinon elle restait `hidden` 240 ms et `replier.focus()` (sidebar.js, Entrée sur « Déplier ») échouait — le focus
     tombait sur <body> (mesuré, DEV-UX-10). (0,2,1) : passe au-dessus d'une transition d'application (COMMISSION : `.sidebar.au-sidebar`). */
  html .au-shell > .au-sidebar { transition: visibility 0s; }
  html .au-shell[data-sidebar='masquee'] > .au-sidebar { transition: visibility 0s linear var(--auth-motion-normal); }
  /* DÉPLIER TOUJOURS JOIGNABLE (26/10, Daniel : « après repli, la réouverture est impossible », tous les modules). Avant, « Déplier »
     était posé DANS `.au-topbar` : dans une fenêtre du Hub, `html[data-dans-hub] .au-topbar` est `display: none !important` (plus bas),
     le bouton disparaissait avec elle, et seul Ctrl B restait. Désormais `.au-sidebar-expand` est un enfant direct de `.au-shell`,
     fixe, dans un RAIL de 48 px réservé à gauche (colonne 1 de la grille) : il ne couvre ni le contenu ni le titre, ne dépend
     d'aucune barre, et reste au même endroit au défilement. Palier : au-dessus du contenu collant (50) et de la barre v5 (51),
     sous menus (100), tiroirs (200) et fenêtres (220). */
  .au-shell { --au-rail-deplier: 48px; }
  .au-shell[data-sidebar='masquee'] { --au-sidebar-w: var(--au-rail-deplier); }
  .au-shell[data-sidebar='masquee'] > .au-sidebar { visibility: hidden; border-right-width: 0; padding-inline: 0; width: 0; min-width: 0; overflow: hidden; }
  .au-shell > .au-sidebar-expand { position: fixed; top: var(--au-deplier-haut, var(--auth-space-2)); left: var(--auth-space-2); z-index: calc(var(--auth-z-sticky) + 2);
    width: max(40px, var(--ib, 40px)); height: max(40px, var(--ib, 40px)); border: 1px solid var(--auth-color-line); background: var(--auth-color-surface); color: var(--auth-color-ink); box-shadow: var(--auth-shadow-1, 0 1px 2px rgb(0 0 0 / 0.08)); }
  .au-shell > .au-sidebar-expand:hover { background: var(--auth-color-fill); }
  .au-shell > .au-sidebar-expand:focus-visible { outline: 2px solid var(--auth-color-focus); outline-offset: 2px; }
  html[data-coque='v5']:not([data-dans-hub]) .au-shell > .au-sidebar-expand { --au-deplier-haut: calc(var(--au-topbar-h) + var(--auth-space-2)); } /* sous la barre du haut fixe */
  .au-shell:has(> .au-sidebar[hidden]) > .au-sidebar-expand, .au-shell[data-sans-menu] > .au-sidebar-expand { display: none; } /* pas de menu (personne pas encore connue, ou coque qui le retire : `data-sans-menu`, ex. fenêtre d'onglet du Hub) : rien à déplier */
}
@media (max-width: 760px) { .au-sidebar-collapse, .au-sidebar-expand { display: none; } }
/* Téléphone : JAMAIS « Replier » ni « Déplier », quoi qu'une application impose (DEV-UX-10, 27/10, mesuré en production sur TECH).
   TECH pose au doigt `html[data-app='tech'] :is(button:not(.au-topbar *), …) { display: inline-flex }` (0,2,2, chargée après le Core) :
   tant que « Déplier » vivait dans `.au-topbar`, la règle l'excluait ; enfant direct de `.au-shell`, il réapparaissait à 390 px quand la
   barre avait été repliée sur un grand écran. (0,3,1) ici, au-dessus des formes d'application relevées. */
@media (max-width: 760px) { html .au-shell > .au-sidebar-expand.au-icon-btn, html .au-sidebar .au-sidebar-collapse.au-icon-btn { display: none; } }
@media print { .au-sidebar-expand { display: none !important; } }
/* Pagination commune (29/09, Daniel : « la pagination de COMMISSION est mieux ») : numéros cliquables, première et
   dernière toujours visibles, page courante pleine, accès direct au-delà de sept pages, compte « 151 à 200 sur 1 963 ».
   Le nom du <nav> est unique dans la page (axe landmark-unique) : « Pages de » + le titre du tableau (« Pages des affaires »).
   <nav class="au-pagination" aria-label="Pages de …"><a class="au-page-step" rel="prev">←</a>
     <ol class="au-pages"><li><a class="au-page" href>1</a></li><li class="au-page-gap">…</li><li><span class="au-page" aria-current="page">4</span></li></ol>
     <a class="au-page-step" rel="next">→</a><select class="au-select au-select--sm au-page-jump" aria-label="Aller à la page">…</select>
     <span class="au-page-count">151 à 200 sur 1 963</span></nav> */
.au-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: var(--auth-space-2); margin-top: var(--auth-space-5); }
.au-pages { display: flex; align-items: center; gap: var(--auth-space-1); margin: 0; padding: 0; list-style: none; }
.au-page, .au-page-step { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 var(--auth-space-2); border: 0; border-radius: 999px; background: transparent; color: var(--auth-color-ink); font: var(--auth-font-label); font-variant-numeric: tabular-nums; text-decoration: none; cursor: pointer; transition: background var(--auth-motion-fast) ease, color var(--auth-motion-fast) ease; }
.au-page-step { border: 1px solid var(--auth-color-line); }
.au-page:hover, .au-page-step:hover { background: color-mix(in srgb, var(--auth-color-ink) 7%, transparent); }
.au-page[aria-current='page'] { background: var(--auth-color-action); color: var(--auth-color-on-action); font-weight: 600; cursor: default; }
.au-page-step[aria-disabled='true'] { opacity: 0.35; pointer-events: none; }
.au-page-gap { color: var(--auth-color-ink-tertiary); padding: 0 2px; }
.au-page-jump { width: auto; }
.au-page-count { margin-left: auto; font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); font-variant-numeric: tabular-nums; }
@media (pointer: coarse) { .au-page, .au-page-step { min-width: 44px; height: 44px; } }
@media (max-width: 760px) { .au-pagination { justify-content: center; gap: var(--auth-space-1); } .au-pages { gap: 0; } .au-page-count { margin-left: 0; width: 100%; text-align: center; } .au-pages li:not(:first-child):not(:last-child):not(:has([aria-current])):not(.au-page-gap) { display: none; } }
@media (max-width: 760px) {
  .au-shell { grid-template-columns: minmax(0, 1fr); } /* 1fr = minmax(auto, 1fr) : un tableau large élargissait la page, le téléphone la dézoomait (COMMISSION, 29/09) */
  .au-sidebar { display: none; }
  :root { --au-topbar-h: 52px; }
  .au-content { padding-bottom: calc(var(--au-bottom-h) + var(--auth-space-4)); } /* marge basse = hauteur de la barre (+ 16 px d'air) : rien ne passe dessous (TECH D3, MARKETING 15) */
  body:not(:has(.au-bottom-nav)) .au-content { padding-bottom: calc(var(--auth-space-6) + env(safe-area-inset-bottom)); } /* pas de barre du bas (variante « conversation » de l'IA, 29/09) : pas de réserve de 80 px sous le contenu */
  .au-bottom-nav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--auth-z-sticky); height: var(--au-bottom-h); padding: 0 max(6px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--auth-color-surface) 96%, transparent); -webkit-backdrop-filter: blur(var(--auth-blur-overlay)) saturate(1.4); backdrop-filter: blur(var(--auth-blur-overlay)) saturate(1.4); border-top: 1px solid var(--auth-color-line); } /* fond presque plein et marge aux bords (FORMATION, 29/09 : le texte de la page transparaissait sous les libellés ; « Aujourd'hui » collait au bord à 360 px) */
  .au-bottom-nav a, .au-bottom-nav button { display: grid; justify-items: center; align-content: center; gap: 2px; font: 500 0.75rem/1 var(--auth-font-family); color: var(--auth-color-ink); text-decoration: none; min-height: 48px; } /* encre pleine : 11 px sur le voile, le tertiaire tombait à 3,2:1 (signalé par FORMATION, 27/09) */
  .au-bottom-nav a, .au-bottom-nav button { min-width: 0; padding-inline: 2px; text-align: center; overflow: hidden; }
  .au-bottom-nav a > span:not(.au-nav-count), .au-bottom-nav button > span:not(.au-nav-count) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2; } /* 1fr = minmax(auto, 1fr) : un libellé actif, en gras, élargissait sa case et la barre passait à 405 px sur 390 (COMMISSION, 29/09) */
  .au-bottom-nav:has(> :nth-child(5)) > a, .au-bottom-nav:has(> :nth-child(5)) > button { font-size: 0.75rem; letter-spacing: -0.015em; padding-inline: 0; } /* cinq cases : 12 px comme la coque v4 des applications (CRM, 09/10 : la référence coque.html disait 11 px), pour qu'un libellé long et actif (« Commissions », en gras) tienne dans 76 px sans être coupé */
  .au-bottom-nav button { appearance: none; background: none; border: 0; padding: 0; cursor: pointer; } /* bouton « Plus » : sans ces règles, son SVG prenait 300 × 150 px et couvrait deux onglets (CRM, 27/09) */
  .au-bottom-nav a svg, .au-bottom-nav button svg { width: 22px; height: 22px; }
  .au-bottom-nav a, .au-bottom-nav button { position: relative; }
  .au-bottom-nav .au-nav-count { position: absolute; top: 5px; left: calc(50% + 5px); margin: 0; min-width: 16px; height: 16px; padding: 0 4px; font-size: 0.625rem; line-height: 16px; }
  .au-bottom-nav button[aria-current='page'] { color: var(--auth-accent); font-weight: 600; box-shadow: inset 0 2px 0 var(--auth-accent); } /* « Plus » allumé quand la page courante est dans la feuille */
  .au-bottom-nav, .au-topbar { transition: transform var(--auth-motion-normal) ease; will-change: transform; } /* barres qui s'effacent au défilement (sidebar.js, barresDefilantes) : transform seul, jamais de saut de mise en page ; la marge basse du contenu reste réservée */
  html[data-barres='cachees'] .au-bottom-nav { transform: translateY(100%); }
  html[data-barres='cachees'] .au-topbar { transform: translateY(-100%); }
  @media (prefers-reduced-motion: reduce) { .au-bottom-nav, .au-topbar { transition: none; } }
  .au-topbar > .au-brand { display: flex; padding: 0; gap: var(--auth-space-2); }
  .au-topbar > .au-brand > img, .au-topbar > .au-brand > svg { width: 26px; height: 26px; }
  .au-topbar > .au-brand .au-brand-suite { display: none; }
  .au-topbar > .au-back:not([hidden]) { display: inline-flex; }
  .au-topbar > .au-back:not([hidden]) ~ .au-brand { display: none; } /* page de détail : le retour remplace la marque */
  .au-topbar .au-breadcrumb, .au-topbar .au-topbar-title { display: none; }
  .au-icon-btn { width: 44px; height: 44px; }
  .au-steps { flex-wrap: wrap; overflow-x: visible; }
  /* Cible tactile (27/09, relevé du renfort CRM) : les petites commandes font 36 px sur ordinateur, 44 px au doigt. */
  .au-btn--sm { --h: 44px; }
  .au-input--sm, .au-select--sm { height: 44px; }
  .au-tab { min-height: 44px; }
  .au-chip, .au-chart-data summary, .au-table th :is(button, a.au-sort), [class*='au-toast'] button { min-height: 44px; } /* idem : pastilles, tri, données d'un graphique, « Annuler » */ /* onglets à 36 px : trop petits au doigt (détecteur d'affichage, 28/09) */ /* cinq pas = 625 px : au téléphone, le pas courant pouvait être hors champ (CRM, 27/09) */
  .au-bottom-nav a[aria-current='page'] { color: var(--auth-accent); font-weight: 600; box-shadow: inset 0 2px 0 var(--auth-accent); } /* actif : couleur, graisse et trait — jamais la couleur seule */
  .au-sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: var(--auth-radius-xl) var(--auth-radius-xl) 0 0; }
}
@media (max-width: 380px) { .au-bottom-nav a, .au-bottom-nav button { font-size: 0.6875rem; letter-spacing: -0.01em; } } /* 5 libellés à 360 px */

/* Exception TECH_FIELD_TOUCH_TARGET_LARGE : saisie terrain. */
.au-field-mode .au-btn { --h: var(--auth-control-lg); }
.au-field-mode .au-input, .au-field-mode .au-select { height: var(--auth-control-lg); font-size: 1rem; }
.au-field-mode .au-check, .au-field-mode .au-radio, .au-field-mode .au-switch { min-height: 52px; }

@keyframes au-progress { 0% { transform: scaleX(0); } 70% { transform: scaleX(0.85); } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes au-rise { from { opacity: 0; transform: translateY(12px) scale(0.99); } to { opacity: 1; transform: none; } }
@keyframes au-sink { to { opacity: 0; transform: translateY(8px); } }
@keyframes au-pop { from { opacity: 0; transform: scale(0.96) translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes au-slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes au-fade { from { opacity: 0; } }
@keyframes au-breathe { 50% { opacity: 0.5; } }
@keyframes au-chart-draw { from { stroke-dashoffset: var(--au-line-length); } to { stroke-dashoffset: 0; } }
@keyframes au-chart-point { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }
@keyframes au-chart-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes au-chart-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  /* Règle générale : plus aucune animation, plutôt qu'une liste qu'il faudrait tenir à jour au fil des
     familles (le curseur d'écriture de l'IA y avait échappé, rendant les captures non reproductibles).
     Les transitions restent possibles, mais à durée nulle par les jetons `--auth-motion-*`. */
  .au *, .au *::before, .au *::after, .au-shell *, .au-shell *::before, .au-shell *::after { animation: none !important; }
  .au-btn, .au-card--interactive, .au-sheet[open], .au-drawer[open], .au-popover, .au-toast, .au-skeleton, .au-check input::after, .au-switch input::after,
  .au-chart-line, .au-chart-point, .au-chart-bar, .au-chart-area, .au-donut-seg, .au-funnel-bar, .au-gauge-fill, .au-chart-tip,
  .au-parts-seg, .au-progress-fill, .au-reveal, .au-stagger > *, .au-page-enter, .au-page-leave { transition: none !important; }
  /* Le micro-appui aussi : un appui qui enfonce la cible reste un mouvement (CORE-P3-017). */
  .au-btn:active:not(:disabled), .au-card--interactive:active { transform: none !important; }
}

/* ── Tiroir (30/09) : un <details class="au-tiroir"> dont l'en-tête résume en une ligne, chiffre compris ───────────
   Monté depuis TECH (Pulse, § 3 septies) parce que le CRM le réécrivait déjà : un seul tiroir pour la suite.
   <details class="au-tiroir"><summary class="au-tiroir-tete"><span class="au-tiroir-titre">Titre</span>
   <span class="au-tiroir-chiffre">3 affaires · 38 200 €</span></summary><div class="au-tiroir-corps">…</div></details>
   Règles : un en-tête = une ligne (le texte entier reste dans le DOM et au survol) ; jamais un `details` forcé ouvert
   par la feuille de style (display: contents…) : il se ferme partout et s'ouvre d'un toucher (relevé du CRM). */
.au-tiroir { min-width: 0; max-width: 100%; border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-md, 12px); background: var(--auth-color-surface); margin: var(--auth-space-2) 0; }
.au-tiroir--urgent { border-color: var(--auth-color-danger); }
.au-tiroir-tete { display: flex; align-items: center; gap: var(--auth-space-3); min-height: 48px; padding: var(--auth-space-2) var(--auth-space-4); cursor: pointer; list-style: none; font-weight: 600; }
.au-tiroir-tete::-webkit-details-marker { display: none; }
.au-tiroir-tete::marker { content: ''; }
.au-tiroir-tete::before { content: ''; flex: 0 0 auto; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform var(--auth-motion-fast) var(--auth-ease-standard); opacity: .7; }
.au-tiroir[open] > .au-tiroir-tete::before { transform: rotate(45deg); }
.au-tiroir-titre { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-tiroir-chiffre { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; font-weight: 500; color: var(--auth-color-ink-secondary); font-variant-numeric: tabular-nums; }
.au-tiroir-urgent { flex: 0 0 auto; font-size: .85em; color: var(--auth-color-danger); }
.au-tiroir-corps { padding: 0 var(--auth-space-4) var(--auth-space-4); }
/* Au téléphone, le titre peut tenir sur deux lignes et le chiffre ne se coupe JAMAIS : « Rendez-vous passés, san…
   350 dem… » perdait les deux moitiés, dont celle qu'on vient lire (relevé du CRM, 30/09). */
@media (max-width: 700px) {
  .au-tiroir-titre { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .au-tiroir-chiffre { flex: 0 0 auto; overflow: visible; text-overflow: clip; }
}

/* ═══════════════════════════════════════════════════════════════════════
   AGRANDISSEMENT DU 01/10/2026 — familles manquantes (CORE_UI_BACKLOG).
   RÈGLE : tout ce qui suit est ADDITIF. Aucune classe existante ne change de
   comportement tant que les huit applications n'ont pas été rediffusées et
   auditées (rétrocompatibilité, doc de conception § 103–105).
   Chaque famille est illustrée dans lab.html, et testée à 390 / 430 / 768 /
   1024 / 1440 / 1920.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1. Débordement : les règles qui évitent le travail de reprise (P0-002) ───
   Trois causes de texte qui dépasse, trois remèdes, aucun contournement local :
   · une boîte trop petite pour son texte            → .au-truncate ou .au-clamp
   · un enfant qui refuse de rétrécir dans un flex   → .au-row / .au-stack posent min-width: 0
   · un mot ou une URL sans espace                   → .au-wrap
   On ne règle JAMAIS un débordement par `overflow: hidden` seul : le texte est alors
   coupé sans points de suspension et le lecteur d'écran perd le reste. */
/* `hidden` doit gagner sur un `display` posé par une classe : sinon une barre d'actions groupées
   reste visible avant toute sélection (relevé du banc du tableau, 01/10). */
[hidden] { display: none !important; }
.au-truncate { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-clamp { display: -webkit-box; -webkit-line-clamp: var(--au-lines, 2); -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.au-clamp--1 { --au-lines: 1; } .au-clamp--2 { --au-lines: 2; } .au-clamp--3 { --au-lines: 3; }
.au-wrap { min-width: 0; overflow-wrap: anywhere; } /* URLs, références de chantier, e-mails */
.au-break { overflow-wrap: break-word; hyphens: auto; } /* phrase courante, pas de mot coupé au hasard */

/* Rangées et piles : `min-width: 0` partout, c'est le point qui fait rétrécir l'enfant
   au lieu d'élargir le parent. Un enfant qui ne doit pas rétrécir dit `flex: none`. */
.au-row { display: flex; align-items: center; gap: var(--auth-space-3); min-width: 0; }
.au-row--top { align-items: flex-start; }
.au-row--wrap { flex-wrap: wrap; }
.au-row--between { justify-content: space-between; }
.au-row > * { min-width: 0; }
.au-stack { display: grid; gap: var(--auth-space-3); min-width: 0; }
.au-stack > * { min-width: 0; }
.au-stack--tight { gap: var(--auth-space-1); }
.au-stack--loose { gap: var(--auth-space-5); }
.au-spacer { flex: 1 1 auto; min-width: 0; }
.au-squeeze { flex: 0 1 auto; min-width: 0; }   /* le bloc central d'une barre : il cède, jamais les actions */
.au-shrink-none { flex: none; }                 /* une icône, un compteur, une action : jamais écrasés */

/* Grille responsive sans réglage par carte : une colonne au téléphone, des cartes d'au moins 260 px
   ailleurs, jamais de colonne plus étroite que son conteneur (min() protège à 390). */
.au-grid { display: grid; gap: var(--auth-space-4); grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); min-width: 0; }
.au-grid--wide { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }
.au-grid--cards { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }

/* Icône + texte : la paire sûre. L'icône est `flex: none`, le texte borne, jamais de chevauchement.
   <p class="au-icon-text"><svg …></svg><span class="au-truncate">Libellé</span></p> */
.au-icon-text { display: inline-flex; align-items: center; gap: var(--auth-space-2); min-width: 0; max-width: 100%; }
.au-icon-text--top { align-items: flex-start; }
.au-icon-text > svg, .au-icon-text > img { flex: none; width: var(--auth-icon-md); height: var(--auth-icon-md); }
.au-icon-text--sm > svg { width: var(--auth-icon-sm); height: var(--auth-icon-sm); }
.au-icon-text--lg > svg { width: var(--auth-icon-lg); height: var(--auth-icon-lg); }
.au-icon-text > :not(svg):not(img) { min-width: 0; }

/* Pastille posée sur une image, un compteur sur une icône : position explicite et palier dédié,
   pour qu'aucune superposition ne soit laissée au hasard du flux (P0-002 « icône sur texte »). */
.au-overlay-anchor { position: relative; display: inline-flex; min-width: 0; flex: none; } /* jamais écrasée : une icône à compteur garde sa taille (relevé du détecteur, 01/10) */
.au-overlay-anchor > .au-corner { position: absolute; z-index: 1; top: -4px; right: -4px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--auth-color-action); color: var(--auth-color-on-action); font: 600 0.625rem/1 var(--auth-font-family); font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px var(--auth-color-surface); pointer-events: none; }
.au-overlay-anchor > .au-corner--danger { background: var(--auth-color-danger); color: var(--auth-color-on-danger); }
.au-overlay-anchor > .au-corner--accent { background: var(--auth-color-action); color: #fff; }

/* ── 2. Boutons : la famille complète (P1-003) ─────────────────────────────
   Ajouts seuls : success / warning, bascule, segmenté, scindé, menu, FAB, et l'état
   de confirmation. Rappel des règles : un seul `primary` par zone ; danger = icône
   obligatoire ; le chargement garde le libellé. */
/* Le libellé suit son fond : `--auth-color-on-*` comme pour danger. En sombre, success et warning sont
   clairs : du blanc dessus tombait à 2:1 (axe, 01/10). Le survol se décale vers l'encre, jamais vers le
   noir : le thème sombre garde son contraste. */
.au-btn--success { background: var(--auth-color-success); color: var(--auth-color-on-success); }
.au-btn--success:hover:not(:disabled) { background: color-mix(in srgb, var(--auth-color-success) 90%, var(--auth-color-ink)); }
.au-btn--warning { background: var(--auth-color-warning); color: var(--auth-color-on-warning); }
.au-btn--warning:hover:not(:disabled) { background: color-mix(in srgb, var(--auth-color-warning) 90%, var(--auth-color-ink)); }
/* Retour de succès : le bouton devient vert une seconde, puis reprend. Le libellé dit ce qui est fait
   (« Enregistré ») — la couleur seule ne l'apprendrait pas. */
.au-btn.is-success { background: var(--auth-color-success); color: var(--auth-color-on-success); border-color: transparent; }
.au-btn.is-error { background: var(--auth-color-danger); color: var(--auth-color-on-danger); border-color: transparent; }
/* Bascule : `aria-pressed="true"`. Toujours visible ET par la graisse : la couleur seule ne dit pas « enfoncé ». */
.au-btn[aria-pressed='true'] { background: color-mix(in srgb, var(--auth-color-action) 12%, transparent); color: var(--auth-color-ink); border-color: color-mix(in srgb, var(--auth-color-action) 32%, transparent); font-weight: 600; }
.au-btn--ghost[aria-pressed='true'] { background: color-mix(in srgb, var(--auth-color-ink) 10%, transparent); color: var(--auth-color-ink); }

/* Segmenté (vue Liste / Carte / Tableau) : un seul enfoncé, jamais deux actions primaires côte à côte. */
.au-segmented { display: inline-flex; padding: 3px; border-radius: var(--auth-radius-pill); background: color-mix(in srgb, var(--auth-color-ink) 6%, transparent); min-width: 0; max-width: 100%; }
.au-segmented .au-btn { --h: var(--auth-control-sm); min-height: var(--h); padding: 4px var(--auth-space-4); border: 0; background: transparent; color: var(--auth-color-ink-secondary); box-shadow: none; }
.au-segmented .au-btn:hover:not(:disabled) { background: transparent; color: var(--auth-color-ink); box-shadow: none; }
.au-segmented .au-btn[aria-pressed='true'] { background: var(--auth-color-surface-raised); color: var(--auth-color-ink); box-shadow: var(--auth-shadow-1); }
.au-segmented .au-btn svg { width: var(--auth-icon-sm); height: var(--auth-icon-sm); }
@media (pointer: coarse) { .au-segmented .au-btn { --h: var(--auth-control-lg); } }

/* Scindé : l'action fréquente + un menu des variantes. Les deux moitiés se touchent, le libellé
   principal garde la place (`.au-squeeze` côté texte) ; sur téléphone, le menu devient un bouton à part. */
.au-split { display: inline-flex; align-items: stretch; min-width: 0; max-width: 100%; border-radius: var(--auth-radius-pill); }
.au-split > .au-btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; padding-right: var(--auth-space-4); }
.au-split > .au-btn:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; width: 38px; padding: 0; border-left: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.au-split > .au-btn:last-child svg { width: var(--auth-icon-sm); height: var(--auth-icon-sm); }
@media (max-width: 480px) { .au-split { flex-wrap: wrap; } .au-split > .au-btn:first-child { border-top-right-radius: var(--auth-radius-pill); border-bottom-right-radius: var(--auth-radius-pill); } .au-split > .au-btn:last-child { border-left: 0; border-top-left-radius: var(--auth-radius-pill); border-bottom-left-radius: var(--auth-radius-pill); width: var(--auth-control-md); } }

/* Bouton flottant : une seule action de création sur un écran de téléphone, au-dessus de la barre du bas.
   Il ne masque jamais la dernière ligne : la page garde sa réserve de 80 px. */
.au-fab { position: fixed; z-index: var(--auth-z-sticky); right: max(16px, env(safe-area-inset-right)); bottom: calc(72px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border: 0; border-radius: 50%; background: var(--auth-color-action); color: var(--auth-color-on-action); box-shadow: var(--auth-shadow-2); cursor: pointer; display: grid; place-items: center; transition: transform var(--auth-motion-normal) var(--auth-ease-spring), box-shadow var(--auth-motion-normal); }
.au-fab svg { width: var(--auth-icon-lg); height: var(--auth-icon-lg); }
.au-fab:hover { transform: translateY(-2px); }
.au-fab:active { transform: scale(var(--auth-press-scale)); }
.au-fab--label { width: auto; padding: 0 var(--auth-space-5); border-radius: var(--auth-radius-pill); gap: var(--auth-space-2); display: inline-flex; align-items: center; font: 600 0.875rem/1 var(--auth-font-family); }
body:not(:has(.au-bottom-nav)) .au-fab { bottom: calc(24px + env(safe-area-inset-bottom)); }

/* Bouton d'icône : la règle en une ligne — 40 px de boîte (44 au doigt), 20 px d'icône, et TOUJOURS
   `aria-label` + `au-tooltip` (l'icône seule ne dit rien à un lecteur d'écran ni à un nouvel arrivant).
   La boîte suit `--ib` : la taille de base et les variantes ne se marchent pas dessus, et le doigt
   reçoit 44 px même quand la variante est petite (relevé du détecteur, 01/10). */
.au-icon-btn { position: relative; width: var(--ib, 40px); height: var(--ib, 40px); }
.au-icon-btn--sm { --ib: 32px; }
.au-icon-btn--sm svg { width: var(--auth-icon-sm); height: var(--auth-icon-sm); }
.au-icon-btn--lg { --ib: 48px; }
.au-icon-btn--lg svg { width: var(--auth-icon-lg); height: var(--auth-icon-lg); }
.au-icon-btn[aria-busy='true'] { cursor: progress; }
.au-icon-btn[aria-busy='true']::after { content: ''; position: absolute; inset: auto 6px 5px; height: 2px; border-radius: 2px; background: currentColor; opacity: 0.55; transform-origin: left; animation: au-progress var(--auth-loop-progress) var(--auth-ease-standard) infinite; }
/* Au doigt, la cible minimale l'emporte sur la taille de la variante : le réglage est regroupé
   en fin de feuille (« Cibles tactiles »), pour qu'il couvre aussi les icônes des champs. */

/* ── 3. Formulaires : le champ complet et les saisies (P1-004, P1-005, P1-006) ──
   Un seul composant de champ porte : étiquette, description, saisie, aide, erreur,
   avertissement, succès, caractère obligatoire, compteur, limite de caractères.
   Règle de liaison : le message d'erreur est relié au champ (`aria-describedby`),
   et il porte une icône — la couleur seule ne lirait pas. */
.au-field { position: relative; }
.au-field-label { display: flex; align-items: baseline; gap: var(--auth-space-2); min-width: 0; }
.au-field-label > span { min-width: 0; }
.au-field-required { color: var(--auth-color-danger); font-weight: 600; } /* l'astérisque a un libellé pour l'écran */
.au-field-optional { color: var(--auth-color-ink-tertiary); font: var(--auth-font-caption); font-weight: 400; }
.au-field-desc { font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); margin: 0; }
.au-field-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--auth-space-3); min-width: 0; }
.au-field-foot > * { min-width: 0; }
.au-field-counter { flex: none; font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.au-field-counter.is-near { color: var(--auth-color-warning); }
.au-field-counter.is-over { color: var(--auth-color-danger); font-weight: 600; }
.au-field-warning { font: var(--auth-font-caption); color: var(--auth-color-warning); margin: 0; display: flex; gap: 6px; align-items: flex-start; }
.au-field-success { font: var(--auth-font-caption); color: var(--auth-color-success); margin: 0; display: flex; gap: 6px; align-items: flex-start; }
.au-field-warning::before, .au-field-success::before { content: ''; flex: none; width: 14px; height: 14px; margin-top: 2px; background: currentColor; -webkit-mask: var(--au-msg-icon) center/contain no-repeat; mask: var(--au-msg-icon) center/contain no-repeat; }
.au-field-warning { --au-msg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M8 2 15 14H1z'/%3E%3Cpath d='M8 6.5v3.2M8 12h.01'/%3E%3C/svg%3E"); }
.au-field-success { --au-msg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='6.6'/%3E%3Cpath d='m5 8.2 2.1 2.2L11 6'/%3E%3C/svg%3E"); }
.au-field.is-error .au-input, .au-field.is-error .au-select, .au-field.is-error .au-textarea,
.au-field.is-error .au-input-wrap { border-color: var(--auth-color-danger); }
.au-field.is-warning .au-input, .au-field.is-warning .au-select, .au-field.is-warning .au-textarea,
.au-field.is-warning .au-input-wrap { border-color: var(--auth-color-warning); }
.au-field.is-success .au-input, .au-field.is-success .au-select, .au-field.is-success .au-textarea,
.au-field.is-success .au-input-wrap { border-color: var(--auth-color-success); }
/* Résumé d'erreurs en tête de formulaire (E13) : liste de liens vers les champs, jamais un pavé. */
.au-form-summary ul { margin: var(--auth-space-1) 0 0; padding-left: var(--auth-space-5); }
.au-form-summary a { color: inherit; }

/* Saisie à icône ou à affixe : l'icône est posée par la boîte, la place est réservée dans le champ.
   C'est LE composant sûr contre « l'icône sur le placeholder » (P0-002). */
.au-input-wrap { position: relative; display: flex; align-items: center; gap: var(--auth-space-2); min-width: 0; border: 1px solid var(--auth-color-line-strong); border-radius: var(--auth-radius-sm); background: var(--auth-color-surface-raised); box-shadow: var(--auth-highlight); transition: border-color var(--auth-motion-fast) var(--auth-ease-standard), box-shadow var(--auth-motion-fast) var(--auth-ease-standard); }
.au-input-wrap:focus-within { border-color: var(--auth-color-focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--auth-color-focus) 18%, transparent); }
.au-input-wrap:hover { border-color: color-mix(in srgb, var(--auth-color-ink) 30%, transparent); }
.au-input-wrap > svg { flex: none; width: var(--auth-icon-md); height: var(--auth-icon-md); color: var(--auth-color-ink-tertiary); }
.au-input-wrap > svg:first-child { margin-left: var(--auth-space-3); }
.au-input-wrap > svg:last-child { margin-right: var(--auth-space-3); }
.au-input-wrap > .au-input { border: 0; background: transparent; box-shadow: none; padding-inline: 0; height: calc(var(--auth-control-md) - 2px); }
.au-input-wrap > .au-input:focus { box-shadow: none; }
.au-input-wrap > .au-input:focus-visible { outline: none; }
.au-input-wrap--icon > .au-input { padding-left: var(--auth-space-2); }
.au-input-wrap > .au-affix { flex: none; font: var(--auth-font-label); color: var(--auth-color-ink-tertiary); font-variant-numeric: tabular-nums; white-space: nowrap; padding-inline: var(--auth-space-1); }
.au-input-wrap > .au-affix--start { margin-left: var(--auth-space-3); }
.au-input-wrap > .au-affix--end { margin-right: var(--auth-space-3); }
.au-input-wrap:has(> .au-affix--start) > .au-input { padding-left: var(--auth-space-1); }
.au-input-wrap > .au-icon-btn { --ib: 36px; margin-right: 2px; }
.au-input-wrap.is-error { border-color: var(--auth-color-danger); }
.au-input-wrap.is-warning { border-color: var(--auth-color-warning); }
.au-input-wrap.is-success { border-color: var(--auth-color-success); }
@media (max-width: 760px) { .au-input-wrap > .au-input { height: calc(44px - 2px); } }

/* Saisies spécialisées : même boîte, même hauteur, seul le contenu change.
   Nombre / montant / pourcentage : chiffres tabulaires et alignés à droite, comme dans les tableaux. */
.au-input--num { text-align: right; font-variant-numeric: tabular-nums; }
.au-input--money { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.au-input--code { letter-spacing: 0.18em; text-transform: uppercase; }
.au-input--phone { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
/* Recherche : le champ garde sa place, la loupe ne se pose jamais dessus. */
.au-search { display: flex; align-items: center; gap: var(--auth-space-2); min-width: 0; max-width: 420px; flex: 1 1 220px; }
.au-search .au-input-wrap { flex: 1 1 auto; min-width: 0; }
/* Mot de passe : l'œil est un bouton dans la boîte, à droite, avec aria-label et son état. */
.au-password .au-icon-btn[aria-pressed='true'] { color: var(--auth-color-ink); background: color-mix(in srgb, var(--auth-color-ink) 8%, transparent); }

/* Multisélection : les valeurs choisies sont des pastilles dans la boîte, retirables une par une.
   La boîse grandit (jamais de texte écrasé) et garde son bouton « Effacer ». */
.au-multiselect { display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-2); min-height: var(--auth-control-md); padding: 6px var(--auth-space-3); border: 1px solid var(--auth-color-line-strong); border-radius: var(--auth-radius-sm); background: var(--auth-color-surface-raised); box-shadow: var(--auth-highlight); }
.au-multiselect:focus-within { border-color: var(--auth-color-focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--auth-color-focus) 18%, transparent); }
.au-multiselect input { flex: 1 1 120px; min-width: 0; min-height: 32px; border: 0; background: transparent; font: 400 0.9375rem/1.2 var(--auth-font-family); color: var(--auth-color-ink); padding: 4px 0; }
.au-multiselect input:focus { outline: none; }

/* Étiquette retirable / pastille de filtre (P1 : tags). La croix est un bouton de 24 px (44 au doigt). */
.au-tag { display: inline-flex; align-items: center; gap: var(--auth-space-1); max-width: 100%; height: 28px; padding: 0 var(--auth-space-2) 0 10px; border-radius: var(--auth-radius-pill); border: 1px solid var(--auth-color-line-strong); background: var(--auth-color-surface-raised); font: var(--auth-font-label); color: var(--auth-color-ink-secondary); }
.au-tag > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-tag > svg { flex: none; width: var(--auth-icon-sm); height: var(--auth-icon-sm); }
.au-tag button { flex: none; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.au-tag button:hover { background: color-mix(in srgb, var(--auth-color-ink) 10%, transparent); color: var(--auth-color-ink); }
.au-tag button svg { width: 12px; height: 12px; }
.au-tag--accent { border-color: color-mix(in srgb, var(--auth-color-action) 32%, transparent); background: color-mix(in srgb, var(--auth-color-action) 10%, transparent); color: var(--auth-color-action); }
.au-tag--category { border-radius: var(--auth-radius-xs); font-weight: 600; }
/* Au doigt : la croix de retrait reçoit 44 px et la pastille grandit avec elle — 22 px était
   injouable (détecteur d'affichage, 01/10). */
@media (pointer: coarse), (max-width: 760px) { .au-tag button { width: 44px; height: 44px; } .au-tag { height: 48px; padding-right: 2px; } }

/* Mises en page de formulaire (P1-006). Deux colonnes au bureau, UNE colonne au téléphone :
   le passage se fait sans réglage dans l'application, et sans champ qui dépasse. */
.au-form--cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--auth-space-5) var(--auth-space-6); }
.au-form--cols > .au-field--full { grid-column: 1 / -1; }
@media (max-width: 760px) { .au-form--cols { grid-template-columns: minmax(0, 1fr); } }
.au-form--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1024px) { .au-form--three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .au-form--three { grid-template-columns: minmax(0, 1fr); } }
/* Formulaire par sections : un titre, une phrase d'explication, puis les champs. */
.au-form-section { display: grid; gap: var(--auth-space-4); padding: var(--auth-space-6); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-lg); background: var(--auth-color-surface); min-width: 0; }
.au-form-section > header { display: grid; gap: var(--auth-space-1); min-width: 0; }
.au-form-section > header h3 { margin: 0; font: var(--auth-font-heading-sm); }
.au-form-section > header p { margin: 0; font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
/* En ligne : recherche, filtre, petite édition — l'étiquette passe au-dessus sous 560 px. */
.au-form-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--auth-space-3); min-width: 0; }
.au-form-inline > .au-field { flex: 1 1 200px; min-width: 0; }
.au-form--compact { gap: var(--auth-space-3); }
.au-form--compact .au-input, .au-form--compact .au-select { height: var(--auth-control-sm); }
.au-form--compact .au-check, .au-form--compact .au-radio, .au-form--compact .au-switch { min-height: 36px; }
/* Pied de formulaire : l'action principale à droite, « Annuler » toujours présent, jamais de débordement. */
.au-form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--auth-space-3); padding-top: var(--auth-space-4); border-top: 1px solid var(--auth-color-line); }
.au-form-foot .au-squeeze { margin-right: auto; }
@media (max-width: 480px) { .au-form-foot .au-btn { flex: 1 1 100%; } }

/* ── 4. Tableaux : fonctions, types de cellules, repli téléphone (P1-007, P1-008) ──
   Densité par jeton : la hauteur de ligne et le remplissage de cellule suivent
   `--auth-row` / `--auth-pad-cell` (défaut identique à l'ancien : 52 px / 8-16).
   `data-density="compact"` sur <html> ou sur la zone dense suffit. */
.au-table td { height: var(--auth-row, 52px); padding: var(--auth-pad-cell, var(--auth-space-2) var(--auth-space-4)); }
/* Dense garde 40 px même si la règle ci-dessus est posée après la sienne (ordre du fichier). */
.au-table--compact td { height: var(--auth-row-compact, 40px); }
.au-table-wrap { position: relative; min-width: 0; }
/* Le tableau ne fait jamais glisser la page : son conteneur défile, la page non. */
.au-table-wrap::-webkit-scrollbar { height: 8px; }
/* En-tête collant : sous la barre du haut (56 px) quand le tableau est dans la page. */
.au-table--sticky th { top: 0; z-index: var(--auth-z-raised); }
/* Colonne de sélection : 44 px, jamais plus, et l'en-tête coche tout. */
.au-table .au-cell-check { width: 44px; padding-right: 0; }
.au-table .au-cell-check .au-check { min-height: 0; gap: 0; }
.au-table .au-cell-check .au-check input { width: 18px; height: 18px; }
.au-table tbody tr.is-selected td { background: color-mix(in srgb, var(--auth-color-action) 9%, transparent); }
.au-table tbody tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--auth-color-action); }
/* Barre d'actions groupées : apparaît quand une ligne est cochée, remplace la barre de filtres.
   Elle dit combien de lignes sont choisies, sinon on croit à une sélection générale. */
.au-table-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-3); min-height: 52px; padding: var(--auth-space-2) var(--auth-space-4); margin-bottom: var(--auth-space-4); border: 1px solid color-mix(in srgb, var(--auth-accent) 28%, transparent); border-radius: var(--auth-radius-md); background: color-mix(in srgb, var(--auth-accent) 8%, transparent); }
.au-table-bar strong { font: var(--auth-font-label); color: var(--auth-color-ink); font-variant-numeric: tabular-nums; }
.au-table-bar .au-squeeze { margin-left: auto; }
/* États du tableau : chargement, vide, erreur — dans la zone du tableau, jamais à sa place en silence. */
.au-table-state { display: grid; justify-items: center; gap: var(--auth-space-3); padding: var(--auth-space-10) var(--auth-space-5); text-align: center; }
.au-table-state h3 { margin: 0; font: var(--auth-font-heading-sm); }
.au-table-state p { margin: 0; max-width: 44ch; color: var(--auth-color-ink-secondary); font: var(--auth-font-caption); }
.au-table-wrap.is-loading .au-table { opacity: 0.45; pointer-events: none; }
.au-table-wrap.is-loading::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--auth-color-surface) 55%, transparent)); pointer-events: none; }
/* Colonnes secondaires : masquées sous 1024, rendues dans le mode carte au téléphone. */
@media (max-width: 1024px) { .au-table [data-priority='low'] { display: none; } }

/* Types de cellules : une seule façon d'afficher un montant, un statut, un utilisateur…
   `numeric` aligne à droite en chiffres tabulaires ; les actions sont groupées à droite. */
.au-cell { min-width: 0; vertical-align: middle; }
.au-cell--num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.au-cell--date { color: var(--auth-color-ink-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.au-cell--muted { color: var(--auth-color-ink-secondary); }
.au-cell--actions { text-align: right; white-space: nowrap; }
.au-cell--actions .au-icon-btn { vertical-align: middle; }
/* Lien de cellule : hauteur de frappe au moins 24 px (une ligne de 19 px était ratée au doigt). */
.au-cell--link a, a.au-cell--link { display: inline-flex; align-items: center; min-height: 24px; width: fit-content; max-width: 100%; color: var(--auth-color-ink); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--auth-color-line-strong); }
.au-cell--link a:hover, a.au-cell--link:hover { border-bottom-color: var(--auth-color-ink); }
.au-cell--icon svg { width: var(--auth-icon-md); height: var(--auth-icon-md); color: var(--auth-color-ink-tertiary); vertical-align: middle; }
/* Tendance : une flèche ET un signe, jamais la couleur seule. */
.au-trend { display: inline-flex; align-items: center; gap: 4px; font: 500 0.8125rem/1 var(--auth-font-family); font-variant-numeric: tabular-nums; white-space: nowrap; }
.au-trend::before { content: ''; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; }
.au-trend--up { color: var(--auth-color-success); }
.au-trend--up::before { border-bottom: 7px solid currentColor; }
.au-trend--down { color: var(--auth-color-danger); }
.au-trend--down::before { border-top: 7px solid currentColor; }
.au-trend--flat { color: var(--auth-color-ink-tertiary); }
.au-trend--flat::before { width: 8px; height: 2px; border: 0; background: currentColor; }
/* Progression en cellule : la barre et le chiffre, jamais la barre seule. */
.au-cell--progress { min-width: 120px; }
.au-cell--progress .au-row { gap: var(--auth-space-2); }
.au-cell--progress .au-progress { flex: 1 1 auto; height: 6px; }
.au-cell--progress .au-num { flex: none; font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }

/* Repli téléphone — pas un simple défilement : la ligne devient une carte avec son étiquette.
   <td data-label="Montant">…</td> — sans data-label, la cellule s'affiche pleine largeur (valeur principale).
   La sélection et la valeur principale partagent la première ligne (détecteur + relecture, 01/10). */
@media (max-width: 700px) {
  .au-table--cards { display: block; }
  .au-table--cards thead { display: none; }
  .au-table--cards tbody, .au-table--cards tr, .au-table--cards td { display: block; width: 100%; }
  .au-table--cards tr { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; padding: var(--auth-space-3) var(--auth-space-4); border-bottom: 1px solid var(--auth-color-line); }
  .au-table--cards tr:last-child { border-bottom: 0; }
  .au-table--cards tr:has(td.au-cell-check) { grid-template-columns: auto minmax(0, 1fr); column-gap: var(--auth-space-3); }
  .au-table--cards tr:has(td.au-cell-check) td { grid-column: 2; }
  .au-table--cards tr:has(td.au-cell-check) td.au-cell-check { grid-column: 1; grid-row: 1; }
  .au-table--cards tr:has(td.au-cell-check) td:nth-child(2) { grid-row: 1; }
  .au-table--cards td { height: auto; min-height: 0; padding: var(--auth-space-1) 0; border: 0; display: flex; align-items: baseline; justify-content: space-between; gap: var(--auth-space-4); text-align: left; }
  .au-table--cards td::before { content: attr(data-label); flex: none; font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); }
  .au-table--cards td:not([data-label])::before { content: none; }
  .au-table--cards td:not([data-label]) { justify-content: flex-start; padding-bottom: var(--auth-space-2); font-weight: 600; }
  .au-table--cards .au-cell--num, .au-table--cards .au-cell--actions { text-align: left; }
  /* Le sélecteur `td:not([data-label])` pèse plus lourd que `.au-cell--actions` : on le reprend pour
     garder les actions à droite de la carte (relecture du 01/10). */
  .au-table--cards td:not([data-label]).au-cell--actions { justify-content: flex-end; padding-bottom: 0; font-weight: 400; }
  .au-table--cards [data-priority='low'] { display: flex; } /* rendue dans la carte, elle n'est plus secondaire */
  .au-table--cards .au-cell-check { width: auto; padding-bottom: 0; }
  /* Champs déclarés par l'app (cardFields) : le reste se replie derrière « Détails ». */
  .au-table--cards td { width: 100% !important; }
  .au-table--cards tr:not(.is-open) td[data-card='more'] { display: none; }
  .au-table--cards td.au-cell--more { display: flex; justify-content: flex-end; padding: 0; }
  .au-table--cards td.au-cell--more::before { content: none; }
  .au-table--cards tr.is-new { box-shadow: inset 3px 0 0 var(--auth-color-action); }
}

/* Tableau commun (demande CRM A1) : ligne cliquable, ligne « nouvelle », carte à champs déclarés. */
.au-table tbody tr.au-row-link:focus-visible { outline: 2px solid var(--auth-color-focus); outline-offset: -2px; }
.au-table tbody tr.au-row-link:hover td { background: color-mix(in srgb, var(--auth-color-action) 6%, transparent); }
.au-table tbody tr.is-new td { background: color-mix(in srgb, var(--auth-color-action) 7%, transparent); }
.au-table tbody tr.is-new td:first-child { box-shadow: inset 3px 0 0 var(--auth-color-action); }
.au-new-dot { display: inline-block; width: 8px; height: 8px; margin-right: var(--auth-space-2); border-radius: 50%; background: var(--auth-color-action); vertical-align: middle; }
.au-table td { overflow-wrap: anywhere; }
.au-cell--more { display: none; }

/* ── 5. Retour : alerte, bannière, états vides et d'erreur, chargement (P1-009) ──
   Une alerte = une icône + un titre + une phrase + une action. La couleur dit le degré,
   l'icône et le texte le disent aussi (une alerte lue par un daltonien ou par un écran). */
.au-alert { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: var(--auth-space-3); min-width: 0; padding: var(--auth-space-3) var(--auth-space-4); border: 1px solid var(--auth-color-line); border-left: 3px solid var(--auth-color-neutral); border-radius: var(--auth-radius-md); background: var(--auth-color-surface); }
.au-alert > svg { flex: none; width: var(--auth-icon-md); height: var(--auth-icon-md); margin-top: 1px; color: var(--auth-color-neutral); }
.au-alert-body { display: grid; gap: 2px; min-width: 0; }
.au-alert-body strong { font: var(--auth-font-label); color: var(--auth-color-ink); }
.au-alert-body p { margin: 0; font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
.au-alert-actions { display: flex; flex-wrap: wrap; gap: var(--auth-space-2); align-items: center; }
.au-alert--info { border-left-color: var(--auth-color-info); background: var(--auth-color-info-soft); } .au-alert--info > svg { color: var(--auth-color-info); }
.au-alert--success { border-left-color: var(--auth-color-success); background: var(--auth-color-success-soft); } .au-alert--success > svg { color: var(--auth-color-success); }
.au-alert--warning { border-left-color: var(--auth-color-warning); background: var(--auth-color-warning-soft); } .au-alert--warning > svg { color: var(--auth-color-warning); }
.au-alert--danger { border-left-color: var(--auth-color-danger); background: var(--auth-color-danger-soft); } .au-alert--danger > svg { color: var(--auth-color-danger); }
/* Bannière : pleine largeur, collée en haut de la page ou de la section. */
.au-banner { border-radius: 0; border-left: 0; border-top: 3px solid var(--auth-color-neutral); grid-template-columns: auto minmax(0, 1fr) auto; }
.au-banner--info { border-top-color: var(--auth-color-info); } .au-banner--success { border-top-color: var(--auth-color-success); }
.au-banner--warning { border-top-color: var(--auth-color-warning); } .au-banner--danger { border-top-color: var(--auth-color-danger); }
@media (max-width: 560px) { .au-alert { grid-template-columns: auto minmax(0, 1fr); } .au-alert-actions { grid-column: 1 / -1; padding-left: calc(var(--auth-icon-md) + var(--auth-space-3)); } }

/* États vides : six situations, six conduites. Un état vide qui ne propose rien est une impasse
   (critère « page sans sortie »). Chaque variante porte l'icône de la situation, pas une décoration. */
.au-empty--centered { justify-items: center; text-align: center; margin-inline: auto; }
.au-empty .au-empty-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--auth-color-neutral-soft); color: var(--auth-color-ink-tertiary); }
.au-empty .au-empty-icon svg { width: var(--auth-icon-lg); height: var(--auth-icon-lg); }
.au-empty--no-results .au-empty-icon { background: var(--auth-color-info-soft); color: var(--auth-color-info); }
.au-empty--not-configured .au-empty-icon { background: var(--auth-color-warning-soft); color: var(--auth-color-warning); }
.au-empty--no-access .au-empty-icon { background: var(--auth-color-danger-soft); color: var(--auth-color-danger); }
.au-empty--first-use .au-empty-icon { background: color-mix(in srgb, var(--auth-color-action) 12%, transparent); color: var(--auth-color-action); }
/* États d'erreur : cinq portées. La page dit ce qui a échoué, pourquoi, et la sortie (Réessayer / Retour). */
.au-error--section { padding: var(--auth-space-6); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-lg); background: var(--auth-color-surface); }
.au-error--permission .au-error-icon { background: var(--auth-color-danger-soft); color: var(--auth-color-danger); }
.au-error .au-error-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--auth-color-neutral-soft); color: var(--auth-color-ink-tertiary); }
.au-error .au-error-icon svg { width: var(--auth-icon-lg); height: var(--auth-icon-lg); }
.au-error--page { min-height: 60vh; align-content: center; }

/* Chargement : un seul point tournant pour toute la suite, et une barre de progression
   quand la durée est connue. Le spinner seul ne remplace jamais un squelette de liste. */
.au-spinner { display: inline-block; width: var(--auth-icon-md); height: var(--auth-icon-md); border-radius: 50%; border: 2px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; animation: au-spin var(--auth-loop-spin) linear infinite; flex: none; }
.au-spinner--sm { width: var(--auth-icon-sm); height: var(--auth-icon-sm); border-width: 2px; }
.au-spinner--lg { width: var(--auth-icon-lg); height: var(--auth-icon-lg); }
.au-loading { display: inline-flex; align-items: center; gap: var(--auth-space-2); font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
/* Squelettes : trois formes, une seule respiration. Un squelette garde la taille du contenu réel. */
.au-skeleton--text { height: 12px; border-radius: 6px; }
.au-skeleton--title { height: 20px; width: 40%; }
.au-skeleton--row { height: var(--auth-row, 52px); border-radius: var(--auth-radius-sm); }
.au-skeleton--card { height: 120px; border-radius: var(--auth-radius-lg); }
.au-skeleton-group { display: grid; gap: var(--auth-space-3); }
/* Toast : l'action (Annuler, Voir) est un bouton de 32 px minimum, et le message reste court. */
.au-toast[data-kind='success'] { background: var(--auth-color-success); color: var(--auth-color-on-success); }
.au-toast[data-kind='warning'] { background: var(--auth-color-warning); color: var(--auth-color-on-warning); }
.au-toast[data-kind='info'] { background: var(--auth-color-surface-raised); color: var(--auth-color-ink); border: 1px solid var(--auth-color-line); }
.au-toast .au-toast-text { min-width: 0; overflow-wrap: anywhere; }
@keyframes au-spin { to { transform: rotate(360deg); } }
/* Mouvement réduit : plus aucune animation infinie — au-delà du confort, une barre ou un point qui tourne
   indéfiniment rend les captures de référence non reproductibles (échecs intermittents du 02/10). */
@media (prefers-reduced-motion: reduce) {
  .au-spinner, .au-skeleton, .au-btn[aria-busy='true']::after, .au-icon-btn[aria-busy='true']::after { animation: none !important; }
  .au-btn[aria-busy='true']::after, .au-icon-btn[aria-busy='true']::after { opacity: 0.55; }
}

/* ── 6. Overlays : feuilles, tiroirs, menus, palette de commandes (P1-010) ──
   Paliers : tiroir 200, feuille 220, toast 300 (jetons `--auth-z-*`). Rien en `999999`. */
.au-sheet--confirm { width: min(440px, calc(100% - 32px)); }
.au-sheet--wide { width: min(760px, calc(100% - 32px)); }
.au-sheet--form .au-sheet-body { display: grid; gap: var(--auth-space-5); }
.au-sheet-head .au-sheet-title { display: grid; gap: var(--auth-space-1); min-width: 0; }
.au-sheet-head h2 { margin: 0; font: var(--auth-font-heading-md); overflow-wrap: anywhere; }
.au-sheet-head p { margin: 0; font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
/* Danger : la confirmation porte le nom de l'action et de sa conséquence, avec l'icône. */
.au-sheet--danger .au-sheet-head h2 { color: var(--auth-color-danger); }
/* L'icône d'alerte (confirmation.js) se place avant le titre, à sa hauteur. */
.au-sheet-head:has(> .au-sheet-icone) { justify-content: flex-start; }
.au-sheet-head > .au-sheet-icone { flex: none; width: var(--auth-icon-md); height: var(--auth-icon-md); margin-top: 2px; color: var(--auth-color-neutral); }
.au-sheet--danger .au-sheet-head > .au-sheet-icone { color: var(--auth-color-danger); }
.au-sheet-foot--between { justify-content: space-between; }
@media (max-width: 480px) { .au-sheet-foot { flex-direction: column-reverse; } .au-sheet-foot .au-btn { width: 100%; } }
/* Tiroir latéral : plus large sur grand écran, plein sur téléphone. */
.au-drawer--wide { width: min(720px, 100%); }
@media (max-width: 700px) {
  .au-drawer { width: 100%; height: 100svh; border-left: 0; }
  .au-drawer[open] { animation: au-rise var(--auth-motion-normal) var(--auth-ease-enter) both; }
}
/* Menu : borné en largeur, libellés qui passent à la ligne (jamais tranchés), et aligné à droite
   quand le déclencheur est contre le bord droit — sinon la moitié du menu sort de l'écran. */
.au-popover--menu { max-width: min(320px, calc(100vw - 24px)); }
.au-menu-anchor--end .au-popover { left: auto; right: 0; }
.au-menu-anchor--up .au-popover { top: auto; bottom: calc(100% + 6px); }
.au-menu-label { display: block; min-width: 0; overflow-wrap: anywhere; }
.au-menu-sep { height: 1px; margin: var(--auth-space-2) var(--auth-space-1); background: var(--auth-color-line); }
.au-menu-title { padding: var(--auth-space-2) var(--auth-space-3) var(--auth-space-1); font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); }
/* Palette de commandes (Ctrl K) : recherche en tête, résultats groupés, raccourcis à droite. */
.au-command { width: min(620px, calc(100% - 24px)); padding: 0; border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-lg); background: var(--auth-color-surface-overlay); -webkit-backdrop-filter: blur(var(--auth-blur-overlay)) saturate(1.4); backdrop-filter: blur(var(--auth-blur-overlay)) saturate(1.4); box-shadow: var(--auth-shadow-2); color: var(--auth-color-ink); overflow: hidden; }
.au-command[open] { animation: au-rise var(--auth-motion-normal) var(--auth-ease-enter) both; }
.au-command-input { display: flex; align-items: center; gap: var(--auth-space-3); padding: var(--auth-space-3) var(--auth-space-4); border-bottom: 1px solid var(--auth-color-line); }
.au-command-input > svg { flex: none; width: var(--auth-icon-md); height: var(--auth-icon-md); color: var(--auth-color-ink-tertiary); }
.au-command-input input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; font: var(--auth-font-body); color: var(--auth-color-ink); }
.au-command-input input:focus { outline: none; }
.au-command-list { max-height: min(52vh, 420px); overflow-y: auto; padding: var(--auth-space-2); }
.au-command-group { padding: var(--auth-space-2) var(--auth-space-3) var(--auth-space-1); font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); }
.au-command-item { display: flex; align-items: center; gap: var(--auth-space-3); min-height: 44px; padding: 0 var(--auth-space-3); border-radius: var(--auth-radius-sm); cursor: pointer; }
.au-command-item[aria-selected='true'] { background: color-mix(in srgb, var(--auth-color-ink) 8%, transparent); }
.au-command-item > svg { flex: none; width: var(--auth-icon-md); height: var(--auth-icon-md); color: var(--auth-color-ink-tertiary); }
.au-command-item .au-truncate { flex: 1 1 auto; }
.au-command-key { flex: none; font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.au-command-foot { display: flex; gap: var(--auth-space-4); padding: var(--auth-space-2) var(--auth-space-4); border-top: 1px solid var(--auth-color-line); font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); }
@media (max-width: 560px) { .au-command-foot { display: none; } .au-command { margin-top: 8vh; } }

/* ── 7. Navigation : en-tête de page, barre d'outils, filtres, onglets (P1-011) ──
   En-tête de page standard : sur-titre (fil d'Ariane), titre, sous-titre, statut, méta,
   puis l'action principale et les secondaires. Une seule action primaire par page. */
.au-page-head { align-items: flex-start; }
.au-page-head-text { display: grid; gap: var(--auth-space-2); min-width: 0; flex: 1 1 320px; }
.au-page-eyebrow { font: var(--auth-font-label); color: var(--auth-color-ink-tertiary); }
.au-page-title { margin: 0; font: var(--auth-font-heading-lg); letter-spacing: var(--auth-tracking-heading); overflow-wrap: anywhere; }
.au-page-sub { margin: 0; font: var(--auth-font-body); color: var(--auth-color-ink-secondary); max-width: 72ch; }
.au-page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-2) var(--auth-space-4); font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); }
.au-page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-2); flex: none; }
@media (max-width: 760px) { .au-page-actions { width: 100%; } .au-page-actions .au-btn--primary { flex: 1 1 auto; } }

/* Barre d'outils : recherche, filtres, bascule de vue, tri, actions. La recherche prend la place
   disponible, les actions ne rétrécissent jamais (`.au-shrink-none`). */
.au-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-2) var(--auth-space-3); min-width: 0; margin-bottom: var(--auth-space-4); }
.au-toolbar > * { min-width: 0; }
.au-toolbar-actions { display: flex; align-items: center; gap: var(--auth-space-2); flex: none; margin-left: auto; }
.au-toolbar-sep { width: 1px; height: 24px; background: var(--auth-color-line); flex: none; }
/* Barre de filtres à pastilles : les filtres actifs sont visibles, comptés, et tous retirables d'un geste. */
.au-filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-2); min-width: 0; }
.au-filter-chips .au-tag { flex: none; }
.au-filter-count { font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Onglets qui débordent : défilement horizontal, liseré de fondu aux deux bords, et un bouton « Plus »
   quand tous ne tiennent pas. Jamais d'onglet tronqué sans libellé complet au survol. */
.au-tabs--scroll { position: relative; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.au-tabs--scroll::-webkit-scrollbar { display: none; }
.au-tabs--fade { -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); }
.au-tabs .au-tab { max-width: 22ch; }
.au-tabs .au-tab > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-tabs .au-tab .au-nav-count { margin-left: var(--auth-space-2); }
/* Sous-navigation (section d'une page) : discrète, soulignée, jamais une seconde barre latérale. */
.au-subnav { display: flex; flex-wrap: wrap; gap: var(--auth-space-1); border-bottom: 1px solid var(--auth-color-line); margin-bottom: var(--auth-space-5); }
.au-subnav a { padding: var(--auth-space-2) var(--auth-space-3); min-height: 40px; display: inline-flex; align-items: center; font: var(--auth-font-label); color: var(--auth-color-ink-secondary); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.au-subnav a:hover { color: var(--auth-color-ink); }
.au-subnav a[aria-current='page'] { color: var(--auth-color-ink); border-bottom-color: var(--auth-accent); font-weight: 600; }

/* En-tête d'entité (client, affaire, chantier, cours…) : identité à gauche, statut et méta,
   actions à droite. Le même gabarit dans toutes les applications, quel que soit l'objet métier. */
.au-entity-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-4); min-width: 0; padding-bottom: var(--auth-space-5); border-bottom: 1px solid var(--auth-color-line); }
.au-entity-id { display: flex; align-items: center; gap: var(--auth-space-3); min-width: 0; flex: 1 1 280px; }
.au-entity-text { display: grid; gap: 2px; min-width: 0; }
.au-entity-text h1, .au-entity-text h2 { margin: 0; font: var(--auth-font-heading-md); letter-spacing: var(--auth-tracking-heading); overflow-wrap: anywhere; }
.au-entity-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-2) var(--auth-space-3); font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); }
.au-entity-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-2); margin-left: auto; }
/* Avatar : trois tailles, initiales quand il n'y a pas d'image. Jamais d'icône posée dessus par hasard. */
.au-avatar { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--auth-accent) 18%, transparent); color: var(--auth-color-ink); font: 600 0.875rem/1 var(--auth-font-family); text-transform: uppercase; } /* initiales à l'encre : sur la teinte d'accent, l'accent lui-même tombait sous 4,5:1 (axe, 01/10) */
.au-avatar img { width: 100%; height: 100%; object-fit: cover; }
.au-avatar--sm { width: 28px; height: 28px; font-size: 0.6875rem; }
.au-avatar--lg { width: 56px; height: 56px; font-size: 1.125rem; }
.au-avatar-group { display: flex; align-items: center; }
.au-avatar-group .au-avatar + .au-avatar { margin-left: -10px; box-shadow: 0 0 0 2px var(--auth-color-surface); }
.au-avatar-group .au-avatar-more { background: var(--auth-color-neutral-soft); color: var(--auth-color-ink-secondary); }
/* Puce utilisateur : avatar + nom + rôle, le nom borne, le rôle tronque. */
.au-user-chip { display: inline-flex; align-items: center; gap: var(--auth-space-2); min-width: 0; max-width: 100%; padding: 3px 10px 3px 3px; border-radius: var(--auth-radius-pill); background: color-mix(in srgb, var(--auth-color-ink) 5%, transparent); }
.au-user-chip .au-truncate { font: var(--auth-font-label); color: var(--auth-color-ink); }
.au-user-chip small { color: var(--auth-color-ink-tertiary); font: var(--auth-font-caption); white-space: nowrap; }

/* Bandeau KPI : une ligne de synthèse dense, quatre à six chiffres, séparés par un filet. */
/* v3 (07/10) : « une carte, séparateurs, libellé en capitales, valeur colorée par sens, phrase d'explication » (COMMISSION globals.css 8157-8245).
   Même balisage qu'avant (dl > .au-kpi > dt + dd) ; `<small>` (explication) et `data-tone` sur `.au-kpi` sont facultatifs. */
.au-kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); margin: 0; min-width: 0; border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-lg); background: var(--auth-color-surface); box-shadow: var(--auth-shadow-1); overflow: hidden; }
.au-kpi { display: grid; align-content: start; gap: 4px; padding: 16px 14px; min-width: 0; border-left: 1px solid var(--auth-color-line); transition: background var(--auth-motion-normal) var(--auth-ease-standard); }
.au-kpi:first-child { border-left: 0; }
.au-kpi:hover { background: var(--auth-color-fill-hover); }
.au-kpi dt { font: var(--auth-font-eyebrow); letter-spacing: var(--auth-tracking-eyebrow); text-transform: uppercase; color: var(--auth-color-ink-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-kpi dd { margin: 0; font: 600 clamp(0.9375rem, 1.25vw, 1.3125rem)/1.2 var(--auth-font-family); letter-spacing: -0.024em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.au-kpi small, .au-kpi dd.au-kpi-note { font: var(--auth-font-caption); letter-spacing: normal; color: var(--auth-color-ink-secondary); align-self: end; }
.au-kpi[data-tone='ok'] dd { color: var(--auth-tone-ok); } .au-kpi[data-tone='due'] dd { color: var(--auth-tone-due); }
.au-kpi[data-tone='waiting'] dd { color: var(--auth-tone-waiting); } .au-kpi[data-tone='problem'] dd { color: var(--auth-tone-problem); }
.au-kpi[data-tone='neutral'] dd { color: var(--auth-tone-neutral); }
.au-kpi[data-tone] dd.au-kpi-note { color: var(--auth-color-ink-secondary); }
@media (max-width: 760px) { .au-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .au-kpi { border-left: 0; border-top: 1px solid var(--auth-color-line); } .au-kpi:nth-child(-n + 2) { border-top: 0; } .au-kpi:nth-child(even) { border-left: 1px solid var(--auth-color-line); } .au-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* ── 8. Cartes et listes (P2-012) ─────────────────────────────────────────
   Taxonomie de la doc : standard · interactive · metric · featured. Les variantes ci-dessous
   sont des ÉTATS de ces cartes, pas de nouvelles matières : statut, entité, activité, alerte. */
.au-card--status { border-left: 3px solid var(--auth-color-neutral); }
.au-card--status[data-status='success'] { border-left-color: var(--auth-color-success); }
.au-card--status[data-status='warning'] { border-left-color: var(--auth-color-warning); }
.au-card--status[data-status='danger'] { border-left-color: var(--auth-color-danger); }
.au-card--status[data-status='info'] { border-left-color: var(--auth-color-info); }
.au-card--alert { border-color: color-mix(in srgb, var(--auth-color-warning) 35%, transparent); background: var(--auth-color-warning-soft); }
.au-card--alert[data-kind='danger'] { border-color: color-mix(in srgb, var(--auth-color-danger) 35%, transparent); background: var(--auth-color-danger-soft); }
.au-card-head { display: flex; align-items: flex-start; gap: var(--auth-space-3); min-width: 0; margin-bottom: var(--auth-space-3); }
.au-card-head h3 { margin: 0; font: var(--auth-font-heading-sm); min-width: 0; }
.au-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-2); margin-top: var(--auth-space-4); padding-top: var(--auth-space-3); border-top: 1px solid var(--auth-color-line); }
/* Métrique : delta et sparkline à côté du chiffre. Le delta porte un signe et une flèche. */
.au-metric-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--auth-space-2) var(--auth-space-3); min-width: 0; }
.au-metric-spark { flex: none; width: 72px; height: 24px; }
.au-metric-goal { display: grid; gap: var(--auth-space-2); margin-top: var(--auth-space-2); }
.au-metric-goal .au-row { font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); justify-content: space-between; }

/* Listes : une seule anatomie — pastille/icône, texte (titre + ligne secondaire), valeur, action. */
.au-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; min-width: 0; }
.au-list-item { display: flex; align-items: center; gap: var(--auth-space-3); min-width: 0; min-height: var(--auth-row, 52px); padding: var(--auth-space-2) 0; border-bottom: 1px solid var(--auth-color-line); }
.au-list-item:last-child { border-bottom: 0; }
.au-list-item-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
.au-list-item-title { font: var(--auth-font-body); color: var(--auth-color-ink); min-width: 0; overflow-wrap: anywhere; }
.au-list-item-sub { font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); min-width: 0; } /* encre secondaire : la ligne sélectionnée teinte son fond, le tertiaire tombait à 4,3:1 (axe, 01/10) */
.au-list-item-side { flex: none; display: flex; align-items: center; gap: var(--auth-space-2); }
.au-list--compact .au-list-item { min-height: var(--auth-row-compact, 40px); padding: var(--auth-space-1) 0; }
a.au-list-item { text-decoration: none; color: inherit; cursor: pointer; }
a.au-list-item:hover .au-list-item-title { color: var(--auth-color-ink); }
/* Fil temporel : un point, une ligne, un contenu. Le point porte l'état quand il y en a un. */
.au-timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; min-width: 0; }
.au-timeline-item { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: var(--auth-space-3); padding-bottom: var(--auth-space-5); position: relative; }
.au-timeline-item::before { content: ''; grid-column: 1; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--auth-color-surface); border: 2px solid var(--auth-color-line-strong); justify-self: center; }
.au-timeline-item:not(:last-child)::after { content: ''; grid-column: 1; grid-row: 2; width: 2px; height: 100%; background: var(--auth-color-line); justify-self: center; }
.au-timeline-item[data-status='success']::before { border-color: var(--auth-color-success); background: var(--auth-color-success); }
.au-timeline-item[data-status='danger']::before { border-color: var(--auth-color-danger); background: var(--auth-color-danger); }
.au-timeline-item[data-status='warning']::before { border-color: var(--auth-color-warning); }
.au-timeline-body { display: grid; gap: var(--auth-space-1); min-width: 0; }
.au-timeline-title { font: var(--auth-font-label); color: var(--auth-color-ink); min-width: 0; overflow-wrap: anywhere; }
.au-timeline-time { font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); font-variant-numeric: tabular-nums; }
.au-timeline--compact .au-timeline-item { padding-bottom: var(--auth-space-3); }
/* Liste d'activités : le fil temporel densifié, avec l'auteur en puce. */
.au-activity .au-timeline-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-2); }

/* ── 9. Cibles tactiles : en fin de feuille, pour gagner sur les tailles de variante ──
   Au doigt, toute commande reçoit 44 px — une croix de 22 px, une icône de tableau, un onglet.
   Mesuré par packages/core-ui/qa-visuelle.mjs + audit-affichage.js (01/10 : 14 cibles sous le seuil). */
@media (pointer: coarse), (max-width: 760px) {
  .au-icon-btn, .au-input-wrap > .au-icon-btn { --ib: 44px; }
  .au-icon-btn--lg { --ib: 52px; }
  .au-breadcrumb a { min-height: 44px; }
  .au-subnav a { min-height: 44px; }
  a.au-cell--link, .au-cell--link a { min-height: 44px; } /* lien de cellule : la ligne entière reste frappable */
  a.au-ai-source { min-height: 44px; } /* pastille de source cliquable */
  .au-segmented .au-btn { --h: 44px; }
  .au-multiselect input { min-height: 44px; }
  .au-command-item { min-height: 48px; }
  .au-user-chip small { display: none; } /* le rôle cède au nom sur un écran étroit */
}

/* ── 10. Graphiques : aire, empilées, sparkline, entonnoir, jauge, anneau, états, infobulle (P2-013) ──
   Règle gardée de la §25 : la barre découpée (`renderParts`) reste la référence pour COMPARER des parts ;
   l'anneau (`renderDonut`) sert à une proportion à l'œil, avec son total au centre. */
.au-chart { position: relative; min-width: 0; }
.au-chart-area { fill: var(--auth-accent); opacity: 0.12; stroke: none; transform-box: fill-box; transform-origin: center bottom; animation: au-chart-grow var(--auth-motion-chart) var(--auth-ease-enter) both; }
.au-chart-area--2 { fill: var(--auth-color-ink-secondary); opacity: 0.10; }
.au-chart-area--3 { fill: var(--auth-color-success); opacity: 0.12; }
.au-chart-area--4 { fill: var(--auth-color-warning); opacity: 0.12; }
/* Sparkline : une courbe sans axes, pour un chiffre en carte. Le sens est porté par `.au-trend`, pas par elle. */
.au-spark { display: block; width: 72px; height: 24px; overflow: visible; }
.au-spark-line { fill: none; stroke: var(--auth-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.au-spark-area { fill: var(--auth-accent); opacity: 0.14; stroke: none; }
.au-spark-end { fill: var(--auth-accent); }
/* Entonnoir : une étape = une barre à sa proportion, la valeur à droite, jamais d'angle trompeur. */
.au-funnel { display: grid; gap: var(--auth-space-2); min-width: 0; }
.au-funnel-step { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--auth-space-3); min-width: 0; }
.au-funnel-track { display: grid; grid-template-columns: minmax(0, 34%) minmax(0, 1fr); align-items: center; gap: var(--auth-space-3); min-width: 0; } /* le nom garde sa colonne : sinon la barre de la première étape le réduisait à « Demandes r… » (capture du 02/10) */
.au-funnel-bar { height: 28px; border-radius: var(--auth-radius-xs); background: color-mix(in srgb, var(--auth-accent) 82%, transparent); width: var(--au-part, 0%); min-width: 4px; transform-origin: left; animation: au-chart-grow-x var(--auth-motion-chart) var(--auth-ease-enter) both; }
.au-funnel-bar--2 { background: color-mix(in srgb, var(--auth-accent) 68%, transparent); }
.au-funnel-bar--3 { background: color-mix(in srgb, var(--auth-accent) 54%, transparent); }
.au-funnel-bar--4 { background: color-mix(in srgb, var(--auth-accent) 40%, transparent); }
.au-funnel-bar--5 { background: color-mix(in srgb, var(--auth-accent) 28%, transparent); }
.au-funnel-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--auth-font-label); color: var(--auth-color-ink); }
.au-funnel-value { font: var(--auth-font-numeric); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--auth-color-ink); }
.au-funnel-drop { font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); font-variant-numeric: tabular-nums; white-space: normal; max-width: 18ch; text-align: right; text-wrap: balance; } /* relevé du 01/11 : « 16 % de l’étape précédente » sortait de sa case sur une carte étroite (accueil du Hub) */
/* Jauge : un arc de 240°, la valeur écrite au centre. Jamais la couleur seule pour l'état. */
.au-gauge { display: grid; justify-items: center; gap: var(--auth-space-2); min-width: 0; }
.au-gauge-svg { width: 180px; max-width: 100%; height: auto; overflow: visible; }
.au-gauge-track { fill: none; stroke: var(--auth-color-neutral-soft); stroke-width: 12; stroke-linecap: round; }
.au-gauge-fill { fill: none; stroke: var(--auth-accent); stroke-width: 12; stroke-linecap: round; transform-origin: center; animation: au-chart-grow var(--auth-motion-chart) var(--auth-ease-enter) both; }
.au-gauge-fill[data-status='warning'] { stroke: var(--auth-color-warning); }
.au-gauge-fill[data-status='danger'] { stroke: var(--auth-color-danger); }
.au-gauge-fill[data-status='success'] { stroke: var(--auth-color-success); }
.au-gauge-value { font: 600 1.5rem/1 var(--auth-font-family); font-variant-numeric: tabular-nums; }
.au-gauge-label { font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); text-align: center; }
/* Anneau à parts (renderDonut) : une proportion à l'œil. Comparer des parts reste le rôle de `renderParts`. */
.au-donut { display: flex; align-items: center; gap: var(--auth-space-5); flex-wrap: wrap; min-width: 0; }
.au-donut-svg { width: 148px; height: 148px; flex: none; overflow: visible; }
.au-donut-seg { fill: none; stroke-width: 18; transform-origin: center; animation: au-chart-grow var(--auth-motion-chart) var(--auth-ease-enter) both; }
.au-donut-seg--1 { stroke: var(--auth-accent); }
.au-donut-seg--2 { stroke: var(--auth-color-info); }
.au-donut-seg--3 { stroke: var(--auth-color-success); }
.au-donut-seg--4 { stroke: var(--auth-color-warning); }
.au-donut-seg--5 { stroke: var(--auth-color-ink-secondary); }
.au-donut-seg--6 { stroke: var(--auth-color-neutral); }
.au-donut-seg--other { stroke: var(--auth-color-line-strong); }
.au-donut-hole { fill: var(--auth-color-surface); }
.au-donut-total { font: 600 1.125rem/1 var(--auth-font-family); font-variant-numeric: tabular-nums; fill: var(--auth-color-ink); }
.au-donut-sub { font: 11px var(--auth-font-family); fill: var(--auth-color-ink-tertiary); }
/* États d'un graphique : chargement, vide, erreur, données anciennes. Une seule coquille pour tous. */
.au-chart-state { display: grid; justify-items: center; gap: var(--auth-space-3); min-height: 200px; align-content: center; padding: var(--auth-space-6); text-align: center; min-width: 0; }
.au-chart-state h3 { margin: 0; font: var(--auth-font-heading-sm); }
.au-chart-state p { margin: 0; max-width: 44ch; font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
.au-chart-state--loading { justify-items: stretch; }
.au-chart-state--loading .au-skeleton { width: 100%; height: 8px; border-radius: 4px; }
.au-chart-stale { display: flex; align-items: center; gap: var(--auth-space-2); padding: var(--auth-space-2) var(--auth-space-3); border-radius: var(--auth-radius-xs); background: var(--auth-color-warning-soft); color: var(--auth-color-warning); font: var(--auth-font-caption); }
.au-chart-stale::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
/* Infobulle commune : valeur, période, série, écart. Posée par le graphique, jamais coupée par son cadre. */
.au-chart-tip { position: absolute; left: 50%; z-index: var(--auth-z-popover); min-width: 140px; max-width: 260px; padding: var(--auth-space-2) var(--auth-space-3); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-sm); background: var(--auth-color-surface-overlay); -webkit-backdrop-filter: blur(var(--auth-blur-overlay)); backdrop-filter: blur(var(--auth-blur-overlay)); box-shadow: var(--auth-shadow-2); pointer-events: none; opacity: 0; transform: translate(-50%, calc(-100% + 6px)); transition: opacity var(--auth-motion-fast) var(--auth-ease-standard), transform var(--auth-motion-fast) var(--auth-ease-standard); }
.au-chart-tip.is-on { opacity: 1; transform: translate(-50%, -100%); }
.au-chart-tip-period { font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); }
.au-chart-tip-value { font: 600 0.9375rem/1.3 var(--auth-font-family); font-variant-numeric: tabular-nums; color: var(--auth-color-ink); }
.au-chart-tip-series { font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
.au-chart-tip-delta { font: 500 0.75rem/1.2 var(--auth-font-family); font-variant-numeric: tabular-nums; }

/* ── 11. Workflow : étapes, jalons, kanban, calendrier (P2-014) ─────────────
   Trois situations métiers répétées dans la suite : un tunnel (étapes), un chantier
   (jalons), un flux (kanban). Un seul vocabulaire d'état partout : fait, en cours,
   bloqué, en erreur, à venir. */
.au-steps { --au-step-dot: 22px; }
.au-steps li[data-blocked] { color: var(--auth-color-warning); }
.au-steps li[data-blocked]::before { content: '!'; border-color: var(--auth-color-warning); background: var(--auth-color-warning-soft); color: var(--auth-color-warning); }
.au-steps li[data-error] { color: var(--auth-color-danger); }
.au-steps li[data-error]::before { content: '!'; border-color: var(--auth-color-danger); background: var(--auth-color-danger-soft); color: var(--auth-color-danger); }
/* Étapes en colonne : le résumé tient sur une ligne, le détail s'écrit dessous. Tunnel de référence. */
.au-steps--vertical { flex-direction: column; align-items: stretch; gap: 0; overflow: visible; }
.au-steps--vertical li { position: relative; height: auto; min-height: 48px; padding: var(--auth-space-2) 0 var(--auth-space-4) var(--auth-space-8); border-radius: 0; align-items: flex-start; }
.au-steps--vertical li::before { position: absolute; left: 0; top: var(--auth-space-2); }
.au-steps--vertical li:not(:last-child)::after { content: ''; position: absolute; left: 10px; top: 34px; bottom: 6px; width: 2px; background: var(--auth-color-line); border-radius: 2px; }
.au-steps--vertical li[data-done]::after { background: var(--auth-color-success-soft); }
.au-steps--vertical li[aria-current='step'] { background: transparent; box-shadow: none; color: var(--auth-color-ink); }
.au-steps--vertical li[aria-current='step']::before { box-shadow: 0 0 0 4px color-mix(in srgb, var(--auth-accent) 18%, transparent); }
.au-step-text { display: grid; gap: 2px; min-width: 0; }
.au-step-title { font: var(--auth-font-label); color: inherit; overflow-wrap: anywhere; }
.au-step-desc { font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); }
/* Jalons : un fil avec des points posés à leur place, l'état de chaque étape écrit. */
.au-milestones { display: grid; gap: var(--auth-space-2); min-width: 0; }
.au-milestones-track { position: relative; display: flex; justify-content: space-between; gap: var(--auth-space-2); min-width: 0; padding-top: var(--auth-space-2); }
.au-milestones-track::before { content: ''; position: absolute; left: 6px; right: 6px; top: 7px; height: 2px; background: var(--auth-color-line); }
.au-milestone { position: relative; display: grid; gap: var(--auth-space-1); justify-items: center; min-width: 0; flex: 1 1 0; text-align: center; }
.au-milestone::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--auth-color-surface); border: 2px solid var(--auth-color-line-strong); }
.au-milestone[data-status='done']::before { background: var(--auth-color-success); border-color: var(--auth-color-success); }
.au-milestone[data-status='current']::before { background: var(--auth-accent); border-color: var(--auth-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--auth-accent) 18%, transparent); }
.au-milestone[data-status='blocked']::before { background: var(--auth-color-warning); border-color: var(--auth-color-warning); }
.au-milestone[data-status='error']::before { background: var(--auth-color-danger); border-color: var(--auth-color-danger); }
.au-milestone-label { font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-milestone-date { font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); font-variant-numeric: tabular-nums; }
/* Kanban : colonnes à largeur fixe, défilement horizontal au téléphone plutôt que des colonnes écrasées. */
.au-kanban { display: flex; gap: var(--auth-space-4); align-items: flex-start; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: var(--auth-space-2); min-width: 0; }
.au-kanban-col { flex: 0 0 min(300px, 78vw); display: grid; gap: var(--auth-space-3); min-width: 0; padding: var(--auth-space-3); border-radius: var(--auth-radius-lg); background: color-mix(in srgb, var(--auth-color-ink) 4%, transparent); }
.au-kanban-head { display: flex; align-items: center; gap: var(--auth-space-2); min-width: 0; }
.au-kanban-head h3 { margin: 0; font: var(--auth-font-label); color: var(--auth-color-ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-kanban-count { margin-left: auto; font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); font-variant-numeric: tabular-nums; }
.au-kanban-cards { display: grid; gap: var(--auth-space-2); min-width: 0; }
.au-kanban-card { display: grid; gap: var(--auth-space-2); min-width: 0; padding: var(--auth-space-3); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-md); background: var(--auth-color-surface-raised); box-shadow: var(--auth-shadow-1); }
.au-kanban-card.is-dragging { opacity: 0.6; transform: rotate(1deg); }
.au-kanban-drop { min-height: 6px; border-radius: var(--auth-radius-sm); outline: 2px dashed var(--auth-color-line-strong); outline-offset: 2px; }
.au-kanban-empty { padding: var(--auth-space-4); border: 1px dashed var(--auth-color-line-strong); border-radius: var(--auth-radius-md); font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); text-align: center; } /* encre secondaire : le tertiaire tombait à 4,5:1 sur le fond teinté de la colonne (axe, 02/10) */
/* Calendrier : deux patrons, jamais une grille de mois illisible au téléphone — l'agenda gagne. */
.au-agenda { display: grid; gap: 0; min-width: 0; }
.au-agenda-day { display: grid; gap: var(--auth-space-1); padding: var(--auth-space-3) 0; border-bottom: 1px solid var(--auth-color-line); min-width: 0; }
.au-agenda-day:last-child { border-bottom: 0; }
.au-agenda-date { font: var(--auth-font-label); color: var(--auth-color-ink-tertiary); }
.au-agenda-item { display: flex; align-items: center; gap: var(--auth-space-3); min-width: 0; min-height: 40px; }
.au-agenda-time { flex: none; width: 52px; font: var(--auth-font-numeric); font-variant-numeric: tabular-nums; color: var(--auth-color-ink-secondary); }
.au-agenda-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-calendar { display: grid; gap: 1px; background: var(--auth-color-line); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-md); overflow: hidden; min-width: 0; }
/* `role="grid"` exige des rangées : le mois est découpé en semaines, sinon axe signale l'absence de `row` (02/10). */
.au-calendar-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.au-calendar-head { padding: var(--auth-space-2); background: var(--auth-color-surface); font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); text-align: center; }
.au-calendar-day { min-height: 84px; padding: var(--auth-space-2); background: var(--auth-color-surface); display: grid; gap: 4px; align-content: start; min-width: 0; }
.au-calendar-day.is-empty { background: color-mix(in srgb, var(--auth-color-ink) 3%, transparent); }
.au-calendar-day.is-today { box-shadow: inset 0 0 0 2px var(--auth-accent); }
.au-calendar-num { font: var(--auth-font-caption); font-variant-numeric: tabular-nums; color: var(--auth-color-ink-secondary); }
.au-calendar-event { padding: 2px 6px; border-radius: var(--auth-radius-xs); background: color-mix(in srgb, var(--auth-color-action) 12%, transparent); color: var(--auth-color-ink); font: var(--auth-font-caption); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
  .au-calendar { display: none; } /* au téléphone, l'agenda gagne : une grille de mois illisible ne sert personne */
  .au-kanban-col { flex-basis: min(280px, 84vw); }
}

/* ── 13. IA : prompt, suggestion, explication, aperçu d'action, confiance, sources, outils, flux (P2-015) ──
   Règle de la §12 : toute recommandation IA reste une proposition. Une action sensible passe par
   APERÇU → CONFIRMATION → EXÉCUTION ; la confiance est écrite, jamais portée par la seule couleur. */
.au-ai-prompt { display: grid; gap: var(--auth-space-2); min-width: 0; padding: var(--auth-space-3); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-lg); background: var(--auth-color-surface); }
.au-ai-prompt-row { display: flex; align-items: flex-end; gap: var(--auth-space-2); min-width: 0; }
.au-ai-prompt textarea { flex: 1 1 auto; min-width: 0; min-height: 44px; max-height: 160px; resize: vertical; }
.au-ai-prompt-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-2) var(--auth-space-3); font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); }
.au-ai-prompt-foot .au-spacer { flex: 1 1 auto; }
/* Suggestion : une proposition, avec ses actions. Jamais une action exécutée sans accord. */
.au-ai-suggestion { display: grid; gap: var(--auth-space-3); min-width: 0; padding: var(--auth-space-4); border: 1px solid color-mix(in srgb, var(--auth-color-action) 26%, transparent); border-radius: var(--auth-radius-lg); background: color-mix(in srgb, var(--auth-color-action) 6%, transparent); }
.au-ai-suggestion-head { display: flex; align-items: center; gap: var(--auth-space-2); min-width: 0; }
.au-ai-suggestion-head strong { font: var(--auth-font-label); color: var(--auth-color-ink); }
.au-ai-suggestion p { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.au-ai-actions { display: flex; flex-wrap: wrap; gap: var(--auth-space-2); }
/* Explication : repliée par défaut, le « pourquoi » est à portée sans encombrer. */
.au-ai-explain { min-width: 0; }
.au-ai-explain summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; gap: var(--auth-space-2); font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
.au-ai-explain summary::marker { content: ''; }
.au-ai-explain summary::-webkit-details-marker { display: none; }
.au-ai-explain summary::before { content: ''; width: 7px; height: 7px; flex: none; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform var(--auth-motion-fast) var(--auth-ease-standard); }
.au-ai-explain[open] summary::before { transform: rotate(45deg); }
.au-ai-explain-body { padding: var(--auth-space-2) 0 0 var(--auth-space-5); font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); min-width: 0; }
/* Confiance : une graduation écrite, jamais une couleur seule. */
.au-ai-confidence { display: inline-flex; align-items: center; gap: var(--auth-space-2); min-width: 0; font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
.au-ai-confidence-bars { display: inline-flex; gap: 3px; }
.au-ai-confidence-bars i { width: 18px; height: 5px; border-radius: 3px; background: var(--auth-color-line-strong); }
.au-ai-confidence-bars i.is-on { background: var(--auth-color-info); }
.au-ai-confidence[data-level='high'] .au-ai-confidence-bars i.is-on { background: var(--auth-color-success); }
.au-ai-confidence[data-level='low'] .au-ai-confidence-bars i.is-on { background: var(--auth-color-warning); }
/* Sources : ce qui a servi à la réponse, consultable. */
.au-ai-sources { display: flex; flex-wrap: wrap; gap: var(--auth-space-2); min-width: 0; margin: 0; padding: 0; list-style: none; }
.au-ai-source { display: inline-flex; align-items: center; gap: var(--auth-space-2); min-width: 0; max-width: 100%; padding: 3px 10px; border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-pill); background: var(--auth-color-surface-raised); font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); text-decoration: none; }
.au-ai-source > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* État d'outil : ce que l'IA est en train de faire, dit en clair. */
.au-ai-tool { display: flex; align-items: center; gap: var(--auth-space-2); min-width: 0; font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
.au-ai-tool svg { flex: none; width: var(--auth-icon-sm); height: var(--auth-icon-sm); }
.au-ai-tool[data-state='running'] { color: var(--auth-color-info); }
.au-ai-tool[data-state='done'] { color: var(--auth-color-success); }
.au-ai-tool[data-state='error'] { color: var(--auth-color-danger); }
/* Flux : pensée, écriture, fini, appel d'outil, erreur — une seule ligne d'état, jamais un faux « réfléchit ». */
.au-ai-stream { display: grid; gap: var(--auth-space-3); min-width: 0; padding: var(--auth-space-4); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-lg); background: var(--auth-color-surface); }
.au-ai-stream-body { min-width: 0; overflow-wrap: anywhere; }
.au-ai-stream-state { display: flex; align-items: center; gap: var(--auth-space-2); font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); }
.au-ai-stream[data-state='streaming'] .au-ai-stream-state { color: var(--auth-color-info); }
.au-ai-stream[data-state='error'] .au-ai-stream-state { color: var(--auth-color-danger); }
/* Curseur d'écriture : clignote lentement, immobile en mouvement réduit. */
.au-ai-caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: text-bottom; background: var(--auth-color-action); animation: au-breathe var(--auth-loop-caret) ease-in-out infinite; }
/* Aperçu d'action (§56) : ce qui va se passer, puis la confirmation, puis l'exécution. */
.au-ai-preview { display: grid; gap: var(--auth-space-3); min-width: 0; padding: var(--auth-space-4); border: 1px solid var(--auth-color-warning); border-radius: var(--auth-radius-lg); background: var(--auth-color-warning-soft); }
.au-ai-preview h3 { margin: 0; font: var(--auth-font-heading-sm); }
.au-ai-preview ul { margin: 0; padding-left: var(--auth-space-5); font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
/* Sur un fond teinté (avertissement, accent, sélection), l'encre tertiaire passe sous 4,5:1 : secondaire. */
.au-ai-preview .au-caption { color: var(--auth-color-ink-secondary); }

/* ── 14. Fichiers, images, utilisateurs (P2-016) ─────────────────────────── */
.au-file-card { display: flex; align-items: center; gap: var(--auth-space-3); min-width: 0; padding: var(--auth-space-3); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-md); background: var(--auth-color-surface); }
.au-file-card > svg { flex: none; width: var(--auth-icon-lg); height: var(--auth-icon-lg); color: var(--auth-color-ink-tertiary); }
.au-file-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
.au-file-name { font: var(--auth-font-label); color: var(--auth-color-ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-file-meta { font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); min-width: 0; }
.au-file-side { flex: none; display: flex; align-items: center; gap: var(--auth-space-2); }
/* Zone de dépôt : le glisser est un confort, le bouton reste la voie principale. */
.au-dropzone { display: grid; justify-items: center; gap: var(--auth-space-2); min-width: 0; padding: var(--auth-space-8) var(--auth-space-4); border: 2px dashed var(--auth-color-line-strong); border-radius: var(--auth-radius-lg); background: var(--auth-color-surface); text-align: center; }
.au-dropzone.is-over { border-color: var(--auth-color-action); background: color-mix(in srgb, var(--auth-color-action) 7%, transparent); }
.au-dropzone svg { width: var(--auth-icon-lg); height: var(--auth-icon-lg); color: var(--auth-color-ink-tertiary); }
/* File d'envoi : un nom, une progression, un état — jamais un pourcentage sans libellé. */
.au-upload-queue { display: grid; gap: var(--auth-space-2); min-width: 0; }
.au-upload-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--auth-space-2) var(--auth-space-3); min-width: 0; }
.au-upload-item .au-progress { grid-column: 1 / -1; height: 6px; }
.au-upload-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--auth-font-label); }
/* Grille d'images, galerie, visionneuse, avant/après. */
.au-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: var(--auth-space-3); min-width: 0; }
.au-image-thumb { position: relative; display: block; padding: 0; border: 0; border-radius: var(--auth-radius-md); overflow: hidden; background: var(--auth-color-neutral-soft); cursor: zoom-in; aspect-ratio: 4 / 3; }
.au-image-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.au-image-thumb figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 8px; background: linear-gradient(180deg, transparent, rgb(0 0 0 / 0.55)); color: #fff; font: var(--auth-font-caption); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-lightbox { padding: 0; border: 0; background: transparent; max-width: min(1100px, calc(100% - 32px)); max-height: calc(100svh - 32px); }
.au-lightbox::backdrop { background: rgb(10 12 12 / 0.78); }
.au-lightbox img { max-width: 100%; max-height: calc(100svh - 96px); border-radius: var(--auth-radius-md); display: block; margin: 0 auto; }
.au-lightbox figcaption { padding: var(--auth-space-3); color: var(--auth-color-ink); text-align: center; font: var(--auth-font-caption); }
/* Avant / après : deux images côte à côte, chacune légendée — le curseur glissant est trompeur au doigt. */
.au-before-after { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--auth-space-3); min-width: 0; }
.au-before-after figure { margin: 0; min-width: 0; }
.au-before-after img { width: 100%; height: auto; border-radius: var(--auth-radius-md); display: block; }
.au-before-after figcaption { padding-top: var(--auth-space-2); font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
@media (max-width: 560px) { .au-before-after { grid-template-columns: minmax(0, 1fr); } }
/* Une barre d'actions ne comprime jamais un libellé de bouton : les boutons gardent leur largeur et
   la barre passe à la ligne (détecteur, 02/10 : « Envoyer » débordait de 12 px dans la barre de prompt). */
.au-ai-prompt-row > .au-btn, .au-ai-actions > .au-btn, .au-page-actions > .au-btn, .au-toolbar-actions > .au-btn,
.au-alert-actions > .au-btn, .au-form-foot > .au-btn, .au-card-foot > .au-btn, .au-sheet-foot > .au-btn,
.au-table-bar > .au-btn, .au-file-side > .au-btn, .au-kanban-head > .au-btn { flex: none; }
/* Sélecteur d'utilisateur : la recherche donne une liste, la valeur choisie devient une puce. */
.au-user-picker { display: grid; gap: var(--auth-space-2); min-width: 0; }
.au-user-option { display: flex; align-items: center; gap: var(--auth-space-3); min-width: 0; min-height: 44px; padding: 0 var(--auth-space-3); border-radius: var(--auth-radius-sm); cursor: pointer; }
.au-user-option:hover, .au-user-option[aria-selected='true'] { background: color-mix(in srgb, var(--auth-color-ink) 7%, transparent); }
.au-user-option .au-truncate { flex: 1 1 auto; }
.au-user-option .au-caption { color: var(--auth-color-ink-secondary); } /* sur la ligne sélectionnée, le tertiaire passe sous 4,5:1 (axe, 02/10) */

/* ── 15. Menu « Colonnes » du tableau (P2-020) ─────────────────────────────
   Un `<details>` natif : clavier et lecteurs d'écran sans script de menu, et la
   page reste le point de fermeture. */
.au-colmenu { position: relative; }
.au-colmenu > summary { list-style: none; cursor: pointer; }
.au-colmenu > summary::-webkit-details-marker { display: none; }
.au-colmenu > .au-popover { display: none; top: calc(100% + 6px); left: auto; right: 0; min-width: 220px; max-width: min(320px, calc(100vw - 24px)); max-height: 320px; overflow-y: auto; }
.au-colmenu[open] > .au-popover { display: block; }
.au-colmenu-item { display: flex; align-items: center; gap: var(--auth-space-2); min-height: 40px; padding: 0 var(--auth-space-2); border-radius: var(--auth-radius-sm); font: var(--auth-font-body); font-size: 0.875rem; cursor: pointer; }
.au-colmenu-item:hover { background: color-mix(in srgb, var(--auth-color-ink) 6%, transparent); }
@media (pointer: coarse), (max-width: 760px) { .au-colmenu-item { min-height: 44px; } }

/* ═══════════════════════════════════════════════════════════════════════
   REFONTE CRM — 05/10/2026 (validé par Daniel). Prototypes : authentysens-crm, branche agent/crm-ux-strong/ux-v1,
   docs/design/prototypes/. Tout est additif, sauf G8 qui change l'allure des champs partout (décision de Daniel).
   ═══════════════════════════════════════════════════════════════════════ */

/* G8 — Champs v2 : une surface douce au lieu d'un cadre, 40 px à la souris (44 au doigt), libellé collé.
   « Les barres de saisie sont trop longues, pas design, dans toutes les apps » (Daniel, 05/10). */
:root { --au-champ-h: 40px; }
@media (pointer: coarse) { :root { --au-champ-h: 44px; } }
.au-input, .au-select, .au-textarea {
  height: var(--au-champ-h); padding: 0 12px; border-radius: 10px; border-color: color-mix(in srgb, var(--auth-color-ink) 10%, transparent); box-shadow: none;
  background-color: color-mix(in srgb, var(--auth-color-ink) 4%, var(--auth-color-surface-raised)); /* liseré fin : lisible même sur le fond vivant */
  transition: background-color var(--auth-motion-fast) var(--auth-ease-standard), border-color var(--auth-motion-fast) var(--auth-ease-standard), box-shadow var(--auth-motion-fast) var(--auth-ease-standard);
}
.au-select { padding-right: 36px; }
.au-textarea { height: auto; min-height: 72px; padding: 10px 12px; }
.au-input:hover, .au-select:hover, .au-textarea:hover { border-color: color-mix(in srgb, var(--auth-color-ink) 18%, transparent); background-color: color-mix(in srgb, var(--auth-color-ink) 6%, var(--auth-color-surface-raised)); }
.au-input:focus, .au-select:focus, .au-textarea:focus { background-color: var(--auth-color-surface-raised); border-color: var(--auth-color-action); box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-color-action) 16%, transparent); }
.au-input[aria-invalid='true'], .au-select[aria-invalid='true'], .au-textarea[aria-invalid='true'] { border-color: var(--auth-color-danger); background-color: color-mix(in srgb, var(--auth-color-danger) 5%, var(--auth-color-surface)); }
.au-field { gap: 6px; align-content: start; } /* étiré par sa grille, le champ éloignait le libellé de sa zone (relevé sur le banc, 05/10) */
.au-field > label, .au-field > .au-field-label { font: 500 0.8125rem/1.2 var(--auth-font-family); }
/* La largeur dit ce qu'on attend. Rangée : .au-champs ; taille : data-taille sur .au-field. Sans data-taille : inchangé. */
.au-champs { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: start; min-width: 0; }
.au-champs > .au-field { flex: 1 1 16rem; max-width: 100%; }
.au-field[data-taille='xs'] { flex: 0 0 7.5rem; max-width: 7.5rem; }   /* code postal, nombre */
.au-field[data-taille='s'] { flex: 0 1 11.5rem; max-width: 11.5rem; } /* téléphone, date, montant */
.au-field[data-taille='m'] { flex: 1 1 13rem; max-width: 18rem; }     /* prénom, nom, ville */
.au-field[data-taille='l'] { flex: 1 1 18rem; max-width: 26rem; }     /* courriel, société */
.au-field[data-taille='xl'] { flex: 1 1 100%; max-width: 40rem; }     /* adresse, texte */
@media (max-width: 560px) { .au-field[data-taille='m'], .au-field[data-taille='l'] { flex-basis: 100%; max-width: 100%; } }
.au-form { max-width: 44rem; }

/* G2 — Prochaine action sous l'en-tête d'entité (toujours rendue ; « aucune » est une anomalie, pas un état neutre). */
.au-entity-alerts { display: grid; gap: var(--auth-space-2); }
.au-entity-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--auth-space-3) var(--auth-space-4); padding: var(--auth-space-3) var(--auth-space-4); background: var(--auth-color-surface-raised); border: 1px solid var(--auth-color-line); border-left: 4px solid var(--auth-color-action); border-radius: var(--auth-radius-md); box-shadow: var(--auth-shadow-1); min-width: 0; }
.au-entity-next[data-etat='retard'] { border-left-color: var(--auth-color-danger); }
.au-entity-next[data-etat='aujourdhui'] { border-left-color: var(--auth-color-warning); }
.au-entity-next[data-etat='aucune'] { border-left-color: var(--auth-color-warning); background: var(--auth-color-warning-soft); }
.au-entity-next-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 280px; }
.au-entity-next-main strong { font: var(--auth-font-heading-sm); overflow-wrap: anywhere; }
.au-entity-next .au-actions { display: flex; gap: var(--auth-space-2); flex: none; }
@media (max-width: 760px) { .au-entity-next .au-actions, .au-entity-next .au-btn { width: 100%; } }

/* G6 — Liens d'entité : les objets voisins à un clic (client, bien, demande, RDV, devis, chantier, documents).
   Un voisin attendu mais absent : .is-attendu (pointillé) avec son explication en title. */
.au-entity-links { display: flex; flex-wrap: wrap; gap: var(--auth-space-2); min-width: 0; }
.au-entity-links > * { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--auth-space-3); border: 1px solid var(--auth-color-line-strong); border-radius: var(--auth-radius-pill); background: var(--auth-color-surface-raised); font: var(--auth-font-label); color: var(--auth-color-ink); text-decoration: none; white-space: nowrap; }
.au-entity-links > a:hover { border-color: var(--auth-color-action); }
.au-entity-links small { color: var(--auth-color-ink-tertiary); font-weight: 400; }
.au-entity-links > .is-attendu { border-style: dashed; background: transparent; color: var(--auth-color-ink-tertiary); cursor: help; }
@media (max-width: 700px) { .au-entity-links { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; } .au-entity-links > * { flex: none; } }
@media (pointer: coarse) { .au-entity-links > * { height: 44px; } }

/* G3 — État d'un tiroir (complet, n manques, à contrôler, bloqué) en fin de ligne. Au téléphone, un en-tête qui porte
   un état passe en grille : titre et état sur la première ligne, chiffre dessous — jamais coupé (règle du 30/09). */
.au-tiroir-etat { flex: none; margin-left: auto; white-space: nowrap; }
@media (max-width: 700px) {
  .au-tiroir-tete:has(.au-tiroir-etat) { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: var(--auth-space-3); row-gap: 0; }
  .au-tiroir-tete:has(.au-tiroir-etat)::before { grid-row: 1; }
  .au-tiroir-tete:has(.au-tiroir-etat) .au-tiroir-titre { grid-column: 2; -webkit-line-clamp: 1; }
  .au-tiroir-tete:has(.au-tiroir-etat) .au-tiroir-etat { grid-column: 3; grid-row: 1; margin: 0; }
  .au-tiroir-tete:has(.au-tiroir-etat) .au-tiroir-chiffre { grid-column: 2 / 4; grid-row: 2; text-align: left; white-space: normal; font-size: 0.8125rem; }
}

/* G4 — Information manquante : badge en pointillé ; les champs manquants en title. */
.au-badge--manque { background: transparent; color: var(--auth-color-warning); border: 1px dashed var(--auth-color-warning); }

/* G7 — Choix à conséquence : une carte = une issue (radio natif). Ex. : la suite d'un compte rendu. */
.au-choice-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: var(--auth-space-2); }
.au-choice-card { position: relative; display: grid; gap: 2px; padding: var(--auth-space-3) var(--auth-space-4); border: 1px solid var(--auth-color-line-strong); border-radius: var(--auth-radius-md); background: var(--auth-color-surface-raised); cursor: pointer; transition: border-color var(--auth-motion-fast) var(--auth-ease-standard), box-shadow var(--auth-motion-fast) var(--auth-ease-standard); }
.au-choice-card input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; } /* la vraie case couvre la carte, invisible : un clic, un toucher ou un test l’atteignent directement (relevé par TECH, 05/10) */
.au-choice-card strong { font: var(--auth-font-label); color: var(--auth-color-ink); }
.au-choice-card span { font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); }
.au-choice-card:has(input:checked) { border-color: var(--auth-color-action); box-shadow: 0 0 0 1px var(--auth-color-action); }
.au-choice-card:has(input:focus-visible) { outline: 2px solid var(--auth-color-focus); outline-offset: 2px; }
.au-choice-card[data-suggere]::after { content: 'Suggéré'; position: absolute; top: 8px; right: 10px; font: var(--auth-font-caption); color: var(--auth-color-action); }

/* Barre d'action collante (téléphone) et toast : le toast se pose au-dessus de la barre au lieu de cacher son bouton. */
@media (max-width: 760px) { .au-actions--sticky { position: sticky; bottom: 64px; z-index: var(--auth-z-sticky); padding: var(--auth-space-3); background: var(--auth-color-surface); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-md); box-shadow: var(--auth-shadow-1); } .au-actions--sticky .au-btn { width: 100%; } }
body:has(.au-actions--sticky, [data-barre-collante]) .au-toaster { bottom: calc(max(24px, env(safe-area-inset-bottom)) + var(--au-barre-h, 96px)); }

/* Tiroir latéral plein écran au téléphone : le <dialog> du navigateur gardait une marge (max-width) et le décalait. */
@media (max-width: 760px) { .au-drawer, .au-drawer--wide { width: 100%; max-width: 100%; } }

/* G1 — Conditions : un groupe révélé apparaît en douceur (initConditions dans interactions.js) */
[data-quand]:not([hidden]) { animation: au-quand var(--auth-motion-normal) var(--auth-ease-enter) both; }
@keyframes au-quand { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* G5 — Grille horaire (vues jour et semaine d'un agenda). L'application place chaque évènement (top, height, left, width en ligne)
   et pose --au-c, la couleur de son type — assez foncée pour un texte clair (4,5:1 contre --auth-color-on-action). Réponse de l'invité, comme dans les agendas partagés : plein = accepté,
   --attente = contour, --provisoire = hachures, --refuse = barré. --passe = estompé. */
.au-timegrid { --au-slot: 48px; display: grid; grid-template-columns: 56px repeat(var(--au-jours, 7), minmax(0, 1fr)); min-width: 0; }
.au-timegrid-head { position: sticky; top: 0; z-index: var(--auth-z-sticky); display: grid; justify-items: center; gap: 4px; padding: var(--auth-space-2) 0 var(--auth-space-3); background: var(--auth-color-surface); border-bottom: 1px solid var(--auth-color-line); }
.au-timegrid-head small { font: 500 0.6875rem/1 var(--auth-font-family); letter-spacing: 0.06em; text-transform: uppercase; color: var(--auth-color-ink-secondary); }
.au-timegrid-head b { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font: 400 1.5rem/1 var(--auth-font-family); }
.au-timegrid-head.is-today small { color: var(--auth-color-action); }
.au-timegrid-head.is-today b { background: var(--auth-color-action); color: var(--auth-color-on-action); }
.au-timegrid-hours { display: grid; grid-auto-rows: var(--au-slot); }
.au-timegrid-hours span { padding-right: 8px; transform: translateY(-0.5em); text-align: right; font: 0.6875rem/1 var(--auth-font-family); color: var(--auth-color-ink-tertiary); font-variant-numeric: tabular-nums; }
.au-timegrid-col { position: relative; min-width: 0; border-left: 1px solid var(--auth-color-line); background: repeating-linear-gradient(to bottom, var(--auth-color-line) 0, var(--auth-color-line) 1px, transparent 1px, transparent var(--au-slot)); touch-action: pan-y; }
.au-timegrid-now { position: absolute; left: -6px; right: 0; z-index: var(--auth-z-raised); height: 2px; background: var(--auth-color-danger); pointer-events: none; }
.au-timegrid-now::before { content: ''; position: absolute; left: 0; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--auth-color-danger); }
.au-timegrid-event { position: absolute; z-index: 1; display: block; padding: 3px 8px; overflow: hidden; border: 1px solid var(--auth-color-surface); border-radius: 6px; background: var(--au-c, var(--auth-color-action)); color: var(--auth-color-on-action); font: 500 0.75rem/1.3 var(--auth-font-family); text-align: left; cursor: pointer; transition: box-shadow var(--auth-motion-fast) var(--auth-ease-standard); }
.au-timegrid-event:hover { box-shadow: var(--auth-shadow-2); }
.au-timegrid-event:focus-visible { outline: 2px solid var(--auth-color-focus); outline-offset: 1px; }
.au-timegrid-event b, .au-timegrid-event span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.au-timegrid-event b { font-weight: 600; }
.au-timegrid-event--attente { background: var(--auth-color-surface); color: var(--au-c, var(--auth-color-action)); border-color: var(--au-c, var(--auth-color-action)); }
.au-timegrid-event--provisoire { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--au-c, var(--auth-color-action)) 22%, var(--auth-color-surface)) 0 6px, var(--auth-color-surface) 6px 12px); color: var(--au-c, var(--auth-color-action)); border-color: var(--au-c, var(--auth-color-action)); }
.au-timegrid-event--refuse { background: var(--auth-color-surface); color: var(--au-c, var(--auth-color-action)); border-color: var(--au-c, var(--auth-color-action)); text-decoration: line-through; opacity: 0.7; }
.au-timegrid-event--passe { background: color-mix(in srgb, var(--au-c, var(--auth-color-action)) 18%, var(--auth-color-surface)); color: var(--auth-color-ink); border-color: color-mix(in srgb, var(--au-c, var(--auth-color-action)) 40%, transparent); } /* estompé par la couleur, jamais par la transparence du texte (contraste) */
.au-timegrid-event.is-dragging { z-index: var(--auth-z-raised); box-shadow: var(--auth-shadow-2); cursor: grabbing; opacity: 0.92; }
.au-timegrid-event-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; }
.au-timegrid-flag { position: absolute; top: 3px; right: 4px; padding: 0 5px; border-radius: 8px; background: var(--auth-color-surface-raised); color: var(--auth-color-danger); font: 700 0.625rem/1.5 var(--auth-font-family); }
@media (prefers-reduced-motion: reduce) { [data-quand]:not([hidden]) { animation: none; } }

/* ═══ Lot A de la vague 2 (06/10) — besoins communs remontés par les 7 apps (orchestration/missions/cui/CORE_UI_VAGUE2.md) ═══ */
/* Lien-texte et bouton-lien : un geste discret, sans cadre ; au doigt, la cible reste de 44 px. */
/* OBSOLÈTE (FIN-1, 11/10) : `.au-link` et `.au-btn--link` — une action n'est jamais un texte souligné (porte R01).
   Employer `.au-btn--ghost` (discret). Gardés le temps de la diffusion ; avertissement console en développement (composants.js). */
.au-link, .au-btn--link { display: inline; padding: 0; border: 0; background: none; color: var(--auth-color-action); font: inherit; font-weight: 500; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; cursor: pointer; }
.au-link:hover, .au-btn--link:hover { text-decoration-color: currentColor; }
.au-btn.au-btn--link { --h: auto; min-height: 0; box-shadow: none; }
@media (pointer: coarse) { .au-link, .au-btn--link { display: inline-flex; align-items: center; min-height: 44px; } }
/* Puce et segment en lien : la navigation (filtres, statuts) s'écrit en <a aria-current>, pas seulement en <button aria-pressed>. */
a.au-chip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.au-chip[aria-current='page'], .au-chip[aria-current='true'], .au-chip[aria-checked='true'] { background: var(--auth-color-action); border-color: var(--auth-color-action); color: var(--auth-color-on-action); }
.au-segmented a.au-btn { text-decoration: none; }
.au-segmented .au-btn[aria-current='page'], .au-segmented .au-btn[aria-current='true'], .au-segmented .au-btn[aria-checked='true'] { background: var(--auth-color-surface-raised); color: var(--auth-color-ink); box-shadow: var(--auth-shadow-1); }
@media (max-width: 700px) { .au-segmented { overflow-x: auto; scrollbar-width: none; } .au-segmented .au-btn { flex: none; } }
/* Badge sans point : une étiquette de catégorie n'a pas de pastille d'état. */
.au-badge--plain::before { content: none; }
/* Onglets et étapes qui passent à la ligne au lieu de défiler. */
.au-tabs--wrap { flex-wrap: wrap; overflow: visible; }
.au-steps--wrap { flex-wrap: wrap; overflow: visible; }
/* Cases, radios, interrupteurs désactivés. */
.au-check input:disabled, .au-radio input:disabled, .au-switch input:disabled { opacity: 0.45; cursor: not-allowed; }
.au-check:has(input:disabled), .au-radio:has(input:disabled), .au-switch:has(input:disabled) { color: var(--auth-color-ink-tertiary); cursor: not-allowed; }
/* Pendant l'écriture, un second clic ne part pas. */
.au-btn[aria-busy='true'], .au-icon-btn[aria-busy='true'] { pointer-events: none; }
/* Rangée d'actions partout (pas seulement dans un état vide) ; deux champs hors formulaire ne se touchent pas. */
.au-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-3); }
.au-form-libre > .au-field + .au-field, .au-form-libre > .au-field + .au-champs, .au-form-libre > .au-champs + .au-field { margin-top: var(--auth-space-4); } /* volontaire : une règle globale décalait les champs posés en ligne ou en grille */
/* Alerte à message seul, au corps du texte ; alerte posée dans le flux. */
.au-alert--corps .au-alert-body, .au-alert--corps .au-alert-body p { font: var(--auth-font-body); color: var(--auth-color-ink); }
.au-alert--flux { margin-block: 0 var(--auth-space-4); } /* volontaire : alerte posée dans le flux du texte */
/* Destructif discret : la suppression rare, proposée sans crier. */
.au-btn--danger-quiet { background: transparent; color: var(--auth-color-danger); border-color: color-mix(in srgb, var(--auth-color-danger) 45%, transparent); box-shadow: none; }
.au-btn--danger-quiet:hover:not(:disabled) { background: var(--auth-color-danger-soft); }
/* Une carte dans une grille peut rétrécir ; un graphique sous le titre d'une carte respire. */
.au-card { min-width: 0; }
.au-card > h2 + .au-chart, .au-card > h3 + .au-chart, .au-card-head + .au-chart { margin-top: var(--auth-space-3); }
.au-timegrid-event:has(.au-timegrid-flag) > b { margin-right: 30px; } /* l'étiquette « CR » ne chevauche plus le titre dans une colonne étroite (qa-visuelle, 390 px, 06/10) */

/* ═══════════════════════════════════════════════════════════════════════
   KIT « TABLEAU DE BORD » (07/10/2026) — dashboard.js : trajectoire, barres groupées, barres à repère, composition face
   à un objectif, carte indicateur, signaux, devis à risque, rangée de filtres, cellules de classement.
   Série courante = l'accent de l'application ; comparaison N-1 = --auth-chart-compare ; bande = accent allégé.
   ═══════════════════════════════════════════════════════════════════════ */
.au-kit-chart { --auth-chart-band: color-mix(in srgb, var(--auth-accent) 14%, transparent); position: relative; overflow: visible; }
.au-kit-key { display: inline-flex; align-items: center; gap: var(--auth-space-2); }
.au-kit-key::before { content: ''; flex: none; width: 18px; height: 0; border-top: 3px solid var(--auth-accent); border-radius: 2px; }
.au-kit-key--forecast::before { border-top-style: dotted; }
.au-kit-key--goal::before { border-top: 2px dashed var(--auth-color-ink-secondary); }
.au-kit-key--compare::before { border-top-color: var(--auth-chart-compare); }
.au-kit-key--marker::before { width: 3px; height: 12px; border: 0; background: var(--auth-chart-compare); }
.au-kit-key--planned::before { width: 12px; height: 12px; border: 1px dashed var(--auth-accent); background: var(--auth-chart-band); border-radius: 3px; }
.au-kit-chart .au-chart-legend { margin-top: var(--auth-space-3); }
.au-kit-swatch { display: inline-block; flex: none; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; background: var(--auth-accent); }
.au-kit-swatch--goal { background: var(--auth-color-ink-secondary); }
.au-kit-swatch--compare { background: var(--auth-chart-compare); }
.au-kit-swatch--stack1 { background: var(--auth-accent); }
.au-kit-swatch--stack2 { background: color-mix(in srgb, var(--auth-accent) 62%, var(--auth-color-surface)); }
.au-kit-swatch--stack3 { background: color-mix(in srgb, var(--auth-accent) 30%, var(--auth-color-surface)); }
.au-kit-swatch--stack4 { background: color-mix(in srgb, var(--auth-accent) 14%, var(--auth-color-surface)); }
.au-kit-tip { min-width: 190px; max-width: 280px; }
.au-kit-tip-row { display: flex; justify-content: space-between; align-items: center; gap: var(--auth-space-4); font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
.au-kit-tip-row--sub { padding-left: 14px; color: var(--auth-color-ink-tertiary); }
.au-kit-tip-value { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--auth-color-ink); white-space: nowrap; }
.au-kit-tip-value.au-trend--up { color: var(--auth-color-success); }
.au-kit-tip-value.au-trend--down { color: var(--auth-color-danger); }
.au-kit-tip-value::before { content: none !important; }

/* trajectoire */
.au-traj-today { stroke: var(--auth-color-line-strong); stroke-width: 1; }
.au-traj-goal { fill: none; stroke: var(--auth-color-ink-secondary); stroke-width: 1.5; stroke-dasharray: 6 5; }
.au-traj-band { fill: var(--auth-chart-band); stroke: none; }
.au-traj-compare { fill: none; stroke: var(--auth-chart-compare); stroke-width: 2; stroke-linecap: round; }
.au-traj-area { fill: color-mix(in srgb, var(--auth-accent) 10%, transparent); stroke: none; }
.au-traj-actual { fill: none; stroke: var(--auth-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.au-traj-forecast { fill: none; stroke: var(--auth-accent); stroke-width: 2.5; stroke-dasharray: 2 6; stroke-linecap: round; }
.au-traj-dot { fill: var(--auth-color-surface-raised); stroke: var(--auth-accent); stroke-width: 2.5; }
.au-traj-end-value { font: 600 12px var(--auth-font-family); font-variant-numeric: tabular-nums; fill: var(--auth-color-ink); }
.au-traj-end--current text:nth-child(2) { fill: var(--auth-accent); }
.au-traj-cross { stroke: var(--auth-color-ink-tertiary); stroke-width: 1; opacity: 0; pointer-events: none; }
.au-traj-mark { fill: var(--auth-accent); stroke: var(--auth-color-surface-raised); stroke-width: 2; opacity: 0; pointer-events: none; }
.au-traj-hit, .au-kbar-hit { fill: transparent; cursor: crosshair; touch-action: pan-y; }

/* barres groupées */
.au-kbar--compare { fill: var(--auth-chart-compare); }
.au-kbar--current { fill: var(--auth-accent); }
.au-kbar--planned { fill: var(--auth-chart-band); stroke: var(--auth-accent); stroke-width: 1; stroke-dasharray: 3 3; }
.au-kbar-hit:hover { fill: color-mix(in srgb, var(--auth-accent) 6%, transparent); }

/* barres horizontales à repère */
.au-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--auth-space-4); }
.au-bars-row { display: grid; gap: var(--auth-space-2); min-width: 0; }
.au-bars-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--auth-space-3); flex-wrap: wrap; font: var(--auth-font-body); font-size: 0.8125rem; }
.au-bars-name { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.au-bars-figures { display: inline-flex; gap: var(--auth-space-3); align-items: baseline; font-variant-numeric: tabular-nums; }
.au-bars-value { font-weight: 500; }
.au-bars-delta { font-size: 0.75rem; }
.au-bars-delta::before { content: none !important; }
.au-bars-track { position: relative; height: 10px; border-radius: 5px; background: var(--auth-color-line); }
.au-bars-fill { position: absolute; inset: 0 auto 0 0; width: var(--au-part, 0%); border-radius: 5px; background: var(--auth-accent); }
.au-bars-marker { position: absolute; top: -3px; bottom: -3px; left: var(--au-part, 0%); width: 3px; margin-left: -1px; border-radius: 1px; background: var(--auth-chart-compare); }

/* composition face à un objectif */
.au-stackgoal { position: relative; display: flex; gap: 2px; height: 40px; }
.au-stackgoal-seg { flex: none; width: var(--au-part, 0%); height: 100%; background: var(--auth-accent); }
.au-stackgoal-seg:first-child { border-radius: 8px 0 0 8px; }
.au-stackgoal-seg:nth-last-child(2) { border-radius: 0 8px 8px 0; }
.au-stackgoal-seg:only-of-type { border-radius: 8px; }
.au-stackgoal-seg--2 { background: color-mix(in srgb, var(--auth-accent) 62%, var(--auth-color-surface)); }
.au-stackgoal-seg--3 { background: color-mix(in srgb, var(--auth-accent) 30%, var(--auth-color-surface)); }
.au-stackgoal-seg--4 { background: color-mix(in srgb, var(--auth-accent) 14%, var(--auth-color-surface)); }
.au-stackgoal-goal { position: absolute; top: -6px; bottom: -6px; left: var(--au-part, 0%); width: 0; border-left: 2px dashed var(--auth-color-ink); }
.au-stackgoal-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--auth-space-3); margin: var(--auth-space-4) 0 0; }
.au-stackgoal-cell { display: grid; gap: 2px; min-width: 0; }
.au-stackgoal-cell dt { margin: 0; }
.au-stackgoal-figure { margin: 0; font: 500 1.05rem/1.3 var(--auth-font-family); font-variant-numeric: tabular-nums; }
.au-stackgoal-figure::before { content: none !important; }

/* carte indicateur */
.au-kpi { gap: 6px; }
.au-kpi--hero { background: var(--auth-color-surface-raised); border-color: var(--auth-color-line-strong); }
.au-kpi-delta { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; font: 500 0.75rem/1.35 var(--auth-font-family); font-variant-numeric: tabular-nums; }
.au-kpi-delta-figure::before { content: none !important; }
.au-kpi-delta-figure.au-trend--up { color: var(--auth-color-success); }
.au-kpi-delta-figure.au-trend--down { color: var(--auth-color-danger); }
.au-kpi-delta-figure.au-trend--flat { color: var(--auth-color-ink-tertiary); }
.au-kpi-delta-caption, .au-kpi-hint { color: var(--auth-color-ink-tertiary); font-weight: 400; }
.au-kpi-hint { font: var(--auth-font-caption); }
.au-kpi-spark { height: 30px; min-width: 0; }
.au-kpi-spark .au-spark { display: block; width: 100%; height: 30px; }
.au-kpi-gauge { display: grid; gap: 4px; }
.au-kpi-gauge-track { position: relative; height: 6px; border-radius: 3px; background: var(--auth-color-line); }
.au-kpi-gauge-fill { position: absolute; inset: 0 auto 0 0; width: var(--au-part, 0%); border-radius: 3px; background: var(--auth-accent); }
.au-kpi-gauge-mark { position: absolute; top: -3px; bottom: -3px; left: var(--au-part, 0%); width: 2px; background: var(--auth-color-ink); }
.au-kpi-gauge-label { font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); }

/* signaux */
.au-signals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--auth-space-3); }
.au-signal { display: grid; gap: 6px; align-content: start; min-width: 0; padding: var(--auth-space-4); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-md); background: var(--auth-color-surface-raised); }
.au-signal-nature { justify-self: start; }
.au-signal-title { margin: 0; font: 600 0.9375rem/1.3 var(--auth-font-family); }
.au-signal-text { margin: 0; color: var(--auth-color-ink-secondary); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.au-signal-action { font-size: 0.8125rem; font-weight: 500; justify-self: start; background: none; border: 0; padding: 0; cursor: pointer; color: var(--auth-accent); }
.au-badge--info { background: var(--auth-color-info-soft); color: var(--auth-color-info); }

/* devis à risque */
.au-risk-list { list-style: none; margin: 0; padding: 0; }
.au-risk { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: var(--auth-space-4); align-items: center; padding: var(--auth-space-3) 0; border-bottom: 1px solid var(--auth-color-line); }
.au-risk:last-child { border-bottom: 0; }
.au-risk-title { font-weight: 500; overflow-wrap: anywhere; }
.au-risk-reason { font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
.au-risk-side { display: grid; justify-items: end; gap: 2px; text-align: right; }
.au-risk-amount { font-weight: 500; font-variant-numeric: tabular-nums; }
.au-risk-action { font-size: 0.75rem; font-weight: 500; color: var(--auth-accent); background: none; border: 0; padding: 0; cursor: pointer; }
@media (max-width: 640px) {
  .au-risk { grid-template-columns: 40px minmax(0, 1fr); }
  .au-risk-side { grid-column: 2; justify-items: start; text-align: left; display: flex; gap: var(--auth-space-3); align-items: baseline; flex-wrap: wrap; }
}

/* pastille de score, jauge et mini-courbe en cellule */
.au-score { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border-radius: 6px; font: 600 0.8125rem/1 var(--auth-font-family); font-variant-numeric: tabular-nums; background: var(--auth-color-neutral-soft); color: var(--auth-color-neutral); }
.au-score[data-tone='success'] { background: var(--auth-color-success-soft); color: var(--auth-color-success); }
.au-score[data-tone='warning'] { background: var(--auth-color-warning-soft); color: var(--auth-color-warning); }
.au-score[data-tone='danger'] { background: var(--auth-color-danger-soft); color: var(--auth-color-danger); }
.au-gauge-cell { display: inline-flex; align-items: center; gap: var(--auth-space-2); font-variant-numeric: tabular-nums; }
.au-gauge-cell-track { position: relative; display: inline-block; width: 70px; height: 6px; border-radius: 3px; background: var(--auth-color-line); overflow: hidden; }
.au-gauge-cell-fill { position: absolute; inset: 0 auto 0 0; width: var(--au-part, 0%); border-radius: 3px; background: var(--auth-color-neutral); }
.au-gauge-cell[data-tone='success'] .au-gauge-cell-fill { background: var(--auth-color-success); }
.au-gauge-cell[data-tone='warning'] .au-gauge-cell-fill { background: var(--auth-color-warning); }
.au-gauge-cell[data-tone='danger'] .au-gauge-cell-fill { background: var(--auth-color-danger); }
.au-spark-cell { display: inline-block; width: 96px; height: 24px; vertical-align: middle; }
.au-spark-cell .au-spark { display: block; width: 96px; height: 24px; }

/* rangée de filtres */
.au-filterbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: var(--auth-z-sticky); display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-3); padding: var(--auth-space-3) 0; background: color-mix(in srgb, var(--auth-color-bg) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); min-width: 0; }
.au-filterbar .au-segmented { overflow-x: auto; scrollbar-width: none; }
.au-filterbar .au-segmented .au-btn { white-space: nowrap; }
.au-filterbar-select { width: auto; max-width: 100%; min-height: 44px; }
.au-filterbar-fresh { margin-left: auto; }
@media (max-width: 640px) { .au-filterbar-fresh { margin-left: 0; width: 100%; } .au-filterbar-select { flex: 1 1 140px; } }

/* entonnoir : étape dégradée, repère N-1 */
.au-funnel-drop--degraded { color: var(--auth-color-danger); font-weight: 500; white-space: normal; }
.au-funnel-flag { font-size: 0.7em; }
.au-funnel-lane { position: relative; min-width: 0; }
.au-funnel-ref { position: absolute; top: -3px; bottom: -3px; left: var(--au-part, 0%); width: 3px; margin-left: -1px; background: var(--auth-chart-compare); border-radius: 1px; }
.au-chart-data-scroll { overflow-x: auto; max-width: 100%; }
.au-chart-data-scroll table { min-width: max-content; border-collapse: collapse; }
.au-chart-data-scroll th, .au-chart-data-scroll td { padding: 4px 10px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.au-chart-data-scroll th:first-child, .au-chart-data-scroll caption { text-align: left; }
.au-kpi-spark .au-spark-end, .au-spark-cell .au-spark-end { display: none; } /* l'étirement non uniforme du tracé en ferait une ellipse */
@media (max-width: 640px) { .au-filterbar .au-segmented { flex: 1 1 100%; } .au-filterbar .au-segmented .au-btn { padding-inline: var(--auth-space-3); } }

/* ═══ Adoption définitive (07/10/2026) — les pièces que les applications refaisaient (INVENTAIRE.md) ═══ */

/* Fiche clé-valeur `.au-dl` (origine : DEVIS `.entete-devis dl` / `.pied-gauche dl`, TECH `.status-help dl`).
   <dl class="au-dl"><div class="au-dl-row"><dt>Client</dt><dd>Mme Dupont</dd></div></dl>
   Défaut : libellé au-dessus de la valeur, en colonnes qui se replient ; `--inline` : « Libellé : valeur » sur une ligne ;
   `--aligned` : deux colonnes séparées par un filet (fiche de lecture). */
.au-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: var(--auth-space-3) var(--auth-space-5); margin: 0; min-width: 0; }
.au-dl-row { display: grid; gap: 2px; min-width: 0; align-content: start; }
.au-dl dt { margin: 0; font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
.au-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.au-dl--inline { grid-template-columns: minmax(0, 1fr); gap: var(--auth-space-1); }
.au-dl--inline .au-dl-row { display: block; }
.au-dl--inline dt, .au-dl--inline dd { display: inline; }
.au-dl--inline dt { font: 600 0.9375rem/1.5 var(--auth-font-family); color: var(--auth-color-ink); }
.au-dl--inline dt::after { content: ' :'; }
.au-dl--inline dd { margin-inline-start: 0.35em; }
.au-dl--aligned { grid-template-columns: minmax(0, 1fr); gap: 0; container-type: inline-size; }
.au-dl--aligned .au-dl-row { grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr); gap: var(--auth-space-4); padding-block: var(--auth-space-2); border-bottom: 1px solid var(--auth-color-line); align-items: baseline; }
.au-dl--aligned .au-dl-row:last-child { border-bottom: 0; }
@container (max-width: 24rem) { .au-dl--aligned .au-dl-row { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
/* Totaux `.au-totals` (origine : DEVIS `.totaux`) : libellé à gauche, montant à droite en chiffres tabulaires, ligne finale forte. */
.au-totals { display: grid; margin: 0; min-width: 0; }
.au-totals-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--auth-space-4); padding-block: var(--auth-space-2); border-bottom: 1px solid var(--auth-color-line); }
.au-totals-row dt, .au-totals-row dd { margin: 0; }
.au-totals-row dd { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.au-totals-row--sub dt, .au-totals-row--sub dd { color: var(--auth-color-ink-secondary); }
.au-totals-row--final { border-bottom: 0; border-top: 2px solid var(--auth-color-ink); font: 600 1.0625rem/1.4 var(--auth-font-family); }

/* Tableau éditable de lignes hiérarchiques `.au-lines` (origine : DEVIS `.lignes-editeur` / `.lignes-devis`). À poser avec `.au-table`.
   Genre de ligne sur le <tr> : `au-line--titre` (+ `data-niveau="1…6"`), `au-line--commentaire`, `au-line--option`, `au-line--saut`
   (saut de page), `is-active` (ligne en cours d'édition), `is-found` (trouvée par la recherche). Le sens ne tient jamais à la seule couleur :
   l'option porte `.au-line-flag` + un texte, le saut de page est écrit. */
.au-lines td { vertical-align: top; }
.au-lines .au-cell--num, .au-lines td:last-child { white-space: nowrap; }
.au-lines--select tbody tr { cursor: pointer; }
.au-line--titre td { font-weight: 600; background: var(--auth-color-info-soft); }
.au-line--titre[data-niveau='1'] td { background: color-mix(in srgb, var(--auth-color-action) 16%, transparent); }
.au-line--commentaire td { color: var(--auth-color-ink-secondary); background: var(--auth-color-neutral-soft); white-space: pre-line; }
.au-line--option td { background: var(--auth-color-danger-soft); }
.au-line--saut td { text-align: center; color: var(--auth-color-ink-secondary); border-top: 2px solid var(--auth-color-line-strong); font: var(--auth-font-caption); }
.au-lines tr.is-found td { background: var(--auth-color-warning-soft); }
.au-lines tr.is-active td { box-shadow: inset 0 2px 0 var(--auth-color-action), inset 0 -2px 0 var(--auth-color-action); }
.au-lines tr.is-active td:first-child { box-shadow: inset 2px 2px 0 var(--auth-color-action), inset 0 -2px 0 var(--auth-color-action); }
.au-lines tr.is-active td:last-child { box-shadow: inset -2px 2px 0 var(--auth-color-action), inset 0 -2px 0 var(--auth-color-action); }
.au-line-label { min-width: 0; }
.au-lines tr[data-niveau='2'] .au-line-label { padding-inline-start: var(--auth-space-4); }
.au-lines tr[data-niveau='3'] .au-line-label { padding-inline-start: var(--auth-space-6); }
.au-lines tr[data-niveau='4'] .au-line-label, .au-lines tr[data-niveau='5'] .au-line-label, .au-lines tr[data-niveau='6'] .au-line-label { padding-inline-start: var(--auth-space-8); }
.au-line-desc { display: block; max-width: 60ch; font-weight: 400; color: var(--auth-color-ink-secondary); white-space: pre-line; }
.au-line-note { color: var(--auth-color-ink-secondary); font: var(--auth-font-caption); }
.au-line-flag { display: inline-flex; align-items: center; gap: var(--auth-space-1); margin-inline-end: var(--auth-space-1); color: var(--auth-color-danger); font: var(--auth-font-caption); font-weight: 600; vertical-align: middle; }
.au-line-flag svg { width: 14px; height: 14px; }
.au-lines-add { display: flex; flex-wrap: wrap; gap: var(--auth-space-2) var(--auth-space-3); align-items: center; padding-top: var(--auth-space-3); }

/* Aperçu de document `.au-preview` (origine : DEVIS `.apercu-pdf`, MARKETING `.atelier-apercu`, TECH `.cad-preview`, CRM `.import-apercu`).
   Cadre + barre d'outils + scène. La scène reçoit un <iframe>/<object> du PDF, ou une `.au-preview-page` (feuille). La feuille reste blanche
   dans les deux thèmes : un document se juge tel qu'il sera imprimé. États : `aria-busy="true"` (squelette), `data-state="empty|error"` (un `.au-empty`
   ou `.au-error` dans la scène). Zoom : `--au-zoom` sur `.au-preview` (1 = largeur de la page). */
.au-preview { --au-zoom: 1; display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; max-width: 100%; border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-md); overflow: hidden; background: var(--auth-color-surface); }
.au-preview-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-2) var(--auth-space-3); padding: var(--auth-space-2) var(--auth-space-3); border-bottom: 1px solid var(--auth-color-line); background: var(--auth-color-surface-raised); }
.au-preview-title { margin: 0; font: 600 0.875rem/1.3 var(--auth-font-family); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 8rem; }
.au-preview-stage { position: relative; min-width: 0; min-height: 14rem; overflow: auto; padding: var(--auth-space-4); background: color-mix(in srgb, var(--auth-color-ink) 6%, var(--auth-color-bg)); }
.au-preview-stage:has(> iframe, > object, > embed) { height: min(70vh, 56rem); }
.au-preview-stage > iframe, .au-preview-stage > object, .au-preview-stage > embed { display: block; width: 100%; height: 100%; min-height: 20rem; border: 0; background: #fff; }
.au-preview-page { box-sizing: border-box; width: calc(min(100%, 48rem) * var(--au-zoom)); max-width: none; min-height: 18rem; margin-inline: auto; padding: clamp(1rem, 4%, 2.5rem); background: #fff; color: #1a1a1a; border-radius: var(--auth-radius-xs); box-shadow: 0 1px 3px rgb(0 0 0 / 0.18), 0 8px 24px rgb(0 0 0 / 0.12); overflow-wrap: anywhere; }
.au-preview[aria-busy='true'] .au-preview-stage > * { visibility: hidden; }
.au-preview[aria-busy='true'] .au-preview-stage::after { content: ''; position: absolute; inset: var(--auth-space-4); border-radius: var(--auth-radius-sm); background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--auth-color-ink) 8%, transparent) 50%, transparent 70%) var(--auth-color-line); background-size: 200% 100%; animation: au-preview-shimmer var(--auth-loop-progress) linear infinite; }
@keyframes au-preview-shimmer { to { background-position: -200% 0; } }
.au-preview[data-state='empty'] .au-preview-stage, .au-preview[data-state='error'] .au-preview-stage { display: grid; place-items: center; }
@media (max-width: 700px) { .au-preview-stage:has(> iframe, > object, > embed) { height: min(60vh, 40rem); } .au-preview-stage { padding: var(--auth-space-2); } .au-preview-page { width: calc(100% * var(--au-zoom)); } }

/* Formulaire guidé en étapes `.au-wizard` (origine : TECH `.cad-guided-*`, avec les étapes `.au-steps`). Les panneaux sont
   des `[data-etape]` ; `initWizard` (interactions.js) montre un seul panneau, pose `aria-current="step"` et garde Précédent / Suivant. */
.au-wizard { display: grid; gap: var(--auth-space-4); min-width: 0; max-width: 56rem; }
.au-wizard-panel { display: grid; gap: var(--auth-space-4); min-width: 0; padding: var(--auth-space-5); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-md); background: var(--auth-color-surface-raised); }
.au-wizard-panel > header h3 { margin: 0 0 var(--auth-space-1); font: var(--auth-font-heading-sm); }
.au-wizard-panel > header p { margin: 0; color: var(--auth-color-ink-secondary); max-width: 65ch; }
.au-wizard-actions { display: flex; flex-wrap: wrap; gap: var(--auth-space-2) var(--auth-space-3); align-items: center; justify-content: space-between; }
.au-wizard-count { font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
@media (max-width: 480px) { .au-wizard-panel { padding: var(--auth-space-4); } }

/* Impression (origine : DEVIS, TECH, CRM, MARKETING — quatre copies de « cacher le menu »). `.au-no-print` / `.au-print-only` / `.au-print-break`. */
.au-print-only { display: none; }
@media print {
  @page { margin: 14mm; }
  body.au { background: #fff; color: #000; }
  .au-ambient, .au-sidebar, .au-topbar, .au-bottom-nav, .au-toaster, .au-fab, .au-no-print, .au-actions, .au-filterbar, .au-table-bar, .au-pagination { display: none !important; }
  .au-shell { display: block; }
  .au-content { padding: 0; max-width: none; }
  .au-print-only { display: block; }
  .au-card, .au-preview-page { box-shadow: none; background: #fff; border-color: #999; break-inside: avoid; }
  .au-table thead { display: table-header-group; }
  .au-table tr, .au-line--titre { break-inside: avoid; }
  .au-print-break { break-before: page; }
  a.au-link[href]::after { content: ' (' attr(href) ')'; font-size: 0.8em; }
}

/* Carte thermique `.au-heat` (renderHeatmap, dashboard.js) : mois × année. Origine de la demande : PERFORMANCE. Échelle séquentielle à 5 pas
   (`--auth-chart-seq-*`, une teinte, validée au validateur dataviz). Le chiffre est écrit dans la case dès que la place le permet. */
.au-heat { display: grid; gap: 3px; min-width: 0; grid-template-columns: minmax(2.5rem, max-content) repeat(var(--au-cols, 12), minmax(0, 1fr)); }
.au-heat-colhead, .au-heat-rowhead { font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); align-self: center; text-align: center; min-width: 0; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.au-heat-rowhead { text-align: start; padding-inline-end: var(--auth-space-2); font-variant-numeric: tabular-nums; }
.au-heat-cell { display: grid; place-items: center; min-width: 0; min-height: 30px; padding: 2px; border-radius: var(--auth-radius-xs); font: 500 0.6875rem/1 var(--auth-font-family); font-variant-numeric: tabular-nums; background: var(--auth-color-line); color: var(--auth-color-ink-tertiary); overflow: hidden; }
.au-heat-cell[data-seq='1'] { background: var(--auth-chart-seq-1); color: var(--auth-color-ink); }
.au-heat-cell[data-seq='2'] { background: var(--auth-chart-seq-2); color: var(--auth-color-ink); }
.au-heat-cell[data-seq='3'] { background: var(--auth-chart-seq-3); color: #fff; }
.au-heat-cell[data-seq='4'] { background: var(--auth-chart-seq-4); color: #fff; }
.au-heat-cell[data-seq='5'] { background: var(--auth-chart-seq-5); color: #fff; }
.au-heat-cell[data-empty] { background: transparent; border: 1px dashed var(--auth-color-line-strong); }
.au-heat-cell:focus-visible { outline: 2px solid var(--auth-color-focus); outline-offset: 1px; position: relative; z-index: 1; }
:root[data-theme='dark'] .au-heat-cell[data-seq='1'], :root[data-theme='dark'] .au-heat-cell[data-seq='2'] { color: #fff; }
:root[data-theme='dark'] .au-heat-cell[data-seq='3'], :root[data-theme='dark'] .au-heat-cell[data-seq='4'], :root[data-theme='dark'] .au-heat-cell[data-seq='5'] { color: #0f1112; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .au-heat-cell[data-seq='1'], :root:not([data-theme='light']) .au-heat-cell[data-seq='2'] { color: #fff; }
  :root:not([data-theme='light']) .au-heat-cell[data-seq='3'], :root:not([data-theme='light']) .au-heat-cell[data-seq='4'], :root:not([data-theme='light']) .au-heat-cell[data-seq='5'] { color: #0f1112; }
}
.au-heat-scale { display: flex; align-items: center; gap: var(--auth-space-2); margin-top: var(--auth-space-3); font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
.au-heat-scale i { width: 22px; height: 12px; border-radius: 2px; background: var(--c); }
@media (max-width: 520px) { .au-heat { gap: 2px; } .au-heat-cell { min-height: 26px; font-size: 0; } .au-heat-colhead { font-size: 0.625rem; } }

/* Défauts du kit « tableau de bord » relevés par PERFORMANCE et le Hub (07/10) */
/* Texte de .au-signal coupé en bas de carte : la carte ne borne jamais sa hauteur, le texte a son interligne et sa respiration. */
.au-signal { overflow: visible; height: auto; max-height: none; padding-bottom: var(--auth-space-4); }
.au-signal-title, .au-signal-text { overflow-wrap: anywhere; }
.au-signal-text { line-height: 1.45; padding-bottom: 2px; }
/* Indicateurs orphelins (4 + 2 à 1440) : `.au-kpis` répartit sans reste — 2→2, 3→3, 4→4, 5→5, 6→3 × 2, 7 et 8→4. */
.au-kpis { display: grid; gap: var(--auth-space-3); min-width: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
@media (min-width: 900px) {
  .au-kpis:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .au-kpis:has(> :nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .au-kpis:has(> :nth-child(7)), .au-kpis:has(> :nth-child(8):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Segmenté qui défilait à 390 : il passe à la ligne, chaque choix reste visible. */
@media (max-width: 700px) {
  .au-segmented { flex-wrap: wrap; overflow: visible; border-radius: var(--auth-radius-md); }
  .au-segmented .au-btn { flex: 1 1 auto; }
}
/* Colonne « Tendance » rognée à 1440 : la cellule garde la largeur de sa courbe. */
.au-table td:has(> .au-spark-cell), .au-table th.au-cell--spark { min-width: 7.5rem; }
.au-spark-cell { max-width: none; flex: none; }

/* ═══ Core UI v3 (07/10) — pièces « soin COMMISSION » ═══════════════════════════════════════════════════════
   Table de décision : docs/qualite/CORE_UI_V3.md. Origine du code : v3.js (en-tête) et REFERENCE_COMMISSION.md. */
.au-eyebrow { font: var(--auth-font-eyebrow); letter-spacing: var(--auth-tracking-eyebrow); text-transform: uppercase; color: var(--auth-color-ink-secondary); }
.au-page-sub { margin: 4px 0 0; color: var(--auth-color-ink-secondary); font: var(--auth-font-body); }
.au-page-head--v3 { align-items: flex-start; margin-bottom: var(--auth-space-5); }
.au-page-head--v3 > .au-btn { flex: none; align-self: center; }
@media (max-width: 760px) { .au-page-head--v3 > .au-btn { width: 100%; } .au-h1 { font-size: 1.5rem; } }

/* Pastille de statut : icône + mot, toujours ; un sens = une couleur. */
.au-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: var(--auth-radius-pill); font: 600 0.75rem/1 var(--auth-font-family); white-space: nowrap; background: var(--auth-tone-neutral-soft); color: var(--auth-tone-neutral); }
.au-pill svg { flex: none; width: 12px; height: 12px; }
.au-pill[data-tone='ok'] { background: var(--auth-tone-ok-soft); color: var(--auth-tone-ok); }
.au-pill[data-tone='due'] { background: var(--auth-tone-due-soft); color: var(--auth-tone-due); }
.au-pill[data-tone='waiting'] { background: var(--auth-tone-waiting-soft); color: var(--auth-tone-waiting); }
.au-pill[data-tone='problem'] { background: var(--auth-tone-problem-soft); color: var(--auth-tone-problem); }

/* Ligne de tableau colorée par statut : barre intérieure de 5 px (COMMISSION `tr.state-*`). */
.au-table tr[data-tone] > td:first-child { box-shadow: inset 5px 0 0 var(--tone-line, transparent); }
.au-table tr[data-tone='ok'] { --tone-line: var(--auth-tone-ok-line); } .au-table tr[data-tone='due'] { --tone-line: var(--auth-tone-due-line); }
.au-table tr[data-tone='waiting'] { --tone-line: var(--auth-tone-waiting-line); } .au-table tr[data-tone='problem'] { --tone-line: var(--auth-tone-problem-line); }
.au-table tr[data-tone='neutral'] { --tone-line: var(--auth-tone-neutral-line); }
.au-table tbody tr { transition: background var(--auth-motion-fast) var(--auth-ease-standard); }
.au-table tbody tr:hover { background: var(--auth-color-fill-hover); }
.au-cell--currency, .au-cell--num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Filtres : dans un tiroir (<details>), jamais en champs dans l'en-tête. */
.au-filter-drawer { position: static; } /* le panneau s'ancre sur la barre d'outils : il ne dépasse jamais du tableau */
.au-filter-drawer > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 1px solid var(--auth-color-line-strong); border-radius: var(--auth-radius-sm); background: var(--auth-color-surface); font: var(--auth-font-label); cursor: pointer; }
.au-filter-drawer > summary::-webkit-details-marker { display: none; }
.au-filter-drawer > summary:focus-visible { outline: 2px solid var(--auth-color-focus); outline-offset: 2px; }
.au-filter-drawer[open] > summary { border-color: var(--auth-color-action); }
.au-filter-drawer .au-filter-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--auth-color-action); color: var(--auth-color-on-action); font: 600 0.6875rem/20px var(--auth-font-family); text-align: center; }
.au-filter-drawer .au-filter-panel { position: absolute; z-index: var(--auth-z-popover); top: calc(100% + 6px); left: 0; display: flex; flex-wrap: wrap; gap: 8px; width: max-content; max-width: min(420px, 100%); padding: 14px; border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-md); background: var(--auth-color-surface); box-shadow: var(--auth-shadow-2); }
.au-filter-drawer .au-filter-panel .au-eyebrow { flex: 1 1 100%; }

/* Actions requises : pastille, titre, détail chiffré, action à droite, compteur, « Voir N autres ». */
.au-actions-list { display: grid; gap: 4px; padding: 20px 22px; }
.au-actions-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--auth-color-line); }
.au-actions-list h2 { margin: 0; font: var(--auth-font-heading-sm); letter-spacing: -0.012em; }
.au-actions-count { min-width: 28px; padding: 3px 10px; border-radius: var(--auth-radius-pill); background: var(--auth-brand-red-soft); color: var(--auth-brand-red-ink); font: 600 0.75rem/1.2 var(--auth-font-family); text-align: center; font-variant-numeric: tabular-nums; }
.au-actions-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.au-action-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px 8px; margin-inline: -8px; border-radius: 12px; transition: background var(--auth-motion-normal) var(--auth-ease-standard); }
.au-action-row:hover { background: var(--auth-color-fill-hover); }
.au-action-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tone-line, var(--auth-tone-neutral-line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone-line, var(--auth-tone-neutral-line)) 16%, transparent); }
.au-action-row[data-tone='ok'] { --tone-line: var(--auth-tone-ok-line); } .au-action-row[data-tone='due'] { --tone-line: var(--auth-tone-due-line); }
.au-action-row[data-tone='waiting'] { --tone-line: var(--auth-tone-waiting-line); } .au-action-row[data-tone='problem'] { --tone-line: var(--auth-tone-problem-line); }
.au-action-text { display: grid; gap: 2px; min-width: 0; }
.au-action-text strong { font: 600 0.8125rem/1.35 var(--auth-font-family); overflow-wrap: anywhere; }
.au-action-text span { font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); overflow-wrap: anywhere; }
.au-action-go { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 6px; border-radius: 8px; font: 600 0.75rem/1 var(--auth-font-family); color: var(--auth-brand-red-ink); white-space: nowrap; }
.au-action-go span { display: inline-block; transition: transform var(--auth-motion-normal) var(--auth-ease-standard); }
.au-action-go:hover span { transform: translateX(3px); }
.au-action-go:focus-visible { outline: 2px solid var(--auth-color-focus); outline-offset: 2px; }
.au-actions-more { all: unset; box-sizing: border-box; cursor: pointer; margin-top: 4px; padding: 12px 0 2px; border-top: 1px solid var(--auth-color-line); font: var(--auth-font-caption); font-weight: 500; color: var(--auth-color-ink-secondary); }
.au-actions-more:hover { color: var(--auth-color-ink); }
.au-actions-more:focus-visible { outline: 2px solid var(--auth-color-focus); outline-offset: 2px; }
@media (max-width: 760px) { .au-action-row { grid-template-columns: auto minmax(0, 1fr); } .au-action-go { grid-column: 2; justify-self: start; min-height: 44px; } .au-actions-list { padding: 16px; } }

/* Barre du haut : accès rapide, Guide, aide, notifications, avatar — emplacements déclarés par l'app (voir CORE_UI_V3.md). */
.au-topbar-quick { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--auth-color-line-strong); border-radius: 11px; background: var(--auth-color-surface); color: var(--auth-color-ink-secondary); font: var(--auth-font-label); cursor: pointer; }
.au-topbar-quick svg { width: 16px; height: 16px; }
.au-topbar-quick kbd { padding: 1px 6px; border-radius: 6px; background: var(--auth-color-fill); font: 500 0.6875rem/1.4 ui-monospace, monospace; }
.au-topbar-quick:hover { color: var(--auth-color-ink); border-color: var(--auth-color-action); }
.au-topbar-quick:focus-visible { outline: 2px solid var(--auth-color-focus); outline-offset: 2px; }
.au-topbar-context { font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.au-notif-count { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--auth-brand-red); color: #fff; font: 600 0.625rem/16px var(--auth-font-family); text-align: center; }
@media (max-width: 760px) { .au-topbar-quick .au-quick-text, .au-topbar-quick kbd, .au-topbar-guide .au-quick-text { display: none; } .au-topbar-quick { width: 44px; height: 44px; justify-content: center; padding: 0; } .au-topbar-context { display: none; } }

/* Fond : dégradé doux + cartes blanches détachées (ombre COMMISSION). Mouvement des pièces v3 coupé sous reduced-motion. */
@media (prefers-reduced-motion: reduce) { .au-kpi, .au-action-row, .au-action-go span, .au-table tbody tr, .au-table th :is(button, a.au-sort)::after { transition: none; } .au-action-go:hover span { transform: none; } }
.au-topbar .au-avatar { background: var(--auth-color-fill); color: var(--auth-color-ink); font-weight: 600; } /* v3 : avatar neutre (COMMISSION) */
.au-topbar-guide svg { width: 16px; height: 16px; flex: none; }
@media (max-width: 760px) {
  .au-topbar-quick, .au-topbar-guide { width: 44px; height: 44px; min-width: 44px; padding: 0; border-radius: 50%; justify-content: center; }
  .au-topbar-quick svg, .au-topbar-guide svg { width: 20px; height: 20px; }
  .au-topbar-quick, .au-topbar-guide { border-color: transparent; background: none; }
  .au-action-row { padding-block: 12px; row-gap: 0; }
}
@media (max-width: 760px) { /* repli en cartes : la barre de statut est sur la carte, pas sur la première cellule (elle recouvrait « Client ») */
  .au-table--cards tr[data-tone] { box-shadow: inset 5px 0 0 var(--tone-line, transparent); }
  .au-table--cards tr[data-tone] > td:first-child { box-shadow: none; }
  .au-table--cards tr[data-tone] > td { padding-left: calc(var(--auth-space-4) + 4px); }
}
/* DEVIS (08/10, T5-COREUI-01) : la page de référence de la coque rend huit applications ; DEVIS n'avait pas d'accent. Vert lierre, sans autre application verte. */

/* ── Coque ERP v4 (L1-A1, 08/10) : modules + pages, barre du haut identique, titre 28 px, largeur commune, mode simple / expert ──
   JS : sidebar.js (`modules`, `module`) et coque-erp.js. Une seule hauteur de barre basse : le contenu réserve exactement cette place. */
:root { --au-bottom-h: calc(60px + env(safe-area-inset-bottom)); --au-content-w: 100%; }
.au-sidebar [data-modules] { display: grid; gap: 2px; }
.au-sidebar [data-modules] .au-nav-link { min-height: 36px; } /* neuf modules + pages du module : tout doit tenir sans défiler à 900 px */
.au-sidebar [data-modules] + [data-menu] { margin-top: var(--auth-space-3); padding-top: var(--auth-space-1); border-top: 1px solid var(--auth-color-line); }
.au-nav-module[aria-current='true'] { color: var(--auth-color-ink); font-weight: 600; background: var(--auth-color-surface-raised); box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 3px 8px rgb(0 0 0 / 0.05); }
.au-nav-module[aria-current='true'] svg { color: var(--auth-color-action); }
/* C3 : un titre de page, une taille (28 px), la même place — quelle que soit la classe que l'application lui a donnée. */
.au-shell :is(.au-content, main) h1 { font: var(--auth-font-heading-lg); letter-spacing: -0.021em; margin: 0; max-width: none; }
/* C5 : une largeur de contenu pour toutes les applications. 10/10 (Daniel) : la page prend TOUTE la largeur que la coque lui laisse — menu replié, elle s'élargit.
   Seuls les textes longs gardent une mesure de lecture (.au-prose, ≈ 75 caractères) et les formulaires leur largeur maximale (.au-form, 44 rem). */
.au-shell main { width: min(var(--au-content-w), 100%); }
/* Barre du haut : Rechercher · + Créer · Demander à l'IA · Notifications · Compte, dans cet ordre, au même endroit. */
.au-topbar-actions[data-barre='erp'] { gap: var(--auth-space-2); }
.au-topbar-btn { display: inline-flex; align-items: center; gap: var(--auth-space-2); white-space: nowrap; }
.au-topbar-btn svg { flex: none; }
.au-topbar-search { height: 36px; min-width: 40px; padding: 0 var(--auth-space-3); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-sm); background: color-mix(in srgb, var(--auth-color-surface) 70%, transparent); color: var(--auth-color-ink-secondary); font: var(--auth-font-label); cursor: pointer; }
.au-topbar-search:hover { color: var(--auth-color-ink); border-color: var(--auth-color-line-strong, var(--auth-color-line)); }
.au-topbar-kbd { margin-left: var(--auth-space-3); padding: 1px 6px; border: 1px solid var(--auth-color-line); border-radius: 4px; font: 500 0.6875rem/1.4 var(--auth-font-family); color: var(--auth-color-ink-tertiary); }
.au-topbar-search { width: clamp(150px, 16vw, 250px); justify-content: flex-start; }
.au-topbar-search .au-topbar-kbd { margin-left: auto; }
.au-topbar-bell { position: relative; }
.au-topbar-pastille { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--auth-accent); color: var(--auth-color-on-action); font: 600 0.625rem/16px var(--auth-font-family); text-align: center; }
.au-topbar-pastille[hidden] { display: none; }
.au-topbar-profil { display: inline-flex; align-items: center; position: relative; }
.au-topbar-avatar { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--auth-color-fill); color: var(--auth-color-ink); font: 600 0.8125rem/1 var(--auth-font-family); cursor: pointer; }
.au-topbar-sep { height: 1px; margin: var(--auth-space-1) 0; background: var(--auth-color-line); }
.au-topbar [data-creer-menu] { min-width: 240px; }
@media (max-width: 1100px) { .au-topbar-search { width: 44px; padding: 0; justify-content: center; } .au-topbar-search .au-topbar-label, .au-topbar-kbd { display: none; } .au-topbar-btn[data-act='ia'] .au-topbar-label { display: none; } }
@media (max-width: 760px) {
  .au-topbar { gap: var(--auth-space-2); padding-inline: var(--auth-space-3); }
  .au-topbar-actions[data-barre='erp'] { gap: 2px; margin-left: auto; }
  .au-topbar-btn { min-width: 44px; min-height: 44px; justify-content: center; padding-inline: 0; }
  .au-topbar-btn .au-topbar-label { display: none; }
  .au-topbar-search { border: 0; background: none; width: 44px; height: 44px; }
  .au-topbar-avatar { width: 40px; height: 40px; }
  .au-bottom-nav a > span:not(.au-nav-count) { font-size: inherit; }
}
/* Mode simple (défaut) : ce qui est marqué `.au-expert` n'est montré qu'en mode expert (V06). `.au-simple` : l'inverse. */
[data-mode='simple'] .au-expert { display: none !important; }
[data-mode='expert'] .au-simple { display: none !important; }
.au-confirm { max-width: min(420px, calc(100vw - 24px)); }
.au-confirm-actions { display: flex; flex-wrap: wrap; gap: var(--auth-space-2); justify-content: flex-end; margin-top: var(--auth-space-4); }

/* ── Core UI v4 (L1-A2) : gabarits, au-tip, au-ia, au-vide, au-etapes, règles communes ───────────────────────────────── */
/* Gabarit : titre à gauche, UNE action principale à droite (même place, même style) ; filtres en puces ; corps ; panneau IA. */
.au-gabarit { display: grid; gap: var(--auth-space-4); min-width: 0; }
.au-gabarit-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--auth-space-4); flex-wrap: wrap; }
.au-gabarit-titre { display: grid; gap: var(--auth-space-1); min-width: 0; flex: 1 1 280px; }
.au-gabarit-titre h1 { margin: 0; }
.au-gabarit-action { display: flex; gap: var(--auth-space-2); align-items: center; flex: none; min-height: var(--auth-control-md, 40px); }
.au-gabarit-action:empty { display: none; }
.au-gabarit-filtres { display: flex; gap: var(--auth-space-2); flex-wrap: wrap; }
.au-gabarit-zone { display: grid; gap: var(--auth-space-4); min-width: 0; }
.au-gabarit-corps { min-width: 0; display: grid; gap: var(--auth-space-4); align-content: start; }
.au-gabarit-ia { min-width: 0; display: grid; gap: var(--auth-space-3); align-content: start; }
@media (min-width: 1100px) { .au-gabarit[data-ia='droite'] .au-gabarit-zone { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .au-gabarit[data-ia='droite'] .au-gabarit-ia { position: sticky; top: calc(var(--au-topbar-h, 56px) + var(--auth-space-4)); } }
@media (max-width: 760px) { .au-gabarit-action { width: 100%; } .au-gabarit-action .au-btn { flex: 1 1 auto; } }
.au-gabarit[data-gabarit='assistant'] .au-gabarit-corps { max-width: 56rem; }
.au-gabarit[data-gabarit='parametres'] .au-gabarit-corps { max-width: 56rem; }
.au-lecture { display: inline-flex; align-items: center; height: 28px; padding: 0 var(--auth-space-3); border-radius: var(--auth-radius-pill); background: var(--auth-color-neutral-soft); color: var(--auth-color-ink-secondary); font: var(--auth-font-label); }

/* au-tip : une seule bulle pour toute la page ; texte court ; clavier (focus), souris (survol), toucher (appui long). */
.au-tip { position: absolute; z-index: calc(var(--auth-z-popover) + 10); max-width: min(260px, calc(100vw - 16px)); padding: 6px 10px; border-radius: var(--auth-radius-xs); background: var(--auth-color-action); color: var(--auth-color-on-action); font: var(--auth-font-caption); line-height: 1.35; pointer-events: none; animation: au-fade var(--auth-motion-fast) both; }
.au-tip[hidden] { display: none; }

/* au-vide : une phrase, le bouton qui fait l'action. */
.au-vide { display: grid; justify-items: start; gap: var(--auth-space-3); max-width: 460px; padding: var(--auth-space-8) 0; }
.au-vide-titre { font: var(--auth-font-heading-md); margin: 0; }
.au-vide-phrase { margin: 0; color: var(--auth-color-ink-secondary); max-width: 60ch; }
.au-vide-icone { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--auth-color-neutral-soft); color: var(--auth-color-ink-tertiary); }
.au-vide--centre { justify-items: center; text-align: center; margin-inline: auto; }

/* au-ia : bandeau « Proposé par l'IA — à valider ». La couleur de l'accent dit « IA » ; le texte le dit aussi. */
.au-ia { display: grid; gap: var(--auth-space-3); padding: var(--auth-space-4); border: 1px solid color-mix(in srgb, var(--auth-accent) 35%, var(--auth-color-line)); border-left-width: 4px; border-radius: var(--auth-radius-md); background: color-mix(in srgb, var(--auth-accent) 6%, var(--auth-color-surface-raised)); min-width: 0; }
.au-ia-etiquette { display: flex; align-items: center; gap: var(--auth-space-2); margin: 0; font: 600 0.8125rem/1.2 var(--auth-font-family); color: var(--auth-accent); }
.au-ia-texte { overflow-wrap: anywhere; }
.au-ia-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-2); }
.au-ia-pourquoi { min-height: 32px; padding: 0 var(--auth-space-2); background: none; border: 0; color: var(--auth-color-ink-secondary); font: var(--auth-font-label); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; margin-left: auto; }
.au-ia-raison { margin: 0; padding: var(--auth-space-2) var(--auth-space-3); border-radius: var(--auth-radius-sm); background: var(--auth-color-surface); color: var(--auth-color-ink-secondary); font: var(--auth-font-caption); }
.au-ia[data-ia='accepte'] { border-color: var(--auth-color-success); } .au-ia[data-ia='refuse'] { opacity: .7; }
.au-ia[data-ia='lecture'] { border-left-width: 1px; }
@media (max-width: 760px) { .au-ia-actions .au-btn { flex: 1 1 auto; } .au-ia-pourquoi { min-height: 44px; margin-left: 0; } }

/* au-etapes : « Étape 2 sur 4 » + barre + liste (la liste se replie au téléphone : seul le compte reste). */
.au-etapes { display: grid; gap: var(--auth-space-2); min-width: 0; }
.au-etapes-compte { margin: 0; font: var(--auth-font-label); color: var(--auth-color-ink-secondary); }
.au-etapes-compte strong { color: var(--auth-color-ink); }
.au-etapes-barre { height: 4px; border-radius: 4px; background: var(--auth-color-line); overflow: hidden; }
.au-etapes-barre i { display: block; height: 100%; background: var(--auth-accent); transition: width var(--auth-motion-normal) var(--auth-ease-standard); }
@media (max-width: 760px) { .au-etapes-liste { display: none; } }

/* Règles communes : Total ancré à droite (chiffres tabulaires), liste uniforme (puces, Σ, colonnes au choix, export). */
.au-table .au-col-total, .au-col-total, td.au-total, th.au-total { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.au-sigma { color: var(--auth-color-ink-tertiary); font-weight: 600; }
.au-table tfoot td { font-weight: 600; border-top: 2px solid var(--auth-color-line-strong); }
.au-liste { display: grid; gap: var(--auth-space-3); min-width: 0; }
.au-liste-barre { display: flex; flex-wrap: wrap; gap: var(--auth-space-2); align-items: center; }
.au-liste-puces { display: flex; flex-wrap: wrap; gap: var(--auth-space-2); flex: 1 1 auto; }
.au-liste-colonnes { position: relative; }
.au-liste-colonnes summary { list-style: none; cursor: pointer; }
.au-liste-colonnes summary::-webkit-details-marker { display: none; }
.au-liste-choix { position: absolute; z-index: var(--auth-z-popover); right: 0; top: calc(100% + 4px); display: grid; gap: var(--auth-space-1); min-width: 200px; padding: var(--auth-space-3); background: var(--auth-color-surface-overlay); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-md); box-shadow: var(--auth-shadow-2); }
.au-liste-choix label { display: flex; gap: var(--auth-space-2); align-items: center; min-height: 32px; }
.au-liste-defile { overflow-x: auto; min-width: 0; }
@media (max-width: 760px) { .au-liste-choix { right: auto; left: 0; max-width: calc(100vw - 2 * var(--auth-space-4)); } .au-liste-choix label { min-height: 44px; } .au-liste-puces .au-chip { flex: none; } }
.au-ia-accepter { border-color: var(--auth-accent); color: var(--auth-accent); font-weight: 600; } /* « Accepter » n’est pas l’action principale de la page : un seul bouton plein par écran (P1) */

/* Premiers pas (L3) : grande carte primaire d'une société neuve, barre de progression, terme de métier avec infobulle. */
.au-pas { display: grid; gap: var(--auth-space-3); margin-block-end: var(--auth-space-6); padding: var(--auth-space-4); border-inline-start: 4px solid var(--auth-accent); border-radius: var(--auth-radius-md); background: var(--auth-color-surface); }
.au-pas h2, .au-pas p { margin: 0; }
.au-pas-barre { height: 8px; border-radius: 4px; background: var(--auth-color-line); overflow: hidden; }
.au-pas-barre i { display: block; height: 100%; background: var(--auth-accent); }
.au-pas-actions, .au-pas-exemple { display: flex; flex-wrap: wrap; gap: var(--auth-space-2); align-items: center; }
.au-pas-liste > summary { display: flex; align-items: center; min-height: 24px; } /* cible ≥ 24 px (HUB-UX p9) */
.au-pas-liste ol { margin: var(--auth-space-2) 0 0; padding-inline-start: 1.4rem; }
.au-pas-liste li[data-fait] { color: var(--auth-color-ink-secondary); text-decoration: line-through; }
.au-pas--ferme { padding-block: var(--auth-space-2); }
/* OBSOLÈTE (FIN-1, 11/10) : `.au-terme` — jamais d'information sous un pointillé (porte R28) ; écrire le mot clair ou poser
   une infobulle `data-au-tip` sur un bouton. Gardé le temps de la diffusion ; avertissement console en développement. */
.au-terme { border-bottom: 1px dotted currentColor; cursor: help; }

/* Tableau commun rendu côté serveur (CRM, 10/10) : même structure que createDataTable, en-têtes triables par LIEN
   (`<th aria-sort><a class="au-sort" href="?tri=…">`), colonnes masquées par `hidden` (y compris en cartes). */
.au-table [hidden] { display: none !important; }
.au-table th a.au-sort { text-decoration: none; }
/* Menu « Colonnes » placé en tête de la barre (tableau rendu côté serveur) : ouvert vers la droite, pas hors de l'écran à gauche (relevé 10/10, test « Colonnes » à 1440). */
.au-colmenu:first-child > .au-popover { left: 0; right: auto; }
/* Menu « Colonnes » à 390 px : ancré à la barre d'outils, plus au bouton — ancré à droite d'un bouton placé à gauche, il sortait de l'écran (relevé 10/10). */
@media (max-width: 760px) {
  .au-filterbar:has(> .au-colmenu) { position: relative; }
  .au-filterbar > .au-colmenu { position: static; }
  .au-filterbar > .au-colmenu > .au-popover { left: 0; right: auto; top: calc(100% + 6px); }
}

/* ── au-widget (W2, 10/10) : la tuile d'accueil — un chiffre ou une liste de 5 lignes, qui mène à une action ─────────── */
.au-widget { position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: var(--auth-space-2); align-content: start; min-width: 0; padding: var(--auth-space-5); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-lg); background: var(--auth-color-surface); container-type: inline-size; overflow-wrap: anywhere; }
.au-widget-titre { margin: 0; font: var(--auth-font-label); color: var(--auth-color-ink-secondary); min-width: 0; }
.au-widget-lien { color: inherit; text-decoration: none; min-height: var(--auth-control-md); display: block; }
.au-widget-lien::after { content: ''; position: absolute; inset: 0; border-radius: inherit; } /* toute la carte est la cible */
.au-widget:has(.au-widget-lien):hover { border-color: var(--auth-color-action); }
.au-widget-lien:focus-visible { outline: none; }
.au-widget-lien:focus-visible::after { outline: 2px solid var(--auth-color-focus, var(--auth-color-action)); outline-offset: 2px; }
.au-widget-corps { display: grid; gap: var(--auth-space-2); align-content: start; min-width: 0; }
.au-widget-valeur { font: 500 1.75rem/1.1 var(--auth-font-family); font-size: clamp(1.125rem, 11cqi, 1.75rem); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; min-width: 0; }
.au-widget-valeur.is-empty { color: var(--auth-color-ink-tertiary); }
.au-widget-detail, .au-widget-message { font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); margin: 0; }
.au-widget-message { font: var(--auth-font-body); }
.au-widget-lignes { list-style: none; margin: 0; padding: 0; display: grid; }
.au-widget-ligne { display: flex; justify-content: space-between; align-items: center; gap: var(--auth-space-3); min-height: var(--auth-control-md); padding: var(--auth-space-1) 0; color: inherit; text-decoration: none; border-top: 1px solid var(--auth-color-line); }
.au-widget-lignes li:first-child .au-widget-ligne { border-top: 0; }
a.au-widget-ligne:hover .au-widget-ligne-libelle { text-decoration: underline; }
.au-widget-ligne-libelle { flex: 1 1 auto; min-width: 0; }
.au-widget-ligne-detail { flex: 0 1 auto; min-width: 11ch; max-width: 55%; overflow-wrap: break-word; text-align: right; font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
.au-widget-plus { font: var(--auth-font-label); color: var(--auth-color-action); min-height: var(--auth-control-md); display: inline-flex; align-items: center; }
.au-widget-action { justify-self: start; min-height: var(--auth-control-md); position: relative; z-index: 1; }
.au-widget-fraicheur { font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); }
.au-widget-fraicheur[data-fraicheur='perimee'] { color: var(--auth-color-on-warning, var(--auth-color-ink-secondary)); }
.au-widget-sq-valeur { display: block; height: 1.75rem; width: 55%; }
.au-widget-sq-ligne { display: block; height: 0.875rem; width: 80%; margin-top: var(--auth-space-2); }
.au-widget-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--auth-space-3); }
.au-widget-corps, .au-widget-lignes { grid-template-columns: minmax(0, 1fr); }
.au-widget-lignes > li, .au-widget-ligne { min-width: 0; }
/* Grille de widgets (W3) : plusieurs widgets côte à côte, une colonne à 390 px ; « Plus » replie ce qui dépasse le plafond d'une page. */
.au-widget-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--auth-space-4, 16px); margin: 0 0 var(--auth-space-6, 24px); }
/* au-widget v1.1 (ACC-1) : évolution, mini-courbe, ligne de liste sur deux niveaux, carte « graphique », état « bientôt ». Rien ne sort de l'encart. */
.au-widget-evolution { font: var(--auth-font-label); color: var(--auth-color-ink-secondary); }
.au-widget-periode { font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); }
.au-widget-mini { display: block; max-width: 100%; height: 28px; } .au-widget-mini .au-spark { width: 100%; max-width: 160px; height: 28px; }
.au-widget-ligne--deux { align-items: center; padding-block: var(--auth-space-2); min-height: 52px; }
.au-widget-ligne-texte { display: grid; flex: 1 1 auto; min-width: 0; }
.au-widget-ligne-qui { font-weight: 600; display: block; }
.au-widget-ligne-sous { font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); display: block; }
.au-widget-badge { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px var(--auth-space-2); border-radius: 999px; background: var(--auth-color-surface-raised); color: var(--auth-color-ink-secondary); font: var(--auth-font-caption); }
.au-widget-corps--graphique { min-width: 0; } .au-widget-graphique { min-width: 0; }
.au-widget[data-etat='bientot'] { border-style: dashed; background: transparent; }
.au-widget-bientot { display: inline-block; padding: 1px var(--auth-space-2); border-radius: 999px; border: 1px solid var(--auth-color-line); font: var(--auth-font-label); margin-right: var(--auth-space-2); }
.au-widget[data-compact] { padding: var(--auth-space-4); }
.au-plus > summary { cursor: pointer; min-height: var(--auth-control-md); display: flex; align-items: center; color: var(--auth-color-ink-secondary); }
/* Pleine largeur (10/10) : tableaux, listes, grilles, pipeline, agenda et tableaux de bord suivent la largeur disponible ; un texte long (aide, article, description) garde sa mesure. */
.au-prose, .au-texte-long { max-width: 75ch; }
.au-shell main > *, .au-shell .au-content > * { min-width: 0; }

/* ═══ FIN-1 (11/10) — DENSITÉ « GRAND ÉDITEUR » : <html data-densite="dense"> ═════════════════════════════════════
   Rien de ce bloc ne s'applique sans le réglage (une application l'active écran par écran, PLAN.md). Jetons : tokens.css.
   Comportements : composants.js (initTips en dense : infobulle automatique des textes tronqués ; bouton, renderMenuPlus,
   initBarreOutils, initOngletsPlus, initSelection, renderEnTete). Page témoin : lab.html?densite=dense.
   Mesure : porte de finition (docs/erp-authentysens/finition/REGLES.md), 28/28 à 1440 et 390. */
[data-densite='dense'] :is(a[href], button, input, select, textarea, summary, [role='tab'], [role='button'], [role='menuitem'], [tabindex]):focus-visible { outline: 2px solid var(--auth-color-focus); outline-offset: 2px; }
[data-densite='dense'] :is(b, strong) { font-weight: 600; }
[data-densite='dense'] :is(.au-num, td.num, th.num) { font-variant-numeric: tabular-nums; text-align: right; }
[data-densite='dense'] .au-content { padding-block: var(--auth-space-5) var(--auth-space-6); } /* 20 px sous la barre du haut (relevé du 01/11 : titres, pastilles et onglets collés en dense) */
[data-densite='dense'] .au-content:has([data-plein-ecran]) { padding-top: 0; } /* page de travail plein écran (éditeur de devis : le tableau garde 70 % de l'écran à 1440) */
@media (max-width: 760px) { /* la spécificité du mode dense l'emportait sur la réserve de la barre basse : la fin de page passait dessous (CRM, 11/10) */
  [data-densite='dense'] .au-content { padding-bottom: calc(var(--au-bottom-h) + var(--auth-space-4)); }
  [data-densite='dense'] body:not(:has(.au-bottom-nav)) .au-content { padding-bottom: calc(var(--auth-space-6) + env(safe-area-inset-bottom)); }
}
[data-densite='dense'] .au-badge { gap: var(--auth-space-1); height: 24px; padding: 0 var(--auth-space-2); font: 500 12px / 16px var(--auth-font-family); }
[data-densite='dense'] .au-ell { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-densite='dense'] svg.au-i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Bouton : principal (UN par écran), secondaire, discret, icône (aria-label + infobulle obligatoires : `bouton()`). Une rangée, jamais deux lignes. */
[data-densite='dense'] .au-btn { min-height: var(--h); height: var(--h); padding: 0 var(--auth-space-3); gap: var(--auth-space-2); border-radius: var(--auth-radius-sm);
  font: 500 13px / 20px var(--auth-font-family); letter-spacing: 0; white-space: nowrap; text-overflow: ellipsis; }
[data-densite='dense'] .au-btn svg { width: 16px; height: 16px; }
[data-densite='dense'] .au-btn--secondary { background: var(--auth-color-surface); border-color: var(--auth-color-line-strong); box-shadow: var(--auth-shadow-1); }
[data-densite='dense'] .au-btn--secondary:hover:not(:disabled) { background: var(--auth-color-bg); border-color: var(--auth-color-line-strong); }
[data-densite='dense'] .au-btn--ghost:hover:not(:disabled) { background: var(--auth-color-fill); }
[data-densite='dense'] .au-btn--icon { width: var(--h); padding: 0; }
[data-densite='dense'] .au-btn--sm { font-size: 12px; padding: 0 var(--auth-space-2); }
[data-densite='dense'] .au-btn--sm.au-btn--icon { padding: 0; }

/* En-tête de page : fil d'Ariane, titre, UNE action pleine (+ au plus un menu « … »). */
[data-densite='dense'] .au-page-head--dense { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: 0; margin: 0; padding: var(--auth-space-3) 0 var(--auth-space-2); align-items: stretch; }
[data-densite='dense'] .au-page-head--dense .au-breadcrumb { font: 400 13px / 20px var(--auth-font-family); flex-wrap: nowrap; min-width: 0; }
[data-densite='dense'] .au-page-head--dense .au-breadcrumb a { min-height: 20px; }
[data-densite='dense'] .au-page-head-row { display: flex; align-items: center; gap: var(--auth-space-3); min-height: 40px; min-width: 0; }
[data-densite='dense'] .au-page-head-row h1 { margin: 0; min-width: 0; font: var(--auth-font-heading-lg); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-densite='dense'] .au-page-head-actions { display: flex; align-items: center; gap: var(--auth-space-2); margin-left: auto; flex: none; }

/* Onglets (vues) avec compteur : une rangée, 8 visibles, les autres dans « Plus » (initOngletsPlus). */
[data-densite='dense'] .au-vues { display: flex; align-items: center; gap: var(--auth-space-1); min-width: 0; border-bottom: 1px solid var(--auth-color-line); }
[data-densite='dense'] .au-tabs { gap: var(--auth-space-1); padding: 0; border-radius: 0; background: none; min-height: 40px; align-items: center; min-width: 0; }
[data-densite='dense'] .au-vues > .au-tabs { flex: 0 1 auto; overflow: hidden; }
[data-densite='dense'] .au-vues .au-tab:focus-visible { outline-offset: -2px; }
[data-densite='dense'] .au-tab { display: inline-flex; align-items: center; gap: var(--auth-space-2); min-height: 40px; padding: 0 var(--auth-space-2); border-radius: 0;
  border-bottom: 2px solid transparent; font: 500 13px / 20px var(--auth-font-family); white-space: nowrap; }
[data-densite='dense'] .au-tab[hidden] { display: none; }
[data-densite='dense'] :is(.au-tab[aria-selected='true'], .au-tab[aria-current='page']) { background: none; box-shadow: none; color: var(--auth-color-ink); border-bottom-color: var(--auth-accent); }
[data-densite='dense'] .au-tab-n { font: 500 12px / 16px var(--auth-font-family); font-variant-numeric: tabular-nums; padding: 0 var(--auth-space-2); border-radius: var(--auth-radius-pill);
  background: var(--auth-color-fill); color: var(--auth-color-ink-secondary); }
[data-densite='dense'] .au-tab[aria-selected='true'] .au-tab-n { background: color-mix(in srgb, var(--auth-color-action) 12%, var(--auth-color-surface)); color: var(--auth-color-action); }

/* Barre d'outils : UNE rangée ; ce qui ne tient pas passe dans son « … » (initBarreOutils) ; la pagination y vit. */
[data-densite='dense'] .au-toolbar { flex-wrap: nowrap; gap: var(--auth-space-2); min-height: 48px; margin: 0; overflow: hidden; }
[data-densite='dense'] .au-toolbar > * { flex: none; }
[data-densite='dense'] .au-toolbar [hidden] { display: none !important; }
[data-densite='dense'] .au-recherche { display: flex; align-items: center; gap: var(--auth-space-2); flex: 0 1 240px; min-width: 96px; height: var(--auth-control-md); padding: 0 var(--auth-space-2) 0 var(--auth-space-3);
  border: 1px solid var(--auth-color-line-strong); border-radius: var(--auth-radius-sm); background: var(--auth-color-surface); color: var(--auth-color-ink-secondary); font: 400 13px / 20px var(--auth-font-family); }
[data-densite='dense'] .au-recherche input { flex: 1; align-self: stretch; min-width: 0; padding: 0; border: 0; background: none; font: inherit; color: var(--auth-color-ink); }
[data-densite='dense'] .au-recherche input:focus-visible { outline-offset: 0; }
[data-densite='dense'] .au-chip { height: var(--auth-control-sm); padding: 0 var(--auth-space-2); border-radius: var(--auth-radius-sm); border-style: dashed; font: 500 12px / 16px var(--auth-font-family); }
[data-densite='dense'] .au-pager { display: inline-flex; align-items: center; gap: var(--auth-space-1); margin-left: auto; font: 400 13px / 20px var(--auth-font-family); color: var(--auth-color-ink-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
[data-densite='dense'] .au-pager .au-pager-suivante svg { transform: scaleX(-1); }

/* Menu « … » : entrées de 32 px, raccourci affiché à droite ; Échap ferme (initMenu). */
[data-densite='dense'] .au-popover { padding: var(--auth-space-1); border-radius: var(--auth-radius-md); min-width: 200px; box-shadow: var(--auth-shadow-2); }
[data-densite='dense'] .au-menu-item { min-height: 32px; padding: 0 var(--auth-space-2); gap: var(--auth-space-2); border-radius: var(--auth-radius-sm); font: 400 13px / 20px var(--auth-font-family); white-space: nowrap; }
[data-densite='dense'] .au-menu-kbd { margin-left: auto; padding: 0 var(--auth-space-1); border: 1px solid var(--auth-color-line-strong); border-bottom-width: 2px; border-radius: 4px;
  font: 500 12px / 16px var(--auth-font-family); color: var(--auth-color-ink-secondary); }

/* Infobulle : sombre, 12 px, une phrase. */
[data-densite='dense'] .au-tip { padding: var(--auth-space-1) var(--auth-space-2); border-radius: 4px; background: var(--auth-color-ink); color: var(--auth-color-surface); font: 500 12px / 16px var(--auth-font-family); }

/* Tableau dense : lignes 40 px, une ligne de texte tronquée (infobulle automatique), chiffres alignés, actions au survol. */
[data-densite='dense'] .au-table-wrap { background: var(--auth-color-surface); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-md); overflow: hidden; }
[data-densite='dense'] .au-table { table-layout: fixed; font: var(--auth-font-body); }
[data-densite='dense'] .au-table th { position: static; height: var(--auth-row-head); padding: 0 var(--auth-space-2); background: var(--auth-color-bg); font: 500 12px / 16px var(--auth-font-family);
  letter-spacing: 0; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-densite='dense'] .au-table td { height: var(--auth-row); padding: 0 var(--auth-space-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
[data-densite='dense'] .au-table :is(th, td).au-cell-check { width: 40px; padding: 0 0 0 var(--auth-space-3); }
[data-densite='dense'] .au-table .au-cell-check input { width: 16px; height: 16px; margin: 0; vertical-align: middle; accent-color: var(--auth-color-action); }
[data-densite='dense'] .au-table tbody tr:hover td { background: var(--auth-color-bg); }
[data-densite='dense'] .au-table tbody tr.is-selected td { background: color-mix(in srgb, var(--auth-color-action) 8%, var(--auth-color-surface)); }
[data-densite='dense'] .au-table tbody tr.is-selected td:first-child { box-shadow: none; }
[data-densite='dense'] .au-ligne-titre { display: flex; flex-direction: column; justify-content: center; min-width: 0; color: var(--auth-color-ink); text-decoration: none; font-weight: 500; line-height: 16px; }
[data-densite='dense'] .au-ligne-titre > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-densite='dense'] .au-ligne-titre .au-ligne-sous { font: 400 12px / 16px var(--auth-font-family); color: var(--auth-color-ink-secondary); }
[data-densite='dense'] .au-row-acts { display: flex; justify-content: flex-end; gap: var(--auth-space-1); opacity: 0; transition: opacity var(--auth-motion-fast); }
[data-densite='dense'] .au-table tbody tr:is(:hover, :focus-within) .au-row-acts { opacity: 1; }
[data-densite='dense'] .au-row-acts .au-btn { --h: var(--auth-control-sm); }

/* Barre de sélection flottante : « n sélectionnées » + actions groupées, en bas au centre. */
[data-densite='dense'] .au-selbar { position: fixed; left: 50%; bottom: var(--auth-space-6); transform: translateX(-50%); z-index: var(--auth-z-sticky); display: flex; align-items: center; gap: var(--auth-space-2);
  max-width: calc(100vw - 24px); padding: var(--auth-space-1) var(--auth-space-1) var(--auth-space-1) var(--auth-space-3); border-radius: var(--auth-radius-md);
  background: var(--auth-color-ink); color: var(--auth-color-surface); box-shadow: var(--auth-shadow-2); font: 500 13px / 20px var(--auth-font-family); }
[data-densite='dense'] .au-selbar[hidden] { display: none; }
[data-densite='dense'] .au-selbar strong { font-variant-numeric: tabular-nums; }
[data-densite='dense'] .au-selbar .au-btn { background: color-mix(in srgb, currentColor 10%, transparent); border-color: color-mix(in srgb, currentColor 18%, transparent); color: inherit; box-shadow: none; }

/* État vide : un titre, une phrase, UN bouton. */
[data-densite='dense'] :is(.au-vide, .au-empty) { justify-items: center; gap: var(--auth-space-2); max-width: 420px; margin-inline: auto; padding: var(--auth-space-12) var(--auth-space-4); text-align: center; }
[data-densite='dense'] :is(.au-vide-titre, .au-empty h2) { font: var(--auth-font-heading-md); }
[data-densite='dense'] :is(.au-vide-phrase, .au-empty p) { font: var(--auth-font-body); }

/* Au doigt (≤ 720 px) : 44 px partout, pas d'action au survol (la ligne s'ouvre), colonnes secondaires repliées. */
@media (max-width: 720px) {
  [data-densite='dense'] .au-btn { font-size: 13px; padding: 0 var(--auth-space-4); }
  [data-densite='dense'] :is(.au-btn--icon, .au-btn--sm.au-btn--icon) { padding: 0; }
  [data-densite='dense'] .au-page-head--dense .au-breadcrumb a { min-height: 44px; min-width: 44px; justify-content: center; }
  [data-densite='dense'] .au-page-head-row h1 { white-space: normal; } /* au téléphone, un titre se lit en entier (« TECH est accessible en lectu… », 24/10) */
  [data-densite='dense'] :is(.au-tab, .au-tabs) { min-height: 44px; }
  [data-densite='dense'] .au-recherche { flex: 1 1 auto; min-width: 144px; font-size: 14px; }
  [data-densite='dense'] .au-chip { padding: 0 var(--auth-space-3); }
  [data-densite='dense'] .au-pager-texte { display: none; }
  [data-densite='dense'] .au-menu-item { min-height: 44px; }
  [data-densite='dense'] .au-menu-kbd { display: none; }
  [data-densite='dense'] :is(.au-col-secondaire, .au-col-acts) { display: none; }
  [data-densite='dense'] .au-ligne-titre { min-height: 44px; }
}

/* FIN-3/R13, R21 (11/10) — la coque tient dans l'échelle 12/13/14/16/20/24 et dans une seule famille d'icônes (grille 24, trait 1,5). */
[data-densite='dense'] .au-brand-suite { font-size: 12px; }
[data-densite='dense'] .au-brand-app { font-size: 14px; }
[data-densite='dense'] .au-topbar-kbd { font-size: 12px; }
[data-densite='dense'] :is(.au-sidebar, .au-topbar, .au-bottom-nav, .au-sheet) svg[aria-hidden='true'] { stroke-width: 1.5; }
[data-densite='dense'] .au-nav-count, [data-densite='dense'] .au-bottom-nav .au-nav-count { font-size: 12px; }
[data-densite='dense'] .au-topbar-pastille { font-size: 12px; }
[data-densite='dense'] .au-brand-text { gap: var(--auth-space-1); }
[data-densite='dense'] .au-topbar-kbd { padding: 0 var(--auth-space-2); }
[data-densite='dense'] .au-topbar-avatar { width: 32px; height: 32px; padding: 0; }
@media (max-width: 760px) { [data-densite='dense'] .au-topbar-avatar { width: 44px; height: 44px; } }
[data-densite='dense'] :is(.au-topbar-actions, .au-topbar-actions[data-barre='erp']) { gap: 4px; }
@media (max-width: 760px) { [data-densite='dense'] .au-bottom-nav { padding-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right)); } [data-densite='dense'] .au-bottom-nav :is(a, button) { gap: 4px; } }
[data-densite='dense'] :is(input[type='checkbox'], input[type='radio']) { margin: 0; }

/* FIN-1c (11/10) — menu latéral dense : l'application se choisit dans un sélecteur (sidebar.js), le menu ne liste que les pages de l'application
   ouverte, et UN SEUL élément est actif (la page) — R31. Liste fermée par défaut : son lien à aria-current="true" n'est pas affiché. */
[data-densite='dense'] .au-appsel { position: relative; margin-bottom: var(--auth-space-2); }
[data-densite='dense'] .au-appsel-btn { display: flex; align-items: center; gap: var(--auth-space-2); width: 100%; min-height: 36px; padding: 0 var(--auth-space-3); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-md); background: var(--auth-color-surface); color: var(--auth-color-ink); font: var(--auth-font-label); text-align: left; cursor: pointer; }
[data-densite='dense'] .au-appsel-btn:hover { background: color-mix(in srgb, var(--auth-color-ink) 5%, var(--auth-color-surface)); }
[data-densite='dense'] .au-appsel-btn svg { width: 18px; height: 18px; flex: none; }
[data-densite='dense'] .au-appsel-btn > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-densite='dense'] .au-appsel-btn::after { content: ''; width: 6px; height: 6px; flex: none; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); color: var(--auth-color-ink-secondary); }
[data-densite='dense'] .au-appsel-btn[aria-expanded='true']::after { transform: translateY(1px) rotate(-135deg); }
[data-densite='dense'] .au-appsel [data-modules] { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: var(--auth-z-dropdown, 20); padding: var(--auth-space-1); border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-md); background: var(--auth-color-surface-raised); box-shadow: 0 8px 24px rgb(0 0 0 / 0.12); }
[data-densite='dense'] .au-appsel [data-modules][hidden] { display: none; }
[data-densite='dense'] .au-appsel [data-modules] .au-nav-module[aria-current='true'] { box-shadow: none; background: color-mix(in srgb, var(--auth-color-ink) 6%, transparent); }

/* ── IA-V1d (12/10) — le panneau commun « Demander à l'IA » (panneau-ia.js) : tiroir à droite, plein écran à ≤ 760 px ── */
.au-ia-panneau { max-width: 100%; font-family: var(--auth-font-family); }
.au-ia-panneau[open] { display: flex; flex-direction: column; }
.au-ia-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--auth-space-3); padding: var(--auth-space-3) var(--auth-space-4) var(--auth-space-3) var(--auth-space-6); border-bottom: 1px solid var(--auth-color-line); }
.au-ia-titre { margin: 0; font: 600 1rem/1.25 var(--auth-font-family); }
.au-ia-cadre { display: grid; gap: var(--auth-space-3); padding: var(--auth-space-4) var(--auth-space-6); }
.au-ia-banniere { display: flex; align-items: center; gap: var(--auth-space-2); margin: 0; padding: var(--auth-space-2) var(--auth-space-3); border: 1px solid color-mix(in srgb, var(--auth-accent) 35%, var(--auth-color-line)); border-left-width: 4px; border-radius: var(--auth-radius-md); background: color-mix(in srgb, var(--auth-accent) 6%, var(--auth-color-surface-raised)); color: var(--auth-accent); font: 600 0.8125rem/1.2 var(--auth-font-family); }
.au-ia-contexte { display: grid; gap: var(--auth-space-2); margin: 0; font-size: 0.8125rem; }
.au-ia-contexte > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--auth-space-3); }
.au-ia-contexte dt { color: var(--auth-color-ink-secondary); }
.au-ia-contexte dd { margin: 0; overflow-wrap: anywhere; font-weight: 500; }
.au-ia-fil { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--auth-space-3); padding: var(--auth-space-4) var(--auth-space-6); border-top: 1px solid var(--auth-color-line); }
.au-ia-message { margin: 0; max-width: 92%; padding: var(--auth-space-2) var(--auth-space-3); border-radius: var(--auth-radius-md); font-size: 0.875rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.au-ia-message--moi { align-self: flex-end; background: var(--auth-color-fill); border: 1px solid var(--auth-color-line); }
.au-ia-message--ia { align-self: flex-start; border-left: 4px solid var(--auth-accent); background: color-mix(in srgb, var(--auth-accent) 6%, var(--auth-color-surface-raised)); }
.au-ia-message--erreur { align-self: flex-start; border: 1px solid var(--auth-color-danger); color: var(--auth-color-ink); }
.au-ia-message--info { align-self: stretch; max-width: 100%; border: 1px solid var(--auth-color-line); }
.au-ia-form { display: grid; gap: var(--auth-space-3); padding: var(--auth-space-4) var(--auth-space-6) calc(var(--auth-space-4) + env(safe-area-inset-bottom)); border-top: 1px solid var(--auth-color-line); }
.au-ia-form[hidden] { display: none; }
.au-ia-form .au-textarea { width: 100%; resize: vertical; }
.au-ia-form .au-btn { justify-self: end; }
.au-gabarit-titre .au-ia-fiche { justify-self: start; white-space: nowrap; }
@media (max-width: 760px) {
  .au-ia-panneau { width: 100%; }
  .au-ia-tete { padding-left: var(--auth-space-4); }
  .au-ia-cadre, .au-ia-fil, .au-ia-form { padding-left: var(--auth-space-4); padding-right: var(--auth-space-4); }
  .au-ia-contexte > div { grid-template-columns: 1fr; gap: 0; }
  .au-ia-form .au-btn { justify-self: stretch; min-height: 44px; }
  .au-gabarit-titre .au-ia-fiche { min-height: 44px; }
}
/* Densité « grand éditeur » : le titre d'un gabarit reste à l'échelle (20 px) au téléphone — la règle ≤ 760 px d'au-dessus le portait à 23 px, hors de l'échelle de la porte (R13). */
[data-densite='dense'] .au-h1 { font: var(--auth-font-heading-lg); letter-spacing: -0.01em; }
/* FIN-6 HUB (13/10) — finitions génériques de la densité « grand éditeur » : texte d'aide à 13 px, termes expliqués sans soulignement, tableaux serrés, onglet de vue sélectionné, cibles tactiles de 44 px au téléphone. */
[data-densite='dense'] small { font-size: 13px; } [data-densite='dense'] [data-terme] { border-bottom: 0; } [data-densite='dense'] td { padding-block: var(--auth-space-1); } [data-densite='dense'] .avatar { padding: 0; }
[data-densite='dense'] .au-segmented[role='tablist'] [aria-selected='true'] { background: var(--auth-color-surface-raised); color: var(--auth-color-ink); box-shadow: var(--auth-shadow-1); }
@media (min-width: 721px) { [data-densite='dense'] td label { min-height: 24px; min-width: 24px; justify-content: center; } }
@media (max-width: 720px) { [data-densite='dense'] :is(input:not([type='checkbox'], [type='radio']), select, .th-sort, summary) { min-height: 44px; } [data-densite='dense'] .th-sort { min-width: 44px; } }
/* FIN-6 HUB (13/10) — gabarits de gestion en densité : en-tête d'écran, identité d'une ligne (nom + adresse), vues à compteur, lignes de formulaire en grille, barre d'outils au téléphone. */
[data-densite='dense']:root { --auth-font-caption: 400 13px / 16px var(--auth-font-family); } [data-densite='dense'] #pp-titre { font: var(--auth-font-heading-md); } [data-densite='dense'] .conn-ess-titre { margin-block: var(--auth-space-4); }
.au-compte { font-variant-numeric: tabular-nums; color: var(--auth-color-ink-secondary); font-weight: 400; }
[data-densite='dense'] .who > span:last-child { display: flex; align-items: baseline; gap: var(--auth-space-3); min-width: 0; } [data-densite='dense'] .who small { white-space: nowrap; display: inline; min-width: 0; }
@media (min-width: 721px) { .set:has(.au-champs-grille) { max-width: 1100px; }
  [data-densite='dense'] .au-champs-grille { display: grid; gap: var(--auth-space-1); } [data-densite='dense'] .au-champ-ligne { display: grid; grid-template-columns: 220px 280px minmax(0, 1fr); align-items: center; column-gap: var(--auth-space-4); row-gap: var(--auth-space-1); margin: 0; }
  [data-densite='dense'] .au-champ-ligne .hint { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } }
@media (max-width: 720px) { [data-densite='dense'] td .initials { display: none; }
  [data-densite='dense'] .who > span:last-child { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--auth-space-3); align-items: center; } [data-densite='dense'] .who small { grid-column: 1; grid-row: 2; display: block; } [data-densite='dense'] .who .show-sm { grid-column: 2; grid-row: 1; margin: 0; }
  [data-densite='dense'] .toolbar > input { flex: 1 1 0; min-width: 0; max-width: none; } [data-densite='dense'] .toolbar > .au-segmented--compteur { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; padding: 0; } [data-densite='dense'] .au-champ-ligne { gap: var(--auth-space-1); } }

/* ── CUI-UX-1 (14/10) : socle commun — sortie, volets, premier affichage, annulation, palette ─────────────────── */
/* Sortie d'un tiroir / d'une feuille : 180 ms, courbe de sortie (l'entrée reste à 240 ms). Posée par superpositions.js
   (data-fermeture) ; sans le module, le <dialog> se ferme sec comme avant. */
@keyframes au-sink-out { to { opacity: 0; transform: translateY(8px) scale(0.99); } }
@keyframes au-slide-out { to { transform: translateX(24px); opacity: 0; } }
@keyframes au-fade-out { to { opacity: 0; } }
.au-sheet[data-fermeture], .au-command[data-fermeture] { animation: au-sink-out var(--auth-motion-exit) var(--auth-ease-exit) both; }
.au-drawer[data-fermeture] { animation: au-slide-out var(--auth-motion-exit) var(--auth-ease-exit) both; }
.au-sheet[data-fermeture]::backdrop, .au-drawer[data-fermeture]::backdrop, .au-command[data-fermeture]::backdrop { animation: au-fade-out var(--auth-motion-exit) var(--auth-ease-exit) both; }
@media (max-width: 760px) { .au-drawer[data-fermeture] { animation-name: au-sink-out; } }
/* Volets repliables : hauteur animée vers « auto » (interpolate-size), 200 ms. Sans support, ils s'ouvrent comme avant. */
:root { interpolate-size: allow-keywords; }
:is(details.au-tiroir, details.au-volet)::details-content { block-size: 0; overflow: clip; transition: block-size var(--auth-motion-fold) var(--auth-ease-standard), content-visibility var(--auth-motion-fold) allow-discrete; }
:is(details.au-tiroir, details.au-volet)[open]::details-content { block-size: auto; }
/* Aucune transition au premier affichage : mouvement.js pose data-au-premier jusqu'au premier tracé complet. */
:root[data-au-premier] *, :root[data-au-premier] *::before, :root[data-au-premier] *::after { transition: none !important; }
/* Bandeau « Annuler » (toast.js : annulable) */
.au-toast kbd { flex: none; min-width: 20px; padding: 0 4px; border: 1px solid currentColor; border-radius: var(--auth-radius-xs); font: 600 0.75rem/18px var(--auth-font-family); text-align: center; opacity: 0.8; }
.au-toast-annuler { display: flex; align-items: center; gap: var(--auth-space-2); margin-left: auto; }
.au-toast-annuler button { margin-left: 0; }
/* Palette (palette.js) : catégories et pastille de raccourci ; le reste vient de .au-command */
.au-command, .au-tiroir { font-family: var(--auth-font-family); } /* un <dialog> ou un <summary> nu n'hérite pas toujours de la police de la page */
.au-command-item[aria-selected='true'] { background: color-mix(in srgb, var(--auth-color-action) 12%, transparent); box-shadow: inset 3px 0 0 var(--auth-color-action); }
.au-command-vide { padding: var(--auth-space-4); font: var(--auth-font-body); color: var(--auth-color-ink-secondary); }
.au-command-item small { flex: none; font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); }

/* ═════ CUI-UX-2 (15/10/2026, p1 p4 p10 p12 p15 p17 p29) — socle commun, NE DIFFUSE PAS avant le lot de chaque app ═════ */
/* p1 · Colonne latérale sans saut : la colonne 1 est RÉSERVÉE par la grille dès le HTML initial, que l'<aside> soit déjà là ou
   posé plus tard par initSidebar() ; le contenu occupe toujours la colonne 2 (sans cela, il montait en colonne 1 puis sautait). */
.au-shell > .au-sidebar { grid-column: 1; grid-row: 1; }
.au-shell > :not(.au-sidebar):not(.au-bottom-nav):not(dialog) { grid-column: 2; }
@media (max-width: 760px) { .au-shell > :not(.au-sidebar):not(.au-bottom-nav):not(dialog) { grid-column: 1; } }
/* p4 · Sortie du menu du compte et des popovers : 140 ms, courbe de sortie, plus courte que l'entrée (mouvement.js : sortir()). */
@keyframes au-pop-out { to { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.au-popover[data-fermeture], [data-au-sortie][data-fermeture] { animation: au-pop-out var(--auth-motion-exit) var(--auth-ease-exit) both; pointer-events: none; }
/* p10 · Jamais de nom tronqué : retour à la ligne (2 lignes), le reste dans le title (equiperNoms). Fil d'Ariane replié au-delà de 3 niveaux. */
.au-nom { line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; text-overflow: ellipsis; min-width: 0; }
.au-breadcrumb[data-replie] > li:not(:first-child):not(:nth-last-child(-n+2)):not(.au-breadcrumb-plus) { display: none; }
.au-breadcrumb-plus { color: var(--auth-color-ink-tertiary); cursor: help; }
.au-breadcrumb li { min-width: 0; } .au-breadcrumb a, .au-breadcrumb [aria-current='page'] { overflow-wrap: anywhere; }
/* p12 · Trois tailles : sm 28, md 36 (défaut), lg 44 ; le principal est plein, jamais en contour. */
.au-btn--primary { border-color: transparent; }
.au-btn--sm { padding-block: 4px; } /* 28 px tenus : la ligne de 12 px + 2 × 4 + bordure = 25 < 28 */
.au-input, .au-select, .au-textarea { border-radius: var(--auth-radius-control); }
/* p17 · Squelette de chargement commun (squelette.js) : remplace l'écran blanc et le bloc gris. */
.au-squelette { display: grid; gap: var(--auth-space-4); padding-block: var(--auth-space-2); }
.au-squelette[data-type='liste'] > .au-skeleton { height: var(--auth-row, 40px); border-radius: var(--auth-radius-control); }
.au-squelette[data-type='fiche'] > .au-skeleton:first-child { height: 28px; width: 45%; }
.au-squelette[data-type='fiche'] > .au-skeleton:not(:first-child) { height: 16px; }
.au-squelette[data-type='fiche'] > .au-skeleton:nth-child(odd):not(:first-child) { width: 80%; }
.au-squelette-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--auth-space-3); }
.au-squelette-cartes > .au-skeleton { height: 112px; border-radius: var(--auth-radius-lg); }
.au-squelette-texte { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* p27 · Lien d'évitement : hors écran sans focus, en haut à gauche avec. */
.au-skip { display: inline-flex; align-items: center; min-height: var(--auth-control-lg); position: fixed; top: 8px; left: 8px; z-index: calc(var(--auth-z-popover) + 10); padding: 8px 14px; border-radius: var(--auth-radius-control); background: var(--auth-color-action); color: var(--auth-color-on-action); font: var(--auth-font-label); text-decoration: none; transform: translateY(-200%); }
.au-skip:focus-visible { transform: none; }
main[tabindex='-1']:focus { outline: none; }
input[type='checkbox'], input[type='radio'] { min-width: 24px; min-height: 24px; } /* cible d'au moins 24 × 24 px (HUB-UX p9, 15/10) */

/* ── Accueil par rôle (ACC-1) : 1 bandeau de chiffres, 2 graphiques, 3 à faire, 4 point du matin. À 390 px : chiffres, à faire, graphiques, matin. ── */
.acc-zones { display: flex; flex-direction: column; gap: var(--auth-space-8, 32px); margin: 0 0 var(--auth-space-8, 32px); min-width: 0; }
.acc-bandeau { order: 1; } .acc-graphiques { order: 2; } .acc-afaire { order: 3; } .acc-matin { order: 4; }
.acc-zone { min-width: 0; }
.acc-grille { display: grid; gap: var(--auth-space-4, 16px); min-width: 0; }
.acc-grille--bandeau { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.acc-grille--graphiques { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.acc-grille--afaire { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.acc-grille > * { min-width: 0; }
.acc-grille--bandeau .home-widget, .acc-grille--bandeau .home-widget > .au-widget { height: 100%; } /* chiffres : même hauteur ; graphiques et listes gardent la leur */
.home-widget--replie { height: auto !important; }
.acc-replie { margin: 0; padding: var(--auth-space-3, 12px) var(--auth-space-4, 16px); border: 1px dashed var(--auth-color-line); border-radius: var(--auth-radius-lg); color: var(--auth-color-ink-secondary); font: var(--auth-font-body); overflow-wrap: anywhere; }
.acc-replie strong { color: var(--auth-color-ink); }
.acc-faits { list-style: none; margin: 0 0 var(--auth-space-3, 12px); padding: 0; display: flex; flex-wrap: wrap; gap: var(--auth-space-3, 12px); }
.acc-fait { display: inline-flex; align-items: center; gap: 0.35em; min-height: 44px; padding: 0 var(--auth-space-4, 16px); border: 1px solid var(--auth-color-line); border-radius: 999px; color: var(--auth-color-ink); text-decoration: none; font: var(--auth-font-body); max-width: 100%; overflow-wrap: anywhere; }
.acc-fait-texte { white-space: normal; } /* 22/10 : « 0 tâcheà faire » — le texte est un élément à part, l’espace ne se perd plus */
.acc-fait[data-niveau='danger'] { border-color: var(--auth-color-danger); font-weight: 600; }
[data-ia-suite]:empty { display: none; }
@media (max-width: 700px) { .acc-afaire { order: 2; } .acc-graphiques { order: 3; } .acc-zones { gap: var(--auth-space-6, 24px); } }
/* ── NAV-1 (D-ERP-96, 20/10) : coque commune de toute la suite — posée par monterBarreHaut (html[data-coque='v5']) ──────────────
   Barre du haut sur TOUTE la largeur, au-dessus du menu : [Applications][nom]  [Rechercher dans toute la suite · Ctrl K]  [+ Créer][Demander à l’IA][cloche][compte].
   Menu de gauche = onglets de l’application ouverte (tête : son nom + repli), ≤ 7 + « Plus » ; lanceur « Applications » (lanceur.js). */
html[data-coque='v5'] .au-shell { padding-top: var(--au-topbar-h); }
html[data-coque='v5'] .au-topbar { position: fixed; top: 0; left: 0; right: 0; z-index: calc(var(--auth-z-sticky) + 1); padding-inline: var(--auth-space-4); gap: var(--auth-space-3); }
html[data-coque='v5'] .au-shell > .au-sidebar { top: var(--au-topbar-h); height: calc(100svh - var(--au-topbar-h)); padding-top: var(--auth-space-4); }
html[data-coque='v5'] .au-sidebar > .au-brand, html[data-coque='v5'] .au-topbar > .au-brand, html[data-coque='v5'] .au-topbar .au-breadcrumb, html[data-coque='v5'] .au-topbar > .au-spacer { display: none; }
.au-topbar-gauche { display: flex; align-items: center; gap: var(--auth-space-2); flex: 0 1 auto; min-width: 0; } /* se resserre (nom coupé par une ellipse) plutôt que de passer sous la loupe */
.au-topbar-apps { --ib: 36px; border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-control, 8px); background: var(--auth-color-surface); }
.au-topbar-apps[aria-expanded='true'] { background: var(--auth-color-fill); }
.au-topbar-marque { display: inline-flex; align-items: center; gap: var(--auth-space-2); min-width: 0; color: var(--auth-color-ink); text-decoration: none; border-radius: var(--auth-radius-sm); padding: 4px; }
.au-topbar-marque[hidden] { display: none; }
.au-topbar-pastille-app { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--auth-accent); color: var(--auth-color-surface); font: 600 0.875rem/1 var(--auth-font-family); }
.au-topbar-app { font: 600 1rem/1.25 var(--auth-font-family); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-topbar-marque:focus-visible, .au-topbar-apps:focus-visible { outline: 2px solid var(--auth-color-focus); outline-offset: 2px; }
html[data-coque='v5'] .au-topbar-actions { flex: 1 0 auto; min-width: 0; justify-content: flex-end; }
html[data-coque='v5'] .au-topbar-search { margin-inline: auto; width: min(520px, 36vw); justify-content: flex-start; background: var(--auth-color-fill); border-color: transparent; }
html[data-coque='v5'] .au-topbar-search .au-topbar-kbd { margin-left: auto; }
.au-sidebar-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--auth-space-2); min-height: 40px; padding: 0 var(--auth-space-1) var(--auth-space-3) var(--auth-space-3); }
.au-sidebar-app { font: 600 1rem/1.25 var(--auth-font-family); min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 761px) { .au-sidebar-tete > .au-sidebar-collapse { position: static; } .au-sidebar:has(> .au-sidebar-tete) > .au-sidebar-collapse { position: static; } }
/* REPLIER / DÉPLIER : UNE commande claire et persistante (DEV-UX-10, 27/10, Daniel : « la barre latérale n'affiche pas de commande claire
   et persistante pour la replier puis la déplier », tout l'ERP). Deux défauts mesurés : « Replier » était une icône pâle sans contour
   (rien ne disait que c'était un bouton), et la tête qui la porte défilait avec le menu — menu plus haut que la fenêtre (neuf modules
   et les pages du module), on la perdait (y = −399 px). Désormais : la tête reste collée en haut de la barre pendant son défilement,
   et « Replier » a le même bouton encadré que « Déplier » (surface, bord, ombre) : même aspect dans les deux états. */
@media (min-width: 761px) {
  .au-sidebar > .au-sidebar-tete { position: sticky; top: calc(-1 * var(--auth-space-5)); z-index: var(--auth-z-raised); flex: none; margin: calc(-1 * var(--auth-space-5)) calc(-1 * var(--auth-space-3)) 0; padding: var(--auth-space-5) calc(var(--auth-space-1) + var(--auth-space-3)) var(--auth-space-3) calc(2 * var(--auth-space-3));
    background: color-mix(in srgb, var(--auth-color-bg) 92%, transparent); -webkit-backdrop-filter: blur(var(--auth-blur-overlay)); backdrop-filter: blur(var(--auth-blur-overlay)); }
  html[data-coque='v5'] .au-sidebar > .au-sidebar-tete { top: calc(-1 * var(--auth-space-4)); margin-top: calc(-1 * var(--auth-space-4)); padding-top: var(--auth-space-4); }
}
/* Même bouton, quoi que l'application surcharge (DEV-UX-10, 27/10). Relevé : COMMISSION (globals.css) pose
   `.au-sidebar-collapse:not([hidden]), .au-sidebar-expand:not([hidden]) { width: 36px; border: 0; background: none }` (0,2,0), chargée
   après le Core : elle gagnait à égalité contre `.au-sidebar .au-sidebar-collapse` et `.au-shell > .au-sidebar-expand` (0,2,0) —
   « Replier » et « Déplier » redevenaient des icônes pâles de 36 px. Taille, bord, fond, ombre, rayon et focus sont donc posés ici
   pour LES DEUX boutons en (0,3,1) (`html` + `:not([hidden])`), au-dessus des formes d'application relevées. */
@media (min-width: 761px) {
  html .au-sidebar .au-sidebar-collapse:not([hidden]), html .au-shell > .au-sidebar-expand:not([hidden]) {
    box-sizing: border-box; display: inline-grid; place-items: center; flex: none; margin: 0; padding: 0; cursor: pointer;
    width: max(40px, var(--ib, 40px)); height: max(40px, var(--ib, 40px)); min-width: 40px; min-height: 40px;
    border: 1px solid var(--auth-color-line); border-radius: var(--auth-radius-control, 8px); background: var(--auth-color-surface);
    color: var(--auth-color-ink); box-shadow: var(--auth-shadow-1, 0 1px 2px rgb(0 0 0 / 0.08)); }
  html .au-sidebar .au-sidebar-collapse:not([hidden]):hover, html .au-shell > .au-sidebar-expand:not([hidden]):hover { background: var(--auth-color-fill); color: var(--auth-color-ink); }
  html .au-sidebar .au-sidebar-collapse:not([hidden]):focus-visible, html .au-shell > .au-sidebar-expand:not([hidden]):focus-visible { outline: 2px solid var(--auth-color-focus); outline-offset: 2px; }
}
/* LARGEUR COMMUNE DU MENU (DEV-UX-10, 27/10, Daniel : « largeur/hauteur visuelle incohérente entre onglets/modules »). Une seule
   largeur par taille d'écran, quel que soit le module ou la page : 240 px au-delà de 1 100 px, 200 px de 761 à 1 100 px, rail de 48 px
   replié. La valeur est posée SUR `.au-shell` (et non plus prise en repli de `var(--au-sidebar-w, 240px)`) : une variable du même nom
   posée par une application sur un ancêtre (`:root`, `body`, un cadre) ne l'hérite plus ; et le menu remplit sa colonne quoi qu'une
   règle d'application `.au-sidebar { width / padding }` demande. Une largeur propre à un module n'existe donc plus : la demander au Hub. */
@media (min-width: 761px) {
  html .au-shell { --au-sidebar-w: 240px; --au-rail-deplier: 48px; }
  html .au-shell > .au-sidebar { box-sizing: border-box; justify-self: stretch; width: auto; min-width: 0; max-width: none; padding-inline: var(--auth-space-3); }
  html .au-shell[data-sidebar='masquee'] { --au-sidebar-w: var(--au-rail-deplier); }
  html .au-shell[data-sidebar='masquee'] > .au-sidebar { width: 0; padding-inline: 0; }
}
@media (min-width: 761px) and (max-width: 1100px) { html .au-shell:not([data-sidebar='masquee']) { --au-sidebar-w: 200px; } }
/* RAIL DE 48 PX (DEV-UX-10, 27/10, règle métier : replier rend au contenu au moins 80 % de la largeur du menu). Avec 56 px, le gain
   était de 184 px sur 240 (77 %, mesuré par DEVIS `repli-elargit` à 1440 et 1920 px) ; 48 px rend 192 px (80 %). « Déplier » garde
   40 × 40 px à 8 px du bord (8 + 40 = 48) : il touche le bord du contenu sans le chevaucher. À 200 px (761–1 100 px) le gain est de
   152 px (76 %) : 80 % y exigerait un rail de 40 px, donc un bouton collé au bord de l'écran — limite assumée et signalée. */
.au-sidebar [data-menu] { display: grid; gap: 4px; }
button.au-nav-plus { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.au-nav-plus svg { width: 18px; height: 18px; }
.au-plus-liste { display: grid; gap: 4px; padding-left: var(--auth-space-4); }
.au-plus-liste[hidden] { display: none; }
.au-menu-titre { margin: var(--auth-space-2) var(--auth-space-3) var(--auth-space-1); font: 600 0.6875rem/1.2 var(--auth-font-family); letter-spacing: 0.06em; text-transform: uppercase; color: var(--auth-color-ink-tertiary); }
.au-creer-item { display: grid !important; gap: 0; text-align: left; }
.au-creer-sous { font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
.au-creer-pied { margin: var(--auth-space-2) var(--auth-space-3) var(--auth-space-1); max-width: 300px; }
[data-creer-menu] { max-height: calc(100svh - var(--au-topbar-h) - 24px); overflow-y: auto; min-width: 300px; }
/* Lanceur « Applications » */
dialog.au-lanceur { margin: calc(var(--au-topbar-h) + 6px) auto auto 12px; width: min(1080px, calc(100vw - 24px)); max-height: calc(100svh - var(--au-topbar-h) - 18px); overflow-y: auto; padding: var(--auth-space-5); border: 1px solid var(--auth-color-line); border-radius: 14px; background: var(--auth-color-surface); color: var(--auth-color-ink); box-shadow: var(--auth-shadow-2); font: var(--auth-font-body); }
dialog.au-lanceur::backdrop { background: rgb(12 14 14 / 0.18); }
.au-lanceur-tete { display: none; align-items: center; justify-content: space-between; margin-bottom: var(--auth-space-3); }
.au-lanceur-recherche { display: flex; align-items: center; gap: var(--auth-space-2); height: 40px; padding: 0 var(--auth-space-3); border-radius: 10px; background: var(--auth-color-fill); color: var(--auth-color-ink-secondary); }
.au-lanceur-recherche input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: var(--auth-color-ink); outline: none; }
.au-lanceur-recherche:focus-within { outline: 2px solid var(--auth-color-focus); outline-offset: 1px; }
.au-lanceur-titre { margin: var(--auth-space-4) 0 var(--auth-space-2); font: 600 0.6875rem/1.2 var(--auth-font-family); letter-spacing: 0.06em; text-transform: uppercase; color: var(--auth-color-ink-tertiary); }
.au-lanceur-pilules, .au-lanceur-onglets { display: flex; flex-wrap: wrap; gap: var(--auth-space-2); }
.au-lanceur-pilule, .au-lanceur-onglet { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--auth-space-3); border: 1px solid var(--auth-color-line); border-radius: 8px; color: var(--auth-color-ink); text-decoration: none; }
.au-lanceur-familles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--auth-space-5); }
.au-lanceur-familles section[hidden], .au-lanceur-app[hidden], [data-lanceur-raccourcis][hidden] { display: none; }
.au-lanceur-app { display: flex; align-items: center; gap: var(--auth-space-3); padding: var(--auth-space-2); border-radius: 10px; color: var(--auth-color-ink); text-decoration: none; }
.au-lanceur-app:hover, .au-lanceur-pilule:hover, .au-lanceur-onglet:hover { background: var(--auth-color-fill); }
.au-lanceur-app[aria-current='true'] { background: var(--auth-color-fill); }
.au-lanceur-app:focus-visible, .au-lanceur-pilule:focus-visible, .au-lanceur-onglet:focus-visible { outline: 2px solid var(--auth-color-focus); outline-offset: 1px; }
.au-lanceur-pastille { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 9px; background: var(--au-pastille, var(--auth-color-ink-secondary)); color: var(--auth-color-surface); font: 600 0.9375rem/1 var(--auth-font-family); }
/* Chaque application garde sa couleur dans le lanceur, comme dans la barre du haut (relevé de navigation du 01/11 : tuiles toutes grises,
   Clients, Commission et Chantiers impossibles à distinguer). Les applications sans couleur propre restent en ardoise. */
.au-lanceur-app[data-application='accueil'] { --au-pastille: var(--auth-app-hub); }
.au-lanceur-app[data-application='clients'] { --au-pastille: var(--auth-app-crm); }
.au-lanceur-app[data-application='devis'] { --au-pastille: var(--auth-app-devis); }
.au-lanceur-app[data-application='commission'] { --au-pastille: var(--auth-app-commission); }
.au-lanceur-app[data-application='performance'] { --au-pastille: var(--auth-app-performance); }
.au-lanceur-app[data-application='chantiers'] { --au-pastille: var(--auth-app-tech); }
.au-lanceur-app[data-application='vehicules'] { --au-pastille: var(--auth-app-tech); }
.au-lanceur-app[data-application='marketing'] { --au-pastille: var(--auth-app-marketing); }
.au-lanceur-app[data-application='formation'] { --au-pastille: var(--auth-app-formation); }
.au-lanceur-app[data-application='serenite'] { --au-pastille: var(--auth-app-serenite); }
.au-lanceur-app[data-application='forme'] { --au-pastille: var(--auth-app-serenite); }
.au-lanceur-app[data-application='equipe'] { --au-pastille: var(--auth-app-hub); }
.au-lanceur-app[data-application='pulse'] { --au-pastille: var(--auth-app-pulse); }
.au-lanceur-texte { display: grid; gap: 0; min-width: 0; }
.au-lanceur-nom { font: 600 0.9375rem/1.25 var(--auth-font-family); }
.au-lanceur-desc { font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); }
.au-lanceur-pied { margin: var(--auth-space-4) 0 0; }
.au-lanceur-vide { color: var(--auth-color-ink-secondary); }
.au-lanceur-plus { display: none; }
/* Panneau « Demander à l’IA » : le chat de l’Assistant IA (cadre) ou le lien vers lui */
.au-ia-chat { flex: 1; width: 100%; min-height: 0; border: 0; border-top: 1px solid var(--auth-color-line); }
.au-ia-chat[hidden], .au-ia-lien[hidden], .au-ia-pied[hidden] { display: none; }
.au-ia-lien { padding: var(--auth-space-5); display: grid; gap: var(--auth-space-3); justify-items: start; }
.au-ia-pied { margin: 0; padding: var(--auth-space-2) var(--auth-space-4); font: var(--auth-font-caption); }
@media (max-width: 1100px) { .au-lanceur-familles { grid-template-columns: repeat(2, minmax(0, 1fr)); } html[data-coque='v5'] .au-topbar-search { width: auto; margin-inline: 0 auto; } }
@media (max-width: 760px) {
  html[data-coque='v5'] .au-topbar { padding-inline: var(--auth-space-2); gap: var(--auth-space-1); }
  html[data-coque='v5'] .au-topbar-search { width: 40px; margin: 0; background: none; justify-content: center; }
  html[data-coque='v5'] .au-topbar-actions { gap: 0; }
  .au-topbar-apps { --ib: 44px; width: 44px; height: 44px; border-color: transparent; background: none; }
  .au-topbar-marque { min-height: 44px; padding-inline: 0 2px; } /* HUB-AFFICHAGE-1 : de la place pour le nom */
  .au-topbar-app { font-size: 1rem; }
  dialog.au-lanceur { margin: 0; width: 100%; max-width: 100%; height: 100svh; max-height: 100svh; border-radius: 0; border: 0; padding: var(--auth-space-4) var(--auth-space-4) calc(var(--auth-space-6) + env(safe-area-inset-bottom)); }
  .au-lanceur-tete { display: flex; }
  .au-lanceur-plus { display: block; margin-bottom: var(--auth-space-3); }
  .au-lanceur-plus .au-lanceur-titre { margin-top: 0; }
  .au-lanceur-familles { grid-template-columns: minmax(0, 1fr); }
  .au-bottom-nav [data-applications] svg { width: 22px; height: 22px; }
  .au-bottom-nav [data-applications][aria-current='page'] { color: var(--auth-accent); font-weight: 600; box-shadow: inset 0 2px 0 var(--auth-accent); }
}

/* HUB-AFFICHAGE-1 (22/10) : un texte long (raison sociale, courriel, adresse web, montant) reste DANS son encart. Enfants de grille et de flex : min-width 0 ;
   mots sans espace : coupure n'importe où ; la ligne qui doit rester unique est coupée par une ellipse (le texte complet est en infobulle, posé par le composant). */
.au-card, .au-card > *, .au-widget > *, .au-widget-titre, .au-widget-valeur, .au-widget-detail, .au-widget-message, .au-vide-phrase, .au-vide-titre, .au-metric-label, .au-metric-value { min-width: 0; overflow-wrap: anywhere; }
.au-widget-action { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Lignes de liste du Hub (`.rows`) : même règle pour les textes longs. */
.rows > * > :not(.todo-actions) { min-width: 0; overflow-wrap: anywhere; } .rows > * > .todo-actions { flex: 0 1 auto; } .rows dt, .rows dd, .greeting h1, .greeting p, .section-title { overflow-wrap: anywhere; }

/* ── Direction visuelle B « Métier et visuelle » (D-ERP-113 ; 22/10 sur l'accueil du Hub, commune à la suite le 23/10) ──
   Sol pierre et encres chaudes : tokens.css. Ici : bandeau chaleureux, chiffres en relief qui le chevauchent, vignette photo
   des listes métier (demande, client, chantier), carte (carte.js). Rien de propre à une société. */
.au-hero, .acc-hero { position: relative; overflow: hidden; margin: 0 0 -44px; padding: 32px 32px 76px; border-radius: 20px;
  color: var(--auth-color-on-hero); background: var(--auth-hero-gradient); align-items: flex-start; }
.au-hero::after, .acc-hero::after { content: ''; position: absolute; right: -10px; bottom: -6px; width: 420px; height: 150px; opacity: .22; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 150'%3E%3Cpath d='M20 150 L140 50 L260 150Z' fill='white'/%3E%3Cpath d='M170 150 L300 20 L420 150Z' fill='white'/%3E%3Crect x='110' y='92' width='52' height='58' fill='white' opacity='.6'/%3E%3C/svg%3E") no-repeat right bottom / contain; }
.au-hero :is(h1, h2, .au-h1, .au-page-title), .acc-hero h1 { color: var(--auth-color-on-hero); margin: 0; }
.au-hero p, .acc-hero p { color: rgb(255 255 255 / .88); margin: var(--auth-space-2) 0 0; max-width: 60ch; }
.au-hero > *, .acc-hero > * { position: relative; z-index: 1; }
.au-hero + *, .acc-hero + *, .acc-hero ~ .acc-zones { position: relative; z-index: 1; }
.au-hero--sans-chiffres { margin-bottom: var(--auth-space-6); padding-bottom: 32px; }
.au-hero-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--auth-space-3); padding-inline: 16px; margin-bottom: var(--auth-space-6); }
.au-hero-chiffres > * { background: var(--auth-color-surface); border-radius: 14px; padding: 16px 18px; box-shadow: 0 8px 24px rgb(60 40 20 / .14); min-width: 0; }
.au-hero-chiffres b { display: block; font: 700 1.75rem/1.1 var(--auth-font-family); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--auth-color-ink); overflow-wrap: anywhere; }
.au-hero-chiffres span { display: block; margin-top: 4px; font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); overflow-wrap: anywhere; }
.acc-zones .acc-bandeau { padding-inline: 16px; }
.acc-zones .au-widget, .au-widget { border-color: transparent; border-radius: 16px; background: var(--auth-color-surface); box-shadow: var(--auth-shadow-1); }
.acc-zones .acc-bandeau .au-widget { box-shadow: 0 8px 24px rgb(60 40 20 / .14); }
.acc-zones .au-widget-valeur { color: var(--auth-color-ink); }
.acc-zones .au-widget-titre { color: var(--auth-color-ink-tertiary); }

/* Vignette photo : une demande, un client, un chantier se reconnaissent à leur image. Sans photo : le motif pierre et
   l'icône du métier (jamais une fausse photo). <span class="au-vignette"><img src alt=""></span> ou data-vide + texte court. */
.au-vignette { flex: none; inline-size: var(--au-vignette, 56px); block-size: var(--au-vignette, 56px); border-radius: 10px; overflow: hidden;
  display: grid; place-items: center; text-align: center; color: #6b5236; font: 500 11px/1.2 var(--auth-font-family);
  background: repeating-linear-gradient(135deg, #e3d4bb 0 6px, #d9c6a8 6px 12px); }
.au-vignette > img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
.au-vignette > svg { inline-size: 24px; block-size: 24px; opacity: .8; }
.au-vignette--petite { --au-vignette: 40px; border-radius: 8px; }
.au-vignette--grande { --au-vignette: 88px; border-radius: 14px; }
/* Liste visuelle : vignette + titre + détail, une ligne = un geste (lien ou bouton couvrant). */
.au-liste-visuelle { list-style: none; margin: 0; padding: 0; }
.au-liste-visuelle > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--auth-color-line); position: relative; }
.au-liste-visuelle > li:first-child { border-top: 0; }
.au-liste-visuelle .au-lv-titre { font: var(--auth-font-label); font-weight: 600; color: var(--auth-color-ink); min-width: 0; overflow-wrap: anywhere; }
.au-liste-visuelle .au-lv-titre a { color: inherit; text-decoration: none; } .au-liste-visuelle .au-lv-titre a::after { content: ''; position: absolute; inset: 0; }
.au-liste-visuelle .au-lv-titre a:focus-visible { outline: none; } .au-liste-visuelle > li:has(a:focus-visible) { outline: 2px solid var(--auth-color-focus); outline-offset: 2px; border-radius: 8px; }
.au-liste-visuelle > li:hover { background: var(--auth-color-fill-hover); }
.au-liste-visuelle .au-lv-detail { display: block; font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); overflow-wrap: anywhere; margin-top: 2px; }
.au-liste-visuelle .au-lv-fin { font: var(--auth-font-caption); color: var(--auth-color-ink-tertiary); white-space: nowrap; }
.au-lv-manque { color: var(--auth-color-warning); font-weight: 500; }

/* Carte (carte.js) : points sur un fond de plan IGN (Géoplateforme, données publiques) ; sans fond, le sol pierre. */
.au-carte { position: relative; overflow: hidden; border-radius: 12px; background: #e8dcc6; block-size: var(--au-carte-h, 280px); touch-action: none; user-select: none; }
.au-carte-tuiles { position: absolute; inset: 0; } .au-carte-tuiles img { position: absolute; inline-size: 256px; block-size: 256px; max-width: none; filter: sepia(.25) saturate(.8); }
.au-carte-point { position: absolute; transform: translate(-50%, -100%); border: 0; cursor: pointer; background: var(--auth-brand-red, #cb2436); color: #fff;
  font: 600 11px/1 var(--auth-font-family); border-radius: 10px; padding: 4px 7px; white-space: nowrap; box-shadow: 0 2px 6px rgb(60 40 20 / .3); }
.au-carte-point[data-ton='ok'] { background: var(--auth-color-success); } .au-carte-point[data-ton='info'] { background: var(--auth-color-action); }
.au-carte-point:focus-visible { outline: 2px solid #fff; box-shadow: 0 0 0 4px var(--auth-color-focus); }
.au-carte-zoom { position: absolute; right: 8px; top: 8px; display: grid; gap: 4px; z-index: var(--auth-z-raised); }
.au-carte-zoom button { inline-size: 32px; block-size: 32px; border: 0; border-radius: 8px; background: var(--auth-color-surface); color: var(--auth-color-ink); font: 600 16px/1 var(--auth-font-family); box-shadow: var(--auth-shadow-1); cursor: pointer; }
.au-carte-source { position: absolute; left: 6px; bottom: 4px; z-index: var(--auth-z-raised); font: 400 10px/1.2 var(--auth-font-family); color: #555e6b; background: rgb(255 255 255 / .75); padding: 2px 5px; border-radius: 4px; }
.au-carte-liste { margin: var(--auth-space-2) 0 0; padding: 0; list-style: none; font: var(--auth-font-caption); color: var(--auth-color-ink-secondary); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.au-carte-vide { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px; font: var(--auth-font-caption); color: #555e6b; }

@media (max-width: 700px) { .au-hero, .acc-hero { padding: 22px 18px 64px; border-radius: 16px; } .au-hero::after, .acc-hero::after { width: 240px; height: 90px; }
  .au-hero-chiffres, .acc-zones .acc-bandeau { padding-inline: 8px; } .au-hero-chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); } .au-carte { --au-carte-h: 220px; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .au-hero-chiffres > * { box-shadow: var(--auth-shadow-1); }
  :root:not([data-theme='light']) .au-carte { background: #2a2620; } :root:not([data-theme='light']) .au-carte-tuiles img { filter: invert(.9) hue-rotate(180deg) sepia(.2); }
  :root:not([data-theme='light']) .au-vignette { background: repeating-linear-gradient(135deg, #3a3329 0 6px, #332c23 6px 12px); color: #d9c6a8; } }
:root[data-theme='dark'] .au-carte { background: #2a2620; } :root[data-theme='dark'] .au-vignette { background: repeating-linear-gradient(135deg, #3a3329 0 6px, #332c23 6px 12px); color: #d9c6a8; }
html:has(.acc-zones) .intel-bg { display: none; } /* le fond vivant (gris) recouvrait le fond chaud */

/* ── TÉLÉPHONE (23/10, Daniel : « inutilisable en mode tel : superpositions, mauvaise proportion des cartes et boutons,
   ordonnancement, taille, disposition ») — la coque d'abord, commune à tous les onglets. Mesuré à 390 × 844 en production :
   « Créer » et « IA » en gros carrés bordés à côté d'icônes nues, profil à deux icônes, nom de l'onglet sous la loupe,
   barre du haut plus haute que sa réserve (le titre passait dessous). Règle : UNE rangée d'icônes de 44 px sans bord,
   le nom s'efface en ellipse, le profil est une pastille ronde, le titre respire sous la barre. ── */
@media (max-width: 760px) {
  html[data-coque='v5'] .au-topbar { height: var(--au-topbar-h); min-height: 0; max-height: var(--au-topbar-h); overflow: hidden; }
  html[data-coque='v5'] .au-topbar-gauche { flex: 1 1 auto; min-width: 0; }
  html[data-coque='v5'] .au-topbar-actions { flex: 0 0 auto; margin-left: 0; }
  .au-topbar-marque { min-width: 0; flex: 1 1 auto; }
  .au-topbar-app { min-width: 0; }
  html[data-coque='v5'] .au-topbar-actions .au-topbar-btn,
  html[data-coque='v5'] .au-topbar-actions .au-icon-btn { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; margin: 0;
    border: 0; border-radius: 10px; background: none; box-shadow: none; display: inline-grid; place-items: center; color: var(--auth-color-ink); }
  html[data-coque='v5'] .au-topbar-actions .au-topbar-btn .au-topbar-label { display: none; }
  html[data-coque='v5'] .au-topbar-actions .au-topbar-btn svg, html[data-coque='v5'] .au-topbar-actions .au-icon-btn svg { width: 20px; height: 20px; }
  html[data-coque='v5'] .au-topbar-actions .au-menu-anchor { display: inline-grid; }
  /* Profil : une pastille ronde de 36 px visibles dans une cible de 44, sans l'icône que certaines applications y ajoutaient. */
  html[data-coque='v5'] .au-topbar-profil { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; }
  html[data-coque='v5'] .au-topbar-profil > :is(button, a) { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 4px; border-radius: 50%;
    border: 0; display: inline-grid; place-items: center; overflow: hidden; background: var(--auth-color-fill); background-clip: content-box; /* cible de 44, pastille visible de 36 */ font: 600 0.75rem/1 var(--auth-font-family); color: var(--auth-color-ink); }
  html[data-coque='v5'] .au-topbar-profil > :is(button, a) svg { display: none; }
  html[data-coque='v5'] .au-topbar-profil > :is(button, a)::before { content: none; }
  /* Le contenu commence SOUS la barre, avec de l'air : jamais un titre collé ou recouvert. */
  html[data-coque='v5'] :is(.au-main, .au-content, main) > :first-child { margin-top: 0; }
  html[data-coque='v5'] .au-content, html[data-coque='v5'] .au-main { padding-top: var(--auth-space-5); }
  /* Rangées qui défilent (onglets, pastilles, filtres) : elles défilent DANS leur bande, avec un fondu qui dit « il y a la suite »,
     jamais la page entière ; le geste reste au pouce (44 px). */
  :is(.au-tabs, .au-segmented, .au-pills, .au-chips, .au-filter-chips, [role='tablist']):not(.au-bottom-nav) { overflow-x: auto; overflow-y: hidden; flex-wrap: nowrap;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; max-width: 100%;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  :is(.au-tabs, .au-segmented, .au-pills, .au-chips, .au-filter-chips, [role='tablist'])::-webkit-scrollbar { display: none; }
  :is(.au-tabs, .au-segmented, .au-pills, .au-chips, .au-filter-chips, [role='tablist']) > * { flex: none; }
  /* Tableaux non repliés en cartes : ils défilent dans leur carte, la page ne déborde jamais ; un tableau ne s'écrase pas sous sa largeur utile. */
  .au-table-wrap, .au-card:has(> table), .au-card:has(> .au-table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.au-table:not(.au-table--cartes) { min-width: 100%; }
  /* États vides, alertes, cartes : le texte se plie, il ne sort jamais de son encart. */
  :is(.au-empty, .au-vide, .au-alert, .au-card, .au-widget) :is(p, h2, h3, span, strong) { overflow-wrap: anywhere; min-width: 0; }
  .au-card { padding: var(--auth-space-4); border-radius: 14px; }
  /* Boutons d'une rangée d'actions : la rangée se plie, l'action principale prend la ligne entière. */
  .au-page-head .au-btn--primary, .au-toolbar > .au-btn--primary:only-of-type { width: 100%; justify-content: center; }
}
@media (max-width: 420px) { html[data-coque='v5'] .au-topbar-marque:has(.au-topbar-app:not(:empty)) .au-topbar-pastille-app { display: none; } }
/* Relevé du 01/11 : « Marketi… », « Performan… », « Devis & fa… » à 390. Les cinq boutons gardent 44 px (R22) mais se touchent (icônes sans
   bordure), le bouton Applications se rapproche du nom (4 px), et une application à nom long montre sa forme courte (`court`, applications.js) ;
   le texte lu reste le nom entier. Taille du nom inchangée (16 px : R13, échelle typographique). */
@media (max-width: 420px) {
  html[data-coque='v5'] .au-topbar-actions { gap: 0; }
  html[data-coque='v5'] .au-topbar-gauche { gap: var(--auth-space-1); }
  html[data-coque='v5'] .au-topbar-app[data-court] { font-size: 0; }
  html[data-coque='v5'] .au-topbar-app[data-court]::after { content: attr(data-court); font-size: 1rem; }
} /* le nom de l'onglet passe avant sa lettre (« Clie… » à 390) */

/* ── BARRE DE FILTRES COMMUNE (23/10, Daniel : « les menus de filtre sont catastrophiques — disposition, ordonnancement,
   taille des boutons, proportion — dans tous les onglets »). Une seule forme pour toute la suite :
     [recherche] [Filtres (n)] [+ Filtre] [pastilles actives ×] [Effacer] ······ [tri] [compteur / pages]
   Une rangée, une hauteur (40 px ; 44 au doigt), un ordre. Au téléphone : recherche + bouton Filtres sur la 1re ligne,
   pastilles actives qui défilent en dessous, le reste à droite de la 3e ligne.
   Balisage : <div class="au-filtres"> … <span class="au-filtres-fin">…</span></div> ; une pastille active :
   <span class="au-pastille-filtre">Client : dupont <a|button aria-label="Retirer…">×</a></span>.
   Menu : <dialog class="au-drawer au-filtres-tiroir"> sections <fieldset class="au-choix"> (cases → boutons à toucher),
   pied collant « Effacer » / « Afficher les résultats ». ── */
.au-filtres { display: flex; flex-wrap: wrap; align-items: center; gap: var(--auth-space-2); margin: 0 0 var(--auth-space-3); min-width: 0; }
.au-filtres :is(.au-btn, .au-chip, .au-input, .au-select, select, input[type='search'], input[type='text']) { height: 40px; min-height: 40px; box-sizing: border-box; }
.au-filtres .au-chip { padding-inline: var(--auth-space-3); border-radius: 10px; border-style: solid; font: var(--auth-font-label); }
.au-filtres-recherche, .au-filtres > input[type='search'], .au-filtres > .au-input[type='search'] { flex: 0 1 320px; min-width: 180px; }
.au-filtres > [role='search'], .au-filtres > .au-filtres-recherche { order: -1; }
.au-filtres-recherche { display: flex; flex: 0 1 320px; min-width: 180px; } .au-filtres-recherche > :is(input, .au-input) { width: 100%; flex: 1; } /* la recherche ouvre toujours la rangée */
.au-filtres-fin { margin-left: auto; display: flex; align-items: center; gap: var(--auth-space-2); flex-wrap: wrap; min-width: 0; color: var(--auth-color-ink-secondary); font: var(--auth-font-caption); }
.au-filtres-compte { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--auth-color-action); color: var(--auth-color-on-action);
  font: 600 0.75rem/20px var(--auth-font-family); text-align: center; }
.au-pastille-filtre { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 4px 0 12px; border-radius: 999px; background: var(--auth-color-info-soft);
  color: var(--auth-color-info); font: 500 0.8125rem/1 var(--auth-font-family); white-space: nowrap; max-width: 280px; }
.au-pastille-filtre > :first-child:not(:last-child) { overflow: hidden; text-overflow: ellipsis; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; min-width: 0; } /* le libellé (texte ou bouton « modifier ») */
.au-pastille-filtre > :is(a, button):last-child { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; text-decoration: none; }
.au-pastille-filtre > :is(a, button):last-child:hover { background: rgb(0 0 0 / 0.06); }
.au-pastille-filtre > :is(a, button):last-child svg { width: 14px; height: 14px; }
.au-filtres-effacer { font: var(--auth-font-label); color: var(--auth-color-action); text-decoration: none; padding: 0 var(--auth-space-2); background: none; border: 0; cursor: pointer; }
/* Menu « Filtres » : sections nettes, choix en boutons alignés, pied qui reste visible. */
.au-filtres-tiroir .au-sheet-body { display: flex; flex-direction: column; gap: var(--auth-space-5); padding: var(--auth-space-5) var(--auth-space-6) 0; min-height: 100%; }
.au-choix { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: var(--auth-space-2); }
.au-choix > legend { width: 100%; padding: 0; margin: 0 0 var(--auth-space-2); font: 600 0.8125rem/1.3 var(--auth-font-family); color: var(--auth-color-ink); }
.au-choix > label { position: relative; display: inline-flex; align-items: center; gap: 0; height: 40px; padding: 0 var(--auth-space-4); border: 1px solid var(--auth-color-line-strong);
  border-radius: 10px; background: var(--auth-color-surface); font: var(--auth-font-label); color: var(--auth-color-ink); cursor: pointer; margin: 0; }
.au-choix > label > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; } /* la case couvre le bouton : clic, clavier et lecteur d'écran */
.au-choix > label:has(input:checked) { background: var(--auth-color-action); border-color: var(--auth-color-action); color: var(--auth-color-on-action); }
.au-choix > label:has(input:focus-visible) { outline: 2px solid var(--auth-color-focus); outline-offset: 2px; }
.au-choix > label:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.au-choix :is(.au-input, .au-select, select, input[type='text'], input[type='search'], input[type='date']) { height: 40px; flex: 1 1 200px; min-width: 0; }
.au-filtres-tiroir .au-sheet-foot { position: sticky; bottom: 0; margin: auto calc(-1 * var(--auth-space-6)) 0; background: var(--auth-color-surface); justify-content: space-between; }
@media (max-width: 760px) {
  .au-filtres { gap: var(--auth-space-2); }
  .au-filtres :is(.au-btn, .au-chip, .au-input, .au-select, select, input[type='search'], input[type='text']) { height: 44px; min-height: 44px; }
  .au-filtres-recherche, .au-filtres > input[type='search'], .au-filtres > .au-input[type='search'] { flex: 1 1 0; min-width: 0; }
  .au-filtres-actifs { order: 5; flex: 1 1 100%; display: flex; gap: var(--auth-space-2); overflow-x: auto; scrollbar-width: none; }
  .au-filtres-fin { order: 6; flex: 1 1 100%; justify-content: space-between; margin-left: 0; }
  .au-filtres-tiroir .au-sheet-body { padding-inline: var(--auth-space-4); }
  .au-filtres-tiroir .au-sheet-foot { margin-inline: calc(-1 * var(--auth-space-4)); flex-direction: row; }
  .au-filtres-tiroir .au-sheet-foot .au-btn { width: auto; flex: 1; }
}

/* Dans une fenêtre du Hub (coque-erp.js pose html[data-dans-hub]) : une seule barre du haut, celle du Hub. */
html[data-dans-hub] .au-topbar { display: none !important; }
html[data-dans-hub][data-coque='v5'] .au-shell { padding-top: 0; }
html[data-dans-hub][data-coque='v5'] .au-shell > .au-sidebar { top: 0; height: 100svh; }
html[data-dans-hub] .au-sidebar > .au-brand { display: none; }

/* ── MOUVEMENT B (23/10, Daniel : « l'ERP est plat et manque de vie ; du motion, des animations, des arrière-fonds qui bougent
   de manière gracieuse » ; référence Sérénité : courbe cubic-bezier(.2,.8,.2,1), entrées douces, halos, pression au doigt).
   Le fond vivant est monté par la coque (monterFondVivant). Tout est transform/opacity (composité, sans recalcul de mise en page),
   immobile avec prefers-reduced-motion, éteint sous un navigateur piloté (html[data-auto]) pour des mesures de banc stables. ── */
:root { --au-ease-vivant: cubic-bezier(.2, .8, .2, 1); }
/* Le fond vivant se voit : la coque devient transparente, le sol pierre passe au corps de page. */
body:has(> .au-ambient) { background: var(--auth-bg-gradient); background-color: var(--auth-color-bg); background-attachment: fixed; } /* la couleur de page reste sous le dégradé (audit page.fond) */
html:has(body > .au-ambient) :is(.au-shell, .au-main) { background: transparent; }
html:has(body > .au-ambient) .au-shell > .au-sidebar { background: color-mix(in srgb, var(--auth-color-bg) 72%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.1); backdrop-filter: blur(18px) saturate(1.1); }
html .au-ambient.au-ambient--b { --au-amb-1: #9fb0c4; --au-amb-2: #c98a62; --au-amb-3: #b9c4cf; --au-amb-strength: 26%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .au-ambient.au-ambient--b { --au-amb-1: #3a4a5c; --au-amb-2: #6b4630; --au-amb-3: #2c3846; --au-amb-strength: 26%; } }

@media (prefers-reduced-motion: no-preference) {
  html:not([data-auto]) :is(.au-content, .au-main > .au-content, main#contenu, main.au-page) > :not(script, style, dialog, template) {
    animation: au-monter .62s var(--au-ease-vivant) both;
  }
  html:not([data-auto]) :is(.au-content, main#contenu, main.au-page) > :nth-child(2) { animation-delay: 60ms; }
  html:not([data-auto]) :is(.au-content, main#contenu, main.au-page) > :nth-child(3) { animation-delay: 120ms; }
  html:not([data-auto]) :is(.au-content, main#contenu, main.au-page) > :nth-child(4) { animation-delay: 180ms; }
  html:not([data-auto]) :is(.au-content, main#contenu, main.au-page) > :nth-child(5) { animation-delay: 240ms; }
  html:not([data-auto]) :is(.au-content, main#contenu, main.au-page) > :nth-child(n + 6) { animation-delay: 300ms; }
  /* Les lignes d'un tableau et d'une liste visuelle arrivent en vague, les douze premières seulement. */
  html:not([data-auto]) :is(.au-table tbody, .au-liste-visuelle) > :nth-child(-n + 12) { animation: au-apparaitre .5s var(--au-ease-vivant) both; animation-delay: calc(var(--au-i, 0) * 28ms + 140ms); }
  /* Cartes et widgets : ils se soulèvent sous la main, s'enfoncent à la pression. */
  html:not([data-auto]) :is(a.au-card, .au-card--interactive, .au-widget, .au-hero-chiffres > *) { transition: transform .32s var(--au-ease-vivant), box-shadow .32s var(--au-ease-vivant); }
  html:not([data-auto]) :is(a.au-card, .au-card--interactive, .au-widget, .au-hero-chiffres > *):hover { transform: translateY(-3px); box-shadow: var(--auth-shadow-2); }
  html:not([data-auto]) :is(.au-btn, .au-chip, .au-icon-btn, .au-choix > label):active { transform: scale(.96); }
  html:not([data-auto]) :is(.au-btn, .au-chip, .au-icon-btn, .au-choix > label) { transition: transform .16s var(--au-ease-vivant), background-color .2s, border-color .2s, color .2s, box-shadow .2s; }
  /* Le bandeau respire : une lumière chaude glisse lentement sur lui (Sérénité, .hero::before). */
  html:not([data-auto]) :is(.au-hero, .acc-hero)::before { content: ''; position: absolute; inset: -40%; pointer-events: none; z-index: 0;
    background: radial-gradient(circle at 30% 20%, rgb(255 255 255 / .2), transparent 40%), radial-gradient(circle at 80% 90%, rgb(255 214 160 / .28), transparent 45%);
    animation: au-lumiere 18s ease-in-out infinite alternate; }
  /* Les chiffres en relief se posent après le bandeau. */
  html:not([data-auto]) :is(.au-hero-chiffres > *, .au-kpi-strip > *, .acc-bandeau .au-widget) { animation: au-poser .7s var(--au-ease-vivant) both; }
  html:not([data-auto]) :is(.au-hero-chiffres, .au-kpi-strip, .acc-bandeau) > :nth-child(2) { animation-delay: 80ms; }
  html:not([data-auto]) :is(.au-hero-chiffres, .au-kpi-strip, .acc-bandeau) > :nth-child(3) { animation-delay: 160ms; }
  html:not([data-auto]) :is(.au-hero-chiffres, .au-kpi-strip, .acc-bandeau) > :nth-child(n + 4) { animation-delay: 240ms; }
  /* Tiroirs et menus : ils glissent avec la même courbe. */
  html:not([data-auto]) .au-popover:not([hidden]) { animation: au-deplier .22s var(--au-ease-vivant) both; }
}
@keyframes au-monter { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
@keyframes au-apparaitre { from { opacity: 0; transform: translate3d(0, 6px, 0); } to { opacity: 1; transform: none; } }
@keyframes au-poser { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes au-deplier { from { opacity: 0; transform: translate3d(0, -4px, 0) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes au-lumiere { 0% { transform: translate3d(-4%, -2%, 0) rotate(0deg); } 100% { transform: translate3d(6%, 4%, 0) rotate(8deg); } }
html:has(body > .au-ambient) .intel-bg { display: none; } /* l'ancien fond gris du Hub cède la place au fond vivant chaud */
