/* ============================================================================
   Détail publication (.article-detail) + « À lire aussi » (.related)
   Port fidèle de la maquette 2026-06-10/publication-detail.html.
   Chargé par PublicationFront (page détail). Les cartes .article-card sont
   stylées dans publications.css (chargé conjointement) ; ici, overrides « light ».
   ========================================================================== */

/* Hero d'article : le titre est une chaîne dynamique UNIQUE (pas de découpe
   manuelle en lignes comme les autres heros). Le .mission-line standard est
   calibré pour UNE ligne (height fixe + .mission-line__phrase { white-space:nowrap }),
   ce qui TRONQUAIT les titres longs. On lève ces contraintes pour ce hero : le
   titre peut retourner à la ligne, une seule bande wipe couvrant le bloc. */
.page-hero--article .page-hero__title .mission-line { height: auto; }
.page-hero--article .page-hero__title .mission-line__phrase { white-space: normal; }

.article-detail {
  background: var(--c-bg-cream);
  color: var(--c-blue);
  padding: 0 0 clamp(60px, 9vh, 130px);
}
.article-detail [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
}
.article-detail [data-reveal].is-in-view {
  opacity: 1;
  transform: none;
}

/* Méta (date · auteur) — posée dans le lead du hero */
.article-detail__meta.page-hero__lead {
  margin-top: clamp(8px, 1.2vh, 16px);
}
.article-detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(8px, 1vw, 16px);
  font-family: var(--ff-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: rgba(0, 57, 77, 0.6);
}
.article-detail__meta-sep { color: var(--c-copper); }

/* Photo large — révélée par un masque arrondi qui grossit à l'ouverture */
.article-detail__media {
  margin: clamp(16px, 2.5vh, 36px) 0 0;
  border-radius: 0 clamp(40px, 6vw, 120px) 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.article-detail__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-detail__media--reveal {
  clip-path: circle(0% at 50% 50%);
  animation: article-media-open 1.25s cubic-bezier(0.65, 0.05, 0, 1) 0.5s forwards;
}
.article-detail__media--reveal img {
  transform: scale(1.12);
  animation: article-media-zoom 1.6s cubic-bezier(0.65, 0.05, 0, 1) 0.5s forwards;
}
@keyframes article-media-open {
  to { clip-path: circle(85% at 50% 50%); }
}
@keyframes article-media-zoom {
  to { transform: scale(1); }
}

/* Corps éditorial */
.article-detail__body {
  max-width: 70ch;
  margin: clamp(36px, 5vh, 72px) 0 0;
  font-size: clamp(1.02rem, 1.15vw, 1.2rem);
  line-height: 1.75;
  color: var(--c-blue);
}
.article-detail__body > * + * { margin-top: clamp(18px, 2.4vh, 30px); }
.article-detail__lead {
  font-size: clamp(1.18rem, 1.5vw, 1.5rem);
  line-height: 1.55;
  color: var(--c-blue);
  font-weight: 500;
}
.article-detail__body h2 {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-top: clamp(32px, 4.5vh, 56px);
  color: var(--c-blue);
}
.article-detail__quote {
  margin: clamp(32px, 4.5vh, 56px) 0;
  padding: clamp(8px, 1vh, 14px) 0 clamp(8px, 1vh, 14px) clamp(20px, 2vw, 32px);
  border-left: 3px solid var(--c-copper);
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1.4;
  color: var(--c-copper);
}
.article-detail__download {
  max-width: 70ch;
  margin: clamp(40px, 5.5vh, 80px) 0 0;
}

/* « À lire aussi » */
.related {
  background: var(--c-bg-cream);
  padding: clamp(48px, 7vh, 100px) 0 clamp(60px, 9vh, 120px);
  border-top: 1px solid rgba(142, 117, 71, 0.2);
}
.related__title {
  margin: 0 0 clamp(28px, 4vh, 56px);
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 2.6vw, 2.6rem);
  letter-spacing: -0.02em;
  color: var(--c-blue);
}
.related__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
}
.related .article-card__title { color: var(--c-blue); }

/* Responsive : desktop 3 col → tablette 2 col → mobile 1 col (ordre = cascade) */
@media (max-width: 1024px) {
  .related__list { grid-template-columns: 1fr; }
}
@media (min-width: 600px) and (max-width: 1024px) {
  .related__list {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(20px, 3vw, 36px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-detail__media--reveal { clip-path: none; animation: none; }
  .article-detail__media--reveal img { transform: none; animation: none; }
  .article-detail [data-reveal] { opacity: 1; transform: none; }
}
