/* Socle : remise à plat, typographie, liens, accessibilité. */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: dark; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-4);
  text-wrap: balance;
}
h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
h4 { font-size: var(--fs-lg); font-weight: 600; line-height: 1.3; }

p { margin: 0 0 var(--s-4); text-wrap: pretty; }
ul, ol { margin: 0 0 var(--s-4); padding-left: 1.3em; }
li { margin-bottom: var(--s-2); }
strong { font-weight: 700; color: var(--ink); }

a { color: var(--palm); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--palm-hover); }

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

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--ground);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
  font-weight: 700;
}
.skip-link:focus { top: var(--s-4); color: var(--ground); }

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

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap-prose { width: min(100% - 2 * var(--gutter), var(--prose)); margin-inline: auto; }

table { border-collapse: collapse; width: 100%; margin: 0 0 var(--s-5); font-size: var(--fs-sm); }
th, td { text-align: left; padding: var(--s-3); border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-display); font-weight: 600; }
.table-scroll { overflow-x: auto; }

mark.todo {
  background: var(--brass);
  color: var(--ground);
  padding: 0 .3em;
  border-radius: 4px;
  font-weight: 600;
}
