Redo parallax intro with real photos and mouse-only motion
Previous SVG illustrations and emojis were dropped per user feedback.
The new intro is a single fixed viewport (no scroll) where every
layer reacts to mouse movement only:
Layer 1 — Real photo: Earth at night from space (NASA / Unsplash),
slow parallax (-18px max).
Layer 2 — Navy gradient tint to anchor the brand palette and
ensure central card legibility.
Layer 3 — Real photo: aerial sunset clouds (Unsplash), 28%
opacity with mix-blend-mode soft-light, faster
parallax (-32px max).
Layer 4 — Gold radial glow that follows the cursor (mix-blend
screen), giving an interactive "spotlight" feel.
Layer 5 — 12 floating gold particles with continuous CSS
animation, fastest parallax (-55px max).
Center card (glassmorphism, navy + gold border, blur 24px) tilts in
the OPPOSITE direction (+12px) for a 3D depth illusion. The CTA
button has a continuous pulse ring, hover lift + shine sweep, and
routes to accueil.html.
Mobile: device-orientation events drive the parallax instead of
mouse. prefers-reduced-motion kills all animations.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1ddd7b12d8
commit
ca8538b331
780
css/parallax.css
780
css/parallax.css
@ -1,16 +1,16 @@
|
|||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
PARALLAX INTRO PAGE — MVA Global Fret
|
PARALLAX INTRO — MVA Global Fret
|
||||||
Scroll-driven storytelling: tarmac → décollage → arrivée à Madagascar
|
Page unique fixe. Parallaxe pilotée à la souris uniquement.
|
||||||
|
Photos professionnelles Unsplash, aucun dessin maison.
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--navy: #1a1a3e;
|
--navy: #1a1a3e;
|
||||||
--navy-deep: #0d0d24;
|
--navy-deep: #050518;
|
||||||
--navy-light: #2a2a5e;
|
--navy-light: #2a2a5e;
|
||||||
--gold: #c5a55a;
|
--gold: #c5a55a;
|
||||||
--gold-light: #e0c98a;
|
--gold-light: #e0c98a;
|
||||||
--white: #ffffff;
|
--white: #ffffff;
|
||||||
--scroll: 0;
|
|
||||||
--mx: 0;
|
--mx: 0;
|
||||||
--my: 0;
|
--my: 0;
|
||||||
}
|
}
|
||||||
@ -18,8 +18,8 @@
|
|||||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
scroll-behavior: smooth;
|
height: 100%;
|
||||||
overflow-x: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.parallax-body {
|
.parallax-body {
|
||||||
@ -35,51 +35,42 @@ html, body {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 18px 36px;
|
padding: 20px 36px;
|
||||||
z-index: 100;
|
z-index: 50;
|
||||||
background: linear-gradient(to bottom, rgba(13,13,36,0.55), transparent);
|
|
||||||
backdrop-filter: blur(6px);
|
|
||||||
-webkit-backdrop-filter: blur(6px);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.parallax-logo {
|
.parallax-logo {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
text-decoration: none;
|
|
||||||
color: var(--white);
|
color: var(--white);
|
||||||
font-family: 'Poppins', sans-serif;
|
font-family: 'Poppins', sans-serif;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.parallax-logo img {
|
.parallax-logo img {
|
||||||
height: 44px;
|
height: 44px;
|
||||||
width: auto;
|
width: auto;
|
||||||
filter: drop-shadow(0 4px 8px rgba(0,0,0,0.35));
|
filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
|
||||||
}
|
|
||||||
|
|
||||||
.parallax-header-right {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 18px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.lang-switcher {
|
.lang-switcher {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
background: rgba(255,255,255,0.08);
|
background: rgba(255,255,255,0.08);
|
||||||
border: 1px solid rgba(255,255,255,0.15);
|
border: 1px solid rgba(255,255,255,0.18);
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
backdrop-filter: blur(8px);
|
backdrop-filter: blur(10px);
|
||||||
|
-webkit-backdrop-filter: blur(10px);
|
||||||
}
|
}
|
||||||
.lang-switcher button {
|
.lang-switcher button {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
color: rgba(255,255,255,0.6);
|
color: rgba(255,255,255,0.7);
|
||||||
padding: 5px 12px;
|
padding: 6px 14px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@ -93,614 +84,299 @@ html, body {
|
|||||||
}
|
}
|
||||||
.lang-switcher button:hover:not(.active) { color: var(--white); }
|
.lang-switcher button:hover:not(.active) { color: var(--white); }
|
||||||
|
|
||||||
.parallax-skip {
|
/* ── STAGE ──────────────────────────────────────────────────────────────── */
|
||||||
display: inline-flex;
|
.stage {
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
padding: 9px 18px;
|
|
||||||
border: 1px solid rgba(255,255,255,0.25);
|
|
||||||
border-radius: 50px;
|
|
||||||
color: var(--white);
|
|
||||||
text-decoration: none;
|
|
||||||
font-size: 0.85rem;
|
|
||||||
font-weight: 500;
|
|
||||||
transition: all 0.25s ease;
|
|
||||||
backdrop-filter: blur(8px);
|
|
||||||
background: rgba(255,255,255,0.05);
|
|
||||||
}
|
|
||||||
.parallax-skip:hover {
|
|
||||||
background: var(--gold);
|
|
||||||
color: var(--navy);
|
|
||||||
border-color: var(--gold);
|
|
||||||
transform: translateX(2px);
|
|
||||||
}
|
|
||||||
.parallax-skip i { transition: transform 0.25s; font-size: 0.75rem; }
|
|
||||||
.parallax-skip:hover i { transform: translateX(3px); }
|
|
||||||
|
|
||||||
/* ── SCÈNES PARALLAX ─────────────────────────────────────────────────────── */
|
|
||||||
.parallax-scene {
|
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
perspective: 1000px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layer {
|
.layer {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: -8% -8%; /* Marge pour que la parallaxe ne révèle pas les bords */
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
will-change: transform;
|
will-change: transform;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ──────────────────────────────────────────────────────────────────────────
|
/* ──────────────────────────────────────────────────────────────────────────
|
||||||
SCÈNE 1 — TARMAC (avion qui se charge au coucher de soleil)
|
COUCHE 1 — Terre depuis l'espace (background le plus profond)
|
||||||
|
Photo : NASA / Unsplash @nasa
|
||||||
────────────────────────────────────────────────────────────────────────── */
|
────────────────────────────────────────────────────────────────────────── */
|
||||||
.scene-tarmac {
|
.layer-earth {
|
||||||
background: linear-gradient(to bottom,
|
background-image: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=2400&q=85');
|
||||||
#1a1a3e 0%,
|
|
||||||
#2d2350 25%,
|
|
||||||
#6b3050 50%,
|
|
||||||
#c47a3f 75%,
|
|
||||||
#f4b669 95%,
|
|
||||||
#f9d28a 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.scene-tarmac .sky {
|
|
||||||
background: radial-gradient(ellipse at 50% 90%, rgba(255, 200, 120, 0.4), transparent 60%);
|
|
||||||
transform: translateY(calc(var(--scroll) * -50vh));
|
|
||||||
}
|
|
||||||
|
|
||||||
.scene-tarmac .sun {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 18%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%) translateY(calc(var(--scroll) * -120vh));
|
|
||||||
width: 240px;
|
|
||||||
height: 240px;
|
|
||||||
background: radial-gradient(circle, #ffe9b6 0%, #ffb874 35%, transparent 70%);
|
|
||||||
border-radius: 50%;
|
|
||||||
filter: blur(10px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.scene-tarmac .stars { display: none; }
|
|
||||||
|
|
||||||
.scene-tarmac .mountains {
|
|
||||||
bottom: 18%;
|
|
||||||
height: 30%;
|
|
||||||
background:
|
|
||||||
linear-gradient(to right,
|
|
||||||
transparent 0%, transparent 5%,
|
|
||||||
#2d2350 5%, #2d2350 14%,
|
|
||||||
transparent 14%, transparent 18%,
|
|
||||||
#1f1839 18%, #1f1839 32%,
|
|
||||||
transparent 32%, transparent 38%,
|
|
||||||
#2d2350 38%, #2d2350 55%,
|
|
||||||
transparent 55%, transparent 60%,
|
|
||||||
#1f1839 60%, #1f1839 78%,
|
|
||||||
transparent 78%, transparent 82%,
|
|
||||||
#2d2350 82%, #2d2350 100%);
|
|
||||||
-webkit-mask: linear-gradient(135deg, transparent 30%, black 30%, black 70%, transparent 70%);
|
|
||||||
mask: linear-gradient(135deg, transparent 30%, black 30%, black 70%, transparent 70%);
|
|
||||||
/* simpler approach with SVG mountain silhouette */
|
|
||||||
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'><path d='M0,200 L0,140 L80,80 L150,120 L220,60 L300,110 L380,70 L470,130 L550,90 L640,40 L730,100 L820,70 L900,130 L990,80 L1080,110 L1200,60 L1200,200 Z' fill='%231a1230' opacity='0.85'/></svg>");
|
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-repeat: no-repeat;
|
background-position: center;
|
||||||
background-position: bottom;
|
/* Bouge légèrement à la souris */
|
||||||
transform: translate(calc(var(--mx) * -8px), calc(var(--scroll) * -25vh));
|
transform: translate(calc(var(--mx) * -18px), calc(var(--my) * -18px)) scale(1.04);
|
||||||
}
|
}
|
||||||
|
|
||||||
.scene-tarmac .hangar {
|
/* ──────────────────────────────────────────────────────────────────────────
|
||||||
bottom: 17%;
|
COUCHE 2 — Voile bleu nuit pour assombrir et amener la palette de marque
|
||||||
left: -5%;
|
────────────────────────────────────────────────────────────────────────── */
|
||||||
width: 30%;
|
.layer-tint {
|
||||||
height: 18%;
|
background:
|
||||||
background: linear-gradient(180deg, #14102a 0%, #0a081c 100%);
|
radial-gradient(ellipse at center, rgba(26, 26, 62, 0.4) 0%, rgba(5, 5, 24, 0.85) 100%),
|
||||||
-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100' preserveAspectRatio='none'><path d='M0,100 L0,30 Q0,15 15,15 L80,15 L100,5 L120,15 L185,15 Q200,15 200,30 L200,100 Z' fill='black'/></svg>") no-repeat;
|
linear-gradient(180deg, rgba(26, 26, 62, 0.5) 0%, rgba(5, 5, 24, 0.7) 100%);
|
||||||
-webkit-mask-size: 100% 100%;
|
inset: 0;
|
||||||
mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100' preserveAspectRatio='none'><path d='M0,100 L0,30 Q0,15 15,15 L80,15 L100,5 L120,15 L185,15 Q200,15 200,30 L200,100 Z' fill='black'/></svg>") no-repeat;
|
|
||||||
mask-size: 100% 100%;
|
|
||||||
transform: translate(calc(var(--mx) * -15px), calc(var(--scroll) * -40vh));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.scene-tarmac .tarmac {
|
/* ──────────────────────────────────────────────────────────────────────────
|
||||||
bottom: 0;
|
COUCHE 3 — Nuages au coucher de soleil (vue aérienne)
|
||||||
height: 18%;
|
Mode soft-light pour fusionner avec la Terre
|
||||||
background: linear-gradient(to bottom,
|
Photo : Unsplash
|
||||||
rgba(40, 30, 60, 0.4) 0%,
|
────────────────────────────────────────────────────────────────────────── */
|
||||||
rgba(20, 15, 30, 0.85) 50%,
|
.layer-clouds {
|
||||||
rgba(10, 8, 18, 1) 100%);
|
background-image: url('https://images.unsplash.com/photo-1530908295418-a12e326966ba?w=2400&q=85');
|
||||||
border-top: 1px solid rgba(197, 165, 90, 0.2);
|
background-size: cover;
|
||||||
transform: translateY(calc(var(--scroll) * 20vh));
|
background-position: center;
|
||||||
|
opacity: 0.28;
|
||||||
|
mix-blend-mode: soft-light;
|
||||||
|
transform: translate(calc(var(--mx) * -32px), calc(var(--my) * -32px)) scale(1.06);
|
||||||
}
|
}
|
||||||
.scene-tarmac .tarmac::before {
|
|
||||||
|
/* ──────────────────────────────────────────────────────────────────────────
|
||||||
|
COUCHE 4 — Halo doré central qui suit la souris
|
||||||
|
────────────────────────────────────────────────────────────────────────── */
|
||||||
|
.layer-glow {
|
||||||
|
background: radial-gradient(circle at calc(50% + var(--mx) * 8%) calc(50% + var(--my) * 8%),
|
||||||
|
rgba(197, 165, 90, 0.22) 0%,
|
||||||
|
rgba(197, 165, 90, 0.10) 25%,
|
||||||
|
transparent 55%);
|
||||||
|
inset: 0;
|
||||||
|
mix-blend-mode: screen;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ──────────────────────────────────────────────────────────────────────────
|
||||||
|
COUCHE 5 — Particules dorées flottantes (parallaxe la plus rapide)
|
||||||
|
────────────────────────────────────────────────────────────────────────── */
|
||||||
|
.layer-particles {
|
||||||
|
inset: 0;
|
||||||
|
transform: translate(calc(var(--mx) * -55px), calc(var(--my) * -55px));
|
||||||
|
}
|
||||||
|
.particle {
|
||||||
|
position: absolute;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: radial-gradient(circle, #fff 0%, var(--gold) 50%, transparent 100%);
|
||||||
|
pointer-events: none;
|
||||||
|
filter: blur(0.5px);
|
||||||
|
animation: float 14s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
.particle::after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 30%;
|
inset: -4px;
|
||||||
left: 0; right: 0;
|
border-radius: 50%;
|
||||||
height: 2px;
|
background: radial-gradient(circle, rgba(197, 165, 90, 0.5) 0%, transparent 70%);
|
||||||
background: repeating-linear-gradient(to right,
|
filter: blur(4px);
|
||||||
transparent 0, transparent 30px,
|
|
||||||
rgba(255, 220, 150, 0.5) 30px, rgba(255, 220, 150, 0.5) 60px);
|
|
||||||
}
|
}
|
||||||
|
.p1 { top: 12%; left: 8%; width: 4px; height: 4px; animation-delay: 0s; animation-duration: 12s; }
|
||||||
|
.p2 { top: 22%; left: 78%; width: 3px; height: 3px; animation-delay: -2s; animation-duration: 16s; }
|
||||||
|
.p3 { top: 35%; left: 18%; width: 5px; height: 5px; animation-delay: -5s; animation-duration: 14s; }
|
||||||
|
.p4 { top: 48%; left: 88%; width: 2px; height: 2px; animation-delay: -8s; animation-duration: 18s; }
|
||||||
|
.p5 { top: 60%; left: 14%; width: 4px; height: 4px; animation-delay: -3s; animation-duration: 13s; }
|
||||||
|
.p6 { top: 72%; left: 72%; width: 3px; height: 3px; animation-delay: -6s; animation-duration: 17s; }
|
||||||
|
.p7 { top: 82%; left: 30%; width: 5px; height: 5px; animation-delay: -1s; animation-duration: 15s; }
|
||||||
|
.p8 { top: 18%; left: 48%; width: 2px; height: 2px; animation-delay: -7s; animation-duration: 19s; }
|
||||||
|
.p9 { top: 40%; left: 56%; width: 3px; height: 3px; animation-delay: -4s; animation-duration: 14s; }
|
||||||
|
.p10 { top: 88%; left: 92%; width: 4px; height: 4px; animation-delay: -9s; animation-duration: 16s; }
|
||||||
|
.p11 { top: 6%; left: 35%; width: 3px; height: 3px; animation-delay: -10s; animation-duration: 13s; }
|
||||||
|
.p12 { top: 92%; left: 56%; width: 2px; height: 2px; animation-delay: -11s; animation-duration: 17s; }
|
||||||
|
|
||||||
/* ── PLANE STAGES (3 versions, une par scène) ───────────────────────────── */
|
@keyframes float {
|
||||||
.plane-stage {
|
0%, 100% { transform: translate(0, 0); opacity: 0.4; }
|
||||||
position: absolute;
|
25% { transform: translate(20px, -30px); opacity: 1; }
|
||||||
pointer-events: none;
|
50% { transform: translate(-15px, -50px); opacity: 0.6; }
|
||||||
will-change: transform;
|
75% { transform: translate(-25px, -20px); opacity: 1; }
|
||||||
}
|
|
||||||
|
|
||||||
.plane {
|
|
||||||
width: 100%;
|
|
||||||
height: auto;
|
|
||||||
display: block;
|
|
||||||
filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Avion scène 1 : au sol, immobile */
|
|
||||||
.plane-loading {
|
|
||||||
bottom: 14%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%) translateY(calc(var(--scroll) * 30vh));
|
|
||||||
width: min(640px, 75vw);
|
|
||||||
z-index: 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Rampe de chargement */
|
|
||||||
.ramp {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 8%;
|
|
||||||
left: calc(50% - 280px);
|
|
||||||
width: 90px;
|
|
||||||
height: 8px;
|
|
||||||
background: linear-gradient(90deg, #5a4520, #8a6a30);
|
|
||||||
transform: rotate(-18deg);
|
|
||||||
transform-origin: right;
|
|
||||||
border-radius: 4px;
|
|
||||||
box-shadow: 0 4px 12px rgba(0,0,0,0.4);
|
|
||||||
z-index: 4;
|
|
||||||
transform: translateY(calc(var(--scroll) * 30vh)) rotate(-18deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Boîtes qui montent dans l'avion (animation) */
|
|
||||||
.box {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 6%;
|
|
||||||
font-size: 28px;
|
|
||||||
z-index: 6;
|
|
||||||
animation: loadBox 4s ease-in-out infinite;
|
|
||||||
filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
|
|
||||||
transform: translateY(calc(var(--scroll) * 30vh));
|
|
||||||
}
|
|
||||||
.box-1 { left: calc(50% - 320px); animation-delay: 0s; }
|
|
||||||
.box-2 { left: calc(50% - 320px); animation-delay: 1.3s; }
|
|
||||||
.box-3 { left: calc(50% - 320px); animation-delay: 2.6s; }
|
|
||||||
|
|
||||||
@keyframes loadBox {
|
|
||||||
0% { transform: translate(0, calc(var(--scroll, 0) * 30vh)) scale(1); opacity: 0; }
|
|
||||||
10% { opacity: 1; }
|
|
||||||
60% { transform: translate(140px, calc(-30px + var(--scroll, 0) * 30vh)) scale(0.95); opacity: 1; }
|
|
||||||
90% { transform: translate(170px, calc(-20px + var(--scroll, 0) * 30vh)) scale(0.7); opacity: 0; }
|
|
||||||
100% { transform: translate(170px, calc(-20px + var(--scroll, 0) * 30vh)) scale(0.7); opacity: 0; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.ground-boxes {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 2%;
|
|
||||||
left: calc(50% - 350px);
|
|
||||||
display: flex;
|
|
||||||
gap: 6px;
|
|
||||||
z-index: 4;
|
|
||||||
transform: translateY(calc(var(--scroll) * 30vh));
|
|
||||||
}
|
|
||||||
.ground-box {
|
|
||||||
width: 28px; height: 28px;
|
|
||||||
background: linear-gradient(135deg, #c5a55a, #8a6a30);
|
|
||||||
border: 1px solid #5a4520;
|
|
||||||
border-radius: 3px;
|
|
||||||
box-shadow: 0 4px 8px rgba(0,0,0,0.5);
|
|
||||||
}
|
|
||||||
.gb-1 { transform: translateY(0); }
|
|
||||||
.gb-2 { transform: translateY(-2px); }
|
|
||||||
.gb-3 { transform: translateY(-1px); }
|
|
||||||
|
|
||||||
/* ── TEXTE HERO (scène 1) ────────────────────────────────────────────────── */
|
|
||||||
.scene-text {
|
|
||||||
position: absolute;
|
|
||||||
z-index: 10;
|
|
||||||
text-align: center;
|
|
||||||
width: 100%;
|
|
||||||
padding: 0 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scene-text--hero {
|
|
||||||
top: 22%;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
opacity: calc(1 - var(--scroll) * 3);
|
|
||||||
transform: translateY(calc(var(--scroll) * -30vh));
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-pretitle {
|
|
||||||
font-family: 'Poppins', sans-serif;
|
|
||||||
font-weight: 500;
|
|
||||||
letter-spacing: 6px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: var(--gold);
|
|
||||||
font-size: 0.85rem;
|
|
||||||
margin-bottom: 14px;
|
|
||||||
opacity: 0.9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-title {
|
|
||||||
font-family: 'Poppins', sans-serif;
|
|
||||||
font-size: clamp(2.2rem, 6vw, 4.5rem);
|
|
||||||
font-weight: 800;
|
|
||||||
letter-spacing: -1px;
|
|
||||||
line-height: 1;
|
|
||||||
background: linear-gradient(135deg, #fff 0%, #c5a55a 50%, #fff 100%);
|
|
||||||
-webkit-background-clip: text;
|
|
||||||
background-clip: text;
|
|
||||||
-webkit-text-fill-color: transparent;
|
|
||||||
color: transparent;
|
|
||||||
text-shadow: 0 6px 30px rgba(0,0,0,0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-line {
|
|
||||||
width: 80px;
|
|
||||||
height: 3px;
|
|
||||||
background: var(--gold);
|
|
||||||
margin: 22px auto;
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-subtitle {
|
|
||||||
font-size: clamp(1rem, 2vw, 1.3rem);
|
|
||||||
font-weight: 300;
|
|
||||||
color: rgba(255, 255, 255, 0.88);
|
|
||||||
letter-spacing: 0.5px;
|
|
||||||
text-shadow: 0 2px 12px rgba(0,0,0,0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.scroll-indicator {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 30px;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
z-index: 10;
|
|
||||||
text-align: center;
|
|
||||||
color: rgba(255, 255, 255, 0.7);
|
|
||||||
font-size: 0.75rem;
|
|
||||||
letter-spacing: 2px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
opacity: calc(1 - var(--scroll) * 4);
|
|
||||||
}
|
|
||||||
.scroll-mouse {
|
|
||||||
width: 22px;
|
|
||||||
height: 36px;
|
|
||||||
border: 2px solid rgba(255, 255, 255, 0.6);
|
|
||||||
border-radius: 12px;
|
|
||||||
margin: 10px auto 0;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.scroll-mouse span {
|
|
||||||
display: block;
|
|
||||||
width: 4px;
|
|
||||||
height: 8px;
|
|
||||||
background: var(--gold);
|
|
||||||
border-radius: 2px;
|
|
||||||
position: absolute;
|
|
||||||
top: 6px;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
animation: scrollDown 1.8s ease-in-out infinite;
|
|
||||||
}
|
|
||||||
@keyframes scrollDown {
|
|
||||||
0%, 20% { opacity: 0; transform: translate(-50%, 0); }
|
|
||||||
50% { opacity: 1; transform: translate(-50%, 6px); }
|
|
||||||
100% { opacity: 0; transform: translate(-50%, 14px); }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ──────────────────────────────────────────────────────────────────────────
|
/* ──────────────────────────────────────────────────────────────────────────
|
||||||
SCÈNE 2 — DÉCOLLAGE
|
CARTE CENTRALE — CTA
|
||||||
────────────────────────────────────────────────────────────────────────── */
|
────────────────────────────────────────────────────────────────────────── */
|
||||||
.scene-takeoff {
|
.center-card {
|
||||||
background: linear-gradient(to bottom,
|
|
||||||
#2a2058 0%,
|
|
||||||
#5a3470 35%,
|
|
||||||
#b06850 70%,
|
|
||||||
#f0a060 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.scene-takeoff .sky-2 {
|
|
||||||
background: radial-gradient(ellipse at 50% 60%, rgba(240, 160, 100, 0.5), transparent 70%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.scene-takeoff .clouds-far,
|
|
||||||
.scene-takeoff .clouds-mid {
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: cover;
|
|
||||||
}
|
|
||||||
.scene-takeoff .clouds-far {
|
|
||||||
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 400' preserveAspectRatio='none'><g fill='%23fff' opacity='0.18'><ellipse cx='150' cy='90' rx='90' ry='28'/><ellipse cx='400' cy='160' rx='110' ry='32'/><ellipse cx='700' cy='100' rx='80' ry='26'/><ellipse cx='950' cy='200' rx='130' ry='34'/><ellipse cx='1100' cy='90' rx='80' ry='24'/></g></svg>");
|
|
||||||
transform: translate(calc(var(--scroll) * -20vw), calc(var(--mx) * 5px));
|
|
||||||
}
|
|
||||||
.scene-takeoff .clouds-mid {
|
|
||||||
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 400' preserveAspectRatio='none'><g fill='%23fff' opacity='0.4'><ellipse cx='100' cy='220' rx='130' ry='40'/><ellipse cx='550' cy='280' rx='160' ry='48'/><ellipse cx='950' cy='250' rx='140' ry='42'/></g></svg>");
|
|
||||||
transform: translate(calc(var(--scroll) * -40vw + 100vw), calc(var(--mx) * 12px));
|
|
||||||
}
|
|
||||||
|
|
||||||
.scene-takeoff .mountains-2 {
|
|
||||||
bottom: 0;
|
|
||||||
height: 25%;
|
|
||||||
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'><path d='M0,200 L0,160 L100,100 L200,140 L320,80 L450,140 L580,90 L720,150 L850,100 L980,150 L1100,80 L1200,130 L1200,200 Z' fill='%231a1230' opacity='0.9'/></svg>");
|
|
||||||
background-size: cover;
|
|
||||||
background-position: bottom;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
transform: translate(calc(var(--mx) * -10px), calc(var(--scroll) * 15vh));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Avion scène 2 : monte en diagonale et grandit/avance */
|
|
||||||
.plane-takeoff {
|
|
||||||
bottom: 30%;
|
|
||||||
left: 50%;
|
|
||||||
width: min(580px, 70vw);
|
|
||||||
z-index: 5;
|
|
||||||
/* progress in scene = (scroll - 0.33) / 0.34 */
|
|
||||||
transform: translateX(calc(-50% + (var(--scroll) - 0.5) * 60vw))
|
|
||||||
translateY(calc((var(--scroll) - 0.5) * -40vh))
|
|
||||||
rotate(calc((var(--scroll) - 0.33) * -10deg));
|
|
||||||
}
|
|
||||||
|
|
||||||
.contrail {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
right: 90%;
|
|
||||||
width: 200px;
|
|
||||||
height: 6px;
|
|
||||||
background: linear-gradient(to left, rgba(255,255,255,0.85), transparent);
|
|
||||||
border-radius: 3px;
|
|
||||||
filter: blur(2px);
|
|
||||||
transform: translateY(-3px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.scene-text--takeoff {
|
|
||||||
top: 18%;
|
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, calc(-20vh + var(--scroll) * 40vh));
|
|
||||||
text-align: center;
|
|
||||||
max-width: 600px;
|
|
||||||
padding: 0 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step-marker {
|
|
||||||
font-family: 'Poppins', sans-serif;
|
|
||||||
font-weight: 800;
|
|
||||||
font-size: 4.5rem;
|
|
||||||
background: linear-gradient(135deg, var(--gold), var(--gold-light));
|
|
||||||
-webkit-background-clip: text;
|
|
||||||
background-clip: text;
|
|
||||||
-webkit-text-fill-color: transparent;
|
|
||||||
line-height: 1;
|
|
||||||
opacity: 0.85;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scene-text--takeoff h2 {
|
|
||||||
font-family: 'Poppins', sans-serif;
|
|
||||||
font-size: clamp(2rem, 5vw, 3.2rem);
|
|
||||||
font-weight: 700;
|
|
||||||
margin-top: 8px;
|
|
||||||
letter-spacing: -0.5px;
|
|
||||||
text-shadow: 0 4px 20px rgba(0,0,0,0.4);
|
|
||||||
}
|
|
||||||
|
|
||||||
.scene-text--takeoff p {
|
|
||||||
margin-top: 14px;
|
|
||||||
font-size: 1.15rem;
|
|
||||||
color: rgba(255, 255, 255, 0.85);
|
|
||||||
font-weight: 300;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ──────────────────────────────────────────────────────────────────────────
|
|
||||||
SCÈNE 3 — ARRIVÉE (nuit étoilée + Madagascar)
|
|
||||||
────────────────────────────────────────────────────────────────────────── */
|
|
||||||
.scene-arrival {
|
|
||||||
background: linear-gradient(to bottom,
|
|
||||||
#050518 0%,
|
|
||||||
#0d0d2a 40%,
|
|
||||||
#1a1a3e 80%,
|
|
||||||
#1f2050 100%);
|
|
||||||
height: 110vh;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scene-arrival .night-sky {
|
|
||||||
background: radial-gradient(ellipse at 70% 30%, rgba(60, 60, 120, 0.3), transparent 70%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.scene-arrival .night-stars {
|
|
||||||
background-image:
|
|
||||||
radial-gradient(2px 2px at 20% 18%, #fff 50%, transparent 100%),
|
|
||||||
radial-gradient(1px 1px at 35% 42%, #fff 50%, transparent 100%),
|
|
||||||
radial-gradient(2px 2px at 60% 22%, #fff 50%, transparent 100%),
|
|
||||||
radial-gradient(1.5px 1.5px at 80% 35%, #fff 50%, transparent 100%),
|
|
||||||
radial-gradient(1px 1px at 50% 65%, #fff 50%, transparent 100%),
|
|
||||||
radial-gradient(1.5px 1.5px at 12% 70%, #fff 50%, transparent 100%),
|
|
||||||
radial-gradient(1px 1px at 90% 80%, #fff 50%, transparent 100%),
|
|
||||||
radial-gradient(2px 2px at 25% 85%, #c5a55a 50%, transparent 100%),
|
|
||||||
radial-gradient(1px 1px at 78% 12%, #fff 50%, transparent 100%);
|
|
||||||
animation: twinkle 4s ease-in-out infinite alternate;
|
|
||||||
transform: translate(calc(var(--mx) * -6px), calc(var(--my) * -4px));
|
|
||||||
}
|
|
||||||
@keyframes twinkle {
|
|
||||||
0% { opacity: 0.7; }
|
|
||||||
100% { opacity: 1; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.scene-arrival .moon {
|
|
||||||
position: absolute;
|
|
||||||
top: 12%;
|
|
||||||
right: 12%;
|
|
||||||
width: 110px;
|
|
||||||
height: 110px;
|
|
||||||
background: radial-gradient(circle at 35% 35%, #fff 0%, #f4e4b4 40%, #c5a55a 100%);
|
|
||||||
border-radius: 50%;
|
|
||||||
box-shadow: 0 0 60px rgba(244, 228, 180, 0.6), 0 0 120px rgba(197, 165, 90, 0.3);
|
|
||||||
transform: translate(calc(var(--mx) * -10px), calc(var(--my) * -6px));
|
|
||||||
}
|
|
||||||
|
|
||||||
.scene-arrival .madagascar-silhouette {
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
height: 35%;
|
|
||||||
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 250' preserveAspectRatio='none'><path d='M0,250 L0,180 Q40,160 80,165 Q140,170 200,150 Q260,130 320,140 Q380,150 440,125 Q500,100 580,115 Q640,130 700,110 Q780,90 860,120 Q940,150 1020,135 Q1100,120 1200,150 L1200,250 Z' fill='%230a0820'/></svg>");
|
|
||||||
background-size: cover;
|
|
||||||
background-position: bottom;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
transform: translateY(calc((1 - var(--scroll)) * 20vh));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Petit avion en approche */
|
|
||||||
.plane-arrival {
|
|
||||||
position: absolute;
|
|
||||||
top: 22%;
|
|
||||||
left: 30%;
|
|
||||||
width: min(280px, 32vw);
|
|
||||||
z-index: 5;
|
|
||||||
transform: translate(calc((var(--scroll) - 0.66) * 100vw), calc((1 - var(--scroll)) * -10vh))
|
|
||||||
rotate(8deg);
|
|
||||||
opacity: calc((var(--scroll) - 0.55) * 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.plane-small { opacity: 0.95; }
|
|
||||||
|
|
||||||
/* CTA bloc final */
|
|
||||||
.parallax-cta-block {
|
|
||||||
position: relative;
|
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
max-width: 720px;
|
width: min(560px, calc(100vw - 40px));
|
||||||
padding: 0 30px;
|
padding: 50px 50px 44px;
|
||||||
opacity: calc((var(--scroll) - 0.7) * 4);
|
background: rgba(13, 13, 36, 0.45);
|
||||||
transform: translateY(calc((1 - var(--scroll)) * 50px));
|
border: 1px solid rgba(197, 165, 90, 0.25);
|
||||||
transition: opacity 0.5s, transform 0.5s;
|
border-radius: 28px;
|
||||||
|
backdrop-filter: blur(24px) saturate(140%);
|
||||||
|
-webkit-backdrop-filter: blur(24px) saturate(140%);
|
||||||
|
box-shadow:
|
||||||
|
0 30px 80px rgba(0, 0, 0, 0.55),
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.08);
|
||||||
|
/* La carte bouge en sens INVERSE des autres couches (effet de tilt 3D) */
|
||||||
|
transform: translate(
|
||||||
|
calc(-50% + var(--mx) * 12px),
|
||||||
|
calc(-50% + var(--my) * 12px)
|
||||||
|
);
|
||||||
|
transition: transform 0.05s linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cta-pretitle {
|
/* Halo doré derrière la carte */
|
||||||
|
.center-card::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
inset: -2px;
|
||||||
|
border-radius: 28px;
|
||||||
|
background: linear-gradient(135deg, rgba(197, 165, 90, 0.6), transparent 40%, transparent 60%, rgba(197, 165, 90, 0.4));
|
||||||
|
z-index: -1;
|
||||||
|
opacity: 0.5;
|
||||||
|
filter: blur(8px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-pretitle {
|
||||||
font-family: 'Poppins', sans-serif;
|
font-family: 'Poppins', sans-serif;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
letter-spacing: 8px;
|
letter-spacing: 8px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
color: var(--gold);
|
color: var(--gold);
|
||||||
font-size: 0.9rem;
|
font-size: 0.78rem;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 14px;
|
||||||
|
opacity: 0.92;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cta-title {
|
.card-title {
|
||||||
font-family: 'Poppins', sans-serif;
|
font-family: 'Poppins', sans-serif;
|
||||||
font-size: clamp(2.4rem, 6vw, 4rem);
|
font-size: clamp(2rem, 4.6vw, 3.4rem);
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
letter-spacing: -1px;
|
letter-spacing: -1px;
|
||||||
background: linear-gradient(135deg, #fff 0%, #c5a55a 60%, #fff 100%);
|
line-height: 1;
|
||||||
|
background: linear-gradient(135deg, #fff 0%, #c5a55a 55%, #fff 100%);
|
||||||
-webkit-background-clip: text;
|
-webkit-background-clip: text;
|
||||||
background-clip: text;
|
background-clip: text;
|
||||||
-webkit-text-fill-color: transparent;
|
-webkit-text-fill-color: transparent;
|
||||||
line-height: 1.1;
|
color: transparent;
|
||||||
|
text-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.cta-subtitle {
|
.card-line {
|
||||||
margin-top: 18px;
|
width: 64px;
|
||||||
font-size: 1.1rem;
|
height: 2px;
|
||||||
color: rgba(255, 255, 255, 0.85);
|
background: var(--gold);
|
||||||
|
margin: 22px auto 18px;
|
||||||
|
border-radius: 1px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.card-line::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
background: var(--gold);
|
||||||
|
filter: blur(4px);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-subtitle {
|
||||||
|
font-size: clamp(0.95rem, 1.5vw, 1.1rem);
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
line-height: 1.6;
|
color: rgba(255, 255, 255, 0.8);
|
||||||
|
line-height: 1.55;
|
||||||
|
letter-spacing: 0.3px;
|
||||||
|
max-width: 420px;
|
||||||
|
margin: 0 auto 36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.parallax-cta-btn {
|
/* ── BOUTON CTA ─────────────────────────────────────────────────────────── */
|
||||||
|
.cta-btn {
|
||||||
|
position: relative;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 14px;
|
gap: 14px;
|
||||||
margin-top: 36px;
|
padding: 18px 44px;
|
||||||
padding: 18px 42px;
|
background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
|
||||||
background: linear-gradient(135deg, var(--gold), var(--gold-light));
|
|
||||||
color: var(--navy);
|
color: var(--navy);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
font-family: 'Poppins', sans-serif;
|
font-family: 'Poppins', sans-serif;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-size: 1.05rem;
|
font-size: 1.02rem;
|
||||||
letter-spacing: 0.5px;
|
letter-spacing: 0.5px;
|
||||||
box-shadow: 0 12px 35px rgba(197, 165, 90, 0.45),
|
|
||||||
0 0 0 0 rgba(197, 165, 90, 0.5);
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
box-shadow:
|
||||||
|
0 14px 40px rgba(197, 165, 90, 0.5),
|
||||||
|
0 0 0 0 rgba(197, 165, 90, 0.4),
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.4);
|
||||||
|
transition: all 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||||
|
z-index: 1;
|
||||||
}
|
}
|
||||||
.parallax-cta-btn::before {
|
.cta-btn-shine {
|
||||||
|
position: absolute;
|
||||||
|
top: 0; left: -120%;
|
||||||
|
width: 50%; height: 100%;
|
||||||
|
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
|
||||||
|
transform: skewX(-20deg);
|
||||||
|
transition: left 0.7s ease;
|
||||||
|
}
|
||||||
|
.cta-btn:hover {
|
||||||
|
transform: translateY(-4px) scale(1.02);
|
||||||
|
box-shadow:
|
||||||
|
0 22px 55px rgba(197, 165, 90, 0.65),
|
||||||
|
0 0 0 10px rgba(197, 165, 90, 0.12),
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||||
|
}
|
||||||
|
.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(6px); }
|
||||||
|
|
||||||
|
/* Pulse autour du bouton (continu) */
|
||||||
|
.cta-btn::after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0; left: -100%;
|
inset: -3px;
|
||||||
width: 100%; height: 100%;
|
border-radius: 50px;
|
||||||
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
|
border: 2px solid rgba(197, 165, 90, 0.5);
|
||||||
transition: left 0.6s;
|
animation: ctaPulse 2.5s ease-out infinite;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
.parallax-cta-btn:hover {
|
@keyframes ctaPulse {
|
||||||
transform: translateY(-4px);
|
0% { transform: scale(1); opacity: 0.6; }
|
||||||
box-shadow: 0 18px 45px rgba(197, 165, 90, 0.6),
|
100% { transform: scale(1.18); opacity: 0; }
|
||||||
0 0 0 8px rgba(197, 165, 90, 0.15);
|
|
||||||
}
|
}
|
||||||
.parallax-cta-btn:hover::before { left: 100%; }
|
|
||||||
.parallax-cta-btn i {
|
|
||||||
transition: transform 0.3s;
|
|
||||||
font-size: 0.95rem;
|
|
||||||
}
|
|
||||||
.parallax-cta-btn:hover i { transform: translateX(6px); }
|
|
||||||
|
|
||||||
.cta-meta {
|
/* ── META INFOS SOUS LE BOUTON ──────────────────────────────────────────── */
|
||||||
|
.card-meta {
|
||||||
|
margin-top: 32px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 32px;
|
gap: 14px;
|
||||||
margin-top: 36px;
|
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
color: rgba(255, 255, 255, 0.65);
|
color: rgba(255, 255, 255, 0.6);
|
||||||
font-size: 0.85rem;
|
font-size: 0.82rem;
|
||||||
}
|
|
||||||
.cta-meta span {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
.cta-meta i {
|
|
||||||
color: var(--gold);
|
|
||||||
}
|
}
|
||||||
|
.card-meta span { display: inline-flex; align-items: center; gap: 8px; }
|
||||||
|
.card-meta i { color: var(--gold); font-size: 0.85rem; }
|
||||||
|
.meta-sep { color: rgba(197, 165, 90, 0.4); padding: 0 4px; }
|
||||||
|
|
||||||
/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
|
/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.parallax-header { padding: 14px 18px; }
|
.parallax-header { padding: 14px 18px; }
|
||||||
.parallax-logo span { display: none; }
|
.parallax-logo span { display: none; }
|
||||||
.parallax-logo img { height: 38px; }
|
.parallax-logo img { height: 40px; }
|
||||||
.parallax-skip { padding: 7px 14px; font-size: 0.78rem; }
|
.lang-switcher button { padding: 5px 10px; font-size: 0.74rem; }
|
||||||
.lang-switcher button { padding: 4px 8px; font-size: 0.72rem; }
|
|
||||||
.parallax-header-right { gap: 10px; }
|
|
||||||
|
|
||||||
.plane-loading,
|
.center-card {
|
||||||
.plane-takeoff { width: 100vw; }
|
width: calc(100vw - 28px);
|
||||||
|
padding: 36px 28px 32px;
|
||||||
|
border-radius: 22px;
|
||||||
|
}
|
||||||
|
.card-pretitle { letter-spacing: 5px; font-size: 0.72rem; }
|
||||||
|
.card-subtitle { font-size: 0.92rem; margin-bottom: 28px; }
|
||||||
|
.cta-btn { padding: 14px 30px; font-size: 0.95rem; }
|
||||||
|
|
||||||
.ramp,
|
.card-meta { gap: 10px; font-size: 0.76rem; }
|
||||||
.box,
|
.meta-sep { display: none; }
|
||||||
.ground-boxes { display: none; }
|
|
||||||
|
|
||||||
.scroll-indicator span { font-size: 0.7rem; }
|
|
||||||
.cta-meta { gap: 18px; font-size: 0.78rem; }
|
|
||||||
.parallax-cta-btn { padding: 14px 28px; font-size: 0.95rem; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
.box,
|
.particle, .cta-btn::after { animation: none; }
|
||||||
.scroll-mouse span,
|
.layer-earth, .layer-clouds, .layer-particles, .center-card { transition: none; }
|
||||||
.night-stars { animation: none; }
|
|
||||||
html { scroll-behavior: auto; }
|
|
||||||
}
|
}
|
||||||
|
|||||||
256
index.html
256
index.html
@ -14,203 +14,83 @@
|
|||||||
</head>
|
</head>
|
||||||
<body class="parallax-body">
|
<body class="parallax-body">
|
||||||
|
|
||||||
<!-- Header minimal : logo + skip + lang -->
|
<!-- Header minimal -->
|
||||||
<header class="parallax-header">
|
<header class="parallax-header">
|
||||||
<a href="accueil.html" class="parallax-logo" aria-label="MVA Global Fret">
|
<div class="parallax-logo" aria-label="MVA Global Fret">
|
||||||
<img src="PNG MVA GLOBAL FRET.png" alt="MVA Global Fret">
|
<img src="PNG MVA GLOBAL FRET.png" alt="MVA Global Fret">
|
||||||
<span>MVA Global Fret</span>
|
<span>MVA Global Fret</span>
|
||||||
</a>
|
</div>
|
||||||
<div class="parallax-header-right">
|
<div class="lang-switcher" role="group" aria-label="Choisir la langue">
|
||||||
<div class="lang-switcher" role="group" aria-label="Choisir la langue">
|
<button data-lang="fr" class="active">FR</button>
|
||||||
<button data-lang="fr" class="active">FR</button>
|
<button data-lang="en">EN</button>
|
||||||
<button data-lang="en">EN</button>
|
<button data-lang="mg">MG</button>
|
||||||
<button data-lang="mg">MG</button>
|
|
||||||
</div>
|
|
||||||
<a href="accueil.html" class="parallax-skip" data-i18n="intro.skip">Passer <i class="fa-solid fa-arrow-right"></i></a>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<!-- ÉTAGE 1 — Tarmac : avion qui se charge -->
|
<!-- Stage parallaxe : tout est sur une seule page, contrôlé par la souris -->
|
||||||
<section class="parallax-scene scene-tarmac" data-scene="1">
|
<main class="stage">
|
||||||
<!-- Ciel coucher de soleil -->
|
|
||||||
<div class="layer sky"></div>
|
|
||||||
<div class="layer sun"></div>
|
|
||||||
<div class="layer stars"></div>
|
|
||||||
<!-- Montagnes lointaines -->
|
|
||||||
<div class="layer mountains"></div>
|
|
||||||
<!-- Hangar arrière-plan -->
|
|
||||||
<div class="layer hangar"></div>
|
|
||||||
<!-- Tarmac -->
|
|
||||||
<div class="layer tarmac"></div>
|
|
||||||
|
|
||||||
<!-- Avion immobile au sol -->
|
<!-- Couche 1 : Terre vue depuis l'espace (la plus loin, parallaxe la plus lente) -->
|
||||||
<div class="plane-stage plane-loading">
|
<div class="layer layer-earth"></div>
|
||||||
<svg class="plane" viewBox="0 0 600 180" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
||||||
<!-- Aile arrière -->
|
|
||||||
<path d="M 220 100 L 320 110 L 360 130 L 240 130 Z" fill="#d8d8e3" stroke="#1a1a3e" stroke-width="1.5"/>
|
|
||||||
<!-- Fuselage -->
|
|
||||||
<path d="M 60 100 Q 60 70 110 65 L 480 65 Q 540 65 555 85 Q 555 105 530 110 L 110 110 Q 60 110 60 100 Z" fill="#fafafa" stroke="#1a1a3e" stroke-width="1.5"/>
|
|
||||||
<!-- Bande dorée -->
|
|
||||||
<rect x="110" y="76" width="380" height="3" fill="#c5a55a"/>
|
|
||||||
<!-- Cockpit -->
|
|
||||||
<path d="M 75 88 Q 80 76 95 74 L 105 74 L 105 92 L 80 92 Z" fill="#1a1a3e"/>
|
|
||||||
<!-- Hublots -->
|
|
||||||
<g fill="#1a1a3e">
|
|
||||||
<circle cx="135" cy="88" r="3"/>
|
|
||||||
<circle cx="160" cy="88" r="3"/>
|
|
||||||
<circle cx="185" cy="88" r="3"/>
|
|
||||||
<circle cx="210" cy="88" r="3"/>
|
|
||||||
<circle cx="235" cy="88" r="3"/>
|
|
||||||
<circle cx="260" cy="88" r="3"/>
|
|
||||||
<circle cx="285" cy="88" r="3"/>
|
|
||||||
<circle cx="310" cy="88" r="3"/>
|
|
||||||
<circle cx="335" cy="88" r="3"/>
|
|
||||||
<circle cx="360" cy="88" r="3"/>
|
|
||||||
<circle cx="385" cy="88" r="3"/>
|
|
||||||
<circle cx="410" cy="88" r="3"/>
|
|
||||||
<circle cx="435" cy="88" r="3"/>
|
|
||||||
<circle cx="460" cy="88" r="3"/>
|
|
||||||
</g>
|
|
||||||
<!-- Porte cargo -->
|
|
||||||
<rect x="120" y="78" width="22" height="22" fill="none" stroke="#1a1a3e" stroke-width="1"/>
|
|
||||||
<!-- Aile principale + moteur -->
|
|
||||||
<path d="M 180 100 L 380 145 L 430 145 L 280 100 Z" fill="#e8e8ef" stroke="#1a1a3e" stroke-width="1.5"/>
|
|
||||||
<ellipse cx="320" cy="145" rx="22" ry="9" fill="#1a1a3e"/>
|
|
||||||
<ellipse cx="320" cy="145" rx="14" ry="5" fill="#3a3a5e"/>
|
|
||||||
<!-- Empennage vertical -->
|
|
||||||
<path d="M 480 65 L 510 25 L 540 25 L 555 65 Z" fill="#c5a55a" stroke="#1a1a3e" stroke-width="1.5"/>
|
|
||||||
<text x="510" y="50" font-family="Poppins, sans-serif" font-size="10" font-weight="700" fill="#1a1a3e">MVA</text>
|
|
||||||
<!-- Stabilisateur horizontal -->
|
|
||||||
<path d="M 510 70 L 580 50 L 580 65 L 530 80 Z" fill="#fafafa" stroke="#1a1a3e" stroke-width="1.5"/>
|
|
||||||
<!-- Train d'atterrissage -->
|
|
||||||
<line x1="220" y1="110" x2="220" y2="135" stroke="#1a1a3e" stroke-width="2"/>
|
|
||||||
<circle cx="220" cy="140" r="6" fill="#1a1a3e"/>
|
|
||||||
<line x1="450" y1="110" x2="450" y2="135" stroke="#1a1a3e" stroke-width="2"/>
|
|
||||||
<circle cx="450" cy="140" r="6" fill="#1a1a3e"/>
|
|
||||||
</svg>
|
|
||||||
|
|
||||||
<!-- Rampe de chargement -->
|
<!-- Couche 2 : voile bleu pour assombrir + assurer la lisibilité -->
|
||||||
<div class="ramp"></div>
|
<div class="layer layer-tint"></div>
|
||||||
|
|
||||||
<!-- Boîtes qui se chargent -->
|
<!-- Couche 3 : nuages aériens au coucher de soleil (blend mode pour fusionner) -->
|
||||||
<div class="box box-1">📦</div>
|
<div class="layer layer-clouds"></div>
|
||||||
<div class="box box-2">📦</div>
|
|
||||||
<div class="box box-3">📦</div>
|
|
||||||
|
|
||||||
<!-- Pile de boîtes au sol -->
|
<!-- Couche 4 : halo doré central -->
|
||||||
<div class="ground-boxes">
|
<div class="layer layer-glow"></div>
|
||||||
<div class="ground-box gb-1"></div>
|
|
||||||
<div class="ground-box gb-2"></div>
|
<!-- Couche 5 : particules dorées flottantes (la plus rapide) -->
|
||||||
<div class="ground-box gb-3"></div>
|
<div class="layer layer-particles">
|
||||||
</div>
|
<span class="particle p1"></span>
|
||||||
|
<span class="particle p2"></span>
|
||||||
|
<span class="particle p3"></span>
|
||||||
|
<span class="particle p4"></span>
|
||||||
|
<span class="particle p5"></span>
|
||||||
|
<span class="particle p6"></span>
|
||||||
|
<span class="particle p7"></span>
|
||||||
|
<span class="particle p8"></span>
|
||||||
|
<span class="particle p9"></span>
|
||||||
|
<span class="particle p10"></span>
|
||||||
|
<span class="particle p11"></span>
|
||||||
|
<span class="particle p12"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Texte hero -->
|
<!-- Carte centrale : CTA -->
|
||||||
<div class="scene-text scene-text--hero">
|
<div class="center-card">
|
||||||
<div class="hero-pretitle" data-i18n="intro.pretitle">Bienvenue chez</div>
|
<div class="card-pretitle" data-i18n="intro.pretitle">Bienvenue chez</div>
|
||||||
<h1 class="hero-title">MVA Global Fret</h1>
|
<h1 class="card-title">MVA Global Fret</h1>
|
||||||
<div class="hero-line"></div>
|
<div class="card-line"></div>
|
||||||
<p class="hero-subtitle" data-i18n="intro.subtitle">Le pont aérien entre Paris et Madagascar</p>
|
<p class="card-subtitle" data-i18n="intro.subtitle">Le pont aérien entre Paris et Madagascar</p>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Indicateur de scroll -->
|
<a href="accueil.html" class="cta-btn">
|
||||||
<div class="scroll-indicator">
|
<span class="cta-btn-shine"></span>
|
||||||
<span data-i18n="intro.scrollHint">Faites défiler pour le voyage</span>
|
|
||||||
<div class="scroll-mouse"><span></span></div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- ÉTAGE 2 — Décollage -->
|
|
||||||
<section class="parallax-scene scene-takeoff" data-scene="2">
|
|
||||||
<div class="layer sky-2"></div>
|
|
||||||
<div class="layer clouds-far"></div>
|
|
||||||
<div class="layer clouds-mid"></div>
|
|
||||||
<div class="layer mountains-2"></div>
|
|
||||||
|
|
||||||
<!-- Avion qui décolle -->
|
|
||||||
<div class="plane-stage plane-takeoff">
|
|
||||||
<svg class="plane" viewBox="0 0 600 180" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
||||||
<path d="M 220 100 L 320 110 L 360 130 L 240 130 Z" fill="#d8d8e3" stroke="#1a1a3e" stroke-width="1.5"/>
|
|
||||||
<path d="M 60 100 Q 60 70 110 65 L 480 65 Q 540 65 555 85 Q 555 105 530 110 L 110 110 Q 60 110 60 100 Z" fill="#fafafa" stroke="#1a1a3e" stroke-width="1.5"/>
|
|
||||||
<rect x="110" y="76" width="380" height="3" fill="#c5a55a"/>
|
|
||||||
<path d="M 75 88 Q 80 76 95 74 L 105 74 L 105 92 L 80 92 Z" fill="#1a1a3e"/>
|
|
||||||
<g fill="#1a1a3e">
|
|
||||||
<circle cx="135" cy="88" r="3"/><circle cx="160" cy="88" r="3"/><circle cx="185" cy="88" r="3"/>
|
|
||||||
<circle cx="210" cy="88" r="3"/><circle cx="235" cy="88" r="3"/><circle cx="260" cy="88" r="3"/>
|
|
||||||
<circle cx="285" cy="88" r="3"/><circle cx="310" cy="88" r="3"/><circle cx="335" cy="88" r="3"/>
|
|
||||||
<circle cx="360" cy="88" r="3"/><circle cx="385" cy="88" r="3"/><circle cx="410" cy="88" r="3"/>
|
|
||||||
<circle cx="435" cy="88" r="3"/><circle cx="460" cy="88" r="3"/>
|
|
||||||
</g>
|
|
||||||
<path d="M 180 100 L 380 145 L 430 145 L 280 100 Z" fill="#e8e8ef" stroke="#1a1a3e" stroke-width="1.5"/>
|
|
||||||
<ellipse cx="320" cy="145" rx="22" ry="9" fill="#1a1a3e"/>
|
|
||||||
<ellipse cx="320" cy="145" rx="14" ry="5" fill="#3a3a5e"/>
|
|
||||||
<path d="M 480 65 L 510 25 L 540 25 L 555 65 Z" fill="#c5a55a" stroke="#1a1a3e" stroke-width="1.5"/>
|
|
||||||
<text x="510" y="50" font-family="Poppins, sans-serif" font-size="10" font-weight="700" fill="#1a1a3e">MVA</text>
|
|
||||||
<path d="M 510 70 L 580 50 L 580 65 L 530 80 Z" fill="#fafafa" stroke="#1a1a3e" stroke-width="1.5"/>
|
|
||||||
</svg>
|
|
||||||
<!-- Traînée de condensation -->
|
|
||||||
<div class="contrail"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Texte étape 2 -->
|
|
||||||
<div class="scene-text scene-text--takeoff">
|
|
||||||
<div class="step-marker">02</div>
|
|
||||||
<h2 data-i18n="intro.step2Title">Décollage</h2>
|
|
||||||
<p data-i18n="intro.step2Desc">Cap sur l'océan Indien, direction Madagascar</p>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- ÉTAGE 3 — Arrivée -->
|
|
||||||
<section class="parallax-scene scene-arrival" data-scene="3">
|
|
||||||
<div class="layer night-sky"></div>
|
|
||||||
<div class="layer night-stars"></div>
|
|
||||||
<div class="layer moon"></div>
|
|
||||||
<div class="layer madagascar-silhouette"></div>
|
|
||||||
|
|
||||||
<!-- Petit avion en approche -->
|
|
||||||
<div class="plane-stage plane-arrival">
|
|
||||||
<svg class="plane plane-small" viewBox="0 0 600 180" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
||||||
<path d="M 220 100 L 320 110 L 360 130 L 240 130 Z" fill="#d8d8e3" stroke="#1a1a3e" stroke-width="1.5"/>
|
|
||||||
<path d="M 60 100 Q 60 70 110 65 L 480 65 Q 540 65 555 85 Q 555 105 530 110 L 110 110 Q 60 110 60 100 Z" fill="#fafafa" stroke="#1a1a3e" stroke-width="1.5"/>
|
|
||||||
<rect x="110" y="76" width="380" height="3" fill="#c5a55a"/>
|
|
||||||
<path d="M 75 88 Q 80 76 95 74 L 105 74 L 105 92 L 80 92 Z" fill="#1a1a3e"/>
|
|
||||||
<path d="M 180 100 L 380 145 L 430 145 L 280 100 Z" fill="#e8e8ef" stroke="#1a1a3e" stroke-width="1.5"/>
|
|
||||||
<ellipse cx="320" cy="145" rx="22" ry="9" fill="#1a1a3e"/>
|
|
||||||
<path d="M 480 65 L 510 25 L 540 25 L 555 65 Z" fill="#c5a55a" stroke="#1a1a3e" stroke-width="1.5"/>
|
|
||||||
<text x="510" y="50" font-family="Poppins, sans-serif" font-size="10" font-weight="700" fill="#1a1a3e">MVA</text>
|
|
||||||
<path d="M 510 70 L 580 50 L 580 65 L 530 80 Z" fill="#fafafa" stroke="#1a1a3e" stroke-width="1.5"/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Bloc CTA final -->
|
|
||||||
<div class="parallax-cta-block">
|
|
||||||
<div class="cta-pretitle" data-i18n="intro.ctaPretitle">Antananarivo</div>
|
|
||||||
<h2 class="cta-title" data-i18n="intro.ctaTitle">Bienvenue à bord</h2>
|
|
||||||
<div class="hero-line"></div>
|
|
||||||
<p class="cta-subtitle" data-i18n="intro.ctaSubtitle">Découvrez nos services, nos tarifs et inscrivez-vous en quelques clics.</p>
|
|
||||||
<a href="accueil.html" class="parallax-cta-btn">
|
|
||||||
<span data-i18n="intro.ctaBtn">Accéder au site</span>
|
<span data-i18n="intro.ctaBtn">Accéder au site</span>
|
||||||
<i class="fa-solid fa-arrow-right"></i>
|
<i class="fa-solid fa-arrow-right"></i>
|
||||||
</a>
|
</a>
|
||||||
<div class="cta-meta">
|
|
||||||
|
<div class="card-meta">
|
||||||
<span><i class="fa-solid fa-plane"></i> <span data-i18n="intro.metaShipments">2 envois / semaine</span></span>
|
<span><i class="fa-solid fa-plane"></i> <span data-i18n="intro.metaShipments">2 envois / semaine</span></span>
|
||||||
|
<span class="meta-sep">·</span>
|
||||||
<span><i class="fa-solid fa-clock"></i> <span data-i18n="intro.metaDelay">2 semaines depuis Paris</span></span>
|
<span><i class="fa-solid fa-clock"></i> <span data-i18n="intro.metaDelay">2 semaines depuis Paris</span></span>
|
||||||
|
<span class="meta-sep">·</span>
|
||||||
<span><i class="fa-solid fa-tag"></i> <span data-i18n="intro.metaPrice">70 000 Ar / kg</span></span>
|
<span><i class="fa-solid fa-tag"></i> <span data-i18n="intro.metaPrice">70 000 Ar / kg</span></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
|
</main>
|
||||||
|
|
||||||
<script src="js/translations.js"></script>
|
<script src="js/translations.js"></script>
|
||||||
<script>
|
<script>
|
||||||
// ── i18n minimal pour la page parallaxe ──────────────────────────────────
|
// ── i18n minimal ─────────────────────────────────────────────────────────
|
||||||
(function () {
|
(function () {
|
||||||
const lang = localStorage.getItem('mva-lang') || 'fr';
|
const lang = localStorage.getItem('mva-lang') || 'fr';
|
||||||
applyLang(lang);
|
applyLang(lang);
|
||||||
|
|
||||||
document.querySelectorAll('.lang-switcher button').forEach(btn => {
|
document.querySelectorAll('.lang-switcher button').forEach(btn => {
|
||||||
btn.addEventListener('click', () => applyLang(btn.dataset.lang));
|
btn.addEventListener('click', () => applyLang(btn.dataset.lang));
|
||||||
});
|
});
|
||||||
|
|
||||||
function applyLang(l) {
|
function applyLang(l) {
|
||||||
document.documentElement.lang = l;
|
document.documentElement.lang = l;
|
||||||
localStorage.setItem('mva-lang', l);
|
localStorage.setItem('mva-lang', l);
|
||||||
@ -228,37 +108,31 @@
|
|||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// ── Parallaxe scroll-driven ──────────────────────────────────────────────
|
// ── Mouse parallaxe avec easing fluide ───────────────────────────────────
|
||||||
(function () {
|
(function () {
|
||||||
const root = document.documentElement;
|
const root = document.documentElement;
|
||||||
let ticking = false;
|
let targetX = 0, targetY = 0, currentX = 0, currentY = 0;
|
||||||
|
const ease = 0.07;
|
||||||
|
|
||||||
function update() {
|
function loop() {
|
||||||
const max = document.body.scrollHeight - window.innerHeight;
|
currentX += (targetX - currentX) * ease;
|
||||||
const progress = max > 0 ? Math.min(1, Math.max(0, window.scrollY / max)) : 0;
|
currentY += (targetY - currentY) * ease;
|
||||||
root.style.setProperty('--scroll', progress.toFixed(4));
|
root.style.setProperty('--mx', currentX.toFixed(4));
|
||||||
ticking = false;
|
root.style.setProperty('--my', currentY.toFixed(4));
|
||||||
|
requestAnimationFrame(loop);
|
||||||
}
|
}
|
||||||
|
loop();
|
||||||
|
|
||||||
window.addEventListener('scroll', () => {
|
window.addEventListener('mousemove', (e) => {
|
||||||
if (!ticking) {
|
targetX = (e.clientX / window.innerWidth - 0.5) * 2;
|
||||||
window.requestAnimationFrame(update);
|
targetY = (e.clientY / window.innerHeight - 0.5) * 2;
|
||||||
ticking = true;
|
|
||||||
}
|
|
||||||
}, { passive: true });
|
}, { passive: true });
|
||||||
|
|
||||||
update();
|
// Mobile : effet basé sur l'orientation de l'appareil
|
||||||
})();
|
window.addEventListener('deviceorientation', (e) => {
|
||||||
|
if (e.gamma == null || e.beta == null) return;
|
||||||
// ── Mouse parallaxe (depth effect) ───────────────────────────────────────
|
targetX = Math.max(-1, Math.min(1, e.gamma / 30));
|
||||||
(function () {
|
targetY = Math.max(-1, Math.min(1, (e.beta - 45) / 30));
|
||||||
if (window.matchMedia('(hover: none)').matches) return;
|
|
||||||
const root = document.documentElement;
|
|
||||||
window.addEventListener('mousemove', (e) => {
|
|
||||||
const x = (e.clientX / window.innerWidth - 0.5) * 2;
|
|
||||||
const y = (e.clientY / window.innerHeight - 0.5) * 2;
|
|
||||||
root.style.setProperty('--mx', x.toFixed(3));
|
|
||||||
root.style.setProperty('--my', y.toFixed(3));
|
|
||||||
}, { passive: true });
|
}, { passive: true });
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user