/* Renaflow : base, typographie, boutons, apparition au scroll */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
  /* Filet de sécurité : jamais de défilement latéral de la page, même si un élément décoratif dépasse */
  overflow-x: clip;
}

body {
  margin: 0;
  /* Les halos décoratifs peuvent dépasser : on les coupe au bord de l'écran, sans bloquer le "sticky" */
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* Les attributs width/height des images ne servent qu'à réserver la place : la hauteur suit la largeur. */
img {
  height: auto;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.7rem, 6.2vw, 5.4rem);
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.6rem);
}

h3 {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
}

em {
  font-style: normal;
  font-weight: 300;
  color: var(--em);
}

p {
  max-width: 62ch;
  text-wrap: pretty;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(4.5rem, 10vw, 9rem);
}

.lead {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--em);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 600;
  z-index: 60;
}

.skip-link:focus {
  top: 1rem;
}

/* Boutons : pilule, texte sur une ligne, appui physique */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95em 1.7em;
  border: 1.5px solid transparent;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -14px var(--prune);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: currentColor;
}

.btn--ghost:hover {
  box-shadow: none;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.arrow::after {
  content: "\2192";
  transition: transform 0.35s var(--ease);
}

.btn:hover.arrow::after,
.btn:hover .arrow::after {
  transform: translateX(4px);
}

/* Apparition au scroll : hiérarchie de lecture, jamais décorative seule */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    transition-delay: calc(var(--i, 0) * 80ms);
  }

  .js .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
