/* ============================================================
   opus solar : Design System (tokens + base)
   Source de vérité couleurs / typo / formes / motion.
   Réf : PROMPT-claude-design-opus-solar.md + opus-solar-site-daylight-quality.md
   ============================================================ */

/* ---------- POLICES ----------
   Geist locale pour les titres, le texte et l'interface : mêmes glyphes et
   mêmes graisses pour les lettres françaises, quel que soit l'ordinateur.
   Ne pas placer une police système non embarquée avant la police de marque.
*/
@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 300 600;
  font-display: swap;
}

:root {
  /* ---------- COULEURS (source de vérité) ---------- */
  --pulse-core:   #FF5531; /* primaire : gros aplats, CTA. Texte SOMBRE dessus. */
  --volt-surge:   #BCF743; /* accents, tags, data highlights. Texte SOMBRE dessus. */
  --deep-grid:    #161616; /* encre, sections dark : JAMAIS #000 */
  --thermal-mist: #F5D3CA; /* fonds calmes, pêche */
  --pure-current: #FFFFFF;

  /* Dérivés utiles */
  --ink:            var(--deep-grid);
  --ink-70:         rgba(22, 22, 22, .7);
  --ink-45:         rgba(22, 22, 22, .45);
  --cream:          #FFF7F0;              /* fond crème chaud dominant (façon Daylight #FFF7E9) */
  --surface:        var(--cream);
  --surface-calm:   var(--thermal-mist);
  --surface-white:  var(--pure-current);
  --on-pulse:       var(--deep-grid);   /* texte sur orange */
  --on-volt:        var(--deep-grid);   /* texte sur lime */
  --on-dark:        var(--pure-current);/* texte sur Deep Grid */
  --pulse-glow:     rgba(255, 85, 49, .45);

  /* ---------- TYPOGRAPHIE ---------- */
  --font-display: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --font-body:    "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:    "Geist", "Inter", system-ui, -apple-system, sans-serif; /* plus de mono : eyebrows/labels en typo du site (Geist) */

  /* Échelle fluide (clamp min → max) */
  --fs-eyebrow:  .8125rem;                          /* UPPERCASE, tracking large */
  --fs-body:     clamp(1rem, .95rem + .3vw, 1.125rem);
  --fs-lead:     clamp(1.125rem, 1rem + .6vw, 1.375rem);
  --fs-h3:       clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
  --fs-h2:       clamp(2.1rem, 1.5rem + 2.9vw, 4rem);
  --fs-hero:     clamp(3rem, 1.4rem + 7vw, 8rem);
  --fs-wordmark: clamp(4rem, 2rem + 12vw, 16rem);   /* footer géant */

  --tracking-eyebrow: .18em;
  --leading-tight:  1.02;
  --leading-snug:   1.12;
  --leading-body:   1.55;

  /* ---------- FORMES (tout arrondi) ---------- */
  --radius-pill: 999px;
  --radius-sm:   14px;
  --radius-xl:   28px;
  --radius-2xl:  40px;

  /* ---------- OMBRES (douces & chaudes) ---------- */
  --shadow-sm:   0 2px 8px rgba(22,22,22,.06);
  --shadow-card: 0 18px 40px -18px rgba(180, 90, 60, .35);
  --shadow-lift: 0 26px 60px -20px rgba(180, 90, 60, .45);
  --shadow-glass: 0 8px 32px rgba(22,22,22,.12);

  /* ---------- MOTION (la "sauce", 80% du rendu) ---------- */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);       /* reveals : défaut */
  --ease-daylight: cubic-bezier(0.075, 0.82, 0.165, 1); /* fades longs */
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);   /* mascotte, pops, badges */

  --dur-micro:   .2s;    /* micro-interactions 150–250ms */
  --dur-reveal:  .85s;   /* reveals 700–1000ms */
  --dur-section: 1.2s;   /* transitions de section 1000–1400ms */
  --stagger:     .1s;    /* 80–120ms */

  /* ---------- LAYOUT ---------- */
  --maxw: 1240px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Titres : Hikasami, sentence case (le copy gère la casse) */
/* Titres display de section : serif régulier (Daylight featureDeck) */
.display, h1, h2 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
}
/* Titres de cartes/étapes : sans medium, tracking serré (Daylight aeonikPro) */
h3, .h-3 {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}
h1, .h-hero { font-size: var(--fs-hero); }
h2, .h-2   { font-size: var(--fs-h2); line-height: var(--leading-snug); }
h3, .h-3   { font-size: var(--fs-h3); }

/* Eyebrow : UPPERCASE, tracking large */
.eyebrow {
  font-family: var(--font-body);              /* typo du site (Geist) */
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .16em;                      /* eyebrow UPPERCASE, tracking large (voix opus) */
  font-weight: 600;
  color: var(--ink-45);
}
.eyebrow--volt { color: var(--volt-surge); } /* sur fond dark */

/* ============================================================
   COMPOSANTS
   ============================================================ */

/* Boutons pill */
.pill {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .95em 1.6em;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;   /* jamais de soulignement sur les boutons */
  transition: transform var(--dur-micro) var(--ease-out-expo),
              box-shadow var(--dur-micro) var(--ease-out-expo),
              background var(--dur-micro) var(--ease-out-expo);
}
.pill:hover { transform: translateY(-2px); }
.pill--primary { background: var(--pulse-core); color: var(--on-pulse); }
.pill--primary:hover { background: #ff6a4a; }
.pill--outline { background: transparent; border-color: currentColor; color: var(--on-dark); }
.pill--volt { background: var(--volt-surge); color: var(--on-volt); }

/* Tag / chip */
.tag {
  display: inline-block;
  padding: .35em .9em;
  border-radius: var(--radius-pill);
  background: var(--volt-surge);
  color: var(--on-volt);
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  font-weight: 700;
}

/* Cartes */
.card {
  background: var(--surface-calm);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-micro) var(--ease-out-expo),
              box-shadow var(--dur-micro) var(--ease-out-expo);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

/* Carte glass (hero) */
.card-glass {
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glass);
}

/* Sections */
.section { padding: clamp(4rem, 10vh, 9rem) var(--gutter); }
.section--dark { background: var(--deep-grid); color: var(--on-dark); }
.section--calm { background: var(--surface-calm); }
.container { max-width: var(--maxw); margin-inline: auto; }

/* Chiffres data (count-up) : lime sur dark */
.stat-num {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  color: var(--volt-surge);
  font-weight: 800;
}

/* ============================================================
   REVEALS (à piloter en JS / IntersectionObserver ou GSAP)
   Règle d'or : tout reveal = masque (jamais un simple fade).
   ============================================================ */
/* États masqués gatés sous .js → titres/visuels visibles SANS JavaScript. */
.reveal-mask { overflow: hidden; }
.js .reveal-mask > * { transform: translateY(110%); transition: transform var(--dur-reveal) var(--ease-out-expo); }
.js .reveal-mask.is-in > * { transform: translateY(0); }

.js .reveal-img { clip-path: inset(0 0 100% 0); transition: clip-path var(--dur-reveal) var(--ease-out-expo); }
.js .reveal-img.is-in { clip-path: inset(0 0 0 0); }

/* Mascotte : seule au spring + idle "respiration" */
.mascotte { transition: transform .6s var(--ease-spring); }
@keyframes mascotte-breathe { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(.97); } }
.mascotte--idle { animation: mascotte-breathe 3s var(--ease-daylight) infinite; }
.mascotte:hover { transform: translateY(-8px); }

/* ============================================================
   ACCESSIBILITÉ : prefers-reduced-motion → fade 300ms
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .3s !important;
    scroll-behavior: auto !important;
  }
  .js .reveal-mask > * { transform: none; opacity: 0; transition: opacity .3s linear; }
  .js .reveal-mask.is-in > * { opacity: 1; }
  .js .reveal-img { clip-path: none; opacity: 0; transition: opacity .3s linear; }
  .js .reveal-img.is-in { opacity: 1; }
}
