/*
 * Socle commun aux 4 applications : réinitialisation, typographie, focus.
 *
 * Aucune couleur en dur : tout passe par les jetons de jetons.css.
 * Ce fichier est copié dans chaque front par `npm run design:sync`.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--police);
  font-size: var(--t-m);
  line-height: var(--lh-texte);
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--police-titre);
  line-height: var(--lh-titre);
  letter-spacing: var(--ls-titre);
  color: var(--texte);
  margin: 0 0 var(--e-3);
  font-weight: var(--g-6);
}

h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-xl); }
h4 { font-size: var(--t-l); }

p { margin: 0 0 var(--e-3); }

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

small, .petit { font-size: var(--t-s); }

code, kbd, samp, pre {
  font-family: var(--police-code);
  font-size: .95em;
}

/* Les montants, scores, dates et références s'alignent en colonne : des chiffres de
   largeur variable les font danser à chaque rafraîchissement. */
.score, time, .ref, table td {
  font-variant-numeric: tabular-nums;
}

img, svg, video { max-width: 100%; height: auto; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* La navigation clavier était invisible : aucun des deux CSS de production ne
   définissait `:focus-visible` (0 occurrence). Un anneau unique, sur tout élément
   focusable. Pas de border-radius ici : l'anneau suit la forme de l'élément, et
   l'imposer arrondirait au passage des commandes qui sont volontairement pilule. */
:focus-visible {
  outline: var(--anneau);
  outline-offset: var(--anneau-decalage);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

.visuellement-cache {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hidden { display: none !important; }
