/*
  ============================================================
  PG WOOD HOME — CHARTE GRAPHIQUE OFFICIELLE
  Version 1.0 — PWA V5.0.1

  Ce fichier contient uniquement les règles visuelles communes.
  Les écrans/modules ne doivent pas redéfinir leur propre identité.
  ============================================================
*/

:root {
  color-scheme: dark;

  /* Identité PG WOOD */
  --pgw-bg-deep: #07100a;
  --pgw-bg: #0d1b12;
  --pgw-surface: rgba(24, 43, 30, 0.96);
  --pgw-surface-raised: rgba(35, 58, 41, 0.96);
  --pgw-surface-soft: rgba(5, 12, 7, 0.28);
  --pgw-border: rgba(208, 229, 198, 0.15);

  --pgw-text: #ffffff;
  --pgw-text-muted: #b7c5b8;
  --pgw-nature: #a7d48d;
  --pgw-wood: #e2bb72;
  --pgw-warning: #e5bc6c;
  --pgw-danger: #ef8d80;

  /* Typographie */
  --pgw-font-ui: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pgw-font-signature: Georgia, "Times New Roman", serif;
  --pgw-weight-regular: 500;
  --pgw-weight-medium: 650;
  --pgw-weight-bold: 800;
  --pgw-weight-heavy: 950;

  --pgw-size-xs: 0.72rem;
  --pgw-size-sm: 0.82rem;
  --pgw-size-body: 0.92rem;
  --pgw-size-value: 1.22rem;
  --pgw-size-title: clamp(1.9rem, 4vw, 3.25rem);

  /* Formes et espacements */
  --pgw-radius-sm: 12px;
  --pgw-radius-md: 16px;
  --pgw-radius-lg: 24px;
  --pgw-radius-pill: 999px;
  --pgw-gap-xs: 6px;
  --pgw-gap-sm: 10px;
  --pgw-gap-md: 14px;
  --pgw-gap-lg: 18px;
  --pgw-gap-xl: 24px;

  --pgw-shadow-card: 0 20px 50px rgba(0, 0, 0, 0.32);
  --pgw-focus: 0 0 0 3px rgba(226, 187, 114, 0.28);

  /* États officiels */
  --pgw-state-ok: var(--pgw-nature);
  --pgw-state-info: #9fc5d8;
  --pgw-state-warning: var(--pgw-warning);
  --pgw-state-danger: var(--pgw-danger);
  --pgw-state-offline: #8f9a91;

  /* Graphiques — règles communes (les séries gardent leur échelle métier) */
  --pgw-chart-grid: rgba(208, 229, 198, 0.10);
  --pgw-chart-axis: rgba(208, 229, 198, 0.42);
  --pgw-chart-label: var(--pgw-text-muted);

  /* Alias historiques : permettent à la PWA V5 de rester compatible.
     Les futurs développements doivent employer les variables --pgw-* ci-dessus. */
  --bg: var(--pgw-bg-deep);
  --bg2: var(--pgw-bg);
  --panel: var(--pgw-surface);
  --panel2: var(--pgw-surface-raised);
  --line: var(--pgw-border);
  --text: var(--pgw-text);
  --muted: var(--pgw-text-muted);
  --green: var(--pgw-nature);
  --wood: var(--pgw-wood);
  --danger: var(--pgw-danger);
  --warning: var(--pgw-warning);
  --shadow: var(--pgw-shadow-card);
}

/* Socle commun */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--pgw-font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font-family: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: none;
  box-shadow: var(--pgw-focus);
}

/* Sémantique réutilisable par PWA, écran et futurs modules Web */
.pgw-kicker {
  color: var(--pgw-wood);
  font-size: var(--pgw-size-xs);
  font-weight: var(--pgw-weight-heavy);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.pgw-value {
  color: var(--pgw-text);
  font-size: var(--pgw-size-value);
  font-weight: var(--pgw-weight-bold);
  font-variant-numeric: tabular-nums;
}
.pgw-unit, .pgw-muted { color: var(--pgw-text-muted); }
.pgw-state-ok { color: var(--pgw-state-ok); }
.pgw-state-warning { color: var(--pgw-state-warning); }
.pgw-state-danger { color: var(--pgw-state-danger); }
.pgw-state-offline { color: var(--pgw-state-offline); }
