:root {
  --bg: #ffffff;
  --bg-alt: #f6f5f2;
  --text: #000000;
  --muted: #aeaca8;
  --logos-bg: #f4f3f0;
  --logos-border: #e6e4df;
  --placeholder-bg: #222222;
  --info-bg: rgba(8, 8, 8, 0.80);
  --liquid-glass: rgba(246, 245, 242, 0.42);
  --rec: #e5322d;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-anchor: none; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Martian Mono', ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: -0.55px;
  text-transform: uppercase;
}

a { color: inherit; text-decoration: none; }
a:hover:not(.tile) { opacity: .6; }
button { font-family: inherit; }

.ctrl { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.ctrl:hover { opacity: .6; }

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 20px;
  padding: 16px 20px;
  color: #ffffff;
  mix-blend-mode: difference;
}
.nav .col { display: flex; flex-direction: column; }
.nav .col.links { display: flex; flex-direction: row; gap: 6px; flex-wrap: wrap; }
.nav .col.right { align-items: flex-end; text-align: right; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 2px; }
.nav .email { text-transform: none; }

.info-link { display: flex; flex-direction: column; align-items: flex-start; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.info-link:hover span { text-decoration: underline; text-underline-offset: 3px; }
.info-link:hover .arr { text-decoration: none; }
.info-link .arr { display: inline-block; transition: transform .35s var(--ease); }
.info-link:hover .arr { transform: translateX(5px); }

/* mobile menu */
.m-bar { display: none; }
.m-menu { display: none; }

@media (max-width: 760px) {
  .nav { display: none; }
  .m-bar {
    display: flex; position: fixed; top: 0; left: 0; right: 0; z-index: 30;
    height: 48px; align-items: center; justify-content: space-between;
    padding: 0 20px; background: #ffffff; border-bottom: 1px solid var(--logos-border);
  }
  .m-menu {
    display: none; position: fixed; inset: 0; z-index: 40; background: #000000; color: #ffffff;
    flex-direction: column; justify-content: space-between; padding: 64px 20px 32px;
  }
  .m-menu.open { display: flex; }
  .m-menu .m-cta { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
  .m-menu .m-cta .label { font-size: 10px; color: var(--muted); }
  .m-menu .m-cta-link { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; font-size: 20px; text-decoration: underline; text-underline-offset: 4px; }
  .m-menu .m-cta-link .arr { display: inline-block; transition: transform .35s var(--ease); }
  .m-menu .m-cta-link:hover .arr { transform: translateX(5px); }
  .m-menu .big { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; flex: 1; font-size: 32px; letter-spacing: -1px; }
  .m-menu .big a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
  .m-menu .bottom { display: flex; flex-direction: row; align-items: center; }
  .m-menu .close { position: absolute; top: 14px; right: 20px; color: #ffffff; }
}

/* ---------- HERO ---------- */
.hero { position: relative; width: 100%; height: 900px; background: #1a1a1a; color: #ffffff; overflow: hidden; }
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .scrolldown { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); color: #ffffff; mix-blend-mode: difference; z-index: 2; }
@media (max-width: 760px) { .hero { height: 100vh; } }

/* ---------- LOGOS MARQUEE ---------- */
.logos {
  height: clamp(52px, 10vw, 76px); display: flex; align-items: center; overflow: hidden;
  background: var(--logos-bg); border-top: 1px solid var(--logos-border); border-bottom: 1px solid var(--logos-border);
}
.logos-track { display: inline-flex; height: 100%; animation: marquee 55s linear infinite; }
.logos .logo { display: inline-flex; align-items: center; justify-content: center; height: 100%; padding: 0 clamp(16px, 4vw, 44px); opacity: .82; }
/* Uniform height for every logo regardless of its own artwork proportions. */
.logos .logo img { height: clamp(18px, 3.2vw, 30px); width: auto; max-width: 160px; object-fit: contain; display: block; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* Intentionally not gated behind prefers-reduced-motion: the client wants every
   visitor to see the logos scroll, regardless of their OS motion setting. */

/* ---------- MOSAIC ---------- */
.mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding-bottom: 40px; }
@media (max-width: 760px) { .mosaic { grid-template-columns: 1fr; } }
/* Logos plus petits sur mobile (clamp) : même durée = vitesse perçue plus
   lente que sur desktop. On raccourcit la durée pour retrouver la même
   vitesse apparente. */
@media (max-width: 760px) { .logos-track { animation-duration: 28s; } }
.tile { display: flex; flex-direction: column; }
.tile .frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--placeholder-bg);
  display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: none;
}
.tile .frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1); transition: transform .9s var(--ease); will-change: transform; }
.tile:hover .frame video { transform: scale(1.06); }
.tile .missing { color: #7d7d7d; }
.tile .caption { height: 93px; box-sizing: border-box; padding: 12px 20px 0; display: flex; justify-content: space-between; gap: 20px; }
.tile .caption .type { text-align: right; white-space: nowrap; color: var(--muted); }
@media (hover: none) { .tile .frame { cursor: pointer; } }

/* cursor "rayon X" : position pilotée en JS (rAF), pas de transition CSS dessus */
.cursor-tag { position: fixed; top: 0; left: 0; z-index: 50; pointer-events: none; will-change: transform; mix-blend-mode: difference; }
/* Safari : mix-blend-mode au-dessus d'une vidéo en lecture cause saccades/fige */
.is-safari .cursor-tag { mix-blend-mode: normal; }
.cursor-tag .lens { width: 52px; height: 52px; margin: -26px 0 0 -26px; font-size: 9px; border-radius: 50%; background: #ffffff; color: #000000; display: flex; align-items: center; justify-content: center; transform: scale(0); opacity: 0; transition: transform .45s var(--ease), opacity .3s ease; }
.cursor-tag.on .lens { transform: scale(1); opacity: 1; }
@media (hover: none) { .cursor-tag { display: none !important; } }

/* ---------- PROJECT VIEW ---------- */
.project-player { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 810px; background: #000000; color: #ffffff; overflow: hidden; }
.project-player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.project-player .bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.project-player .bar .row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; padding-top: 40px; }
.project-player .bar .row .left { justify-self: start; }
.project-player .bar .row .center { justify-self: center; }
.project-player .bar .row .right { justify-self: end; }
.project-player .progress { width: 100%; height: 2px; background: rgba(255,255,255,0.3); }
.project-player .progress > div { height: 2px; background: #ffffff; }
.proj-meta-mobile { display: none; }
@media (max-width: 760px) {
  .project-player { margin-top: 48px; height: auto; aspect-ratio: 16 / 9; }
  .project-player .bar { padding: 0; gap: 0; }
  .project-player .bar .row { grid-template-columns: 1fr 1fr; padding: 10px 20px; }
  .project-player .bar .row .center { display: none; }
  .project-player .bar .row .right { display: flex; align-items: center; gap: 8px; }
  .proj-meta-mobile { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px 0; }
  .proj-meta-mobile .t { font-weight: 700; }
  .proj-meta-mobile .s { color: var(--muted); }
}

.credits { padding: 120px 20px 0; }
.credits .grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 20px; row-gap: 24px; }
.credits .item { display: flex; flex-direction: column; gap: 24px; }
.credits .item .label { color: var(--muted); }
@media (max-width: 760px) { .credits { padding-top: 40px; } .credits .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; } }

.bts-section { padding: 120px 0 40px; }
.bts-section .label { padding: 0 20px 20px; color: var(--muted); }
.bts { display: flex; gap: 0; }
.bts .item { min-width: 0; aspect-ratio: 16 / 9; background: #e9e7e3; overflow: hidden; position: relative; }
.bts .item img, .bts .item video { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
@media (max-width: 760px) { .bts { flex-direction: column; } .bts .item { flex: none; } }

.back-to-films { display: none; padding: 32px 20px 56px; }
@media (max-width: 760px) { .back-to-films { display: block; } }

/* ---------- NOT FOUND (404) ---------- */
.not-found { min-height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; justify-content: flex-end; gap: 56px; padding: 0 20px 20px; }
.not-found .slate { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 20px; row-gap: 24px; border-top: 1px solid var(--text); padding-top: 14px; }
.not-found .slate div { display: flex; flex-direction: column; gap: 6px; }
.not-found .slate .label { color: var(--muted); }
.not-found .bottom-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; }
.not-found .left { display: flex; flex-direction: column; gap: 28px; }
.not-found h1 { margin: 0; font-family: 'Inter Tight', sans-serif; font-weight: 300; font-size: 240px; line-height: .8; letter-spacing: -12px; text-transform: none; }
.not-found p { margin: 0; max-width: 420px; }
.not-found .right-block { display: flex; flex-direction: column; align-items: flex-end; gap: 22px; padding-bottom: 6px; }
.not-found .stop { display: flex; align-items: center; gap: 10px; }
.not-found .stop .square { width: 8px; height: 8px; background: var(--rec); }
.not-found .tc { font-variant-numeric: tabular-nums; animation: nf-blink 1s steps(1) infinite; }
@keyframes nf-blink { 0% { opacity: 1; } 50% { opacity: .25; } }
.not-found .take { display: inline-flex; gap: 8px; }
.not-found .take:hover { opacity: 1; }
.not-found .take:hover .take-label { text-decoration: underline; text-underline-offset: 3px; }
.not-found .take .arr { display: inline-block; transition: transform .35s var(--ease); }
.not-found .take:hover .arr { transform: translateX(5px); }
.not-found .nf-progress { height: 2px; background: var(--logos-border); }
.not-found .nf-progress span { display: block; width: 40%; height: 2px; background: var(--text); }
@media (max-width: 760px) {
  .not-found { gap: 36px; padding-bottom: 28px; }
  .not-found .slate { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .not-found .bottom-row { flex-direction: column; align-items: stretch; gap: 22px; }
  .not-found .left { gap: 22px; }
  .not-found h1 { font-size: 128px; letter-spacing: -6px; }
  .not-found .right-block { align-items: stretch; gap: 36px; padding-bottom: 0; }
  .not-found .take { min-height: 48px; align-items: center; justify-content: space-between; border: 1px solid var(--text); padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .not-found .tc { animation: none; }
  .not-found .take .arr { transition: none; }
}

/* ---------- COMING SOON (AI) ---------- */
.coming-soon { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 120px 20px; text-align: center; }
.coming-soon p { font-family: 'Inter Tight', sans-serif; font-weight: 300; font-size: clamp(28px, 6vw, 56px); letter-spacing: -0.02em; text-transform: none; margin: 0; }

/* ---------- SOCIAL / EVENT (zigzag grid) ---------- */
.page-head { height: 350px; display: flex; flex-direction: column; }
.page-head .bottom { flex: 1; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 20px 34px; }
.page-head .big { margin: 0; font-family: 'Inter Tight', sans-serif; font-weight: 300; font-size: 160px; line-height: 0.8; letter-spacing: -8px; text-transform: none; }
.page-head .tc { font-variant-numeric: tabular-nums; white-space: nowrap; padding-bottom: 4px; }
@media (max-width: 760px) { .page-head .big { font-size: 72px !important; letter-spacing: -3px !important; } .page-head { height: 220px; margin-top: 48px; } }

.zig { padding-bottom: 40px; display: flex; flex-direction: column; }
.zig-row { display: flex; gap: 0; }
.zig-row .tile { min-width: 0; display: flex; flex-direction: column; }
.zig-row .frame { position: relative; width: 100%; background: var(--placeholder-bg); overflow: hidden; cursor: none; }
.zig-row .frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1); transition: transform .9s var(--ease); will-change: transform; }
.zig-row .tile:hover .frame video { transform: scale(1.06); }
.zig-row .caption { height: 93px; box-sizing: border-box; padding: 12px 20px 0; }
.zig-row .caption .t2 { margin-left: 4px; }
@media (hover: none) { .zig-row .frame { cursor: pointer; } }

/* ---------- mobile Social/Event : algorithme propre, pas la grille desktop ---------- */
.zig-mobile { display: none; }
@media (max-width: 760px) {
  .zig { display: none; }
  .zig-mobile { display: block; padding-bottom: 48px; }
  .zig-mobile .zm-row { margin-top: 40px; }
  .zig-mobile .zm-row:first-child { margin-top: 24px; }
  .zig-mobile .tile { display: flex; flex-direction: column; min-width: 0; }
  .zig-mobile .frame { position: relative; width: 100%; background: var(--placeholder-bg); overflow: hidden; }
  .zig-mobile .frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .zig-mobile .caption { display: flex; flex-direction: column; gap: 2px; }
  .zig-mobile .caption .t1 { color: var(--text); font-size: 11.5px; }
  .zig-mobile .caption .t2 { color: #9a9a9a; font-size: 10px; margin-left: 0; }

  .zig-mobile .zm-a .frame { aspect-ratio: 16 / 9; }
  .zig-mobile .zm-a .caption { padding: 12px 20px; }

  .zig-mobile .zm-b { display: flex; gap: 8px; align-items: flex-start; }
  .zig-mobile .zm-b .tile { flex: 1 1 0; }
  .zig-mobile .zm-b .frame { aspect-ratio: 9 / 16; }
  .zig-mobile .zm-b .caption { padding: 10px 12px; }

  .zig-mobile .zm-c { display: flex; justify-content: center; }
  .zig-mobile .zm-c .tile { width: 66%; }
  .zig-mobile .zm-c .frame { aspect-ratio: 9 / 16; }
  .zig-mobile .zm-c .caption { padding: 12px 0; }
}

/* liquid-glass lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 64px 20px 32px; box-sizing: border-box;
  background: var(--liquid-glass); backdrop-filter: blur(28px) saturate(170%); -webkit-backdrop-filter: blur(28px) saturate(170%);
  animation: lbIn .35s ease both;
}
.lightbox.open { display: flex; }
.lightbox .close { position: absolute; top: 12px; right: 20px; min-height: 44px; color: #000000; }
.lb-card { animation: lbCard .5s var(--ease) both; position: relative; background: #000000; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.28), inset 0 0 0 1px rgba(255,255,255,0.35); max-width: 88vw; }
.lb-card video { width: 100%; height: 100%; object-fit: contain; display: block; cursor: pointer; }
.lb-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 16px 14px; display: flex; flex-direction: column; gap: 10px; color: #ffffff; background: linear-gradient(to top, rgba(0,0,0,0.38), rgba(0,0,0,0)); pointer-events: none; }
.lb-bar .row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.lb-bar button { pointer-events: auto; min-height: 32px; }
.lb-bar .progress { width: 100%; height: 2px; background: rgba(255,255,255,0.3); }
.lb-bar .progress > div { height: 2px; background: #ffffff; }
.lightbox .lb-title { color: #000000; padding: 0 20px; text-align: center; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbCard { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- INFO OVERLAY ---------- */
.info-overlay {
  position: fixed; inset: 0; z-index: 200; overflow-y: auto; box-sizing: border-box; padding: 64px 20px 40px;
  display: none; align-items: center; background: var(--info-bg);
  backdrop-filter: blur(28px) saturate(140%); -webkit-backdrop-filter: blur(28px) saturate(140%);
  color: #ffffff; font-family: 'Martian Mono', monospace; font-size: 11px; letter-spacing: -0.55px; text-transform: uppercase; line-height: 1.5;
  animation: infoIn .35s ease both;
}
.info-overlay.open { display: flex; }
.info-overlay .info-bg { position: fixed; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(22px) brightness(0.55) saturate(0.8); pointer-events: none; z-index: 0; transition: opacity .45s ease; }
.info-overlay .veil { position: fixed; inset: 0; background: rgba(6,6,6,0.62); pointer-events: none; z-index: 0; }
.info-overlay .top-label { position: absolute; top: 18px; left: 20px; z-index: 2; color: rgba(255,255,255,0.42); }
.info-overlay .close { position: absolute; z-index: 2; top: 6px; right: 20px; min-height: 44px; background: none; border: 0; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: #ffffff; cursor: pointer; }
.info-card { animation: infoCard .5s var(--ease) both; position: relative; z-index: 1; width: 100%; max-width: 1360px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.info-globe { position: relative; width: 100%; aspect-ratio: 1/1; max-height: 82vh; }
.info-globe canvas { display: block; width: 100%; height: 100%; }
.info-globe .readout { position: absolute; left: 0; bottom: 0; min-width: 210px; display: flex; flex-direction: column; padding: 10px 12px; border: 1px solid rgba(255,255,255,0.22); background: rgba(0,0,0,0.35); }
.info-text { display: flex; flex-direction: column; gap: 44px; }
.info-text .sentence { margin: 0; font-family: 'Inter Tight', sans-serif; font-weight: 300; font-size: clamp(28px, 3.2vw, 46px); line-height: 1.08; letter-spacing: -0.03em; text-transform: none; text-wrap: balance; }
.info-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px 24px; }
.info-cols .col { display: flex; flex-direction: column; }
.info-cols .col .label { color: rgba(255,255,255,0.42); margin-bottom: 6px; }
@media (max-width: 820px) { .info-card { grid-template-columns: 1fr; gap: 28px; } .info-globe { max-height: none; } }

@keyframes infoIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes infoCard { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .project-nav-pad { padding-top: 48px; }
}
