/* ============================================================
   KVLD PRODUCTION — feuille de style
   Base anthracite, display Clash, texte Satoshi, quasi monochrome.
   Shape lock : pills (interactif), 2px (média/inputs).
   ============================================================ */

:root {
  /* Couleurs */
  --bg:        #1A1A1D;
  --bg-elev:   #212126;
  --text:      #F2F0EB;
  --muted:     rgba(242, 240, 235, 0.56);
  --faint:     rgba(242, 240, 235, 0.30);
  --hairline:  rgba(242, 240, 235, 0.12);
  --hairline-strong: rgba(242, 240, 235, 0.22);

  /* Typo */
  --font-display: "Clash Display", "Arial Narrow", sans-serif;
  --font-body:    "Satoshi", system-ui, -apple-system, sans-serif;

  /* Layout */
  --maxw: 1320px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --nav-h: 72px;

  /* Forme */
  --radius-media: 12px;
  --radius-pill: 999px;

  /* Easing */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; line-height: 1; }

section { scroll-margin-top: var(--nav-h); }

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

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  min-height: var(--nav-h);
  padding-top: env(safe-area-inset-top, 0px);
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled,
.nav.is-menu-open {
  background: rgba(26, 26, 29, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--hairline);
}
.nav__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
}
.nav__links {
  display: flex;
  gap: clamp(1.25rem, 2.4vw, 2.5rem);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.nav__links a {
  color: var(--muted);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.3s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after,
.nav__links a.is-current::after { transform: scaleX(1); }
.nav__links a.is-current { color: var(--text); }

.nav__right { display: flex; align-items: center; gap: 1.25rem; }

.lang { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; letter-spacing: 0.06em; }
.lang__btn {
  background: none; border: none; padding: 0;
  color: var(--faint);
  transition: color 0.3s var(--ease);
}
.lang__btn:hover { color: var(--muted); }
.lang__btn.is-active { color: var(--text); }
.lang__sep { color: var(--hairline-strong); }

/* Burger (mobile) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px; height: 28px;
  background: none; border: none;
}
.burger span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--text);
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.burger.is-open span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
.burger.is-open span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px)) var(--gutter) 0;
}
.hero__media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero__poster {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(0.85) contrast(1.05);
  animation: heroZoom 28s ease-in-out infinite alternate;
}
.hero__yt, #heroPlayer {
  position: absolute;
  top: 50%; left: 50%;
  /* léger scale pour masquer la barre noire et le branding YouTube, sans trop dézoomer */
  transform: translate(-50%, -50%) scale(1.12);
  width: 100vw;
  height: 56.25vw;        /* 16:9 basé sur la largeur */
  min-height: 100%;
  min-width: 177.78vh;    /* 16:9 basé sur la hauteur */
  border: 0;
  pointer-events: none;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92);
}
@media (prefers-reduced-motion: reduce) {
  .hero__video { display: none; } /* on garde le poster fixe */
}
@keyframes heroZoom {
  from { transform: scale(1.04); }
  to   { transform: scale(1.16); }
}
.hero__veil {
  position: absolute; inset: 0;
  /* voile allégé : on voit nettement plus le showreel, tout en gardant le texte lisible */
  background:
    radial-gradient(120% 85% at 50% 45%, rgba(26,26,29,0) 30%, rgba(26,26,29,0.42) 100%),
    linear-gradient(180deg, rgba(26,26,29,0.42) 0%, rgba(26,26,29,0.08) 30%, rgba(26,26,29,0.08) 55%, rgba(26,26,29,0.82) 100%);
}

.hero__content { position: relative; z-index: 1; text-shadow: 0 2px 40px rgba(0,0,0,0.45); }
.hero__title {
  font-size: clamp(5.5rem, 26vw, 22rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.85;
  margin: 0;
  animation: heroFade 1.1s var(--ease) both;
}
.hero__subtitle {
  margin: 1.5rem 0 0;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text);
  animation: heroFade 1.1s var(--ease) 0.15s both;
}
.hero__line {
  margin: 0.6rem auto 0;
  max-width: 38ch;
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  color: var(--muted);
  animation: heroFade 1.1s var(--ease) 0.3s both;
}
@keyframes heroFade {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Indicateur de scroll discret (demandé) */
.hero__scroll {
  position: absolute;
  bottom: 2.2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
  transition: color 0.3s var(--ease);
  animation: heroCueFade 1.1s var(--ease) 0.5s both;
}
/* Keyframe dediee : conserve le translateX(-50%) qui centre le bouton,
   sinon heroFade (translateY seul) ecrase le centrage horizontal sur mobile. */
@keyframes heroCueFade {
  from { opacity: 0; transform: translate(-50%, 22px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.hero__scroll:hover { color: var(--text); }
.hero__scroll-line {
  width: 1px; height: 46px;
  background: linear-gradient(var(--hairline-strong), transparent);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: -50%; left: 0;
  width: 100%; height: 50%;
  background: var(--text);
  animation: scrollPulse 2.4s var(--ease) infinite;
}
@keyframes scrollPulse {
  0%   { transform: translateY(-100%); opacity: 0; }
  40%  { opacity: 1; }
  100% { transform: translateY(200%); opacity: 0; }
}

/* ============================================================
   PLACEHOLDERS (sections à venir)
   ============================================================ */
.ph {
  min-height: 70vh;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--hairline);
}
.ph--last { border-bottom: 1px solid var(--hairline); }
.ph__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) var(--gutter);
}
.ph__tag {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--faint);
}
.ph h2 {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  letter-spacing: -0.02em;
  margin: 0.8rem 0 1.2rem;
}
.ph p { color: var(--muted); max-width: 50ch; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--hairline); }
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer__logo { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.04em; }
.footer__copy { margin: 0; color: var(--muted); font-size: 0.85rem; }

/* ============================================================
   REVEALS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .burger { display: flex; }
  .nav__links {
    position: fixed;
    inset: calc(var(--nav-h) + env(safe-area-inset-top, 0px)) 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: rgba(20, 20, 23, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--hairline);
    padding: 0.5rem var(--gutter) 1.5rem;
    transition: transform 0.45s var(--ease);
    font-size: 1.05rem;
  }
  /* Etat cache porte sur :not(.is-open) : ainsi quand le menu est ouvert,
     la regle qui le masque ne matche plus du tout (evite tout conflit de cascade
     ou .is-open ne l'emportait pas et laissait le menu hors ecran sur mobile). */
  /* Cache complet : le menu est positionne a (nav-h + encoche) du haut, donc
     il faut le remonter de 100% de sa hauteur PLUS ce decalage, sinon son bas
     depasse et recouvre le logo KVLD. */
  .nav__links:not(.is-open) {
    transform: translateY(calc(-100% - var(--nav-h) - env(safe-area-inset-top, 0px) - 8px));
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a {
    padding: 1rem 0;
    border-bottom: 1px solid var(--hairline);
    color: var(--text);
  }
  .nav__links a::after { display: none; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero__video { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
