/* =========================================================
   Gestion Client v0.4.5 — Correctifs ciblés d'affichage
   - Toutes les cartes KPI restent vertes.
   - Mode sombre : en-têtes de tableaux et liens lisibles.
   - Tableau de bord : mois du graphique sous la ligne de base.
   Aucun autre composant n'est modifié par cette feuille.
   ========================================================= */

/* 1) Cartes statistiques : toutes utilisent le modèle vert du premier carré. */
.avsg-gc-app .gc-stat-cards .gc-stat-card,
.avsg-gc-app .gc-stat-cards .gc-stat-card.featured {
  background: #123d24;
  border-color: #123d24;
  color: #fff;
}

.avsg-gc-app .gc-stat-cards .gc-stat-card > span,
.avsg-gc-app .gc-stat-cards .gc-stat-card > strong,
.avsg-gc-app .gc-stat-cards .gc-stat-card.warning > strong {
  color: #fff;
}

.avsg-gc-app .gc-stat-cards .gc-stat-card > p {
  color: #e3e9d8;
}

/* 2) Mode sombre : restaurer la lisibilité des tableaux sans toucher au mode clair. */
.avsg-gc-app.gc-theme-dark .gc-table thead th {
  background: #26312b;
  color: #c8d2cc;
  border-bottom-color: #3a4841;
}

.avsg-gc-app.gc-theme-dark .gc-table .gc-table-link,
.avsg-gc-app.gc-theme-dark .gc-table .gc-table-link.plain {
  color: #f4f6ef;
}

.avsg-gc-app.gc-theme-dark .gc-table .gc-table-link:hover strong,
.avsg-gc-app.gc-theme-dark .gc-table .gc-table-link:focus-visible strong {
  color: #75c986;
}

/* 3) Graphique du tableau de bord : ligne de base au-dessus des mois. */
.avsg-gc-app .gc-chart {
  --gc-chart-label-space: 24px;
  --gc-chart-side-space: 13px;
  border-bottom: 0;
  background: none;
  position: relative;
}

.avsg-gc-app .gc-chart::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: var(--gc-chart-side-space);
  right: var(--gc-chart-side-space);
  top: 0;
  bottom: var(--gc-chart-label-space);
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 41px,
    var(--line) 42px
  );
}

.avsg-gc-app .gc-chart::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 0;
  left: var(--gc-chart-side-space);
  right: var(--gc-chart-side-space);
  bottom: var(--gc-chart-label-space);
  height: 1px;
  background: var(--line);
  pointer-events: none;
}

.avsg-gc-app .gc-chart > div {
  z-index: 1;
}

@media (max-width: 620px) {
  .avsg-gc-app .gc-chart {
    --gc-chart-label-space: 26px;
    --gc-chart-side-space: 4px;
  }
}
