/* ==========================================================================
   BLOG — styles complémentaires à /css/style.css
   Même direction que la home : dominante blanche, bordeaux en signature,
   cuivre réservé aux boutons.
   ========================================================================== */

/* ---------- Hero blog (bordeaux — signature) ---------- */
/* Même fondu bordeaux vers ivoire que le hero de la home (.hero::after), adapté à la hauteur du bandeau */
.blog-hero {
  position: relative; isolation: isolate; background: var(--color-primary);
  min-height: calc(100vh + 160px); min-height: calc(100svh + 160px);
  display: flex; align-items: center;
  padding: clamp(88px, 8vh + 48px, 132px) 0 calc(clamp(32px, 5vh, 64px) + 160px);
  overflow: hidden;
}
.blog-hero .container { position: relative; z-index: 2; }
/* Filigrane : étincelle 4 pointes effilées + petite étincelle secondaire, dessinées sur mesure
   (charte : pas de photo stock ni d'image IA, on décore avec les motifs de la marque) */
.blog-hero::before {
  content: '';
  position: absolute;
  top: 10px; right: -30px;
  width: 480px; height: 440px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 240'%3E%3Cg fill='%23faf8f5'%3E%3Cpath d='M150 10 C153 78 174 99 242 102 C174 105 153 126 150 194 C147 126 126 105 58 102 C126 99 147 78 150 10 Z'/%3E%3Cpath d='M52 150 C53.5 184 63 191.5 95 193 C63 194.5 53.5 202 52 236 C50.5 202 41 194.5 9 193 C41 191.5 50.5 184 52 150 Z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
  opacity: 0.06;
  z-index: 1;
  pointer-events: none;
}
.blog-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 350px;
  background: linear-gradient(to bottom,
    rgba(102,0,31,0) 0%,
    rgba(102,0,31,0.02) 88%,
    rgba(102,0,31,0.08) 96%,
    var(--color-bg) 100%);
  z-index: 1;
  pointer-events: none;
}
/* Entrée du hero : même chorégraphie que le hero de la home (kicker, puis titre flouté, puis texte) */
.blog-hero .container.reveal { opacity: 1; transform: none; transition: none; }
.blog-hero .kicker { color: var(--color-text-light); margin-bottom: 22px; opacity: 0; transform: translateY(14px); animation: heroKickerIn 680ms var(--ease-out) 260ms forwards; }
.blog-hero h1 { color: var(--color-text-light); max-width: 16ch; font-size: clamp(40px, 4.6vw, 68px); line-height: 1.08; opacity: 0; transform: translateY(26px); filter: blur(8px); animation: heroTitleIn 980ms var(--ease-out) 420ms forwards; }
.blog-hero p { color: var(--color-text-light); font-size: 19px; max-width: 560px; margin-top: 22px; opacity: 0; transform: translateY(20px); animation: heroCopyIn 780ms var(--ease-out) 700ms forwards; }
@media (prefers-reduced-motion: reduce) {
  .blog-hero .kicker { opacity: 0.66 !important; transform: none !important; }
  .blog-hero h1 { opacity: 1 !important; transform: none !important; filter: none !important; }
  .blog-hero p { opacity: 0.88 !important; transform: none !important; }
}

.blog-list-section { background: var(--color-base); padding: 24px 0 120px; }

/* ---------- Filtres par rubrique (réutilisent les couleurs tag-*) ---------- */
.blog-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 36px; }
.filter-pill {
  appearance: none; border: 0; cursor: pointer; font-family: inherit;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase;
  padding: 9px 18px; border-radius: 999px;
  opacity: 0.72;
  transition: opacity 200ms ease, transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .filter-pill:hover { opacity: 1; transform: translateY(-2px); }
}
.filter-pill[aria-pressed="true"] { opacity: 1; box-shadow: inset 0 0 0 1.5px currentColor; }
.filter-pill:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.blog-card.is-hidden { display: none; }
.blog-card.pop { animation: cardPop 420ms var(--ease-out); }
@keyframes cardPop { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Nos ressources : guides et logiciel, distincts des articles datés ---------- */
.resource-heading { font-family: var(--font-serif); font-weight: 500; color: var(--color-primary); font-size: 30px; margin-bottom: 36px; }
.resource-section { padding: 24px 0 40px; }
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 12px; }

/* ---------- Cartes articles (blanc + filet, façon cabinet) ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* Cartes alignées sur le système de la home (mission-cards) : même fond, même ombre au repos, même élévation au survol */
.blog-card {
  background: rgba(255,253,249,0.85);
  border: 1px solid rgba(102,0,31,0.10);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(22,22,22,0.04);
  padding: 34px;
  display: flex;
  flex-direction: column;
  transition: opacity 700ms var(--ease-out), transform 420ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .blog-card:hover {
    transition:
      transform 260ms var(--ease-out),
      box-shadow 260ms var(--ease-out),
      border-color 220ms ease,
      background 260ms var(--ease-out);
    border-color: rgba(102,0,31,0.28);
    background: rgba(255,253,249,0.96);
    transform: translateY(-8px);
    box-shadow: 0 28px 68px rgba(102,0,31,0.13), 0 12px 34px rgba(22,22,22,0.05);
  }
}
.blog-card.is-upcoming { opacity: 0.62; }
.blog-card.is-upcoming:hover { border-color: rgba(102,0,31,0.10); transform: none; box-shadow: 0 8px 32px rgba(22,22,22,0.04); background: rgba(255,253,249,0.85); }

.blog-card-tag {
  display: inline-block; align-self: flex-start;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--label); background: var(--ivory-soft);
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 16px;
}
/* Code couleur éditorial par rubrique : teintes chaudes désaturées, dans l'esprit de la charte */
.tag-structuration { background: rgba(102,0,31,0.07); color: #66001f; }
.tag-organisation  { background: #f5e7db; color: #8a4418; }
.tag-delegation    { background: #e9ede3; color: #4a5c40; }
.tag-pilotage      { background: #e5eaef; color: #3d5166; }
.tag-process       { background: #efe8dc; color: #6b5335; }
.tag-facturation   { background: #f2e5ea; color: #74404f; }
.tag-guide         { background: rgba(102,0,31,0.07); color: #66001f; }
/* Rubriques préparées pour les prochains articles (même gamme chaude désaturée) */
.tag-croissance    { background: #f4ecd7; color: #77621f; }
.tag-equipe        { background: #ece7f0; color: #5a4a6b; }
.tag-outils        { background: #ecebe6; color: #55524a; }
.tag-tresorerie    { background: #e3edea; color: #2f5d51; }
.blog-card h2, .blog-card h3 {
  font-family: var(--font-serif); font-weight: 500; font-size: 26px;
  color: var(--color-primary); margin: 0 0 10px; line-height: 1.15;
}
.blog-card h2 a, .blog-card h3 a { color: inherit; }
.blog-card-meta { font-size: 13px; color: var(--color-text-muted); margin-bottom: 16px; }
.blog-card-excerpt { font-size: 15.5px; color: var(--color-text-muted); margin-bottom: 22px; flex-grow: 1; line-height: 1.6; }
.blog-card-link { font-size: 14px; font-weight: 600; color: var(--color-primary); align-self: flex-start; }
.blog-card-link.disabled { color: var(--color-text-muted); cursor: default; }

/* ---------- En-tête article ---------- */
.article-header { padding: 150px 0 36px; background: var(--color-base); }
.breadcrumb { font-size: 13px; color: var(--color-text-muted); margin-bottom: 24px; }
.breadcrumb a { color: var(--color-primary); }
.breadcrumb a:hover { text-decoration: underline; }

.article-tag {
  display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--label); background: var(--ivory-soft);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.article-header h1 { color: var(--color-primary); font-size: clamp(30px, 4vw, 46px); line-height: 1.1; max-width: 900px; }
.article-meta { font-size: 14px; color: var(--color-text-muted); margin-top: 22px; }

/* ---------- Corps article ---------- */
.article-body { max-width: 720px; margin: 0 auto; padding: 40px 24px 0; font-size: 18px; line-height: 1.8; color: var(--color-text); }
.article-body h2 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(27px, 3vw, 32px); color: var(--color-primary); margin: 58px 0 20px; }
.article-body h3 { font-family: var(--font-sans); font-weight: 600; font-size: 21px; color: var(--color-text); margin: 34px 0 12px; }
.article-body p { color: var(--color-text); margin: 0 0 20px; }
.article-body ul { margin: 0 0 20px; padding-left: 20px; list-style: disc; }
.article-body ul li { margin-bottom: 10px; }
.article-body a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(102,0,31,0.3); }
.article-body a:hover { text-decoration-color: var(--color-primary); }
.article-body .btn-cta, .article-body .btn-cta:hover { color: var(--color-text-light); text-decoration: none; }

/* Encadré : filet gauche bordeaux, fond ivoire doux */
.article-body blockquote {
  border-left: 3px solid var(--color-primary);
  background: var(--ivory-soft);
  color: var(--color-text-beige);
  padding: 22px 26px;
  margin: 34px 0;
  font-style: normal;
}
.article-body blockquote p { color: var(--color-text-beige); margin: 0; }

/* CTA milieu d'article */
.article-cta-inline { max-width: 720px; margin: 48px auto; padding: 0 24px; }
.article-cta-inline-box { background: var(--ivory-soft); color: var(--color-text-beige); border: 1px solid var(--line); border-radius: 6px; padding: 30px 32px; }
.article-cta-inline-box p { color: var(--color-text-beige); font-size: 18px; margin: 0 0 22px; font-family: var(--font-serif); }

/* CTA final (bordeaux — identique à la home, avec le même fondu ivoire → bordeaux en haut) */
.article-cta-final { position: relative; isolation: isolate; overflow: hidden; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='50 2 200 200'%3E%3Cpath fill='%23faf8f5' fill-opacity='0.06' d='M150 10 C153 78 174 99 242 102 C174 105 153 126 150 194 C147 126 126 105 58 102 C126 99 147 78 150 10 Z'/%3E%3C/svg%3E") no-repeat right -30px center / 360px auto, var(--color-primary); padding: 96px 0; margin-top: 64px; }
.article-cta-final::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 350px;
  background: linear-gradient(to top,
    rgba(102,0,31,0) 0%,
    rgba(102,0,31,0.02) 88%,
    rgba(102,0,31,0.08) 96%,
    var(--color-bg) 100%);
  z-index: 1;
  pointer-events: none;
}
/* Fondu bordeaux -> noir du footer : même recette que les fondus haut/bas, vers --color-footer */
.article-cta-final::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 160px;
  background: linear-gradient(to bottom,
    rgba(26,26,26,0) 0%,
    rgba(26,26,26,0.02) 88%,
    rgba(26,26,26,0.08) 96%,
    var(--color-footer) 100%);
  z-index: 1;
  pointer-events: none;
}
.article-cta-final .container { position: relative; z-index: 2; }
.article-cta-final .cta-inner { max-width: 720px; }
.article-cta-final .kicker { color: var(--color-text-light); opacity: 0.66; margin-bottom: 22px; }
.article-cta-final h2 { color: var(--color-text-light); max-width: 26ch; }
.article-cta-final p { color: var(--color-text-light); opacity: 0.86; max-width: 50ch; margin: 20px 0 0; font-size: 19px; }

/* Articles liés */
.related-section { padding: 96px 0; background: var(--color-base); border-top: 1px solid var(--line); }
.related-section > .container > h2 { font-family: var(--font-serif); font-weight: 500; color: var(--color-primary); font-size: 30px; margin-bottom: 36px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

@media (max-width: 920px) {
  .article-cta-final { background-size: 260px auto; background-position: right -70px top 30px; }
  .blog-hero h1 { font-size: clamp(42px, 8vw, 60px); }
  .blog-hero::before { width: 320px; height: 295px; right: -50px; top: 20px; }
  .article-header { padding: 120px 0 28px; }
  .blog-grid, .related-grid, .resource-grid { grid-template-columns: 1fr; }
  .article-body { font-size: 17px; }
}

/* ---------- Figures / schémas SVG maison (charte : pas de photo stock ni image IA) ---------- */
.article-figure {
  margin: 40px 0;
  padding: 26px 22px 18px;
  background: rgba(255,253,249,0.85);
  border: 1px solid rgba(102,0,31,0.10);
  border-radius: 8px;
}
.article-figure svg { display: block; width: 100%; height: auto; }
/* Mobile : les schémas (viewBox ~700px) deviennent illisibles écrasés à ~330px (textes rendus <5px).
   Pattern standard contenu large : taille minimale lisible + glissement horizontal au doigt. */
@media (max-width: 640px) {
  .article-figure { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .article-figure svg { min-width: 640px; }
  .article-figure figcaption { position: sticky; left: 0; }
}
.article-figure figcaption {
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--color-text-muted);
  text-align: center;
}

/* Schéma en CARTES (responsive : 3 colonnes desktop, empilé mobile) — remplace les anciens SVG à
   défilement horizontal. L'animation d'apparition en cascade est portée par .stagger (style.css),
   avec repli sans-JS géré par le <noscript> de chaque page. */
.article-schema .schema-heading { text-align: center; color: #66001f; font-family: 'Outfit', system-ui, sans-serif; font-weight: 600; font-size: 15px; margin: 0 0 16px; }
.schema-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.schema-card { background: #f7f1e6; border: 1px solid rgba(102,0,31,0.14); border-radius: 12px; padding: 16px 18px; }
.schema-card--featured { background: #66001f; border-color: #66001f; box-shadow: 0 10px 26px rgba(102,0,31,0.22); }
.schema-card h3 { font-family: 'Outfit', system-ui, sans-serif; font-weight: 600; font-size: 15px; color: #484237; margin: 0 0 7px; }
.schema-card p { font-size: 14px; color: #6f695d; margin: 0; line-height: 1.5; }
.schema-card .schema-card-note { font-size: 13px; color: #8a8072; margin: 8px 0 0; }
.schema-card--featured h3 { color: #faf8f5; }
.schema-card--featured p { color: #f2e6dd; }
.schema-card--featured .schema-card-note { color: #d9c4b6; }
.schema-card-tag { display: inline-block; background: #b0561f; color: #faf8f5; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; padding: 3px 10px; border-radius: 20px; margin: 0 0 9px; }
@media (max-width: 620px) {
  .schema-cards { grid-template-columns: 1fr; gap: 10px; }
  .schema-card { padding: 14px 16px; }
  .article-schema .schema-heading { font-size: 14.5px; }
}

/* Variante "process numéroté" (4 étapes) : 4 colonnes desktop, 2×2 tablette, empilé mobile */
.schema-cards--steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.schema-card-num { display: block; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 30px; font-weight: 600; line-height: 1; color: #66001f; margin: 0 0 4px; }
.schema-card--featured .schema-card-num { color: #faf8f5; }
@media (max-width: 760px) { .schema-cards--steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .schema-cards--steps { grid-template-columns: 1fr; } }

/* Variante "Bilan T0/T1/T2" : 3 temps de mesure avec barre de progression (remplace l'ancien SVG large qui débordait sur mobile) */
.bilan-steps .schema-card { display: flex; flex-direction: column; }
.bilan-step-label { display: inline-block; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 26px; font-weight: 600; line-height: 1; color: #66001f; margin: 0 0 4px; }
.schema-card--featured .bilan-step-label { color: #faf8f5; }
.bilan-step-bar { margin-top: auto; padding-top: 14px; }
.bilan-step-bar > span { display: block; height: 6px; width: var(--fill, 100%); border-radius: 999px; background: #b0561f; }
.bilan-steps .schema-card { position: relative; }
.bilan-step-bar::before { content: ""; display: block; height: 6px; border-radius: 999px; background: rgba(102,0,31,0.12); margin-bottom: -6px; }
.schema-card--featured .bilan-step-bar::before { background: rgba(250,248,245,0.22); }
.schema-card--featured .bilan-step-bar > span { background: #faf8f5; }

@media (max-width: 560px) {
  /* Hero blog mobile : hauteur réduite, contenu en haut (même correctif que la home) */
  .blog-hero { min-height: auto; align-items: start; padding: 96px 0 44px; }
  .blog-hero h1 { font-size: clamp(28px, 8.5vw, 36px); }
  .blog-hero p { font-size: 16px; }
}

/* Schéma en LISTE numérotée (signes, indicateurs...) : 2 colonnes desktop, empilée mobile.
   Même esprit que .schema-cards mais pensé pour des items courts en nombre impair/pair
   variable (5 à 8 items). Anime en cascade via .stagger (style.css). */
.schema-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.schema-list-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: #f7f1e6; border: 1px solid rgba(102,0,31,0.14); border-radius: 10px;
  padding: 13px 16px;
}
.schema-list-item--callout {
  grid-column: 1 / -1;
  background: transparent; border: 1.5px solid #b0561f;
  align-items: center; justify-content: center; text-align: center;
}
.schema-list-item--featured { background: #66001f; border-color: #66001f; }
.schema-list-num {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: #66001f; color: #faf8f5;
  font-family: 'Outfit', system-ui, sans-serif; font-weight: 600; font-size: 12px;
}
.schema-list-item--featured .schema-list-num { background: #faf8f5; color: #66001f; }
.schema-list-item p { margin: 0; font-size: 14px; line-height: 1.4; color: #484237; }
.schema-list-item h3 { font-family: 'Outfit', system-ui, sans-serif; font-weight: 600; font-size: 13.5px; color: #66001f; margin: 0 0 3px; }
.schema-list-item p.schema-list-note { font-size: 12.5px; color: #8a8072; }
.schema-list-item--featured h3 { color: #faf8f5; }
.schema-list-item--featured p.schema-list-note { color: #d9c4b6; }
.schema-list-item--callout p { font-size: 13px; font-weight: 600; color: #b0561f; }
@media (max-width: 620px) {
  .schema-list { grid-template-columns: 1fr; }
}
