/* ============================================
   BASE.CSS — Styles globaux (body, titres, liens…)
   ============================================ */

/* --- Document --- */

body {
  overflow-x: clip;
  background-color: var(--color-bg);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
}

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

/* --- Typographie --- */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: var(--font-size-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

p,
li,
label,
input,
textarea {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text);
}

.whisper {
  font-family: var(--font-whisper);
}

/* --- Liens --- */

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* --- Utilitaires de mise en page de base --- */

.container {
  width: 100%;
  max-width: var(--max-width-site);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

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

/* --- Responsive typographie --- */

@media (max-width: 1024px) {
  h1 {
    font-size: var(--font-size-3xl);
  }

  h2 {
    font-size: var(--font-size-2xl);
  }

  h3 {
    font-size: var(--font-size-xl);
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: var(--font-size-2xl);
  }

  h2 {
    font-size: var(--font-size-xl);
  }

  h3 {
    font-size: var(--font-size-lg);
  }

  .container {
    padding: 0 var(--space-md);
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: var(--font-size-xl);
  }
}
