/* FICHIER GÉNÉRÉ — ne pas éditer.
   Source : css/tokens.css, css/work.css
   Régénérer avec : python3 build.py */
/* ===== tokens.css ===== */
/* ============================================================
   ANTHONY ROD — XP PORTFOLIO
   01 · Tokens, reset, typographie
   ============================================================ */

@font-face { font-family: 'Clash Display'; src: url('../assets/fonts/ClashDisplay-300.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Clash Display'; src: url('../assets/fonts/ClashDisplay-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Clash Display'; src: url('../assets/fonts/ClashDisplay-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Clash Display'; src: url('../assets/fonts/ClashDisplay-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  /* — Fond : noir, très noir — */
  --bg:        #000000;
  --bg-lift:   #0a0a0b;

  /* — Encre — */
  --ink:       #F4F2ED;
  --ink-65:    rgba(244, 242, 237, 0.65);
  --ink-40:    rgba(244, 242, 237, 0.40);
  --ink-25:    rgba(244, 242, 237, 0.25);

  /* — Traits — */
  --line:      rgba(244, 242, 237, 0.11);

  /* — Signal : un blanc nacré, très légèrement plus froid et plus clair
     que l'encre, pour que la mise en avant se lise sans crier — */
  --accent:      #FAF8FF;
  --accent-ink:  #FAF8FF;

  /* — Mesures — */
  --pad:       clamp(20px, 3.4vw, 68px);
  --nav-h:     70px;
  --gap-sec:   clamp(120px, 19vh, 260px);
  --radius:    3px;

  /* — Courbes — */
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io:   cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Clash Display', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

/* Léger relief au centre du haut de page — puis noir absolu */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(90% 55% at 50% 0%, var(--bg-lift) 0%, #030303 42%, var(--bg) 78%);
}

/* Visible des moteurs et des lecteurs d'écran, invisible à l'oeil.
   Jamais display:none ni visibility:hidden : le contenu serait ignoré. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; }

::selection { background: var(--accent); color: #060606; }

/* ============================================================
   TYPOGRAPHIE
   ============================================================ */

.t-title {
  font-weight: 500;
  font-size: clamp(28px, 4.4vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.t-lead {
  font-weight: 300;
  font-size: clamp(17px, 1.7vw, 24px);
  line-height: 1.45;
  letter-spacing: -0.018em;
  color: var(--ink-65);
}

.t-body {
  font-weight: 400;
  font-size: clamp(14px, 1.02vw, 16px);
  line-height: 1.7;
  color: var(--ink-65);
}

.t-micro {
  font-weight: 500;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-40);
  font-variant-numeric: tabular-nums;
}

.t-num {
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-25);
}

.accent { color: var(--accent-ink); }

/* ============================================================
   RÉVÉLATIONS AU SCROLL
   ============================================================ */
.rv {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.rv.in { opacity: 1; transform: none; }
.rv[data-d="1"] { transition-delay: 0.09s; }
.rv[data-d="2"] { transition-delay: 0.18s; }
.rv[data-d="3"] { transition-delay: 0.27s; }
.rv[data-d="4"] { transition-delay: 0.36s; }

.rv-mask { display: block; overflow: hidden; padding-bottom: 0.06em; }
.rv-mask > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1.05s var(--ease);
}
.rv.in .rv-mask > span { transform: none; }
.rv.in .rv-mask:nth-child(2) > span { transition-delay: 0.08s; }
.rv.in .rv-mask:nth-child(3) > span { transition-delay: 0.16s; }
.rv.in .rv-mask:nth-child(4) > span { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv, .rv-mask > span { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ===== work.css ===== */
/* ============================================================
   PAGE PROJET
   ============================================================ */

.wnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-inline: var(--pad);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.wnav__id { color: var(--ink); }
.wnav__id em { font-style: normal; color: var(--ink-40); }
.wnav a.back { color: var(--ink-40); transition: color 0.35s var(--ease); }
.wnav a.back:hover { color: var(--ink); }

.wrap { padding-inline: var(--pad); }

/* ── En-tête ── */
.whead { padding-block: calc(var(--nav-h) + clamp(60px, 11vh, 150px)) clamp(48px, 8vh, 100px); }

.whead__cat {
  display: block;
  margin-bottom: clamp(22px, 3vh, 36px);
}
.whead h1 {
  font-weight: 500;
  font-size: clamp(38px, 8.4vw, 148px);
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  max-width: 14ch;
}

.wmeta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 4vw, 72px);
  margin-top: clamp(52px, 9vh, 120px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.wmeta div { display: grid; gap: 10px; align-content: start; }
.wmeta b { font-weight: 500; font-size: 15px; letter-spacing: -0.01em; }

.wintro {
  margin-top: clamp(52px, 9vh, 120px);
  max-width: 62ch;
  margin-left: auto;
}

/* ── Visuels ──
   Grille en colonnes : chaque image garde son format naturel et la
   hauteur se répartit toute seule. Largeur bridée pour que rien ne
   parte en pleine page.
   ------------------------------------------------------------ */
.wshots {
  max-width: 1240px;
  margin-inline: auto;
  padding-bottom: clamp(60px, 10vh, 140px);
  columns: 2;
  column-gap: clamp(18px, 2.4vw, 34px);
}

.shot {
  break-inside: avoid;
  margin-bottom: clamp(18px, 2.4vw, 34px);
}
.shot img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  background: #0b0b0c;
  filter: saturate(0.94) contrast(1.02);
  transition: filter 0.7s var(--ease);
}
.shot:hover img { filter: saturate(1) contrast(1); }
.shot figcaption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 11px;
}

/* Le premier visuel occupe les deux colonnes */
.shot--lead { column-span: all; margin-bottom: clamp(24px, 3.4vw, 46px); }

/* ── Projet suivant ── */
.wnext {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(48px, 8vh, 96px) var(--pad);
  margin-inline: calc(var(--pad) * -1);
  border-top: 1px solid var(--line);
  overflow: hidden;
  transition: background 0.5s var(--ease);
}
.wnext:hover { background: #050505; }

/* La barre se trace de gauche à droite au survol.
   On anime scaleX plutôt que width : composé par le GPU, et lisible
   de façon fiable par getComputedStyle. */
.wnext::before {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent-ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.wnext:hover::before { transform: scaleX(1); }

.wnext__label { display: block; margin-bottom: 14px; }
.wnext__title {
  display: block;
  font-weight: 500;
  font-size: clamp(28px, 4.6vw, 68px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.wnext__go {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex: none;
  color: var(--ink-40);
  transition: color 0.4s var(--ease);
}
.wnext:hover .wnext__go { color: var(--ink); }
.wnext__go svg {
  width: 30px; height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  transition: transform 0.5s var(--ease);
}
.wnext:hover .wnext__go svg { transform: translateX(9px); }

/* ── Pied ── */
.wfoot {
  padding-inline: var(--pad);
}
.wfoot__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.wfoot__bar > :last-child { justify-self: end; display: flex; gap: 22px; }
.wfoot__bar a { color: var(--ink-40); transition: color 0.35s var(--ease); }
.wfoot__bar a:hover { color: var(--ink); }

@media not all and (pointer: fine) { .cursor { display: none; } }
@media (max-width: 900px) {
  .cursor { display: none; }
  .wmeta { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .wintro { margin-left: 0; }
  .wshots { columns: 1; }
  .wnext { flex-direction: column; align-items: flex-start; gap: 22px; }
  .wnext__go svg { width: 22px; height: 22px; }
  .wfoot__bar { grid-template-columns: 1fr; gap: 14px; }
  .wfoot__bar > :last-child { justify-self: start; }
}
