/* ============ AHNO111 — Home ============ */

:root {
  --black: #000000;
  --white: #ffffff;
  --red: #ff0000;
  --red-deep: rgba(172, 0, 0, 0.68);
  --serif: "Instrument Serif", serif;
  --sans: "Satoshi", sans-serif;
  --pad-x: 20px;
}

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

html { scroll-behavior: auto; }

/* Barre de scroll native masquée : pas de saut de layout quand le scroll
   apparaît/disparaît (fin du preloader, switch slider/list). Lenis gère le scroll. */
html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar { display: none; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

::selection { background: var(--red); color: var(--white); }

img { display: block; }
a { color: inherit; text-decoration: none; }
button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }

/* ============ Preloader ============ */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader__counter {
  display: flex;
  gap: clamp(40px, 5vw, 72px);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2vw, 26px);
  color: var(--white);
}

.preloader__counter span {
  display: inline-block;
  width: 1ch;
  text-align: center;
}

.preloader__phrase {
  position: absolute;
  display: flex;
  justify-content: space-between;
  width: min(860px, 84vw);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2vw, 26px);
  color: var(--white);
  visibility: hidden;
}

.preloader__phrase .char { display: inline-block; }
.preloader__phrase .char--space { width: 1ch; }

/* ============ Header ============ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--pad-x);
}

.site-header__logo {
  display: block;
}

.site-header__logo-img {
  display: block;
  height: 34px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 20px;
  font-weight: 500;
  font-size: 14px;
}

.site-nav a {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.site-nav a:hover,
.site-nav a.is-active { opacity: 1; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 16px;
  padding: 2px 0;
}

.burger span {
  display: block;
  /* 2px pile : 1.5px s'arrondit différemment selon la position subpixel */
  height: 2px;
  width: 100%;
  background: var(--white);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.burger.is-open span:first-child { transform: translateY(5px) rotate(45deg); }
.burger.is-open span:last-child { transform: translateY(-5px) rotate(-45deg); }

/* ============ Menu mobile ============ */

.menu-overlay {
  position: fixed;
  inset: 0;
  /* au-dessus de l'overlay filtres (42) et de son bouton (45), sous le header (50) */
  z-index: 46;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.menu-overlay.is-open { opacity: 1; visibility: visible; }

.menu-overlay nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.menu-overlay a {
  font-family: var(--serif);
  font-style: italic;
  font-size: 44px;
  line-height: 1;
}

/* ============ Hero ============ */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--black);
}

.hero__bg img,
.hero__bg video {
  width: 100%;
  height: 100%;
  /* vidéo verticale 1080×1920 : on couvre tout le hero, centrée (recadrage
     haut/bas en desktop, plein cadre en mobile) */
  object-fit: cover;
  object-position: center;
  opacity: 0.5;
}

.hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 63%, var(--black) 100%);
  opacity: 0.5;
  pointer-events: none;
}

/* Titre = logo vectoriel, 7 glyphes positionnés (ratio du groupe Figma 528×127) */
.hero__title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 78vw);
  aspect-ratio: 528 / 126.655;
  margin: 0;
}

.hero__char {
  position: absolute;
  display: block;
  will-change: transform;
}

.hero__char img {
  display: block;
  width: 100%;
  height: auto;
}

/* Barre du bas : horaires à gauche, chevron au centre, [IG] à droite */
.hero__bottom {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  /* marge latérale = celle du header, pour aligner l'horloge sous le logo
     et [IG] sous la nav (sinon le texte touche/déborde les bords) */
  padding: 0 var(--pad-x) 16px;
}

.hero__clock {
  font-size: 12px;
  line-height: normal;
  text-align: left;
  color: var(--white);
}

.hero__ig {
  font-size: 14px;
  line-height: normal;
  color: var(--white);
  transition: opacity 0.3s ease;
}

.hero__ig:hover { opacity: 0.7; }

.hero__chevron {
  flex: none;
  width: 9px;
  height: 9px;
  margin-bottom: 4px;
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
  transform: rotate(45deg);
}

/* ============ Who ============ */

.who {
  background: var(--black);
  padding: 100px var(--pad-x);
}

.who__inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.who__title {
  width: 100%;
  max-width: 850px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 8.9vw, 128px);
  line-height: 1;
  color: var(--white);
}

.who__title em { font-style: italic; }
.who__title .line { display: block; }

.who__content {
  width: 566px;
  max-width: 100%;
  margin-top: 100px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: flex-start;
}

.who__text {
  font-weight: 500;
  font-size: clamp(17px, 2.78vw, 40px);
  line-height: 1.25;
}

.btn-more {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 257px;
  padding: 5px 10px;
  background: var(--white);
  color: var(--black);
}

.btn-more__label {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.btn-more__arrow {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.btn-more__line {
  flex: 1;
  height: 1px;
  background: var(--black);
  transform-origin: left center;
  transition: transform 0.4s ease;
}

.btn-more__head {
  width: 8px;
  height: 14px;
  flex: none;
  margin-left: -1px;
  transition: transform 0.4s ease;
}

.btn-more:hover .btn-more__head { transform: translateX(4px); }
.btn-more:hover .btn-more__line { transform: scaleX(1.04); }

/* ============ Selected Work ============ */

.work {
  position: relative;
  background: var(--black);
  padding: 100px 60px;
}

.work__stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
}

.work__title,
.work__canvas {
  position: relative;
  z-index: 1;
}

.work__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 8.9vw, 128px);
  line-height: normal;
  text-align: center;
  color: var(--white);
}

.work__canvas {
  position: relative;
  margin-top: 100px;
  width: 100%;
  aspect-ratio: 1320 / 1020;
}

/* CTA sous le titre "Selected Work" (même bouton que "More about me") */
.work__cta {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.work__cta .btn-more { width: 257px; }

.work-item {
  position: absolute;
  left: var(--l);
  top: var(--t);
  width: var(--w);
}

.work-item--bag    { --l: 0%;      --t: 0%;      --w: 21.74%; }
.work-item--walk   { --l: 46.44%;  --t: 5.59%;   --w: 21.74%; }
.work-item--tribal { --l: 23.26%;  --t: 45.29%;  --w: 10.08%; }
.work-item--five   { --l: 78.26%;  --t: 45.29%;  --w: 21.74%; }
.work-item--jacket { --l: 34.85%;  --t: 75.98%;  --w: 10.08%; }

.work-item__frame {
  position: relative;
  z-index: 2;
  display: block;
  border: 1px solid var(--white);
  transition: border-color 0.35s ease;
}

.work-item__frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.work-item__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(172, 0, 0, 0) 0%, var(--red-deep) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.work-item__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red);
  mix-blend-mode: darken;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.work-item__view {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.work-item:hover .work-item__frame { border-color: var(--red); }
.work-item:hover .work-item__frame::before,
.work-item:hover .work-item__frame::after,
.work-item:hover .work-item__view { opacity: 1; }

.work-item__card {
  position: absolute;
  top: 0;
  width: 207px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--black);
  border: 1px solid var(--red);
  transition: clip-path 0.5s cubic-bezier(0.65, 0, 0.35, 1), transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
  pointer-events: none;
  z-index: 1;
}

.work-item[data-side="left"] .work-item__card {
  right: 100%;
  border-right: 0;
  clip-path: inset(0 0 0 100%);
  transform: translateX(12px);
}

.work-item[data-side="right"] .work-item__card {
  left: 100%;
  border-left: 0;
  clip-path: inset(0 100% 0 0);
  transform: translateX(-12px);
}

.work-item:hover .work-item__card {
  clip-path: inset(0 0 0 0);
  transform: translateX(0);
}

.work-item__year { font-size: 12px; opacity: 0.8; line-height: normal; }
.work-item__name { font-weight: 500; font-size: 20px; line-height: normal; }
.work-item__desc { font-size: 13px; line-height: 18px; }

.work-item--small .work-item__card {
  width: 170px;
  padding: 14px;
  gap: 6px;
}

.work-item--small .work-item__name { font-size: 16px; }
.work-item--small .work-item__desc { display: none; }

/* ============ Footer ============ */

.footer {
  background: var(--black);
  padding: 10px var(--pad-x);
  display: flex;
  flex-direction: column;
}

.footer__top {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.footer__wordmark-mask { overflow: hidden; }

.footer__wordmark {
  width: 100%;
  height: auto;
  aspect-ratio: 1402 / 361;
}

.footer__links {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  line-height: normal;
}

.footer__links a:hover { opacity: 0.7; }

.footer__tag {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  letter-spacing: 13.16px;
  white-space: nowrap;
}

.footer__totop { transition: opacity 0.3s ease; }
.footer__totop:hover { opacity: 0.7; }

.footer__bottom {
  margin-top: 200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.footer__bottom a:hover { opacity: 0.7; }

/* ============ Reveal helpers ============ */

[data-reveal="lines"] .line { overflow: hidden; }
[data-reveal="lines"] .line > .line-inner {
  display: block;
  will-change: transform;
}

/* ============ Responsive ============ */

@media (max-width: 768px) {
  :root { --pad-x: 13px; }

  .site-nav { display: none; }
  .burger { display: flex; }

  .who { padding: 50px var(--pad-x); }
  .who__inner { align-items: flex-start; }
  .who__title { max-width: 100%; }
  .who__content { width: 100%; margin-top: 50px; }
  /* garde l'aspect compact du desktop (pas de bouton pleine largeur en mobile) */
  .btn-more { width: 257px; max-width: 100%; }

  .work { padding: 50px var(--pad-x); }
  .work__canvas {
    margin-top: 50px;
    aspect-ratio: 349 / 1036;
  }

  .work__cta { margin-top: 16px; }

  .work-item--bag    { --l: 0%;     --t: 0%;     --w: 48.42%; }
  .work-item--walk   { --l: 51.86%; --t: 16.7%;  --w: 48.14%; }
  .work-item--tribal { --l: 6.02%;  --t: 38.8%;  --w: 38.11%; }
  .work-item--five   { --l: 42.12%; --t: 56.66%; --w: 57.88%; }
  .work-item--jacket { --l: 10.89%; --t: 83.69%; --w: 26.36%; }

  .work-item__card { display: none; }

  .footer__top { gap: 16px; }

  .footer__links {
    flex-wrap: wrap;
    column-gap: 12px;
    row-gap: 40px;
  }

  .footer__tag {
    position: static;
    transform: none;
    width: 100%;
    order: -1;
    text-align: center;
    letter-spacing: 8px;
  }

  .footer__bottom { margin-top: 66px; }
}

/* ============ Voile de transition ============ */

.page-veil {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: var(--black);
  pointer-events: none;
}

/* Navigation interne : le preloader ne doit jamais apparaître (même 1 frame) */
html.revisit .preloader { display: none; }

/* ============ Ciel étoilé pleine page (Work) ============ */

.page-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ============ Page Work — commun ============ */

.work-page { background: var(--black); }

.wfilters__label {
  font-weight: 500;
  font-size: 16px;
  color: var(--white);
}

.wfilters__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.wfilters__list button {
  font-size: 14px;
  color: var(--white);
  opacity: 0.5;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.wfilters__list button:hover,
.wfilters__list button.is-active { opacity: 1; }

/* ============ Vue Slider ============ */

.wslider__stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.wslider__spacer { width: 100%; }

/* Le groupe complet (label + liste) est centré verticalement à l'écran. */
.wfilters--side {
  position: absolute;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  pointer-events: auto;
}

.wslider__track {
  position: absolute;
  inset: 0;
  will-change: filter, transform;
}

.wslide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(214px, 32vw, 460px);
  aspect-ratio: 460 / 258;
  border: 1px solid var(--white);
  pointer-events: auto;
  cursor: pointer;
  transition: border-color 0.35s ease;
  will-change: transform;
}

.wslide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wslide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(172, 0, 0, 0) 0%, var(--red-deep) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.wslide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red);
  mix-blend-mode: darken;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.wslide__view {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  white-space: nowrap;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.wslide:hover { border-color: var(--red); }
.wslide:hover::before,
.wslide:hover::after,
.wslide:hover .wslide__view { opacity: 1; }

.wslider__fade {
  position: absolute;
  left: 0;
  right: 0;
  height: 30vh;
  z-index: 2;
  pointer-events: none;
}

/* Noir plein sur ~40% du fondu puis dégradé : les images sont nettement
   masquées en haut/bas avant d'entrer dans le cadre (comme la maquette). */
.wslider__fade--top {
  top: 0;
  background: linear-gradient(to bottom, var(--black) 35%, rgba(0, 0, 0, 0));
}

.wslider__fade--bottom {
  bottom: 0;
  background: linear-gradient(to top, var(--black) 35%, rgba(0, 0, 0, 0));
}

.wslider__meta {
  position: absolute;
  left: calc(50% + min(312px, 23vw));
  top: 50%;
  transform: translateY(-50%);
  height: min(574px, 72vh);
  z-index: 3;
}

.wslider__meta::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  /* dégradé "métal" du SVG Figma : fondu aux extrémités, blanc au centre */
  background: linear-gradient(to bottom, transparent, #ffffff 50%, transparent);
}

.wslider__info {
  position: absolute;
  left: 43px;
  top: 50%;
  /* l'aiguille (ligne de date) pile au centre : on ne décale que d'une
     demi-hauteur de ligne de date, le bloc projet pend en dessous */
  transform: translateY(-13px);
  width: 200px;
}

.wslider__date {
  display: flex;
  align-items: center;
  gap: 25px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--white);
  white-space: nowrap;
}

.wslider__tick {
  display: block;
  width: 27px;
  height: 1px;
  background: rgba(255, 255, 255, 0.8);
  flex: none;
}

/* Masque du rouleau de date : l'ancienne plonge dessous, la nouvelle remonte.
   Petit débord pour ne pas rogner l'italique au repos. */
.wslider__date-mask {
  display: inline-block;
  overflow: hidden;
  padding: 3px 6px;
  margin: -3px -6px;
}

.wslider__date-mask > span {
  display: inline-block;
}

/* segments du rouleau (jour / tiret / mois / tiret / année) */
.wslider__date-mask span span {
  display: inline-block;
  will-change: transform;
}

.wslider__project {
  margin-top: 14px;
  padding-left: 52px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

body.slide-hover .wslider__project {
  opacity: 1;
  transform: translateY(0);
}

.wslider__pname {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--white);
}

.wslider__pdesc {
  margin-top: 8px;
  width: 150px;
  font-size: 12px;
  line-height: 16px;
  color: var(--white);
}

/* ============ Vue List ============ */

.wlist {
  padding: 71px 140px 80px;
  min-height: 100vh;
}

.wlist__head {
  display: flex;
  align-items: center;
  gap: 40px;
  min-height: 22px;
}

.wlist__head .wfilters__label { flex: none; }

.wfilters__list--row {
  flex: 1;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 27px;
}

.wlist__table { margin-top: 34px; }

.wrow {
  display: grid;
  /* proportions de la maquette : la dernière colonne s'ajuste à son contenu
     pour rester sous la ligne quelle que soit la largeur */
  grid-template-columns: 25.4% 27.1% 1fr max-content;
  padding: 4px 0 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 19px;
  color: var(--white);
  cursor: pointer;
  transition: color 0.25s ease;
}

/* Une seule ligne par cellule : au-delà, coupure automatique avec "…"
   (min-width: 0 permet à la colonne flexible de rétrécir sous la taille
   de son contenu au lieu de déborder sur la colonne voisine). */
.wrow p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* petit dégagement entre la description et la colonne catégories */
.wrow > :nth-child(3) { padding-right: 24px; }

.wrow > :last-child { text-align: right; }

.wrow:hover { color: var(--red); }

.wrow.is-hidden { display: none; }

.wlist__strip {
  position: fixed;
  top: 0;
  left: 0;
  width: 140px;
  height: 378px;
  border: 1px solid var(--white);
  overflow: hidden;
  background: var(--black);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}

.wlist__strip-inner { will-change: transform; }

.wlist__strip-inner img {
  width: 100%;
  aspect-ratio: 140 / 152.7;
  object-fit: cover;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

/* ============ Filtres mobile ============ */

.wfilters-toggle {
  display: none;
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  color: var(--white);
}

.wfilters-toggle__caret {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
  /* le chevron "pèse" vers le bas-droite de sa boîte : on compense
     dans les deux états pour rester optiquement centré */
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.3s ease;
}

.wfilters-toggle.is-open .wfilters-toggle__caret { transform: translateY(2px) rotate(225deg); }

.wfilters-overlay {
  position: fixed;
  inset: 0;
  z-index: 42;
  background: var(--black);
  /* scrollable si le viewport est trop petit pour toute la liste */
  display: block;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.wfilters-overlay.is-open { opacity: 1; visibility: visible; }

.wfilters__list--big {
  gap: 20px;
  align-items: center;
  width: fit-content;
  margin: 0 auto;
  /* centré quand ça tient, dégagé du bouton "Filtres" et scrollable sinon */
  min-height: 100%;
  justify-content: center;
  padding: 104px 20px 56px;
}

.wfilters__list--big button { font-size: 18px; }

/* ============ Switch de vue ============ */

.view-switch {
  position: fixed;
  right: 20px;
  bottom: 17px;
  z-index: 45;
  font-size: 14px;
  color: var(--white);
  white-space: nowrap;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* L'overlay des filtres (mobile) recouvre l'écran : on masque le switch
   "Slider / List" tant qu'il est ouvert. */
.wfilters-overlay.is-open ~ .view-switch {
  opacity: 0;
  visibility: hidden;
}

.view-switch__opt {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}

.view-switch__opt.is-active {
  font-weight: 500;
  color: var(--white);
}

.view-switch__sep { font-weight: 300; }

/* ============ Page Projet (blocs composables) ============ */
/* Variables héritées du Figma : --marge / --top / --bot */

.pj-page {
  --marge: 210px;
  --top: 210px;
  --bot: 60px;
}

.pj {
  position: relative;
  z-index: 1;
  color: var(--white);
}

.pj-section {
  padding: var(--top) var(--marge) var(--bot);
}

/* bloc 1 — en-tête projet */
.pj-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 110px var(--marge) 20px;
}

.pj-header__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.pj-header h1 {
  font-weight: 500;
  font-size: clamp(46px, 4.45vw, 64px);
  line-height: 1;
}

.pj-header__cats {
  font-weight: 500;
  font-style: italic;
  font-size: 14px;
  opacity: 0.75;
  white-space: nowrap;
}

.pj-header__cats span { font-style: normal; }

.pj-header__line {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--white);
}

.pj-header__intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  font-size: 14px;
  line-height: normal;
}

.pj-header__intro > p:first-child { max-width: 500px; }
.pj-header__date { opacity: 0.75; white-space: nowrap; }

/* bloc 6 — grande image */
.pj-image img {
  width: 100%;
  aspect-ratio: 1020 / 573;
  object-fit: cover;
}

/* bloc 4 — texte centré + duo d'images */
.pj-texteduo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
}

.pj-texteduo__text {
  max-width: 440px;
  font-size: 14px;
  text-align: center;
  line-height: normal;
}

.pj-texteduo__images {
  display: flex;
  gap: 4.92%;
  width: 100%;
}

.pj-texteduo__img {
  width: 47.54%;
}

.pj-texteduo__img img {
  width: 100%;
  aspect-ratio: 485 / 273;
  object-fit: cover;
}

/* bloc 2 — image + texte */
.pj-imagetexte {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
}

.pj-imagetexte--right { flex-direction: row-reverse; }

.pj-imagetexte__img {
  width: min(511px, 50%);
  flex: none;
}

.pj-imagetexte__img img {
  width: 100%;
  aspect-ratio: 511 / 286;
  object-fit: cover;
}

.pj-imagetexte__col {
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.pj-imagetexte__col h3 {
  font-weight: 500;
  font-size: 32px;
  line-height: normal;
}

.pj-imagetexte__col p {
  font-size: 14px;
  line-height: normal;
}

/* bloc 3 — image pleine largeur */
.pj-fullbleed { padding: var(--top) 0 var(--bot); }

.pj-fullbleed img {
  display: block;
  width: 100%;
  aspect-ratio: 1440 / 795;
  object-fit: cover;
}

/* bloc 5 — colonne de paragraphes */
.pj-paragraphes {
  display: flex;
  flex-direction: column;
  gap: 50px;
  max-width: calc(555px + 2 * var(--marge));
}

.pj-paragraphes p {
  font-size: 14px;
  line-height: normal;
}

/* bloc 7 — copyright */
.pj-copyright {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: calc(555px + 2 * var(--marge));
  padding-top: 60px;
  padding-bottom: var(--top);
  font-size: 14px;
}

/* bonus — citation */
.pj-citation { display: flex; justify-content: center; }

.pj-citation p {
  max-width: 850px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1.25;
  text-align: center;
}

/* bonus — duo en quinconce */
.pj-duodecale {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 5%;
}

.pj-duodecale__img { width: 42%; }

.pj-duodecale__img--bas { margin-top: 120px; }

.pj-duodecale__img img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* bonus — grille d'images, 4 par ligne (les lignes se remplissent toutes seules) */
.pj-grille {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.pj-grille__img img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

@media (max-width: 900px) {
  .pj-page {
    --marge: 35px;
    --top: 80px;
    --bot: 0px;
  }

  .pj-header { padding-top: 60px; padding-bottom: 16px; }

  .pj-header__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .pj-header__intro {
    flex-direction: column;
    gap: 20px;
  }

  .pj-image img { aspect-ratio: 305 / 171; }

  .pj-texteduo__text { text-align: left; max-width: none; }

  .pj-texteduo__images {
    flex-direction: column;
    gap: 50px;
  }

  .pj-texteduo__img { width: 100%; }
  .pj-texteduo__img img { aspect-ratio: 305 / 170; }

  .pj-imagetexte,
  .pj-imagetexte--right {
    flex-direction: column;
    align-items: stretch;
  }

  .pj-imagetexte__img { width: 100%; }
  .pj-imagetexte__col { max-width: none; }

  .pj-paragraphes { gap: 30px; }

  .pj-copyright { padding-bottom: 80px; }

  .pj-duodecale {
    flex-direction: column;
    gap: 50px;
  }

  .pj-duodecale__img { width: 100%; }
  .pj-duodecale__img--bas { margin-top: 0; }

  /* grille : 2 par ligne en mobile */
  .pj-grille { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ============ Page About — constellation ============ */

.about-page {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.constellation {
  position: fixed;
  inset: 0;
  z-index: 1;
}

.constellation__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.constellation__core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(96px, 11vw, 150px);
  /* ratio verrouillé sur le viewBox du logo (nouveau SVG simplifié) */
  aspect-ratio: 1102.2 / 728.6;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.cword {
  position: absolute;
  left: 0;
  top: 0;
  padding: 8px 12px;
  font-size: clamp(17px, 1.8vw, 26px);
  line-height: normal;
  color: var(--white);
  white-space: nowrap;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  will-change: transform;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.cword:hover {
  color: var(--red);
  text-shadow: 0 0 14px rgba(255, 0, 0, 0.45);
}

.cword.is-dragging {
  cursor: grabbing;
  color: var(--red);
  text-shadow: 0 0 14px rgba(255, 0, 0, 0.45);
}

/* ---- popup ---- */

.cpopup {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* display:flex écraserait le display:none de l'attribut hidden (UA stylesheet) */
.cpopup[hidden] { display: none; }

.cpopup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.cpopup__box {
  position: relative;
  width: min(712px, 100%);
  max-height: min(620px, 92vh);
  overflow-y: auto;
  background: var(--black);
  border: 1px solid var(--white);
  padding: 36px 48px 48px;
  color: var(--white);
}

.cpopup__close {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: transform 0.3s ease;
}

.cpopup__close svg { width: 14px; height: 14px; }
.cpopup__close:hover { transform: rotate(90deg); }

.cpopup__title {
  font-weight: 400;
  font-size: 26px;
  line-height: normal;
}

.cpopup__img {
  margin-top: 30px;
  width: 192px;
  border: 1px solid var(--white);
}

.cpopup__img img {
  display: block;
  width: 100%;
  aspect-ratio: 192 / 171;
  object-fit: cover;
}

.cpopup__text {
  margin-top: 36px;
  max-width: 349px;
  font-size: 15px;
  line-height: normal;
}

@media (max-width: 640px) {
  .cpopup__box { padding: 28px 24px 36px; }
  .cpopup__close { top: 22px; right: 20px; }
}

/* ============ Page Mentions légales ============ */

.legal-page { background: var(--black); }

.legal {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 160px var(--pad-x) 120px;
  color: var(--white);
}

.legal__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
}

.legal__meta {
  margin-top: 14px;
  margin-bottom: 64px;
  font-size: 13px;
  opacity: 0.55;
}

.legal__block { margin-bottom: 52px; }

.legal__block h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.legal__block p {
  font-size: 14px;
  line-height: 1.75;
}

.legal__block p + p { margin-top: 14px; }

.legal__list {
  list-style: none;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  line-height: 1.6;
}

.legal__block a {
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.3s ease;
}

.legal__block a:hover { color: var(--red); }

@media (max-width: 900px) {
  .legal { padding: 110px var(--pad-x) 80px; }
  .legal__meta { margin-bottom: 44px; }
  .legal__block { margin-bottom: 40px; }
  .legal__block h2 { font-size: 22px; }
}

/* ============ Page Contact ============ */

.contact-page {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--black);
}

.contact {
  position: fixed;
  inset: 0;
}

/* Bloc gauche : carousel vertical infini */
.contact__carousel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 49.8%;
  overflow: hidden;
}

.contact__track {
  display: flex;
  flex-direction: column;
  will-change: transform;
  /* 2 jeux d'images identiques → translateY(-50%) = exactement un jeu : boucle
     sans couture (images collées, aucun écart). */
  animation: contactScroll 50s linear infinite;
}

.contact__track img {
  display: block;
  width: 100%;
  height: 100vh;
  height: 100svh;
  object-fit: cover;
}

@keyframes contactScroll {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

/* Bloc droite : informations de contact (immobile, centré dans la moitié droite) */
.contact__info {
  position: absolute;
  top: 50%;
  right: 0;
  width: 50.2%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  text-align: center;
}

.contact__logo {
  width: 36px;
  aspect-ratio: 36 / 57.6308;
  height: auto;
}

.contact__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  line-height: normal;
  color: var(--white);
  mix-blend-mode: luminosity;
}

.contact__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 13px;
  color: #a1a1a1;
}

.contact__links a {
  transition: color 0.3s ease;
}

.contact__links a:hover { color: var(--white); }
.contact__ig { text-decoration: underline; text-underline-offset: 2px; }

.contact__copyright {
  position: absolute;
  bottom: 18px;
  right: 0;
  width: 50.2%;
  text-align: center;
  font-weight: 500;
  font-size: 10px;
  color: #a1a1a1;
}

@media (prefers-reduced-motion: reduce) {
  .contact__track { animation: none; }
}

@media (max-width: 900px) {
  /* Mobile : pas de carousel, bloc contact centré plein écran */
  .contact__carousel { display: none; }

  .contact__info {
    right: 0;
    left: 0;
    width: 100%;
    gap: 15px;
  }

  .contact__logo { width: 42px; }
  .contact__title { font-size: 36px; }
  .contact__links { font-size: 15px; gap: 11px; }

  .contact__copyright {
    left: 0;
    width: 100%;
    bottom: 19px;
    font-size: 12px;
  }
}

/* ============ Work responsive ============ */

@media (max-width: 900px) {
  .wfilters--side { display: none; }
  .wfilters-toggle { display: flex; }

  /* Le meta couvre la scène (sans transform) : la ligne passe à droite via
     ::before et la date s'ancre en bas au centre. */
  .wslider__meta {
    inset: 0;
    left: 0;
    top: 0;
    transform: none;
    height: auto;
  }

  .wslider__meta::before {
    left: auto;
    right: 20px;
    top: 50%;
    bottom: auto;
    height: min(489px, 62vh);
    transform: translateY(-50%);
  }

  .wslider__info {
    position: absolute;
    left: 50%;
    right: auto;
    top: auto;
    bottom: 64px;
    transform: translateX(-50%);
    width: auto;
  }

  .wslider__date { justify-content: center; }
  .wslider__tick { display: none; }
  .wslider__project { display: none; }

  /* Les zones de fondu captent les taps : on ne peut plus ouvrir par erreur
     un projet caché en haut/bas (près de "Filtres" ou "Slider / List").
     Le scroll reste géré par Lenis au niveau window, donc inchangé. */
  .wslider__fade--top,
  .wslider__fade--bottom { pointer-events: auto; }

  .wlist { padding: 112px 26px 80px; }
  .wlist__head { display: none; }
  .wlist__table { margin-top: 20px; }

  .wlist__strip { display: none; }

  /* Fondu noir fixe en haut : les lignes s'effacent sous le bouton "Filtres"
     au lieu de se superposer (même principe que le fondu du slider). */
  body.view-list::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 140px;
    z-index: 44;
    pointer-events: none;
    background: linear-gradient(to bottom, var(--black) 68%, rgba(0, 0, 0, 0));
  }

  .view-switch {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    bottom: 23px;
  }
}

/* Colonnes de la liste : on ne passe au format 3 colonnes que sur les
   écrans réellement étroits — entre 640 et 900 la grille desktop tient.
   Proportions de la maquette mobile (147/114/60 sur 321) : la colonne
   Description vient se caler au bord droit. */
@media (max-width: 640px) {
  .wrow {
    grid-template-columns: 45.8% 35.5% 1fr;
    padding: 4px 0 13px;
    font-size: 13px;
    line-height: 16px;
  }

  .wrow > :nth-child(3) { text-align: right; padding-right: 0; }
  .wrow > :last-child { display: none; }
}

/* ============ Reduced motion ============ */

@media (prefers-reduced-motion: reduce) {
  .preloader { display: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
