/* ============================================================
   PREMIUM LAYER — video hero, film, gallery, reel, motion.
   Loaded after style.css; reuses its tokens (--primary, --gold…).
   Motion moves are ported from Motion Prompt (MIT License (c) 2026
   Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/);
   each block names the element it comes from.
   ============================================================ */
:root {
    --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --ink: #1A2140;
    --gold-2: #E9A23B;
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);      /* cubic ease-out */
    --ease-out5: cubic-bezier(0.22, 1, 0.36, 1);     /* quintic ease-out */
    --ease-io: cubic-bezier(0.65, 0, 0.35, 1);       /* cubic ease-in-out */
}
body { font-feature-settings: 'cv11', 'ss01'; }
.section-title, .hero-title { letter-spacing: -0.025em; }

/* ---------- Motion Prompt #079 · Scroll progress bar ----------
   Fill width = scroll fraction of the page; light track, gold fill. */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 1100; background: rgba(43,57,144,0.10); pointer-events: none; }
.scroll-progress span { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--gold), var(--gold-2)); }

/* ---------- Navbar: film button ---------- */
.nav-film { background: none; border: none; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nav-film i { color: var(--gold); }

/* ============================================================
   HERO VIDEO
   ============================================================ */
.hero-video-wrap { background-image: url('../video/hero-desktop.jpg'); }
@media (max-aspect-ratio: 4/5) { .hero-video-wrap { background-image: url('../video/hero-mobile.jpg'); } }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-video-wrap::before {
    background: linear-gradient(100deg, rgba(10,14,35,0.88) 0%, rgba(10,14,35,0.62) 45%, rgba(10,14,35,0.25) 100%),
                linear-gradient(to bottom, rgba(10,14,35,0.35) 0%, transparent 30%, rgba(10,14,35,0.85) 100%);
}
.hero-video-wrap .hero-content { max-width: 1160px; }
.hero-title-mr { display: flex; flex-direction: column; margin-bottom: 0; }
.hero-title-mr em { font-style: normal; color: var(--gold-2); -webkit-text-stroke: 0; }
.hero-sub { color: rgba(255,255,255,0.78); max-width: 560px; margin-top: 26px; }
.hero-phone { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.05rem; padding: 10px 6px; letter-spacing: 0.02em; }
.hero-phone i { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.12); color: var(--gold-2); font-size: 0.9rem; }
.hero-phone:hover i { background: var(--gold); color: #fff; }
.metric-value { display: flex; align-items: baseline; gap: 2px; margin-bottom: 6px; }
.metric-value .metric-num { margin: 0; display: inline; }
.metric-plus { color: var(--gold-2); font-size: 1.7rem; font-weight: 800; line-height: 1; }
.hero-scroll { position: absolute; left: 50%; bottom: 34px; z-index: 3; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(255,255,255,0.45); border-radius: 14px; }
.hero-scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: scrollCue 1.8s var(--ease-io) infinite; }
@keyframes scrollCue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
.hero-video-wrap::after { height: 120px; }

/* ---------- Motion Prompt #005 · Mask reveal (hero title) ----------
   Each line rises into place from behind an invisible edge (clip) with a
   quintic ease-out over 0.65 s; the gold divider grows from 0.1 s to 0.5 s
   with a cubic ease-in-out. Text is only hidden by the clip, never faded. */
.mr-line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.mr-line > span { display: block; }
.hero-rule { width: 190px; height: 5px; border-radius: 3px; background: var(--gold); margin-top: 26px; transform-origin: left; }
.js .mr-line > span, .js .hero-eyebrow.mr-line { animation: mrUp 0.65s var(--ease-out5) both; animation-delay: calc(var(--d, 0s) + 0.35s); }
.js .hero-eyebrow.mr-line { animation-name: mrFadeUp; }
.js .hero-rule { animation: mrRule 0.4s var(--ease-io) 0.95s both; }
.js .mr-fade { animation: mrFadeUp 0.7s var(--ease-out) both; animation-delay: var(--d, 0s); }
@keyframes mrUp { from { transform: translateY(110%); } to { transform: translateY(0); } }
@keyframes mrRule { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes mrFadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* ---------- Motion Prompt #094 · Marquee ----------
   Navy band, heavy white words, gold dots in the gaps; the set moves left by
   its own width every 4.8 s and wraps seamlessly (JS sets the duration). */
.marquee { background: var(--ink); overflow: hidden; height: 58px; display: flex; align-items: center; position: relative; z-index: 3; }
.marquee-track { display: flex; width: max-content; animation: marquee var(--marquee-dur, 30s) linear infinite; }
.marquee-set { display: flex; align-items: center; flex-shrink: 0; }
.marquee-set span { color: #fff; font-size: 1.15rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.marquee-set i { width: 12px; height: 12px; border-radius: 50%; background: var(--gold); margin: 0 26px; flex-shrink: 0; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(var(--marquee-shift, -50%)); } }

/* ---------- Motion Prompt #074 · Fade-in on scroll ----------
   When an element's top passes 85% of the viewport height it fades in and
   rises from 28 px below over 0.7 s (cubic ease-out); it resets when it
   leaves through the bottom of the view. Hidden only when JS is running. */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Motion Prompt #080 · Highlighter animation ----------
   A gold stroke is drawn left to right behind the key words, in the lower
   part of the text, over 0.8 s (cubic ease-out) once the line passes 80%. */
.hl { background-image: linear-gradient(rgba(233,162,59,0.42), rgba(233,162,59,0.42)); background-repeat: no-repeat; background-position: 0 88%; background-size: 100% 0.36em; padding: 0 0.06em; }
.js .hl { background-size: 0% 0.36em; transition: background-size 0.8s var(--ease-out); }
.js .hl.is-in { background-size: 100% 0.36em; }
.film-section .hl, .reel-section .hl { background-image: linear-gradient(rgba(201,120,0,0.55), rgba(201,120,0,0.55)); }

/* ---------- Motion Prompt #081 · Hover lift ----------
   The card under the cursor rises 10 px over 0.3 s (cubic ease-out) while its
   shadow spreads from 6 px blur / 2 px offset to 22 px / 12 px. */
.service-card-v2, .how-card, .testi-card, .value-card {
    transition: opacity 0.6s ease, transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out) !important;
    box-shadow: 0 2px 6px rgba(26,33,64,0.08);
}
.service-card-v2:hover, .how-card:hover, .testi-card:hover, .value-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 12px 22px rgba(26,33,64,0.22);
}

/* ============================================================
   FILM SECTION
   ============================================================ */
.film-section { background: radial-gradient(1200px 600px at 85% 20%, rgba(61,78,171,0.55), transparent 60%), var(--ink); color: #fff; padding: 110px 0; overflow: hidden; }
.film-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: center; }
.section-label-light { color: var(--gold-2); }
.section-label-light::after { background: linear-gradient(to right, rgba(233,162,59,0.6), transparent); }
.film-section .section-title, .reel-section .section-title { color: #fff; }
.film-lead { color: rgba(255,255,255,0.72); font-size: 1.05rem; line-height: 1.7; margin: 8px 0 30px; max-width: 460px; }
.film-chapters { list-style: none; display: grid; gap: 8px; counter-reset: none; }
.film-chapters button { width: 100%; display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: var(--r); background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.10); color: #fff; font: 600 1rem var(--font); text-align: left; cursor: pointer; transition: background 0.25s var(--ease-out), border-color 0.25s, transform 0.25s var(--ease-out); }
.film-chapters button span { color: var(--gold-2); font-weight: 800; font-size: 0.82rem; letter-spacing: 2px; min-width: 24px; }
.film-chapters button::after { content: '\f04b'; font-family: 'Font Awesome 5 Free'; font-weight: 900; margin-left: auto; font-size: 0.7rem; color: rgba(255,255,255,0.45); }
.film-chapters button:hover { background: rgba(201,120,0,0.16); border-color: rgba(233,162,59,0.55); transform: translateX(6px); }
.film-poster { position: relative; display: block; width: 100%; aspect-ratio: 16/9; border-radius: var(--r-xl); overflow: hidden; border: 1px solid rgba(255,255,255,0.14); box-shadow: 0 40px 80px rgba(0,0,0,0.45); cursor: pointer; padding: 0; background: #000; }
.film-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
.film-poster:hover img { transform: scale(1.05); }
.film-play { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; font-size: 1.6rem; box-shadow: 0 0 0 0 rgba(201,120,0,0.6); animation: pulse 2.2s var(--ease-out) infinite; }
.film-play i { margin-left: 5px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(201,120,0,0.55); } 70% { box-shadow: 0 0 0 26px rgba(201,120,0,0); } 100% { box-shadow: 0 0 0 0 rgba(201,120,0,0); } }
.film-duration { position: absolute; right: 16px; bottom: 14px; background: rgba(10,14,35,0.75); color: #fff; font-size: 0.82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; }

/* film player */
.film-modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 20px; }
.film-modal[hidden] { display: none; }
.film-modal-backdrop { position: absolute; inset: 0; background: rgba(5,7,18,0.88); backdrop-filter: blur(6px); }
.film-modal-box { position: relative; width: min(1100px, 100%); aspect-ratio: 16/9; border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 30px 90px rgba(0,0,0,0.6); background: #000; }
.film-modal-box video { width: 100%; height: 100%; display: block; background: #000; }
.film-modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: none; background: rgba(255,255,255,0.14); color: #fff; font-size: 1.1rem; cursor: pointer; }
.film-modal-close:hover { background: var(--gold); }

/* ============================================================
   GALLERY "SUR LE TERRAIN"
   ============================================================ */
.gallery-section { background: var(--bg); }
.gallery-grid { margin-top: 44px; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; grid-auto-flow: dense; gap: 14px; }
.g-item { position: relative; border: none; padding: 0; border-radius: var(--r-lg); overflow: hidden; cursor: zoom-in; background: var(--bg-elevated); }
.g-wide { grid-column: span 2; }
.g-tall { grid-row: span 2; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); } /* Motion Prompt #082 · Image zoom on hover: 1 → 1.15 over 0.5 s, frame clips */
.g-item:hover img, .g-item:focus-visible img { transform: scale(1.15); }
.g-item::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,14,35,0.75), transparent 45%); }
.g-item span { position: absolute; left: 16px; bottom: 14px; z-index: 1; color: #fff; font-weight: 700; font-size: 0.92rem; letter-spacing: 0.02em; display: inline-flex; align-items: center; gap: 8px; }
.g-item span::before { content: ''; width: 18px; height: 3px; border-radius: 2px; background: var(--gold-2); }

.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(5,7,18,0.94); display: flex; align-items: center; justify-content: center; gap: 12px; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: min(1200px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-height: calc(100vh - 120px); width: auto; border-radius: var(--r); }
.lightbox figcaption { color: rgba(255,255,255,0.85); margin-top: 14px; font-weight: 600; }
.lightbox-close, .lightbox-nav { border: none; background: rgba(255,255,255,0.12); color: #fff; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; flex-shrink: 0; }
.lightbox-close { position: absolute; top: 18px; right: 18px; }
.lightbox-close:hover, .lightbox-nav:hover { background: var(--gold); }

/* ============================================================
   REEL / SUIVEZ NOS CHANTIERS
   ============================================================ */
.reel-section { background: linear-gradient(135deg, var(--ink), var(--primary)); color: #fff; padding: 110px 0; overflow: hidden; }
.reel-layout { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 64px; align-items: center; }
.reel-copy p { color: rgba(255,255,255,0.75); font-size: 1.05rem; line-height: 1.7; max-width: 480px; margin: 10px 0 32px; }
.reel-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.phone { position: relative; justify-self: center; width: 300px; aspect-ratio: 9/19.5; border-radius: 44px; padding: 12px; background: #0b0e1c; box-shadow: 0 0 0 2px rgba(255,255,255,0.12), 0 40px 80px rgba(0,0,0,0.5); }
.phone video { width: 100%; height: 100%; object-fit: cover; border-radius: 34px; display: block; background: #000; }
.phone-notch { position: absolute; top: 20px; left: 50%; width: 92px; height: 24px; margin-left: -46px; border-radius: 14px; background: #0b0e1c; z-index: 2; }
.reel-sound { position: absolute; right: 26px; bottom: 26px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: none; background: rgba(10,14,35,0.7); color: #fff; cursor: pointer; }
.reel-sound:hover { background: var(--gold); }

/* ============================================================
   LE MOT DU DIRECTEUR
   ============================================================ */
.director-section { background: linear-gradient(180deg, var(--bg-elevated), var(--bg)); overflow: hidden; }
.director-layout { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 80px; align-items: center; }
.director-photo { position: relative; margin: 0 0 0 24px; }
.director-photo::before { content: ''; position: absolute; inset: 28px -24px -24px 28px; border: 2px solid var(--gold); border-radius: var(--r-xl); z-index: 0; }
.director-photo img { position: relative; z-index: 1; width: 100%; height: auto; aspect-ratio: 3/4; object-fit: cover; object-position: 50% 20%; border-radius: var(--r-xl); box-shadow: 0 30px 60px rgba(26,33,64,0.22); }
.director-plate { position: absolute; z-index: 2; left: -24px; bottom: 36px; background: var(--ink); color: #fff; padding: 16px 22px; border-radius: var(--r); box-shadow: 0 14px 30px rgba(26,33,64,0.3); display: flex; flex-direction: column; gap: 2px; border-left: 4px solid var(--gold); }
.director-plate strong { font-size: 1.05rem; }
.director-plate span { font-size: 0.82rem; color: var(--gold-2); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.director-quote { position: relative; margin: 6px 0 26px; padding-top: 34px; }
.director-quote::before { content: '\201C'; position: absolute; top: -30px; left: -6px; font-size: 7rem; line-height: 1; font-weight: 900; color: var(--gold); opacity: 0.25; }
.director-lead { font-size: clamp(1.45rem, 2.4vw, 2rem); font-weight: 800; line-height: 1.3; color: var(--text); letter-spacing: -0.015em; }
.director-text p { color: var(--muted); font-size: 1.02rem; line-height: 1.75; margin-bottom: 14px; }
.director-sign { display: flex; align-items: center; gap: 16px; margin: 26px 0 30px; }
.director-sign-line { width: 48px; height: 3px; border-radius: 2px; background: var(--gold); flex-shrink: 0; }
.director-sign strong { display: block; font-size: 1.05rem; color: var(--text); }
.director-sign span { font-size: 0.9rem; color: var(--muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .film-layout, .reel-layout { grid-template-columns: 1fr; gap: 44px; }
    .director-layout { grid-template-columns: 1fr; gap: 56px; }
    .director-photo { max-width: 420px; margin: 0 auto; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
}
@media (max-width: 768px) {
    .hero-video-wrap .hero-content { padding: 128px 20px 110px; }
    .hero-cta-row { gap: 10px; }
    .hero-cta-row .btn-xl { padding: 15px 26px; font-size: 1rem; }
    .hero-video-wrap .hero-metrics { display: flex; flex-wrap: wrap; row-gap: 22px; margin-top: 8px; }
    .hero-phone { justify-content: center; width: 100%; }
    .metric { flex: 1 1 40%; }
    .metric:nth-child(2) { border-right: none; margin-right: 0; padding-right: 0; }
    .film-section, .reel-section { padding: 80px 0; }
    .film-play { width: 72px; height: 72px; margin: -36px 0 0 -36px; font-size: 1.3rem; }
    .gallery-grid { gap: 10px; grid-auto-rows: 150px; }
    .g-wide { grid-column: span 2; }
    .phone { width: 250px; }
    .marquee { height: 50px; }
    .marquee-set span { font-size: 1rem; }
    .lightbox-nav { position: absolute; bottom: 24px; }
    .lightbox-nav.prev { left: calc(50% - 60px); }
    .lightbox-nav.next { right: calc(50% - 60px); }
}

@media (max-width: 480px) {
    .nav-logo .logo-text { display: none; }   /* the logo already carries the name; frees room for the CTA */
    .metric-num { font-size: 2rem; }
}

/* Respect the visitor's motion preference: no autoplay, no loops, no slides */
@media (prefers-reduced-motion: reduce) {
    .js .mr-line > span, .js .hero-eyebrow.mr-line, .js .hero-rule, .js .mr-fade { animation: none; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .js .hl { background-size: 100% 0.36em; transition: none; }
    .marquee-track, .film-play, .hero-scroll span { animation: none; }
    .g-item img, .film-poster img { transition: none; }
}
