
/* schanalyse — base partagée des pages serveur. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--police);
  font-size: 1rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--primaire);
}
::selection { background: var(--primaire-doux); color: var(--encre); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--primaire); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--anneau); outline-offset: 2px; border-radius: 4px; }
.chiffres { font-family: var(--police-chiffres); font-variant-numeric: proportional-nums; }
.visuellement-cache {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Champs */
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ label, .champ .etiquette { font-weight: 550; font-size: 0.9375rem; }
.champ .aide { font-size: 0.875rem; color: var(--encre-2); }
.saisie {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--trait-fort);
  border-radius: var(--rayon-petit);
  background: var(--surface);
  color: var(--encre);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.saisie::placeholder { color: var(--encre-2); opacity: 1; }
.saisie:hover { border-color: var(--encre-2); }
.saisie:focus-visible { outline: none; border-color: var(--primaire); box-shadow: 0 0 0 3px var(--primaire-doux); }
.saisie[aria-invalid="true"] { border-color: var(--echec); }
.saisie-code {
  font-family: var(--police-chiffres);
  font-variant-numeric: tabular-nums;
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  text-align: center;
}
.avec-bouton { position: relative; }
.avec-bouton .saisie { padding-right: 96px; }
.avec-bouton .bouton-dans-champ {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  min-height: 34px; padding: 4px 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--encre-2); font: inherit; font-size: 0.875rem; font-weight: 550;
  cursor: pointer;
}
.avec-bouton .bouton-dans-champ:hover { background: var(--primaire-doux); color: var(--primaire); }
.case { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; color: var(--encre-2); }
.case input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primaire); flex: none; }
.erreur-champ { font-size: 0.875rem; color: var(--echec); }

/* Boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: var(--rayon-petit);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s var(--sortie);
}
.bouton:active { transform: translateY(1px); }
.bouton[disabled], .bouton[aria-busy="true"] { opacity: 0.6; cursor: progress; }
.bouton-primaire { background: var(--primaire); color: var(--sur-primaire); }
.bouton-primaire:hover { background: var(--primaire-survol); text-decoration: none; }
.bouton-secondaire { background: var(--surface); color: var(--encre); border-color: var(--trait-fort); }
.bouton-secondaire:hover { border-color: var(--encre-2); text-decoration: none; }
.bouton-large { width: 100%; }
.bouton svg { width: 18px; height: 18px; flex: none; }

/* Messages */
.message {
  padding: 12px 14px; border-radius: var(--rayon-petit); font-size: 0.9375rem;
  display: flex; gap: 10px; align-items: flex-start;
}
.message svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.message-erreur { background: var(--echec-doux); color: var(--echec); }
.message-info { background: var(--primaire-doux); color: var(--encre); }
.message-succes { background: var(--primaire-doux); color: var(--encre); }

/* Marque */
.marque { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.0625rem;
  letter-spacing: -0.01em; color: var(--encre); text-decoration: none; }
.marque svg { width: 28px; height: 28px; }

/* Barres de défilement */
* { scrollbar-color: var(--trait-fort) transparent; scrollbar-width: thin; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Logo provisoire (à refaire) */
.logo-fond { fill: var(--encre); }
.logo-vague { fill: none; stroke: var(--fond); stroke-width: 2.1; stroke-linecap: round; }
.logo-point { fill: var(--cristal); }

/* Champs numériques : on tape le chiffre, sans flèches pour ajouter ou retirer 1. */
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
