/* Automatec Gestion Affaires v7.43 — lisibilité modes CLAIR et GRIS.
 * Contraste des textes secondaires et contours plus lisibles sur les fonds existants.
 * Ne modifie pas le mode sombre, les codes métier ou les boutons.
 * Chargé après theme-polish-v742.css.
 */

/* Gris : fond et cartes inchangés. Contours anthracite doux et texte plus net,
 * sans liseré noir massif ni effet de transparence / voile. */
html[data-theme="light"][data-theme-variant="gray"] {
  --text: #19283b;
  --text-strong: #0d1b2c;
  --muted: #34455d;
  --border: #71839a;
  --border-soft: #8999ad;
  --shadow: 0 3px 12px rgba(23, 38, 58, .14);
}

/* Clair : carte blanche et fond clair conservés. Descriptions moins pâles et
 * contours gris nets pour éviter le rendu délavé. */
html[data-theme="light"][data-theme-variant="light"] {
  --text: #1c2a3b;
  --text-strong: #101b2c;
  --muted: #44556c;
  --border: #aab8c9;
  --border-soft: #c1ccda;
  --shadow: 0 2px 11px rgba(22, 38, 59, .085);
}

/* Plusieurs anciennes feuilles forcent la couleur et la bordure du fil d'Ariane
 * en clair ; on reprend ces composants sans toucher à leurs fonds. */
html[data-theme="light"]:is([data-theme-variant="light"],[data-theme-variant="gray"])
  .app-content-shell .app-breadcrumb {
  border-color: var(--border);
}
html[data-theme="light"]:is([data-theme-variant="light"],[data-theme-variant="gray"])
  .app-content-shell .app-breadcrumb a,
html[data-theme="light"]:is([data-theme-variant="light"],[data-theme-variant="gray"])
  .app-content-shell .app-breadcrumb .crumb-sep {
  color: var(--muted);
  opacity: 1;
}
html[data-theme="light"]:is([data-theme-variant="light"],[data-theme-variant="gray"])
  .app-content-shell .app-breadcrumb > span:last-child { color: var(--text-strong); }

/* Les anciens correctifs de devis utilisaient un gris fixe plus pâle que les
 * nouvelles variables. Respecter les valeurs, sans modifier les couleurs KPI. */
html[data-theme="light"]:is([data-theme-variant="light"],[data-theme-variant="gray"])
  .quote-kpi-grid .quote-kpi-copy > :is(span,small) { color: var(--muted); }
html[data-theme="light"]:is([data-theme-variant="light"],[data-theme-variant="gray"])
  .summary-triple span,
html[data-theme="light"]:is([data-theme-variant="light"],[data-theme-variant="gray"])
  .chapter-workspace-global-totals span,
html[data-theme="light"]:is([data-theme-variant="light"],[data-theme-variant="gray"])
  .chapter-workspace-top-total span,
html[data-theme="light"]:is([data-theme-variant="light"],[data-theme-variant="gray"])
  .chapter-workspace-bottom-total span { color: var(--muted); }

/* Tableau de bord : rangées ordinaires mieux découpées des panneaux.
 * Ne pas remplacer les couleurs d'alerte / retard / tâches en cours. */
html[data-theme="light"][data-theme-variant="gray"]
  .dash-row:not(.todo-overdue):not(.todo-progress) {
  background: #d5deea;
  border-color: var(--border-soft);
}
html[data-theme="light"][data-theme-variant="light"]
  .dash-row:not(.todo-overdue):not(.todo-progress) {
  background: #ffffff;
  border-color: var(--border-soft);
}

/* Cadres de sections réutilisés sur les pages métier : bordures via variables.
 * N'écrase pas les bordures accentuées (chapitres violets, options, alertes). */
html[data-theme="light"]:is([data-theme-variant="light"],[data-theme-variant="gray"])
  :is(.card,.kpi,.dash-card,.project-section,.structure-card,.client-kpi-card)
  { box-shadow: var(--shadow); }
