/* ============================================================
   OCHRALAB — Galerie
   Minimalisme exagéré : typographie surdimensionnée,
   blanc généreux, la photographie domine.
   ============================================================ */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #fafaf7;
  --ink: #141311;
  --ink-soft: #6e6a62;
  --line: #e5e2db;
  --accent: #a16207;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 7rem;
  --space-7: 11rem;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --header-h: 4.5rem;
  --rail: 13.5rem;
  /* Écart entre vignettes de la mosaïque : quasi jointives, comme une
     galerie de photos de téléphone. */
  --tile-gap: 3px;
  /* Largeur réellement disponible : le menu latéral ampute la fenêtre.
     Les grands titres se dimensionnent là-dessus, pas sur 100vw. */
  --content-w: 100vw;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Colonne verticale : sur une page courte (Contact), le contenu occupe
     la hauteur et le pied de page reste ancré en bas plutôt que de
     flotter au milieu. */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1 0 auto;
}

img {
  max-width: 100%;
  display: block;
}

a,
button {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
}
.skip-link:focus {
  top: 0.5rem;
}

/* Lu par les lecteurs d'écran, absent de l'écran. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Utils typographiques ---------- */

.label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.display {
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.95;
  text-transform: uppercase;
  margin: 0;
}

em.swash {
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  text-transform: none;
}

/* ---------- Rideau de chargement / transition entre pages ----------
   Présent sur toutes les pages. Masqué par défaut : il ne couvre l'écran
   que pendant une transition — soit qu'on quitte la page (main.js le
   déploie), soit qu'on y arrive via un clic de navigation (la classe
   is-entering est posée avant le premier rendu par le script en ligne du
   <head>). La première visite de l'accueil le déclenche aussi. */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
}
html.is-entering .preloader {
  visibility: visible;
}
.preloader__word {
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 4.5rem);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  display: flex;
  overflow: hidden;
}
.preloader__word span {
  display: inline-block;
  transform: translateY(110%);
}
.no-js .preloader,
html.reduced-motion .preloader {
  display: none;
}
/* Dernier recours : si main.js ne se charge pas du tout, rien ne retire
   le rideau une fois affiché. Cette animation l'efface seule passé un
   court délai (main.js la désactive dès qu'il prend la main). */
html.is-entering .preloader {
  animation: ochralab-preloader-out 0.4s ease 2.5s forwards;
}
@keyframes ochralab-preloader-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
@media (prefers-reduced-motion: reduce) {
  .preloader {
    animation-delay: 0.6s;
    animation-duration: 0.01s;
  }
}

/* ---------- Menu latéral (grand écran) ---------- */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: var(--rail);
  height: 100dvh;
  display: none;
  flex-direction: column;
  /* flex-start et non space-between : ce dernier ne fonctionnait qu'avec
     un troisième bloc (la mention de ville) pour ancrer la nav au milieu.
     Sans lui, deux enfants en space-between collent le second tout en bas. */
  justify-content: flex-start;
  padding: var(--space-4) var(--space-3);
  border-right: 1px solid var(--line);
  background: var(--bg);
}
@media (min-width: 900px) {
  :root {
    --content-w: calc(100vw - var(--rail));
  }
  .sidebar {
    display: flex;
  }
  /* Le contenu se décale de la largeur du rail, jamais dessous. */
  body {
    padding-left: var(--rail);
  }
}

.wordmark {
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 1rem;
}
.wordmark:hover {
  color: var(--accent);
}

.sidebar__nav {
  margin-top: var(--space-6);
}
.sidebar__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.sidebar__nav a {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.55rem 0;
  color: var(--ink-soft);
  transition: color 0.3s var(--ease-out);
}
.sidebar__nav a span {
  position: relative;
}
.sidebar__nav a span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 1px;
  width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.sidebar__nav a:hover,
.sidebar__nav a:focus-visible {
  color: var(--ink);
}
.sidebar__nav a:hover span::after,
.sidebar__nav a:focus-visible span::after {
  transform: scaleX(1);
  transform-origin: left;
}
/* Section courante : repérée par la couleur ET par le trait, jamais
   par la couleur seule. */
.sidebar__nav a[aria-current="true"] {
  color: var(--ink);
}
.sidebar__nav a[aria-current="true"] span::after {
  transform: scaleX(1);
  transform-origin: left;
  background: var(--accent);
}

/* Sous-menu des typologies (Villas / Hôtels / Riads), sous « Projets ».
   Un cran plus petit et indenté : secondaire à la navigation principale.
   aria-current posé à la génération sur la page typologie courante. */
.sidebar__nav .sidebar__filters {
  margin: 0.4rem 0 0;
  padding-left: 0.9rem;
  gap: 0.35rem;
}
.sidebar__nav .sidebar__filters a {
  font-size: 0.68rem;
  padding: 0.3rem 0;
  color: var(--ink-soft);
}
.sidebar__nav .sidebar__filters a[aria-current="true"] {
  color: var(--ink);
}
.sidebar__nav .sidebar__filters a[aria-current="true"] span::after {
  transform: scaleX(1);
  transform-origin: left;
  background: var(--accent);
}

/* ---------- Barre haute (petit écran) ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  height: var(--header-h);
  transition: background-color 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out);
}
.topbar.is-scrolled {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}

.menu-btn {
  background: none;
  border: 0;
  padding: 0.75rem;
  margin-right: -0.75rem;
  cursor: pointer;
  color: inherit;
}
.menu-btn svg {
  display: block;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gutter);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}
.menu-overlay.is-open {
  visibility: visible;
  opacity: 1;
}
.menu-overlay a {
  font-weight: 800;
  font-size: clamp(2.5rem, 10vw, 4rem);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 1.15;
  overflow: hidden;
  display: block;
}
.menu-overlay .menu-close {
  position: absolute;
  top: 1rem;
  right: var(--gutter);
  background: none;
  border: 0;
  color: var(--bg);
  padding: 0.75rem;
  cursor: pointer;
}
.menu-overlay .label {
  color: color-mix(in srgb, var(--bg) 55%, transparent);
  margin-bottom: var(--space-3);
}

/* Sous-menu de filtres du tiroir mobile : liste discrète sous « Projets »,
   loin de la taille des libellés principaux. */
.menu-overlay__filters {
  list-style: none;
  margin: 0.5rem 0 var(--space-3);
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.menu-overlay .menu-overlay__filters a {
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  line-height: 1.3;
  overflow: visible;
  color: color-mix(in srgb, var(--bg) 65%, transparent);
}
.menu-overlay .menu-overlay__filters a[aria-current="true"] {
  color: var(--bg);
}

/* Placée après la définition de .topbar : une règle antérieure serait
   écrasée par `display: flex` à spécificité égale. */
@media (min-width: 900px) {
  .topbar {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: calc(var(--header-h) + var(--space-6)) var(--gutter) 0;
}
.hero__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  border-top: 1px solid var(--line);
  padding-top: var(--space-2);
  margin-bottom: var(--space-5);
}
.hero__title {
  font-size: clamp(2rem, calc(var(--content-w) * 0.108), 10rem);
}
.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.hero__title .line:nth-child(2) {
  text-align: right;
}
.hero__figure {
  margin: var(--space-6) calc(-1 * var(--gutter)) 0;
}
.hero__figure figure {
  height: min(78svh, 58vw);
}

/* ---------- Figures / images ---------- */

figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
figure > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.js figure[data-reveal] {
  clip-path: inset(0 0 100% 0);
}
.js figure[data-reveal] > img {
  transform: scale(1.12);
}
html.reduced-motion figure[data-reveal],
html.reduced-motion figure[data-reveal] > img {
  clip-path: none !important;
  transform: none !important;
}

/* ---------- Sections ---------- */

.section {
  padding: var(--space-7) var(--gutter) 0;
}
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  border-top: 1px solid var(--line);
  padding-top: var(--space-2);
  margin-bottom: var(--space-6);
}
.section__title {
  font-size: clamp(2rem, 5vw, 4rem);
}

/* ---------- Mosaïque des projets, en boucle ----------
   Sans JavaScript : `columns` produit déjà la mosaïque, la page défile
   normalement. Avec JavaScript : le script redistribue ces mêmes vignettes
   en colonnes qu'il fait tourner en boucle. */

.loop {
  padding: var(--space-6) var(--gutter) 0;
}

/* Grille serrée, photos quasi jointives (façon pellicule / galerie iPhone).
   Le nom du projet n'apparaît plus qu'au survol, dans le curseur rond :
   voir data-name sur .tile et la logique dans main.js. */
.loop__grid {
  columns: 2;
  column-gap: var(--tile-gap);
}
@media (min-width: 900px) {
  .loop__grid {
    columns: 3;
    column-gap: var(--tile-gap);
  }
}

.tile {
  display: block;
  break-inside: avoid;
  margin-bottom: var(--tile-gap);
}
.tile figure {
  aspect-ratio: var(--ratio, 3 / 2);
}
.tile img {
  transition: transform 1.1s var(--ease-out);
}
@media (hover: hover) {
  .tile:hover img {
    transform: scale(1.04);
  }
}

/* --- Mode boucle : activé par le script uniquement ---
   Le défilement reste natif. Le script empile des répétitions de hauteur
   identique et repositionne discrètement la page d'un cycle exact : comme
   le contenu est le même, le saut ne se voit pas. --- */

.loop.is-looping .loop__grid {
  columns: auto;
  display: flex;
  align-items: flex-start;
  gap: var(--tile-gap);
}
.loop__col {
  flex: 1 1 0;
  min-width: 0;
}
.loop__col .tile {
  margin-bottom: var(--tile-gap);
}
/* Conteneur flex : les marges des vignettes ne fusionnent pas avec le bord
   du bloc, la hauteur de série est donc exacte et le cycle aussi. */
.loop__set {
  display: flex;
  flex-direction: column;
}

/* ---------- Studio ---------- */

.studio__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
@media (min-width: 900px) {
  .studio__grid {
    grid-template-columns: 7fr 4fr;
    gap: var(--space-6);
  }
}
/* Notice biographique : plusieurs paragraphes, donc une taille de lecture
   normale plutôt que le grand format à une ligne d'un statement. */
.studio__bio .label {
  display: block;
  margin-bottom: var(--space-3);
}
.studio__bio p {
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 58ch;
  margin: 0 0 var(--space-3);
  color: var(--ink);
}
.studio__bio p:last-child {
  margin-bottom: 0;
}
/* Deux versions du même texte, anglais puis français : un filet et un
   large écart marquent le passage d'une langue à l'autre. */
.studio__lang + .studio__lang,
.studio__details + .studio__details {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.studio__bio strong {
  font-weight: 800;
}
.studio__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: 0.95rem;
}
.studio__details dt {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}
.studio__details dd {
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 0.6rem;
}
/* Liens en ligne : zone tactile portée à 44px sans déplacer le texte. */
.studio__details a,
.contact-page__info dd a:not(.social-link),
.footer-row a {
  display: inline-block;
  padding-block: 0.75rem;
  margin-block: -0.75rem;
}
.studio__details a:hover {
  color: var(--accent);
}

/* ---------- Contact ----------
   Fond clair comme le reste du site : ce n'est plus la section inversée
   qu'elle était. Les teintes qui se mélangeaient jusqu'ici à --bg (pour
   rester lisibles sur fond sombre) se mélangent maintenant à --ink. */

.contact {
  margin-top: var(--space-7);
  background: var(--bg);
  color: var(--ink);
  padding: var(--space-7) var(--gutter) var(--space-4);
}
.contact .label {
  color: var(--ink-soft);
}
.contact__mail {
  display: inline-block;
  font-weight: 800;
  text-transform: lowercase;
  letter-spacing: -0.02em;
  /* Aussi discret que les boutons Instagram / LinkedIn juste en dessous :
     ce n'est plus la pièce maîtresse de la section. */
  font-size: 1.05rem;
  line-height: 1.2;
  position: relative;
  /* Le texte reste petit ; la zone cliquable atteint quand même 44px,
     sans agrandir l'espacement visible autour (marge négative égale). */
  padding-block: 0.85rem;
  margin-block: calc(var(--space-2) - 0.85rem) calc(var(--space-5) - 0.85rem);
}
/* Page Contact : ici l'email EST l'information principale, il retrouve
   une taille à sa mesure (au contraire du bloc contact des autres pages,
   discret parce que secondaire). */
.contact__mail--lg {
  font-size: clamp(1.5rem, 5vw, 3rem);
  margin-block: var(--space-2) var(--space-5);
}
.contact-page__note {
  margin: 0 0 var(--space-2);
  max-width: 42ch;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  color: var(--ink-soft);
}
.contact-page__info {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin: 0;
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
  max-width: 30rem;
}
@media (min-width: 600px) {
  .contact-page__info {
    grid-template-columns: 1fr 1fr;
  }
}
.contact-page__info dt {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}
.contact-page__info dd {
  margin: 0;
}
.contact-page__info dd a:not(.social-link):hover {
  color: var(--accent);
}
.contact-page__social {
  display: flex;
  gap: var(--space-2);
}

.contact__mail::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15em;
  height: 1px;
  width: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-out);
}
.contact__mail:hover::after,
.contact__mail:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.contact__social {
  display: flex;
  gap: var(--space-2);
  margin: 0 0 var(--space-6);
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
  color: var(--ink);
  transition: background-color 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out), color 0.3s var(--ease-out),
    transform 0.3s var(--ease-out);
}
.social-link:hover,
.social-link:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: var(--space-2);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.footer-row a:hover {
  color: var(--ink);
}
/* Pied de page réduit (Studio) : juste la mention de copyright, sous un
   filet, à l'écart du contenu mais sans le bloc contact. */
.footer-row--slim {
  margin-top: var(--space-6);
  padding: var(--space-3) var(--gutter) var(--space-4);
}

/* ---------- Page projet ---------- */

/* --header-h ne compense la barre haute fixe que là où elle existe
   (< 900px). Au-delà, la barre est masquée : réserver sa hauteur en
   plus creusait un vide mort en tête de page. */
.project-hero {
  padding: var(--space-6) var(--gutter) 0;
}
@media (max-width: 899px) {
  .project-hero {
    padding-top: calc(var(--header-h) + var(--space-4));
  }
}
.project-hero__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  border-top: 1px solid var(--line);
  padding-top: var(--space-2);
  margin-bottom: var(--space-4);
}
.project-hero__title {
  font-size: clamp(2rem, calc(var(--content-w) * 0.098), 8.5rem);
}

/* ---------- Pages typologie (Villas / Hôtels / Riads) ----------
   Liste numérotée, un projet par ligne : numéro, nom (et lieu), photo de
   couverture. Sur grand écran les trois sur une ligne, photo à droite ;
   au doigt, la photo passe sous le nom, pleine largeur. */
.typo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
}
.typo-item {
  border-top: 1px solid var(--line);
}
.typo-item__link {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: var(--space-2) var(--space-2);
  align-items: baseline;
  padding: var(--space-3) 0 var(--space-4);
}
.typo-item__num {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.typo-item__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.typo-item__name {
  font-size: clamp(1.6rem, calc(var(--content-w) * 0.045), 3.75rem);
  transition: color 0.3s var(--ease-out);
}
/* Le zoom au survol porte sur la figure, pas sur l'image : la
   révélation (GSAP) laisse un transform en ligne sur l'image, qui
   l'emporterait sur toute règle :hover. */
.typo-item__figure {
  grid-column: 1 / -1;
  overflow: hidden;
}
.typo-item__figure figure {
  aspect-ratio: 3 / 2;
  transition: transform 1.1s var(--ease-out);
}
@media (min-width: 900px) {
  .typo-item__link {
    grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 36%);
    gap: var(--space-3);
    align-items: center;
    padding: var(--space-3) 0;
  }
  .typo-item__num {
    align-self: start;
    padding-top: 0.35rem;
  }
  .typo-item__figure {
    grid-column: auto;
  }
}
.typo-item__link:hover .typo-item__name,
.typo-item__link:focus-visible .typo-item__name {
  color: var(--accent);
}
@media (hover: hover) {
  .typo-item__link:hover .typo-item__figure figure {
    transform: scale(1.04);
  }
}

/* ---------- Pages Studio et Contact ----------
   Réutilisent .project-hero / .project-hero__meta / .project-hero__title
   tels quels pour le bandeau d'ouverture (même très grand format que les
   pages projet, juste sans photo de couverture en dessous) : une page de
   texte reste une page, pas une section raccourcie.
   .page-body reprend l'écart déjà utilisé entre le héros et la galerie
   d'un projet (--space-6) : même rythme vertical d'une page à l'autre. */
.page-body {
  padding: var(--space-6) var(--gutter) 0;
}

/* Teinte propre à chaque page, posée sur <body> : le menu latéral et le
   contenu se teintent ensemble, sans quoi le rail resterait neutre à côté
   d'un contenu recoloré. Seuls bg/ink/ligne changent ; --accent reste
   l'unique accent du site, partagé par toutes les pages. */
.theme-ocre {
  --bg: #f3ecdf;
  --ink: #211a10;
  --ink-soft: #6d5f47;
  --line: #e1d4bb;
}
.theme-terre {
  --bg: #f1e3d6;
  --ink: #241209;
  --ink-soft: #7c5a44;
  --line: #e2ccb5;
}

/* Fiche technique du projet : même échelle que la colonne de coordonnées
   de la section Studio (dt en petites capitales, dd en texte compact). */
.project-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-4);
  margin: var(--space-4) 0 0;
  max-width: 52rem;
}
@media (min-width: 768px) {
  .project-info {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.project-info dt {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}
.project-info dd {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  border-top: 1px solid var(--line);
  padding-top: 0.6rem;
}

.project-hero__figure {
  margin: var(--space-5) calc(-1 * var(--gutter)) 0;
}
.project-hero__figure figure {
  height: min(88svh, 60vw);
}

.gallery {
  padding: var(--space-6) var(--gutter) 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5) 4%;
  align-items: flex-start;
}
.gallery figure {
  aspect-ratio: var(--ratio, 3 / 2);
  width: 100%;
}
/* Spécificité volontairement basse (.g-item et non .gallery .g-item) :
   les largeurs alternées du bloc @media doivent pouvoir la surcharger. */
.g-item {
  width: 100%;
  margin: 0;
}
@media (min-width: 900px) {
  .g-item--full {
    width: 100vw;
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
  }
  .g-item--wide {
    width: 82%;
  }
  .g-item--wide:nth-of-type(odd) {
    margin-left: auto;
  }
  .g-item--half {
    width: 48%;
  }
  .g-item--tall {
    width: 44%;
    margin-inline: auto;
  }
}
.g-item .idx {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.next-project {
  margin-top: var(--space-7);
  background: var(--ink);
  color: var(--bg);
  padding: var(--space-6) var(--gutter) var(--space-4);
}
.next-project .label {
  color: color-mix(in srgb, var(--bg) 55%, transparent);
}
.next-project__link {
  display: block;
  margin: var(--space-3) 0 var(--space-6);
}
.next-project__name {
  font-size: clamp(2.5rem, calc(var(--content-w) * 0.088), 7.5rem);
  transition: color 0.3s var(--ease-out);
}
.next-project__link:hover .next-project__name,
.next-project__link:focus-visible .next-project__name {
  color: var(--accent);
}
.backlink {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-block: 0.9rem;
  margin-block: -0.9rem;
}

/* ---------- Curseur personnalisé ---------- */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  pointer-events: none;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  font-size: 0;
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  .js .cursor {
    display: flex;
  }
}
.cursor.is-view {
  /* Le nom du projet remplace « Voir » : police réduite et repli sur deux
     lignes pour que les noms composés (« Devils Rock ») tiennent dans
     le cercle sans le faire déborder. */
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
  padding: 0 8px;
}

/* ---------- Reveal helpers ---------- */

/* Filet de sécurité : ces éléments partent masqués et ne sont révélés que
   par GSAP. Si le script tarde, est bloqué ou échoue, ils resteraient
   invisibles — titres compris. Une animation CSS à retardement les
   ramène donc quoi qu'il arrive. GSAP, s'il tourne, pose des styles en
   ligne bien avant l'échéance et garde la main sur la chorégraphie. */
@keyframes ochralab-reveal-lines {
  to {
    transform: none;
  }
}
@keyframes ochralab-reveal-fade {
  to {
    opacity: 1;
    transform: none;
  }
}

.js [data-lines] .line-inner {
  display: block;
  transform: translateY(110%);
  animation: ochralab-reveal-lines 0.6s var(--ease-out) 3s forwards;
}
[data-lines] .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
html.reduced-motion [data-lines] .line-inner {
  transform: none !important;
}
.js [data-fade] {
  opacity: 0;
  transform: translateY(24px);
  animation: ochralab-reveal-fade 0.6s var(--ease-out) 4s forwards;
}
html.reduced-motion [data-fade] {
  opacity: 1 !important;
  transform: none !important;
}

/* Script mort ET mouvement réduit : ni la classe .reduced-motion (posée
   par le script) ni GSAP ne s'appliqueront ; on neutralise tout en CSS. */
@media (prefers-reduced-motion: reduce) {
  .js [data-lines] .line-inner {
    transform: none;
    animation: none;
  }
  .js [data-fade] {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
