/* ==========================================================================
   KIVORA · base.css
   Reset, typographie de base et utilitaires.
   ========================================================================== */

/* --- Reset léger --- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* place pour la barre collante mobile */
  padding-bottom: calc(var(--sticky-h) + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  html { scroll-padding-top: calc(var(--header-h) + 16px); }
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

/* --- Typographie --- */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: -0.035em; }
h2 { font-size: var(--fs-h2); line-height: 1.12; letter-spacing: -0.03em; }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
p { text-wrap: pretty; }
strong { font-weight: 700; }

/* --- Focus visible --- */
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }

/* --- Utilitaires --- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white);
  padding: 12px 16px; border-radius: 12px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

[hidden] { display: none !important; }

.text-center { text-align: center; }
.nowrap { white-space: nowrap; }

/* --- Mouvements réduits --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
