/* Grafen — landing */

.wrap {
  width: 100%;
  padding: 0 var(--gutter);
}

.muted { opacity: 0.4; }
.accent { color: var(--accent); }

/* --- nav --- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  position: sticky;
  top: 0;
  z-index: 20;
  transition: color 0.3s;
}
.nav::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(-1 * var(--gutter));
  right: calc(-1 * var(--gutter));
  z-index: -1;
  background: rgba(var(--paper-rgb), 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.3s;
}
/* tant que la nav survole le hero vidéo : texte papier, fond transparent */
.nav.is-over-hero { color: var(--paper); }
.nav.is-over-hero::before { opacity: 0; }
.nav.is-over-hero .btn--ink { background: var(--paper); color: var(--ink); }
.nav.is-over-hero .btn--ink:hover { background: var(--accent); color: var(--on-accent); }
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__link {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  opacity: 0.6;
}
.nav__link:hover { opacity: 1; }

/* --- hero : bloc sombre pleine largeur, vidéo en fond --- */
:root {
  /* filtre vidéo du hero : vidéo brute, ni voile ni désaturation (choix validé) */
  --hero-veil: 0;
  --hero-gray: 0;
}
.hero--night {
  /* noir chaud dérivé de la vidéo du tunnel */
  --bg: #0f0d0b;
  --bg-rgb: 15, 13, 11;
}
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
  align-items: center;
  min-height: 100vh;
  margin: calc(-1 * var(--nav-h, 94px)) calc(-1 * var(--gutter)) 0; /* remonte sous la nav, déborde du gutter */
  padding: calc(120px + var(--nav-h, 94px)) var(--gutter) 140px;
  background: var(--bg);
  color: var(--fg);
}
.hero > * {
  position: relative;
  z-index: 1;
}
.hero__media {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg) url('/assets/media/tunnel-poster.jpg') center / cover no-repeat;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(var(--hero-gray)) brightness(calc(1 - var(--hero-veil) * 0.55)) contrast(1.05);
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero__video.is-ready { opacity: 1; }
.hero__media::before,
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
}
.hero__media::before {
  /* dégradé local derrière le bloc de texte centré : lisibilité du titre sans assombrir tout le tunnel */
  background: radial-gradient(
    ellipse 58% 62% at 50% 52%,
    rgba(var(--bg-rgb), 0.62) 0%,
    rgba(var(--bg-rgb), 0.35) 45%,
    rgba(var(--bg-rgb), 0) 100%
  );
}
.hero__media::after {
  background: linear-gradient(
    to bottom,
    rgba(var(--bg-rgb), calc(var(--hero-veil) * 1.2)) 0%,
    rgba(var(--bg-rgb), calc(var(--hero-veil) * 0.33)) 40%,
    rgba(var(--bg-rgb), calc(var(--hero-veil) * 1.33)) 100%
  );
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.45;
  margin-bottom: 36px;
}
.hero > div:not(.hero__media) { max-width: 1240px; width: 100%; }
.hero__title {
  font-size: clamp(46px, 8.6vw, 124px);
  line-height: 0.98;
  font-weight: 400;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero__title em {
  font-style: italic;
  font-weight: 300;
}
.hero__lead {
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.5;
  max-width: 44ch;
  margin: 40px auto 0;
  opacity: 0.72;
}
.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 44px;
}

/* --- sections --- */
.section { padding: 130px 0 40px; }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 64px;
}
.section__title {
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 300;
  letter-spacing: -0.025em;
  max-width: 22ch;
  line-height: 1.15;
}
.section__note {
  font-size: 19px;
  opacity: 0.55;
  margin-top: 56px;
  max-width: 46ch;
}
.kicker--tight { letter-spacing: 0.06em; opacity: 0.35; }
.kicker--light { opacity: 0.45; }
.label--light { opacity: 0.5; }

/* 01 — problème */
.section--problem .kicker { margin-bottom: 48px; }
.verbs {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 34px;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 300;
  max-width: 1020px;
}
.verbs span { animation: drift 6s ease-in-out infinite; }
.verbs span:nth-child(2) { animation-delay: 0.5s; }
.verbs span:nth-child(3) { animation-delay: 1.1s; }
.verbs span:nth-child(4) { animation-delay: 1.7s; }
.verbs span:nth-child(5) { animation-delay: 2.3s; }
.verbs span:nth-child(6) { animation-delay: 2.9s; }
.verbs span:nth-child(7) { animation-delay: 3.4s; }
.verbs span:nth-child(8) { animation-delay: 3.9s; }
.verbs span:nth-child(9) { animation-delay: 4.4s; }
.verbs span:nth-child(10) { animation-delay: 5s; }
@keyframes drift {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.9; }
}

/* 02 — idée */
.section--idea { padding: 140px 0 150px; }
.idea__title {
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 400;
  max-width: 16ch;
}
.split {
  display: flex;
  margin-top: 64px;
  border-top: 1px solid rgba(var(--ink-rgb), 0.12);
}
.split__cell {
  flex: 1;
  padding: 28px 0 0 32px;
}
.split__cell:first-child {
  padding: 28px 32px 0 0;
  border-right: 1px solid rgba(var(--ink-rgb), 0.12);
}
.split__cell .label { margin-bottom: 14px; font-size: 12px; }
.split__text {
  font-size: 22px;
  font-weight: 300;
  line-height: 1.4;
}

/* 03 — pyramide interactive */
.section--pyramid {
  padding: 120px 0 40px;
  border-top: 1px solid rgba(var(--ink-rgb), 0.1);
}
.pyramid-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 80px;
  align-items: center;
}
.pyramid--levels .pyramid__row {
  height: 62px;
  cursor: pointer;
  border-color: rgba(var(--ink-rgb), 0.35);
}
.pyramid--levels .pyramid__label { font-size: 12.5px; }
.pyramid--levels .pyramid__row:nth-child(1) { width: 38%; border-color: rgba(var(--ink-rgb), 0.35); }
.pyramid--levels .pyramid__row:nth-child(2) { width: 50%; border-color: rgba(var(--ink-rgb), 0.3); }
.pyramid--levels .pyramid__row:nth-child(3) { width: 62%; border-color: rgba(var(--ink-rgb), 0.25); }
.pyramid--levels .pyramid__row:nth-child(4) { width: 74%; border-color: rgba(var(--ink-rgb), 0.2); }
.pyramid--levels .pyramid__row:nth-child(5) { width: 86%; border-color: rgba(var(--ink-rgb), 0.16); }
.pyramid--levels .pyramid__row:nth-child(6) { width: 98%; border-color: rgba(var(--ink-rgb), 0.13); }
.pyramid--levels .pyramid__row.is-active .pyramid__fill { opacity: 0.9; }
.pyramid--levels .pyramid__row.is-active .pyramid__label { color: var(--on-accent); }
.pyramid--levels .pyramid__row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.level-detail__head {
  display: flex;
  align-items: baseline;
  gap: 18px;
}
.level-detail__num {
  font-size: 74px;
  line-height: 1;
  font-weight: 300;
  letter-spacing: -0.04em;
  color: var(--accent);
}
.level-detail__name {
  font-size: 30px;
  letter-spacing: -0.01em;
}
.level-detail__line {
  font-size: 24px;
  font-weight: 300;
  line-height: 1.45;
  margin-top: 28px;
  max-width: 26ch;
}
.level-detail__meta {
  margin-top: 44px;
  border-top: 1px solid rgba(var(--ink-rgb), 0.14);
  padding-top: 22px;
  display: flex;
  gap: 48px;
}
.level-detail__meta .label { margin-bottom: 8px; }
.level-detail__value {
  font-family: var(--font-mono);
  font-size: 19px;
}

/* 04 — vitesse / friction */
.section--speed { padding: 150px 0 40px; }
.legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 60px;
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0.45;
}
.legend__dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  display: block;
}
.tracks {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.track-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: 16px 0;
  border-top: 1px solid rgba(var(--ink-rgb), 0.1);
}
.track-row--top { border-bottom: 1px solid rgba(var(--ink-rgb), 0.1); }
.track-row__name {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  opacity: 0.5;
}
.track-row--top .track-row__name { opacity: 1; }
.track {
  position: relative;
  height: 14px;
}
.track::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(var(--ink-rgb), 0.16);
}
.track-row--top .track::before { background: rgba(var(--ink-rgb), 0.3); }
.track__mark {
  position: absolute;
  top: 1px;
  width: 1px;
  height: 11px;
  background: var(--accent);
}
.track__runner {
  position: absolute;
  top: 2.5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
  margin-left: -4px;
  animation: linear infinite;
}
.track-row:nth-child(1) .track__runner { animation-name: flow1; animation-duration: 9s; }
.track-row:nth-child(2) .track__runner { animation-name: flow2; animation-duration: 7s; }
.track-row:nth-child(3) .track__runner { animation-name: flow3; animation-duration: 5.5s; }
.track-row:nth-child(4) .track__runner { animation-name: flow4; animation-duration: 4.2s; }
.track-row:nth-child(5) .track__runner { animation-name: flow5; animation-duration: 3.2s; }
.track-row:nth-child(6) .track__runner { animation-name: flow6; animation-duration: 2.4s; }
@keyframes flow1 { 0%{left:0} 8%{left:12%} 18%{left:12%} 26%{left:28%} 36%{left:28%} 43%{left:46%} 53%{left:46%} 61%{left:66%} 71%{left:66%} 79%{left:84%} 89%{left:84%} 100%{left:100%} }
@keyframes flow2 { 0%{left:0} 12%{left:20%} 24%{left:20%} 40%{left:45%} 52%{left:45%} 68%{left:70%} 80%{left:70%} 100%{left:100%} }
@keyframes flow3 { 0%{left:0} 18%{left:30%} 30%{left:30%} 55%{left:65%} 67%{left:65%} 100%{left:100%} }
@keyframes flow4 { 0%{left:0} 22%{left:40%} 30%{left:40%} 58%{left:75%} 66%{left:75%} 100%{left:100%} }
@keyframes flow5 { 0%{left:0} 35%{left:60%} 45%{left:60%} 100%{left:100%} }
@keyframes flow6 { 0%{left:0} 55%{left:78%} 62%{left:78%} 100%{left:100%} }
.section--speed .section__note { margin-top: 40px; }

/* 05 — diagnostic (pleine largeur, fond sombre) */
.diag {
  margin: 150px calc(-1 * var(--gutter)) 0;
  padding: 120px var(--gutter);
  background: var(--ink);
  color: var(--paper);
}
.diag__inner {
  width: 100%;
}
.diag .kicker { margin-bottom: 40px; }
.diag__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 90px;
  align-items: center;
}
.diag__title {
  font-size: clamp(34px, 4.7vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 400;
  max-width: 14ch;
}
.diag__lead {
  font-size: 19px;
  line-height: 1.6;
  opacity: 0.6;
  margin-top: 30px;
  max-width: 38ch;
}
.diag__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 46px;
}
.diag__actions .kicker { margin: 0; letter-spacing: 0.06em; }

.diag-card {
  border: 1px solid rgba(var(--paper-rgb), 0.16);
  padding: 38px 40px 34px;
}
.diag-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 30px;
}
.diag-card__goal { text-align: right; }
.diag-card__score {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 8px;
}
.diag-card__goal .diag-card__score { justify-content: flex-end; }
.diag-card__num {
  font-size: 44px;
  font-weight: 300;
  letter-spacing: -0.03em;
}
.diag-card__lvl {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  opacity: 0.65;
}
.diag-card__lvl.accent { opacity: 0.8; }
.diag-card .label { font-size: 11.5px; letter-spacing: 0.16em; }
.diag-card__hint {
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  opacity: 0.45;
  text-align: center;
}

.goal-pyramid {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  margin-top: 34px;
}
.goal-pyramid__row {
  position: relative;
  height: 34px;
  border: 1px solid rgba(var(--paper-rgb), 0.22);
  display: flex;
  align-items: center;
  padding: 0;
}
.goal-pyramid__row:nth-child(1) { width: 38%; }
.goal-pyramid__row:nth-child(2) { width: 50%; border-color: rgba(var(--paper-rgb), 0.2); }
.goal-pyramid__row:nth-child(3) { width: 62%; border-color: rgba(var(--paper-rgb), 0.18); }
.goal-pyramid__row:nth-child(4) { width: 74%; }
.goal-pyramid__row:nth-child(5) { width: 86%; border-color: rgba(var(--paper-rgb), 0.1); }
.goal-pyramid__row:nth-child(6) { width: 98%; border-color: rgba(var(--paper-rgb), 0.08); }
button.goal-pyramid__row { cursor: pointer; }
button.goal-pyramid__row .pyramid__fill { opacity: 0.08; transition: opacity 0.3s; }
button.goal-pyramid__row:hover .pyramid__fill { opacity: 0.3; }
button.goal-pyramid__row.is-active .pyramid__fill,
button.goal-pyramid__row.is-active:hover .pyramid__fill { opacity: 0.85; }
button.goal-pyramid__row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.goal-pyramid__row--you {
  border-color: rgba(var(--paper-rgb), 0.5);
  background: rgba(var(--paper-rgb), 0.14);
  padding-left: 14px;
}
.goal-pyramid__you {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
}

/* 06 — briques */
.section--bricks { padding: 140px 0 40px; }
.section--bricks .kicker { margin-bottom: 44px; }
.section__title--bricks {
  max-width: 24ch;
  margin-bottom: 70px;
}
.bricks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(var(--ink-rgb), 0.14);
}
.brick {
  padding: 32px 36px 40px;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.14);
  border-right: 1px solid rgba(var(--ink-rgb), 0.14);
}
.brick:nth-child(3n + 1) { padding-left: 0; }
.brick:nth-child(3n) { padding-right: 0; border-right: 0; }
.brick__num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}
.brick__title {
  font-size: 26px;
  font-weight: 400;
  margin-bottom: 12px;
}
.brick__text {
  font-size: 16px;
  opacity: 0.55;
  line-height: 1.55;
}

/* 07 — CTA final */
.section--final { padding: 150px 0 130px; }
.final__title {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 400;
  max-width: 18ch;
}
.final__actions { margin-top: 56px; }

/* --- footer --- */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 34px 0 48px;
  border-top: 1px solid rgba(var(--ink-rgb), 0.12);
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0.45;
}
.footer__brand { letter-spacing: 0.16em; }
.footer__link { border-bottom: 1px solid rgba(var(--fg-rgb), 0.25); padding-bottom: 1px; }
.footer__links { display: inline-flex; gap: 22px; }

/* --- gouttière qui grandit avec l'écran --- */
@media (min-width: 1600px) {
  .wrap { --gutter: clamp(48px, 4vw, 96px); }
}

/* --- responsive --- */
@media (max-width: 880px) {
  .eyebrow { font-size: 11px; letter-spacing: 0.14em; margin-bottom: 28px; }
  .hero {
    min-height: 0;
    margin-top: calc(-1 * var(--nav-h, 74px));
    padding: calc(72px + var(--nav-h, 74px)) var(--gutter) 88px;
  }
  .nav { padding: 18px 0; }
  .nav__links { gap: 18px; }
  .nav__link { display: none; }
  .section { padding: 88px 0 24px; }
  .section--idea { padding: 96px 0 100px; }
  .section--pyramid { padding: 88px 0 24px; }
  .section--speed { padding: 100px 0 24px; }
  .section--bricks { padding: 96px 0 24px; }
  .section--final { padding: 100px 0 88px; }
  .section__note { margin-top: 36px; font-size: 17px; }
  .split { flex-direction: column; }
  .split__cell,
  .split__cell:first-child {
    padding: 24px 0 0;
    border-right: 0;
  }
  .split__cell + .split__cell {
    margin-top: 24px;
    border-top: 1px solid rgba(var(--ink-rgb), 0.12);
  }
  .pyramid-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .pyramid--levels .pyramid__row { height: 52px; }
  .level-detail__num { font-size: 56px; }
  .level-detail__name { font-size: 24px; }
  .level-detail__line { font-size: 20px; }
  .track-row {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
  }
  .track-row__name { font-size: 11px; }
  .diag {
    margin-top: 100px;
    padding: 80px var(--gutter);
  }
  .diag__grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .diag-card { padding: 28px 24px 26px; }
  .diag-card__num { font-size: 36px; }
  .bricks { grid-template-columns: 1fr; }
  .brick,
  .brick:nth-child(3n + 1),
  .brick:nth-child(3n) {
    padding: 28px 0 32px;
    border-right: 0;
  }
  .section__title--bricks { margin-bottom: 40px; }
}
