/* =============================================================================
   Enthalpic, site public : base
   Reset minimal, typographie, éléments HTML nus. Aucune classe ici.
   ============================================================================= */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

html, body { overflow-x: hidden; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-snug);
  color: inherit;
}

h1 { font-size: var(--text-3xl); line-height: var(--leading-tight); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); font-weight: 600; }
h4 { font-size: var(--text-md); font-weight: 600; }

p { margin: 0; }
p + p { margin-top: var(--space-4); }

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--easing);
}
a:hover { color: var(--color-accent-hover); }
/* Liens dans le texte courant : soulignes, pour ne pas reposer sur la seule couleur (WCAG 1.4.1) */
.page__main p a:not([class]), .page__main li a:not([class]) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: var(--border-width-strong) solid var(--color-focus);
  outline-offset: 2px;
}

strong { font-weight: 600; }
small { font-size: var(--text-sm); }

ul, ol { margin: 0; padding-left: 1.25em; }
li + li { margin-top: var(--space-2); }

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

figure { margin: 0; }
figcaption { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--space-2); text-align: center; }

hr {
  border: 0;
  border-top: var(--border-width) solid var(--color-border);
  margin: var(--space-6) 0;
}

code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.9em; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
th, td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--border-width) solid var(--color-border);
  vertical-align: top;
}
th {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

input, textarea, select, button {
  font: inherit;
  color: inherit;
}

input, textarea, select {
  width: 100%;
  padding: var(--space-3);
  background: var(--color-bg-elevated);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--duration-fast) var(--easing);
}
input:focus, textarea:focus, select:focus { border-color: var(--color-accent); outline: none; }
textarea { min-height: 7rem; resize: vertical; }

label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

button { cursor: pointer; background: none; border: 0; padding: 0; }

::selection { background: var(--color-accent-soft); color: var(--color-bg-inverse); }
