:root {
  --blue: #4397EE;        /* le bleu exact du logo */
  --black: #000;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --mut: #6e6e73;
  --mut-dark: #a1a1a6;
  --line: #d2d2d7;
  --bg: #f5f5f7;
  --white: #fff;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
  --spring: cubic-bezier(.2, .9, .25, 1.08);
  --out: cubic-bezier(.16, 1, .3, 1);
}
@supports (animation-timing-function: linear(0, 1)) {
  :root { --spring: linear(0, .0069 1.15%, .026 2.3%, .1135 5.18%, .2229 7.78%, .5977 15.84%, .9228, .9676 28.8%, 1.0032 31.68%, 1.046 42.05%, 1.0118 61.63%, 1.0025 69.41%, .9992 99.94%); }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--black); color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px; line-height: 1.47; -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, video, iframe { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
section[id] { scroll-margin-top: 0; }

/* ---------- Liquid glass : réservé à ce qui flotte (nav, onglets, flèches) ---------- */
.glass {
  background: rgba(28, 28, 30, .66);
  -webkit-backdrop-filter: blur(16px) saturate(190%);
  backdrop-filter: blur(16px) saturate(190%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .38),
    inset 0 -1px 0 rgba(255, 255, 255, .1),
    inset 0 0 0 .5px rgba(255, 255, 255, .2),
    0 8px 28px rgba(0, 0, 0, .2);
  color: #fff;
  position: relative;
  transition: background-color .35s, color .35s, box-shadow .35s;
}
.glass.light {
  background: rgba(255, 255, 255, .6);
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(255, 255, 255, .45),
    inset 0 0 0 .5px rgba(255, 255, 255, .7),
    0 0 0 .5px rgba(0, 0, 0, .1),
    0 8px 26px rgba(0, 0, 0, .1);
}
html:not(.lens) .glass.light { background: rgba(255, 255, 255, .74); }
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 48%);
}
.glass.light::before { background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 55%); }
.glass > * { position: relative; }
@media (prefers-reduced-transparency: reduce) {
  .glass { background: #1d1d1f; -webkit-backdrop-filter: none; backdrop-filter: none !important; }
  .glass.light { background: #fff; }
}

.round {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  transition: transform .18s var(--spring);
}
.round:active { transform: scale(.92); }

/* ---------- Boutons ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 50px; padding: 0 26px; border-radius: 999px;
  font-size: 17px; font-weight: 500; white-space: nowrap;
  transition: transform .18s var(--spring), background-color .2s, color .2s;
}
.pill:active { transform: scale(.96); }
.pill-light { background: #f5f5f7; color: var(--ink); }
.pill-light:hover { background: var(--blue); color: #000; }
.pill-dark { background: var(--ink); color: #fff; }
.pill-dark:hover { background: #000; }
.pill-sm { height: 36px; padding: 0 16px; font-size: 14px; }

/* ---------- Nav ---------- */
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; font-size: 16px; letter-spacing: -.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand i { font-style: normal; }
h1 i { font-style: normal; color: var(--blue); }
.nav {
  position: fixed; z-index: 40; top: 12px; left: 50%; transform: translateX(-50%);
  width: min(1000px, calc(100% - 24px)); height: 56px; padding: 0 10px 0 13px;
  border-radius: 999px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
}
.nav-links { display: flex; gap: 26px; font-size: 14px; }
.nav-links a { color: rgba(255, 255, 255, .86); transition: color .2s; }
.nav-links a:hover { color: var(--blue); }
.nav-right { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.lang { display: flex; gap: 2px; font-size: 13px; }
.lang button { padding: 6px 7px; border-radius: 8px; color: rgba(255, 255, 255, .62); font-weight: 500; }
.lang button.on { color: #fff; font-weight: 650; }
.nav.light .nav-links a { color: rgba(29, 29, 31, .84); }
.nav.light .nav-links a:hover { color: #1f6fc4; }
.nav.light .lang button { color: rgba(29, 29, 31, .62); }
.nav.light .lang button.on { color: var(--ink); }
.nav.light .pill-light { background: var(--ink); color: #fff; }
.nav.light .pill-light:hover { background: var(--blue); color: #000; }

/* ---------- Hero ---------- */
.hero {
  background: var(--black); color: #f5f5f7;
  min-height: 100svh; padding: clamp(92px, 11vh, 118px) 0 clamp(24px, 4vh, 44px);
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
}
.hero-text { text-align: center; padding: 0 var(--gutter); display: flex; flex-direction: column; align-items: center; }
.eyebrow { color: var(--mut-dark); font-size: clamp(15px, 1.2vw, 17px); }
h1 {
  font-size: clamp(50px, 10.2vw, 136px); font-weight: 700;
  line-height: 1.02; letter-spacing: -.055em; margin: 8px 0 12px;
}
.lead, .chapter-side p, .vertical-head p { text-wrap: balance; }
.lead { font-size: clamp(19px, 1.9vw, 27px); letter-spacing: -.022em; line-height: 1.25; margin-bottom: 24px; max-width: 24em; }

/* La timeline : les clips défilent sous la tête de lecture.
   À droite de la tête, le voile retire la couleur : le rush. À gauche, le montage. */
.timeline {
  position: relative; width: 100%; flex: 1 1 auto; min-height: 300px; max-height: 600px;
  margin-top: clamp(26px, 4.5vh, 48px); overflow: hidden;
  background: #000;   /* sans ce fond, le voile gris se voit entre les clips */
}
.track {
  position: absolute; top: 30px; bottom: 0; left: 0;
  display: flex; width: max-content;
  animation: roll 70s linear infinite;
}
.timeline:hover .track { animation-play-state: paused; }
@keyframes roll { to { transform: translateX(-50%); } }
.clip {
  position: relative; flex: none; height: 100%; margin-right: 8px;
  border-radius: 14px; overflow: hidden; background: #161617;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.clip.v { aspect-ratio: 9 / 16; }
.clip.h { aspect-ratio: 16 / 9; }
.clip video, .clip img { width: 100%; height: 100%; object-fit: cover; }
.raw {   /* mix-blend-mode : marche aussi sur Safari, par-dessus de la vidéo */
  position: absolute; z-index: 2; top: 30px; bottom: 0; left: 50%; right: 0; pointer-events: none;
  background: #808080; mix-blend-mode: saturation;
}
.raw-dim {
  position: absolute; z-index: 2; top: 30px; bottom: 0; left: 50%; right: 0; pointer-events: none;
  background: rgba(0, 0, 0, .38);
}
.playhead {
  position: absolute; z-index: 3; top: 0; bottom: 0; left: 50%; width: 4px; margin-left: -2px;
  background: var(--blue); border-radius: 0 0 2px 2px; pointer-events: none;
  box-shadow: 0 0 18px rgba(67, 151, 238, .55);
}
.playhead svg { position: absolute; top: 0; left: -10px; fill: var(--blue); }

/* ---------- Clients ---------- */
.clients {
  background: linear-gradient(180deg, #000 0, var(--bg) 150px);
  padding: 210px var(--gutter) clamp(90px, 12vw, 150px); text-align: center;
}
.eyebrow-dark { font-size: 19px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 26px; }
.names {
  max-width: 1120px; margin: 0 auto;
  font-size: clamp(32px, 5.2vw, 72px); font-weight: 700; letter-spacing: -.045em; line-height: 1.14;
  text-wrap: balance;
}
.names span { display: inline-block; white-space: nowrap; margin: 0 .17em; }
.names span:nth-of-type(even) { color: #86868b; }
.clients-for { margin-top: 30px; color: var(--mut); font-size: clamp(17px, 1.6vw, 21px); letter-spacing: -.012em; }

/* ---------- Tuiles vidéo ---------- */
.tile {
  position: relative; display: block; width: 100%; overflow: hidden; cursor: pointer;
  background: #161617; border-radius: 22px; text-align: left;
  transition: transform .45s var(--out), box-shadow .45s var(--out);
}
.tile video, .tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile:hover { transform: scale(1.012); }
.tile:active { transform: scale(.985); }
.play {
  position: absolute; right: 14px; bottom: 14px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .52);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .35);
  transition: background-color .2s, color .2s, transform .25s var(--spring);
}
.tile:hover .play { background: var(--blue); color: #000; transform: scale(1.08); }
.tile.v { aspect-ratio: 9 / 16; }
.tile.h { aspect-ratio: 16 / 9; }

/* ---------- Vertical : la bande noire ---------- */
.vertical { background: var(--black); color: #f5f5f7; padding: clamp(80px, 10vw, 140px) 0 clamp(70px, 8vw, 110px); position: relative; }
.vertical-head { text-align: center; padding: 0 var(--gutter); margin-bottom: clamp(36px, 5vw, 60px); }
h2 { font-size: clamp(44px, 6.4vw, 88px); font-weight: 700; letter-spacing: -.05em; line-height: 1.04; }
.vertical-head p { color: var(--mut-dark); margin-top: 12px; font-size: clamp(18px, 1.7vw, 23px); letter-spacing: -.016em; }
.rail {
  display: flex; justify-content: safe center; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px max(var(--gutter), calc((100vw - var(--max)) / 2)); scrollbar-width: none;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2));
}
.rail::-webkit-scrollbar { display: none; }
.rail .tile { flex: none; width: clamp(236px, 25vw, 340px); scroll-snap-align: start; border-radius: 26px; }
.rail-arrows { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }

/* ---------- Chapitres : titre collant à gauche, tuiles à droite ---------- */
.chapter {
  background: var(--white);
  padding: clamp(80px, 10vw, 140px) max(var(--gutter), calc((100vw - var(--max)) / 2));
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 64px); align-items: start;
}
.chapter.alt { background: var(--bg); }
.chapter-side { position: sticky; top: 112px; }
.chapter-side p { margin-top: 14px; color: var(--mut); font-size: clamp(18px, 1.6vw, 21px); line-height: 1.34; letter-spacing: -.014em; max-width: 17em; }
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bento .big { grid-column: 1 / -1; }

/* ---------- Onglets flottants ---------- */
.tabs {
  position: fixed; z-index: 35; left: 50%; bottom: max(18px, env(safe-area-inset-bottom));
  transform: translate(-50%, 90px); opacity: 0; pointer-events: none;
  display: flex; padding: 5px; border-radius: 999px; font-size: 14px; font-weight: 500;
  transition: transform .5s var(--spring), opacity .25s, background-color .35s, color .35s, box-shadow .35s;
}
.tabs.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.tabs a { z-index: 1; display: block; padding: 9px 17px; border-radius: 999px; color: rgba(255, 255, 255, .88); transition: color .25s; }
.tabs a.on { color: var(--ink); }
.tab-pill {
  position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; width: 0;
  background: #fff; border-radius: 999px;
  transition: transform .45s var(--spring), width .45s var(--spring), background-color .35s;
}
.tabs.light a { color: var(--ink); }
.tabs.light a.on { color: #fff; }
.tabs.light .tab-pill { background: var(--ink); }

/* ---------- Final : le moment bleu ---------- */
.final {
  background: var(--blue); color: #fff; text-align: center; overflow: hidden;
  padding: clamp(50px, 6vw, 80px) var(--gutter) clamp(80px, 9vw, 120px);
  display: flex; flex-direction: column; align-items: center;
}
.final-logo { width: clamp(180px, 20vw, 280px); height: auto; margin-bottom: -8px; }
.final h2 { max-width: 13em; margin-bottom: 30px; text-wrap: balance; }

/* ---------- Footer ---------- */
footer { background: var(--bg); color: var(--ink-2); padding: 56px max(var(--gutter), calc((100vw - var(--max)) / 2)) 30px; font-size: 14px; }
.foot-in { display: grid; grid-template-columns: 1fr auto auto; gap: clamp(40px, 8vw, 110px); padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.brand-dark { color: var(--ink); }
.foot-brand p { margin-top: 12px; color: var(--mut); }
.foot-col { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.foot-col b { color: var(--ink); font-weight: 600; }
.foot-col a { transition: color .2s; cursor: pointer; }
.foot-col a:hover { color: #1f6fc4; }
.foot-legal { margin-top: 20px; color: var(--mut); font-size: 13px; }

/* ---------- Lecteur ---------- */
.player {
  padding: 0; border: 0; background: transparent; color: #fff;
  width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0;
  overflow: hidden;
}
.player[open] { display: grid; place-items: center; animation: fade .3s ease; }
.player::backdrop { background: rgba(0, 0, 0, .78); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.stage { position: relative; background: #000; border-radius: 22px; overflow: hidden; animation: pop .42s var(--spring); }
.stage.h { width: min(92vw, calc(88dvh * 16 / 9), 1240px); aspect-ratio: 16 / 9; }
.stage.v { height: min(90dvh, calc(92vw * 16 / 9)); aspect-ratio: 9 / 16; }
.stage video, .stage iframe { width: 100%; height: 100%; border: 0; object-fit: contain; }
.player-close { position: fixed; top: 16px; right: 16px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.95); opacity: 0; } }

/* ---------- Apparitions ---------- */
.js .rise { opacity: 0; transform: translateY(18px); animation: rise .9s var(--out) var(--d, 0ms) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--out), transform .8s var(--out); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .nav { grid-template-columns: 1fr auto; height: 52px; padding: 0 8px 0 10px; }
  .nav-links { display: none; }
  .chapter { grid-template-columns: minmax(0, 1fr); }
  .chapter-side { position: static; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .rail-arrows { display: none; }
  .rail .tile { width: 68vw; max-width: 300px; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .clients { padding-top: 180px; }
}
@media (max-width: 400px) {
  .brand { font-size: 15px; gap: 7px; }
  .pill-sm { padding: 0 13px; font-size: 13px; }
  .lang button { padding: 6px 4px; }
  .nav-right { gap: 6px; }
}

/* ---------- Moins de mouvement : tout en couleur, rien ne défile ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .track { animation: none; }
  .raw, .raw-dim { display: none; }
  .js .rise, .js .rv { opacity: 1; transform: none; animation: none; transition: none; }
  .tile, .tile:hover, .play, .tabs, .tab-pill, .stage, .player[open] { transition: none; animation: none; }
  .tile:hover { transform: none; }
}
