/* ==========================================================================
   GROUPE NGF, actualites.css
   Section Actualités : index (article vedette + grille) et page d'article
   (hero, corps, galerie photos). S'appuie sur le design system (base + components).
   ========================================================================== */

/* ---------- Badge date ------------------------------------------------------ */
.date-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--azure-dark);
}
.date-badge svg { flex: none; }
.on-dark .date-badge, .date-badge--light { color: var(--azure-light); }

/* ========================= INDEX : article vedette ========================= */
.news-feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 4vw, 60px);
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.news-feature:hover { box-shadow: var(--sh-md); transform: translateY(-3px); }
.news-feature__media { position: relative; align-self: stretch; min-height: 320px; }
.news-feature__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news-feature__tag {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  background: var(--azure); color: #fff;
  padding: 7px 14px; border-radius: 999px;
  font-family: var(--f-mono); font-size: .64rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
}
.news-feature__body { padding: clamp(28px, 3.5vw, 48px) clamp(24px, 3.5vw, 52px) clamp(28px, 3.5vw, 48px) 0; }
.news-feature__body .date-badge { margin-bottom: 16px; }
.news-feature__body h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.news-feature__body p { margin-top: 14px; color: var(--muted); max-width: 52ch; }
.news-feature__body .arrow-link { margin-top: 22px; }
@media (max-width: 820px) {
  .news-feature { grid-template-columns: 1fr; }
  .news-feature__media { min-height: 240px; }
  .news-feature__body { padding: 28px 26px 32px; }
}

/* ========================= INDEX : grille d'articles ========================= */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 22px;
}
.news-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s, transform .3s var(--ease);
}
.news-card:hover { border-color: rgba(22, 167, 224, .5); box-shadow: var(--sh-md); transform: translateY(-4px); }
.news-card__media { aspect-ratio: 16 / 10; overflow: hidden; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.news-card:hover .news-card__media img { transform: scale(1.05); }
.news-card__body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 24px; }
.news-card__body .date-badge { margin-bottom: 10px; font-size: .66rem; }
.news-card__body h3 { font-size: 1.14rem; }
.news-card__body p { margin-top: 9px; font-size: .93rem; color: var(--muted); flex: 1; }
.news-card__body .arrow-link { margin-top: 16px; font-size: .9rem; }

/* ========================= PAGE ARTICLE ========================= */
.article { max-width: 820px; margin-inline: auto; }

.article__hero {
  margin-bottom: clamp(32px, 4vw, 52px);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-md);
}
.article__hero img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.article__hero figcaption {
  padding: 12px 18px;
  font-size: .84rem;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
}

/* Portrait mis en avant (dignitaire, maître d'ouvrage…), en tête d'article */
.article__portrait {
  max-width: 300px;
  margin: 0 auto clamp(32px, 4vw, 48px);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-md);
}
.article__portrait img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.article__portrait figcaption {
  padding: 12px 18px;
  font-size: .84rem;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
}

/* Corps rédactionnel */
.article__body { font-size: 1.06rem; line-height: 1.8; color: var(--body); }
.article__body > p { margin-bottom: 20px; }
.article__body h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  margin: clamp(30px, 4vw, 44px) 0 14px;
}
.article__body .lead-p {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--ink);
  font-weight: 500;
}
.article__body strong { color: var(--ink); font-weight: 600; }

/* Encadré fiche (date, ministre, lieu) */
.article__facts {
  margin: clamp(28px, 4vw, 40px) 0;
  padding: 26px 28px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--azure);
  border-radius: var(--r-md);
}
.article__facts dl { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; margin: 0; }
.article__facts dt {
  font-family: var(--f-mono); font-size: .64rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 5px;
}
.article__facts dd { margin: 0; font-size: .98rem; color: var(--ink); font-weight: 500; }
@media (max-width: 560px) { .article__facts dl { grid-template-columns: 1fr; gap: 14px; } }

/* Galerie photos */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: clamp(24px, 3vw, 36px);
}
.gallery figure { position: relative; margin: 0; border-radius: var(--r-md); overflow: hidden; }
.gallery img {
  width: 100%; height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.gallery a:hover img { transform: scale(1.05); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 14px 10px;
  font-size: .78rem; color: #fff;
  background: linear-gradient(transparent, rgba(4, 18, 42, .82));
}
.gallery__wide { grid-column: span 2; }
@media (max-width: 640px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery__wide { grid-column: span 2; }
}

/* ========================= Avant / Après ========================= */
/* Deux galeries jumelles reliées par une flèche : chaque côté se feuillette
   indépendamment (vignettes), la grande photo reste une <img> normale donc
   la visionneuse plein écran du site s'applique comme sur le reste des photos. */
.compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(16px, 3vw, 30px);
  margin-top: clamp(24px, 3vw, 36px);
}
.compare__panel { min-width: 0; }
.compare__stage {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-md);
  background: var(--navy-950);
}
.compare__stage img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: opacity .2s var(--ease);
}
.compare__stage.is-changing img { opacity: 0; }
.compare__tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  padding: 7px 14px; border-radius: 999px;
  font-family: var(--f-mono); font-size: .64rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: #fff;
}
.compare__panel--before .compare__tag { background: rgba(16, 24, 40, .8); }
.compare__panel--after .compare__tag { background: var(--azure); }
.compare__caption {
  margin-top: 12px;
  font-size: .84rem;
  color: var(--muted);
  min-height: 1.4em;
}
.compare__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.compare__thumb {
  flex: none;
  width: 56px; height: 56px;
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  opacity: .5;
  transition: opacity .25s, border-color .25s;
}
.compare__thumb:hover { opacity: .85; }
.compare__thumb.is-active { opacity: 1; border-color: var(--azure); }
.compare__arrow {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  color: var(--azure);
}
@media (max-width: 760px) {
  .compare { grid-template-columns: 1fr; justify-items: stretch; }
  .compare__arrow { transform: rotate(90deg); margin-inline: auto; }
}

/* Vidéos */
.videos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: clamp(16px, 2vw, 22px);
  margin-top: clamp(24px, 3vw, 36px);
}
.videos figure { margin: 0; }
.videos__wide { grid-column: span 2; }
.videos .video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #04122a;
}
.videos .video-frame--portrait { aspect-ratio: 9 / 16; max-width: 340px; }
.videos iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.videos figcaption {
  margin-top: 10px;
  font-size: .86rem;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 500;
}
.videos figcaption .mono {
  display: block;
  margin-top: 4px;
  font-family: var(--f-mono); font-size: .64rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
@media (max-width: 640px) {
  .videos { grid-template-columns: 1fr; }
  .videos__wide { grid-column: span 1; }
  .videos .video-frame--portrait { max-width: 100%; }
}

/* Pied d'article : retour + partage */
.article__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px;
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
