/* ===========================================================================
   PROPERTY OS — STYLES DE BASE
   Les briques réutilisées par tous les écrans.
   Aucune couleur ni taille écrite en dur : tout vient de tokens.css.
   =========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police-ui);
  font-weight: var(--graisse-ui);
  font-size: var(--t-normal);
  line-height: var(--interligne);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--police-titre);
  font-weight: var(--graisse-titre);
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

a { color: inherit; text-decoration: none; }

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

/* Accessibilité : la navigation au clavier doit toujours se voir. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

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

/* --- ÉTIQUETTE EN CAPITALES ---------------------------------------------- */
.etiquette {
  font-size: var(--t-etiquette);
  font-weight: var(--graisse-forte);
  letter-spacing: var(--espace-lettres);
  text-transform: uppercase;
  color: var(--texte-discret);
}
.etiquette--accent { color: var(--accent); }

/* --- CHAMP DE SAISIE ------------------------------------------------------ */
.champ { display: flex; flex-direction: column; gap: var(--e1); }
.champ > span { /* le libellé */
  font-size: var(--t-etiquette);
  font-weight: var(--graisse-forte);
  letter-spacing: var(--espace-lettres);
  text-transform: uppercase;
  color: var(--texte-discret);
}
.champ > input,
.champ > select,
.champ > textarea {
  background: var(--fond-champ);
  border: 1px solid var(--filet-marque);
  border-radius: var(--rayon);
  padding: 15px 16px;
  color: var(--texte);
  transition: border-color var(--duree);
}
.champ > input::placeholder { color: var(--texte-discret); }
.champ > input:focus,
.champ > select:focus,
.champ > textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.champ > input:disabled { opacity: 0.5; }

/* --- BOUTONS -------------------------------------------------------------- */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--e1);
  border: 1px solid transparent;
  border-radius: var(--rayon);
  padding: 16px 22px;
  font-size: 11.5px;
  font-weight: var(--graisse-forte);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity var(--duree), background var(--duree), border-color var(--duree);
}
.bouton--principal { background: var(--texte); color: var(--fond); }
.bouton--principal:hover:not(:disabled) { opacity: 0.88; }
.bouton--discret {
  background: transparent;
  border-color: var(--filet-marque);
  color: var(--texte-doux);
}
.bouton--discret:hover:not(:disabled) { border-color: var(--accent); color: var(--texte); }
.bouton:disabled { opacity: 0.45; cursor: progress; }

/* --- MESSAGES ------------------------------------------------------------- */
.message {
  border-radius: var(--rayon);
  padding: 14px 16px;
  font-size: var(--t-petit);
  line-height: 1.5;
}
.message--erreur   { background: var(--critique-fond); color: var(--critique); }
.message--succes   { background: var(--ok-fond);       color: var(--ok); }
.message--info     { background: var(--info-fond);     color: var(--info); }

/* --- PASTILLE DE STATUT --------------------------------------------------- */
.pastille {
  display: inline-block;
  font-size: var(--t-etiquette);
  font-weight: var(--graisse-forte);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: var(--rayon-pastille);
}
.pastille--ok        { background: var(--ok-fond);        color: var(--ok); }
.pastille--attention { background: var(--attention-fond); color: var(--attention); }
.pastille--critique  { background: var(--critique-fond);  color: var(--critique); }
.pastille--info      { background: var(--info-fond);      color: var(--info); }
.pastille--neutre    { background: var(--fond-actif);     color: var(--texte-doux); }

/* --- CHIFFRES ------------------------------------------------------------- */
/* Tout montant, toute date, toute référence : chasse fixe et chiffres alignés.
   C'est ce qui permet de repérer un écart d'un coup d'œil dans une colonne.  */
.chiffre {
  font-family: var(--police-chiffre);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}

/* --- UTILITAIRES ---------------------------------------------------------- */
.pile { display: flex; flex-direction: column; }
.centre { display: grid; place-items: center; }
.invisible { display: none !important; }
