/* ═══════════════════════════════════════════════════════════════
   JADEV — Blog (index + articles).
   Structure inspirée d'une maquette repérée sur Figma (hero sombre +
   collage, liste d'articles en lignes, catégories en pied d'article),
   entièrement réhabillée à l'identité Jadev : navy/or, Manrope, pas de
   photo — les "vignettes" sont des pavés typographiques verticaux par
   catégorie (Référencement / Méthode / Prestataire), plus distinctif
   qu'une photo de stock générique et gratuit à décliner pour chaque
   nouvel article. Réutilise le vrai header du site (voir header.js).
   ═══════════════════════════════════════════════════════════════ */

:root {
  --cat-referencement: var(--gold);
  --cat-methode:       var(--navy-mid);
  --cat-prestataire:   var(--navy-soft);
}

/* ── Hero (index du blog) ─────────────────────────────────────── */
.blog-hero {
  background: var(--navy);
  color: var(--white);
  padding: calc(var(--header-h) + 4rem) 2rem 4rem;
}
.blog-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 3rem;
  align-items: center;
}
.blog-hero-eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .9rem;
}
.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.12;
  margin-bottom: 1.2rem;
}
.blog-hero p {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,.65);
  max-width: 46ch;
  margin-bottom: 1.75rem;
}

/* Collage de photos qui se chevauchent, légèrement inclinées — chaque
   tuile reprend une vraie catégorie d'article (voir data-category sur
   les vignettes de liste, même logique). */
.blog-collage {
  position: relative;
  height: 280px;
}
.collage-tile {
  position: absolute;
  width: 130px;
  height: 172px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--navy);
}
.collage-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.collage-tile--1 { top: 8px; left: 30px; z-index: 3; transform: rotate(-5deg); }
.collage-tile--2 { top: 64px; left: 132px; z-index: 2; transform: rotate(4deg); }
.collage-tile--3 { top: 0; left: 222px; z-index: 1; transform: rotate(-2deg); }

/* ── Liste des articles ───────────────────────────────────────── */
.post-list {
  max-width: 900px;
  margin: 0 auto;
  padding: 4.5rem 2rem 5rem;
}
.post-list-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 2.5rem;
}
.post-row-list { display: flex; flex-direction: column; }
.post-row {
  display: flex;
  gap: 1.75rem;
  padding: 2rem 0;
  border-top: 1px solid var(--gray-200);
  text-decoration: none;
  align-items: flex-start;
}
.post-row:last-child { padding-bottom: 0; }
.post-row-thumb {
  flex-shrink: 0;
  width: 96px;
  height: 128px;
  border-radius: var(--radius);
  overflow: hidden;
}
.post-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s var(--ease-out);
}
.post-row:hover .post-row-thumb img { transform: scale(1.06); }

.post-row-body { flex: 1; min-width: 0; }
.post-row-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  color: var(--gray-600);
  margin-bottom: .6rem;
}
.post-row-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gray-400); }
.post-row h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: .5rem;
  transition: color .2s;
}
.post-row:hover h3 { color: var(--gold-dark); }
.post-row p {
  font-size: .9rem;
  color: var(--gray-600);
  line-height: 1.6;
  max-width: 62ch;
  margin-bottom: .75rem;
}
.post-row-link { font-size: .84rem; font-weight: 600; color: var(--navy); }
.post-row:hover .post-row-link { color: var(--gold); }

/* ── Article — hero catégorie (remplace la photo) ────────────────── */
/* .legal-main a son propre padding-top (3.5rem), pensé pour les pages
   légales sous l'ancien header statique. Ici le header est fixe : c'est
   la marge du hero qui gère l'espace sous le header, donc on neutralise
   ce padding pour ne pas cumuler les deux. */
.legal-main:has(> .article-hero-block) { padding-top: 0; }

.article-hero-block {
  margin: calc(var(--header-h) + 2rem) 0 2.5rem;
  border-radius: var(--radius-lg);
  padding: 4rem 2.5rem;
  display: flex;
  align-items: flex-end;
  min-height: 220px;
  overflow: hidden;
}
/* Variante illustration isolée sur fond uni (ex. le robot Google, en PNG
   transparent) — l'image garde ses proportions, jamais recadrée. */
.article-hero-block--photo {
  padding: 2.5rem 0;
  align-items: stretch;
  background: var(--navy);
}
.article-hero-block--photo img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  margin: 0 auto;
}
/* Variante photo pleine (image rectangulaire classique, ex. les visuels
   de couverture par catégorie) — remplit le bloc, recadrée si besoin. */
.article-hero-block--cover {
  padding: 0;
  align-items: stretch;
  min-height: 260px;
}
.article-hero-block--cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Variante "conversation" (article sur le devis) — bulles de questions
   alternées gauche/droite, sans image : léger, et dit littéralement
   "une discussion, pas un interrogatoire". */
.article-hero-block--chat {
  background: var(--navy);
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: .75rem;
  padding: 3rem 2.5rem;
}
.chat-bubble {
  align-self: flex-start;
  max-width: 72%;
  padding: .8rem 1.15rem;
  border-radius: 18px 18px 18px 4px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.4;
  animation: chat-in .5s var(--ease-out) both;
}
.chat-bubble--reply {
  align-self: flex-end;
  border-radius: 18px 18px 4px 18px;
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
  font-weight: 600;
}
.chat-bubble:nth-child(2) { animation-delay: .15s; }
.chat-bubble:nth-child(3) { animation-delay: .3s; }
.chat-bubble:nth-child(4) { animation-delay: .45s; }
@keyframes chat-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-bubble { animation: none; }
}

.article-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  font-size: .82rem;
  color: var(--gray-600);
  margin-bottom: 2.5rem;
}
.article-meta-bar .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gray-400); }
.article-meta-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: .68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.article-meta-name { color: var(--navy); font-weight: 500; }

.article-step-num { color: var(--gold); }

/* ── Article — blocs de mise en forme du corps de texte ──────────── */
/* Objectifs en cartes (titre + précision), plus lisible qu'une liste
   "label → description" sur 6 lignes. */
.legal-main .article-goals {
  list-style: none;
  margin: 1.25rem 0 1.75rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
.legal-main .article-goals li {
  margin: 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.article-goals strong { color: var(--navy); font-size: .92rem; }
.article-goals span { font-size: .86rem; line-height: 1.55; color: var(--gray-600); }

/* Fonctionnalités possibles en pastilles (liste courte, à survoler). */
.legal-main .article-chips {
  list-style: none;
  margin: 1.25rem 0 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.legal-main .article-chips li {
  margin: 0;
  padding: .4rem .9rem;
  background: var(--bg-alt);
  border-radius: 999px;
  font-size: .85rem;
  color: var(--navy);
}

/* Solution vs besoin, côte à côte. */
.article-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin: 1.25rem 0 1.5rem;
}
.article-compare-item {
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px dashed var(--gray-400);
}
.article-compare-item--good {
  border: 1px solid var(--navy);
  background: var(--navy);
}
.article-compare-label {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: .45rem;
}
.article-compare-item--good .article-compare-label { color: var(--gold); }
.legal-main .article-compare-item p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.45;
  color: var(--gray-600);
}
.legal-main .article-compare-item--good p { color: var(--white); }

/* Encadré de réassurance. */
.article-callout {
  margin: 2rem 0;
  padding: 1.25rem 1.4rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
}
.legal-main .article-callout h3 { margin-top: 0; }
.legal-main .article-callout p:last-child { margin-bottom: 0; }

/* Phrase-clé mise en exergue. */
.legal-main .article-pullquote {
  margin: 2rem 0 1.25rem;
  padding-left: 1.1rem;
  border-left: 3px solid var(--gold);
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.35;
  color: var(--navy);
}

/* ── Article — catégories en pied de page ────────────────────────── */
.article-categories {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--gray-200);
}
.article-categories-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 1.25rem;
}
.article-categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.article-category-card {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 1.3rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color .2s, transform .2s var(--ease-out);
}
.article-category-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.article-category-swatch {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  margin-bottom: .3rem;
}
.article-category-card--referencement .article-category-swatch { background: var(--cat-referencement); }
.article-category-card--methode .article-category-swatch { background: var(--cat-methode); }
.article-category-card--prestataire .article-category-swatch { background: var(--cat-prestataire); }
.article-category-name { font-size: .88rem; font-weight: 600; color: var(--navy); }
.article-category-desc { font-size: .78rem; color: var(--gray-600); line-height: 1.5; }

.blog-placeholder-note {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  font-size: .85rem;
  color: var(--gray-600);
  font-style: italic;
  margin-bottom: 2rem;
}

.blog-article-cta {
  margin-top: 2.5rem;
  padding: 2rem;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  text-align: center;
}
.blog-article-cta p {
  font-size: .95rem;
  color: var(--gray-900);
  margin-bottom: 1.25rem;
}
/* .legal-main a{color:var(--navy);text-decoration:underline} (css/legal.css)
   passe après .btn--primary dans la cascade et gagne en spécificité — sans
   ce correctif le bouton devient illisible (texte navy sur fond navy). */
.blog-article-cta .btn--primary,
.blog-article-cta .btn--primary:hover {
  color: var(--white);
  text-decoration: none;
}

@media (max-width: 900px) {
  .blog-hero-inner { grid-template-columns: 1fr; text-align: center; }
  .blog-hero p { margin-left: auto; margin-right: auto; }
  .blog-collage { display: none; }
  .article-categories-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .blog-hero { padding: calc(var(--header-h) + 2.5rem) 1.25rem 3rem; }
  .post-list { padding: 3rem 1.25rem 3.5rem; }
  .post-row { flex-direction: column; gap: 1rem; }
  .post-row-thumb { width: 100%; height: 140px; }
  .article-hero-block { margin-top: calc(var(--header-h) + 1.25rem); padding: 2.5rem 1.5rem; }
  .article-hero-block--chat { padding: 2rem 1.25rem; gap: .6rem; }
  .chat-bubble { max-width: 88%; font-size: .9rem; }
  .legal-main .article-goals,
  .article-compare { grid-template-columns: 1fr; }
}
