/* Varcodia – couche « vitrine » : mouvement, immersion, typographie forte.
   Les états cachés ne s'appliquent que si fx.js a chargé GSAP (classe html.fx). */

/* ---------- Typographie de vitrine ---------- */
.hero-text .hero-title { font-size: clamp(48px, 9.4vw, 152px); line-height: .92; letter-spacing: -.045em; font-weight: 300; max-width: 11ch; }
.page-head h1 { font-size: clamp(44px, 8vw, 128px); line-height: .95; letter-spacing: -.04em; max-width: 12ch; }
.page-head { padding-bottom: clamp(56px, 8vw, 112px); }
.page-head .lead { font-size: clamp(17px, 1.6vw, 21px); max-width: 560px; margin-top: 28px; }
.cta-band h2 { font-size: clamp(40px, 6.4vw, 96px); line-height: .98; letter-spacing: -.035em; max-width: 14ch; }

/* Mots découpés pour les apparitions */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.wi { display: inline-block; will-change: transform; }
html.fx [data-split] .wi { transform: translateY(105%); }
html.fx [data-fade] { opacity: 0; transform: translateY(16px); }

/* ---------- Barre de progression ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 130; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--sky); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Manifeste : les mots s'allument au défilement ---------- */
.manifesto { padding: clamp(120px, 18vw, 240px) 0; }
.manifesto-text { margin-top: 28px; font-family: var(--display); font-weight: 300; font-size: clamp(32px, 5.2vw, 76px); line-height: 1.06; letter-spacing: -.03em; max-width: 18ch; }
.manifesto-text .mw { display: inline; transition: none; }
html.fx .manifesto-text .mw { opacity: .14; }
.manifesto-sub { margin-top: 40px; max-width: 420px; margin-left: auto; font-size: 17px; }

/* ---------- Vidéo qui s'ouvre en plein écran ---------- */
.reel { position: relative; height: 220vh; }
.reel-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.reel-frame { position: absolute; inset: 0; clip-path: inset(16% 18% 16% 18% round 28px); }
.reel-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-caption { position: relative; z-index: 2; text-align: center; pointer-events: none; mix-blend-mode: difference; }
.reel-caption h2 { margin-top: 14px; font-size: clamp(36px, 6vw, 92px); letter-spacing: -.035em; line-height: 1; }
html:not(.fx) .reel { height: auto; }
html:not(.fx) .reel-sticky { position: relative; height: auto; display: block; padding: 0 16px 80px; }
html:not(.fx) .reel-frame { position: relative; clip-path: inset(0 round 24px); aspect-ratio: 16/9; max-width: 1180px; margin: 0 auto; }
html:not(.fx) .reel-caption { mix-blend-mode: normal; margin-bottom: 32px; }

/* ---------- Bandeau défilant ---------- */
.marquee { padding: clamp(40px, 6vw, 80px) 0; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mq-row { white-space: nowrap; overflow: hidden; }
.mq-track { display: inline-block; font-family: var(--display); font-weight: 300; font-size: clamp(44px, 8vw, 128px); letter-spacing: -.04em; line-height: 1.1; padding-right: .3em; }
.mq-row.alt .mq-track { color: var(--sky); font-weight: 400; }
html:not(.fx) .mq-track { animation: mq 40s linear infinite; }
@keyframes mq { to { transform: translateX(-50%); } }

/* ---------- Pourquoi un site : défilement horizontal ---------- */
.why { padding: clamp(100px, 12vw, 140px) 0 clamp(60px, 8vw, 100px); overflow: hidden; }
@media (min-width: 901px) { .why { min-height: 100vh; padding: 120px 0 48px; display: flex; flex-direction: column; justify-content: center; } }
.why-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; margin-bottom: 40px; }
.why-head h2 { margin-top: 16px; font-size: clamp(34px, 4.2vw, 64px); line-height: 1; letter-spacing: -.035em; }
.why-viewport { overflow: hidden; }
.why-track { display: flex; gap: 20px; padding: 0 max(16px, calc((100vw - 1180px) / 2)); width: max-content; }
.why-card { flex: 0 0 auto; width: clamp(290px, 34vw, 440px); min-height: clamp(320px, 44vh, 440px); display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: clamp(28px, 3vw, 40px); border-radius: 24px; background: var(--navy-2); border: 1px solid var(--line); }
.why-card h3 { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.1; letter-spacing: -.02em; font-weight: 400; }
.why-card p { color: var(--muted); font-size: 16px; margin-top: 14px; }
.why-k { font-family: var(--display); font-size: clamp(44px, 4.6vw, 68px); font-weight: 300; letter-spacing: -.04em; line-height: 1; color: var(--sky); }
.why-card.light { background: var(--paper); color: var(--ink); border-color: transparent; }
.why-card.light p { color: #4E5848; }
.why-card.light .why-k { color: #0B6E4A; }
.why-card.accent { background: var(--sky); color: var(--ink); border-color: transparent; }
.why-card.accent p { color: #2C3A1A; }
.why-card.accent .why-k { color: var(--ink); }
@media (max-width: 900px) {
  .why-head { grid-template-columns: 1fr; }
  .why-viewport { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .why-viewport::-webkit-scrollbar { display: none; }
  .why-card { scroll-snap-align: start; width: 82vw; min-height: 400px; }
}

/* ---------- Rubriques : grandes lignes qui se remplissent ---------- */
.rubrics-block { padding-top: 0; }
.rubrics.big { margin-top: 24px; }
.rubrics.big .rubric { position: relative; overflow: hidden; padding: clamp(24px, 3vw, 40px) 0; grid-template-columns: 1fr 1fr auto; isolation: isolate; }
.rubrics.big .rubric h3 { font-size: clamp(36px, 6vw, 96px); letter-spacing: -.04em; line-height: 1; font-weight: 300; transition: transform .5s cubic-bezier(.22,1,.36,1), color .3s; }
.rubrics.big .rubric::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--sky); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .5s cubic-bezier(.22,1,.36,1); }
@media (hover: hover) and (pointer: fine) {
  .rubrics.big .rubric:hover::before { transform: scaleY(1); }
  .rubrics.big .rubric:hover h3 { transform: translateX(24px); color: var(--ink); }
  .rubrics.big .rubric:hover p { color: #2C3A1A; }
  .rubrics.big .rubric:hover .go { border-color: var(--ink); color: var(--ink); }
}
@media (max-width: 760px) { .rubrics.big .rubric { grid-template-columns: 1fr auto; } .rubrics.big .rubric p { display: none; } }

/* ---------- Appel final + mot géant ---------- */
.cta-band { position: relative; overflow: hidden; padding-bottom: 0; text-align: left; }
.cta-band h2 { margin: 18px 0 40px; }
.cta-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.giant { margin-top: clamp(64px, 10vw, 140px); overflow: hidden; pointer-events: none; padding-bottom: 1vw; }
.giant span { display: block; font-family: var(--display); font-weight: 500; font-size: 25.5vw; letter-spacing: -.06em; line-height: .95; white-space: nowrap; color: var(--white); }
.giant b { color: var(--sky); font-weight: 500; }

/* ---------- Méthode : ligne de progression ---------- */
.steps { position: relative; }
html.fx .steps .step { opacity: .35; transition: opacity .5s; }
html.fx .steps .step.on { opacity: 1; }

/* ---------- Réalisations : maquettes inclinables ---------- */
.show .mock { transform-style: preserve-3d; transition: transform .6s cubic-bezier(.22,1,.36,1); will-change: transform; }

/* ---------- Boutons aimantés ---------- */
.magnet { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  html.fx [data-split] .wi, html.fx [data-fade], html.fx .manifesto-text .mw { transform: none !important; opacity: 1 !important; }
}

@media (max-width: 760px) {
  .reel { height: 180vh; }
  .reel-frame video { object-fit: contain; background: var(--navy); }
}
/* Méthode : étapes plus présentes */
.steps .step h3 { font-size: clamp(26px, 2.6vw, 38px); letter-spacing: -.02em; font-weight: 300; margin-bottom: 12px; }
@media (max-width: 760px) {
  .reel-sticky { place-items: start center; }
  .reel-caption { position: absolute; top: 16%; left: 16px; right: 16px; mix-blend-mode: normal; }
  .reel-caption h2 { font-size: clamp(32px, 9vw, 44px); }
}

/* ---------- Accueil : survol du Var en 3D ---------- */
.voyage { position: relative; background: #0b0e0a; }
.v-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.v-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.v-shade { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(180deg, rgba(8,10,7,.55) 0%, rgba(8,10,7,0) 18%, rgba(8,10,7,0) 52%, rgba(8,10,7,.62) 100%); }
.v-labels { position: absolute; inset: 0; pointer-events: none; }
.v-lab { position: absolute; left: 0; top: 0; margin: -30px 0 0 0; transform: translate3d(-200px,-200px,0); white-space: nowrap;
  font: 500 11px/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.9);
  padding: 7px 10px; border-radius: 99px; background: rgba(10,13,9,.45); border: 1px solid rgba(255,255,255,.14); translate: -50% 0; opacity: 0; }
.v-lab.lit { color: #0D0F0B; background: var(--sky); border-color: var(--sky); }
.v-hud { position: absolute; right: clamp(16px, 3vw, 40px); bottom: clamp(18px, 4vh, 40px); display: flex; align-items: baseline; gap: 14px;
  font-family: var(--display); color: var(--white); opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s; pointer-events: none; }
.v-at-stop .v-hud { opacity: 1; transform: none; }
.v-count { font-size: 13px; letter-spacing: .16em; color: var(--muted); }
.v-count b { color: var(--sky); font-weight: 500; }
.v-place { font-size: clamp(28px, 3.4vw, 52px); font-weight: 300; letter-spacing: -.03em; }

.v-chapters { position: relative; z-index: 2; margin-top: -100vh; margin-top: -100svh; pointer-events: none; }
.v-chapters a, .v-chapters .v-card { pointer-events: auto; }
.v-ch { min-height: 130vh; display: flex; align-items: center; }
.v-ch > .container { width: min(1320px, 100% - 64px); }
.v-intro { min-height: 100vh; min-height: 100svh; align-items: flex-end; padding: 0 0 clamp(40px, 8vh, 88px); }
.v-title { margin-top: 22px; font-size: clamp(50px, 9.6vw, 168px); line-height: .9; letter-spacing: -.05em; font-weight: 300; max-width: 10.5ch; text-shadow: 0 2px 40px rgba(0,0,0,.25); }
.v-intro-foot { margin-top: clamp(24px, 4vh, 44px); display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.v-intro-foot p { max-width: 380px; color: rgba(244,248,238,.82); font-size: 17px; }
.v-intro-act { display: flex; align-items: center; gap: 36px; }
.v-mani { min-height: 150vh; }
.v-mani .manifesto-text { color: #fff; text-shadow: 0 2px 28px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.3); }
.v-mani .manifesto-sub { margin-top: 36px; max-width: 420px; color: rgba(244,248,238,.86); font-size: 17px; }
.v-card { max-width: 460px; padding: clamp(24px, 2.6vw, 36px); border-radius: 22px; background: rgba(10,13,9,.66);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); border: 1px solid rgba(200,245,96,.16); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.v-card.wide { max-width: 640px; }
.v-card h2 { margin: 18px 0 16px; font-size: clamp(30px, 3.6vw, 52px); line-height: 1; letter-spacing: -.035em; }
.v-card h3 { margin: 10px 0 12px; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.08; letter-spacing: -.03em; font-weight: 400; }
.v-card p { color: rgba(244,248,238,.78); font-size: 16px; }
.v-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.v-num { font-family: var(--display); color: var(--sky); letter-spacing: .1em; }
.v-card .why-k { display: inline-block; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--sky); }
.v-outro { min-height: 170vh; align-items: center; text-align: center; }
.v-outro .container { display: flex; flex-direction: column; align-items: center; }
.v-big { margin: 22px 0 36px; font-size: clamp(44px, 7.6vw, 128px); line-height: .94; letter-spacing: -.045em; max-width: 12ch; text-shadow: 0 2px 40px rgba(0,0,0,.4); }
.v-outro .cta-btns { justify-content: center; }
@media (max-width: 760px) {
  .v-ch > .container { width: calc(100% - 32px); }
  .v-stop, .v-head { align-items: flex-end; padding-bottom: 9vh; }
  .v-card { padding: 22px; border-radius: 18px; }
  .v-card-top { margin-bottom: 14px; }
  .v-hud { left: 16px; right: auto; top: 76px; bottom: auto; }
  .v-place { font-size: 26px; }
  .v-intro-act { gap: 20px; flex-wrap: wrap; }
  .v-intro-act .scroll-cue { display: none; }
  .v-lab { font-size: 10px; padding: 6px 8px; }
}
/* Sans WebGL : une page classique */
.voyage.no-3d .v-stage { display: none; }
.voyage.no-3d .v-chapters { margin-top: 0; }
.voyage.no-3d .v-ch { min-height: 0; padding: 72px 0; }
.voyage.no-3d .v-intro { min-height: 90vh; padding-top: 140px; }
html.fx .v-mani .manifesto-text .mw { opacity: .22; }
.v-outro .container { transform: translateY(-15vh); }
@media (max-width: 760px) { .v-outro .container { transform: translateY(-20vh); } }

/* ---------- Hauts de page en 3D ---------- */
.page-head.has-3d { position: relative; overflow: hidden; min-height: 86vh; min-height: 86svh; display: flex; align-items: flex-end; background: #0b0e0a; }
.page-head.has-3d .v-stage { position: absolute; inset: 0; height: auto; }
.page-head.has-3d .v-shade { background: linear-gradient(180deg, rgba(8,10,7,.55) 0%, rgba(8,10,7,0) 22%, rgba(8,10,7,0) 40%, rgba(8,10,7,.78) 100%),
  linear-gradient(90deg, rgba(8,10,7,.45) 0%, rgba(8,10,7,0) 55%); }
.page-head.has-3d > .container { position: relative; z-index: 2; }
.page-head.has-3d h1, .page-head.has-3d .lead { text-shadow: 0 2px 28px rgba(0,0,0,.45); }
.page-head.has-3d .lead { color: rgba(244,248,238,.86); }
.page-head.has-3d.no-3d { min-height: 0; display: block; }
.page-head.has-3d.no-3d .v-stage { display: none; }
@media (max-width: 760px) { .page-head.has-3d { min-height: 92svh; } }
