/* PokeCollection - base : reset, typographie, liens, focus.
   Depend de tokens.css (a charger avant). */

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

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

body {
  margin: 0;
  background: var(--surface-base);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--sp-4);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 {
  font-family: var(--font-ui);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 var(--sp-2);
}
p { margin: 0 0 var(--sp-3); text-wrap: pretty; }
small, .pc-small { font-size: var(--fs-small); color: var(--text-muted); }

.pc-caption {
  font: 500 var(--fs-caption) var(--font-data);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* REGLE ABSOLUE : tout numero de carte, quantite, pourcentage
   passe par cette classe (chiffres tabulaires garantis). */
.pc-num {
  font-family: var(--font-data);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent-hover); text-decoration: underline; }

:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-md);
}

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

img { max-width: 100%; height: auto; display: block; }

/* Toute image de carte reserve son ratio : zero reflow au chargement */
.pc-card-img {
  aspect-ratio: var(--ratio-card);
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-inset);
}

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