/* Variables, reset, typographie — langage visuel façon apple.com. */
:root {
  color-scheme: light dark;
  /* Surfaces et encres */
  --page: #f5f5f7;
  --surface: #ffffff;
  --encre: #1d1d1f;
  --encre-2: #6e6e73;
  --encre-muette: #86868b;
  --grille: #d2d2d7;
  --bordure: rgba(0, 0, 0, 0.06);
  /* Accent bleu */
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-fort: #0058b0;
  --accent-doux: #eaf3ff;
  /* Séries : renforcement = bleu, ajustement = orange */
  --renforcement: #0071e3;
  --ajustement: #f56300;
  /* Statuts (réservés aux alertes, toujours avec icône + libellé) */
  --statut-bon: #03a10e;
  --statut-attention: #ffb900;
  --statut-serieux: #f56300;
  --statut-critique: #e30000;
  --ombre: 0 4px 16px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.04);
  --nav-fond: rgba(255, 255, 255, 0.72);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #000000;
    --surface: #1d1d1f;
    --encre: #f5f5f7;
    --encre-2: #a1a1a6;
    --encre-muette: #86868b;
    --grille: #424245;
    --bordure: rgba(255, 255, 255, 0.08);
    --accent: #2997ff;
    --accent-hover: #46a5ff;
    --accent-fort: #6fb9ff;
    --accent-doux: #0c2846;
    --renforcement: #2997ff;
    --ajustement: #ff8329;
    --statut-bon: #30d158;
    --statut-attention: #ffd60a;
    --statut-serieux: #ff9f0a;
    --statut-critique: #ff453a;
    --ombre: none;
    --nav-fond: rgba(22, 22, 23, 0.8);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: system-ui, -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.47;
  color: var(--encre);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}
h2 {
  font-size: 1.3rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin: 1.5rem 0 0.6rem;
}
h3 { font-size: 1.02rem; font-weight: 650; margin: 0.9rem 0 0.3rem; }
p { margin-bottom: 0.7rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .muet { color: var(--encre-muette); font-size: 0.85em; }
strong { font-weight: 650; }

input, select, textarea, button { font: inherit; color: inherit; }

input[type="text"], input[type="date"], input[type="datetime-local"], input[type="time"],
input[type="number"], input[type="email"], input[type="password"], select, textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--grille);
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 0.7rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--encre-muette) 50%),
    linear-gradient(135deg, var(--encre-muette) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

/* Navigation au clavier (PC) : les boutons et liens ont un repère visible. */
.bouton:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

textarea { min-height: 96px; resize: vertical; }

label {
  display: block;
  font-size: 0.82rem;
  color: var(--encre-2);
  margin-bottom: 0.25rem;
  font-weight: 550;
}

::placeholder { color: var(--encre-muette); opacity: 1; }
