/* ==========================================================================
   WeRefund — Reset, typographie de base, cadre de page, utilitaires
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink-body);
  font-family: var(--font-text);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  font-variant-ligatures: common-ligatures;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
  font-variation-settings: "opsz" 32;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: var(--ls-display); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-snug); letter-spacing: var(--ls-display); }
h3 { font-size: var(--fs-h3); line-height: 1.28; letter-spacing: var(--ls-title); }
h4 { font-size: var(--fs-lg); line-height: 1.35; letter-spacing: var(--ls-title); }

p { margin: 0; }
p + p { margin-top: 1em; }

strong { font-weight: 600; color: var(--ink); }

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

/* Aucune page ne défile en largeur : l'entrée animée du hero (translation + échelle) et le voile du
   méga-menu dépassaient de 4 à 8 px à 375 px. `clip` et non `hidden` : pas de conteneur de défilement,
   donc la nav collante continue de coller. */
html, body { overflow-x: clip; }

:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* --------------------------------------------------------------------------
   Cadre de page : les hachures diagonales des gouttières de la référence
   -------------------------------------------------------------------------- */

.frame {
  position: relative;
  max-width: var(--frame);
  margin-inline: auto;
  background: var(--bg);
  border-inline: 1px solid var(--line-hair);
}

.frame::before,
.frame::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50vw;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--hatch) 0 1px,
    transparent 1px 9px
  );
}
.frame::before { right: 100%; }
.frame::after  { left: 100%; }

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

/* Séparateur pleine largeur entre deux sections, avec le losange de la réf. */
.rule {
  position: relative;
  height: 1px;
  background: var(--line-hair);
}
.rule::before,
.rule::after {
  content: "";
  position: absolute;
  top: -2.5px;
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  background: var(--line);
}
.rule::before { left: -2.5px; }
.rule::after  { right: -2.5px; }

.section { padding-block: var(--sp-section); }
.section--tight { padding-block: var(--sp-block); }

/* --------------------------------------------------------------------------
   Éléments typographiques récurrents
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: -.01em;
}
.eyebrow i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--accent-ink);
  box-shadow: var(--sh-sm);
}
.eyebrow i svg { width: 12px; height: 12px; }

.lede {
  color: var(--ink-soft);
  font-size: var(--fs-md);
  line-height: 1.62;
  max-width: 46ch;
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}

.num { font-variant-numeric: tabular-nums; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent-ink);
  font-weight: 500;
  font-size: var(--fs-sm);
  transition: gap var(--dur) var(--ease), color var(--dur) var(--ease);
}
.link-arrow svg { width: 13px; height: 13px; }
.link-arrow:hover { gap: 11px; color: var(--ink); }

/* @link-ink (Rico, 19/09) */
/* Les liens ne sont plus verts : encre noire, flèche en gris, soulignement au survol. Le vert #047857 reste réservé
   aux états (Verified, coches, pastilles) et le #2EF19C aux aplats — c'est le texte courant qui changeait de couleur
   pour rien. Posé après .link-arrow pour couvrir les pages qui le redéclarent. */
.link-arrow { color: var(--ink); }
.link-arrow svg { color: var(--ink-faint); transition: color var(--dur) var(--ease); }
.link-arrow:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.link-arrow:hover svg { color: var(--ink); }
/* @/link-ink */


/* En-tête de section : titre à gauche, lien à droite */
.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  padding-bottom: var(--sp-block);
}
.sec-head__text { max-width: 34ch; }
.sec-head h2 { margin-top: 20px; }
.sec-head .lede { margin-top: 18px; }

.sec-head--center {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}
.sec-head--center .sec-head__text { max-width: 42ch; }
.sec-head--center .lede { max-width: 44ch; margin-inline: auto; }

/* --------------------------------------------------------------------------
   Utilitaires
   -------------------------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--solid);
  color: var(--solid-ink);
  font-size: var(--fs-xs);
  font-weight: 500;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus-visible { top: 16px; }

/* --------------------------------------------------------------------------
   Mouvement
   Tout ce qui bouge vit dans `motion.css`, chargé après celui-ci — y compris
   la révélation au défilement, qui s'y trouvait auparavant. Un seul foyer :
   deux endroits qui animent le même élément finissent toujours par se
   contredire en silence.
   Ne subsiste ici que la coupure globale, qui doit s'appliquer à TOUT, y
   compris aux animations qu'un fichier ultérieur ajouterait sans le savoir.
   -------------------------------------------------------------------------- */

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