/* =========================================================
   APEX DRONE — Cinéma immersif
   Noir, blanc, vidéos plein écran. L'ambre seulement sur "Devis".
   ========================================================= */
:root {
  --black: #000;
  --ink: #0A0A0A;
  --white: #F5F5F3;
  --grey: #8C8C88;
  --line: rgba(245, 245, 243, .16);
  --amber: #F2A33A;

  --f-display: "Archivo", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --fade: 1.4s;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--black); color: var(--white);
  font: 300 16px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--white); color: var(--black); }
:focus-visible { outline: 1px solid var(--white); outline-offset: 4px; }

h1, h2, h3 { margin: 0; font-weight: 800; }
.label {
  margin: 0; font: 500 12px/1 var(--f-body); letter-spacing: .32em; text-transform: uppercase; color: var(--grey);
}

/* ---------- Ouverture ---------- */
.intro { position: fixed; inset: 0; z-index: 100; pointer-events: none; display: grid; place-items: center; }
.intro__bar { position: absolute; left: 0; right: 0; height: 50.5%; background: var(--black); }
.intro__bar--top { top: 0; animation: barTop 2.6s var(--ease) 1.5s forwards; }
.intro__bar--bottom { bottom: 0; animation: barBottom 2.6s var(--ease) 1.5s forwards; }
.intro__title {
  position: relative; margin: 0; font: 300 clamp(14px, 1.6vw, 18px)/1 var(--f-body);
  letter-spacing: .9em; padding-left: .9em; opacity: 0;
  animation: introTitle 2.2s var(--ease) .2s forwards;
}
@keyframes introTitle {
  0% { opacity: 0; letter-spacing: 1.4em; }
  45%, 70% { opacity: 1; letter-spacing: .9em; }
  100% { opacity: 0; letter-spacing: .9em; }
}
/* Les bandes s'ouvrent : on passe en format cinéma, puis plein écran */
@keyframes barTop { 0% { height: 50.5%; } 45% { height: 11%; } 70% { height: 11%; } 100% { height: 0; } }
@keyframes barBottom { 0% { height: 50.5%; } 45% { height: 11%; } 70% { height: 11%; } 100% { height: 0; } }
.intro.is-done { display: none; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: 24px var(--gutter); background: linear-gradient(rgba(0,0,0,.55), transparent);
  transition: background-color .4s, box-shadow .4s;
}
.nav--scrolled { background-color: var(--black); box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: center; gap: 14px; font: 700 15px/1 var(--f-display); font-variation-settings: "wdth" 125; letter-spacing: .28em; }
.brand span { font-weight: 300; color: var(--grey); margin-left: -.1em; }
.brand__logo { height: 26px; width: auto; }
.nav__links { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; }
.nav__links a { opacity: .75; transition: opacity .3s; }
.nav__links a:hover { opacity: 1; }
.nav__cta { opacity: 1 !important; padding: 10px 20px; border-radius: 999px; background: var(--amber); color: var(--black); font-weight: 600; }

/* ---------- Écran (vidéo + écran provisoire) ---------- */
.screen { position: absolute; inset: 0; overflow: hidden; background: var(--ink); }
.screen video, .screen__ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen video { opacity: 0; transition: opacity 1s; }
.screen.has-video video { opacity: 1; }
.screen.has-video .screen__ph { display: none; }
/* Écran provisoire : un étalonnage différent par plan, en attendant les vraies vidéos */
.screen__ph {
  background:
    radial-gradient(60% 50% at var(--x1, 30%) var(--y1, 70%), var(--c1, rgba(242,163,58,.35)), transparent 70%),
    radial-gradient(50% 60% at var(--x2, 75%) var(--y2, 25%), var(--c2, rgba(90,110,140,.45)), transparent 70%),
    linear-gradient(170deg, #121212, #050505);
  animation: drift 18s ease-in-out infinite alternate;
}
.screen[data-file]::before {
  content: attr(data-file); position: absolute; z-index: 1; left: var(--gutter); top: 96px;
  font: 400 11px/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: rgba(245,245,243,.35);
}
.screen.has-video::before { display: none; }
@keyframes drift { to { transform: scale(1.15) translate(-3%, 2%); } }
/* Léger zoom lent façon travelling */
.screen.is-playing video { animation: slowZoom 16s ease-out forwards; }
/* Zoom très léger : au-delà, l'image est agrandie et perd en netteté */
@keyframes slowZoom { from { transform: scale(1.04); } to { transform: scale(1); } }
.screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.35) 45%, transparent 70%), linear-gradient(rgba(0,0,0,.4), transparent 30%);
}

/* ---------- Plan d'ouverture ---------- */
.hero { position: relative; height: 100svh; min-height: 520px; display: grid; align-items: end; isolation: isolate; }
.hero .screen { z-index: -1; }
.hero__content { padding: 0 var(--gutter) clamp(90px, 16vh, 160px); }
.hero__title {
  font: 800 clamp(42px, 8.5vw, 132px)/.95 var(--f-display); font-variation-settings: "wdth" 100;
  letter-spacing: -.025em; opacity: 0; transform: translateY(24px);
  transition: opacity 1.6s var(--ease), transform 1.6s var(--ease);
}
.hero__sub {
  margin: 24px 0 0; font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: rgba(245,245,243,.7);
  opacity: 0; transition: opacity 1.6s var(--ease) .3s;
}
.is-revealed .hero__title { opacity: 1; transform: none; }
.is-revealed .hero__sub { opacity: 1; }
.hero__scroll {
  position: absolute; right: var(--gutter); bottom: clamp(32px, 6vh, 56px); display: flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: rgba(245,245,243,.7);
}
.hero__scroll i { width: 48px; height: 1px; background: currentColor; transform-origin: left; animation: line 2.4s var(--ease) infinite; }
@keyframes line { 0% { transform: scaleX(0); } 50% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }

/* ---------- Chapitres ---------- */
.chapters { position: relative; height: calc(var(--n, 4) * 100svh); }
.chapters__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.chapters__screens .screen { opacity: 0; transition: opacity var(--fade) ease; }
.chapters__screens .screen.is-active { opacity: 1; }
.chapter {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0 var(--gutter) clamp(80px, 14vh, 140px);
  max-width: 1100px; pointer-events: none;
}
.chapter > * { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.chapter.is-active { pointer-events: auto; }
.chapter.is-active > * { opacity: 1; transform: none; transition-duration: 1.2s; }
.chapter.is-active > :nth-child(2) { transition-delay: .25s; }
.chapter.is-active > :nth-child(3) { transition-delay: .4s; }
.chapter.is-active > :nth-child(4) { transition-delay: .55s; }
.chapter__num { margin: 0 0 18px; }
.chapter__title {
  font: 800 clamp(44px, 10vw, 160px)/.9 var(--f-display); font-variation-settings: "wdth" 100;
  letter-spacing: -.03em; text-transform: uppercase;
}
.chapter__text { margin: 22px 0 28px; max-width: 460px; font-size: clamp(16px, 1.3vw, 19px); color: rgba(245,245,243,.82); }
.link {
  display: inline-flex; align-items: center; gap: 12px; padding: 0 0 6px; border: 0; background: none; cursor: pointer;
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase; border-bottom: 1px solid var(--line);
  transition: border-color .4s, gap .4s var(--ease);
}
.link:hover { border-color: var(--white); gap: 18px; }
.chapters__index {
  position: absolute; right: var(--gutter); bottom: clamp(80px, 14vh, 140px); display: flex; align-items: center; gap: 14px;
  font-size: 12px; letter-spacing: .2em; font-variant-numeric: tabular-nums;
}
.chapters__track { position: relative; width: 90px; height: 1px; background: var(--line); }
.chapters__track i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--white); }

/* ---------- Les films ---------- */
.films { padding: clamp(100px, 16vh, 180px) 0 clamp(80px, 12vh, 140px); }
.films__head { display: flex; justify-content: space-between; align-items: center; padding: 0 var(--gutter); margin-bottom: 40px; }
.films__arrows { display: flex; gap: 10px; }
.arrow {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: none; cursor: pointer;
  transition: border-color .3s, background .3s, color .3s;
}
.arrow:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.films__rail {
  display: flex; gap: clamp(12px, 2vw, 24px); overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 var(--gutter); scroll-padding-inline: var(--gutter); scrollbar-width: none; cursor: grab;
}
.films__rail::-webkit-scrollbar { display: none; }
.films__rail.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.films__rail.is-dragging .film { pointer-events: none; }
.film {
  flex: 0 0 clamp(270px, 42vw, 640px); scroll-snap-align: start; padding: 0; border: 0; background: none;
  text-align: left; cursor: pointer;
}
.film__frame { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); }
.film__frame .screen::after { background: rgba(0,0,0,.15); transition: background .6s; }
.film__frame .screen::before { top: 18px; left: 18px; }
.film__frame img, .film__frame .screen__ph { transition: transform 1.4s var(--ease); }
.film:hover .film__frame img, .film:hover .film__frame .screen__ph { transform: scale(1.05); animation-play-state: paused; }
.film:hover .film__frame .screen::after { background: rgba(0,0,0,0); }
.film__play {
  position: absolute; left: 50%; top: 50%; z-index: 2; translate: -50% -50%; padding: 12px 20px; border-radius: 999px;
  font-size: 11px; letter-spacing: .28em; text-transform: uppercase; background: rgba(0,0,0,.35);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(245,245,243,.3);
  opacity: 0; transition: opacity .4s;
}
.film:hover .film__play, .film:focus-visible .film__play { opacity: 1; }
.film__title { display: block; margin-top: 16px; font: 600 18px/1.3 var(--f-display); font-variation-settings: "wdth" 105; }
.film__meta { display: block; margin-top: 4px; font-size: 13px; color: var(--grey); }

/* ---------- À propos ---------- */
.about { padding: clamp(100px, 18vh, 200px) var(--gutter); max-width: 1100px; margin-inline: auto; text-align: center; }
.about__text { margin: 32px auto; font: 300 clamp(22px, 3vw, 40px)/1.35 var(--f-body); letter-spacing: -.01em; }
.about__creds { margin: 0; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--grey); }
.about__creds span { margin: 0 10px; }

/* ---------- Contact ---------- */
.contact { padding: clamp(100px, 16vh, 180px) var(--gutter) clamp(80px, 12vh, 140px); border-top: 1px solid var(--line); max-width: 1300px; margin-inline: auto; }
.contact__title { font: 800 clamp(46px, 9vw, 140px)/.92 var(--f-display); font-variation-settings: "wdth" 100; letter-spacing: -.03em; }
.contact__title span { color: var(--grey); }
.contact__direct { list-style: none; padding: 0; margin: 48px 0 72px; display: flex; flex-wrap: wrap; gap: 16px 48px; font-size: 18px; }
.contact__direct a { border-bottom: 1px solid var(--line); transition: border-color .3s; }
.contact__direct a:hover { border-color: var(--white); }
.contact__direct li:last-child { color: var(--grey); }
.form { max-width: 760px; display: grid; gap: 28px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.form label { display: grid; gap: 8px; }
.form label > span { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--grey); }
.form label > span em { font-style: normal; text-transform: none; letter-spacing: .04em; opacity: .7; }
.form input, .form select, .form textarea {
  width: 100%; padding: 10px 0 12px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; color: var(--white); font: 300 18px var(--f-body); color-scheme: dark; transition: border-color .3s;
}
.form select option { background: var(--ink); }
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--white); }
.form .is-invalid { border-color: #E5484D; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn {
  justify-self: start; padding: 18px 44px; border: 0; border-radius: 999px; background: var(--amber); color: var(--black);
  font-weight: 600; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; cursor: pointer; transition: opacity .3s;
}
.btn:hover { opacity: .85; }
.form__rgpd { margin: -12px 0 0; font-size: 12px; color: var(--grey); }
.form__rgpd a { border-bottom: 1px solid var(--line); }
.form__status { margin: 0; min-height: 1.4em; font-size: 14px; }
.form__status.is-ok { color: #4CC38A; } .form__status.is-error { color: #E5484D; }

/* ---------- Footer ---------- */
.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 32px var(--gutter); border-top: 1px solid var(--line); font-size: 12px; color: var(--grey);
}
.footer p { margin: 0; }
.footer a:hover { color: var(--white); }

/* ---------- Mentions légales ---------- */
.nav--solid { background: var(--black); border-bottom: 1px solid var(--line); }
.legal { max-width: 760px; margin: 0 auto; padding: 150px var(--gutter) 100px; }
.legal h1 { margin: 18px 0 10px; font: 800 clamp(36px, 6vw, 64px)/1 var(--f-display); letter-spacing: -.02em; }
.legal__update { margin: 0 0 56px; color: var(--grey); font-size: 14px; }
.legal h2 { margin: 48px 0 14px; font: 700 20px/1.3 var(--f-display); font-variation-settings: "wdth" 105; }
.legal h3 { margin: 26px 0 10px; font: 600 16px/1.4 var(--f-body); color: var(--white); }
.legal p { margin: 0 0 14px; color: rgba(245,245,243,.82); font-size: 16px; line-height: 1.75; }
.legal strong { color: var(--white); font-weight: 500; }
.legal ul { margin: 0 0 14px; padding-left: 20px; color: rgba(245,245,243,.82); line-height: 1.75; }
.legal__table { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; margin: 0 0 18px; padding: 22px 24px; border: 1px solid var(--line); }
.legal__table dt { color: var(--grey); font-size: 13px; letter-spacing: .04em; }
.legal__table dd { margin: 0; color: var(--white); }
@media (max-width: 560px) { .legal__table { grid-template-columns: 1fr; gap: 2px; } .legal__table dd { margin-bottom: 10px; } }
.legal a { border-bottom: 1px solid var(--line); }
.legal a:hover { border-color: var(--white); }

/* ---------- Lecteur ---------- */
.player { width: min(1280px, 94vw); padding: 0; border: 0; background: transparent; color: var(--white); overflow: visible; }
.player::backdrop { background: rgba(0,0,0,.95); }
.player video { width: 100%; max-height: 82vh; background: #000; }
.player__title { margin: 16px 0 0; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--grey); }
.player__close {
  position: absolute; top: -44px; right: 0; border: 0; background: none; cursor: pointer;
  font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--grey);
}
.player__close:hover { color: var(--white); }

/* ---------- Apparitions (fondu simple) ---------- */
.fade { opacity: 0; transform: translateY(14px); transition: opacity 1.4s var(--ease), transform 1.4s var(--ease); }
.fade.is-in { opacity: 1; transform: none; }

/* ---------- Téléphone ---------- */
@media (max-width: 700px) {
  .nav { padding-block: 18px; }
  .nav__links a:not(.nav__cta) { display: none; }
  .brand { font-size: 13px; }
  .hero__scroll { left: var(--gutter); right: auto; }
  .chapters__index { left: var(--gutter); right: auto; bottom: 36px; }
  .chapter { padding-bottom: 96px; }
  .form__row { grid-template-columns: 1fr; }
  .contact__direct { flex-direction: column; margin: 36px 0 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .intro { display: none; }
  .fade { opacity: 1; transform: none; }
}
