/* ==========================================================================
   IROKO INNOV — Design tokens, reset & typographie
   ========================================================================== */

:root {
  /* Couleurs de marque */
  --ink:        #0B1610;
  --ink-2:      #12241B;
  --ink-3:      #1B3327;
  --bone:       #F7F3EB;
  --bone-2:     #EFE8DA;
  --bone-3:     #E2D8C5;
  --terra:      #C6551F;
  --terra-2:    #E0763B;
  --terra-soft: #F3DFD2;
  --leaf:       #2E9E55;
  --leaf-2:     #47B96D;
  --gold:       #C9A455;

  /* Surfaces & texte */
  --bg:          var(--bone);
  --surface:     #FFFFFF;
  --text:        #1A2A21;
  --text-muted:  #5E6E64;
  --text-invert: #F7F3EB;
  --line:        rgba(26, 42, 33, .12);
  --line-invert: rgba(247, 243, 235, .16);

  /* Typographie */
  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fs-hero: clamp(2.1rem, 4.6vw, 4rem);
  --fs-h1:   clamp(1.85rem, 3.6vw, 3rem);
  --fs-h2:   clamp(1.55rem, 2.6vw, 2.3rem);
  --fs-h3:   clamp(1.1rem, 1.5vw, 1.4rem);
  --fs-lead: clamp(1rem, 1.1vw, 1.15rem);
  --fs-body: 1rem;
  --fs-small: .9063rem;
  --fs-eyebrow: .72rem;

  /* Rythme */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --wrap: 1280px;
  --wrap-narrow: 860px;
  --section-y: clamp(4.5rem, 10vw, 9rem);
  --radius: 4px;
  --radius-lg: 10px;

  /* Ombres & transitions */
  --shadow-sm: 0 2px 8px rgba(11, 22, 16, .06);
  --shadow: 0 18px 50px -24px rgba(11, 22, 16, .35);
  --shadow-lg: 0 40px 90px -40px rgba(11, 22, 16, .5);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur: .6s;
}

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-feature-settings: "kern", "liga", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: inherit; text-decoration: none; }

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--terra);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Titres
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.02em;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 40;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }

p { text-wrap: pretty; }

strong { font-weight: 600; }

.display {
  font-size: var(--fs-hero);
  line-height: 1.02;
  letter-spacing: -.03em;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--text-muted);
}

.italic-accent {
  font-style: italic;
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 40;
  color: var(--terra);
}

/* --------------------------------------------------------------------------
   Utilitaires de mise en page
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 5.5rem); }
.section--flush-top { padding-top: 0; }

.section--dark {
  background: var(--ink);
  color: var(--text-invert);
}

.section--dark .lead,
.section--dark .muted { color: rgba(247, 243, 235, .68); }

.section--bone { background: var(--bone-2); }

.muted { color: var(--text-muted); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Surtitre */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 1.35rem;
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}

.section--dark .eyebrow { color: var(--terra-2); }

/* En-tête de section */
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow::before { display: none; }
.section-head p { margin-top: 1.25rem; }

/* Filet décoratif */
.rule {
  height: 1px;
  background: var(--line);
  border: 0;
}

.section--dark .rule { background: var(--line-invert); }

/* Grain */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: .28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E");
}

/* Accessibilité */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 10000;
  background: var(--ink);
  color: var(--text-invert);
  padding: .75rem 1.25rem;
  border-radius: var(--radius);
  transition: top .2s;
}

.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Animations d'apparition
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal="mask"] { transform: translateY(40px) scale(.985); }
[data-reveal="left"] { transform: translateX(-32px); }
[data-reveal="right"] { transform: translateX(32px); }

.line-mask { display: block; overflow: hidden; }

.line-mask > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1.05s var(--ease);
  transition-delay: var(--line-delay, 0ms);
}

.is-visible .line-mask > span,
.line-mask.is-visible > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .line-mask > span { transform: none; }
}
