/* ============================================================
   BONNETON FORMATIONS - Système de design partagé
   "Éveiller les sens, stimuler l'esprit"
   ============================================================ */

:root {
  /* - Cadre commun : nuit cosmique + or - */
  --bg:        #070a14;
  --bg-2:      #0a0e1c;
  --surface:   #111a30;
  --surface-2: #18233f;
  --line:      rgba(230, 201, 118, 0.16);
  --line-soft: rgba(236, 231, 219, 0.10);

  --ink:       #ece7db;   /* blanc chaud */
  --ink-soft:  #c0c5d4;
  --ink-mute:  #828aa0;

  --gold:      #e6c976;
  --gold-deep: #c9a24a;
  --gold-glow: rgba(230, 201, 118, 0.40);

  /* - Identités par activité - */
  --wine:      #b23a5d;   /* œnologie */
  --wine-deep: #7a1f3b;
  --wine-glow: rgba(178, 58, 93, 0.45);

  --mind:      #58b4c9;   /* esprit critique */
  --mind-deep: #2c7a8e;
  --mind-glow: rgba(88, 180, 201, 0.40);

  --cosmos:    #8b7be0;   /* conférences univers */
  --cosmos-deep:#5a48b0;
  --cosmos-glow: rgba(139, 123, 224, 0.42);

  /* - Type - */
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Hanken Grotesk", system-ui, sans-serif;
  --mono:  "Space Mono", ui-monospace, monospace;

  /* - Layout - */
  --pad: clamp(20px, 5vw, 80px);
  --maxw: 1280px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  cursor: none;
}
@media (hover: none) { body { cursor: auto; } }

::selection { background: var(--gold); color: var(--bg); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* - Starfield canvas (fond global) - */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* - Curseur personnalisé - */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--gold);
  transition: width .25s var(--ease), height .25s var(--ease), opacity .25s;
}
.cursor-ring {
  width: 38px; height: 38px;
  border: 1px solid var(--gold);
  opacity: .55;
  transition: width .3s var(--ease), height .3s var(--ease), opacity .3s, border-color .3s;
}
.cursor-ring.is-hover { width: 64px; height: 64px; opacity: 1; }
.cursor-dot.is-hover  { width: 0; height: 0; }
@media (hover: none) { .cursor-dot, .cursor-ring { display: none; } }

/* ============================================================
   TYPOGRAPHIE
   ============================================================ */
.kicker {
  font-family: var(--mono);
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.kicker::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--gold);
  opacity: .7;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; }

.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(48px, 9vw, 130px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.display em { font-style: italic; color: var(--gold); }

.h2 { font-size: clamp(34px, 5.5vw, 76px); }
.h3 { font-size: clamp(24px, 3vw, 40px); }

.lead {
  font-size: clamp(17px, 1.5vw, 21px);
  color: var(--ink-soft);
  max-width: 60ch;
  line-height: 1.7;
}
p { color: var(--ink-soft); }
.muted { color: var(--ink-mute); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad);
  transition: background .4s var(--ease), padding .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 10, 20, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
  padding-top: 16px; padding-bottom: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.01em;
}
.brand .mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  position: relative;
}
.brand .mark::before {
  content: "";
  position: absolute; inset: 0;
  border: 1px solid var(--gold);
  border-radius: 50%;
  opacity: .9;
}
.brand .mark::after {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
}
.brand b { font-weight: 600; }
.brand span.sub { color: var(--ink-mute); font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 38px);
}
.nav-links a {
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
  transition: color .3s;
}
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.cta {
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 9px 20px;
  color: var(--gold);
}
.nav-links a.cta::after { display: none; }
.nav-links a.cta:hover { background: var(--gold); color: var(--bg); border-color: var(--gold); }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(80vw, 340px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
    padding: 0 40px;
    background: var(--bg-2);
    border-left: 1px solid var(--line-soft);
    transform: translateX(100%);
    transition: transform .5s var(--ease);
    z-index: 99;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 20px; font-family: var(--serif); }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 6px;
    background: none; border: none; cursor: none; z-index: 101; padding: 6px;
  }
  .nav-toggle span { width: 26px; height: 2px; background: var(--ink); transition: transform .4s var(--ease), opacity .3s; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 15px 28px;
  border-radius: 100px;
  border: 1px solid var(--gold);
  color: var(--bg);
  background: var(--gold);
  position: relative;
  overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 14px 40px -12px var(--gold-glow); }
.btn .arr { transition: transform .4s var(--ease); }
.btn:hover .arr { transform: translateX(5px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); box-shadow: none; }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.section { position: relative; z-index: 1; padding: clamp(80px, 12vh, 160px) var(--pad); }
.wrap { max-width: var(--maxw); margin: 0 auto; }
.wrap-narrow { max-width: 920px; margin: 0 auto; }

/* ============================================================
   ANIMATIONS DE RÉVÉLATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .10s; }
.reveal[data-delay="2"] { transition-delay: .20s; }
.reveal[data-delay="3"] { transition-delay: .30s; }
.reveal[data-delay="4"] { transition-delay: .40s; }
.reveal[data-delay="5"] { transition-delay: .50s; }

/* mots animés (text split) - clip-path vertical uniquement
   pour que les glyphes serif/italic ne soient jamais coupés
   horizontalement. Padding vertical compense jambages/accents. */
.word-anim {
  display: inline-block;
  vertical-align: top;
  padding: 0.14em 0 0.20em;
  margin: -0.14em 0 -0.20em;
  clip-path: inset(-1% -200% -1% -200%);
}
.word-anim > span {
  display: inline-block;
  transform: translateY(135%);
  transition: transform .9s var(--ease);
}
.word-anim.in > span { transform: none; }
.word-anim > span.em { font-style: italic; color: var(--gold); }

/* clip image reveal */
.img-clip { clip-path: inset(0 0 100% 0); transition: clip-path 1.2s var(--ease); }
.img-clip.in { clip-path: inset(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto; }
  .reveal, .word-anim > span, .img-clip { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}

/* ============================================================
   PIED DE PAGE
   ============================================================ */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line-soft);
  padding: clamp(64px, 9vh, 110px) var(--pad) 40px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.4));
}
.footer-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.footer h3 { font-size: clamp(30px, 4vw, 52px); margin-bottom: 18px; }
.footer-col h4 {
  font-family: var(--mono); font-size: 12px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 18px;
}
.footer-col a { display: block; color: var(--ink-soft); padding: 6px 0; transition: color .3s, padding-left .3s; }
.footer-col a:hover { color: var(--gold); padding-left: 6px; }
.footer-base {
  max-width: var(--maxw); margin: 56px auto 0;
  padding-top: 28px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-mute);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* utilitaires */
.accent-gold { color: var(--gold); }
.center { text-align: center; }
.stack > * + * { margin-top: 1.1em; }
