site-mva-global-fret/css/parallax.css
MVA Global Fret 341dca7cb5 Convert intro into a scroll-driven 3D cinematic
Restructure the page so the first 4 viewports of scroll drive a
Three.js scene composited on top of the Antananarivo parachute video.

What's there:

- Three.js (ESM, r158 via importmap) renders a low-poly cargo airliner
  built from primitives: cylinder fuselage, cone nose, sphere cockpit
  (dark glass + emissive), box wings/tail/fin, cylinder engines with
  torus intakes, gold trim band, navy fin with gold logo box. No
  external model file.
- Hemisphere + directional + ambient lights tuned for golden-hour fill.
- 14 cloud spheres scattered around the plane, slowly rotating.
- GSAP + ScrollTrigger drive a single progress value scrubbed against
  scroll position. Inside the rAF loop, the camera arcs from rear-left
  (-0.6 rad) to front-right (+1.1 rad), radius dipping mid-flight, and
  the plane rolls slightly with scroll.
- Three act labels (Paris CDG / Vol cargo / Antananarivo) cross-fade at
  20%/40%-60%/72% scroll positions via a chained gsap timeline.
- Gold CTA button stays opacity:0 + pointer-events:none until the last
  ~10% of scroll, then fades and scales in. Hover transform rebuilt
  without the old mouse-parallax tilt (fights the scroll animation).
- Scroll hint pill (chevron + "Faites défiler") at the bottom of the
  first viewport, fades out on first scroll event.
- prefers-reduced-motion shortcut: scroll stage hidden, CTA visible,
  no animation. Page reverts to a static screen with the video bg.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-05 10:41:24 +02:00

288 lines
7.7 KiB
CSS

/* =========================================================================
PARALLAX INTRO — MVA Global Fret
Page scrollable (4 viewports) avec scène Three.js fixée. La timeline
pilote la caméra et l'avion 3D. À 100% du scroll, le bouton CTA apparaît.
========================================================================= */
:root {
--navy: #1a1a3e;
--navy-deep: #050518;
--gold: #c5a55a;
--gold-light: #e0c98a;
--red: #ff2a3d;
--white: #fff;
--mx: 0;
--my: 0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
height: 100%;
background: var(--navy-deep);
}
html { scroll-behavior: smooth; }
body.parallax-body {
font-family: 'Inter', sans-serif;
color: var(--white);
overflow-x: hidden;
}
/* ── HEADER ─────────────────────────────────────────────────────────────── */
.parallax-header {
position: fixed;
top: 0; left: 0; right: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 22px 36px;
z-index: 100;
}
.parallax-logo {
display: inline-flex;
align-items: center;
gap: 12px;
color: var(--white);
font-family: 'Poppins', sans-serif;
font-weight: 700;
letter-spacing: 1.2px;
font-size: 0.92rem;
text-transform: uppercase;
user-select: none;
}
.parallax-logo img {
height: 44px;
width: auto;
filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.65));
}
.lang-switcher {
display: inline-flex;
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 50px;
padding: 4px;
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
}
.lang-switcher button {
background: transparent;
border: none;
color: rgba(255, 255, 255, 0.7);
padding: 6px 14px;
cursor: pointer;
border-radius: 50px;
font-weight: 600;
font-size: 0.78rem;
font-family: inherit;
transition: all 0.2s;
}
.lang-switcher button.active {
background: var(--gold);
color: var(--navy);
}
.lang-switcher button:hover:not(.active) { color: var(--white); }
/* ── SCÈNE FIXE (vidéo + voile + canvas Three.js) ────────────────────────
.stage-fixed reste plein-écran pendant que la page se déroule derrière.
*/
.stage-fixed {
position: fixed;
inset: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
z-index: 1;
}
.layer {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
pointer-events: none;
will-change: transform;
}
.layer-video {
object-fit: cover;
object-position: center;
transform: translate(calc(var(--mx) * -22px), calc(var(--my) * -22px)) scale(1.06);
}
.layer-tint {
background:
radial-gradient(ellipse at center, transparent 0%, rgba(5, 5, 24, 0.55) 100%),
linear-gradient(180deg, rgba(5, 5, 24, 0.25) 0%, rgba(5, 5, 24, 0.5) 100%);
}
.layer-three {
display: block;
z-index: 2;
}
/* ── SCROLL STAGE — sentinelles invisibles qui donnent la hauteur ──────── */
.scroll-stage {
position: relative;
z-index: 5;
pointer-events: none;
}
.scroll-stage .act {
height: 100vh;
}
/* ── ÉTIQUETTES D'ACTE ──────────────────────────────────────────────────── */
.act-label {
position: absolute;
left: 50%;
bottom: 18%;
transform: translateX(-50%);
z-index: 30;
pointer-events: none;
text-align: center;
font-family: 'Poppins', sans-serif;
font-weight: 700;
letter-spacing: 4px;
text-transform: uppercase;
font-size: 1.05rem;
color: var(--white);
text-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
opacity: 0;
}
.act-label span {
display: inline-block;
padding: 14px 28px;
background: rgba(5, 5, 24, 0.45);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 8px;
line-height: 1.35;
}
/* ── INDICATEUR SCROLL ─────────────────────────────────────────────────── */
.scroll-hint {
position: absolute;
left: 50%;
bottom: 36px;
transform: translateX(-50%);
z-index: 40;
display: inline-flex;
flex-direction: column;
align-items: center;
gap: 8px;
font-family: 'Poppins', sans-serif;
font-weight: 600;
font-size: 0.78rem;
letter-spacing: 2px;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.85);
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
animation: scrollBob 1.8s ease-in-out infinite;
transition: opacity 0.5s ease;
}
.scroll-hint.hidden { opacity: 0; pointer-events: none; }
.scroll-hint i { font-size: 1rem; }
@keyframes scrollBob {
0%, 100% { transform: translate(-50%, 0); }
50% { transform: translate(-50%, 8px); }
}
/* ── BOUTON CTA centré ──────────────────────────────────────────────────── */
.cta-btn {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 50;
display: inline-flex;
align-items: center;
gap: 16px;
padding: 22px 56px;
background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
color: var(--navy);
text-decoration: none;
border-radius: 50px;
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 1.1rem;
letter-spacing: 0.6px;
overflow: hidden;
white-space: nowrap;
box-shadow:
0 20px 60px rgba(197, 165, 90, 0.55),
0 0 0 0 rgba(197, 165, 90, 0.4),
inset 0 1px 0 rgba(255, 255, 255, 0.45);
transition: box-shadow 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
/* Caché au départ ; révélé via GSAP en fin de scroll */
opacity: 0;
pointer-events: none;
}
.cta-btn.revealed { pointer-events: auto; }
.cta-btn:hover {
transform: translate(-50%, -50%) scale(1.04);
box-shadow:
0 28px 75px rgba(197, 165, 90, 0.7),
0 0 0 12px rgba(197, 165, 90, 0.12),
inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.cta-btn-shine {
position: absolute;
top: 0; left: -120%;
width: 60%; height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
transform: skewX(-22deg);
transition: left 0.7s ease;
pointer-events: none;
}
.cta-btn:hover .cta-btn-shine { left: 130%; }
.cta-btn i {
font-size: 0.95rem;
transition: transform 0.32s ease;
}
.cta-btn:hover i { transform: translateX(8px); }
.cta-btn::after {
content: '';
position: absolute;
inset: -3px;
border-radius: 50px;
border: 2px solid rgba(197, 165, 90, 0.55);
animation: ctaPulse 2.8s ease-out infinite;
pointer-events: none;
}
@keyframes ctaPulse {
0% { transform: scale(1); opacity: 0.7; }
100% { transform: scale(1.18); opacity: 0; }
}
/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
.parallax-header { padding: 14px 18px; }
.parallax-logo span { display: none; }
.parallax-logo img { height: 38px; }
.lang-switcher button { padding: 5px 10px; font-size: 0.74rem; }
.cta-btn {
padding: 16px 36px;
font-size: 0.98rem;
}
.act-label { font-size: 0.85rem; bottom: 22%; }
}
@media (prefers-reduced-motion: reduce) {
.cta-btn::after { animation: none; }
.scroll-hint { animation: none; display: none; }
.scroll-stage { display: none; }
.cta-btn { opacity: 1; pointer-events: auto; }
html { scroll-behavior: auto; }
}