/* ============================================
   VELOX WEB — Editorial dark agency
   Instrument Serif + Inter Tight + JetBrains Mono
   ============================================ */

:root {
  /* Palette sombre — Velox Web (test fond noir) */
  --bg: #000000;          /* fond noir */
  --bg-elev: #0A0A0A;     /* fond surélevé */
  --bg-soft: #141414;     /* fond plus contrasté */
  --fg: #F8F7F4;          /* texte principal (crème sur noir) */
  --fg-muted: #9CA3AF;    /* texte secondaire */
  --fg-dim: #4A4A4A;      /* texte très discret */
  --rule: #1F1F1F;        /* bordures */
  --rule-soft: #141414;   /* bordures discrètes */
  --accent: #7C3AED;      /* violet Velox */
  --accent-ink: #FFFFFF;  /* texte sur accent */
  --accent-dark: #5B21B6; /* violet pour hovers */
  --paper: #F8F7F4;       /* sections inverses (CTA claire) */
  --paper-ink: #1A1A1A;   /* texte sur sections inverses */

  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-sans: "Inter Tight", -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1400px;
}

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

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  cursor: none;
  overflow-x: hidden;
}

@media (max-width: 800px), (pointer: coarse) {
  body { cursor: auto; }
  .vw-cursor { display: none !important; }
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: none; }
@media (pointer: coarse) { button { cursor: pointer; } }

button:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* —— Focus states (clavier) —————————————————————————— */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}
.vw-budget-pill:focus-visible,
.vw-faq__btn:focus-visible,
.vw-nav__link:focus-visible,
.vw-nav__cta:focus-visible,
.vw-btn:focus-visible {
  outline-offset: 4px;
}
.vw-field input:focus-visible,
.vw-field textarea:focus-visible {
  outline: 0;
}

/* —— Skip to content (accessibilité) —————————————————————————— */
.vw-skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 1000;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: top 0.2s;
}
.vw-skip-link:focus-visible { top: 12px; outline-offset: 2px; }

/* —— Reduce motion (accessibilité) —————————————————————————— */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
  .vw-page { animation: none; }
  .vw-hero__art-dot { animation: none; }
  .vw-cursor { display: none !important; }
}

img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* —— Custom cursor —————————————————————————— */
.vw-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--fg);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: width 0.25s cubic-bezier(.2,.8,.2,1),
              height 0.25s cubic-bezier(.2,.8,.2,1),
              background 0.2s;
}
.vw-cursor.is-link { width: 44px; height: 44px; background: var(--accent); mix-blend-mode: normal; opacity: 0.85; }
.vw-cursor.is-text { width: 2px; height: 22px; border-radius: 1px; }

/* —— Nav —————————————————————————— */
.vw-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  background: linear-gradient(to bottom, color-mix(in oklch, var(--bg) 90%, transparent), transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.vw-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.vw-nav__brand-mark {
  width: 22px; height: 22px;
  border: 1px solid var(--fg);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-style: italic;
  line-height: 1;
  padding-bottom: 2px;
}
.vw-nav__brand-mark::after { content: "v"; }

.vw-nav__links {
  display: flex;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.vw-nav__link {
  position: relative;
  padding: 8px 14px;
  color: var(--fg-muted);
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.vw-nav__link::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s, transform 0.2s;
}
.vw-nav__link:hover { color: var(--fg); }
.vw-nav__link.is-active { color: var(--fg); }
.vw-nav__link.is-active::before { opacity: 1; transform: scale(1); }

.vw-nav__cta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  transition: border-color 0.2s, color 0.2s;
}
.vw-nav__cta:hover { border-color: var(--accent); color: var(--accent); }

/* —— Nav burger —————————————————————————— */
.vw-nav__cta--mobile { display: none; }

.vw-nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 36px;
  height: 36px;
  padding: 6px;
  z-index: 110;
  position: relative;
}
.vw-nav__burger span {
  display: block;
  height: 1px;
  background: var(--fg);
  transition: transform 0.35s cubic-bezier(.7,0,.3,1), opacity 0.2s;
  transform-origin: center;
}
.vw-nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.vw-nav__burger.is-open span:nth-child(2) { opacity: 0; }
.vw-nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .vw-nav__burger { display: flex; }
  .vw-nav__cta--desktop { display: none; }
  /* Important : enlever backdrop-filter sinon l'overlay fixed est confiné à la nav */
  .vw-nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg);
    border-bottom: 1px solid var(--rule-soft);
  }
  .vw-nav__links {
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: safe center;
    gap: 0;
    z-index: 105;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(.2,.8,.2,1);
    display: flex;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 90px 0 40px;
  }
  .vw-nav__links.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  .vw-nav__link {
    padding: 22px 40px;
    font-size: 13px;
    min-height: 44px;
    border-bottom: 1px solid var(--rule-soft);
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .vw-nav__link::before { display: none; }
  .vw-nav__cta--mobile {
    display: inline-block;
    margin-top: 28px;
    padding: 16px 36px;
    min-height: 44px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}

/* —— Page transitions —————————————————————————— */
.vw-page {
  min-height: 100vh;
  padding-top: 88px;
  animation: pageIn 0.7s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes pageIn {
  0%   { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

.vw-page-curtain {
  position: fixed;
  inset: 0;
  background: var(--accent);
  z-index: 200;
  pointer-events: none;
  transform: translateY(100%);
}
.vw-page-curtain.is-in {
  animation: curtainIn 0.5s cubic-bezier(.7,0,.3,1) forwards;
}
.vw-page-curtain.is-out {
  animation: curtainOut 0.5s cubic-bezier(.7,0,.3,1) forwards;
}
@keyframes curtainIn  { to { transform: translateY(0); } }
@keyframes curtainOut { from { transform: translateY(0); } to { transform: translateY(-100%); } }

/* —— Reveal —————————————————————————— */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(.2,.8,.2,1), transform 0.9s cubic-bezier(.2,.8,.2,1);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(.2,.8,.2,1), transform 0.7s cubic-bezier(.2,.8,.2,1);
}
.reveal-stagger.is-in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-in > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.is-in > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.is-in > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.is-in > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.is-in > *:nth-child(6) { transition-delay: 0.4s; }

/* —— Layout primitives —————————————————————————— */
.vw-section {
  padding: clamp(60px, 9vw, 140px) var(--gutter);
  border-top: 1px solid var(--rule-soft);
  position: relative;
}

.vw-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.vw-eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  display: inline-block;
}

.vw-display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.92;
}
.vw-display em { font-style: italic; color: var(--fg-muted); }
.vw-display .accent { color: var(--accent); font-style: italic; }

.vw-rule {
  height: 1px;
  background: var(--rule);
  width: 100%;
}

/* —— Magnetic button —————————————————————————— */
.vw-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  overflow: hidden;
  transition: color 0.4s;
  white-space: nowrap;
}
.vw-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fg);
  transform: translateY(101%);
  transition: transform 0.45s cubic-bezier(.7,0,.3,1);
  z-index: 0;
}
.vw-btn:hover::before { transform: translateY(0); }
.vw-btn:hover { color: var(--bg); }
.vw-btn > * { position: relative; z-index: 1; }
.vw-btn__dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.vw-btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.vw-btn--accent::before { background: var(--paper-ink); }
.vw-btn--accent:hover { color: var(--accent); }
.vw-btn--ghost { border-color: var(--rule); color: var(--fg-muted); }
.vw-btn--ghost::before { background: var(--fg); }
.vw-btn--ghost:hover { color: var(--bg); border-color: var(--fg); }
