/* Système de l'interface connectée (refonte du 06/11/2026, docs/2026-11-06-audit-interface.md ;
   le système est décrit dans docs/interface/README.md).
   Dernière feuille de `base.html`, après app.css, themes.css, dashboard.css et interface.css.
   Toute règle vise `html[data-charte]`, que seule `base.html` pose : la vitrine, les guides et
   les pages d'erreur gardent leurs feuilles, et l'attribut donne aux règles du système un cran
   de spécificité sur celles des feuilles plus anciennes. Celles-ci ont déjà perdu leurs
   capitales, leurs interlettrages, leurs italiques et leur serif d'affichage ; celle-ci pose les
   jetons, les surfaces, les composants et le mouvement. */

/* 1. Jetons ------------------------------------------------------------------ */
html[data-charte] {
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --d-rapide: 120ms;
  --d-base: 200ms;
  --d-sortie: 160ms;
  --d-decalage: 30ms;
  /* Un seul taux de teinte d'état, une valeur par usage. */
  --teinte: 12%;
  --anneau: 0 0 0 1px color-mix(in srgb, var(--ink) 9%, transparent), 0 1px 2px color-mix(in srgb, var(--ink) 5%, transparent);
  --anneau-fort: 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent), 0 6px 24px color-mix(in srgb, var(--ink) 12%, transparent);
  --filet-doux: color-mix(in srgb, var(--ink) 8%, transparent);
  --creux: color-mix(in srgb, var(--ink) 6%, var(--ground));
  --carte: var(--ground-2, var(--ground));
  --rayon: 10px;
  --rayon-petit: 7px;
  --texte-libelle: 12px;
  --texte-petit: 12px;
  --chiffres: var(--mono);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

/* 2. Typographie ------------------------------------------------------------- */
html[data-charte] body { font-family: var(--sans); }
html[data-charte] :is(h1, h2, h3, h4, legend, .section-title, .entry-name, .vedette-nom, .vignette-nom .nom, .marge-nom, .vname, .ears-marque, .wordmark, .erreur-titre) {
  font-family: var(--sans);
  font-style: normal;
  font-variant-numeric: lining-nums;
}
/* Le nom d'une voiture sur ses cartes (vedette, vignettes du garage et de
   l'atelier, collection) ne se coupe jamais dans un mot (affichage du
   05/12/2026, écart 235 de la traduction de l'outil) : il passe à la ligne
   entre deux mots, un mot à trait d'union tenu entier (`mots_entiers`,
   garage/templatetags/montants.py), et un mot trop long pour sa carte
   s'abrège par des points de suspension. Le corps coupe un mot qui ne tient
   pas seul (`overflow-wrap: break-word`, app.css) : « Mercedes-Benz » se
   coupait dans la vedette à 960 px. */
html[data-charte] :is(.entry-name, .vedette-nom, .vignette-nom .nom) {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
  text-overflow: ellipsis;
}
html[data-charte] .mot-entier { white-space: nowrap; }
html[data-charte] :is(h1, h2, h3, h4, .section-title, legend, .tabs a) em,
html[data-charte] :is(h1, h2, h3) i { font-style: normal; color: inherit; }
html[data-charte] :is(h1, h2, h3, h4, .section-title, legend) :is(em, i) { font-weight: inherit !important; font-family: inherit !important; font-style: normal !important; color: inherit !important; }
html[data-charte] .dashboard-app h1,
html[data-charte] .cover h1 { font-size: 28px; font-weight: 600; line-height: 1.25; }
html[data-charte] .dashboard-app :is(.bandeau-court, .bandeau-arc, .ouverture) h1 { font-size: 28px; font-weight: 600; }
html[data-charte] .dashboard-app h2,
html[data-charte] .dashboard-app .section-title,
html[data-charte] .dashboard-app .dashboard-section-head h2 { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ink); }
html[data-charte] .dashboard-app h3 { font-size: 13px; font-weight: 600; }
html[data-charte] .dashboard-app .content.court > h1,
html[data-charte] .dashboard-app main.content > h1:not(.rapport-titre),
html[data-charte] .dashboard-app main.content.court:has(> form > .form-actions > button.btn-danger:not(.trait)) > h1 { font-family: var(--sans); font-size: 28px; font-weight: 600; }
html[data-charte] .dashboard-app .groupe-titre { font-size: 15px; font-weight: 600; }
html[data-charte] .dashboard-app .section-title { margin: 36px 0 12px; }
/* Le complément d'un sous-titre : en gris, derrière un point médian. */
html[data-charte] .dashboard-app .section-title .compte,
html[data-charte] .complement { color: var(--ink-2); font-weight: 400; font-size: var(--texte-libelle); }
html[data-charte] .complement::before { content: "·"; margin: 0 .45em; color: var(--ink-faint); }

/* Les libellés : sans-serif, casse normale, 11 à 12,5 px. */
html[data-charte] .micro,
html[data-charte] .dashboard-app .metric-label,
html[data-charte] .dashboard-app table th,
html[data-charte] th,
html[data-charte] .dashboard-app .chiffres .metric-label {
  font-family: var(--sans);
  font-size: var(--texte-libelle);
  font-weight: 500;
  color: var(--ink-2);
}
/* La colonne seule : la barre du bas du téléphone garde son corps de 11 px (interface.css). */
@media (min-width: 721px) { html[data-charte] .dashboard-app .mast-nav a { font-size: 12px; } }
/* Les surtitres disparaissent : l'écran se nomme par son titre, l'espace par la colonne. */
html[data-charte] .dashboard-app .bandeau-surtitre:not(:has(a)),
html[data-charte] .eyebrow { display: none; }
html[data-charte] .dashboard-app .bandeau-surtitre:has(a) { color: var(--ink-2); font-weight: 500; font-size: var(--texte-libelle); }

/* Les chiffres : mono et colonnes égales dans les listes et les tableaux ; les
   grands chiffres restent dans la famille de texte, à chasse fixe. */
html[data-charte] .num { font-variant-numeric: tabular-nums lining-nums; }
html[data-charte] :is(td.num, td.montant, .colonne-montant, .vin, code, kbd) {
  font-family: var(--chiffres);
  font-size: .9em;
  font-variant-numeric: tabular-nums;
}
html[data-charte] .dashboard-app :is(.metric > strong, .chiffres strong, .fig .num, .fiche-marge .fig .num) {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 600;
  color: var(--ink);
}
/* Les grands chiffres suivent la largeur de leur bande (unités `cqi` d'accueil.css), à des
   bornes ramenées à la chasse de Manrope : un montant de dix chiffres tient sa case. */
html[data-charte] .dashboard-app .metric > strong { font-size: 28px; line-height: 1.2; }
html[data-charte] .dashboard-app .chiffres strong { font-size: 22px; font-size: clamp(18px, 2.5cqi, 28px); line-height: 1.2; }
@media (min-width: 1600px) { html[data-charte] .dashboard-app .chiffres strong { font-size: 28px; } }
@media (min-width: 721px) and (max-width: 923px) { html[data-charte] .dashboard-app .chiffres strong { font-size: 22px; font-size: clamp(18px, 4.5cqi, 28px); } }
@media (max-width: 720px) {
  html[data-charte] .dashboard-app .chiffres strong { font-size: 22px; font-size: clamp(15px, 5.2cqi, 22px); }
  html[data-charte] .dashboard-app .metric > strong { font-size: 22px; }
}
html[data-charte] .dashboard-app .tabs a[aria-current=true] { font-family: var(--sans); font-size: 12px; font-weight: 600; }
html[data-charte] .dashboard-app .tabs a::after { font-family: var(--sans); font-size: 12px; font-weight: 600; }

/* 3. Surfaces ---------------------------------------------------------------- */
/* Un conteneur se distingue par un anneau d'ombre léger, jamais par un cadre. */
html[data-charte] .dashboard-app :is(.encart, .encart-ia, .demande, .carte-promesse, .carte-erreur, .rapport-postes, .capture-card, fieldset.cases-groupe) {
  border: 0;
  border-radius: var(--rayon);
  background: var(--carte);
  box-shadow: var(--anneau);
}
/* Le groupe de cases devenu carte tient sa légende et ses cases à distance de
   son bord : sans remplissage, elles collaient à l'arête et la légende se
   posait à cheval sur le haut de la carte (retour du 25/11). La légende
   flotte sur toute la largeur pour se ranger dans la carte, comme un titre,
   au lieu de rester dans l'arête que le navigateur lui réserve. */
html[data-charte] .dashboard-app fieldset.cases-groupe { padding: 16px 20px 20px; }
html[data-charte] .dashboard-app fieldset.cases-groupe > legend { float: left; width: 100%; }
html[data-charte] .dashboard-app fieldset.cases-groupe > legend + * { clear: both; }
/* Un chiffre de synthèse est posé sur la page : un libellé, la valeur, son complément. Ni tuile,
   ni anneau, ni séparateur : l'écart entre deux chiffres les distingue. */
html[data-charte] .dashboard-app :is(.chiffres, .metrics) { gap: 0 48px; padding-block: 0; border: 0; }
html[data-charte] .dashboard-app .dashboard-metrics { gap: 24px 48px; padding-block: 0; border: 0; }
html[data-charte] .dashboard-app :is(.chiffres, .metrics, .dashboard-metrics) > *,
html[data-charte] .dashboard-app .dashboard-card.metric.metric { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
/* Un seul filet pour les rangées, à peine visible. */
html[data-charte] .dashboard-app .filet-row { border-bottom-color: var(--filet-doux); }
html[data-charte] .dashboard-app table :is(th, td) { border-color: var(--filet-doux); }
html[data-charte] .dashboard-app hr { border: 0; height: 0; margin: 24px 0; }

/* Les bannières : la teinte de fond au taux unique, sans filet ni cadre. */
html[data-charte] .dashboard-app .flash,
html[data-charte] .dashboard-app .muted.flash,
html[data-charte] .dashboard-app .alerte:not(.flash):where(p, div, section) {
  border: 0;
  border-radius: var(--rayon-petit);
  padding: 12px 16px;
  background: color-mix(in srgb, var(--ok) var(--teinte), transparent);
  color: var(--ink);
  box-shadow: none;
}
html[data-charte] .dashboard-app .flash.alerte,
html[data-charte] .dashboard-app .alerte:not(.flash):where(p, div, section) {
  background: color-mix(in srgb, var(--danger) var(--teinte), transparent);
}

/* 4. Badges : un badge n'existe que pour un problème. -------------------------- */
html[data-charte] .dashboard-app :is(.etat, .echeance-etat, .etiquette, .bandeau-pastille) {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink-2);
  font-size: var(--texte-libelle);
  font-weight: 500;
  box-shadow: none;
}
html[data-charte] .dashboard-app :is(.etat, .echeance-etat)::before { display: none; }
/* La rangée d'échéance (`_echeance_rangee.html`) : « aujourd'hui », « dans 12 j » et « faite le »
   se lisent en texte, au survol comme au repos ; seule l'échéance dépassée (`.echu`) garde sa pastille. */
html[data-charte] .dashboard-app a.echeance:not(.echu) > .echeance-etat,
html[data-charte] .dashboard-app .a-venir a.echeance:not(.echu):hover > .echeance-etat { padding: 0; border-radius: 0; background: none; color: var(--ink-2); }
/* La pastille d'un problème : teinte danger au taux unique posée sur la carte (opaque, pour
   que le contraste ne dépende pas du fond de dessous), texte danger assombri vers l'encre. */
html[data-charte] .dashboard-app :is(.badge-probleme, .etiquette.echu, a.echeance.echu > .echeance-etat) {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  line-height: 1.6;
  white-space: nowrap;
  background: color-mix(in srgb, var(--danger) var(--teinte), var(--carte));
  color: color-mix(in srgb, var(--danger) 82%, var(--ink));
  font-weight: 600;
}

/* 5. Boutons, contrôles segmentés, interrupteurs ------------------------------ */
/* Une tuile d'entrée (`.entree`, bouton ou lien) garde la forme des tuiles d'app.css. */
html[data-charte] .dashboard-app :is(button, .btn, .chip):not(.entree):not(:where(.filtrage, .raccourcis, .rapport-sources, .vedette-nav) *),
html[data-charte] .cover :is(button, .btn) {
  border-radius: var(--rayon-petit);
  font-size: 12px;
  font-weight: 600;
  transition: transform var(--d-rapide) var(--ease-out), background-color var(--d-rapide) var(--ease-out), color var(--d-rapide) var(--ease-out), box-shadow var(--d-rapide) var(--ease-out);
}
/* Pression à 0,97 sur tout bouton ; pas d'interpolation tant que c'est maintenu. */
html[data-charte] :is(button, .btn, .chip, [role=button], .segmente label, summary.bouton):active:not(:disabled) {
  transform: scale(.97);
  transition-duration: 0ms;
}
/* Bouton secondaire et pilule seule : un anneau intérieur à la couleur du filet des champs
   (3:1 sur le fond), sans bordure. Fond, encre et états (courant, éteint, survolé) restent ceux
   d'interface.css. Hors de la règle : les puces qui sont des libellés (filtres, raccourcis d'un
   champ, sources d'une analyse, choix d'un groupe, bandes de l'accueil), les tuiles d'entrée et
   les boutons discrets soulignés (« Annuler » d'un formulaire, pagination), et les gestes d'un menu « … », qui sont ses lignes. La bordure garde une
   épaisseur nulle à la couleur du filet : un bouton qui la lit (survol, contrastes forcés) la trouve. */
html[data-charte] .dashboard-app :is(.chip, button.chip):not(:where(.filtrage, .raccourcis, .rapport-sources, .pastilles, .segmente, .masthead, .ears, .installer, .ouverture, .prioritaire, .chiffres, .journal, .accueil-garage, .rangee-paire, .rangee-seule) *),
html[data-charte] .dashboard-app .btn:not(.btn-primary, .btn-danger, .premier, .entree):not(.pagination *):not(.form-actions > a.btn:first-child):not(.fiche-gestes .btn:nth-child(n+3), .menu-deroulant .btn),
html[data-charte] .dashboard-app button:not([type=submit], .btn-primary, .btn-danger, .premier, .trait, .chip, .entree, .icone, .lien, [class*=fleche], [aria-label]):not(:where(.masthead, .ears, .tabs, .segmente, .pagination) *) {
  border: 0 solid var(--filet-champ);
  box-shadow: inset 0 0 0 1px var(--filet-champ);
}
html[data-charte] .dashboard-app .btn-danger.trait {
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--danger);
  min-height: 44px;
  padding: 4px 8px;
}

/* Contrôle segmenté : fond en creux, segment actif en carte avec un anneau. */
html[data-charte] :is(.segmente, .dashboard-app .filtrage nav.filtres, .dashboard-app fieldset.pastilles > .pastilles-choix) {
  --segment-h: 44px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0;
  padding: 2px;
  border: 0;
  border-radius: calc(var(--rayon-petit) + 3px);
  background: var(--creux);
  max-width: 100%;
  width: max-content;
}
/* Au téléphone seul la rangée tient sur une ligne et défile, sa barre fine visible
   (au-delà elle passe à la ligne : tous les choix se lisent, revue du lot B de Composants). */
@media (max-width: 720px) {
  html[data-charte] :is(.segmente, .dashboard-app .filtrage nav.filtres) { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
}
html[data-charte] .dashboard-app fieldset.pastilles > legend { margin-bottom: 4px; }
html[data-charte] .dashboard-app fieldset.pastilles > legend + .errorlist { margin-top: 0; }
html[data-charte] :is(.segmente, .dashboard-app .filtrage nav.filtres, .dashboard-app fieldset.pastilles > .pastilles-choix) :is(a, label, button, .chip) {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--segment-h);
  height: auto;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: var(--rayon-petit) !important;
  background: none !important;
  box-shadow: none !important;
  color: var(--ink-2) !important;
  font-family: var(--sans) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  white-space: nowrap;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color var(--d-rapide) var(--ease-out), color var(--d-rapide) var(--ease-out), box-shadow var(--d-rapide) var(--ease-out), transform var(--d-rapide) var(--ease-out);
}
html[data-charte] :is(.segmente, .dashboard-app .filtrage nav.filtres, .dashboard-app fieldset.pastilles > .pastilles-choix) :is(a, label, button, .chip)::after { display: none !important; }
html[data-charte] :is(.segmente, .dashboard-app .filtrage nav.filtres, .dashboard-app fieldset.pastilles > .pastilles-choix) :is(a, label, button, .chip):hover { color: var(--ink) !important; }
html[data-charte] :is(.segmente, .dashboard-app .filtrage nav.filtres, .dashboard-app fieldset.pastilles > .pastilles-choix) :is(a[aria-current=true], a[aria-current=page], a.on, .chip.on, button[aria-pressed=true], button[aria-current=true], label:has(> input:checked)) {
  background: var(--carte) !important;
  color: var(--ink) !important;
  font-weight: 600 !important;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent), 0 1px 3px color-mix(in srgb, var(--ink) 12%, transparent) !important;
}
html[data-charte] :is(.segmente, .dashboard-app .filtrage nav.filtres, .dashboard-app fieldset.pastilles > .pastilles-choix) label > input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
html[data-charte] :is(.segmente, .dashboard-app .filtrage nav.filtres, .dashboard-app fieldset.pastilles > .pastilles-choix) label:has(> input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
html[data-charte] :is(.segmente, .dashboard-app .filtrage nav.filtres) :is(a, button):focus-visible { outline-offset: -2px; }
html[data-charte] :is(.segmente, .dashboard-app .filtrage nav.filtres, .dashboard-app fieldset.pastilles > .pastilles-choix) .num { font-size: 12px; color: var(--ink-2); }

/* Interrupteur : une case oui ou non et son libellé. Le bouton s'étire de 12 %
   pendant la pression, glisse en ease-in-out. */
html[data-charte] input[type=checkbox].interrupteur {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 34px;
  height: 20px;
  margin: 0 8px 0 0;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 22%, transparent);
  vertical-align: middle;
  cursor: pointer;
  transition: background-color var(--d-base) var(--ease-in-out);
}
html[data-charte] input[type=checkbox].interrupteur::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / .25);
  transform-origin: left center;
  transition: transform var(--d-base) var(--ease-in-out), width var(--d-rapide) var(--ease-out), left var(--d-base) var(--ease-in-out);
}
html[data-charte] input[type=checkbox].interrupteur:checked { background: var(--accent); }
html[data-charte] input[type=checkbox].interrupteur:checked::before { left: 16px; }
html[data-charte] input[type=checkbox].interrupteur:active::before { width: 18px; }
html[data-charte] input[type=checkbox].interrupteur:checked:active::before { left: 14px; }
html[data-charte] input[type=checkbox].interrupteur:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 6. Lisibilité ------------------------------------------------------------- */
/* Les notes de méthode se replient sous une ligne de résumé. */
html[data-charte] details.methode { margin: 8px 0 0; color: var(--ink-2); font-size: var(--texte-libelle); }
html[data-charte] details.methode > summary { cursor: pointer; list-style: none; color: var(--ink-2); }
html[data-charte] details.methode > summary::-webkit-details-marker { display: none; }
html[data-charte] details.methode > summary::after { content: "›"; display: inline-block; margin-left: 8px; transition: transform var(--d-rapide) var(--ease-out); }
html[data-charte] details.methode[open] > summary::after { transform: rotate(90deg); }
html[data-charte] details.methode > :not(summary) { margin: 8px 0 0; }
/* La décomposition s'écrit en équation. */
html[data-charte] .equation { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 8px; margin: 8px 0 4px; font-size: 13px; }
html[data-charte] .equation .terme { display: inline-flex; flex-direction: column; gap: 2px; }
html[data-charte] .equation .terme > span:first-child { color: var(--ink-2); font-size: 12px; }
html[data-charte] .equation { align-items: flex-end; }
html[data-charte] .equation .terme > strong { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; line-height: 1.4; }
html[data-charte] .equation .terme.total > strong { font-size: 22px; line-height: 1.2; }
html[data-charte] .equation .op { color: var(--ink-faint); font-size: 13px; line-height: 1.4; }
/* Une date de groupe, écrite une fois au-dessus des rangées qu'elle couvre. */
html[data-charte] .groupe-date { margin: 16px 0 2px; color: var(--ink-2); font-size: var(--texte-libelle); font-weight: 600; }

/* 7. Mouvement --------------------------------------------------------------- */
@keyframes mv-entree { from { opacity: 0; transform: translateY(4px); } }
@keyframes mv-pulsation {
  0% { background-color: color-mix(in srgb, var(--accent) 0%, transparent); }
  30% { background-color: color-mix(in srgb, var(--accent) var(--teinte), transparent); }
  100% { background-color: color-mix(in srgb, var(--accent) 0%, transparent); }
}
/* L'enveloppe d'une liste qui se recharge par le direct (lot D du direct
   partout) : sans boîte, ses enfants se rangent comme ceux de `main` ; les
   règles par enfant direct de `main.content` ont leur jumelle à travers elle. */
.zone-liste { display: contents; }
/* L'entrée de la vue, puis ses blocs et ses rangées décalés de 30 ms. */
html[data-charte].mv-entree main.content > :not(dialog, [role=dialog], [data-reveler]), html[data-charte].mv-entree main.content > :where(.zone-liste) > :not(dialog, [role=dialog], [data-reveler]) {
  animation: mv-entree var(--d-base) var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * var(--d-decalage));
}
/* Une zone rechargée par le direct (`data-direct-lot`) n'est pas une entrée
   de la vue : ni elle ni les enfants de son enveloppe ne rejouent le fondu
   (revue de qualité du lot D, Q5). Même spécificité, posée après. */
html[data-charte].mv-entree main.content > [data-direct-lot], html[data-charte].mv-entree main.content > :where(.zone-liste)[data-direct-lot] > * { animation: none; }
html[data-charte] .mv-bloc-entre { animation: mv-entree var(--d-base) var(--ease-out) both; animation-delay: calc(var(--i, 0) * var(--d-decalage)); }
html[data-charte] .mv-pulse { animation: mv-pulsation 900ms var(--ease-in-out) 1; border-radius: var(--rayon-petit); }

/* Menus déroulants (le compte, les suggestions) : 200 ms à l'entrée depuis leur
   déclencheur, sortie plus courte. */
html[data-charte] details.compte > :not(summary) {
  transform-origin: top right;
  animation: mv-popover var(--d-base) var(--ease-out) both;
}
@keyframes mv-popover { from { opacity: 0; transform: scale(.95) translateY(-2px); } }

/* Modales : de 0,95 à 1 depuis le déclencheur (`--origine` posé par le script),
   fond qui se fond ; la sortie est 20 % plus courte. */
html[data-charte] dialog { border: 0; border-radius: calc(var(--rayon) + 2px); background: var(--carte); color: var(--ink); box-shadow: var(--anneau-fort); padding: 24px; }
html[data-charte] dialog[open] { transform-origin: var(--origine, center); animation: mv-modale-entree var(--d-base) var(--ease-out); }
html[data-charte] dialog.mv-sort { animation: mv-modale-sortie var(--d-sortie) var(--ease-in-out) forwards; }
html[data-charte] dialog::backdrop { background: rgb(10 12 14 / .32); animation: mv-fondu var(--d-base) var(--ease-out); }
html[data-charte] dialog.mv-sort::backdrop { animation: mv-fondu-sortie var(--d-sortie) var(--ease-in-out) forwards; }
html[data-charte] [role=dialog][aria-modal=true]:not([hidden]):not(dialog) { transform-origin: var(--origine, center); animation: mv-modale-entree var(--d-base) var(--ease-out); }
html[data-charte] [role=dialog][aria-modal=true].mv-sort:not([hidden]):not(dialog) { animation: mv-modale-sortie var(--d-sortie) var(--ease-in-out) forwards; }
@keyframes mv-modale-entree { from { opacity: 0; transform: scale(.95); } }
@keyframes mv-modale-sortie { to { opacity: 0; transform: scale(.95); } }
@keyframes mv-fondu { from { opacity: 0; } }
@keyframes mv-fondu-sortie { to { opacity: 0; } }

/* Toast : glisse depuis le bas, repart plus vite. */
html[data-charte] .mv-toasts {
  position: fixed;
  z-index: var(--z-toast);
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  display: grid;
  gap: 8px;
  width: min(420px, calc(100vw - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}
html[data-charte] .mv-toast {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 12px 16px;
  border-radius: var(--rayon-petit);
  background: var(--carte);
  color: var(--ink);
  font-size: 13px;
  box-shadow: var(--anneau-fort);
  pointer-events: auto;
  animation: mv-toast-entree var(--d-base) var(--ease-out);
}
html[data-charte] .mv-toast .icon { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--ok); }
html[data-charte] .mv-toast.mv-sort { animation: mv-toast-sortie var(--d-sortie) var(--ease-in-out) forwards; }
@keyframes mv-toast-entree { from { opacity: 0; transform: translateY(12px); } }
@keyframes mv-toast-sortie { to { opacity: 0; transform: translateY(8px); } }

/* Bascule du thème : les deux icônes se croisent avec fondu, flou et rotation. */
html[data-charte] .bascule-theme { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; min-height: 44px; flex: none; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--ink-2); cursor: pointer; box-shadow: none; }
html[data-charte] .bascule-theme:hover { color: var(--ink); background: var(--creux); }
html[data-charte] .bascule-theme svg { grid-area: 1 / 1; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: opacity var(--d-base) var(--ease-in-out), filter var(--d-base) var(--ease-in-out), transform var(--d-base) var(--ease-in-out); }
html[data-charte] .bascule-theme .lune { opacity: 0; filter: blur(3px); transform: rotate(-90deg) scale(.6); }
html[data-charte][data-schema=dark] .bascule-theme .soleil { opacity: 0; filter: blur(3px); transform: rotate(90deg) scale(.6); }
html[data-charte][data-schema=dark] .bascule-theme .lune { opacity: 1; filter: none; transform: none; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--d-base, 200ms); animation-timing-function: var(--ease-in-out, ease-in-out); }

/* Les blocs chargés après coup gardent leur place pendant l'attente. */
html[data-charte] [hx-get][data-si-visible] { min-height: var(--reserve, 0px); }
html[data-charte] [hx-get].htmx-settling { animation: mv-entree var(--d-base) var(--ease-out); }

/* Mouvement réduit : rien ne glisse, rien ne grandit, rien ne transite ; les animations
   tombent à 1 ms pour que leur fin (`animationend`) arrive toujours. */
@media (prefers-reduced-motion: reduce) {
  html[data-charte] *,
  html[data-charte] *::before,
  html[data-charte] *::after,
  html[data-charte] ::backdrop {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition: none !important;
  }
  html[data-charte] :is(button, .btn, .chip, [role=button]):active { transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* 8. Écrans quotidiens ------------------------------------------------------- */
html[data-charte] .dashboard-app .raccourci.zero { color: var(--ink-faint); }
html[data-charte] .dashboard-app .raccourci.zero :is(strong, .icon) { color: var(--ink-faint); font-weight: 500; }
html[data-charte] .dashboard-app .date-du-jour { margin: -8px 0 20px; font-size: var(--texte-libelle); }
html[data-charte] .dashboard-app .groupe-titre:has(> .complement) { display: flex; align-items: baseline; gap: 0; }
html[data-charte] .dashboard-app .groupe-titre .complement .num { font-size: inherit; color: inherit; vertical-align: baseline; }
html[data-charte] .dashboard-app .groupe-titre.alerte > span:first-child { color: var(--danger); }
html[data-charte] .dashboard-app .groupe-date + .feuille { margin-top: 2px; }
/* Les replis : leur contenu se pose avec un léger décalage. */
html[data-charte] main.content details[open] > :not(summary) { animation: mv-entree var(--d-base) var(--ease-out) both; }
html[data-charte] main.content details[open] > :not(summary):nth-child(3) { animation-delay: var(--d-decalage); }
html[data-charte] main.content details[open] > :not(summary):nth-child(n+4) { animation-delay: calc(var(--d-decalage) * 2); }
/* Les photos réservent leur place avant d'arriver. */
html[data-charte] .dashboard-app :is(.vignette, .entry) img { aspect-ratio: 3 / 2; object-fit: cover; height: auto; }

html[data-charte] .dashboard-app .deadline-date { font-variant-numeric: tabular-nums; color: var(--ink-2); }
html[data-charte] .dashboard-app .mast-nav a[aria-current=page] > span:not([id]) { font-family: var(--sans); font-size: inherit; font-weight: 600; line-height: inherit; }
html[data-charte] .dashboard-app .masthead .wordmark .ears-marque { font-size: 15px; font-weight: 600; line-height: 1.3; }
html[data-charte] .dashboard-app .ears .ears-marque { font-size: 15px; font-weight: 600; }

/* Les gestes secondaires de la fiche : des liens d'accent, sans soulignement ni cadre. */
html[data-charte] .dashboard-app .fiche-gestes .btn:nth-child(n+3) { box-shadow: none; text-decoration: none; color: var(--accent-texte); padding-inline: 8px; }
html[data-charte] .dashboard-app .fiche-gestes .btn:nth-child(n+3):hover { background: none; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
/* La réglette des chiffres de la fiche : des chiffres posés, séparés par leur écart. */
html[data-charte] .dashboard-app .reglette {
  --ecart: 32px;
  gap: var(--ecart);
  border: 0;
  grid-template-columns: repeat(auto-fit, minmax(clamp((100% - (var(--cases, 4) - 1) * var(--ecart)) / var(--cases, 4), (var(--seuil-cases, 728px) - 100%) * 999, (100% - var(--ecart)) / 2), 1fr));
}
@media (max-width: 359px) { html[data-charte] .dashboard-app .reglette { grid-template-columns: minmax(0, 1fr); } }
html[data-charte] .dashboard-app .reglette .chiffre { padding: 0; border: 0 !important; border-radius: 0; background: none; box-shadow: none; }
/* La même, au poids des règles de conteneur de fiche.css (réglette de 820 px et plus). Écrite à
   part : un navigateur sans `:has()` rejetterait la règle entière et rendrait les marges de tuile. */
html[data-charte] .dashboard-app .reglette.fiche-bref:is(:has(> .chiffre:nth-of-type(5)), :not(:has(> .chiffre:nth-of-type(5)))) .chiffre { padding: 0; }
html[data-charte] .dashboard-app .groupe-date .badge-probleme { margin-left: 8px; font-size: 12px; }
/* Le graphique des douze mois : sous 360 px les noms abrégés se touchent à 11 px (l'interlettrage
   négatif qui les serrait est retiré) ; l'initiale s'affiche, le nom reste lu par la synthèse vocale. */
@media (max-width: 359px) {
  html[data-charte] .dashboard-app .graphique-libelle .mois-entier { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  html[data-charte] .dashboard-app .graphique-libelle::before { content: attr(data-initiale); }
}

/* 9. Impression -------------------------------------------------------------- */
@media print {
  html[data-charte] main.content > *, html[data-charte] main.content > :where(.zone-liste) > *, html[data-charte] .mv-bloc-entre, html[data-charte] details[open] > * { animation: none !important; opacity: 1 !important; transform: none !important; }
  html[data-charte] :is(.segmente, .dashboard-app .filtrage nav.filtres) :is(a, button, .chip):not([aria-current], [aria-pressed=true]) { display: none !important; }
  html[data-charte] .mv-toasts { display: none; }
}

/* Contrastes forcés : fonds et ombres s'effacent ; le segment courant se souligne. */
@media (forced-colors: active) {
  html[data-charte] :is(.segmente, .dashboard-app .filtrage nav.filtres, .dashboard-app fieldset.pastilles > .pastilles-choix) :is(a[aria-current=true], a.on, .chip.on, button[aria-pressed=true], button[aria-current=true], label:has(> input:checked)) {
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 4px;
  }
}
/* Le tri sous le contrôle segmenté : 8 px d'air, le filet du tri ne touche plus le creux. */
html[data-charte] .dashboard-app .filtrage .tri-groupe { margin-top: 8px; }
/* Le chiffre d'une case de la réglette suit la largeur de la réglette (son conteneur), à des
   bornes calées sur la chasse de Manrope : « 123 456 789 € » tient sa ligne dans une demi-réglette. */
html[data-charte] .dashboard-app .reglette .chiffre strong { font-size: clamp(16px, 5cqi, 22px); font-weight: 600; }
/* Le palier d'une valeur qui passe à la ligne (fiche.js, `strong.palier`) : un cran sous ses voisines,
   aux bornes de Manrope (fiche.css le calait sur Cormorant, plus haut que ses voisines). */
html[data-charte] .dashboard-app .fiche-bref .chiffre:nth-of-type(n) strong.palier { font-size: 15px; font-size: clamp(16px, 4.6cqi, 19px); font-weight: 500; }
@container reglette (min-width: 820px) {
  html[data-charte] .dashboard-app .fiche-bref .chiffre:nth-of-type(n) strong.palier { font-size: 15px; }
}
/* Les raccourcis d'un champ (sorties.js : dates, pilote) ont le corps des segments voisins. */
html[data-charte] .dashboard-app form .raccourcis button.chip { font-size: 12px; }

/* 10. Deuxième passe (10/11/2026) : une page de registre ---------------------------
   Tout se lit en rangées posées sur le papier ; seul ce qui flotte a une surface. */
/* Graisses : 600 au plus. `strong` et `b` valent 700 par défaut dans le navigateur. */
html[data-charte] :is(strong, b, th, dt, legend, summary) { font-weight: 600; }
/* Les chiffres seuls (jour d'une échéance, heure, compteur) à chasse fixe ; jamais sur une phrase. */
html[data-charte] .dashboard-app :is(.compte, .mast-nav .badge) { font-variant-numeric: tabular-nums lining-nums; }
/* Une heure ou un jour seuls gardent la chasse du texte : à chasse fixe le 1 de Manrope s'isole (« 1 1:00 »). */
html[data-charte] .dashboard-app .deadline-date { font-variant-numeric: lining-nums; }

/* La barre du haut : la recherche et le compte. La marque se lit une fois, en tête de colonne ;
   au téléphone, où la colonne devient la barre du bas, elle reste ici. */
html[data-charte] .dashboard-app .ears { min-height: 64px; border-bottom: 0; }
@media (min-width: 721px) {
  html[data-charte] .dashboard-app .ears .ears-identite > .ears-marque { display: none; }
}
/* Le champ de recherche est un champ : fond en creux, sans filet, la loupe à 12 px de son bord. */
html[data-charte] .dashboard-app .ears .search input[type=search] { border: 0; border-radius: var(--rayon-petit); background: var(--creux); }
html[data-charte] .dashboard-app .ears .champ-loupe .loupe { left: 12px; }
html[data-charte] .dashboard-app .ears .search .champ-loupe input[type=search] { padding-left: 36px; }
/* Le repère de l'espace : sans cadre ; le nom de la maison, déjà écrit par la marque en texte
   juste au-dessus, ne se répète pas. */
html[data-charte] .dashboard-app .dashboard-workspace { padding: 0 8px; border: 0; }
html[data-charte] .dashboard-app .masthead:has(> .wordmark .ears-marque) .dashboard-workspace strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html[data-charte] .dashboard-app .dashboard-workspace small { margin-top: 0; color: var(--ink-2); }
html[data-charte] .dashboard-app .dashboard-sidebar-foot { border-top: 0; }

/* Les têtes : l'espace les sépare de ce qui suit, sans filet. Les rangées gardent le leur. */
html[data-charte] .dashboard-app .bandeau-court { margin-bottom: 24px; padding-bottom: 0; border-bottom: 0; }
html[data-charte] .dashboard-app .a-venir-liste { border-top: 0; }
html[data-charte] .dashboard-app .date-du-jour { margin: -16px 0 32px; }

/* La pastille d'un problème se tait sous un titre qui le dit déjà (« Dépassées », « En retard ») :
   le retard d'un jour daté s'écrit en texte, à la couleur du danger. */
html[data-charte] .dashboard-app .groupe:has(> .groupe-titre.alerte) a.echeance.echu > .echeance-etat { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html[data-charte] .dashboard-app p.groupe-date > .badge-probleme.badge-probleme { margin-left: 0; padding: 0; border-radius: 0; background: none; font-size: var(--texte-libelle); font-weight: 500; }
html[data-charte] .dashboard-app p.groupe-date > .badge-probleme::before { content: "·"; margin: 0 8px; color: var(--ink-faint); }

/* La demande à l'assistant : un champ au corps du texte, sa consigne en placeholder. */
html[data-charte] .dashboard-app .demande textarea { font-size: 15px; line-height: 1.5; }

/* Les raccourcis de l'accueil : des rangées de lien, pictogramme et intitulé, sans filet de pied. */
html[data-charte] .dashboard-app :is(div, section).raccourcis { gap: 0 32px; padding: 0; border-bottom: 0; }
html[data-charte] .dashboard-app section.raccourcis { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 40px; }
html[data-charte] .dashboard-app :is(div, section).raccourcis > .raccourci { min-height: 44px; padding: 4px 0; }
html[data-charte] .dashboard-app :is(div, section).raccourcis > .raccourci strong { font-size: 13px; font-weight: 500; }
/* Les chiffres : le libellé, la valeur à 4 px, son complément. */
html[data-charte] .dashboard-app .chiffres { margin-top: 40px; margin-bottom: 24px; }
html[data-charte] .dashboard-app .chiffres strong { margin: 4px 0; }
html[data-charte] .dashboard-app .chiffres .metric-label { color: var(--ink-2); font-weight: 500; }
/* L'encart de la demande garde sa hauteur propre à côté de la liste. */
html[data-charte] .dashboard-app .prioritaire > .demande { align-self: start; padding: 24px; }
/* Le millésime du graphique : un texte, sans cadre. */
html[data-charte] .dashboard-app .graphique-annee { padding: 0; border: 0; color: var(--ink-2); }

/* La rangée d'une tâche au planning : la liste des membres s'envoie au choix (mouvement.js) ;
   son bouton reste le repli sans script, et ne se retire de l'écran que lorsque ce script a posé
   `data-envoi-auto` : une page dont le script ne s'est pas chargé garde son bouton. */
html[data-charte][data-envoi-auto] .dashboard-app form:has(> select[data-envoi]) > button[type=submit]:not(:focus-visible) { position: absolute; width: 1px; height: 1px; min-width: 0; min-height: 0; padding: 0; margin: -1px; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html[data-charte] .dashboard-app .filet-row[data-client][data-tache] > .gestes-client { min-width: 0; }

/* Les renvois d'un en-tête mènent ailleurs : des liens d'accent, tous de la même forme. L'aplat
   d'accent reste au geste principal de l'écran (`.btn.premier`, `.btn-primary`). */
html[data-charte] .dashboard-app .bandeau-renvois a.bandeau-renvois-lien,
html[data-charte] .dashboard-app .bandeau-renvois a:is(:first-child, :not(:first-child)) { padding-inline: 0; border-color: transparent; background: none; color: var(--accent-texte); font-weight: 500; text-decoration: none; }
html[data-charte] .dashboard-app .bandeau-renvois a:is(:first-child, :not(:first-child)):hover { border-color: transparent; background: none; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
html[data-charte] .dashboard-app .bandeau-renvois { gap: 8px 24px; }

/* La fiche : le titre et ses gestes partent du haut de la photo ; les chiffres en bref au cran des
   sous-chiffres (22 px), qui se resserre dans une réglette étroite ; les titres de la marge au cran
   des titres de section. */
html[data-charte] .dashboard-app header.fiche-bandeau { align-items: start; }
html[data-charte] .dashboard-app .fiche-bref:is(:has(> .chiffre:nth-of-type(5)), :not(:has(> .chiffre:nth-of-type(5)))) .chiffre strong:not(.palier) { font-size: 22px; font-size: clamp(16px, 5cqi, 22px); }
html[data-charte] .dashboard-app .marge-nom { font-size: 15px; font-weight: 600; }

/* Au téléphone les chiffres passent sur deux colonnes : une rangée se détache de la suivante,
   et une rangée de tâche sans heure ne garde pas la place vide de l'heure. */
@media (max-width: 720px) {
  html[data-charte] .dashboard-app .chiffres > * { padding-bottom: 16px; }
  html[data-charte] .dashboard-app .filet-row .deadline-date:empty { display: none; }
}

/* Les liens seuls d'une cellule, d'une définition ou d'un compte de section : une zone de clic
   de 12 px de plus en hauteur, invisible, qui ne déplace rien. Un lien pris dans une phrase garde sa ligne. */
html[data-charte] .dashboard-app main.content :is(td, dd) > a:only-child:not(.btn, .chip):not(:has(img, svg)),
html[data-charte] .dashboard-app main.content :is(.section-title .compte a, a.ajout, a.lien-discret) { position: relative; }
html[data-charte] .dashboard-app main.content :is(td, dd) > a:only-child:not(.btn, .chip):not(:has(img, svg))::after,
html[data-charte] .dashboard-app main.content :is(.section-title .compte a, a.ajout, a.lien-discret)::after { content: ""; position: absolute; inset: -6px 0; }
html[data-charte] .dashboard-app main.content details.methode > summary { padding-block: 4px; }
/* Un titre de section sans classe (bilan, rapports) est au cran des titres de section. */
html[data-charte] .dashboard-app main.content > h2:not([class]), html[data-charte] .dashboard-app main.content > :where(.zone-liste) > h2:not([class]),
html[data-charte] .dashboard-app main.content form h2:not([class]) { font-size: 15px; font-weight: 600; line-height: 1.35; }
/* Les chiffres d'un bilan ou d'un rapport : sans filet de pied, à distance de ce qui suit. */
html[data-charte] .dashboard-app main.content > :is(.chiffres, .metrics, .dashboard-metrics), html[data-charte] .dashboard-app main.content > :where(.zone-liste) > :is(.chiffres, .metrics, .dashboard-metrics) { margin-bottom: 40px; border: 0; }

/* Correctifs de la revue des gardes (11/11/2026). */
/* Les surtitres de la colonne à 12 px gardent l'interligne de 16 px : la colonne du client suivi
   par un concierge tient ses paliers de hauteur sans défiler. */
html[data-charte] .dashboard-app .dashboard-nav-label { line-height: 16px; }
@media (max-width: 720px) {
  /* La barre du bas garde ses 68 px avec des intitulés de 12 px : la barre fixe d'une fiche d'atelier se pose dessus. */
  html[data-charte] .dashboard-app .mast-nav > a,
  html[data-charte] .navigation-plus > summary { line-height: 13px; }
  /* Le jour de l'ouverture descend d'un cran au téléphone (accueil.css), devant la règle des titres d'écran. */
  html[data-charte] .dashboard-app .ouverture h1 { font-size: 22px; }
  /* 16 px : en dessous iOS agrandit la page à la prise de focus. */
  html[data-charte] .dashboard-app .demande textarea { font-size: 16px; }
}
/* Les valeurs du graphique aux deux bouts s'alignent sur leur bord : celle du mois en cours ne
   sort plus de la page à 320 px avec un montant à sept chiffres. */
html[data-charte] .dashboard-app .graphique-mois:last-child .graphique-valeur { justify-self: end; }
html[data-charte] .dashboard-app .graphique-mois:first-child .graphique-valeur { justify-self: start; }
/* Entre 924 et 999 px le graphique partage sa rangée avec la vedette : il prend un peu plus de
   la rangée, pour que douze noms de mois à 12 px tiennent sans se toucher. */
@media (min-width: 924px) and (max-width: 999px) {
  html[data-charte] .dashboard-app .journal { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.35fr); }
}

/* Un champ modifié dans une autre session pendant que le formulaire est
   ouvert (spec du direct partout, 6.7 ; réponse 6 de Vincent) : cadre à la
   couleur d'alerte, la valeur enregistrée dite dessous. La saisie reste. */
html[data-charte] .dashboard-app .direct-champ-modifie { outline: 2px solid var(--danger); outline-offset: 2px; }
html[data-charte] .dashboard-app .direct-enregistre { display: block; margin-top: 4px; color: color-mix(in srgb, var(--danger) 82%, var(--ink)); }
