/* (28/11/2026) Refonte UX, lot 5 (docs/audit/ux-refonte.md, 3.1 problèmes 6 à 8, 4.6) : harmonisation des composants.
   Chargée en dernier. Elle aligne l'apparence des anciennes classes sur les références :
   - en-tête de page : au plus 2 actions, le reste dans le menu « ⋯ » (.v-more, public/harmonie.js) ;
   - créatrice : le sélecteur du haut du menu, dit en clair dans la page (.ctx-one : « Fans de Jade · changer ») ;
   - onglets de page : .vtabs ; segments (période, vue, filtre exclusif) : ceux de Revenus (.fx3-seg) ;
   - tuile de chiffres : .sx-kpi (Revenus, tableau de bord) ; état vide : .v-none (une icône, une phrase, un bouton) ;
   - tableau : en-tête discret, lignes de 44 px, nombres à droite en chiffres tabulaires, en-tête collant.
   Les sélecteurs portent 3 #id (:is(#gs, .app), :is(#gs,*), :not(#hm-z)) pour passer devant les feuilles précédentes, qui en
   portent 2 (stylepro.css, graphite.css). Aucun comportement ne change. Hors périmètre : le téléphone de À reconquérir, Chat
   Center et Prospection (lot 6). Couleurs : jetons du thème (sombre et clair) et accent du compte (--acc). */

/* ---------- 1. La créatrice du sélecteur du haut, dite en clair (Fans, Listes, Réglages IA) ---------- */
html body :is(#gs, .app) .ctx-one:is(#gs,*):not(#hm-z) { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; width: fit-content; max-width: 100%;
  margin: 0 0 14px; padding: 7px 12px 7px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: 500 13px/1.3 Inter, sans-serif; color: var(--fg); }
html body :is(#gs, .app) .ctx-one[hidden]:is(#gs,*):not(#hm-z) { display: none !important; }
html body :is(#gs, .app) .ctx-one-av:is(#gs,*):not(#hm-z) { width: 22px; height: 22px; flex: none; border-radius: 50%; display: inline-grid; place-items: center;
  background: color-mix(in srgb, var(--acc) 18%, transparent); color: var(--acc-text, var(--acc)); font: 700 11px/1 Inter, sans-serif; }
html body :is(#gs, .app) .ctx-one-t:is(#gs,*):not(#hm-z) { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
html body :is(#gs, .app) .ctx-one-n:is(#gs,*):not(#hm-z) { font-size: 12px; color: var(--muted); }
html body :is(#gs, .app) .ctx-one-n:is(#gs,*):not(#hm-z)::before { content: "·"; margin-right: 8px; color: var(--muted-2, var(--muted)); }
html body :is(#gs, .app) .ctx-one-go:is(#gs,*):not(#hm-z) { font-size: 12.5px; font-weight: 600; }
/* dans l'en-tête de Réglages IA (à droite, à côté des actions) */
html body :is(#gs, .app) #vai-hub .ctx-one.vai-ctx:is(#gs,*):not(#hm-z) { margin: 0 0 0 auto; }

/* ---------- 2. En-tête de page : au plus 2 actions, puis le menu « ⋯ » ---------- */
html body :is(#gs, .app) .v-more:is(#gs,*):not(#hm-z) { position: relative; display: inline-flex; flex: none; }
html body :is(#gs, .app) .v-more[hidden]:is(#gs,*):not(#hm-z) { display: none !important; }
html body :is(#gs, .app) .v-more > .v-more-btn:is(#gs,*):not(#hm-z) { width: 34px; min-width: 34px; padding: 0 !important; display: inline-grid; place-items: center; }
html body :is(#gs, .app) .v-more > .v-more-btn svg:is(#gs,*):not(#hm-z) { width: 16px; height: 16px; fill: currentColor; stroke: none; }
html body :is(#gs, .app) .v-more.open > .v-more-btn:is(#gs,*):not(#hm-z) { border-color: var(--line-2) !important; background: var(--surface-3) !important; }
html body :is(#gs, .app) .v-more > .v-more-pop:is(#gs,*):not(#hm-z) { position: absolute; z-index: 60; top: calc(100% + 6px); right: 0; left: auto; min-width: 210px;
  display: grid; gap: 2px; padding: 6px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface);
  box-shadow: var(--shadow-lg, 0 18px 40px -12px rgba(0, 0, 0, .45)); }
html body :is(#gs, .app) .v-more > .v-more-pop.v-more-l:is(#gs,*):not(#hm-z) { right: auto; left: 0; }
html body :is(#gs, .app) .v-more > .v-more-pop[hidden]:is(#gs,*):not(#hm-z) { display: none !important; }
html body :is(#gs, .app) .v-more-pop > [role="menuitem"]:is(#gs,*):not(#hm-z) { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; min-height: 36px;
  padding: 0 10px !important; border: 0 !important; border-radius: 8px !important; background: transparent !important; box-shadow: none !important;
  color: var(--fg) !important; font: 500 13px/1 Inter, sans-serif !important; text-align: left; text-decoration: none !important; white-space: nowrap; cursor: pointer; }
html body :is(#gs, .app) .v-more-pop > [role="menuitem"]:is(:hover, :focus-visible):is(#gs,*):not(#hm-z) { background: var(--surface-3) !important; outline: none; }
html body :is(#gs, .app) .v-more-pop > [role="menuitem"][hidden]:is(#gs,*):not(#hm-z) { display: none !important; }

/* Créatrices : la recherche, l'état et l'affichage sous les chiffres (barre de filtres), plus dans l'en-tête */
html body :is(#gs, .app) .crx-bar:is(#gs,*):not(#hm-z) { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
html body :is(#gs, .app) .crx-bar > .crx-search:is(#gs,*):not(#hm-z) { flex: 0 1 320px; min-width: 200px; }
html body :is(#gs, .app) .crx-bar > .crx-view:is(#gs,*):not(#hm-z) { margin-left: auto; }

/* ---------- 3. Onglets et segments ---------- */
/* onglets de page : le dessin de .vtabs (texte gris, l'actif à l'encre souligné de 2 px) pour les barres restées à part */
html body :is(#gs, .app) :is(.co-tabs, .sm-subtabs):is(#gs,*):not(#hm-z) { display: flex; gap: 22px !important; padding: 0 !important; border: 0 !important; border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important; background: transparent !important; box-shadow: none !important; overflow-x: auto; scrollbar-width: none; }
html body :is(#gs, .app) :is(.co-tabs, .sm-subtabs) > button:is(#gs,*):not(#hm-z) { flex: none; height: auto !important; padding: 11px 0 !important; border: 0 !important; border-radius: 0 !important;
  background: transparent !important; box-shadow: none !important; color: var(--muted) !important; font: 500 13.5px/1.2 Inter, sans-serif !important; }
html body :is(#gs, .app) :is(.co-tabs, .sm-subtabs) > button:hover:is(#gs,*):not(#hm-z) { color: var(--fg) !important; }
html body :is(#gs, .app) :is(.co-tabs, .sm-subtabs) > button:is([aria-selected="true"], .on):is(#gs,*):not(#hm-z) { color: var(--fg) !important; font-weight: 600 !important; box-shadow: inset 0 -2px 0 var(--acc) !important; }
/* segments (période, vue, filtre exclusif) : le dessin de la barre de Revenus (.fx3-seg) ; pas ceux du lot 6 (Prospection,
   Chat Center), ni les onglets internes en pastilles des pages réunies (public/onglets.css) */
html body :is(#gs, .app) :is(.seg-mini, .ct-tabs, .fx-subseg, .sm-folder, .tm-seg, .db-seg, .seg):not(#tgp-tabs):not(.cc-days):is(#gs,*):not(#hm-z) {
  gap: 2px !important; padding: 2px !important; border: 1px solid var(--line) !important; border-radius: 9px !important; background: var(--surface-2) !important; box-shadow: none !important; }
html body :is(#gs, .app) :is(.seg-mini, .ct-tabs, .fx-subseg, .sm-folder, .tm-seg, .db-seg, .seg):not(#tgp-tabs):not(.cc-days) > button:is(#gs,*):not(#hm-z) {
  border: 0 !important; border-radius: 7px !important; background: transparent !important; box-shadow: none !important; color: var(--muted) !important; font: 500 12.5px/1 Inter, sans-serif !important; }
html body :is(#gs, .app) :is(.seg-mini, .ct-tabs, .fx-subseg, .sm-folder, .tm-seg, .db-seg, .seg):not(#tgp-tabs):not(.cc-days) > button:hover:is(#gs,*):not(#hm-z) { color: var(--fg) !important; }
html body :is(#gs, .app) :is(.seg-mini, .ct-tabs, .fx-subseg, .sm-folder, .tm-seg, .db-seg, .seg):not(#tgp-tabs):not(.cc-days) > button:is([aria-selected="true"], [aria-pressed="true"], [aria-checked="true"], .on, .active):is(#gs,*):not(#hm-z) {
  background: var(--pro-seg-on, var(--surface-3)) !important; color: var(--fg) !important; font-weight: 600 !important; box-shadow: 0 1px 2px rgba(20, 20, 19, .08), 0 0 0 1px var(--line) !important; }
:root:not([data-theme="light"]) body :is(#gs, .app) :is(.seg-mini, .ct-tabs, .fx-subseg, .sm-folder, .tm-seg, .db-seg, .seg):not(#tgp-tabs):not(.cc-days) > button:is([aria-selected="true"], [aria-pressed="true"], [aria-checked="true"], .on, .active):is(#gs,*):not(#hm-z) { box-shadow: none !important; }
html body :is(#gs, .app) :is(.seg-mini, .ct-tabs, .fx-subseg, .sm-folder, .tm-seg, .db-seg, .seg) > button em:is(#gs,*):not(#hm-z) { font-style: normal; color: var(--muted-2, var(--muted)); margin-left: 3px; }

/* ---------- 4. Tuiles de chiffres : le gabarit de .sx-kpi (Revenus, tableau de bord) ---------- */
html body :is(#gs, .app) :is(.kpis > .kpi, .gr-kpis > .gr-kpi, .iac-kpis > .iac-kpi, .fx-rev-kpis > div):is(#gs,*):not(#hm-z) {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 16px 15px !important; border: 1px solid var(--line) !important; border-radius: 12px !important; background: var(--surface) !important; }
html body :is(#gs, .app) :is(.kpis > .kpi > small, .gr-kpis > .gr-kpi > small, .iac-kpis > .iac-kpi > small, .fx-rev-kpis > div > small):is(#gs,*):not(#hm-z) {
  font: 500 12.5px/1.3 Inter, sans-serif !important; color: var(--muted) !important; letter-spacing: 0 !important; text-transform: none !important; }
html body :is(#gs, .app) :is(.kpis > .kpi > strong, .gr-kpis > .gr-kpi > b, .iac-kpis > .iac-kpi > b, .fx-rev-kpis > div > b):is(#gs,*):not(#hm-z) {
  font: 700 24px/1.1 var(--font-display, "Hanken Grotesk", Inter, sans-serif) !important; letter-spacing: -.015em; font-variant-numeric: tabular-nums; color: var(--fg) !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body :is(#gs, .app) :is(.kpis > .kpi > span, .gr-kpis > .gr-kpi > span, .iac-kpis > .iac-kpi > span):is(#gs,*):not(#hm-z) { font-size: 12px !important; line-height: 1.35; color: var(--muted-2, var(--muted)) !important; }
@media (max-width: 760px) {
  html body :is(#gs, .app) :is(.kpis > .kpi, .gr-kpis > .gr-kpi, .iac-kpis > .iac-kpi, .fx-rev-kpis > div):is(#gs,*):not(#hm-z) { padding: 12px 12px 13px !important; }
  html body :is(#gs, .app) :is(.kpis > .kpi > strong, .gr-kpis > .gr-kpi > b, .iac-kpis > .iac-kpi > b, .fx-rev-kpis > div > b):is(#gs,*):not(#hm-z) { font-size: 19px !important; }
}

/* ---------- 5. États vides : le gabarit de .v-none (une icône, une phrase, un bouton) ---------- */
html body :is(#gs, .app) :is(.ux-empty, div.empty:has(> b)):is(#gs,*):not(#hm-z) { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 44px 20px !important;
  text-align: center; border: 1px dashed var(--line-2) !important; border-radius: 12px !important; background: var(--surface) !important; color: var(--muted); }
html body :is(#gs, .app) .ux-empty > svg:is(#gs,*):not(#hm-z) { width: 44px; height: 44px; padding: 12px; margin-bottom: 4px; border-radius: 12px; box-sizing: border-box; fill: none; stroke: var(--acc-text, var(--acc)); stroke-width: 2;
  background: color-mix(in srgb, var(--acc) 14%, transparent); }
html body :is(#gs, .app) :is(.ux-empty > p, div.empty:has(> b) > p):is(#gs,*):not(#hm-z) { margin: 0 0 6px; max-width: 460px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
html body :is(#gs, .app) div.empty:has(> b) > b:is(#gs,*):not(#hm-z) { font: 600 16px/1.3 Inter, sans-serif; color: var(--fg); }

/* ---------- 6. Tableaux : en-tête discret et collant, lignes de 44 px, nombres à droite en chiffres tabulaires ---------- */
html body :is(#gs, .app) :is(.ls-tr, .vai-tr:not(.th)):is(#gs,*):not(#hm-z) { min-height: 44px; }
html body :is(#gs, .app) :is(.ls-th, .vai-tr.th):is(#gs,*):not(#hm-z) { position: sticky; top: 0; z-index: 2; background: var(--surface); }
html body :is(#gs, .app) .ls-tr > .ls-num:is(#gs,*):not(#hm-z) { justify-content: flex-end; text-align: right; font-variant-numeric: tabular-nums; }
html body :is(#gs, .app) .gr-table:is(#gs,*):not(#hm-z) th, html body :is(#gs, .app) .gr-table:is(#gs,*):not(#hm-z) td { height: 44px; }
html body :is(#gs, .app) .gr-table thead th:is(#gs,*):not(#hm-z) { position: sticky; top: 0; z-index: 1; background: var(--surface); }
html body :is(#gs, .app) .gr-table.num :is(td, th):not(:first-child):is(#gs,*):not(#hm-z) { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 7. Supervision : l'état en une phrase ; le même état en bandeau sur Publications ---------- */
html body :is(#gs, .app) .sup-band-w:is(#gs,*):not(#hm-z) { padding-bottom: 0 !important; }
html body :is(#gs, .app) .sup-band-w + .wrap:is(#gs,*):not(#hm-z) { padding-top: 12px !important; }
html body :is(#gs, .app) .sup-band:is(#gs,*):not(#hm-z) { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px 10px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); }
html body :is(#gs, .app) .sup-band-p:is(#gs,*):not(#hm-z) { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 3px 10px; border-radius: 999px;
  font: 600 12px/1.4 Inter, sans-serif; color: var(--hm-c); background: color-mix(in srgb, var(--hm-c) 14%, transparent); }
html body :is(#gs, .app) .sup-band-p > i:is(#gs,*):not(#hm-z) { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
html body :is(#gs, .app) .sup-band-t:is(#gs,*):not(#hm-z) { flex: 1 1 260px; min-width: 0; font-size: 13px; color: var(--muted); }
html body :is(#gs, .app) .sup-band.ok:is(#gs,*):not(#hm-z) { --hm-c: var(--ok, #69db7c); }
html body :is(#gs, .app) .sup-band.warn:is(#gs,*):not(#hm-z) { --hm-c: var(--warn, #f5b941); border-color: color-mix(in srgb, var(--warn, #f5b941) 40%, var(--line)); }
html body :is(#gs, .app) .sup-band.bad:is(#gs,*):not(#hm-z) { --hm-c: var(--danger, #ff8787); border-color: color-mix(in srgb, var(--danger, #ff8787) 45%, var(--line)); }

/* ---------- 8. Croissance › Vue d'ensemble : Recrutement vide en une ligne ---------- */
html body :is(#gs, .app) .gr-grid2.one:is(#gs,*):not(#hm-z) { grid-template-columns: minmax(0, 1fr) !important; }
html body :is(#gs, .app) .gr-recruit-line:is(#gs,*):not(#hm-z) { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); font-size: 13px; color: var(--muted); }
html body :is(#gs, .app) .gr-recruit-line > span:is(#gs,*):not(#hm-z) { flex: 1 1 240px; min-width: 0; }
html body :is(#gs, .app) .gr-recruit-line b:is(#gs,*):not(#hm-z) { color: var(--fg); font-weight: 600; }
html body :is(#gs, .app) .gr-recruit-line > .sx-ico:is(#gs,*):not(#hm-z) { width: 26px; height: 26px; }

/* ---------- 8 bis. Cartes d'une même rangée : même hauteur, et le contenu d'une carte courte réparti sur cette hauteur
   (pas de grand vide sous trois lignes à côté d'une courbe haute) ---------- */
/* Revenus › Vue d'ensemble : « D'où viennent les ventes » à côté de « Évolution » */
html body :is(#gs, .app) #view-banking .fx5-row > .card.fx5-from:is(#gs,*):not(#hm-z) { display: flex; flex-direction: column; }
html body :is(#gs, .app) #view-banking .fx5-row > .card.fx5-from > .fx5-src:is(#gs,*):not(#hm-z) { flex: 1 1 auto; align-content: space-evenly; }
html body :is(#gs, .app) #view-banking .fx5-row > .card.fx5-from > p:last-child:is(#gs,*):not(#hm-z) { margin-block: auto; }
/* Croissance › Vue d'ensemble : objectifs du mois ou recrutement à côté des clics par jour */
html body :is(#gs, .app) .gr-grid2 > .gr-panel:is(#gs,*):not(#hm-z) { display: flex; flex-direction: column; }
html body :is(#gs, .app) .gr-grid2 > .gr-panel > :is(.gr-goals, .gr-funnel):is(#gs,*):not(#hm-z) { flex: 1 1 auto; justify-content: space-evenly; }
html body :is(#gs, .app) .gr-grid2 > .gr-panel > .gr-empty-s:is(#gs,*):not(#hm-z) { margin-block: auto; }

/* ---------- 9. Paramètres : cartes et champs au même gabarit ---------- */
html body :is(#gs, .app) .set-body :is(.set-inline input, #lang-card select):is(#gs,*):not(#hm-z) { width: 240px; max-width: 100%; }
html body :is(#gs, .app) .set-body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), select):is(#gs,*):not(#hm-z) { min-height: 38px; }

/* ---------- 10. Téléphone ---------- */
@media (max-width: 760px) {
  html body :is(#gs, .app) .ctx-one:is(#gs,*):not(#hm-z) { margin-bottom: 12px; }
  html body :is(#gs, .app) #vai-hub .ctx-one.vai-ctx:is(#gs,*):not(#hm-z) { flex: 1 1 100%; width: auto; }
  html body :is(#gs, .app) .v-more > .v-more-btn:is(#gs,*):not(#hm-z) { width: 44px; min-width: 44px; height: 44px; }
  /* l'action pleine et le menu « ⋯ » sur une seule ligne (pas le menu seul sur une 2e ligne) */
  html body :is(#gs, .app) .viewbar > .viewbar-tools:has(> .v-more:not([hidden])):is(#gs,*):not(#hm-z) { flex-wrap: nowrap; }
  html body :is(#gs, .app) .viewbar > .viewbar-tools:has(> .v-more:not([hidden])) > :not(.v-more):not([hidden]):is(#gs,*):not(#hm-z) { flex: 1 1 auto; width: auto; min-width: 0; }
  html body :is(#gs, .app) .viewbar > .viewbar-tools > .v-more:is(#gs,*):not(#hm-z) { flex: none; width: auto; }
  html body :is(#gs, .app) .v-more-pop > [role="menuitem"]:is(#gs,*):not(#hm-z) { height: 44px; min-height: 44px; font-size: 14px !important; }
  html body :is(#gs, .app) .ctx-one-go:is(#gs,*):not(#hm-z) { min-height: 32px; display: inline-flex; align-items: center; }
  html body :is(#gs, .app) .sup-band > .btn-ghost:is(#gs,*):not(#hm-z) { min-height: 40px; }
  html body :is(#gs, .app) .set-body :is(.set-inline input, #lang-card select):is(#gs,*):not(#hm-z) { width: 100%; }
}
