/* ==========================================================================
   SAY MANOA — Portfolio
   Fonts: SF Pro (display — Apple system font, Inter elsewhere) + Montserrat (UI/body)
   Palette: black & white only — the works bring the colour.
   Language: cinematic framed images, paper rectangles (the "ticket"), quick curtains.

   SOMMAIRE (Ctrl+F sur le titre de section, ex. « ---------- Footer »)
     Couleurs, polices, marges ....... :root  (juste en dessous)
     Base, titres, boutons ........... .display / .label / .rect-btn
     ---------- Brand + ticket nav ... logo en haut à gauche, Contact, fenêtres, ticket + menu
     ---------- Page shell / curtain . rideau noir entre les pages, apparitions
     ---------- Framed cinematic hero  grands écrans de l'accueil + haut des pages projet
     ---------- Home ................. « Discover more » (cartes des catégories)
     ---------- Works index .......... page Travaux (filtres, blocs par dossier)
     ---------- Project page ......... page projet (papier, description, pièce phare, suivant)
     ---------- Footer ............... pied de page
     ---------- Gallery grid ......... galerie en rangées justifiées
     ---------- Viewer ............... visionneuse plein écran + écran « fin de projet »
     ---------- Presentation ......... page Présentation
     ---------- Intro ................ écran d'ouverture
     ---------- Responsive ........... tablette (≤ 900px), téléphone (≤ 600px), animations réduites
   ========================================================================== */

:root {
  --bg: #0b0b0b;
  --bg-deep: #050505;
  --surface: #161616;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #f5f5f5;
  /* Near-white tones for the title hierarchy (page > category > folder). */
  --tone-1: #f7f7f7;
  --tone-2: #e2e2e2;
  --tone-3: #c4c4c4;
  --text-muted: #a3a3a3;
  --text-dim: #6b6b6b;
  --paper: #f2f2f2;
  --paper-2: #e4e4e4;
  --ink: #0b0b0b;
  --ink-line: rgba(11, 11, 11, 0.16);

  /* SF Pro can't be served from a website (Apple licence): Apple devices use their own copy,
     everyone else gets Inter, its closest free twin (only downloaded where SF Pro is missing). */
  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-ui: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 3vw, 40px);
  --frame: 10px;            /* inset of the framed sections */
  --nav-h: 96px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.7, 0, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; scrollbar-color: #333 transparent; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Film grain keeps the flat ink canvas from looking digital-dead. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 0; }
::selection { background: var(--text); color: var(--ink); }

.display {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.02;   /* titles that wrap (phones) keep air between their lines */
  letter-spacing: -0.035em;
  font-synthesis: none;
  /* Box = cap height to baseline, so spacing above/below is exact whatever the font. */
  text-box: trim-both cap alphabetic;
}

.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.tabular { font-variant-numeric: tabular-nums; }

/* Rectangle buttons — the site's one button shape */
.rect-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 42px;
  padding: 0 16px;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.rect-btn svg { width: 14px; height: 14px; flex: none; transition: transform 0.4s var(--ease); }
.rect-btn:hover { background: #fff; }
.rect-btn:hover svg { transform: translateX(3px); }
.rect-btn--dark { background: var(--ink); color: var(--paper); }
.rect-btn--dark:hover { background: #222; }
.rect-btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.rect-btn--ghost:hover { background: rgba(255, 255, 255, 0.2); }
.rect-btn--back svg { transform: rotate(180deg); }
.rect-btn--back:hover svg { transform: rotate(180deg) translateX(3px); }

/* ---------- Brand + ticket nav ------------------------------------------- */

/* Own fixed layer so `difference` blends with the page: white on images, black on paper. */
.brand {
  position: fixed;
  top: 26px;
  left: var(--gutter);
  z-index: 61;
  mix-blend-mode: difference;
  transition: transform 0.5s var(--ease), opacity 0.4s;
}
.brand img { height: 34px; width: auto; }

.nav {
  position: fixed;
  top: 16px;
  right: var(--gutter);
  z-index: 62;   /* above the brand: an opened ticket covers the logo on phones */
  display: flex;
  align-items: flex-start;
  gap: 8px;
  transition: transform 0.5s var(--ease), opacity 0.4s;
}
.chrome-hidden .nav, .chrome-hidden .brand { transform: translateY(-140%); opacity: 0; }
.chrome-hidden .nav { pointer-events: none; }

/* Contact: a paper rectangle next to the ticket, same height as its project row. */
.nav__contact {
  height: 52px;
  padding: 0 18px;
  background: var(--paper);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(0, 0, 0, 0.06);
  transition: background 0.2s;
}
.nav__contact:hover { background: #fff; }

/* Modal: contact links or the Ayn Studio note, unfolding like the ticket. */
.modal { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: var(--gutter); visibility: hidden; transition: visibility 0s linear 0.5s; }
.modal.is-open { visibility: visible; transition: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(5, 5, 5, 0.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity 0.4s var(--ease); }
.modal.is-open .modal__backdrop { opacity: 1; }
.modal__box {
  position: relative;
  width: min(440px, 100%);
  padding: 28px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.55s var(--ease-in-out);
}
.modal.is-open .modal__box { clip-path: inset(0); }
.modal__close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; display: grid; place-items: center; transition: background 0.2s; }
.modal__close:hover { background: var(--paper-2); }
.modal__close svg { width: 15px; height: 15px; }
.modal__box .label { color: rgba(11, 11, 11, 0.5); }
.modal__title { margin: 18px 0 0; font-size: clamp(34px, 4vw, 48px); color: var(--ink); }
.modal__text { margin: 16px 0 0; font-size: 15px; line-height: 1.5; font-weight: 500; color: #3a3a3a; }
.modal__links { margin-top: 22px; border-top: 1px solid var(--ink-line); }
.mrow {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 12px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--ink-line);
  transition: background 0.2s, padding 0.35s var(--ease);
}
.mrow:hover { background: var(--paper-2); padding-left: 10px; }
.mrow b { font-size: 15px; font-weight: 700; }
.mrow svg { width: 13px; height: 13px; }
.modal__cta { margin-top: 22px; }

/* The "ticket": one paper rectangle. Left = current project (opens the project list),
   right = menu square (opens the menu panel). Both open downwards. */
.ticket {
  --t-line: var(--ink-line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  width: 316px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 0;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.ticket__main { min-width: 0; transition: opacity 0.3s; }
.ticket.menu-open .ticket__main { opacity: 0; pointer-events: none; }

.ticket__project {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px 9px 9px;
  text-align: left;
}
.ticket.no-project .ticket__thumb { display: none; }
.ticket__thumb {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 0;
  overflow: hidden;
  background: var(--ink);
}
.ticket__thumb img, .ticket__thumb video { width: 100%; height: 100%; object-fit: cover; }
.ticket__name {
  flex: 1;
  min-width: 0;
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ticket__name span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: tick-in 0.55s var(--ease) both; }
@keyframes tick-in { from { transform: translateY(105%); } to { transform: none; } }
.ticket__chev { flex: none; width: 14px; height: 14px; transition: transform 0.4s var(--ease); }
.ticket.list-open .ticket__chev { transform: rotate(180deg); }

.ticket__cells {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--t-line);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: rgba(11, 11, 11, 0.6);
}
.ticket__cells span {
  padding: 6px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.ticket__cells span + span { border-left: 1px solid var(--t-line); }

.ticket__menu {
  display: grid;
  place-items: center;
  border-left: 1px solid var(--t-line);
  transition: background 0.25s;
}
.ticket__menu:hover { background: var(--paper-2); }
.burger { position: relative; width: 20px; height: 12px; }
.burger i {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.45s var(--ease), opacity 0.25s, top 0.45s var(--ease);
}
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: 5px; }
.burger i:nth-child(3) { top: 10px; }
.ticket.menu-open .burger i:nth-child(1) { top: 5px; transform: rotate(45deg); }
.ticket.menu-open .burger i:nth-child(2) { opacity: 0; transform: scaleX(0); }
.ticket.menu-open .burger i:nth-child(3) { top: 5px; transform: rotate(-45deg); }

/* Drop areas unfold with a grid-rows transition (0fr → 1fr). */
/* Both share row 2: a closed one must not sit over the open one and swallow its clicks,
   so it is hidden (after its closing animation) and never stretched. */
.ticket__drop, .ticket__panel {
  display: grid;
  grid-template-rows: 0fr;
  grid-row: 2;
  align-self: start;
  visibility: hidden;
  transition: grid-template-rows 0.55s var(--ease), visibility 0s linear 0.55s;
}
.ticket__drop { grid-column: 1; }
.ticket__panel { grid-column: 1 / -1; }
.ticket__drop > div, .ticket__panel > div { overflow: hidden; min-height: 0; }
.ticket.list-open .ticket__drop, .ticket.menu-open .ticket__panel {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.55s var(--ease), visibility 0s;
}

.ticket__scroll {
  max-height: min(58vh, 520px);
  overflow-y: auto;
  scrollbar-width: thin;
  border-top: 1px solid var(--t-line);
}
.tgroup + .tgroup { border-top: 1px solid var(--t-line); }
/* Row = category link (goes to the category) + chevron square (unfolds its projects). */
.tgroup__head { display: flex; align-items: stretch; }
.tgroup__link {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.2s;
}
.tgroup__link:hover { background: var(--paper-2); }
.tgroup__link small { font-size: 9px; font-weight: 700; color: rgba(11, 11, 11, 0.45); }
.tgroup__toggle {
  flex: none;
  width: 40px;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--t-line);
  transition: background 0.2s;
}
.tgroup__toggle:hover { background: var(--paper-2); }
.tgroup__toggle svg { width: 14px; height: 14px; transition: transform 0.4s var(--ease); }
.tgroup.is-open .tgroup__toggle svg { transform: rotate(180deg); }
.tgroup__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease); }
.tgroup__body > div { overflow: hidden; min-height: 0; }
.tgroup.is-open .tgroup__body { grid-template-rows: 1fr; }
.titem {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 9px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-top: 1px solid var(--t-line);
  opacity: 0;
  transform: translateY(-6px);
  transition: background 0.2s, opacity 0.35s, transform 0.45s var(--ease);
}
.tgroup.is-open .titem { opacity: 1; transform: none; transition-delay: 0s, calc(var(--k) * 30ms + 60ms), calc(var(--k) * 30ms + 60ms); }
.titem:hover, .titem:focus-visible { background: var(--paper-2); }
.titem.is-current { font-weight: 800; }
.titem img, .titem video { width: 26px; height: 26px; border-radius: 0; object-fit: cover; background: var(--ink); }
.titem span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titem svg {
  width: 22px;
  height: 22px;
  padding: 5px;
  border: 1px solid var(--t-line);
  border-radius: 0;
  opacity: 0;
  transition: opacity 0.2s;
}
.titem:hover svg, .titem.is-current svg { opacity: 1; }

.ticket__links { display: flex; flex-direction: column; padding: 14px 16px 8px; border-top: 1px solid var(--t-line); }
.ticket__links a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 0 7px;   /* room above for accents (PRÉSENTATION) */
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 30px;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-box: trim-both cap alphabetic;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s, transform 0.55s var(--ease), letter-spacing 0.4s var(--ease);
}
.ticket__links a small {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(11, 11, 11, 0.45);
}
.ticket__links a:hover { letter-spacing: 0.04em; }
.ticket.menu-open .ticket__links a { opacity: 1; transform: none; }
.ticket.menu-open .ticket__links a:nth-child(2) { transition-delay: 0.06s; }
.ticket.menu-open .ticket__links a:nth-child(3) { transition-delay: 0.12s; }
.ticket__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--t-line);
  font-size: 9px;
  color: rgba(11, 11, 11, 0.55);
}
.ticket__row a { color: var(--ink); font-weight: 700; }
.ticket__row a:hover { text-decoration: underline; }

/* ---------- Page shell / curtain ---------------------------------------- */

#app { min-height: 100vh; }

/* Quick black curtain between pages: rises from the bottom, leaves through the top. */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  background: var(--bg-deep);
  clip-path: inset(100% 0 0 0);
  pointer-events: none;
}
.curtain.is-in { clip-path: inset(0); transition: clip-path 0.42s var(--ease-in-out); }
.curtain.is-out { clip-path: inset(0 0 100% 0); transition: clip-path 0.6s var(--ease-in-out); }
.curtain__label { font-size: clamp(40px, 6vw, 88px); font-weight: 400; color: var(--tone-2); opacity: 0; transform: translateY(20px); transition: opacity 0.3s, transform 0.5s var(--ease); }
.curtain.is-in .curtain__label { opacity: 1; transform: none; transition-delay: 0.12s; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Framed cinematic hero (home slides + project hero) ----------- */

.slide {
  position: relative;
  height: 100vh;
  height: 100svh;
  padding: var(--frame);
}
.frame {
  position: relative;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  background: var(--surface);
  isolation: isolate;
}
.frame__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transform: scale(1.14);
  transition: transform 2s var(--ease);
}
.is-active .frame__media { transform: scale(1); }
.home .frame { cursor: pointer; }   /* the whole picture opens the project */
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 26%, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 55%);
}

.frame__top {
  position: absolute;
  top: calc(var(--nav-h) - 8px);
  left: clamp(18px, 2.4vw, 32px);
  display: flex;
  gap: 18px;
  color: rgba(255, 255, 255, 0.78);
}
.frame__bottom {
  position: absolute;
  left: clamp(18px, 2.4vw, 32px);
  right: clamp(18px, 2.4vw, 32px);
  bottom: clamp(18px, 2.4vw, 32px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px 32px;
}
.frame__title { margin: 0; font-size: clamp(48px, 8vw, 132px); font-weight: 600; color: #fff; }

/* Letters roll up from under the baseline when the slide becomes active. */
.roll { display: inline-block; white-space: nowrap; clip-path: inset(-60% -6% 0 -6%); }
.roll > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 0.9s var(--ease);
  transition-delay: calc(var(--d) * 28ms + 120ms);
}
.is-active .roll > span { transform: none; }

.cells {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  width: max-content;
  max-width: 100%;
  margin: 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s, transform 0.8s var(--ease);
  transition-delay: 0.35s;
}
.is-active .cells { opacity: 1; transform: none; }
.cells div { padding: 9px 26px 0 0; }
.cells div + div { padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, 0.25); }
.cells dt { font-size: 9px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.cells dd { margin: 3px 0 0; font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; }

.frame__side {
  position: absolute;
  right: clamp(18px, 2.4vw, 32px);
  top: 50%;
  width: clamp(110px, 10vw, 150px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.8s 0.4s;
}
.is-active .frame__side { opacity: 1; }
.frame__side figure { margin: 0; aspect-ratio: 4 / 3; border-radius: 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.2); background: var(--surface); }
.frame__side img, .frame__side video { width: 100%; height: 100%; object-fit: cover; }
.frame__side .label { color: rgba(255, 255, 255, 0.7); margin-top: 4px; }

.frame__cta { opacity: 0; transform: translateY(10px); transition: opacity 0.6s 0.45s, transform 0.8s 0.45s var(--ease); }
.is-active .frame__cta { opacity: 1; transform: none; }


/* ---------- Home: "Discover more" → categories -------------------------- */

.discover {
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 24px) var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.discover > .label { display: block; margin-bottom: clamp(20px, 2.4vw, 34px); }
.discover__title { margin: 0; font-size: clamp(52px, 8vw, 132px); font-weight: 600; color: var(--tone-1); }
.dgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--frame);
  margin-top: clamp(28px, 4vh, 44px);
}
.dcard {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 0;
  overflow: hidden;
  isolation: isolate;
  background: var(--surface);
}
.dcard img, .dcard video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, center); z-index: -2; transition: transform 1.1s var(--ease); }
.dcard::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 30%, rgba(0, 0, 0, 0.75) 100%); }
.dcard:hover img, .dcard:hover video { transform: scale(1.05); }
.dcard__info {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.dcard__info .label { display: block; margin-bottom: 12px; color: rgba(255, 255, 255, 0.75); }
.dcard__name { display: block; font-size: clamp(28px, 2.6vw, 44px); font-weight: 500; color: #fff; }
.dcard .rect-btn { width: 42px; padding: 0; justify-content: center; }
.dcard:hover .rect-btn svg { transform: translateX(3px); }
.discover__all { align-self: flex-start; margin-top: 22px; }

/* ---------- Works index ------------------------------------------------- */

.works { padding: calc(var(--nav-h) + clamp(24px, 5vh, 56px)) var(--gutter) 0; }
.works__head > .label { display: block; margin-bottom: clamp(20px, 2.4vw, 34px); }
.works__title { margin: 0; font-size: clamp(64px, 11vw, 170px); font-weight: 600; color: var(--tone-1); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: clamp(24px, 4vh, 40px); }
.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.filter small { font-size: 9px; color: var(--text-dim); }
.filter:hover { color: var(--text); border-color: var(--text); }
.filter.is-active { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.filter.is-active small { color: rgba(11, 11, 11, 0.5); }

.wsection { margin-top: clamp(56px, 9vh, 96px); }
.wsection__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.wsection__title { margin: 0; font-size: clamp(32px, 4vw, 60px); font-weight: 500; color: var(--tone-2); }

/* Every work at once, a titled block per sub-folder (DOOR, DVM… / LOGOFX, TYPO ANIM…) */
.gsub { margin-top: clamp(28px, 4vh, 44px); }
.gsub__head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.gsub__title { margin: 0; font-size: clamp(22px, 2.4vw, 36px); font-weight: 400; letter-spacing: -0.02em; color: var(--tone-3); }
.gsub__link { display: inline-flex; align-items: center; gap: 8px; transition: color 0.2s; }
.gsub__link svg { width: 13px; height: 13px; transition: transform 0.4s var(--ease); }
.gsub__link:hover { color: var(--text); }
.gsub__link:hover svg { transform: translateX(3px); }

/* ---------- Project page ------------------------------------------------ */

.phero__back { position: absolute; top: calc(var(--nav-h) - 14px); left: clamp(18px, 2.4vw, 32px); }
.phero .phero__meta { color: rgba(255, 255, 255, 0.75); }
.phero .phero__title { margin-top: 18px; }

.paper {
  margin: 0 var(--frame);
  padding: clamp(56px, 9vh, 104px) clamp(16px, 4vw, 56px);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
}
.paper .label { color: rgba(11, 11, 11, 0.55); }
.rule-title {
  margin: clamp(18px, 2.4vw, 28px) 0 0;
  padding: clamp(14px, 2vw, 22px) 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.rule-title h2 { margin: 0; font-size: clamp(48px, 7vw, 112px); font-weight: 600; }
.dot { display: block; width: 9px; height: 9px; margin: 14px auto 0; border-radius: 50%; background: var(--ink); }

.feature {
  position: relative;
  display: block;
  width: 100%;
  max-width: 1120px;
  margin: clamp(36px, 6vh, 60px) auto 0;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  overflow: hidden;
  background: #000;
}
.feature img, .feature video { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.feature:hover img, .feature:hover video { transform: scale(1.03); }
.feature__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
}
.feature__play i {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  transition: transform 0.5s var(--ease);
}
.feature:hover .feature__play i { transform: scale(1.08); }
.feature__play i svg { width: 20px; height: 20px; margin-left: 3px; }
.feature__play .label { color: #fff; }

/* Short project description, under the title (project pages only). */
.pdesc {
  max-width: 620px;
  margin: clamp(22px, 3vh, 32px) auto 0;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.5;
  font-weight: 500;
  color: #3a3a3a;
  text-wrap: balance;
}

.section { padding: clamp(72px, 12vh, 128px) var(--gutter) 0; }
.section__head { display: flex; justify-content: center; margin-bottom: clamp(24px, 4vh, 40px); }
.tag {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pnext {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--frame);
  margin: clamp(72px, 12vh, 128px) var(--frame) 0;
}
.pnext a { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: clamp(220px, 32vh, 340px); padding: 20px; border-radius: 0; overflow: hidden; }
.pnext__all { background: var(--paper); color: var(--ink); }
.pnext__all .label { color: rgba(11, 11, 11, 0.55); }
.pnext__next { background: var(--ink); color: #fff; border: 1px solid var(--line); isolation: isolate; }
.pnext__next img, .pnext__next video { position: absolute; inset: 0 0 0 38%; width: 62%; height: 100%; object-fit: cover; z-index: -1; transition: transform 1.2s var(--ease); }
.pnext__next::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--ink) 38%, rgba(11, 11, 11, 0.2) 70%); }
.pnext__next:hover img, .pnext__next:hover video { transform: scale(1.05); }
.pnext__next .pnext__meta { color: rgba(255, 255, 255, 0.7); }
.pnext h3 { margin: 0; font-size: clamp(32px, 3.4vw, 56px); font-weight: 500; }
.pnext .rect-btn { align-self: flex-start; }

/* ---------- Footer ------------------------------------------------------ */

.sitefoot {
  margin: var(--frame);
  margin-top: clamp(72px, 12vh, 128px);
  padding: clamp(40px, 6vh, 64px) clamp(16px, 4vw, 56px) 22px;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
}
.sitefoot__big { text-align: center; }
.sitefoot__big p {
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6.4vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-box: trim-both cap alphabetic;
}
.sitefoot__big p:first-child { border-top: 1px solid var(--ink); }
/* Same block, two weights: heavy "CREATIVE", light "DESIGNER". */
.sitefoot__big p:last-child { font-weight: 300; color: #3a3a3a; }
.sitefoot__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(32px, 5vh, 48px);
  text-align: center;
}
.sitefoot__cols .label { display: block; margin-bottom: 10px; color: rgba(11, 11, 11, 0.5); font-size: 9px; }
.sitefoot__cols a { display: block; font-weight: 600; font-size: 14px; padding: 2px 0; }
.sitefoot__cols a:hover { text-decoration: underline; }
.sitefoot__bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: clamp(32px, 5vh, 48px); }
.sitefoot__bottom img { height: 34px; width: auto; }
.sitefoot__bottom .label { color: rgba(11, 11, 11, 0.5); align-self: center; }

/* ---------- Gallery grid (justified rows) ------------------------------- */

.grid { display: flex; flex-wrap: wrap; gap: var(--gap, 12px); }
.card {
  position: relative;
  flex: none;
  border-radius: 0;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  isolation: isolate;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.8s var(--ease);
}
.card.is-in { opacity: 1; transform: none; }
.card__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: transform 1.1s var(--ease), opacity 0.6s;
}
.card__media.is-loaded { opacity: 1; }
.card:hover .card__media { transform: scale(1.035); }
.card__play {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  padding: 4px 7px;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

/* ---------- Viewer (lightbox) ------------------------------------------- */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: rgba(6, 6, 6, 0.97);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s;
}
.viewer.is-open { opacity: 1; visibility: visible; transition: opacity 0.4s var(--ease); }
.viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px var(--gutter); }
.viewer__path { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer__path b { color: var(--text); font-weight: 600; }
.viewer__right { display: flex; align-items: center; gap: 10px; flex: none; }
.sq-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  transition: background 0.25s;
}
.sq-btn:hover { background: rgba(255, 255, 255, 0.18); }
.sq-btn svg { width: 16px; height: 16px; }
.viewer__stage { position: relative; min-height: 0; }
.viewer__frame { position: absolute; inset: 0 calc(var(--gutter) + 64px); display: grid; place-items: center; }
.viewer__frame > * { min-width: 0; min-height: 0; }
.viewer__media { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 0; animation: media-in 0.6s var(--ease) both; }
@keyframes media-in { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.viewer__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.viewer__nav--prev { left: var(--gutter); }
.viewer__nav--next { right: var(--gutter); }

.viewer__rail { padding: 0 var(--gutter) 20px; min-width: 0; }
.viewer__rail[hidden] { display: none; }
.rail__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 14px; margin-bottom: 12px; border-top: 1px solid var(--line); }
.rail__head b { color: var(--text); font-weight: 700; }
.rail__head a { color: var(--text); flex: none; }
.rail__head a:hover { opacity: 0.7; }
.rail__strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 3px; }
.rail__strip::-webkit-scrollbar { display: none; }
.rail__item {
  position: relative;
  flex: none;
  height: 64px;
  border-radius: 0;
  overflow: hidden;
  background: var(--surface);
  opacity: 0.45;
  outline: 1px solid transparent;
  outline-offset: 2px;
  transition: opacity 0.25s, outline-color 0.25s;
}
.rail__item:hover { opacity: 1; }
.rail__item.is-current { opacity: 1; outline-color: var(--text); }
.rail__item img, .rail__item video { width: 100%; height: 100%; object-fit: cover; }

/* End of a project: offer the next one */
.endcard { width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; animation: media-in 0.6s var(--ease) both; }
.endcard > .label { margin-bottom: clamp(18px, 2vw, 26px); }
.endcard__from { margin: 0; font-size: clamp(40px, 5.6vw, 80px); font-weight: 300; color: var(--tone-3); }
.endcard__q { margin: clamp(22px, 2.6vw, 34px) 0 22px; font-size: clamp(18px, 1.6vw, 24px); font-weight: 600; letter-spacing: -0.02em; }
.endcard__next {
  width: 100%;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 8px;
  text-align: left;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  transition: background 0.3s;
}
.endcard__next:hover { background: #fff; }
.endcard__next img, .endcard__next video { width: 132px; height: 96px; object-fit: cover; border-radius: 0; }
.endcard__meta { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.endcard__meta .label { color: rgba(11, 11, 11, 0.55); }
.endcard__name { font-size: clamp(26px, 2.6vw, 36px); font-weight: 600; overflow-wrap: anywhere; }
.endcard__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }

/* ---------- Presentation ------------------------------------------------ */

/* Centred in the screen: photo + text as one block (side by side on large screens). */
.about { padding: 0 var(--gutter); }
.about__inner {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(26px, 4vh, 40px);
  padding: calc(var(--nav-h) + 8px) 0 clamp(32px, 6vh, 64px);
}
/* The block stays centred in the screen; its text reads from the left. */
.about__text { display: flex; flex-direction: column; align-items: flex-start; width: min(460px, 100%); text-align: left; }
.about__logo { width: min(240px, 60vw); height: auto; }
.about__photo {
  margin: 0;
  width: min(100%, 420px);
  aspect-ratio: 1357 / 2000;
  overflow: hidden;
  background: var(--surface);
}
.about__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.about__photo:hover img { transform: scale(1.03); }

.about__bio {
  margin: clamp(20px, 3vh, 28px) 0 0;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.45;
  font-weight: 500;
  color: var(--tone-2);
  text-wrap: balance;
}
.about__bio strong { color: var(--tone-1); font-weight: 700; }
.about__bio em { font-style: normal; color: var(--text-muted); }

/* Where / languages: two ticket-like cells between hairlines. */
.about__facts {
  display: flex;
  margin: 18px 0 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.about__facts div { padding: 10px 22px; }
.about__facts div + div { border-left: 1px solid var(--line-strong); }
.about__facts dt { font-size: 9px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }
.about__facts dd { margin: 4px 0 0; font-size: 14px; font-weight: 600; color: var(--tone-1); }

/* The five crafts: one row each between hairlines, all on the same left edge.
   Weights and whites alternate so the list breathes. */
.roles {
  list-style: none;
  width: 100%;
  margin: clamp(20px, 3vh, 28px) 0 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
}
.roles li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
/* Normal line box (not cap-trimmed) so an accent (RÉALISATEUR) never makes its row taller. */
.role {
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: var(--tone-1);
}
.roles li:nth-child(even) .role { font-weight: 300; color: var(--tone-3); }

.about__actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin-top: clamp(22px, 3vh, 30px); }
.about .sitefoot { margin-left: calc(var(--frame) - var(--gutter)); margin-right: calc(var(--frame) - var(--gutter)); }

/* Large screens: photo and text side by side. The text column is exactly as tall as the
   photo — the logo starts at the photo's top edge, the buttons end at its bottom edge, the
   blocks share the space between. --ph = that shared height. */
@media (min-width: 1000px) {
  .about__inner { --ph: clamp(600px, 76vh, 720px); flex-direction: row; align-items: center; gap: clamp(48px, 6vw, 96px); }
  .about__photo { width: auto; }
  .about__photo, .about__text { height: var(--ph); }
  .about__text { justify-content: space-between; }
  .about__text > * { margin-top: 0; }
  .about__actions { flex-wrap: nowrap; gap: 6px; }
  .about__actions .rect-btn { padding: 0 12px; gap: 10px; }
}

/* ---------- Intro ------------------------------------------------------- */

.no-intro .intro { display: none; }
.is-intro { overflow: hidden; }
.is-intro .page { animation-play-state: paused; }

.intro {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: var(--bg-deep);
  cursor: pointer;
  transition: clip-path 0.75s var(--ease-in-out);
  clip-path: inset(0);
}
.intro.is-out { clip-path: inset(0 0 100% 0); pointer-events: none; }
.intro__stage { width: min(440px, 70vw); display: flex; flex-direction: column; gap: 14px; }
.intro__label { clip-path: inset(0 100% 0 0); animation: label-wipe 0.7s var(--ease-in-out) 0.15s forwards; }
.intro__label img { width: 100%; height: auto; }
@keyframes label-wipe { to { clip-path: inset(0); } }
.intro__meta { display: flex; justify-content: space-between; opacity: 0; animation: fade 0.5s ease 0.6s forwards; }
.intro__meta b { color: var(--text); font-weight: 600; }
@keyframes fade { to { opacity: 1; } }
.intro__bar { height: 1px; background: var(--line); }
.intro__bar i { display: block; height: 100%; background: var(--text); transform: scaleX(0); transform-origin: left; }

/* ---------- Responsive -------------------------------------------------- */

@media (max-width: 900px) {
  .frame__side { display: none; }
  .frame__bottom { grid-template-columns: 1fr; }
  .dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Folder heads: title on its own line, the "éléments — Page du projet" link under it. */
  .gsub__head { grid-template-columns: 32px minmax(0, 1fr); row-gap: 10px; }
  .gsub__link { grid-column: 2; }
  .pnext { grid-template-columns: 1fr; }
  .viewer__frame { inset: 0 var(--gutter) 60px; }
  .viewer__nav { top: auto; bottom: 6px; transform: none; }
}

@media (max-width: 600px) {
  :root { --nav-h: 84px; --frame: 6px; }
  .brand { top: 24px; left: 14px; }
  .brand img { height: 26px; }
  /* Phones: Contact sits under the ticket, right-aligned. */
  .nav { top: 12px; right: 12px; flex-direction: column-reverse; align-items: flex-end; gap: 6px; }
  .nav__contact { height: 30px; padding: 0 12px; font-size: 9.5px; }
  .ticket { width: 200px; grid-template-columns: minmax(0, 1fr) 44px; transition: width 0.45s var(--ease); }
  /* Opened on a phone, it widens so category names fit on one line. */
  .ticket.list-open, .ticket.menu-open { width: min(300px, calc(100vw - 24px)); }
  .ticket__project { gap: 8px; padding: 7px 8px 7px 7px; }
  .tgroup__link { padding: 11px 9px; font-size: 9.5px; letter-spacing: 0.06em; }
  .tgroup__link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tgroup__toggle { width: 36px; }
  .ticket__thumb { width: 28px; height: 28px; }
  .ticket__name { font-size: 10.5px; }
  .ticket__cells span:nth-child(3) { display: none; }
  .ticket__cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ticket__links a { font-size: 26px; }
  .frame__title { font-size: clamp(40px, 12vw, 64px); }
  .cells { grid-template-columns: repeat(2, auto); }
  .cells div:nth-child(3) { display: none; }
  .frame__cta { justify-self: start; }
  .sitefoot__cols { grid-template-columns: 1fr; }
  .dgrid { grid-template-columns: 1fr; }
  .dcard { aspect-ratio: 16 / 9; }
  .viewer__right .label { display: none; }
  .endcard__next { grid-template-columns: 96px minmax(0, 1fr); }
  .endcard__next img, .endcard__next video { width: 96px; height: 72px; }
}

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