/* =========================
   BASE (html/body/typo)
========================= */

/* iOS & Mobile-Safe Setup — Viewport + Overflow */
html, body{ overflow-x: clip; }
@supports not (overflow: clip){
  html, body{ overflow-x: hidden; }
}

/* iOS Safari */
@supports (-webkit-touch-callout: none){
  body{
    min-height: 100%;
    height: auto;
    overflow-x: clip;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: none;
  }

  /* Évite le zoom automatique si font-size < 16px */
  input, select, textarea{ font-size: 16px; }
}

/* Base body layout */
body{
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-300);
  line-height: var(--lh-normal);
  color: var(--on-bg);
  background: var(--color-bg);

  display: flex;
  flex-direction: column;
  inline-size: 100%;
  max-inline-size: 100%;

  min-height: 100dvh;
  height: auto;

  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "liga" 1, "calt" 1;
}

main {
  flex:1;
}

/* Nombres tabulaires */
:where(input, button, .ui, .stats, .price){
  font-variant-numeric: lining-nums tabular-nums;
}

/* Display hero */
.display-hero{
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-950);
  line-height: var(--lh-tight);
  letter-spacing: -0.012em;
}

/* Paragraphes */
p{
  margin: 0 0 1em;
  font-size: var(--fs-300);
  line-height: var(--lh-relax);
}

/* Liens */
a{
  color: inherit;
  text-decoration: none;
  transition: var(--trans-color);
}
a:hover{ color: var(--color-link-hover); }
a:focus-visible{
  outline: 2px solid #4c9ffe;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Titres */
h1, .h1{
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-800);
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
  margin-top: 0;
  margin-bottom: var(--space-8);
}

h2, .h2{
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-700);
  line-height: var(--lh-snug);
  letter-spacing: -0.008em;
  margin-top: var(--space-8);
  margin-bottom: var(--space-5);
}

h3, .h3{
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-600);
  line-height: var(--lh-normal);
  margin-top: var(--space-6);
  margin-bottom: var(--space-4);
}

h4, .h4{
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-500);
  line-height: var(--lh-normal);
  margin-top: 1.4rem;
  margin-bottom: 0.75rem;
}

h5, .h5{
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
  font-size: var(--fs-400);
  line-height: var(--lh-normal);
  margin-top: 1.25rem;
  margin-bottom: 0.6rem;
}

h6, .h6{
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
  font-size: var(--fs-300);
  line-height: var(--lh-normal);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.h1--no-margin,
.h2--no-margin,
.h3--no-margin,
.h4--no-margin,
.h5--no-margin,
.h6--no-margin{
  margin-top: 0;
  margin-bottom: 0;
}

/* Petites tailles */
small,.caption{ font-size: var(--fs-200); line-height: var(--lh-normal); }
.overline{ font-size: var(--fs-100); text-transform: uppercase; letter-spacing: .06em; }

/* Réduire animations */
@media (prefers-reduced-motion: reduce){
  *{
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}