/* ==========================================================================
   OFFICEVIBE — BASE / RESET / PRIMITIVES TYPOGRAPHIQUES & GRILLE
   Ne contient aucune valeur brute : uniquement des tokens de tokens.css
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--surface-0);
  color: var(--color-charcoal);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  font-weight: var(--weight-regular);
  font-feature-settings: var(--font-features);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }

/* Focus — non documenté ; anneau d'accessibilité en Electric Cobalt */
:focus-visible {
  outline: 2px solid var(--color-electric-cobalt);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* --------------------------------------------------------------------------
   GRILLE — conteneur 1200px, gouttière = elementGap (24px)
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--page-max-width);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.section { padding-block: var(--section-gap); }
.section--tight { padding-block: var(--space-56); }

/* Bandes de surface — la page alterne Paper White ↔ Warm Canvas */
.band-canvas { background: var(--surface-0); }
.band-paper  { background: var(--surface-1); }
.band-ink    { background: var(--surface-2); color: var(--color-paper-white); }

.grid { display: grid; gap: var(--element-gap); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Split hero / feature : 2 colonnes, contenu centré verticalement */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-64);
  align-items: center;
}
.split--reverse > *:first-child { order: 2; }
.split--reverse > *:last-child  { order: 1; }

.stack       { display: flex; flex-direction: column; gap: var(--element-gap); }
/* Les elements en pilule ne doivent jamais s'etirer dans une colonne flex */
.stack > .badge,
.stack > .chip,
.stack > .link-arrow,
.stack > .eyebrow { align-self: flex-start; }
.stack--sm   { gap: var(--space-16); }
.stack--xs   { gap: var(--space-8); }
.stack--lg   { gap: var(--space-32); }
.row         { display: flex; align-items: center; gap: var(--space-16); }
.row--wrap   { flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   TYPOGRAPHIE — un token = une classe
   -------------------------------------------------------------------------- */
.t-caption    { font-size: var(--text-caption);    line-height: var(--lh-caption);    letter-spacing: var(--ls-caption); }
.t-body-sm    { font-size: var(--text-body-sm);    line-height: var(--lh-body-sm);    letter-spacing: var(--ls-body-sm); }
.t-body       { font-size: var(--text-body);       line-height: var(--lh-body);       letter-spacing: var(--ls-body); }
.t-subheading { font-size: var(--text-subheading); line-height: var(--lh-subheading); letter-spacing: var(--ls-subheading); }
/* Sur un <h*>, subheading suit la règle des titres : sans géométrique, graisse 400,
   Ink Navy. Sur un <p>, .t-subheading reste du corps de texte — c'est le cas de la
   phrase de preuve sociale, qui doit rester en Inter. */
h1.t-subheading, h2.t-subheading, h3.t-subheading,
h4.t-subheading, h5.t-subheading, h6.t-subheading {
  font-family: var(--font-geometric);
  font-weight: var(--weight-regular);
  color: var(--color-ink-navy);
}

/* Les titres passent en sans géométrique — cf. DESIGN.md §2 "Le titre signature" */
.t-heading-sm,
.t-heading,
.t-heading-lg,
.t-display,
.t-display-lg {
  font-family: var(--font-geometric);
  font-weight: var(--weight-regular);
  color: var(--color-ink-navy);
  margin: 0;
}
/* balance reserve aux titres centres : le hero doit deborder ligne par ligne
   comme sur la capture Refero */
.section-head .t-heading-lg,
.section-head .t-heading,
.section-head .t-display { text-wrap: balance; }
.t-heading-sm { font-size: var(--text-heading-sm); line-height: var(--lh-heading-sm); letter-spacing: var(--ls-heading-sm); }
.t-heading    { font-size: var(--text-heading);    line-height: var(--lh-heading);    letter-spacing: var(--ls-heading); }
.t-heading-lg { font-size: clamp(30px, 4vw, var(--text-heading-lg)); line-height: var(--lh-heading-lg); letter-spacing: var(--ls-heading-lg); }
.t-display    { font-size: clamp(34px, 5vw, var(--text-display));    line-height: var(--lh-display);    letter-spacing: var(--ls-display); }
.t-display-lg { font-size: clamp(40px, 6.2vw, var(--text-display-lg)); line-height: var(--lh-display-lg); letter-spacing: var(--ls-display-lg); }

/* LA SIGNATURE : phrase en italique sérif dans un titre sans-serif.
   letter-spacing remis à normal — Martinaplantijn est documenté "letterSpacing: normal". */
.accent {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--weight-regular);
  letter-spacing: normal;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-caption);
  font-weight: var(--weight-bold);
  line-height: var(--lh-caption);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-charcoal);
  margin: 0;
}

.lead {
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--color-charcoal);
  max-width: 58ch;
  margin: 0;
}

.muted     { color: var(--color-stone); }
.secondary { color: var(--color-graphite); }
.on-ink    { color: var(--color-paper-white); }
.on-ink-soft { color: var(--color-lavender-mist); }

.text-center { text-align: center; }
/* Don't n°6 : jamais de corps de texte centré → seuls les titres/eyebrows le sont */
.section-head { display: flex; flex-direction: column; align-items: center; gap: var(--space-16); text-align: center; }
.section-head .lead { text-align: center; max-width: 68ch; } /* toléré : intro de section, pas du corps long */

/* --------------------------------------------------------------------------
   RESPONSIVE — NON DOCUMENTÉ. Breakpoints inférés. Voir GAPS.md §A.
   -------------------------------------------------------------------------- */
@media (max-width: 1120px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split   { gap: var(--space-48); }
}
@media (max-width: 900px) {
  :root { --page-gutter: 24px; --section-gap: 56px; }
  .split, .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .split--reverse > *:first-child,
  .split--reverse > *:last-child { order: 0; }
}
@media (max-width: 620px) {
  :root { --card-padding: 24px; }
  .grid--2, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}
