/* ============================================================
   HARD DÉCO — Lot 11A-5.30
   Typographie commune des listes métier.
   Couche visuelle uniquement : aucune structure ni logique modifiée.
   ============================================================ */

:root {
  --hd-list-font-heading: .6875rem;  /* 11 px */
  --hd-list-font-primary: .875rem;   /* 14 px */
  --hd-list-font-body: .8125rem;     /* 13 px */
  --hd-list-font-secondary: .75rem;  /* 12 px */
  --hd-list-line-primary: 1.35;
  --hd-list-line-secondary: 1.4;
}

/* Contrôles communs : recherche, filtres, onglets et actions. */
:is(
  .list-operations-page,
  .requests-page,
  .planning-page,
  .charges-page,
  .results-operations-page
) :is(
  input,
  select,
  .list-toolbar-select,
  .filter-btn,
  .activity-clear-filters,
  .request-visible-counter,
  .operations-page-count,
  .tabs-bar .tab,
  .devis-tabs .tab,
  .activity-result-tabs .tab
) {
  font-size: var(--hd-list-font-body);
  line-height: var(--hd-list-line-primary);
}

:is(
  .list-operations-page,
  .requests-page,
  .planning-page,
  .charges-page,
  .results-operations-page
) :is(button, .btn, .btn-secondary) {
  font-size: var(--hd-list-font-secondary);
  line-height: var(--hd-list-line-primary);
}

:is(
  .list-operations-page,
  .requests-page,
  .planning-page,
  .charges-page,
  .results-operations-page
) :is(
  .filter-title,
  .filter-popover label,
  .filter-date-btn,
  .request-filter-label
) {
  font-size: var(--hd-list-font-secondary);
  line-height: var(--hd-list-line-secondary);
}

/* Résumés et compteurs. */
:is(.list-summary-metric, .kb-summaryMetric, .cc-results-count) {
  font-size: var(--hd-list-font-secondary);
  line-height: var(--hd-list-line-secondary);
}

:is(.list-summary-metric, .kb-summaryMetric) :is(strong, small, span) {
  font-size: inherit;
  line-height: inherit;
}

/* En-têtes de colonnes. */
:is(.list-table-head, .charges-table thead, .recap-table thead) {
  font-size: var(--hd-list-font-heading);
  line-height: var(--hd-list-line-secondary);
}

:is(.list-table-head, .charges-table thead, .recap-table thead) :is(th, span) {
  font-size: inherit;
  line-height: inherit;
}

/* Listes Devis, Factures, Clients et Artistes. */
.page-list .list-cards > li.card-item {
  font-size: var(--hd-list-font-body);
  line-height: var(--hd-list-line-primary);
}

.page-list :is(
  .devis-id,
  .facture-id,
  .client-id,
  .artiste-id,
  .montant
) {
  font-size: var(--hd-list-font-primary);
  line-height: var(--hd-list-line-primary);
}

.page-list :is(
  .facture-objet,
  .date-col,
  .client-email,
  .artiste-email,
  .client-location-text,
  .artiste-location-text
) {
  font-size: var(--hd-list-font-secondary);
  line-height: var(--hd-list-line-secondary);
}

:is(
  .status-badge,
  .artiste-badge,
  .client-badge,
  .projet-badge,
  .client-stat-pill,
  .artiste-stat-pill,
  .artiste-role-pill,
  .current-user-badge
) {
  font-size: var(--hd-list-font-secondary);
  line-height: 1.25;
}

/* V2-RC1.5.25 — les listes métier partagent quatre rôles typographiques.
   Les anciennes variantes en 8–10 px sont ainsi remplacées sans réécrire
   chaque écran historique. */
:is(.page-list, .requests-page, #projetsKanban, .activity-page, .charges-page) :is(
  .list-table-head,
  thead,
  [class*="columnTitle"],
  [class*="column-title"]
) {
  font-size: var(--hd-list-font-heading);
  line-height: var(--hd-list-line-secondary);
}

#projetsKanban :is(.kb-name, .kpi-value),
.requests-page :is(.request-title, .request-client strong),
.activity-page .activity-main strong,
.charges-page :is(.charge-title, .charges-total) {
  font-size: var(--hd-list-font-primary);
}

#projetsKanban :is(.kb-card, .kb-btnPrimary),
.requests-page :is(.request-row, .request-card),
.activity-page .activity-row,
.charges-page :is(.charges-table td, .meta-charge) {
  font-size: var(--hd-list-font-body);
  line-height: var(--hd-list-line-primary);
}

#projetsKanban :is(.kb-projectId, .kb-client, .kb-resp, .kb-datesLine, .kpi-label),
.requests-page :is(.request-id, .request-client-type, .request-meta, .request-received),
.activity-page :is(.activity-main span, .activity-date, .activity-user, .activity-category, .activity-status),
.charges-page :is(.charges-table small, .meta-charge small) {
  font-size: var(--hd-list-font-secondary);
  line-height: var(--hd-list-line-secondary);
}

/* Kanban Projets. */
#projetsKanban :is(.kb-name, .kpi-value) {
  font-size: var(--hd-list-font-primary);
  line-height: var(--hd-list-line-primary);
}

#projetsKanban :is(
  .kb-projectId,
  .kb-client .client-name,
  .kb-resp .artiste-badge,
  .kb-datesLine,
  .kpi-label,
  .kb-btnPrimary
) {
  font-size: var(--hd-list-font-secondary);
  line-height: var(--hd-list-line-secondary);
}

#projetsKanban :is(.kb-titletext, .client-name) {
  overflow-wrap: anywhere;
}

/* V2-RC1.5.28 — client et artiste sont de simples métadonnées dans
   les cartes projet. Les accès dédiés restent dans le menu de la carte. */
#projetsKanban .kb-entity-text {
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--hd-color-text, var(--text));
  font-size: var(--hd-list-font-secondary);
  font-weight: 600;
  line-height: var(--hd-list-line-secondary);
  pointer-events: none;
}

#projetsKanban .kb-entity-text > .ico {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  color: var(--hd-color-text-muted, var(--muted));
}

#projetsKanban .kb-entity-text > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* V2-RC1.5.30 — même corps pour Artiste, Client et Projet dans les trois
   listes. Les informations statiques restent en graisse normale ; seuls les
   véritables liens sont renforcés. */
:is(.page-list, #projetsKanban) :is(
  .artiste-badge,
  .client-badge,
  .projet-badge,
  .kb-entity-text
) {
  font-size: var(--hd-list-font-body);
}

:is(.page-list, #projetsKanban) :is(
  .entity-badge--info,
  .kb-entity-text
) {
  font-weight: 500;
}

:is(.page-list, #projetsKanban) .entity-badge--link {
  font-weight: 620;
}

.page-list .montant,
#projetsKanban :is(.kpi-value, .kb-amount) {
  font-weight: 700;
}

/* Nouvelles demandes. */
.requests-page :is(.request-title, .request-client strong) {
  font-size: var(--hd-list-font-primary);
  line-height: var(--hd-list-line-primary);
}

.requests-page :is(
  .request-id,
  .request-client-type,
  .request-pj,
  .request-client small,
  .request-meta,
  .request-received,
  .request-received small
) {
  font-size: var(--hd-list-font-secondary);
  line-height: var(--hd-list-line-secondary);
}

.requests-page :is(.request-title, .request-client small, .request-meta) {
  overflow-wrap: anywhere;
}

/* Journal d'activité. */
.activity-page .activity-main strong {
  font-size: var(--hd-list-font-primary);
  line-height: var(--hd-list-line-primary);
}

.activity-page :is(
  .activity-main span,
  .activity-date,
  .activity-user,
  .activity-category,
  .activity-status,
  .activity-visible-count,
  .list-tab-count
) {
  font-size: var(--hd-list-font-secondary);
  line-height: var(--hd-list-line-secondary);
}

/* Planning et tâches. */
.planning-page .task-title-line strong {
  font-size: var(--hd-list-font-primary);
  line-height: var(--hd-list-line-primary);
}

.planning-page :is(
  .task-toolbar,
  .task-meta,
  .task-description,
  .task-priority,
  .task-status,
  .task-field > span,
  .task-advanced summary,
  .task-calendar-legend,
  .task-calendar-weekdays span,
  .task-calendar-date,
  .task-calendar-date small,
  .task-calendar-event,
  .task-calendar-more
) {
  font-size: var(--hd-list-font-secondary);
  line-height: var(--hd-list-line-secondary);
}

/* Charges communes. */
.charges-page :is(.charge-title, .charges-total, .charges-subtitle) {
  font-size: var(--hd-list-font-primary);
  line-height: var(--hd-list-line-primary);
}

.charges-page :is(
  .charges-table,
  .charges-table td,
  .meta-charge,
  .cc-results-count,
  .charges-period-copy p,
  .charges-page-status
) {
  font-size: var(--hd-list-font-body);
  line-height: var(--hd-list-line-secondary);
}

.charges-page :is(.charges-table small, .meta-charge small) {
  font-size: var(--hd-list-font-secondary);
}

/* Résultats : tableaux, classements et ventilations. */
.results-operations-page :is(
  .results-monthly-list,
  .results-artists-list,
  .results-top-clients,
  .results-compensation-artists,
  .results-compensation-months
) {
  font-size: var(--hd-list-font-body);
  line-height: var(--hd-list-line-secondary);
}

.results-operations-page :is(
  .results-monthly-list,
  .results-artists-list,
  .results-top-clients,
  .results-compensation-artists,
  .results-compensation-months
) :is(small, .muted, [class*="meta"], [class*="label"]) {
  font-size: var(--hd-list-font-secondary);
  line-height: var(--hd-list-line-secondary);
}

/* États vides et messages de liste. */
:is(
  .list-operations-page,
  .requests-page,
  .planning-page,
  .charges-page,
  .results-operations-page
) :is(.home-empty, .activity-empty, .task-loading, .kb-emptyState) {
  font-size: var(--hd-list-font-body);
  line-height: 1.5;
}

/* Le texte long reste contenu dans sa ligne ou sa carte. */
:is(
  .page-list .list-cards,
  .requests-page-list,
  #projetsKanban,
  .activity-list,
  .planning-tasks-card,
  .charges-page-workspace,
  .results-layout
) :is(p, span, strong, small, td, th) {
  min-width: 0;
}

@media (max-width: 720px) {
  :root {
    --hd-list-font-primary: .875rem;
    --hd-list-font-body: .8125rem;
    --hd-list-font-secondary: .75rem;
  }
}
