/* ============================================================
   PAGE PROJET BCP PARTNERS — design DEV PROJET.jpg.
   Intro animée (classes project-detail conservées pour
   project-detail.js), puis sections : typographies, palette,
   capture encadrée, galerie grise, mobiles, process.
   Les couleurs BCP en dur sont celles de la marque cliente
   (palette provisoire, à remplacer par les codes officiels).
   ============================================================ */

/* Le scroll-behavior:smooth global fausse les mesures de ScrollTrigger
   (refresh pendant un scroll => positions décalées). Pas d'ancres sur cette
   page : on repasse en auto, les scrolls JS restent lisses (behavior:smooth). */
html {
  scroll-behavior: auto;
}

/* ---------- Fond de page : le beige du site ---------- */

.project-detail-page,
.project-detail,
.project-detail__intro,
.project-detail__hero-panel {
  background: var(--beige);
}

/* ---------- En-tête projet : titre + colonne infos ---------- */

/* Neutralise le layout de l'ancien composant (largeur 40% alignée à droite) */
.project-detail__hero-panel {
  padding-left: var(--margin);
}

.bcpj-info.project-detail__insight-wrap {
  width: 100%;
  max-width: 34rem;
  margin-left: 0;
}

.bcpj-head {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.bcpj-title {
  font: var(--type-h1);
  letter-spacing: var(--ls-title);
  color: var(--ink);
  margin: 0;
  max-width: 16ch;
}

.bcpj-info {
  max-width: 34rem;
}

.bcpj-meta {
  margin: 0 0 0.9rem;
}

.bcpj-meta > div {
  display: grid;
  grid-template-columns: minmax(0, 7rem) minmax(0, 1fr);
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
}

.bcpj-meta dt {
  font: var(--type-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  align-self: center;
}

.bcpj-meta dd {
  font: var(--type-body);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
}

.bcpj-site {
  display: inline-block;
  font: var(--type-body);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 45%, transparent);
  padding-bottom: 0.1em;
  margin-bottom: clamp(1.8rem, 4vh, 2.8rem);
  transition: border-color 0.2s ease;
}

.bcpj-site:hover {
  border-bottom-color: var(--ink);
}

.bcpj-block {
  margin-top: clamp(1.6rem, 3.5vh, 2.4rem);
}

.bcpj-label {
  font: var(--type-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  color: var(--ink);
  font-weight: 600;
  margin: 0 0 0.6rem;
}

.bcpj-text {
  font: var(--type-body);
  color: color-mix(in srgb, var(--ink) 78%, transparent);
  margin: 0;
}

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

.bcpj-section {
  background: var(--beige);
  padding: clamp(3rem, 8vh, 5.5rem) var(--margin);
}

.bcpj-eyebrow {
  font: var(--type-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  margin: 0 0 1.6rem;
}

/* ---------- Planche charte graphique (reproduction exacte) ---------- */

.bcpj-rule-label {
  font: var(--type-body-sm, var(--type-body));
  color: var(--ink);
  margin: 0 0 0.7rem;
}

.bcpj-rule {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 0 0 clamp(3rem, 7vh, 5rem);
}

.bcpj-charte-inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: clamp(1rem, 3vh, 2.5rem) 0 clamp(1.5rem, 4vh, 3rem);
}

/* Typographies : Miller (serif) et Poppins */

.bcpj-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 7vw, 7rem);
}

.bcpj-specimen {
  text-align: center;
}

.bcpj-specimen__font {
  font-size: clamp(1.3rem, 1.8vw, 1.7rem);
  color: var(--ink);
  margin: 0 0 clamp(1.5rem, 4vh, 2.8rem);
}

.bcpj-specimen__aa {
  font-size: clamp(4.5rem, 8vw, 7rem);
  line-height: 1;
  color: var(--ink);
  margin: 0 0 clamp(1.8rem, 5vh, 3.2rem);
}

.bcpj-specimen__alpha {
  font-size: clamp(0.8rem, 1.1vw, 1rem);
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
}

.bcpj-specimen--serif .bcpj-specimen__font,
.bcpj-specimen--serif .bcpj-specimen__aa,
.bcpj-specimen--serif .bcpj-specimen__alpha {
  font-family: "Playfair Display", Georgia, serif;
}

.bcpj-specimen--serif .bcpj-specimen__aa,
.bcpj-specimen--sans .bcpj-specimen__aa {
  font-weight: 500;
}

/* Filet central entre typos et palette */

.bcpj-sep {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: clamp(3rem, 8vh, 5.5rem) 0;
}

/* Palette : codes hexa dans les pavés, premier pavé plus large */

.bcpj-palette {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(0.9rem, 1.6vw, 1.4rem);
}

.bcpj-color {
  background: var(--chip);
  border-radius: 3px;
  height: clamp(14rem, 34vh, 19rem);
  padding: clamp(1rem, 2vw, 1.5rem);
}

.bcpj-color__hex {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(0.85rem, 1.2vw, 1.05rem);
  letter-spacing: 0.02em;
  color: var(--chip-text, rgba(255, 255, 255, 0.85));
}

/* ---------- Capture du site, entière, posée sur le beige ---------- */

.bcpj-fullshot {
  display: block;
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  height: auto;
  /* Ombre externe légère : détache la capture du fond beige */
  box-shadow: 0 1.1rem 2.6rem rgba(34, 34, 34, 0.13);
}

/* ---------- Vidéo du site : sous la charte, posée sur le beige ---------- */

.bcpj-video {
  display: block;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  height: auto;
  border-radius: 0.6rem;
  /* Même ombre légère que les autres visuels du gabarit */
  box-shadow: 0 1.1rem 2.6rem rgba(34, 34, 34, 0.13);
}

/* ---------- Galerie : les deux pages du site, sur beige ---------- */

.bcpj-gallery {
  background: var(--beige);
  padding: clamp(3.5rem, 9vh, 6rem) var(--margin);
}

.bcpj-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4.5vw, 4.5rem);
  align-items: start;
}

.bcpj-gallery__grid img {
  display: block;
  width: 100%;
  height: auto;
  /* Même ombre légère que la grande capture */
  box-shadow: 0 1.1rem 2.6rem rgba(34, 34, 34, 0.13);
}

/* ---------- Zones photo pleine largeur : effet fenêtre au scroll ----------
   L'image mesure 125% de la hauteur du cadre (overflow hidden) et glisse
   doucement pendant la traversée : elle semble suivre en restant bloquée. */

.bcpj-photo-slot {
  position: relative;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 16%, var(--white));
  min-height: clamp(28rem, 88svh, 52rem);
}

.bcpj-photo-slot__img {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: 125%;
  object-fit: cover;
  will-change: transform;
}

/* ---------- Écrans mobiles : accordéon de mockups iPhone ---------- */

/* L'accordéon déborde volontairement : les écrans du bout sont coupés
   par les bords de la section, pas par la fenêtre (pas de scroll horizontal) */
.bcpj-mobiles {
  overflow: hidden;
}

.bcpj-deck {
  position: relative;
  width: min(19rem, 62vw);
  aspect-ratio: 640 / 1225;
  margin: 0 auto;
  cursor: grab;
  touch-action: pan-y;
  /* Perspective pour l'inclinaison 3D de l'écran du dessus au survol */
  perspective: 60rem;
}

.bcpj-deck:active {
  cursor: grabbing;
}

.bcpj-phone-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform, opacity, filter;
  /* L'arc est calculé en JS (translate + rotate) : pivot au centre */
  transform-origin: 50% 50%;
}

.bcpj-phone-nav {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: clamp(1.8rem, 4vh, 2.6rem);
}

.bcpj-phone-btn {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink) 40%, transparent);
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.bcpj-phone-btn:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--white);
}

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

@media (max-width: 900px) {
  .bcpj-head,
  .bcpj-type-grid,
  .bcpj-gallery__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* Zones photo : hauteur naturelle de l'image, entière et sans effet
     (l'effet fenêtre et son zoom restent sur ordinateur) */
  .bcpj-photo-slot {
    min-height: 0;
  }

  .bcpj-photo-slot__img {
    position: static;
    display: block;
    height: auto;
    transform: none !important;
  }

  /* Galerie : pages empilées, statiques (l'animation de croisement
     couperait les images ici) */
  .bcpj-gallery__grid img {
    transform: none !important;
  }

  .bcpj-palette {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bcpj-color--wide {
    grid-column: span 2;
  }

  .bcpj-color {
    height: 9rem;
  }

  .bcpj-deck {
    width: min(16rem, 70vw);
  }
}
