/* Joëlle Fichard — Homepage */

:root {
  --color-ink: #111111;
  --color-paper: #ffffff;
  --color-veil: rgba(0, 0, 0, 0.2);
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --h1-desktop: clamp(3.5rem, 8vw, 6.25rem);
  --h1-mobile: clamp(2.5rem, 12vw, 3.125rem);
  --h2-desktop: clamp(2rem, 3.5vw, 3.125rem);
  --h2-mobile: 1.875rem;
  --nav-size: 1.25rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --menu-height: 5.5rem;
  --menu-width-mobile: min(11.5rem, 48vw);
  --header-pad: 1.15rem;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-display);
  color: var(--color-ink);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 767px) {
  body.is-menu-open {
    overflow: hidden;
  }
}

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

img {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* ——— Header (closed state) ——— */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--header-pad) 1.5rem;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}

.site-header > * {
  pointer-events: auto;
}

/* Léger voile sous le logo et le burger, pour les tenir lisibles
   sur les zones claires de la vidéo. */
body.is-home .site-header::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  height: 7.25rem;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.26) 34%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
}

body.is-menu-open .site-header {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-header__logo img {
  width: 3.25rem;
  height: auto;
}

.menu-toggle {
  width: 1.75rem;
  height: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-paper);
  transition: transform 0.35s var(--ease-out), opacity 0.25s;
}

/* ——— Menu ——— */

.menu-backdrop {
  position: fixed;
  inset: 0;
  /* Au-dessus de tout le contenu, footer compris (96) : tout passe en flou */
  z-index: 98;
  background: rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.4s var(--ease-out),
    backdrop-filter 0.4s var(--ease-out),
    -webkit-backdrop-filter 0.4s var(--ease-out);
}

body.is-menu-open .menu-backdrop {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 1;
  pointer-events: auto;
}

.site-menu {
  position: fixed;
  /* Toujours au premier plan (sous le loader, le rideau et le curseur) */
  z-index: 99;
  pointer-events: none;
}

.site-menu__panel {
  background: var(--color-paper);
  color: var(--color-ink);
  pointer-events: auto;
}

.site-menu__logo {
  display: none;
}

.site-menu__logo img {
  width: 3.25rem;
  height: auto;
}

.site-menu__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2.5rem;
}

.site-menu__links a {
  font-size: var(--nav-size);
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: opacity 0.25s, font-weight 0.25s;
}

/* Desktop : liens en semi-gras partout, le gras italique vient du survol (JS).
   Le gras permanent ne concerne que le menu mobile. */
.site-menu__links:not(.site-menu__links--mobile) a {
  font-weight: 600;
}

/* Sur une page de rubrique (Projets, À propos, Contact) : seul le lien actif
   reste en semi-gras, les autres passent en light. L'accueil n'a pas de lien
   actif, donc tout y reste en semi-gras. */
.site-menu__links:not(.site-menu__links--mobile):has(a[aria-current="page"])
  a:not([aria-current="page"]),
/* Page d'un projet : la rubrique « Projets » compte comme active. */
body.is-project .site-menu__links:not(.site-menu__links--mobile)
  a:not([href="projets.html"]):not([href="projects.html"]) {
  font-weight: 300;
}

.site-menu__links--mobile a[aria-current="page"],
body.is-home .site-menu__links--mobile a,
body.is-project .site-menu__links--mobile a {
  font-weight: 700;
}

/* Survol d'un lien : passage en italique lettre par lettre (géré en JS :
   entrée gauche→droite, sortie droite→gauche). */
.nav-letter {
  font-style: normal;
}

.site-menu__links--mobile {
  display: none;
}

.site-menu__actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Ouverture du menu : d'abord les liens (un bloc), puis langue + croix */
@keyframes menuGroupIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.is-menu-open .site-menu__links li a,
  body.is-menu-open .site-menu__actions .lang-switch,
  body.is-menu-open .site-menu__actions .menu-close,
  body.is-menu-open .site-menu__links--mobile li a,
  body.is-menu-open .lang-switch--mobile {
    animation: none;
  }
}

.lang-switch {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-switch--mobile {
  display: none;
}

.lang-switch__btn {
  font-weight: 300;
  opacity: 0.55;
  transition: opacity 0.25s, font-weight 0.25s;
}

.lang-switch__btn.is-active {
  font-weight: 700;
  opacity: 1;
}

.menu-close {
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
}

.menu-close span,
.menu-close span::before {
  position: absolute;
  inset: 50% 0 auto;
  height: 1.5px;
  background: var(--color-ink);
  transform: translateY(-50%) rotate(45deg);
  transition: transform 0.45s var(--ease-out), opacity 0.2s ease;
}

.menu-close span::before {
  content: "";
  inset: 0;
  transform: rotate(90deg);
}

/* Desktop menu: top band */

@media (min-width: 768px) {
  .site-menu {
    inset: 0 0 auto;
  }

  .site-menu__panel {
    height: var(--menu-height);
    transform: translateY(-100%);
    transition: transform 0.5s var(--ease-out);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    overflow: hidden;
  }

  body.is-menu-open .site-menu__panel {
    transform: translateY(0);
  }

  .site-menu__top {
    height: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1.5rem;
  }

  .site-menu__logo {
    display: block;
  }

  .site-menu__links {
    justify-content: center;
  }

  .site-menu__actions {
    justify-self: end;
  }

  /* Vague 1 : les liens (tous ensemble) */
  body.is-menu-open .site-menu__links li a {
    animation: menuGroupIn 0.4s var(--ease-out) 0.1s backwards;
  }
  /* Vague 2 : langue + croix (tous ensemble) */
  body.is-menu-open .site-menu__actions .lang-switch,
  body.is-menu-open .site-menu__actions .menu-close {
    animation: menuGroupIn 0.4s var(--ease-out) 0.45s backwards;
  }

  .menu-close:hover span,
  .menu-close:focus-visible span {
    transform: translateY(-50%) rotate(0deg);
  }

  .menu-close:hover span::before,
  .menu-close:focus-visible span::before {
    transform: rotate(0deg);
    opacity: 0;
    transition: transform 0.45s var(--ease-out), opacity 0.15s ease 0.3s;
  }
}

/* Mobile menu: right drawer */

@media (max-width: 767px) {
  .site-menu {
    inset: 0 0 0 auto;
    width: var(--menu-width-mobile);
  }

  .site-menu__panel {
    height: 100%;
    width: 100%;
    /* Le menu part du haut de l'écran (plus de marge au-dessus de « Projets ») */
    padding: 0 0 2rem;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.45s var(--ease-out);
  }

  body.is-menu-open .site-menu__panel {
    transform: translateX(0);
  }

  .site-menu__top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0;
    padding: 0 1rem;
  }

  .site-menu__links:not(.site-menu__links--mobile),
  .site-menu__actions .lang-switch {
    display: none;
  }

  .site-menu__links--mobile {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    text-align: right;
    width: 100%;
    /* Plus de trait au-dessus de « Projets » : seuls les traits de séparation restent */
  }

  .site-menu__links--mobile li {
    width: 100%;
    border-bottom: 0.5px solid #000;
  }

  .site-menu__links--mobile a {
    display: block;
    padding: 0.9rem 1rem;
  }

  .lang-switch--mobile {
    display: flex;
    justify-content: flex-end;
    margin-top: 4.5rem;
    padding: 0 1rem;
  }

  .menu-close {
    position: fixed;
    /* Même bande verticale que le premier lien (« Projets ») */
    top: 0;
    right: calc(var(--menu-width-mobile) + 0.65rem);
    width: 1.1rem;
    height: calc(1.8rem + 1.2 * var(--nav-size));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }

  body.is-menu-open .menu-close {
    opacity: 1;
    pointer-events: auto;
  }

  .menu-close span,
  .menu-close span::before {
    background: var(--color-paper);
  }

  /* Sur le texte blanc d’À propos et de Contact, la croix doit rester noire. */
  .page-about.is-about-on-copy .menu-close span,
  .page-about.is-about-on-copy .menu-close span::before,
  .page-contact.is-about-on-copy .menu-close span,
  .page-contact.is-about-on-copy .menu-close span::before {
    background: var(--color-ink);
  }

  .site-header {
    padding: 1rem 0.65rem;
  }

  body.is-home .site-header::before {
    height: 5.25rem;
  }

  .site-header__logo img {
    width: 2.4rem;
  }

  .menu-toggle {
    width: 1.3rem;
    height: 0.95rem;
  }

  .menu-toggle__bar {
    height: 1px;
  }
}

/* ——— Panels ——— */

.panel {
  position: relative;
  display: block;
  min-height: 100svh;
  overflow: hidden;
  color: var(--color-paper);
  isolation: isolate;
}

.panel__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.panel__media picture {
  position: absolute;
  inset: 0;
  display: block;
}

.panel__media img,
.panel__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel__video {
  position: absolute;
  inset: 0;
}

.panel__fallback {
  position: absolute;
  inset: 0;
}

.panel__video.is-ready + .panel__fallback {
  opacity: 0;
  pointer-events: none;
}

.panel__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--color-veil);
  pointer-events: none;
}

.panel--hero .panel__veil {
  background: rgba(0, 0, 0, 0.12);
}

.panel__content {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 1.25rem;
  text-align: center;
}

.panel__title {
  margin: 0;
  font-weight: 700;
  font-size: var(--h2-desktop);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.panel__title--brand {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1.5rem;
  font-size: var(--h1-desktop);
  text-align: center;
  opacity: 0;
  /* Le h1 couvre tout le hero : seul le texte doit capter le clic */
  pointer-events: none;
}

.brand-link {
  pointer-events: auto;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
}

.brand-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 0.35em;
  border-radius: 2px;
}

/* Affiché seulement si la lecture auto est refusée (mode économie d'énergie). */
.hero-play {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: clamp(1.75rem, 6vh, 3.25rem);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.4rem 1.25rem 0.4rem 1.05rem;
  border: 1px solid var(--color-paper);
  border-radius: 999px;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: inherit;
  font-size: 1.375rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.hero-play[hidden] {
  display: none;
}

.hero-play__glyph {
  display: block;
  width: 0.7rem;
  height: 0.82rem;
  flex: none;
}

.hero-play:hover {
  background: transparent;
  color: var(--color-paper);
}

.hero-play:focus-visible {
  outline: 2px solid var(--color-paper);
  outline-offset: 4px;
}

html.is-ready .panel__title--brand {
  animation: title-rise 1.35s var(--ease-out) 0.35s both;
}

@keyframes title-rise {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html.is-loading .panel--hero .panel__media {
  transform: scale(1.06);
}

html.is-ready .panel--hero .panel__media {
  transform: scale(1);
  transition: transform 1.6s var(--ease-out);
}

.btn-ghost {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0.18rem 0.8rem;
  border: 1px solid var(--color-paper);
  border-radius: 20px;
  font-size: 1.375rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.01em;
  transition: color 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

/* Accueil : le contour des CTA « Découvrir » serre le mot. */
.is-home .btn-ghost {
  padding: 0.1rem 0.4rem 0.1rem 0.28rem;
}

/* Remplissage blanc de gauche à droite au survol */
.btn-ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-paper);
  transform: scaleX(0);
  /* Sortie : le remplissage se vide vers la droite (ancré à droite) */
  transform-origin: right center;
  transition: transform 0.4s var(--ease-out);
}

.btn-ghost:hover {
  color: var(--color-ink);
}

.btn-ghost:hover::before {
  transform: scaleX(1);
  /* Entrée : le remplissage arrive par la gauche (ancré à gauche) */
  transform-origin: left center;
}

.panel--half .panel__media img {
  transition: scale 1.2s var(--ease-out);
}

/* Projects grid — homepage teaser + page listing
   Desktop: half | half, then full, repeating; ends with two fulls
   Mobile: single column stack */

.projects {
  display: flex;
  flex-direction: column;
}

.projects--listing {
  position: relative;
}

.projects-listing__title {
  position: absolute;
  top: 5.75rem;
  left: 0;
  right: 0;
  z-index: 3;
  margin: 0;
  padding: 0 4.75rem;
  font-weight: 700;
  font-size: clamp(2rem, 3.5vw, 3.125rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--color-paper);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.projects__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100svh;
}

.projects__row--full {
  grid-template-columns: 1fr;
}

.projects .panel--half,
.projects .panel--full {
  min-height: 100svh;
}

.projects--listing .panel--half:hover .panel__media img,
.projects--listing .panel--full:hover .panel__media img,
.projects .panel--half:hover .panel__media img,
.projects .panel--full:hover .panel__media img {
  scale: 1.08;
}

.projects--listing .panel--full .panel__media img,
.projects .panel .panel__media img {
  transition: scale 1.2s var(--ease-out);
}

/* Soft image drift inside panels (no block overlap) */
@media (prefers-reduced-motion: no-preference) {
  .panel__media img,
  .panel__media video,
  .panel__media .panel__fallback {
    scale: 1.05;
    will-change: transform;
  }
}

@media (max-width: 767px) {
  .projects-listing__title {
    top: 4.25rem;
    padding: 0 3.25rem;
    font-size: 2.05rem;
  }

  .projects__row {
    grid-template-columns: 1fr;
  }

  .panel__title {
    font-size: var(--h2-mobile);
  }

  .panel__title--brand {
    font-size: var(--h1-mobile);
  }

  .btn-ghost {
    min-width: 0;
    padding: 0.12rem 0.65rem;
    font-size: 0.875rem;
    border-width: 0.5px;
  }

  .is-home .btn-ghost {
    padding: 0.06rem 0.32rem 0.06rem 0.22rem;
  }

  .hero-play {
    bottom: 1.6rem;
    min-height: 2.75rem;
    padding: 0.45rem 1.05rem 0.45rem 0.9rem;
    font-size: 1.2rem;
  }

  /* Safari iOS peint un fond gris si la vidéo, ou son parent, porte un
     transform. Le zoom d'arrivée et le léger décalage au scroll restent
     sur desktop. */
  html.is-loading .panel--hero .panel__media,
  html.is-ready .panel--hero .panel__media {
    transform: none;
    transition: none;
  }

  .panel__media video {
    scale: 1;
    will-change: auto;
  }

  .panel__content {
    gap: 0.55rem;
  }
}

/* ——— About page ——— */

/* À propos / Contact : la page reste plein écran (collée en haut) ;
   en scrollant, le footer passe par-dessus, comme en fin de page projet. */
.page-about .about,
.page-contact .contact {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
}

.site-header--ink .menu-toggle__bar {
  background: var(--color-ink);
}

@media (min-width: 768px) {
  .page-about .site-header__logo img,
  .page-contact .site-header__logo img {
    filter: brightness(0) invert(1);
  }
}

.about {
  display: grid;
  /* Image à gauche (order: -1) : 60 %. Texte à droite : 40 %. */
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--color-paper);
  color: var(--color-ink);
}

.about__copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  padding: clamp(4.75rem, 8vh, 6rem) clamp(1.1rem, 2vw, 1.35rem) clamp(1.25rem, 3vh, 2.5rem)
    clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
}

.about__title {
  flex-shrink: 0;
  margin: 0 0 clamp(2rem, 4.5vh, 3.25rem);
  font-size: clamp(2.25rem, 4.5vh, 3.125rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.about__body {
  max-width: none;
  min-height: 0;
  font-size: clamp(1.1rem, 1.8vh, 1.25rem);
  font-weight: 300;
  line-height: 1.35;
  text-align: justify;
  text-align-last: left;
}

.about__body p {
  margin: 0 0 clamp(0.75rem, 1.6vh, 1.1rem);
}

.about__body p:last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .about__body p::first-letter {
    font-size: 1.45em;
    font-weight: 500;
  }

  .about__body p {
    margin-bottom: clamp(0.9rem, 1.8vh, 1.25rem);
  }
}

.about__media {
  position: relative;
  order: -1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.about__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top; /* desktop : image calée en haut, centrée (le mobile a sa propre règle) */
}

@media (min-width: 768px) {
  /* Image fixe, texte défilant. */
  .page-about .about {
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
  }

  .page-about .about__copy {
    height: 100%;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    /* Après la dernière ligne : une marge blanche à parcourir
       avant que le scroll de la page ne fasse monter le footer. */
    padding-bottom: clamp(4.75rem, 14vh, 7.5rem);
  }

  .page-about .about__title,
  .page-about .about__body {
    flex-shrink: 0;
    min-height: auto;
  }

  .page-about .about__media {
    height: 100%;
    min-height: 0;
  }

  .page-about .about__title {
    margin-bottom: clamp(1.35rem, 3vh, 2.25rem);
  }
}

@media (max-width: 767px) {
  /* Portrait d'abord (deux tiers de l'écran), puis le texte qui défile. */
  .page-about .about {
    position: static;
    height: auto;
  }

  .about {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: auto;
    overflow: visible;
  }

  .about__copy {
    padding: 3.65rem 1.45rem 3.6rem;
    overflow: visible;
  }

  .page-about .site-header__logo img,
  .page-about .site-header--ink .menu-toggle__bar {
    transition: filter 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
  }

  .page-about .site-header__logo img {
    filter: brightness(0) invert(1);
  }

  .page-about .site-header--ink .menu-toggle__bar {
    background: var(--color-paper);
  }

  .page-about.is-about-on-copy .site-header__logo img {
    filter: none;
  }

  .page-about.is-about-on-copy .site-header--ink .menu-toggle__bar {
    background: var(--color-ink);
  }

  .about__title {
    margin-bottom: 0.85rem;
    font-size: clamp(1.65rem, 6vw, 1.875rem);
    font-weight: 600;
    text-align: center;
  }

  .about__body {
    max-width: none;
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.45;
    overflow: visible;
    text-align: justify;
    text-align-last: center;
  }

  .about__body p {
    margin-bottom: 4rem;
  }

  .about__body p::first-letter {
    font-size: 1.35em;
    font-weight: 500;
  }

  @media (prefers-reduced-motion: no-preference) {
    .page-about.is-about-reveal .about__title,
    .page-about.is-about-reveal .about__body p {
      opacity: 0;
      transform: translateY(0.65rem);
      transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .page-about.is-about-reveal .about__title.is-in,
    .page-about.is-about-reveal .about__body p.is-in {
      opacity: 1;
      transform: none;
    }
  }

  .about__media {
    order: -1;
    height: 66.67vh;
    height: 66.67dvh;
    aspect-ratio: auto;
  }

  .about__media img {
    object-position: center center;
  }
}

/* ——— Contact page ——— */

.contact {
  display: grid;
  /* Image à gauche (order: -1) : 60 %. Texte à droite : 40 %.
     Le mobile (max-width: 767px) repasse en une seule colonne. */
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--color-paper);
  color: var(--color-ink);
}

.contact__copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  padding: clamp(4.75rem, 8vh, 6rem) clamp(1.1rem, 2vw, 1.35rem) clamp(1.25rem, 3vh, 2.5rem)
    clamp(1.5rem, 3vw, 2.5rem);
}

.contact__title {
  margin: 0 0 clamp(2rem, 4.5vh, 3.25rem);
  font-size: clamp(2.25rem, 4.5vh, 3.125rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.contact__details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1.85rem, 4vh, 2.65rem);
  font-size: clamp(1.1rem, 1.8vh, 1.25rem);
  font-weight: 400;
  line-height: 1.7;
}

.contact__block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

@media (min-width: 768px) {
  .contact__details {
    font-weight: 600;
    line-height: 1.3;
    gap: clamp(1.35rem, 2.8vh, 1.9rem);
  }

  .contact__block {
    gap: 0.12rem;
  }
}

.contact__details a:hover {
  opacity: 0.6;
}

.contact__media {
  position: relative;
  order: -1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.contact__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top; /* desktop : image calée en haut, centrée (le mobile a sa propre règle) */
}

@media (max-width: 767px) {
  /* Même structure que la page À propos : portrait d'abord, puis le texte. */
  .page-contact .contact {
    position: static;
    height: auto;
  }

  .contact {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: auto;
    overflow: visible;
  }

  .contact__copy {
    padding: 3.65rem 1.45rem 3.6rem;
  }

  .page-contact .site-header__logo img,
  .page-contact .site-header--ink .menu-toggle__bar {
    transition: filter 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
  }

  .page-contact .site-header__logo img {
    filter: brightness(0) invert(1);
  }

  .page-contact .site-header--ink .menu-toggle__bar {
    background: var(--color-paper);
  }

  .page-contact.is-about-on-copy .site-header__logo img {
    filter: none;
  }

  .page-contact.is-about-on-copy .site-header--ink .menu-toggle__bar {
    background: var(--color-ink);
  }

  .contact__title {
    margin-bottom: 0.85rem;
    font-size: clamp(1.65rem, 6vw, 1.875rem);
    font-weight: 600;
    text-align: center;
  }

  .contact__details {
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    gap: 1.65rem;
    text-align: center;
  }

  .contact__block {
    align-items: center;
    gap: 0;
  }

  .contact__media {
    order: -1;
    height: 66.67vh;
    height: 66.67dvh;
    aspect-ratio: auto;
  }

  .contact__media img {
    object-position: center center;
  }
}

/* ——— Footer ——— */

/* Survol du footer : voile flou fixe posé juste derrière le footer.
   Il floute tout l'écran (header et nav compris) sans toucher au contenu
   ni à la taille du footer. */
.footer-blur {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Le voile s'arrête au bord haut du footer : le flou ne mélange pas
     ce qui passe sous le footer (sinon liseré clair au-dessus). */
  height: var(--footer-top, 100%);
  z-index: 95;
  pointer-events: none;
  opacity: 0;
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  /* Montée du flou progressive (intensité + fondu), sortie un peu plus vive. */
  transition:
    opacity 0.7s ease,
    backdrop-filter 0.7s ease,
    -webkit-backdrop-filter 0.7s ease;
}

.site-footer {
  position: relative;
  z-index: 96;
}

/* Les blocs de fin qui forment un contexte d'empilement passent au-dessus
   du header le temps du survol (retour différé après le fondu). */
.project-end,
.home-finale {
  transition: z-index 0s 0.7s;
}

/* Le header reste net : il repasse au-dessus du voile pendant le survol. */
.site-header {
  transition: opacity 0.35s var(--ease-out), visibility 0.35s, z-index 0s 0.7s;
}

@media (hover: hover) {
  body:has(.site-footer:hover) .footer-blur {
    opacity: 1;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition:
      opacity 0.9s cubic-bezier(0.25, 0.1, 0.25, 1),
      backdrop-filter 0.9s cubic-bezier(0.25, 0.1, 0.25, 1),
      -webkit-backdrop-filter 0.9s cubic-bezier(0.25, 0.1, 0.25, 1);
  }

  body:has(.site-footer:hover) .project-end,
  body:has(.site-footer:hover) .home-finale {
    z-index: 95;
    transition: z-index 0s;
  }

  body:has(.site-footer:hover) .site-header {
    z-index: 97;
    transition: opacity 0.35s var(--ease-out), visibility 0.35s, z-index 0s;
  }
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 1.25rem;
  padding: 3.2rem 3.5rem 3rem 1.5rem;
  background: #000;
  color: var(--color-paper);
  font-size: 1.05rem;
  line-height: 1.35;
}

/* Homepage (desktop) : fin = section À propos pleine hauteur ;
   en scrollant encore, seul le footer passe par-dessus */
@media (min-width: 768px) {
  body.is-home .home-finale #a-propos {
    position: sticky;
    top: 0;
    z-index: 1;
    height: 100svh;
    min-height: 100svh;
  }

  body.is-home .home-finale .site-footer {
    position: relative;
    z-index: 96;
  }
}

/* Page projet (desktop) : fin = dernière section pleine hauteur ;
   en scrollant encore, le bloc de fin (pager + footer) passe par-dessus */
@media (min-width: 768px) {
  body.is-project .project-last {
    position: sticky;
    top: 0;
    z-index: 1;
    height: 100svh;
    min-height: 100svh;
    margin: 0;
    padding: 0;
    background: var(--color-ink);
  }

  body.is-project .project-last .project-shot-row,
  body.is-project .project-last .project-shot--full {
    height: 100%;
    min-height: 100%;
  }

  body.is-project .project-last .project-shot--half {
    min-height: 0;
    height: 100%;
  }

  body.is-project .project-end {
    position: relative;
    z-index: 2;
    background: var(--color-paper);
  }
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.site-footer__home {
  display: block;
  flex-shrink: 0;
  line-height: 0;
  transition: opacity 0.3s var(--ease-out);
}

.site-footer__home:hover {
  opacity: 0.7;
}

.site-footer__brand img {
  width: 3.5rem;
  height: auto;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

.site-footer__brand p {
  margin: 0;
}

.site-footer__brand strong {
  font-weight: 700;
}

.site-footer__contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-self: center;
  text-align: left;
  gap: 0.15rem;
}

.site-footer__legal {
  justify-self: end;
  text-align: left;
}

.site-footer__legal p {
  margin: 0;
}

/* Entrée des éléments du footer : fondu + montée (même logique que le
   titre d'accueil), déclenchée quand le footer apparaît à l'écran. */
.footer-reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}

.footer-reveal.is-revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .footer-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 767px) {
  .site-footer {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "logo brand"
      "logo contact"
      "logo legal";
    align-items: start;
    gap: 1.25rem 0.85rem;
    padding: 2.95rem 1rem 3.25rem;
    font-size: 0.8rem;
  }

  .site-footer__brand {
    display: contents;
  }

  .site-footer__brand img {
    grid-area: logo;
    width: 2.4rem;
    align-self: start;
  }

  .site-footer__brand p {
    grid-area: brand;
  }

  .site-footer__contact {
    grid-area: contact;
    align-items: flex-start;
    justify-self: start;
    text-align: left;
  }

  .site-footer__legal {
    grid-area: legal;
    justify-self: start;
    align-self: start;
    text-align: left;
    margin-top: 0.15rem;
  }
}

/* ——— Loader ——— */

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--color-paper);
  transform: translate3d(0, 0, 0);
  transition: transform 1.15s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}

.site-loader.is-done {
  transform: translate3d(0, -100%, 0);
  pointer-events: none;
}

.site-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.15rem;
}

.site-loader__logo {
  width: 5.5rem;
  height: auto;
  animation: loader-logo-in 0.9s var(--ease-out) both;
}

.site-loader__bar {
  /* Largeur du logo */
  width: 5.5rem;
  height: 1px;
  background: rgba(17, 17, 17, 0.12);
  overflow: hidden;
}

.site-loader__progress {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--color-ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 3s cubic-bezier(0.45, 0, 0.2, 1);
}

.site-loader.is-progressing .site-loader__progress {
  transform: scaleX(1);
}

@keyframes loader-logo-in {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767px) {
  .site-loader__logo {
    width: 4rem;
  }

  .site-loader__bar {
    width: 4rem;
    height: 1px;
  }

  .site-loader__inner {
    gap: 1.65rem;
  }
}

/* ——— Scroll progress (top) ——— */

.site-scrollbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 100%;
  height: 3px;
  background: transparent;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
}

html.is-ready .site-scrollbar,
body:not(:has(#site-loader)) .site-scrollbar {
  opacity: 1;
}

html.is-loading .site-scrollbar {
  opacity: 0;
}

.site-scrollbar__thumb {
  display: block;
  width: 100%;
  height: 100%;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
  mix-blend-mode: difference;
}

.site-scrollbar.is-on-paper .site-scrollbar__thumb {
  background: var(--color-ink);
  mix-blend-mode: normal;
}

/* ——— Custom cursor ——— */

@media (pointer: fine) {
  body.has-custom-cursor,
  body.has-custom-cursor * {
    cursor: none !important;
  }

  .site-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    width: 0.5rem;
    height: 0.5rem;
    margin: -0.25rem 0 0 -0.25rem;
    border-radius: 50%;
    background: #fff;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-100px, -100px, 0);
    transition: opacity 0.25s ease, width 0.25s var(--ease-out), height 0.25s var(--ease-out),
      margin 0.25s var(--ease-out);
    will-change: transform;
  }

  body.has-custom-cursor.is-cursor-on .site-cursor {
    opacity: 1;
  }

  body.has-custom-cursor.is-cursor-hover .site-cursor {
    width: 0.7rem;
    height: 0.7rem;
    margin: -0.35rem 0 0 -0.35rem;
  }

  body.has-custom-cursor.is-cursor-ink .site-cursor {
    background: #111;
  }
}

/* Reduced motion */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .site-loader__progress {
    transition: none;
    transform: scaleX(1);
  }
}

/* ——— Project detail ——— */

.project-page {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-paper);
}

.project-float-nav {
  position: absolute;
  top: 5.75rem;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: clamp(1.55rem, 3.4vw, 3.6rem);
  padding: 0 1.5rem;
  pointer-events: none;
}

.project-float-nav a {
  pointer-events: auto;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.7rem, 1.2vw, 1.25rem);
  letter-spacing: 0.01em;
  color: var(--color-paper);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  transition: opacity 0.3s var(--ease-out);
}

.project-float-nav a:hover {
  opacity: 0.7;
}

/* Desktop : texte un peu plus discret au repos, pleine opacité au survol */
@media (min-width: 768px) {
  .project-float-nav a {
    opacity: 0.7;
    font-weight: 600;
    /* Un peu plus petit qu’avant (1.2vw, 1.25rem max) */
    font-size: clamp(0.7rem, 1vw, 1.1rem);
  }

  .project-float-nav a:hover {
    opacity: 1;
  }

  /* Cyanella : l'opacité du texte suit le fondu de la bordure (piloté en JS) */
  .project-float-nav[data-border-draw] a {
    opacity: var(--nav-text-opacity, 0.7);
  }

  .project-float-nav[data-border-draw] a:hover {
    opacity: 1;
  }

  /* Survol : même remplissage que les CTA « Découvrir » de la home
     (entre par la gauche, ressort par la droite) */
  .project-float-nav[data-border-draw] a {
    isolation: isolate;
    overflow: hidden;
    border-radius: 20px;
    transition: opacity 0.3s var(--ease-out), color 0.35s var(--ease-out), text-shadow 0.35s var(--ease-out);
  }

  .project-float-nav[data-border-draw] a::before {
    content: "";
    position: absolute;
    /* Calé à l'intérieur du trait SVG (0,5 px) pour ne pas déborder de la bordure */
    inset: 0.5px;
    border-radius: 20px;
    z-index: -1;
    background: var(--color-paper);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.4s var(--ease-out);
  }

  .project-float-nav[data-border-draw] a:hover {
    color: var(--color-ink);
    text-shadow: none;
  }

  .project-float-nav[data-border-draw] a:hover::before {
    transform: scaleX(1);
    transform-origin: left center;
  }

  .project-float-nav[data-border-draw].is-on-paper a::before {
    background: var(--color-ink);
  }

  .project-float-nav[data-border-draw].is-on-paper a:hover {
    color: var(--color-paper);
  }
}

.project-float-nav.is-on-paper a {
  color: var(--color-ink);
  text-shadow: none;
}

.site-header.is-on-paper .menu-toggle__bar {
  background: var(--color-ink);
}

@media (min-width: 768px) {
  .project-float-nav {
    position: fixed;
    top: 5.75rem;
    padding: 0 1.5rem;
  }
}

/* Test (Cyanella) : bordure arrondie qui apparaît en fondu au scroll autour de
   « Tous les projets » / « Projet suivant » (le texte ne bouge pas :
   le padding est compensé par une marge négative). */
.project-float-nav[data-border-draw] a {
  position: relative;
  display: inline-flex;
  align-items: center;
  /* Bordure serrée autour du texte (desktop ; le mobile a ses valeurs) */
  padding: 0.1rem 0.55rem;
  margin: 0 -0.55rem;
  line-height: 1.2;
}

.project-float-nav[data-border-draw] .nav-border {
  opacity: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.project-float-nav[data-border-draw] .nav-border rect {
  fill: none;
  /* Couleur fixe : la bordure ne change pas au survol (le texte, lui, s'inverse) */
  stroke: var(--color-paper);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
}

.project-float-nav[data-border-draw].is-on-paper .nav-border rect {
  stroke: var(--color-ink);
}

/* Arrivée sur la dernière image : le fond des boutons passe au blanc
   plein, au rythme du scroll (--nav-end-fill / --nav-end-ink en JS).
   Le jumeau noir, lui, ne prend pas ce fond. */
.project-float-nav[data-border-draw]:not(.ink-twin) a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  z-index: -2;
  background: #fff;
  opacity: var(--nav-end-fill, 0);
  pointer-events: none;
}

.project-float-nav[data-border-draw]:not(.ink-twin) a {
  color: color-mix(
    in srgb,
    var(--color-ink) calc(var(--nav-end-ink, 0) * 100%),
    var(--color-paper)
  );
  text-shadow: 0 1px 10px rgb(0 0 0 / calc(0.55 * (1 - var(--nav-end-ink, 0))));
  transition: opacity 0.3s var(--ease-out);
}

.project-float-nav[data-border-draw]:not(.ink-twin) a:hover {
  color: var(--color-ink);
  text-shadow: none;
}

/* Fond blanc plein : le survol reprend, en négatif (noir, texte blanc). */
.project-float-nav.is-end-filled[data-border-draw]:not(.ink-twin) a:hover {
  color: var(--color-paper);
  text-shadow: none;
}

@media (min-width: 768px) {
  .project-float-nav.is-end-filled[data-border-draw]:not(.ink-twin) a:hover::before {
    background: var(--color-ink);
  }
}

@media (max-width: 767px) {
  .project-float-nav.is-end-filled[data-border-draw]:not(.ink-twin) a:hover::after {
    background: var(--color-ink);
    opacity: 1;
  }
}

@media (max-width: 767px) {
  .project-float-nav[data-border-draw] a {
    /* Bordure un peu plus serrée (avant : 0.12rem 0.6rem) */
    padding: 0.06rem 0.45rem;
    margin: 0 -0.45rem;
  }
}

/* Test (Cyanella) : « Tous les projets » / « Projet suivant » suivent le
   scroll (JS) : d'abord vers le centre, puis jusqu'à l'axe du header. */
@media (min-width: 768px) {
  .project-float-nav[data-converge] {
    justify-content: center;
    gap: 1.25rem;
  }

  .project-float-nav[data-converge] a {
    will-change: transform;
  }

  /* Masqués tant que leur position de départ n'est pas calculée */
  .project-float-nav[data-converge]:not(.is-ready) a {
    opacity: 0;
  }
}

/* Test (Cyanella) : liens en boutons à bordure, italiques, comme les
   boutons « Découvrir » de l'accueil (remplissage au survol inclus). */
.project-float-nav[data-nav-buttons] a {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.8rem;
  border: 0.5px solid currentColor;
  border-radius: 20px;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.01em;
  transition: color 0.35s var(--ease-out), border-color 0.35s var(--ease-out), opacity 0.4s var(--ease-out);
}

.project-float-nav[data-nav-buttons] a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-paper);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.4s var(--ease-out);
}

.project-float-nav[data-nav-buttons] a:hover {
  opacity: 1;
  color: var(--color-ink);
  border-color: var(--color-paper);
  text-shadow: none;
}

.project-float-nav[data-nav-buttons] a:hover::before {
  transform: scaleX(1);
  transform-origin: left center;
}

/* Sur fond clair : bordure noire, remplissage noir au survol */
.project-float-nav[data-nav-buttons].is-on-paper a::before {
  background: var(--color-ink);
}

.project-float-nav[data-nav-buttons].is-on-paper a:hover {
  color: var(--color-paper);
  border-color: var(--color-ink);
}

@media (max-width: 767px) {
  .project-float-nav[data-nav-buttons] a {
    padding: 0.12rem 0.65rem;
    border-width: 0.35px;
  }
}

/* Test (Cyanella) : boutons placés directement dans le header, au centre,
   sur l'axe du logo et du burger (sans animation). */
@media (min-width: 768px) {
  .project-float-nav[data-nav-header] {
    top: 0;
    height: 5.1rem;
    min-height: 0;
    justify-content: center;
    gap: 2.5rem;
  }
}

.project-intro {
  width: 100%;
  margin: 0 auto;
  padding: clamp(4.6rem, 9.5vw, 7.85rem) 1.5rem;
  text-align: center;
  background: var(--color-paper);
  color: var(--color-ink);
}

.project-intro__meta {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.55;
}

.project-intro__subtitle {
  max-width: none;
  margin: 0 auto 1.35rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 1.85vw, 1.6rem);
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--color-ink);
}

.project-intro__text {
  max-width: 44rem;
  margin: 0 auto;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.1rem, 1.8vh, 1.25rem);
  line-height: 1.7;
  /* Justifié, dernière ligne centrée (idem mobile) */
  text-align: justify;
  text-align-last: center;
}

/* Saut de ligne actif uniquement sur mobile */
.br-mobile {
  display: none;
}

@media (max-width: 767px) {
  .project-intro {
    padding: clamp(3.85rem, 14vw, 5.35rem) 1.25rem;
    text-align: left;
  }

  /* Description justifiée, dernière ligne centrée. Le sous-titre, lui,
     reste centré (coupé en deux lignes via .br-mobile). */
  .project-intro__text {
    text-align: justify;
    text-align-last: center;
  }

  .project-intro__subtitle {
    margin-bottom: 0.7rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.28rem;
    letter-spacing: 0.01em;
  }

  /* Description un peu plus petite sur mobile (1,05rem par défaut) */
  .project-intro__text {
    font-size: 0.9rem;
  }

  .br-mobile {
    display: inline;
  }
}

.project-shot {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--color-ink);
}

.project-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.shot-mobile {
  display: none;
}

@media (max-width: 767px) {
  .shot-desktop {
    display: none;
  }

  .shot-mobile {
    display: block;
  }
}

.project-shot--full {
  width: 100%;
  height: 100svh;
  min-height: 100svh;
}

.project-shot-row {
  display: flex;
  width: 100%;
  height: 100svh;
  min-height: 100svh;
  gap: 0;
}

.project-shot--half {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  min-height: 100svh;
}

.project-shot--orphan {
  width: 50%;
  height: 100svh;
  min-height: 100svh;
}

/* Orpheline dans une row : elle suit la hauteur de la row (que le JS
   agrandit pour montrer le portrait en entier), sinon un vide apparaît
   sous l'image. */
@media (min-width: 768px) {
  .project-shot-row > .project-shot--orphan {
    height: 100%;
    min-height: 0;
  }
}

.project-shot--hero .project-shot__veil {
  position: absolute;
  inset: 0 0 auto;
  height: 13.5rem;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.72) 34%,
    rgba(0, 0, 0, 0.72) 62%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.project-shot__hero-ui {
  position: absolute;
  top: 5.75rem;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: clamp(1.55rem, 3.4vw, 3.6rem);
  padding: 0 1.5rem;
  color: var(--color-paper);
  pointer-events: none;
}

.project-shot__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.2vw, 3.125rem);
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.project-shot__title--long {
  white-space: nowrap;
  max-width: none;
  font-size: clamp(1.25rem, 2.7vw, 2.65rem);
}

/* Titre court (format minimaliste) : plus grand sur desktop. */
@media (min-width: 768px) {
  .project-shot__title--short {
    font-size: clamp(1.75rem, 3.8vw, 3.75rem);
  }

  /* Hauteur figée sur celle de la nav flottante : le titre déborde
     de façon égale en haut et en bas, son centre reste aligné avec
     « Tous les projets » / « Projet suivant ». */
  .project-shot__hero-ui:has(.project-shot__title--short) {
    height: clamp(1.55rem, 3.4vw, 3.6rem);
  }
}

@media (max-width: 767px) {
  .project-shot--full {
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 2;
  }

  .project-shot--hero {
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 2;
  }

  .project-shot--hero.project-shot--portrait {
    height: 100svh;
    min-height: 100svh;
    aspect-ratio: auto;
  }

  .project-shot--hero .project-shot__veil {
    inset: 0 0 auto;
    /* Premier cinquième de l'image, avec un minimum pour couvrir
       le titre (deux lignes) même sur un écran court. */
    height: max(11rem, 20%);
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.55) 0%,
      rgba(0, 0, 0, 0.42) 68%,
      rgba(0, 0, 0, 0) 100%
    );
  }

  .project-shot-row {
    flex-direction: column;
    height: auto;
    min-height: 0;
    gap: 0;
  }

  .project-shot--half,
  .project-shot--orphan {
    width: 100%;
    flex: none;
    height: auto;
    min-height: 0;
    aspect-ratio: 2 / 3;
  }

  .project-float-nav {
    /* Position gérée en JS : centre écran → fixe en haut au scroll */
    top: auto;
    bottom: auto;
    padding: 0 0.85rem;
    min-height: 0;
    z-index: 35;
    opacity: 0.5;
  }

  .project-float-nav a {
    font-size: 0.7rem;
  }

  .project-float-nav a:hover {
    opacity: 1;
  }

  .project-float-nav.is-pinned {
    opacity: 1;
  }

  .project-shot__hero-ui {
    top: 4.25rem;
    bottom: auto;
    min-height: 0;
    padding: 0 0.85rem;
    align-items: flex-start;
  }

  .project-shot__title {
    white-space: nowrap;
    font-size: clamp(1.25rem, 5.8vw, 1.75rem);
    max-width: none;
    width: 100%;
    line-height: 1.15;
  }

  .project-shot__title--long {
    white-space: normal;
    width: 100%;
    max-width: none;
    font-size: clamp(1.7rem, 7.6vw, 2.05rem);
    line-height: 1.15;
  }
}

/* Placeholders for projects awaiting gallery images */
.project-shot--placeholder {
  background: #e8e4df;
}

.project-shot__placeholder {
  width: 100%;
  height: 100%;
  min-height: inherit;
  background: linear-gradient(135deg, #e8e4df 0%, #ddd8d1 50%, #e8e4df 100%);
}

/* ——— Rideau « Projet suivant » ———
   Départ : un panneau blanc entre par la droite et couvre l'écran.
   Arrivée : la page s'ouvre déjà couverte (classe posée dans le <head>),
   puis le rideau repart vers la gauche. Sous le curseur personnalisé. */
.page-curtain,
html.is-curtain::after {
  position: fixed;
  inset: 0;
  z-index: 9999;
  /* Légèrement plus grand que le logo du header, pour le même rendu visuel */
  background: var(--color-paper) url("../assets/logo/jf-logo.svg") no-repeat center / 4.5rem auto;
  pointer-events: none;
}

@media (max-width: 767px) {
  .page-curtain,
  html.is-curtain::after {
    background-size: 2.6rem auto;
  }
}

/* Le rideau est « découpé » (clip-path) au lieu d'être déplacé : le blanc
   balaie l'écran mais le logo, lui, reste fixe au centre et n'apparaît /
   disparaît qu'au passage du blanc. */
.page-curtain {
  clip-path: inset(0 0 0 100%);
}

.page-curtain.is-closing {
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.5s cubic-bezier(0.76, 0, 0.24, 1);
  pointer-events: auto;
}

html.is-curtain::after {
  content: "";
  clip-path: inset(0 0 0 0);
}

html.is-curtain.is-curtain-out::after {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.6s cubic-bezier(0.76, 0, 0.24, 1);
}

@media (prefers-reduced-motion: reduce) {
  html.is-curtain::after {
    display: none;
  }
}

/* ——— Jumeaux noirs du header et des boutons projets ———
   Copie superposée, visible uniquement sur les blocs blancs (clip-path en JS) :
   la couleur bascule pile à la frontière. Jamais cliquable. */
.ink-twin,
.ink-twin * {
  pointer-events: none !important;
}

/* Le jumeau des boutons projets est la partie visible sur le blanc
   (intro, rectangle vide en fin de projet). Il doit rester cliquable. */
.project-float-nav.ink-twin a {
  pointer-events: auto !important;
}

/* hidden seul ne suffit pas : header et boutons ont un display: flex qui
   l’emporterait, et le jumeau resterait affiché avec sa dernière découpe. */
.ink-twin[hidden] {
  display: none !important;
}

/* Sur le bloc blanc, « Tous les projets » et « Projet suivant » en noir à 70 %.
   Le fondu du bouton blanc (copié en style inline) ne s'additionne pas. */
.project-float-nav.ink-twin {
  opacity: 1 !important;
}

.project-float-nav.ink-twin a {
  opacity: 0.7 !important;
}

/* Le survol de l'original est recopié sur le jumeau (classe is-twin-hover) */
@media (min-width: 768px) {
  .project-float-nav.ink-twin a.is-twin-hover,
  .project-float-nav.ink-twin a:hover {
    opacity: 1 !important;
  }

  .project-float-nav.ink-twin[data-border-draw] a.is-twin-hover,
  .project-float-nav.ink-twin[data-border-draw] a:hover {
    color: var(--color-paper);
    text-shadow: none;
  }

  .project-float-nav.ink-twin[data-border-draw] a.is-twin-hover::before,
  .project-float-nav.ink-twin[data-border-draw] a:hover::before {
    transform: scaleX(1);
    transform-origin: left center;
  }
}

/* Mobile : sur le bloc de description, les boutons projets prennent un fond
   blanc pour ne pas chevaucher le texte. Posé sur le jumeau noir, il n'existe
   que sur le bloc blanc et disparaît pile au retour sur une image.
   Le fond reste opaque ; seuls le texte et la bordure sont à 70 %. */
@media (max-width: 767px) {
  .project-float-nav.ink-twin a {
    opacity: 1 !important;
    color: rgba(17, 17, 17, 0.7);
    background: var(--color-paper);
    border-radius: 20px;
  }

  .project-float-nav.ink-twin.is-on-paper .nav-border rect {
    stroke: rgba(17, 17, 17, 0.7);
  }

  .project-float-nav.ink-twin a.is-twin-hover {
    color: var(--color-ink);
  }

  .project-float-nav.ink-twin.is-on-paper a.is-twin-hover .nav-border rect {
    stroke: var(--color-ink);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
