/* ============================================================
   BASE v2 — Reset, typographie globale, utilitaires
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,300..700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ------------------------------------------------------------------
   CONTAINER
   ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

/* ------------------------------------------------------------------
   TYPOGRAPHIE
   ------------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Eyebrow — signature mono */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: block;
  margin-bottom: var(--sp-4);
  line-height: 1.4;
}

.eyebrow--accent  { color: var(--accent); }
.eyebrow--warm    { color: var(--warm); }
.eyebrow--light   { color: rgba(243,241,232,0.55); }

/* Display */
.text-display {
  font-family: var(--font-title);
  font-size: var(--text-display);
  line-height: var(--lh-display);
  letter-spacing: -0.035em;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "wght" 400, "SOFT" 50, "WONK" 1;
}

h1, .h1 {
  font-size: var(--text-h1);
  line-height: var(--lh-h1);
  letter-spacing: -0.025em;
  font-weight: 400;
  font-variation-settings: "opsz" 100, "wght" 400, "SOFT" 40, "WONK" 1;
}

h2, .h2 {
  font-size: var(--text-h2);
  line-height: var(--lh-h2);
  letter-spacing: -0.025em;
  font-weight: 500;
  font-variation-settings: "opsz" 72, "wght" 500, "SOFT" 35, "WONK" 0;
}

h3, .h3 {
  font-size: var(--text-h3);
  line-height: var(--lh-h3);
  letter-spacing: -0.01em;
  font-weight: 500;
  font-variation-settings: "opsz" 36, "wght" 500, "SOFT" 20, "WONK" 0;
}

.body-lg { font-size: var(--text-body-lg); line-height: var(--lh-body-lg); }
.body    { font-size: var(--text-body);    line-height: var(--lh-body); }
.small   { font-size: var(--text-small);   line-height: 1.5; }
.mono    { font-family: var(--font-mono);  font-size: var(--text-small); }

/* Italique expressif */
em, .em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "wght" 400, "SOFT" 80, "WONK" 1;
}

.em--warm { color: var(--warm); }

/* ------------------------------------------------------------------
   COULEURS DE FOND
   ------------------------------------------------------------------ */
.bg-cream  { background: var(--bg); }
.bg-sand   { background: var(--bg-2); }
.bg-paper  { background: var(--paper); }
.bg-dark   {
  background: var(--primary);
  color: var(--bg);
}
.bg-dark h1, .bg-dark h2, .bg-dark h3,
.bg-dark h4, .bg-dark h5, .bg-dark h6 { color: var(--bg); }
.bg-dark em { color: rgba(243,241,232,.75); }
.bg-dark .eyebrow { color: var(--warm); }

/* ------------------------------------------------------------------
   SECTIONS
   ------------------------------------------------------------------ */
.section    { padding-block: var(--section-py); }
.section-sm { padding-block: var(--section-py-sm); }

/* ------------------------------------------------------------------
   GRILLES
   ------------------------------------------------------------------ */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: var(--sp-6); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--sp-6); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--sp-6); }

/* ------------------------------------------------------------------
   SOULIGNAGE MANUSCRIT
   ------------------------------------------------------------------ */
.underline-wave {
  position: relative;
  display: inline;
}
.underline-wave::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: -4px;
  right: -4px;
  height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M2 10 Q50 3 100 9 Q150 15 198 6' stroke='%237A9B57' stroke-width='3.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}

/* ------------------------------------------------------------------
   ANIMATIONS
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .fade-up {
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity var(--t-slow) var(--ease),
      transform var(--t-slow) var(--ease);
  }
  .fade-up.visible { opacity: 1; transform: translateY(0); }

  /* Stagger pour les grilles */
  .stagger > *:nth-child(1) { transition-delay: 0ms; }
  .stagger > *:nth-child(2) { transition-delay: 60ms; }
  .stagger > *:nth-child(3) { transition-delay: 120ms; }
  .stagger > *:nth-child(4) { transition-delay: 180ms; }
  .stagger > *:nth-child(5) { transition-delay: 240ms; }
  .stagger > *:nth-child(6) { transition-delay: 300ms; }
}
@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------
   FOCUS
   ------------------------------------------------------------------ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ------------------------------------------------------------------
   UTILITAIRES
   ------------------------------------------------------------------ */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
.text-center  { text-align: center; }
.text-balance { text-wrap: balance; }
.text-muted   { color: var(--ink-2); }
.text-accent  { color: var(--accent); }
.text-warm    { color: var(--warm); }

.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.gap-2 { gap: var(--sp-2); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }

.divider { height: 1px; border: none; background: var(--line); }

/* ------------------------------------------------------------------
   PASTILLES DÉCORATIVES
   ------------------------------------------------------------------ */
.pastille {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  user-select: none;
  flex-shrink: 0;
}
/* Pastille section header — petit cercle coloré avant l'eyebrow */
.eyebrow--dot::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 8px;
  flex-shrink: 0;
}
.eyebrow--dot-warm::before {
  background: var(--warm);
}
.eyebrow--dot-blue::before {
  background: var(--primary);
}

/* Ticker animé */
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 28s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }

/* Counter animation */
.count-up { display: inline; }

/* Apparition avec clip */
@keyframes slideIn {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}
