/* ============================================================
   Léo Sermon — Page Projets
   Réutilise les tokens définis dans style.css (header, footer,
   typographies, CTA final). Fond plus clair, esprit galerie.
   ============================================================ */

body.page-projets {
  /* Échantillonné directement sur les fichiers servis (254,254,254 /
     253,253,253) : calé au pixel près pour que la photo n'ait plus
     aucune démarcation visible avec le fond de la page. */
  --bg: #FDFDFC;
}

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

.projects-intro {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(64px, 12vw, 128px) var(--gutter) clamp(32px, 6vw, 56px);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 56px);
}

.projects-intro-text h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: var(--ink);
}

.projects-intro-text p {
  margin: 18px 0 0;
  max-width: 480px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* Accès rapide au contact, visible sans avoir à descendre jusqu'au
   bas de la page. */
.projects-intro-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  position: relative;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink);
  padding-bottom: 6px;
  white-space: nowrap;
}

.projects-intro-cta::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transition: right 0.4s var(--ease);
}

.projects-intro-cta:hover::after,
.projects-intro-cta:focus-visible::after {
  right: 0;
}

.projects-intro-cta .arrow {
  transition: transform 0.4s var(--ease);
}

.projects-intro-cta:hover .arrow,
.projects-intro-cta:focus-visible .arrow {
  transform: translateX(6px);
}

@media (max-width: 640px) {
  .projects-intro {
    flex-direction: column;
    gap: 20px;
  }

  .projects-intro-cta {
    margin-top: 0;
    white-space: normal;
  }
}

/* ---------------- Filter nav ---------------- */

.filter-nav {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(48px, 8vw, 88px);
  display: flex;
  gap: clamp(20px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(20px, 3vw, 28px);
  /* Air entre le filet des filtres et le nom de la première création */
  margin-bottom: clamp(40px, 5vw, 72px);
}

.filter-nav button {
  background: none;
  border: none;
  padding: 4px 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  cursor: pointer;
  position: relative;
  transition: color 0.35s var(--ease);
}

.filter-nav button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transition: right 0.4s var(--ease);
}

.filter-nav button:hover,
.filter-nav button.is-active {
  color: var(--ink);
}

.filter-nav button.is-active::after {
  right: 0;
}

/* ---------------- Creations list ---------------- */

.creations {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(96px, 12vw, 160px);
  display: flex;
  flex-direction: column;
  gap: clamp(80px, 11vw, 132px);
}

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

.creation-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: clamp(24px, 3.5vw, 36px);
}

.creation-name {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  color: var(--ink);
}

.creation-mention {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}

/* Photos studio — fond blanc, se fondent dans la page : pas de carte,
   pas d'ombre, pas de bordure, pas de fond différent. */

.creation-studio {
  display: grid;
  gap: clamp(18px, 2.5vw, 32px);
  margin-bottom: clamp(28px, 4vw, 44px);
}

.creation-studio-photo {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  padding: 0;
  margin: 0;
  border: none;
  background: var(--bg);
  cursor: zoom-in;
}

.creation-studio-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s var(--ease);
}

.creation-studio-photo:hover img,
.creation-studio-photo:focus-visible img {
  transform: scale(1.015);
}

/* Assises nomades : équilibre des tailles. Les photos n'ont pas le même
   cadrage — le pouf olive paraissait bien plus gros que les deux poufs
   bleus. On compense avec la propriété "scale", qui se combine avec les
   autres zooms (survol, téléphone) sans les remplacer. */
.creation[data-category="assises-nomades"] .creation-studio-photo:nth-child(1) img,
.creation[data-category="assises-nomades"] .creation-studio-photo:nth-child(2) img {
  scale: 1.15;
}

.creation[data-category="assises-nomades"] .creation-studio-photo:nth-child(3) img {
  scale: 0.86;
}

/* Grande photo d'ambiance — pleine présence, sous les photos studio */

.creation-ambiance {
  display: block;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  /* Légèrement plus court que le ratio natif (4/3), avec un recadrage
     minime (~11 % de la hauteur) centré symétriquement — la création
     reste bien au milieu de l'image. */
  aspect-ratio: 3 / 2;
  padding: 0;
  border: none;
  background: var(--bg-deep);
  overflow: hidden;
  cursor: zoom-in;
}

.creation-ambiance img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transition: transform 0.7s var(--ease);
}

.creation-ambiance:hover img,
.creation-ambiance:focus-visible img {
  transform: scale(1.015);
}


/* ---------------- Lightbox ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(20, 16, 12, 0.94);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  padding: clamp(20px, 5vw, 56px);
}

.lightbox.is-open {
  opacity: 1;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-stage {
  max-width: min(1200px, 92vw);
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  transition: opacity 0.3s var(--ease);
}

.lightbox-caption {
  margin: 20px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: rgba(251, 246, 238, 0.75);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #FBF6EE;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: opacity 0.3s var(--ease);
  opacity: 0.75;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-close {
  top: clamp(16px, 3vw, 32px);
  right: clamp(16px, 3vw, 32px);
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 34px;
  font-weight: 300;
  padding: 12px;
}

.lightbox-prev { left: clamp(8px, 2vw, 24px); }
.lightbox-next { right: clamp(8px, 2vw, 24px); }

@media (max-width: 720px) {
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
}

/* ============================================================
   Collection — composition téléphone (≤ 720 px uniquement)
   Moins de texte avant les créations, photos studio plus présentes,
   CTA en conclusion de page. Desktop et iPad inchangés.
   ============================================================ */

/* Éléments propres au mobile : masqués partout ailleurs */
.projects-lead--short,
.projects-end {
  display: none;
}

@media (max-width: 720px) {
  body.page-projets {
    --gutter: 30px;
  }

  /* Respiration sous le header (≈ 65 px) : ~ 38 px avant le titre */
  .projects-intro {
    display: block;
    padding: 109px var(--gutter) 48px;
  }

  .projects-lead--long {
    display: none;
  }

  .projects-intro-text p.projects-lead--short {
    display: block;
    margin: 16px 0 0;
    max-width: none;
    font-size: clamp(1.0625rem, 4.6vw, 1.1875rem);
    line-height: 1.35;
    text-wrap: balance;
  }

  /* Le CTA descend en bas de page */
  .projects-intro-cta {
    display: none;
  }

  .projects-end {
    display: block;
  }

  /* Filtres : faciles à toucher, puis les créations arrivent vite */
  .filter-nav {
    gap: 28px;
    margin-bottom: 32px;
    padding-bottom: 12px;
  }

  .filter-nav button {
    padding: 10px 0;
  }

  .creations {
    padding-bottom: 72px;
    gap: 112px;
  }

  /* Nom dominant, mention secondaire dessous */
  .creation-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 20px;
  }

  .creation-name {
    font-size: 1.75rem;
    line-height: 1.15;
  }

  .creation-mention {
    font-size: 13.5px;
    opacity: 0.85;
  }

  /* Photos studio : ~ +15 % de présence, toujours homogènes */
  .creation-studio {
    gap: 8px;
    margin-bottom: 22px;
  }

  .creation-studio:has(> :nth-child(4)) {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }

  /* Assises nomades : la photo des quatre poufs blancs (4e vignette)
     passe au-dessus, sur toute la largeur, pour ressortir ; les quatre
     poufs individuels restent en carré 2 × 2. Chaque vignette est
     rognée à ses bords : rien ne déborde, tout reste bien aligné. */
  .creation[data-category="assises-nomades"] .creation-studio-photo {
    overflow: hidden;
  }

  .creation[data-category="assises-nomades"] .creation-studio-photo:nth-child(4) {
    grid-column: 1 / -1;
    order: -1;
    aspect-ratio: 16 / 9;
  }

  .creation-studio-photo img,
  .creation-studio-photo:hover img,
  .creation-studio-photo:focus-visible img {
    transform: scale(1.1);
  }


}
