/* apps-core 0.1.104 — module « console-menu » : gabarit commun des tableaux de la Super console (php/ConsoleTable.php ; audit des
   consoles § 5.4, RULES_ALL_APPS « Lisibilité des consoles »). Couleurs de l'app si elle les définit (--acc-* ou --surface / --text /
   --border), sinon couleurs du système ; clair et sombre (html[data-theme="dark"], html.dark, ou préférence du système).
   Règles : titre en haut de sa ligne ; aucune colonne de texte sous 12 caractères ; en-têtes jamais coupés au milieu d'un mot ;
   pastille jamais coupée ; valeur longue coupée proprement SEULEMENT dans son bloc ; texte de 12 px au moins ; à 600 px et moins,
   chaque ligne devient une carte (titre, état, valeur) et la page ne défile jamais en largeur. */
.acc-table { --acc-line: var(--border, rgba(127, 127, 127, .3)); --acc-bg: var(--surface, Canvas); width: 100%; max-width: 100%; border-collapse: collapse; font-size: max(12px, .875rem); line-height: 1.4; color: var(--acc-text, var(--text, inherit)); }
.acc-table caption { text-align: left; font-weight: 700; padding: 0 0 8px; }
.acc-table th, .acc-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--acc-line); }
/* en-têtes : jamais « DA TE » ni « SUB JEC T » (coupure seulement entre deux mots) */
.acc-table thead th { font-weight: 700; white-space: normal; overflow-wrap: normal; word-break: normal; hyphens: manual; }
/* cellules : un mot trop long passe à la ligne seulement s'il déborde (break-word ne réduit pas la largeur minimale de la colonne) */
.acc-table td, .acc-table tbody th { overflow-wrap: break-word; word-break: normal; min-width: 12ch; }
.acc-table .acc-narrow, .acc-table .acc-col-state, .acc-table .acc-state { min-width: 0; }
.acc-table .acc-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 0; }
.acc-table .acc-nowrap { white-space: nowrap; }
.acc-kv .acc-title { font-weight: 600; width: 28%; }
.acc-kv .acc-state { white-space: nowrap; width: 1%; }
.acc-kv .acc-value { min-width: 12ch; }
.acc-help { display: block; font-weight: 400; font-size: max(12px, .85em); opacity: .85; margin-top: 2px; }
.acc-msg { margin: 0 0 6px; }
.acc-untitled .acc-title { color: #B42318; }
/* pastille d'état : jamais coupée */
.acc-badge { display: inline-block; flex: none; white-space: nowrap; padding: 2px 10px; border-radius: 999px; font-size: max(12px, .8125rem); font-weight: 700; line-height: 1.5; background: #E7F4EA; color: #1D5C2E; }
.acc-badge.acc-warning { background: #FFF3D6; color: #7A4B00; }
.acc-badge.acc-error { background: #FDE2E2; color: #8A1C1C; }
.acc-badge.acc-info { background: #E3EDFB; color: #1E3A8A; }
/* valeur longue : résumé, 3 éléments, « et N autres » repliable, Copier */
.acc-long { min-width: 0; }
.acc-long-sum { margin: 0 0 4px; }
.acc-long-list { margin: 2px 0 4px; padding: 0 0 0 1.1rem; }
.acc-long code, .acc-copy-text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: max(12px, .85em); overflow-wrap: anywhere; word-break: break-word; }
.acc-long-more summary { cursor: pointer; min-height: 44px; box-sizing: border-box; padding: 12px 0; line-height: 1.25; }
.acc-long-more summary:focus, .acc-long-more summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 4px; }
.acc-copy { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; }
.acc-copy-text { flex: 1 1 16ch; min-width: 0; padding: 4px 6px; border-radius: 6px; background: rgba(127, 127, 127, .12); }
.acc-copy-btn { flex: none; font: inherit; font-size: max(12px, .875rem); min-height: 36px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--acc-line, rgba(127, 127, 127, .45)); background: transparent; color: inherit; cursor: pointer; }
.acc-copy-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
/* tableau de données qui défile DANS son cadre (journal, envois), première colonne figée */
.acc-wrap { max-width: 100%; min-width: 0; position: relative; } /* cadre = bloc conteneur : un élément en position absolue reste dans le cadre qui défile */
.acc-scroll { overflow-x: auto; }
.acc-fixed-first tbody th[scope=row], .acc-fixed-first thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--acc-bg); }
/* téléphone : cartes empilées (titre, puis pastille, puis texte), sauf tableau qui défile dans son cadre */
@media (max-width: 600px) {
  .acc-table:not(.acc-fixed-first), .acc-table:not(.acc-fixed-first) tbody, .acc-table:not(.acc-fixed-first) tr, .acc-table:not(.acc-fixed-first) th, .acc-table:not(.acc-fixed-first) td { display: block; width: auto; }
  .acc-table:not(.acc-fixed-first) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .acc-table:not(.acc-fixed-first) caption { display: block; }
  .acc-table:not(.acc-fixed-first) tr { border: 1px solid var(--acc-line); border-radius: 10px; padding: 8px 10px; margin: 0 0 10px; }
  .acc-table:not(.acc-fixed-first) th, .acc-table:not(.acc-fixed-first) td { border: 0; padding: 4px 0; min-width: 0; }
  .acc-kv .acc-title { width: auto; }
  .acc-data:not(.acc-fixed-first) td::before { content: attr(data-label); display: block; font-weight: 700; font-size: max(12px, .8125rem); opacity: .85; }
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .acc-badge { background: #163A22; color: #BFF0CC; }
  html:not([data-theme="light"]) .acc-badge.acc-warning { background: #4A3500; color: #FFE2A6; }
  html:not([data-theme="light"]) .acc-badge.acc-error { background: #4D1616; color: #FFD0D0; }
  html:not([data-theme="light"]) .acc-badge.acc-info { background: #172554; color: #DBEAFE; }
  html:not([data-theme="light"]) .acc-untitled .acc-title { color: #F97066; }
}
html[data-theme="dark"] .acc-badge, html.dark .acc-badge { background: #163A22; color: #BFF0CC; }
html[data-theme="dark"] .acc-badge.acc-warning, html.dark .acc-badge.acc-warning { background: #4A3500; color: #FFE2A6; }
html[data-theme="dark"] .acc-badge.acc-error, html.dark .acc-badge.acc-error { background: #4D1616; color: #FFD0D0; }
html[data-theme="dark"] .acc-badge.acc-info, html.dark .acc-badge.acc-info { background: #172554; color: #DBEAFE; }
html[data-theme="dark"] .acc-untitled .acc-title, html.dark .acc-untitled .acc-title { color: #F97066; }
