/* =========================================================================
   Page projet
   ========================================================================= */
.project-page { padding-top: 0; }
/* pages projet : fond clair du haut -> nav en noir */
.project-page .nav { color: var(--fg); }

.proj { max-width: var(--maxw); margin: 0 auto; padding: clamp(6rem, 16vh, 10rem) var(--pad) 0; }

/* En-tête éditorial : titre + méta mono + description */
.proj__head { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: end; padding-bottom: clamp(2.5rem, 6vh, 4.5rem); }
.proj__title { grid-column: 1 / 9; font-weight: 600; font-size: clamp(2.5rem, 8vw, 7rem); line-height: 0.92; letter-spacing: -0.04em; }
.proj__index { grid-column: 9 / 13; text-align: right; color: var(--fg-muted); }

.proj__info { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1.5rem, 3vw, 3rem); padding-bottom: clamp(2.5rem, 6vh, 4rem); border-bottom: 1px solid var(--line); }
.proj__meta { grid-column: 1 / 5; display: flex; flex-direction: column; gap: 0.9rem; }
.proj__meta-row { display: flex; flex-direction: column; gap: 0.25rem; }
.proj__meta-row .k { color: var(--fg-muted); }
.proj__meta-row .v { font-size: 0.95rem; }
.proj__desc { grid-column: 6 / 13; }
.proj__desc p { font-size: clamp(1.05rem, 1.5vw, 1.4rem); line-height: 1.45; max-width: 60ch; }
.proj__desc .amb { margin-top: 1.25rem; color: var(--fg-muted); }
.proj__credits { margin-top: 1.5rem; color: var(--fg-muted); font-size: 0.85rem; line-height: 1.7; max-width: 60ch; }

@media (max-width: 860px) {
  .proj__title { grid-column: 1 / 13; }
  .proj__index { display: none; }
  .proj__meta { grid-column: 1 / 13; }
  .proj__desc { grid-column: 1 / 13; }
}

/* Médias — colonne centrée, ratio naturel (pas de recadrage) */
.proj__media { padding: clamp(2.5rem, 7vh, 5rem) 0 clamp(3rem, 8vh, 6rem); display: flex; flex-direction: column; align-items: center; gap: clamp(1.25rem, 3vw, 2.5rem); }
.proj__video { width: 100%; max-width: 1120px; }
.proj__video .embed { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0a0a0a; }
.proj__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Façade YouTube (image + play discret ; le lecteur se charge au clic) */
.ytfacade { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0a0a0a; margin: 0; }
.ytfacade__thumb { width: 100%; height: 100%; object-fit: cover; }
.ytfacade__btn { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(10,10,10,0.06); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.4s var(--ease); }
.ytfacade__btn:hover { background: rgba(10,10,10,0.18); }
.ytfacade__play { width: clamp(56px, 6vw, 82px); height: clamp(56px, 6vw, 82px); border-radius: 50%; background: rgba(244,243,240,0.9); display: flex; align-items: center; justify-content: center; transition: transform 0.4s var(--ease), background 0.4s var(--ease); }
.ytfacade__btn:hover .ytfacade__play { transform: scale(1.06); background: #f4f3f0; }
.ytfacade__play::before { content: ""; width: 0; height: 0; margin-left: 4px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #0c0c0c; }

.proj__img { width: 100%; max-width: 1120px; background: var(--bg); overflow: hidden; }
.proj__img img { width: 100%; height: auto; display: block; }
.ytfacade { width: 100%; max-width: 1120px; }

/* Duo : verticaux/carrés côte à côte */
.proj__duo { width: 100%; max-width: 1120px; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2vw, 1.75rem); align-items: start; }
.proj__duo .proj__img { max-width: none; }
.proj__duo--one .proj__img { grid-column: 1; }
@media (max-width: 640px) { .proj__duo { grid-template-columns: 1fr; } }

/* reveal */
.proj__video, .proj__img { opacity: 0; transform: translateY(26px); }
.proj__video.is-in, .proj__img.is-in { opacity: 1; transform: none; transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }

/* Projet suivant */
.proj__next { border-top: 1px solid var(--line); padding: clamp(3rem, 8vh, 6rem) var(--pad); max-width: var(--maxw); margin: 0 auto; }
.proj__next a { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.proj__next .lbl { color: var(--fg-muted); }
.proj__next .ttl { font-weight: 600; font-size: clamp(2rem, 6vw, 5rem); letter-spacing: -0.035em; line-height: 1; }
.proj__next .lbl, .proj__next .ttl { position: relative; z-index: 1; }

/* aperçu du projet suivant au survol */
.proj__next-img {
  position: absolute; z-index: 0; right: clamp(2rem, 14vw, 16rem); top: 50%;
  width: clamp(150px, 18vw, 270px); max-height: 44vh; object-fit: contain; object-position: center;
  opacity: 0; transform: translateY(-44%) rotate(-4.5deg) scale(0.93);
  transition: opacity 0.45s var(--ease), transform 0.65s var(--ease);
  pointer-events: none;
}
.proj__next a:hover .proj__next-img { opacity: 1; transform: translateY(-50%) rotate(-2deg) scale(1); }
@media (hover: none), (max-width: 640px) { .proj__next-img { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .proj__video, .proj__img { opacity: 1; transform: none; }
}

/* =========================================================================
   Lightbox galerie
   ========================================================================= */
html.lb-lock { overflow: hidden; }
.proj__img { cursor: zoom-in; }

.lightbox {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(244, 243, 240, 0.97);
  opacity: 0; pointer-events: none; transition: opacity 0.4s var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }

.lightbox__stage {
  position: absolute; inset: clamp(3.25rem, 8vh, 5rem) clamp(2.75rem, 7vw, 6.5rem);
  display: flex; align-items: center; justify-content: center;
}
.lightbox__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; cursor: pointer; }

.lightbox button {
  position: absolute; z-index: 1; background: none; border: 0; cursor: pointer;
  color: var(--fg); font-family: var(--font-title); line-height: 1; padding: 0.6rem;
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}
.lightbox button:hover { opacity: 0.55; }
.lightbox__close { top: clamp(0.8rem, 2vh, 1.5rem); right: clamp(0.9rem, 2vw, 1.7rem); font-size: 1.45rem; font-weight: 300; }
.lightbox__prev, .lightbox__next { top: 50%; transform: translateY(-50%); font-size: 1.4rem; }
.lightbox__prev { left: clamp(0.5rem, 1.6vw, 1.5rem); }
.lightbox__next { right: clamp(0.5rem, 1.6vw, 1.5rem); }
.lightbox__prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox__next:hover { transform: translateY(-50%) translateX(3px); }
.lightbox__count { position: absolute; left: 50%; transform: translateX(-50%); bottom: clamp(0.9rem, 2.5vh, 1.7rem); color: var(--fg-muted); }

@media (max-width: 640px) {
  .lightbox__stage { inset: 3rem 1rem 3.25rem; }
  .lightbox__prev, .lightbox__next { display: none; } /* navigation au swipe */
}
