/* ==========================================================================
   RUGI — feuille de style principale
   Noir et blanc purs, aucune couleur d'accent. La couleur vient des projets.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo.woff2") format("woff2-variations"), url("/assets/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Gilda Display";
  src: url("/assets/fonts/gilda-display.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --ink-soft: #666;          /* texte secondaire sur blanc (5.7:1) */
  --ink-soft-dark: #a6a6a6;  /* texte secondaire sur noir (8.9:1) */
  --line: rgba(0, 0, 0, 0.14);
  --line-dark: rgba(255, 255, 255, 0.2);

  /* marge latérale ; sur très grand écran le contenu reste dans 2400px, les fonds restent pleine largeur */
  --m: max(clamp(16px, 3.2vw, 56px), calc((100vw - 2400px) / 2));
  --gap: clamp(12px, 1.6vw, 28px);
  --nav-h: clamp(64px, 6.4vw, 96px);

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Gilda Display", "Times New Roman", serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  background: var(--white);
  color: var(--black);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p, h1, h2, h3, figure, ul { margin: 0; padding: 0; }
ul { list-style: none; }

::selection { background: var(--black); color: var(--white); }
.is-dark ::selection, .work ::selection, .menu ::selection { background: var(--white); color: var(--black); }

:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
:focus:not(:focus-visible) { outline: none; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
html.is-locked { overflow: hidden; }

@supports (scrollbar-color: auto) {
  html { scrollbar-color: var(--black) var(--white); scrollbar-width: thin; }
}

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: var(--m); top: 12px; z-index: 2000;
  background: var(--black); color: var(--white); padding: 10px 16px; font-size: 15px;
  transform: translateY(-160%); transition: transform 0.25s var(--ease-out);
}
.skip:focus { transform: none; }

/* ---------- liens "roulants" : le texte monte, une copie arrive par dessous ---------- */
.roll { position: relative; display: inline-block; overflow: hidden; overflow: clip; vertical-align: top; line-height: 1.2; }
.roll > span { display: block; transition: transform 0.5s var(--ease-out); }
.roll > span::after {
  content: attr(data-text); position: absolute; left: 0; top: 100%;
}
@media (hover: hover) and (pointer: fine) {
  .roll:hover > span, .roll:focus-visible > span { transform: translateY(-100%); }
}

/* lien souligné qui se trace */
.ul-link {
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 3px;
  transition: background-size 0.5s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .ul-link:hover { background-size: 0% 1px; background-position: 100% 100%; }
}

/* ==========================================================================
   Loader (première visite) & rideau (changement de page)
   ========================================================================== */
.loader, .curtain {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--black); color: var(--white);
  display: grid; place-items: center;
  clip-path: inset(0 0 0 0);
}
.loader { visibility: hidden; }
html.has-loader .loader { visibility: visible; }
.curtain { visibility: hidden; clip-path: inset(100% 0 0 0); }
html.has-curtain .curtain { visibility: visible; clip-path: inset(0 0 0 0); }

.loader__stage { position: relative; width: min(46vw, 470px); display: grid; justify-items: center; }
.panther {
  width: 100%;
  aspect-ratio: 602 / 290;
  background: url("/assets/img/loader/panther-run.webp") 0 0 / 800% 100% no-repeat;
  animation: run 0.64s steps(8) infinite;
  will-change: background-position;
}
@keyframes run { to { background-position: 114.2857% 0; } }
/* 8 images : la dernière position vaut 7/7 = 100% ; steps(8) jusqu'à 800/7 % fait défiler les 8 */

.loader__ground {
  position: relative; width: 100%; height: 1px; margin-top: -4%;
  background: var(--line-dark);
  overflow: hidden;
}
.loader__fill {
  position: absolute; inset: 0; background: var(--white);
  transform: scaleX(0); transform-origin: 0 50%;
}
.curtain .panther { width: min(30vw, 300px); }

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 900;
  height: var(--nav-h);
  padding: 0 var(--m);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  color: var(--white);
  mix-blend-mode: difference;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav__logo { display: block; width: clamp(58px, 5vw, 78px); }
.nav__logo svg { width: 100%; height: auto; fill: currentColor; }
.nav__right { display: flex; align-items: center; gap: clamp(20px, 3vw, 48px); }
.nav__links { display: flex; gap: clamp(18px, 2.4vw, 40px); font-size: 15px; font-weight: 500; }
.nav__links a { position: relative; }
.nav__links a[aria-current="page"] { padding-left: 12px; }
.nav__links a[aria-current="page"]::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 5px; height: 5px;
  background: currentColor; border-radius: 50%; transform: translateY(-50%);
}
.lang { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; }
.lang button { opacity: 0.45; transition: opacity 0.2s ease; padding: 6px 2px; line-height: 1.2; }
.lang span { line-height: 1.2; }
.lang button[aria-pressed="true"] { opacity: 1; }
@media (hover: hover) { .lang button:hover { opacity: 1; } }
.lang span { opacity: 0.45; }
.nav__burger { display: none; font-size: 15px; font-weight: 500; padding: 8px 0; }

/* les éléments de nav montent à l'arrivée */
.reveal-mask { display: inline-block; overflow: hidden; vertical-align: top; }
.reveal-mask > * { display: inline-block; }

/* menu plein écran (mobile) */
.menu {
  position: fixed; inset: 0; z-index: 890;
  background: var(--black); color: var(--white);
  padding: calc(var(--nav-h) + 4vh) var(--m) var(--m);
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
}
.menu.is-open { visibility: visible; }
.menu__links { display: grid; gap: 0.5vh; }
.menu__links a {
  font-size: clamp(56px, 17vw, 120px); line-height: 0.92;
  font-weight: 800; font-stretch: 62%; text-transform: uppercase; letter-spacing: -0.01em;
  display: block; overflow: hidden; padding-top: 0.12em; margin-top: -0.1em;
}
.menu__links a > span { display: block; }
.menu__foot { display: flex; justify-content: space-between; align-items: end; gap: 16px; font-size: 15px; }
.menu__foot .lang { font-size: 17px; }

/* ==========================================================================
   Viseur (signature) : 4 coins qui cadrent l'élément survolé
   ========================================================================== */
.vf { position: fixed; inset: 0 auto auto 0; z-index: 800; pointer-events: none; mix-blend-mode: difference; }
.vf i {
  position: absolute; left: 0; top: 0; width: 22px; height: 22px;
  border: 0 solid var(--white); opacity: 0;
  will-change: transform, opacity;
}
.vf i:nth-child(1) { border-width: 1.5px 0 0 1.5px; }
.vf i:nth-child(2) { border-width: 1.5px 1.5px 0 0; }
.vf i:nth-child(3) { border-width: 0 0 1.5px 1.5px; }
.vf i:nth-child(4) { border-width: 0 1.5px 1.5px 0; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 520px;
  background: var(--white);
  overflow: hidden;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; }
.hero__media video {
  width: 100%; height: 100%; object-fit: cover;
  background: var(--white);
}
/* écran très large (21:9…) : la vidéo n'est plus rognée au-delà de 8 %, les bandes latérales
   prennent la couleur du bord de l'image (voir home.js) */
@media (min-aspect-ratio: 192/100) and (min-width: 861px) {
  .hero { transition: background-color 0.12s linear; }
  .hero__media video {
    position: absolute; left: 50%; top: 50%;
    width: auto; max-width: none; height: 108%; aspect-ratio: 16 / 9;
    transform: translate(-50%, -50%);
    background: transparent;
  }
}
.hero__foot {
  position: absolute; left: var(--m); right: var(--m); bottom: clamp(20px, 4vh, 44px);
  display: flex; justify-content: space-between; align-items: end; gap: 24px;
  color: var(--white); mix-blend-mode: difference;
}
.hero__foot { --tag: clamp(28px, 2.9vw, 52px); }
.hero__tagline {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--tag); line-height: 1.04; letter-spacing: -0.005em;
}
.hero__tagline .line { display: block; overflow: hidden; overflow: clip; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero__tagline .line > span { display: block; text-wrap: balance; }
.hero__cta-wrap { display: inline-block; overflow: hidden; overflow: clip; line-height: 1.2; position: relative; top: calc(6px - var(--tag) * 0.245); }
.hero__cta { font-size: 15px; font-weight: 500; white-space: nowrap; }

/* ==========================================================================
   Manifeste
   ========================================================================== */
.manifesto {
  padding: clamp(110px, 20vh, 220px) var(--m) clamp(90px, 16vh, 180px);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap);
}
.manifesto__text {
  grid-column: 1 / span 11;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(32px, 4.5vw, 84px); line-height: 1.07; letter-spacing: -0.012em;
  max-width: 20em;
  text-wrap: pretty;
}
.manifesto__text .word { will-change: opacity; }
.manifesto__aside {
  grid-column: 7 / span 5;
  margin-top: clamp(48px, 9vh, 110px);
  display: grid; gap: 22px; justify-items: start;
  max-width: 46ch;
}
.manifesto__aside p { color: var(--ink-soft); text-wrap: pretty; }
.manifesto__aside .ul-link { font-weight: 500; }

/* ==========================================================================
   Expertises
   ========================================================================== */
.expertises {
  position: relative; isolation: isolate;
  padding: 0 var(--m) clamp(100px, 18vh, 200px);
  background: var(--white);
}
.section-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(26px, 2.3vw, 40px); line-height: 1.1;
  margin-bottom: clamp(26px, 4vh, 48px);
}
.exp-list { border-bottom: 1px solid var(--line); }
.exp { border-top: 1px solid var(--line); }
.exp__row {
  width: 100%; text-align: left;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 30%); gap: var(--gap);
  align-items: end;
  padding: clamp(14px, 2vw, 30px) 0 clamp(12px, 1.6vw, 26px);
  cursor: default;
}
.exp__name {
  display: block; overflow: hidden;
  font-size: clamp(54px, 9.2vw, 176px); line-height: 0.86;
  font-weight: 800; font-stretch: 62%; text-transform: uppercase; letter-spacing: -0.012em;
  color: var(--white); mix-blend-mode: difference;
  padding: 0.16em 0 0.04em; margin-top: -0.12em;
}
.exp__name > span { display: block; transition: transform 0.7s var(--ease-out); }
.exp__details {
  font-size: 15px; line-height: 1.5; color: var(--ink-soft);
  max-width: 42ch;
  padding-bottom: 0.5em;
  transition: color 0.3s ease;
  text-wrap: pretty;
}
.exp__details strong { font-weight: 600; color: var(--black); transition: color 0.3s ease; }
.exp__toggle { display: none; }
.exp__media { display: none; }
.exp-list, .exp { transition: opacity 0.45s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .exp-list.is-hovering .exp:not(.is-active) .exp__name > span { opacity: 0.18; }
  .exp-list.is-hovering .exp:not(.is-active) .exp__details,
  .exp-list.is-hovering .exp:not(.is-active) .exp__details strong { color: rgba(0, 0, 0, 0.25); }
  .exp.is-active .exp__name > span { transform: translateX(clamp(10px, 1.4vw, 26px)); }
  .exp__name > span { transition: transform 0.7s var(--ease-out), opacity 0.45s var(--ease-out); }
}

/* aperçu flottant (desktop) */
.preview {
  position: fixed; left: 0; top: 0; z-index: -1;
  width: clamp(230px, 21vw, 380px); aspect-ratio: 4 / 5;
  pointer-events: none; visibility: hidden;
}
.preview__item {
  position: absolute; inset: 0; overflow: hidden;
  clip-path: inset(100% 0 0 0);
}
.preview__item img, .preview__item video { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Travaux (défilement horizontal épinglé)
   ========================================================================== */
.work { position: relative; background: var(--white); }
.work__inner {
  background: var(--black); color: var(--white);
  display: grid; grid-template-rows: auto 1fr; grid-template-columns: 100%; gap: 6vh;
  padding: 14vh 0 10vh;
  overflow: hidden;
}
.work.is-pin .work__inner {
  height: 100vh; height: 100svh; min-height: 560px; gap: 0;
  padding: calc(var(--nav-h) + 2vh) 0 clamp(28px, 5vh, 56px);
}
.work__head {
  display: flex; justify-content: space-between; align-items: end; gap: 24px;
  padding: 0 var(--m);
}
.work__head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 60px); line-height: 1.05; }
.work__head a { font-size: 15px; font-weight: 500; white-space: nowrap; }
.work__track {
  display: flex; align-items: end; gap: clamp(20px, 3vw, 56px);
  padding: 0 var(--m);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.work__track::-webkit-scrollbar { display: none; }
.work.is-pin .work__track { width: max-content; justify-self: start; overflow: visible; scroll-snap-type: none; will-change: transform; }
.card { flex: none; display: grid; gap: 14px; grid-template-rows: auto auto; scroll-snap-align: start; scroll-margin-left: var(--m); }
.card__media {
  position: relative; display: block; overflow: hidden; background: #111;
  height: min(52vh, 460px); aspect-ratio: var(--ar, 16 / 9);
}
.work.is-pin .card__media { height: min(58vh, 640px); }
.card__inner { position: absolute; inset: 0 -6%; display: block; }
.card__inner img, .card__inner video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}
.card__cap { font-size: 15px; color: var(--ink-soft-dark); }
@media (hover: hover) and (pointer: fine) {
  .card:hover .card__inner img, .card:hover .card__inner video { transform: scale(1.04); }
}

/* ==========================================================================
   Fin de page : contact + panthère
   ========================================================================== */
.outro {
  padding: clamp(110px, 20vh, 220px) var(--m) 0;
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap);
}
.outro__big {
  grid-column: 1 / -1;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(60px, 11.5vw, 220px); line-height: 0.95; letter-spacing: -0.02em;
}
.outro__text { grid-column: 1 / span 5; margin-top: clamp(28px, 5vh, 56px); color: var(--ink-soft); max-width: 40ch; text-wrap: pretty; }
.outro__mail {
  grid-column: 1 / -1; justify-self: start;
  margin-top: clamp(18px, 3vh, 34px);
  font-size: clamp(40px, 7.4vw, 140px); line-height: 1.12;
  font-weight: 800; font-stretch: 62%; letter-spacing: -0.01em;
}
.outro__sting { grid-column: 1 / -1; margin: clamp(50px, 10vh, 120px) calc(var(--m) * -1) 0; }
.outro__sting video, .outro__sting img { width: 100%; height: auto; aspect-ratio: 1600 / 636; background: var(--white); }

.footer {
  padding: 22px var(--m) 26px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line);
  font-size: 14px; color: var(--ink-soft);
}
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer a, .footer button { color: var(--black); }

/* ==========================================================================
   Pages intermédiaires (en construction)
   ========================================================================== */
.page-hero {
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--nav-h) + 14vh) var(--m) var(--m);
  display: grid; align-content: space-between; gap: 48px;
}
.page-hero h1 {
  font-size: clamp(72px, 17vw, 330px); line-height: 0.84;
  font-weight: 800; font-stretch: 62%; text-transform: uppercase; letter-spacing: -0.015em;
  overflow: hidden; padding-top: 0.14em;
}
.page-hero h1 > span { display: block; }
.page-hero__foot { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.page-hero__line { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 46px); line-height: 1.1; max-width: 22ch; }
.page-hero__mail { font-size: clamp(34px, 5vw, 90px); font-weight: 800; font-stretch: 62%; line-height: 1.12; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .exp__row { grid-template-columns: minmax(0, 1fr) minmax(200px, 30%); }
  .exp__name { font-size: clamp(54px, 8.2vw, 176px); }
  .manifesto__aside { grid-column: 5 / -1; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .nav__links, .nav__right > .lang { display: none; }
  .nav__burger { display: block; }

  .hero { height: auto; min-height: 100vh; min-height: 100svh; padding-top: var(--nav-h); display: flex; flex-direction: column; }
  .hero__media { position: relative; inset: auto; aspect-ratio: 16 / 9; margin: auto 0; }
  .hero__foot {
    position: relative; left: auto; right: auto; bottom: auto;
    flex-direction: column; align-items: start; gap: 20px;
    padding: 0 var(--m) max(30px, env(safe-area-inset-bottom)); color: var(--black); mix-blend-mode: normal;
  }
  .hero__foot { --tag: clamp(40px, 11vw, 64px); }
  .hero__cta-wrap { top: 0; }

  .manifesto { padding-top: 6vh; }
  .manifesto__text, .manifesto__aside { grid-column: 1 / -1; }

  .exp__row { grid-template-columns: 1fr auto; align-items: center; cursor: pointer; padding: 18px 0 0; row-gap: 12px; }
  .exp__details { grid-column: 1 / -1; grid-row: 2; }
  .exp__name { font-size: clamp(40px, 12.5vw, 96px); color: var(--black); mix-blend-mode: normal; }
  .exp__toggle { display: block; position: relative; width: 22px; height: 22px; flex: none; }
  .exp__toggle::before, .exp__toggle::after {
    content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1.5px; background: currentColor;
    transition: transform 0.45s var(--ease-out);
  }
  .exp__toggle::after { transform: rotate(90deg); }
  .exp.is-open .exp__toggle::after { transform: rotate(0deg); }
  .exp__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.55s var(--ease-out); }
  .exp.is-open .exp__body { grid-template-rows: 1fr; }
  .exp__body > div { overflow: hidden; }
  .exp__details { padding: 0 0 18px; color: var(--ink-soft); }
  .exp__media { display: block; aspect-ratio: 4 / 5; width: min(70%, 340px); overflow: hidden; margin-bottom: 26px; background: #eee; }
  .exp__media img, .exp__media video { width: 100%; height: 100%; object-fit: cover; }
  .preview { display: none; }

  .work__head { flex-direction: column; align-items: start; gap: 14px; }
  .card__media { height: auto; width: min(82vw, calc(56svh * var(--ar, 16 / 9))); }
  .work__track { align-items: start; }

  .outro__text { grid-column: 1 / -1; }
  .outro__big { font-size: 13.4vw; }

  .footer { display: grid; grid-template-columns: 1fr auto; row-gap: 14px; }
  .footer nav { grid-column: 1 / -1; grid-row: 1; }
}

/* mouvement réduit sur grand écran : la galerie passe à la ligne au lieu de défiler */
@media (min-width: 861px) and (prefers-reduced-motion: reduce) {
  .work__track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; row-gap: 48px; overflow: visible; scroll-snap-type: none; }
  .card__media { height: auto; width: 100%; }
}

/* ==========================================================================
   Mouvement réduit
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .panther { animation: none; }
  .roll > span, .exp__name > span, .card__inner img, .card__inner video { transition: none; }
  .card__inner { inset: 0; }
}
