/* ===========================================================
   Helary — Casque 3D
   Sponsor / pilote · scroll-driven helmet rotation
   =========================================================== */

:root{
  --bleu-sarthe: #1e4fd6;
  --bleu-deep:   #0f2a78;
  --bleu-ciel:   #3aa6ff;
  --orange:      #ff6b1f;
  --jaune:       #ffc233;
  --rouge:       #e63946;
  --alu:         #e8edf3;
  --paper:       #f4f1ea;
  --paper-2:     #ece7dd;
  --ink:         #0a1430;
  --ink-2:       #20264a;
  --line:        rgba(10,20,48,0.14);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Archivo', system-ui, sans-serif;
}

*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family: var(--sans);
  color: var(--ink);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img{ display:block; max-width:100%; }
a{ color:inherit; text-decoration:none; }
em{ font-style: italic; font-family: 'Archivo', serif; }

/* ===========================================================
   NAV
   =========================================================== */
.nav{
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 14px 28px;
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,0.78);
  border-bottom: 1px solid var(--line);
}
.nav-inner{
  max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 32px;
}
.brand{ display:flex; align-items:center; gap: 10px; }
.brand-mark{
  display:inline-flex; align-items:center; justify-content:center;
  width: 32px; height: 32px;
  background: var(--ink); color: var(--paper);
  font-weight: 900; font-size: 13px; letter-spacing: -0.02em;
  border-radius: 4px;
}
.brand-name{
  font-weight: 800; letter-spacing: 0.04em; font-size: 14px;
}
.brand-sub{ color: rgba(10,20,48,0.5); font-weight: 500; }

.nav-links{ display:flex; gap: 28px; justify-content: center; }
.nav-links a{
  font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--ink-2);
  position: relative; padding: 4px 0;
}
.nav-links a:hover{ color: var(--bleu-sarthe); }
.nav-links a:hover::after{
  content:''; position:absolute; left:0; right:0; bottom:-2px;
  height: 2px; background: var(--bleu-sarthe);
}

.nav-meta{
  font-family: var(--mono); font-size: 11px;
  text-align: right; color: var(--ink-2);
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
}
.dot{
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rouge);
  box-shadow: 0 0 0 0 rgba(230,57,70,0.5);
  animation: pulse 1.6s infinite;
}
@keyframes pulse{
  0%   { box-shadow: 0 0 0 0 rgba(230,57,70,0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(230,57,70,0); }
  100% { box-shadow: 0 0 0 0 rgba(230,57,70,0); }
}

/* ===========================================================
   HERO
   =========================================================== */
.hero{
  padding: 160px 28px 80px;
  min-height: 100vh;
  display: flex; align-items: center;
  background:
    radial-gradient(1200px 600px at 50% 110%, rgba(30,79,214,0.08), transparent 60%),
    #ffffff;
  border-bottom: 1px solid var(--line);
}
.hero-grid{
  max-width: 1280px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr; gap: 28px;
}
.hero-overline{
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.18em; color: var(--bleu-sarthe);
  text-transform: uppercase;
}
.hero-title{
  font-size: clamp(56px, 9vw, 144px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0;
  text-wrap: balance;
}
.hero-title em{
  color: var(--bleu-sarthe);
  font-weight: 400;
  font-style: italic;
  font-family: 'Archivo', serif;
}
.hero-lede{
  max-width: 540px;
  font-size: 18px; line-height: 1.55;
  color: var(--ink-2);
  margin: 12px 0 0;
}
.hero-cta{ display:flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.btn{
  padding: 14px 22px;
  font-weight: 600; font-size: 14px;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.15s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn-primary{ background: var(--ink); color: var(--paper); }
.btn-ghost{ border: 1px solid var(--line); color: var(--ink); }

.hero-rule{ height: 1px; background: var(--line); margin-top: 48px; }
.hero-stats{
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  padding-top: 24px;
}
.hero-stats > div{ display:flex; flex-direction: column; gap: 4px; }
.stat-num{
  font-size: 32px; font-weight: 800; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-lbl{
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-2);
}

/* ===========================================================
   SCROLL STAGES — common
   =========================================================== */
.scroll-stage{
  position: relative;
  /* total scroll = 1.6 viewport per stage */
}
.stage-sticky{
  position: sticky; top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}
.stage-spacer{ height: 280vh; }
.stage-spacer.tall{ height: 320vh; }

.stage-canvas{
  position: relative;
  width: 100%; height: 100%;
  background: #ffffff;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.stage-canvas.dark{
  background:
    radial-gradient(800px 600px at 50% 50%, #182755 0%, #0a1430 70%);
  color: white;
}

/* Chrome / HUD */
.stage-chrome{
  position: absolute; top: 24px; left: 24px; right: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 5;
}
.dark .stage-chrome{ color: rgba(255,255,255,0.7); }
.ch-coords{ background: rgba(10,20,48,0.06); padding: 8px 12px; border-radius: 4px; }
.dark .ch-coords{ background: rgba(255,255,255,0.08); }
.ch-progress{
  flex: 1; height: 2px; margin: 0 24px;
  background: rgba(10,20,48,0.1);
  border-radius: 2px; overflow: hidden;
  align-self: center;
}
.dark .ch-progress{ background: rgba(255,255,255,0.12); }
.ch-progress i{
  display:block; height: 100%; width: 0%;
  background: var(--bleu-sarthe);
  transition: width 0.05s linear;
}
.dark .ch-progress i{ background: var(--bleu-ciel); }
.ch-label{ background: rgba(10,20,48,0.06); padding: 8px 12px; border-radius: 4px; font-weight: 600; }
.dark .ch-label{ background: rgba(255,255,255,0.08); }

/* Caption (bottom-left of stage) */
.stage-caption{
  position: absolute; left: 32px; bottom: 32px; max-width: 380px;
  z-index: 5;
}
.cap-eyebrow{
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--bleu-sarthe);
  margin-bottom: 8px;
}
.stage-caption.light .cap-eyebrow{ color: var(--bleu-ciel); }
.cap-title{
  font-size: 28px; font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.05; margin: 0 0 10px;
  text-wrap: balance;
}
.cap-body{
  font-size: 14px; line-height: 1.5; color: var(--ink-2); margin: 0;
}
.dark .cap-body{ color: rgba(255,255,255,0.7); }

/* ===========================================================
   STAGE CAR : appel de phares au scroll
   =========================================================== */
.car-scene{
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  display: grid; place-items: center;
}
.car-img{
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 60%;
  filter: brightness(0.78) contrast(1.05) saturate(0.9);
  transform-origin: center 65%;
  transform: scale(1.0);
  transition: filter 0.05s linear, transform 0.05s linear;
  will-change: transform, filter;
}
.car-flash{
  position: absolute;
  width: 12%;
  aspect-ratio: 3 / 1;
  top: 49%;
  background: radial-gradient(ellipse at center,
    rgba(255,255,240,1) 0%,
    rgba(255,250,200,0.85) 25%,
    rgba(255,240,150,0.4) 55%,
    rgba(255,230,100,0) 80%);
  filter: blur(8px);
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  will-change: opacity, transform;
}
.car-flash-l{ left: 23%; }
.car-flash-r{ right: 23%; }
.car-haze{
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 55%,
    rgba(255,240,200,0) 30%,
    rgba(255,240,200,0) 50%,
    rgba(10,20,48,0.5) 100%);
  pointer-events: none;
  opacity: 0.6;
}
#stageCar{ background: #050a1c; }

/* ===========================================================
   STAGE 1 : ROTATE (crossfade)
   =========================================================== */
.stage-helmet{
  position: relative;
  width: min(70vh, 60vw);
  aspect-ratio: 1 / 1;
  z-index: 2;
}
.stage-helmet img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.18s ease;
  filter: drop-shadow(0 30px 60px rgba(10,20,48,0.18));
  will-change: opacity, transform;
}
.stage-helmet img.is-active{ opacity: 1; }

.stage-rings{
  position: absolute; inset: 0;
  display: grid; place-items: center;
  z-index: 1; pointer-events: none;
}
.stage-rings svg{
  width: min(75vh, 65vw); height: min(75vh, 65vw);
  fill: none;
  stroke: rgba(10,20,48,0.08);
  stroke-width: 0.4;
  stroke-dasharray: 1 2;
}

/* ===========================================================
   STAGE 2 : CYLINDER (CSS 3D)
   =========================================================== */
.stage-perspective{
  width: min(70vh, 60vw); height: min(70vh, 60vw);
  perspective: 1400px;
  display: grid; place-items: center;
  z-index: 2;
}
.cyl{
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(0deg) rotateY(0deg);
  will-change: transform;
}
.cyl-face, .cyl-cap{
  position: absolute;
  left: 50%; top: 50%;
  width: 60%; height: auto;
  transform-origin: center center;
  filter: drop-shadow(0 20px 50px rgba(0,0,0,0.5));
  /* Each face has its own --rot via inline style or below */
}
/*
  Face 0 = right side  (yaw 0°)
  Face 1 = front       (yaw 90°)
  Face 2 = left side   (yaw 180°)
  Face 3 = back        (yaw 270°)
  Place each face on a virtual cylinder of radius R
*/
.cyl-face[data-face="0"]{ transform: translate(-50%,-50%) rotateY(  0deg) translateZ(0) translateX(0); }
.cyl-face[data-face="1"]{ transform: translate(-50%,-50%) rotateY( 90deg) translateZ(0); }
.cyl-face[data-face="2"]{ transform: translate(-50%,-50%) rotateY(180deg) translateZ(0); }
.cyl-face[data-face="3"]{ transform: translate(-50%,-50%) rotateY(270deg) translateZ(0); }
.cyl-cap[data-face="top"]{
  transform: translate(-50%,-50%) rotateX(90deg) translateZ(0) translateY(0);
}

/* ===========================================================
   STAGE 3 : PARALLAX
   =========================================================== */
.par-scene{
  position: relative;
  width: 100%; height: 100%;
  display: grid; place-items: center;
}
.par-layer{
  position: absolute;
  height: 50vh; width: auto; max-width: none;
  filter: drop-shadow(0 24px 40px rgba(10,20,48,0.18));
  transition: transform 0.05s linear;
  will-change: transform;
}
.par-layer.par-hero{
  height: 70vh;
  z-index: 5;
}

/* ===========================================================
   MANIFEST INTERSTITIEL
   =========================================================== */
.manifest{
  background: #f7f7f7;
  padding: 140px 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.manifest-grid{
  max-width: 1100px; margin: 0 auto;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 40px;
}
.manifest-num{
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.1em;
  color: var(--bleu-sarthe);
}
.manifest-label{
  display: none;
}
.manifest-quote{
  grid-column: 2;
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 500; font-style: italic;
  line-height: 1.15; letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.manifest-attr{
  grid-column: 2;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  color: var(--ink-2);
  margin-top: 24px;
}

/* ===========================================================
   PALETTE
   =========================================================== */
.palette{
  padding: 120px 28px;
  background: #ffffff;
}
.palette-head{
  max-width: 1280px; margin: 0 auto 48px;
  display: flex; align-items: baseline; gap: 24px;
}
.palette-num{ font-family: var(--mono); font-size: 14px; color: var(--bleu-sarthe); }
.palette-title{ font-size: 40px; font-weight: 800; margin: 0; letter-spacing: -0.02em; }

.palette-grid{
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
}
.swatch{
  --c: white;
  --fg: #0a1430;
  background: var(--c); color: var(--fg);
  aspect-ratio: 3 / 4;
  padding: 16px;
  display: flex; flex-direction: column; justify-content: space-between;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.swatch span{
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 500;
}
.swatch i{ font-style: normal; font-family: var(--mono); font-size: 11px; opacity: 0.7; }

/* ===========================================================
   SPECS
   =========================================================== */
.specs{
  padding: 140px 28px;
  background: var(--ink); color: var(--paper);
}
.specs-head{
  max-width: 1280px; margin: 0 auto 64px;
}
.specs-eyebrow{
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em;
  color: var(--bleu-ciel); text-transform: uppercase;
}
.specs-title{
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 900; letter-spacing: -0.03em;
  line-height: 1; margin: 16px 0 0;
}
.specs-grid{
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid rgba(255,255,255,0.12);
}
.spec{
  padding: 24px 0;
  display: grid; grid-template-columns: 1fr 2fr; gap: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.spec-k{
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.55);
}
.spec-v{ font-size: 18px; font-weight: 500; }
.spec:nth-child(odd){ padding-right: 24px; border-right: 1px solid rgba(255,255,255,0.12); }
.spec:nth-child(even){ padding-left: 24px; }

/* ===========================================================
   PARTENAIRES
   =========================================================== */
.partners{
  padding: 120px 28px;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.partners-head{
  max-width: 1280px;
  margin: 0 auto 48px;
}

.partners-grid{
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Carte partenaire */
.partner{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  height: 140px;
  padding: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: all 0.25s ease;
  text-decoration: none;
}

/* Logo */
.partner img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.85;
  transition: all 0.25s ease;
}

/* Hover */
.partner:hover{
  transform: translateY(-4px);
  border-color: var(--bleu-sarthe);
}

.partner:hover img{
  opacity: 1;
  transform: scale(1.05);
}

/* PREMIUM */
.partner.premium{
  border: 2px solid var(--orange);
  box-shadow: 0 10px 30px rgba(255,107,31,0.15);
}

.partner.premium:hover{
  transform: translateY(-6px);
  box-shadow: 0 15px 40px rgba(255,107,31,0.25);
}

/* RESPONSIVE */
@media (max-width: 900px){
  .partners-grid{
    grid-template-columns: repeat(2, 1fr);
  }

  .partner{
    height: 120px;
  }
}

/* ===========================================================
   FOOTER
   =========================================================== */
.foot{
  background: var(--ink); color: var(--paper);
  padding: 80px 28px 32px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.foot-grid{
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.foot-brand p{ color: rgba(255,255,255,0.6); max-width: 320px; line-height: 1.5; }
.foot-col h5{
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; margin: 0 0 16px;
  color: rgba(255,255,255,0.55);
}
.foot-col ul{ list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.foot-col li{ font-size: 14px; color: rgba(255,255,255,0.85); cursor: pointer; }
.foot-col li:hover{ color: var(--bleu-ciel); }

.foot-base{
  max-width: 1280px; margin: 32px auto 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4);
}
.foot-base .mono{ color: rgba(255,255,255,0.6); }

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 900px){
  .nav-links{ display: none; }
  .hero-stats{ grid-template-columns: repeat(2,1fr); }
  .palette-grid{ grid-template-columns: repeat(3, 1fr); }
  .specs-grid{ grid-template-columns: 1fr; }
  .spec:nth-child(odd){ padding-right: 0; border-right: none; }
  .spec:nth-child(even){ padding-left: 0; }
  .foot-grid{ grid-template-columns: 1fr 1fr; }
  .stage-caption{ left: 16px; right: 16px; bottom: 16px; max-width: none; }
}
