/* ========================================
   PAGE D'UNE RÉALISATION (/projets/:slug)
   Reprend la page d'un article (blog-article.css : haut de page, typographie du récit, partage,
   cartes du bas, appel à contact) et les cartes des pages Blog / Nos réalisations.
   Ici : informations techniques en pastilles sous le haut de page, récit à gauche et appel à
   contact collant à droite, galerie en mosaïque, vidéos, témoignage du client.
   ======================================== */

/* ---- Récit + fiche projet ---- */
.pd-layout {
  display: grid;
  grid-template-columns: minmax(0, 740px) 320px;
  justify-content: center;
  gap: clamp(48px, 5.5vw, 88px);
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}

.pd-aside {
  position: sticky;
  top: calc(var(--site-header-h, 96px) + 28px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.pd-card {
  padding: 26px 26px 28px;
  background: linear-gradient(160deg, #1c352a 0%, #152a21 70%);
  border: 1px solid rgba(157, 198, 107, 0.2);
  border-radius: 18px;
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.9);
}

.pd-card-title {
  margin: 0 0 16px;
  font-family: var(--site-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--site-lime);
}

.pd-card-btn {
  justify-content: center;
  width: 100%;
  margin-top: 22px;
  height: 48px;
  padding: 0 20px;
  font-size: 12px;
}

/* Introduction : un peu plus présente que le reste du récit */
.pd-intro p {
  font-size: 1.06em;
  color: rgba(255, 255, 255, 0.9);
}

/* ---- Galerie en mosaïque ---- */
.pd-gallery-section {
  background: var(--site-green, #172c23);
}

.pd-gallery-count {
  margin: 0 0 6px;
  font-family: var(--site-sans);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.pd-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(150px, 14vw, 220px);
  grid-auto-flow: dense;
  gap: 12px;
}

/* La 1re photo en grand ; une sur cinq ensuite en large, pour casser la grille */
.pd-gallery .pd-shot:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.pd-gallery .pd-shot:nth-child(5n + 4) {
  grid-column: span 2;
}

.pd-gallery.is-1 {
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: clamp(280px, 38vw, 560px);
}

.pd-gallery.is-1 .pd-shot:first-child {
  grid-column: auto;
  grid-row: auto;
}

.pd-gallery.is-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: clamp(240px, 26vw, 400px);
}

.pd-gallery.is-2 .pd-shot:first-child {
  grid-column: auto;
  grid-row: auto;
}

.pd-gallery.is-3 {
  grid-template-columns: 2fr 1fr;
}

.pd-gallery.is-3 .pd-shot:first-child {
  grid-column: 1;
  grid-row: span 2;
}

.pd-shot {
  position: relative;
  border-radius: 14px;
}

.pd-shot.ba-zoom img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.pd-shot-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #fff;
  background: rgba(16, 32, 26, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.9);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.pd-shot-zoom svg {
  width: 15px;
  height: 15px;
}

.pd-shot:hover .pd-shot-zoom,
.pd-shot:focus-visible .pd-shot-zoom {
  opacity: 1;
  transform: none;
}

/* ---- Vidéos ---- */
.pd-videos {
  background: var(--site-green-deep, #10201a);
}

.pd-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.pd-video-grid.is-1 {
  grid-template-columns: minmax(0, 960px);
  justify-content: center;
}

.pd-video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0c1813;
  border-radius: 16px;
}

.pd-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- Témoignage : bandeau crème, comme les engagements ---- */
.pd-testimonial {
  position: relative;
  padding: clamp(64px, 7vw, 104px) 0;
  overflow: hidden;
  background: var(--site-cream, #f4f2ec);
}

.pd-testimonial-inner {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  text-align: center;
}

.pd-quote-mark {
  width: 46px;
  height: 46px;
  color: #6f9a43;
  opacity: 0.5;
}

.pd-stars {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 14px 0 0;
}

.pd-stars svg {
  width: 18px;
  height: 18px;
  color: rgba(16, 32, 26, 0.18);
}

.pd-stars svg.is-on {
  color: #c9a227;
}

.pd-testimonial-text {
  margin: 18px 0 0;
}

.pd-testimonial-text p {
  margin: 0;
  font-family: var(--site-serif);
  font-size: clamp(24px, 2.3vw, 34px);
  font-style: italic;
  font-weight: 500;
  line-height: 1.35;
  color: var(--site-green-deep, #10201a);
}

.pd-author {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  text-align: left;
}

.pd-author img,
.pd-author-initial {
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.pd-author img {
  object-fit: cover;
}

.pd-author-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--site-serif);
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  background: var(--site-green, #172c23);
}

.pd-author strong {
  display: block;
  font-family: var(--site-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--site-green-deep, #10201a);
}

.pd-author small {
  display: block;
  font-family: var(--site-sans);
  font-size: 13px;
  color: rgba(16, 32, 26, 0.65);
}

/* ---- Bas de page : alternance des fonds ---- */
.pd-similar {
  background: var(--site-green-deep, #10201a);
}

.pd-posts {
  background: var(--site-green, #172c23);
}

/* ========================================
   TABLETTE ET MOBILE (tailles alignées sur le reste du site)
   ======================================== */
@media (max-width: 1199px) {
  .pd-layout {
    grid-template-columns: minmax(0, 700px) 280px;
    gap: 44px;
  }

  .pd-card {
    padding: 22px 22px 24px;
  }

  .pd-testimonial-text p {
    font-size: 24px;
  }
}

@media (max-width: 991px) {
  /* Une colonne : le partage à la fin du récit */
  .pd-layout {
    grid-template-columns: minmax(0, 720px);
  }

  .pd-aside {
    display: none;
  }

  /* Introduction : même taille que le récit (le léger agrandissement reste sur ordinateur) */
  .pd-intro p {
    font-size: 1em;
  }

  .pd-gallery,
  .pd-gallery.is-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 180px;
  }

  .pd-gallery .pd-shot:nth-child(5n + 4) {
    grid-column: auto;
  }

  .pd-gallery.is-3 .pd-shot:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }

  .pd-video-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pd-testimonial-text p {
    font-size: 22px;
  }
}

@media (max-width: 575px) {
  .pd-card-title {
    font-size: 11px;
  }

  .pd-gallery,
  .pd-gallery.is-3 {
    grid-auto-rows: 130px;
    gap: 8px;
  }

  .pd-gallery.is-1,
  .pd-gallery.is-2 {
    grid-auto-rows: 240px;
  }

  .pd-gallery.is-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .pd-shot {
    border-radius: 10px;
  }

  .pd-shot-zoom {
    display: none;
  }

  .pd-testimonial {
    padding: 52px 0;
  }

  .pd-quote-mark {
    width: 36px;
    height: 36px;
  }

  .pd-testimonial-text p {
    font-size: 19px;
  }

  .pd-author {
    margin-top: 22px;
  }

  .pd-author img,
  .pd-author-initial {
    width: 44px;
    height: 44px;
  }

  .pd-author strong {
    font-size: 14px;
  }

  .pd-author small {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-shot-zoom {
    transition: none;
  }
}

/* ========================================
   HAUT DE PAGE EN PLEINE PAGE (demande du client du 09/10/2026)
   La photo principale occupe tout l'écran sous la barre de menu, texte en bas (blog-article.css).
   ======================================== */
.project-detail-page .ba-hero.has-image {
  min-height: calc(100vh - var(--site-header-h, 96px));
  min-height: calc(100svh - var(--site-header-h, 96px));
}

/* ========================================
   FICHE TECHNIQUE (demande du client du 09/10/2026)
   Bandeau clair sous la photo, comme les engagements des pages services : informations côte à
   côte, pictogramme dans un rond, intitulé et valeur en petit. Seules les informations remplies
   dans l'admin s'affichent. Colonnes (--cols, --cols-t) calculées dans project-detail.ejs.
   Traits fins entre les cases : ombres de 1 px, celles du bord coupées par le cadre de la liste.
   ======================================== */
/* Fond clair prolongé sur toute la largeur de l'écran par une ombre, coupée en haut et en bas
   (une ombre n'agrandit pas la page : pas de défilement horizontal, contrairement à 100vw) */
.pd-specs {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
  background: var(--site-cream, #f4f2ec);
  box-shadow: 0 0 0 100vmax var(--site-cream, #f4f2ec);
  clip-path: inset(0 -100vmax);
}

/* Titre pour les lecteurs d'écran seulement (pas de bloc à l'écran) */
.pd-specs-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pd-specs-list {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  margin: 0 -22px;
  overflow: hidden;
}

/* Une case : pictogramme, intitulé, valeur, l'un sous l'autre */
.pd-spec {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 24px 22px;
  box-shadow: -1px 0 0 #ddd8cc, 0 -1px 0 #ddd8cc;
}

.pd-spec dt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  font-family: var(--site-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
  color: #6b6f68;
}

.pd-spec-icon {
  box-sizing: border-box;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  padding: 10px;
  background: #eaf1df;
  border-radius: 50%;
  fill: none;
  stroke: #2f5a3a;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: background-color 0.35s ease, stroke 0.35s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.pd-spec:hover .pd-spec-icon {
  background: #172c23;
  stroke: var(--site-lime);
  transform: rotate(-8deg);
}

.pd-spec dd {
  margin: 0;
  font-family: var(--site-sans);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.45;
  color: #1b1c1d;
  overflow-wrap: anywhere;
}

/* Colonne de droite : petit texte au-dessus du bouton */
.pd-card-text {
  margin: 0;
  font-family: var(--site-sans);
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
}

/* ---- Tablette : 4 informations par ligne au plus ---- */
@media (max-width: 1199px) {
  .pd-specs-list {
    grid-template-columns: repeat(var(--cols-t, 4), minmax(0, 1fr));
    margin: 0 -16px;
  }

  .pd-spec {
    padding: 20px 16px;
  }
}

/* ---- Mobile : 2 informations par ligne ---- */
@media (max-width: 575px) {
  .pd-specs-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 -12px;
  }

  .pd-spec {
    padding: 16px 12px;
  }

  .pd-spec-icon {
    width: 34px;
    height: 34px;
    margin-bottom: 6px;
    padding: 8px;
  }

  .pd-spec dt {
    font-size: 10px;
  }

  .pd-spec dd {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-spec-icon {
    transition: none;
  }
}

/* ========================================
   PHOTOS PAR ÉCRAN (demande du client du 09/10/2026)
   <picture> transparent pour la mise en page : la photo garde les règles écrites pour l'img.
   ======================================== */
.pd-pic {
  display: contents;
}
