/* Hallmark · checked: 2026-11-27 · shape: app screen · direction: B Instrument · modes: light+dark */
/* Onglet « Publications » : suivi des créations publiées. Jetons et composants de style.css, panneaux et table dense
   communs dans onglets-donnees.css. ZÉRO style en ligne (CSP stricte) : la courbe SVG prend son aspect ici, les jauges
   leur largeur par data-w (app.js). Aucune carte dans une carte, aucun mot coupé, fluide jusqu'à 390 px. */

/* Filtres (plateforme, période) */
.pub-filters { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); margin-bottom: var(--s4); }
#tab-publications .screen-head > button { flex: none; }

/* Tableau des publications */
.pub-table td:first-child { min-width: 14rem; }
.pub-table button.pub-open { display: block; color: var(--ink); text-decoration: none; text-align: left; }
.pub-table button.pub-open:hover .od-cell-title, .pub-table button.pub-open:focus-visible .od-cell-title { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.pub-table tr.is-selected td { background: var(--accent-soft); }
.pub-table tr.is-selected .od-cell-title { color: var(--accent-text); }
.pub-table .od-cell-sub { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); margin-top: 2px; }
.pub-ep { overflow-wrap: anywhere; }
.pub-date { white-space: nowrap; color: var(--ink-2); }
.pub-solde.is-ok, .pub-pos { color: var(--ok); }
.pub-solde.is-ko, .pub-neg { color: var(--ko); }
a.pub-link { display: inline-flex; align-items: center; gap: 2px; color: var(--accent-text); white-space: nowrap; }
a.pub-link svg.i { width: 12px; height: 12px; }
#pub-none { margin-bottom: var(--s4); }

/* Détail d'une publication */
.pub-detail { min-width: 0; margin-top: var(--s5); }
.pub-detail-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s3) var(--s4); margin-bottom: var(--s4); padding-bottom: var(--s3); border-bottom: 1px solid var(--rule); }
.pub-detail-info { display: grid; gap: 2px; min-width: 0; }
.pub-detail-title { margin: 0; font-size: var(--t-title); }
.pub-detail-info .subtle { font-size: var(--t-small); }
.pub-detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.pub-col { display: grid; gap: var(--s4); min-width: 0; }
#tab-publications .pub-card { margin: 0; }

/* Courbe des vues (SVG, aspect par classes) */
.pub-plot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s2); }
.pub-yaxis { display: flex; flex-direction: column; justify-content: space-between; height: 160px; font-size: var(--t-meta); color: var(--ink-3); text-align: right; }
.pub-yaxis span:first-child { margin-top: -.5em; } .pub-yaxis span:last-child { margin-bottom: -.5em; }
.pub-plot-main { min-width: 0; }
.pub-chart { display: block; width: 100%; height: 160px; overflow: visible; }
.pub-chart .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pub-chart .area { fill: var(--series-1); fill-opacity: .12; stroke: none; }
.pub-chart .grid { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.pub-chart .base { stroke: var(--rule-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pub-xaxis { display: flex; justify-content: space-between; gap: var(--s3); margin-top: var(--s1); font-size: var(--t-meta); color: var(--ink-3); white-space: nowrap; }
.pub-chart-empty p { margin: 0; }
.pub-chart-one { font-size: var(--t-body); }

/* Chiffres de la publication : grille de petites valeurs, filets entre lignes */
.pub-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: 0 var(--s4); margin: 0; padding-top: var(--s2); border-top: 1px solid var(--rule); }
.pub-metric { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); padding: var(--s2) 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.pub-metric dt { font-size: var(--t-small); color: var(--ink-2); }
.pub-metric dd { margin: 0; font-weight: 500; color: var(--ink); }

/* Coût et revenus */
.pub-kv dt { display: grid; }
.pub-kv-sub { font-size: var(--t-meta); color: var(--ink-3); }
.pub-kv dd { font-weight: 500; color: var(--ink); }
.pub-details summary { cursor: pointer; color: var(--accent-text); font-size: var(--t-small); }
.pub-details[open] summary { margin-bottom: var(--s2); }
.pub-rule { margin: 0 0 var(--s2); font-size: var(--t-small); }
.pub-cost-list .list-row { padding: var(--s2) 0; }
.pub-cost-name { display: block; font-weight: 500; font-size: var(--t-small); }
.pub-cost-line.is-na .pub-cost-name { color: var(--ink-2); }
.pub-cost-list .list-sub { font-size: var(--t-meta); }
.pub-sub h3 { display: flex; gap: var(--s2); align-items: baseline; margin: 0 0 var(--s1); font-size: var(--t-small); }
.pub-sub { padding-top: var(--s3); border-top: 1px solid var(--rule); }
.pub-entries .list-row { padding: var(--s2) 0; align-items: center; }
.pub-entries .list-title { font-weight: 500; font-size: var(--t-small); }
.pub-entries .list-sub { font-size: var(--t-meta); }
button.pub-entry-del { color: var(--ko); }
.pub-none { margin: 0; font-size: var(--t-small); }

/* Saisie d'un revenu */
.pub-form { display: grid; gap: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--rule); }
.pub-form h3 { margin: 0; font-size: var(--t-small); }
.pub-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.pub-form-grid .pub-span { grid-column: 1 / -1; }
.pub-check { display: flex; align-items: flex-start; gap: var(--s2); font-size: var(--t-small); color: var(--ink-2); }
.pub-check input { flex: none; width: auto; min-height: 0; margin-top: 3px; }
.pub-form-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2) var(--s3); }
.pub-form-hint { font-size: var(--t-meta); flex: 1 1 12rem; }

/* Ce que dit le public */
.pub-tone { display: grid; gap: var(--s2); }
.pub-legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin: 0; padding: 0; font-size: var(--t-small); color: var(--ink-2); }
.pub-legend li { display: inline-flex; align-items: center; gap: var(--s2); white-space: nowrap; }
.swatch.pub-sw-pos { background: var(--ok-fill); } .swatch.pub-sw-neu { background: var(--ink-3); } .swatch.pub-sw-neg { background: var(--ko); }
.pub-theme-list { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); margin: 0; padding: 0; }
.pub-theme-list .pill .num { color: var(--ink-3); }
.pub-quotes .list-row { padding: var(--s2) 0; }
.pub-quote-text { display: block; overflow-wrap: break-word; white-space: pre-wrap; }
.pub-quotes .list-sub { font-size: var(--t-meta); }
.pub-untrusted { font-size: var(--t-meta); }

/* Connexions */
.pub-cx-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--s3) var(--s5); padding: 0; }
.pub-cx { display: flex; align-items: flex-start; gap: var(--s2); min-width: 0; }
.pub-cx-dot { flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: var(--r-round); background: var(--plan); }
.pub-cx-dot.is-on { background: var(--ok-fill); }
.pub-cx-main { display: grid; min-width: 0; }
.pub-cx-name { font-weight: 600; }
.pub-cx-state { font-size: var(--t-small); color: var(--ink-2); }
.pub-cx-sub { font-size: var(--t-meta); color: var(--ink-3); overflow-wrap: anywhere; }
.pub-cx-foot { font-size: var(--t-small); }

/* État vide */
.pub-empty { margin-bottom: var(--s4); }
.pub-empty .pub-rule { font-size: var(--t-meta); }

@media (max-width: 1100px) {
  .pub-detail-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .pub-table td:first-child { min-width: 0; }
  .pub-table tr.is-selected { background: var(--accent-soft); }
  .pub-table tr.is-selected td { background: transparent; }
}
@media (max-width: 640px) {
  .pub-chart, .pub-yaxis { height: 140px; }
  .pub-form-grid { grid-template-columns: minmax(0, 1fr); }
  .pub-filters .segmented { width: 100%; }
}
