/* =========================================================================
   base.css — Reset léger + styles de base (typographie globale)
   Dépend de variables.css. Charger en 2e position.
   ========================================================================= */

/* --- Police (variable font : un seul fichier couvre tous les poids) ----- */
@font-face {
  font-family: "League Spartan";
  src: url("../fonts/LeagueSpartan-VariableFont_wght.ttf") format("truetype");
  font-weight: 1 999;
  font-style: normal;
  font-display: swap;
}

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

* {
  margin: 0;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

/* --- Titres ------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  line-height: var(--lh-tight);
  margin-bottom: 1rem;
}

h1 {
  font-weight: var(--fw-extrabold);
  font-size: var(--fs-h1);
}

h2 {
  font-weight: var(--fw-bold);
  font-size: var(--fs-h2);
  margin: 1.875rem 0;
}

h3 {
  font-weight: var(--fw-medium);
  font-size: var(--fs-h2);
  margin-top: 3.125rem;
  margin-bottom: 1.875rem;
}

/* --- Texte courant ------------------------------------------------------ */
p {
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
  margin-bottom: 1rem;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-link-hover);
}

strong {
  font-weight: var(--fw-bold);
}

hr {
  border: none;
  height: 1px;
  background-color: var(--c-grey-light);
}

/* --- Listes dans le contenu éditorial (réintroduit les puces) ----------- */
.content ul,
.prose ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.6rem 0;
  /* Puce (::marker) et texte sur la même couleur que le corps de texte. */
  color: var(--color-text);
}

.content ul li,
.prose ul li {
  margin: 0.3rem 0;
  font-size: var(--fs-base);
}

.content ul ul li,
.prose ul ul li {
  list-style: circle;
}

/* --- Scrollbar (reprise du legacy) -------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--c-white);
  border-radius: 60px;
}
::-webkit-scrollbar-thumb {
  background: var(--c-purple);
  border-radius: 60px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* --- Accessibilité ------------------------------------------------------ */
:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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