*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-body-mobile);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 1024px) {
  body {
    font-size: var(--text-body);
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-md);
  line-height: 1.2;
}

h1 {
  font-size: var(--text-h1-mobile);
}

h2 {
  font-size: var(--text-h2-mobile);
  line-height: 1.3;
  /* Rupture typographique avec H1 : meme famille serif mais regular (400)
     + italique. Pattern editorial-litteraire (The Atlantic, Le Monde Mag).
     Le H1 reste serif 600 bold. */
  font-weight: 400;
  font-style: italic;
}

h3 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--text-h3-mobile);
  line-height: 1.4;
}

@media (min-width: 1024px) {
  h1 { font-size: var(--text-h1); }
  h2 { font-size: var(--text-h2); }
  h3 { font-size: var(--text-h3); }
}

p {
  margin: 0 0 1em;
  max-width: var(--width-content);
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-hover);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

::selection {
  background-color: var(--color-accent);
  color: var(--color-bg);
}
