/* ============================================================
   RETOUR À SOI · base : tokens, reset, typo, nav, footer, UI
   ============================================================ */

:root {
  --cream: #F7F0E8;
  --blush: #E7DEF3;
  --rose: #E58FB0;
  --magenta: #C9507E;
  --peach: #FFB693;
  --orange: #FF7E4A;
  --lav: #CDB4EC;
  --violet: #8D6BC8;
  --plum: #2B1A5E;

  --ink: #2B1A5E;
  --ink-soft: rgba(43, 26, 94, 0.68);
  --line: rgba(43, 26, 94, 0.2);
  --line-light: rgba(247, 240, 232, 0.28);
  --card: rgba(255, 255, 255, 0.38);

  --f-display: "Melodrama", "Times New Roman", serif;
  --f-body: "General Sans", -apple-system, sans-serif;
  --f-mono: "DM Mono", ui-monospace, monospace;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --final-fade: clamp(11rem, 28vh, 18rem);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html.lenis, html.lenis body { height: auto; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--magenta); color: var(--cream); }

/* Grain global */
.grain {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  opacity: 0.14;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Typo ---------- */
.d {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.01em;
}
.d-hero { font-size: clamp(3.2rem, 11vw, 12.5rem); }
.d-xl { font-size: clamp(2.8rem, 7.4vw, 7.6rem); }
.d-lg { font-size: clamp(2.3rem, 5.4vw, 5.2rem); }
.d-md { font-size: clamp(1.8rem, 3.4vw, 3.1rem); line-height: 1.08; }
.d-sm { font-size: clamp(1.45rem, 2.2vw, 2rem); line-height: 1.15; }

.mono {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.label {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: clamp(1.6rem, 3vw, 2.6rem);
}
.lead { font-size: clamp(1.08rem, 1.45vw, 1.28rem); line-height: 1.6; }
.soft { color: var(--ink-soft); }

.row { display: block; overflow: hidden; padding-bottom: 0.05em; margin-bottom: -0.05em; }
.row > span { display: inline-block; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.section { position: relative; padding: clamp(6rem, 13vw, 12rem) 0; }

/* ---------- Boutons ---------- */
.btn {
  --bg: var(--plum);
  --fg: var(--cream);
  --fill: var(--magenta);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.15rem 1.9rem;
  border-radius: 2px;
  background: var(--bg);
  color: var(--fg);
  font-weight: 500;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.5s var(--ease);
  will-change: transform;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fill);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.7s var(--ease);
}
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn--light { --bg: var(--cream); --fg: var(--plum); --fill: var(--peach); }
.btn--line {
  --bg: transparent;
  --fg: currentColor;
  --fill: var(--plum);
  border: 1px solid currentColor;
}
.btn--line:hover { color: var(--cream); }

.btn-note { margin-top: 0.9rem; opacity: 0.7; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 500;
  padding-bottom: 0.3rem;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  transition: background-size 0.6s var(--ease);
}
.link:hover { background-size: 0% 1px; background-position: right bottom; }
/* Icônes Lucide (via Iconify), intégrées en SVG */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.link .arr { display: inline-flex; transition: transform 0.5s var(--ease); }
.link:hover .arr { transform: translateX(4px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 800;
  padding: 1.1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  transition: transform 0.6s var(--ease);
}
.nav.is-hidden { transform: translateY(-120%); }
/* Voile flouté sous la barre une fois la page défilée : le texte qui passe
   dessous ne se mêle plus au logo. Fondu vers le bas, aucun bord net. */
.nav::before {
  content: "";
  position: absolute;
  inset: 0 0 -1.6rem;
  z-index: -1;
  pointer-events: none;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.nav.is-scrolled::before { opacity: 1; }
.menu-open .nav::before { opacity: 0; }
.nav__logo {
  font-family: var(--f-display);
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 2;
}
.nav__bar { display: flex; align-items: center; gap: clamp(1.2rem, 2.4vw, 2.4rem); }
.nav__links { display: flex; gap: clamp(1rem, 2vw, 2rem); }
.nav__links a {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0;
  background: linear-gradient(currentColor, currentColor) left bottom / 0% 1px no-repeat;
  transition: background-size 0.5s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current="page"] { background-size: 100% 1px; }
.nav__cta { padding: 0.85rem 1.3rem; }
.nav__burger {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  position: relative;
  z-index: 2;
}
.nav__burger span {
  position: absolute;
  left: 50%;
  width: 1.6rem;
  height: 1px;
  margin-left: -0.8rem;
  background: var(--ink);
  transition: transform 0.5s var(--ease), top 0.5s var(--ease), background 0.4s;
}
.menu-open .nav__burger span { background: var(--cream); }
.menu-open .nav__logo { color: var(--cream); }
.nav__burger span:nth-child(1) { top: calc(50% - 4px); }
.nav__burger span:nth-child(2) { top: calc(50% + 3px); }
.nav__burger.is-open span:nth-child(1) { top: 50%; transform: rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { top: 50%; transform: rotate(-45deg); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 790;
  background: var(--plum);
  color: var(--cream);
  padding: 7rem var(--gutter) 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  clip-path: circle(0% at calc(100% - 2.9rem) 2.6rem);
  transition: clip-path 0.9s var(--ease-in-out);
  overflow: hidden;
}
.menu.is-open { clip-path: circle(150% at calc(100% - 2.9rem) 2.6rem); }
.menu__glow {
  position: absolute;
  width: 120vw;
  height: 120vw;
  right: -50vw;
  bottom: -50vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(183, 155, 242, 0.55), rgba(126, 79, 232, 0.35) 40%, transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}
.menu__links { position: relative; display: grid; gap: 0.2rem; }
.menu__links a {
  font-family: var(--f-display);
  font-size: clamp(2.6rem, 11vw, 4.5rem);
  line-height: 1.08;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.menu__links a .mono { opacity: 0.5; }
.menu__foot { position: relative; display: grid; gap: 1.2rem; }

/* ---------- Footer ---------- */
.footer {
  --reach: clamp(10rem, 22vw, 18rem);
  position: relative;
  /* Bas de page clair : le rose naît du fond de la page, sans bord.
     Paliers adoucis pour que le fondu n'ait aucune ligne visible. */
  background: linear-gradient(to bottom,
    rgba(231, 222, 243, 0.00) 0,
    rgba(231, 222, 243, 0.10) calc(var(--reach) * 0.25),
    rgba(231, 222, 243, 0.32) calc(var(--reach) * 0.50),
    rgba(231, 222, 243, 0.66) calc(var(--reach) * 0.75),
    var(--blush) var(--reach));
  color: var(--plum);
  padding: calc(var(--reach) * 0.6) 0 0;
  overflow: hidden;
  isolation: isolate;
}
/* Le fluide de l'aura continue sous tout le footer, en apparaissant depuis le haut */
.footer .aura {
  --fade: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, 0.1) calc(var(--reach) * 0.3),
    rgba(0, 0, 0, 0.4) calc(var(--reach) * 0.6), rgba(0, 0, 0, 0.8) calc(var(--reach) * 0.85), #000 var(--reach));
  background:
    radial-gradient(55% 45% at 25% 40%, rgba(183, 155, 242, 0.55), transparent 70%),
    radial-gradient(50% 45% at 80% 65%, rgba(239, 163, 196, 0.5), transparent 70%),
    var(--blush);
  -webkit-mask-image: var(--fade);
  mask-image: var(--fade);
}
/* Après le CTA final, le footer remonte sur l'aura qui se dissout lentement dans le rose */
body:has(.final) .footer {
  --reach: var(--final-fade);
  margin-top: calc(var(--reach) * -1);
  padding-top: calc(var(--reach) + clamp(2rem, 4vw, 3rem));
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}
.footer__pitch .d { margin-bottom: 1.6rem; }
.num { font-family: var(--f-body); font-weight: 400; letter-spacing: -0.05em; }
.footer h4 { opacity: 0.72; margin-bottom: 1.1rem; font-weight: 400; }
.footer ul { display: grid; gap: 0.55rem; }
.footer ul a { opacity: 0.88; transition: opacity 0.3s; }
.footer ul a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem 0;
  opacity: 0.78;
}
.footer__legal a:hover { text-decoration: underline; }
.footer__word {
  font-family: var(--f-display);
  font-size: clamp(4.5rem, 19.5vw, 22rem);
  line-height: 0.78;
  letter-spacing: -0.03em;
  white-space: nowrap;
  text-align: center;
  margin-bottom: -0.12em;
  background: linear-gradient(100deg, var(--plum), #6B3FD9 30%, #C9659A 60%, #8C5CF5 85%, var(--plum));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
}
@property --shift { syntax: "<number>"; inherits: true; initial-value: 0; }
.footer__word.is-split { background: none; animation: shimmer 14s linear infinite; }
.footer__word.is-split span {
  display: inline-block;
  line-height: 1;
  vertical-align: top;
  transform-origin: 50% 100%;
  background: linear-gradient(100deg, var(--plum), #6B3FD9 18%, #C9659A 34%, #8C5CF5 50%, #C9659A 66%, #6B3FD9 82%, var(--plum));
  background-size: calc(var(--w) * 2) 100%;
  background-position: calc(var(--shift) * var(--w) * -2 - var(--x)) 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes shimmer { to { --shift: 1; } }
.footer__word .has-dot { position: relative; }
.footer__dot {
  position: absolute;
  left: 61%;
  top: 0.08em;
  width: 0.2em;
  height: 0.2em;
  margin-left: -0.1em;
  max-width: none;
  overflow: visible;
  fill: var(--lav);
}

/* ---------- CTA mobile fixe ---------- */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 780;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.7rem 0.7rem var(--gutter);
  background: var(--plum);
  color: var(--cream);
  border-top: 1px solid var(--line-light);
  transform: translateY(160%);
  transition: transform 0.6s var(--ease);
}
.sticky-cta.is-visible { transform: none; }
.sticky-cta strong { font-weight: 500; font-size: 0.95rem; display: block; line-height: 1.2; }
.sticky-cta small { font-family: var(--f-mono); font-size: 0.66rem; opacity: 0.65; letter-spacing: 0.06em; text-transform: uppercase; }
.sticky-cta .btn { padding: 0.95rem 1.3rem; }

/* ---------- Curseur aura ---------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 950;
  width: 1.1rem;
  height: 1.1rem;
  margin: -0.55rem 0 0 -0.55rem;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, var(--orange), var(--magenta) 60%, transparent 72%);
  mix-blend-mode: multiply;
  transition: width 0.45s var(--ease), height 0.45s var(--ease), margin 0.45s var(--ease), opacity 0.3s;
  opacity: 0;
}
.cursor.is-active { opacity: 0.9; }
.cursor.is-hover { width: 4.4rem; height: 4.4rem; margin: -2.2rem 0 0 -2.2rem; opacity: 0.45; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(36px); }
.no-js [data-reveal], .reduced [data-reveal] { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .footer__grid { grid-template-columns: repeat(3, 1fr); }
  .footer__pitch { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav__cta { display: none; }
  .sticky-cta { display: flex; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Fonds de section (morphing au scroll) ---------- */
[data-bg="cream"] { background: var(--cream); }
[data-bg="blush"] { background: var(--blush); }
[data-bg="peach"] { background: #F9D9C6; }
[data-bg="plum"] { background: var(--plum); color: var(--cream); }
.morph [data-bg] { background: transparent; color: var(--ink); }
.morph [data-bg="plum"] { color: var(--cream); }

/* ---------- Aura (WebGL + repli CSS) ---------- */
.aura {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 55% at 78% 30%, rgba(255, 126, 74, 0.55), transparent 70%),
    radial-gradient(55% 60% at 60% 70%, rgba(183, 155, 242, 0.75), transparent 70%),
    radial-gradient(50% 50% at 95% 85%, rgba(126, 79, 232, 0.7), transparent 70%),
    var(--cream);
}
.aura canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s ease; }
.aura canvas.is-ready { opacity: 1; }
/* Fondu des bords : l'aura se mélange à la section voisine, sans coupure */
.aura[data-aura="hero"] {
  -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent);
  mask-image: linear-gradient(to bottom, #000 65%, transparent);
}

/* ---------- CTA FINAL ---------- */
.final {
  position: relative;
  min-height: 80svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  padding-bottom: var(--final-fade);
}
.final__inner { width: 100%; }
.final__title { margin: 0 auto 2.4rem; max-width: 12ch; }
.final p { max-width: 32rem; margin: 0 auto 2.4rem; }
.final .btn-note { margin-top: 1rem; }
@media (max-width: 760px) {
  :root { --final-fade: 7rem; }
  .final { min-height: 70svh; }
  .final__title { font-size: 13.5vw; }
}
