/* ==========================================================================
   Base : reset, typographie, accessibilité
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 6rem;
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--c-beige);
  color: var(--c-brown);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: 1.6;
  font-weight: 420;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--c-line); margin: var(--s-6) 0; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  font-family: var(--f-serif);
  font-weight: 420;
  line-height: 1.04;
  letter-spacing: -0.012em;
  font-optical-sizing: auto;
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.15; }
h4 { font-size: 1.15rem; line-height: 1.25; }

.display {
  font-family: var(--f-serif);
  font-size: var(--t-display);
  font-weight: 400;
  line-height: .96;
  letter-spacing: -0.025em;
}
.display em, h1 em, h2 em, .serif-italic { font-style: italic; font-weight: 400; }

.lead { font-size: var(--t-lead); line-height: 1.55; max-width: var(--measure); }
.muted { color: var(--c-muted-strong); }
.small { font-size: var(--t-small); }
.micro { font-size: var(--t-micro); letter-spacing: .01em; }
.serif { font-family: var(--f-serif); }
.nowrap { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }
.prose { max-width: 40rem; }
.prose p { margin-bottom: 1.1em; }
.prose h2 { font-size: var(--t-h3); margin-top: 2em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose a { color: var(--c-accent-ink); }

/* Accessibilité */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed;
  top: var(--s-3); left: var(--s-3);
  z-index: 1000;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius-pill);
  background: var(--c-brown);
  color: var(--c-ivory);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus { transform: none; }

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
a:focus-visible, button:focus-visible { border-radius: 6px; }

::selection { background: var(--c-powder); color: var(--c-brown); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
