/* ═══════════════════════════════════════════════════════════════════
   IMMERSYTE — Blog stylesheet (extension de styles.css)
   N'introduit AUCUNE nouvelle variable de design.
   Toutes les couleurs, typos et radii sont issus de styles.css.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Indicateur de progression de lecture ── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--cyan);
  width: 0;
  z-index: 200;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ── Grille des articles (page /blog/) ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 16px;
}

.posts-grid .post-card-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 32px;
  background: var(--navy);
  color: var(--white);
  border-radius: 16px;
  text-decoration: none;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.posts-grid .post-card-featured::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(0, 208, 255, 0.08);
  filter: blur(80px);
  pointer-events: none;
}

.posts-grid .post-card-featured:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(11, 26, 46, 0.2);
}

.post-card-featured .featured-visual {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 5 / 4;
  background: var(--anthracite);
  position: relative;
  z-index: 1;
}

.post-card-featured .featured-content {
  position: relative;
  z-index: 1;
}

.post-card-featured .post-category {
  color: var(--cyan);
}

.post-card-featured h2 {
  color: var(--white);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 12px 0 14px;
}

.post-card-featured p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 18px;
}

.post-card-featured .read-more {
  color: var(--cyan);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.2s ease;
}

.post-card-featured:hover .read-more {
  gap: 14px;
}

/* ── Carte article standard ── */
.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: 2;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(11, 26, 46, 0.08);
  border-color: rgba(0, 208, 255, 0.3);
}

.post-card:hover::before {
  transform: scaleX(1);
}

.post-card .post-visual {
  aspect-ratio: 16 / 10;
  background: var(--navy);
  overflow: hidden;
}

.post-card .post-visual svg {
  width: 100%;
  height: 100%;
  display: block;
}

.post-card .post-content {
  padding: 24px 26px 26px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.post-category {
  color: var(--cyan-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.post-meta-sep {
  opacity: 0.5;
}

.post-card h2 {
  font-size: 1.2rem;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text);
  transition: color 0.2s ease;
}

.post-card:hover h2 {
  color: var(--cyan-dark);
}

.post-card .post-excerpt {
  font-size: 0.9rem;
  color: var(--body);
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.post-card .read-more {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--cyan-dark);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
  margin-top: auto;
}

.post-card:hover .read-more {
  gap: 10px;
}

/* ── Méta de l'article (page article, sous le H1) ── */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--muted);
}

.article-meta .meta-item strong {
  color: var(--text);
  font-weight: 600;
  display: inline-block;
  margin-right: 6px;
}

/* ── Visuel hero de l'article ── */
.article-hero-visual {
  margin: 0 auto 48px;
  max-width: 1000px;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background: var(--navy);
}

.article-hero-visual svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Corps prose : ajustements blog ── */
.prose .lead-quote {
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.5;
  color: var(--text);
  border-left: 3px solid var(--cyan);
  padding-left: 22px;
  margin: 32px 0;
  font-weight: 500;
}

.prose .lead-quote em {
  color: var(--cyan-dark);
  font-style: italic;
  font-weight: 400;
}

/* ── Encart chiffre clé (réutilise highlight-box mais en navy) ── */
.key-stat {
  background: var(--navy);
  color: var(--white);
  border-radius: 14px;
  padding: 28px 32px;
  margin: 32px 0;
  position: relative;
  overflow: hidden;
}

.key-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--cyan);
}

.key-stat .stat-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 10px;
}

.key-stat .stat-value {
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.45;
  font-weight: 500;
}

.key-stat .stat-value strong {
  color: var(--cyan);
  font-weight: 700;
}

/* ── Articles liés (sous l'article CTA) ── */
.related-posts {
  max-width: 1000px;
  margin: 60px auto 0;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.related-posts h2 {
  text-align: center;
  margin-bottom: 32px;
}

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

/* ── Responsive blog ── */
@media (max-width: 900px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
  .posts-grid .post-card-featured {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .article-meta {
    gap: 16px;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
