/* ===== TYPOS : remplace ici quand tu m'envoies les tiennes =====
   Dépose les fichiers dans /fonts et décommente les @font-face */
/*
@font-face { font-family: "Main"; src: url("../fonts/Main-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Title"; src: url("../fonts/Title.woff2") format("woff2"); font-display: swap; }
*/
:root {
  --font-main: "Main", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-title: "Title", "Main", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ink: #111;
  --paper: #fff;
  --edge: 8px;                               /* marge bord de page + espace entre visuels */
  --pad: clamp(16px, 2.2vw, 32px);           /* marge des textes */
  --fs-nav: clamp(15px, 1.15vw, 20px);
  --fs-big: clamp(34px, 5.4vw, 92px);
  --fs-mid: clamp(22px, 2.4vw, 38px);
  --ease: cubic-bezier(.65, 0, .35, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-main); color: var(--ink); background: var(--paper); line-height: 1.25; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { font: inherit; color: inherit; }

/* ---------- Soulignement animé : seulement sous le mot ---------- */
.u { position: relative; display: inline-block; width: max-content; }
.u::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.u:hover::after, .has-sub:hover > .u::after { transform: scaleX(1); transform-origin: left; }

/* =========================================================
   INTRO : fond noir, les mots du menu apparaissent un à un,
   puis la première vidéo arrive en fondu
   ========================================================= */
body.intro-on .hero { background: #000; }
body.intro-on .hero::after, body.intro-on .hero__stage { opacity: 0; }
body.intro-on .topbar .zone, .topbar.over-hero .zone { color: #fff !important; }
body.intro-on .topbar, .topbar.over-hero { mix-blend-mode: normal !important; }
.home .topbar .ia:not(.burger) { display: inline-block; }
body.intro-on .topbar .ia { animation: wordIn .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 90ms + 150ms); }
@keyframes wordIn {
  from { opacity: 0; transform: translateY(.6em); filter: blur(6px); letter-spacing: .25em; }
  to   { opacity: 1; transform: none; filter: blur(0); letter-spacing: normal; }
}

/* =========================================================
   ACCUEIL : médias plein écran, en cut, cliquables,
   bandes noires si le format ne remplit pas l'écran
   ========================================================= */
.hero { position: relative; height: 100vh; height: 100svh; overflow: hidden; color: #fff; background: #000; transition: background-color .5s ease; }
.hero__stage { position: absolute; inset: 0; }
/* première vidéo : arrive en fondu après le fond noir de l'intro (les suivantes restent en cut) */
.hero__stage, .hero::after { transition: opacity 1.4s cubic-bezier(.4, 0, .2, 1); }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.15); pointer-events: none; z-index: 2; }
.frag { position: absolute; inset: 0; visibility: hidden; display: block; }
.frag.is-on { visibility: visible; z-index: 1; }
.frag .fg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1; }
.ph { width: 100%; height: 100%; background: #161616; display: grid; place-items: center; }
.ph span { font-family: var(--font-title); font-size: clamp(40px, 11vw, 200px); opacity: .22; letter-spacing: -.03em; white-space: nowrap; }

/* =========================================================
   NAVIGATION — texte seul, toujours visible.
   Chaque zone prend sa propre couleur selon ce qu'il y a dessous.
   ========================================================= */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 10px var(--edge);
  display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: start; gap: 2vw;
  font-size: var(--fs-nav); background: none; color: var(--ink); will-change: transform;
}
.topbar > * { justify-self: start; }
.topbar .zone { color: var(--ink); transition: color .2s; }
.topbar .zone.dk { color: #fff; }
.topbar.blend { mix-blend-mode: difference; }
.topbar.blend .zone { color: #fff !important; }
.nav__menu { display: flex; gap: 1.1em; }
.nav__tag { justify-self: end; margin-right: 8vw; white-space: nowrap; }
.has-sub { position: relative; }
.sub { position: absolute; top: 100%; left: 0; padding-top: .3em; white-space: nowrap; pointer-events: none; background: none; }
.sub li { overflow: hidden; line-height: 1.2; }
.sub a { display: inline-block; transform: translateY(110%); transition: transform .4s var(--ease); }
.has-sub:hover .sub, .has-sub:focus-within .sub { pointer-events: auto; }
.has-sub:hover .sub a, .has-sub:focus-within .sub a { transform: none; }
.sub li:nth-child(2) a { transition-delay: .03s; } .sub li:nth-child(3) a { transition-delay: .06s; }
.sub li:nth-child(4) a { transition-delay: .09s; } .sub li:nth-child(5) a { transition-delay: .12s; }
.sub li:nth-child(6) a { transition-delay: .15s; } .sub li:nth-child(n+7) a { transition-delay: .18s; }
.sub a:hover { opacity: .55; }
.burger { display: none; background: none; border: 0; cursor: pointer; padding: 0; }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 12vw, 180px) var(--pad); }
.about__text { font-family: var(--font-title); font-size: var(--fs-big); line-height: 1.02; letter-spacing: -.02em; max-width: 17ch; }
.label { font-size: var(--fs-nav); margin-bottom: 1.5em; opacity: .5; }
.home-grid .label, .home-grid .more { margin-left: var(--pad); }
.more { display: inline-block; margin-top: 3em; font-size: var(--fs-mid); }
.spacer { height: 10vw; }

/* =========================================================
   GRILLE « DANSANTE » — bord à bord, 8 px entre les visuels
   ========================================================= */
.grid-wrap { padding: 0 0 var(--edge); }
.list-wrap { padding-top: 56px; }
.pgrid { display: flex; gap: var(--edge); align-items: flex-start; padding: 0 var(--edge); }
.pgrid .col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: clamp(60px, 8vw, 140px); }
.pgrid .col:nth-child(2) { padding-top: clamp(120px, 22vh, 260px); }
.case { display: block; }
.case__img { overflow: hidden; }
.case__img .m > * { transition: transform .9s var(--ease); }
.case:hover .case__img .m > * { transform: scale(1.03); }
.case__meta { font-size: var(--fs-nav); margin-top: .55em; line-height: 1.2; }
.case__meta b { font-weight: 400; display: block; }
.case__meta span { opacity: .5; }

/* ---------- Médias : toujours EN ENTIER, au format réel ---------- */
.m { width: 100%; display: flex; justify-content: center; }
.m > img, .m > video { display: block; width: 100%; height: auto; max-height: 100vh; object-fit: contain; }
.case .m > img, .case .m > video, .b-duo .m > img, .b-duo .m > video { max-height: none; }
.m > .cover-ph { width: 100%; aspect-ratio: var(--ph, 4/3); }
.cover-ph { display: grid; place-items: center; color: #9a9a9a; background: #ececea; font-family: var(--font-title); font-size: clamp(26px, 3.6vw, 70px); letter-spacing: -.03em; text-align: center; padding: 1em; }

/* ---------- « voir le projet » à côté du curseur ---------- */
.cursor-label { position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none; font-size: clamp(17px, 1.4vw, 24px); color: #fff; mix-blend-mode: difference; white-space: nowrap; opacity: 0; transition: opacity .2s; }
.cursor-label.is-on { opacity: 1; }

/* =========================================================
   PAGE PROJET : on entre directement par le nom + textes
   ========================================================= */
.p-intro { padding: clamp(110px, 14vw, 200px) var(--pad) clamp(60px, 8vw, 120px); }
.p-head h1 { font-family: var(--font-title); font-weight: 400; font-size: var(--fs-big); line-height: 1; letter-spacing: -.02em; max-width: 18ch; }
.p-head .tags { font-size: var(--fs-nav); opacity: .5; margin-top: .9em; }
.p-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--pad); margin-top: clamp(50px, 6vw, 100px); font-size: var(--fs-nav); line-height: 1.35; }
.p-cols h3 { font-weight: 400; opacity: .5; margin-bottom: .5em; }
.p-cols p { max-width: 34ch; white-space: pre-line; }
.blocks { display: flex; flex-direction: column; gap: var(--edge); padding: 0 var(--edge) var(--edge); }
.b-large { width: 72%; margin: 6vw auto; }
.b-large .m > img, .b-large .m > video { max-height: 85vh; }
.b-duo { display: flex; gap: var(--edge); align-items: flex-start; }
.b-duo .m { flex: 1 1 0; min-width: 0; }
.b-text { padding: 8vw var(--pad); display: grid; grid-template-columns: 1fr 2fr; }
.b-text p { grid-column: 2; font-size: var(--fs-mid); line-height: 1.15; max-width: 30ch; }

/* Vidéos Vimeo / YouTube */
.b-film { display: flex; justify-content: center; }
.film-frame { position: relative; width: 100%; aspect-ratio: var(--ar, 16/9); background: #000; }
.film-frame.tall { width: min(100%, calc(92vh * var(--r, 1))); }
.b-large .film-frame.tall { width: min(100%, calc(80vh * var(--r, 1))); }
.film-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

.next { display: block; padding: 10vw var(--pad); font-family: var(--font-title); font-size: var(--fs-big); line-height: 1; }
.next small { display: block; font-family: var(--font-main); font-size: var(--fs-nav); opacity: .5; margin-bottom: .4em; }

/* =========================================================
   PAGE CONTACT : gros texte + email
   ========================================================= */
.contact-page {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--pad) 80px;
}
.contact__cta { font-family: var(--font-title); font-size: var(--fs-big); line-height: 1; letter-spacing: -.02em; display: inline-block; width: max-content; max-width: 100%; }
.contact__cta .arr { display: inline-block; transition: transform .45s var(--ease); }
.contact__cta:hover .arr { transform: translateX(.25em); }
.contact__mail { font-size: var(--fs-mid); margin-top: clamp(28px, 3.5vw, 56px); display: inline-block; width: max-content; max-width: 100%; word-break: break-all; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--paper); padding: clamp(80px,10vw,160px) var(--pad) var(--pad); }
.footer__cta { font-family: var(--font-title); font-size: var(--fs-big); line-height: 1; display: inline-block; width: auto; }
.footer__cta .arr { display: inline-block; transition: transform .45s var(--ease); }
.footer__cta:hover .arr { transform: translateX(.25em); }
.footer__row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1em; margin-top: 10vw; font-size: var(--fs-nav); }

/* ---------- Apparition au scroll ---------- */
.rv { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* ---------- Tablette ---------- */
@media (max-width: 1100px) and (min-width: 821px) {
  .nav__tag { margin-right: 2vw; }
  .topbar { gap: 3vw; }
}

/* ---------- Mobile ---------- */
.mobile-menu { display: none; }
@media (max-width: 820px) {
  :root { --fs-nav: 16px; --fs-big: clamp(34px, 10vw, 56px); --fs-mid: 24px; }
  .topbar { grid-template-columns: 1fr auto; padding: 14px 14px; }
  .topbar > .burger { justify-self: end; }
  .nav__menu, .nav__tag, .nav__contact { display: none; }
  .burger { display: block; }
  .mobile-menu {
    display: flex; position: fixed; inset: 0; z-index: 120; background: var(--ink); color: var(--paper);
    padding: 80px 20px 30px; overflow-y: auto;
    flex-direction: column; gap: .7em; font-size: 38px; line-height: 1;
    clip-path: inset(0 0 100% 0); transition: clip-path .6s var(--ease); visibility: hidden;
  }
  body.menu-open .mobile-menu { clip-path: inset(0); visibility: visible; }
  body.menu-open { overflow: hidden; }
  .mobile-menu .msub { font-size: 19px; opacity: .6; display: flex; flex-direction: column; gap: .4em; margin-bottom: .4em; }
  .mobile-close { position: absolute; top: 14px; right: 14px; font-size: 16px; background: none; border: 0; color: inherit; }

  .home .topbar { grid-template-columns: 1fr auto; }
  .hero { height: 100svh; }
  .section { padding: 90px 20px; }
  .about__text { max-width: none; line-height: 1.05; }
  .home-grid .label, .home-grid .more { margin-left: 20px; }

  .pgrid .col { gap: 48px; }
  .list-wrap { padding-top: 56px; }
  .p-intro { padding: 100px 20px 50px; }
  .p-cols { grid-template-columns: 1fr; gap: 28px; }
  .b-duo { flex-direction: column; }
  .b-large { width: 100%; margin: 0; }
  .b-text { grid-template-columns: 1fr; padding: 60px 20px; } .b-text p { grid-column: 1; }
  .film-frame.tall { width: min(100%, calc(80vh * var(--r, 1))); }
  .next { padding: 70px 20px; }
  .contact-page { padding: 100px 20px 60px; }
  .contact__cta { width: auto; }
  .footer { padding: 70px 20px 24px; }
  .footer__row { flex-direction: column; margin-top: 50px; }
  .spacer { height: 60px; }
}
@media (prefers-reduced-motion: reduce) { .rv, .sub a, .u::after { transition: none !important; } }
