/*
  base.css — reset + styles des éléments HTML nus + conteneur de mise en page.
  Pas de style de composant ici.
*/
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-brown-dark);
  line-height: 1.2;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }

p { max-width: 65ch; }

a {
  color: inherit;
  text-decoration-color: var(--color-terracotta);
}

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

svg { display: block; }

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  font-size: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  color: inherit;
}

label {
  display: inline-block;
}

table {
  border-collapse: collapse;
}

/* Focus clavier visible partout */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-terracotta-dark);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--color-yellow);
  color: var(--color-ink);
}

/* Lien d'évitement */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-ink);
  color: var(--color-white);
  padding: var(--space-3) var(--space-5);
  border-radius: 0 0 var(--radius-md) 0;
  z-index: 200;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

/* Conteneur central */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

/* Rythme vertical générique entre sections de page */
.section {
  padding-block: var(--space-8);
}

.section--tight {
  padding-block: var(--space-6);
}

.section--cream-deep {
  background: var(--color-cream-deep);
}

.section--brown {
  background: var(--color-brown);
  color: var(--color-white);
}

.section--brown h2,
.section--brown h3 {
  color: var(--color-white);
}

/* Utilitaire visuellement masqué mais accessible */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
