/* =========================================================
   BLOG HUB - Option B (clusters)
   Cohérent avec global.css/layout.css/components.css
   (variables: --primary-color, --primary-dark, --light-bg, --light-text, --muted...)
   ========================================================= */

/* Accessibilité */
.sr-only{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

/* Page wrapper (hérite de global.css) */
.blog-section{
  padding: 30px 20px 70px;
}

/* =========================
   HERO (dans le ton du site)
   Inspiré de tes sections/hero existants
   ========================= */
.blog-hero{
  padding: 64px 20px 34px;
  text-align: center;
  background: linear-gradient(to right, #2563eb, var(--primary-color));
  color: white;
}

.blog-hero-inner{
  max-width: 1100px;
  margin: 0 auto;
}

.blog-kicker{
  font-size: 0.85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: 0.92;
  margin: 0 0 10px;
}

.blog-hero h1{
  font-size: 2.35rem;
  line-height: 1.15;
  margin: 0 0 14px;
  color: white;
}

.blog-subtitle{
  max-width: 900px;
  margin: 0 auto 18px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.95);
}

.blog-hero-cta{
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
  margin-top: 14px;
}

/* On réutilise .cta-button (components.css) ; on ajuste la secondary ici */
.blog-hero-cta .cta-button{
  min-width: 220px;
}

.blog-hero-cta .cta-secondary{
  background: rgba(255,255,255,0.12);
  color: white;
  border: 1px solid rgba(255,255,255,0.35);
}

.blog-hero-cta .cta-secondary:hover{
  background: rgba(255,255,255,0.18);
}

/* =========================
   CONTROLS (barre “propre”, pas overlay gris)
   -> fond bleu sombre (primary-dark), lisible, solide
   ========================= */
.blog-controls{
  position: sticky;
  top: 0;
  z-index: 30;

  /* Dans le ton header/footer (layout.css) */
  background: var(--primary-dark);
  border-bottom: 1px solid rgba(255,255,255,0.18);

  /* léger “relief”, pas de transparence cheloue */
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.blog-controls-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;

  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 12px 14px;
  align-items: center;
}

/* Search */
.blog-search input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;

  background: #ffffff;              /* lisible, “fini” */
  color: var(--light-text);
  border: 1px solid rgba(0,0,0,0.10);

  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.blog-search input::placeholder{
  color: var(--muted);
}

.blog-search input:focus{
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147,197,253,0.35);
}

/* Sort */
.blog-sort select{
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;

  background: #ffffff;
  color: var(--light-text);
  border: 1px solid rgba(0,0,0,0.10);

  outline: none;
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.blog-sort select:focus{
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147,197,253,0.35);
}

/* Chips (ancres + bouton “Voir tout”) */
.blog-chips{
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* chips = style “pill” proche de tes CTA / header-direct-link */
.blog-chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 9px 14px;
  border-radius: 9999px;

  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.28);

  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;

  transition: transform .12s ease, background .18s ease, border-color .18s ease;
}

.blog-chip:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.40);
}

.blog-chip-button{
  cursor: pointer;
  font-family: inherit;
}

/* Count */
.blog-count{
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: rgba(255,255,255,0.85);
  font-size: 0.82rem;
}

/* =========================
   CLUSTERS
   ========================= */
.blog-cluster{
  max-width: 1100px;
  margin: 0 auto 44px;
}

.blog-cluster-head{
  margin: 0 0 18px;
}

.blog-cluster-head h2{
  font-size: 1.75rem;
  margin: 0 0 6px;
  /* On garde le style “h2 bleu” (global.css) mais en hub,
     on veut lisible sur light-bg : */
  color: var(--primary-color);
}

.blog-cluster-head p{
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 980px;
}

/* =========================
   GRID + CARDS (look “fini”, cohérent avec tes cards blanches)
   Inspiré de prediction-card / process steps (components.css)
   ========================= */
.blog-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

/* Carte */
.blog-card{
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
  overflow: hidden;

  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.15);
}

.blog-link{
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.blog-thumbnail{
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f3f4f6;
}

.blog-card-content{
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* Meta date */
.blog-meta{
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* Title */
.blog-title{
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0;
  color: var(--light-text);
  font-weight: 800;
}

/* Excerpt */
.blog-excerpt{
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #374151; /* lisible sans être trop noir */
}

/* Read more */
.blog-readmore{
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.blog-readmore:hover{
  text-decoration: underline;
}

/* Carte statique (page pilier) */
.blog-card-static .blog-meta{
  color: var(--muted);
}

/* =========================
   SECTION “Tous les articles”
   ========================= */
.blog-cluster-all{
  scroll-margin-top: 120px; /* pour l’ancre avec sticky controls */
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 900px){
  .blog-hero{
    padding: 52px 18px 28px;
  }

  .blog-hero h1{
    font-size: 1.95rem;
  }

  .blog-subtitle{
    font-size: 1rem;
  }

  .blog-controls-inner{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px){
  .blog-thumbnail{
    height: 150px;
  }

  .blog-card-content{
    padding: 16px;
  }
}

/* Fix ancrages : compense la barre sticky blog-controls */
:root{
  /* Ajuste si besoin : hauteur réelle de blog-controls (inner + borders) */
  --blog-sticky-offset: 96px;
}

/* Toutes les sections ancrables du hub */
.blog-cluster,
.blog-hero,
#start{
  scroll-margin-top: var(--blog-sticky-offset);
}

/* =========================================================
   Foresportia – Question Article (blog/questions-prediction-football/*)
   Purpose: clean readable Q&A article layout, matches your design system.
   Depends on: global.css / layout.css / components.css
   ========================================================= */

/* Layout */
.blog-article {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.blog-article-header {
  margin-top: 8px;
  padding: 18px 18px 0;
}

.blog-kicker {
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 0 0 10px;
}

.blog-article-header h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 12px;
}

.blog-lead {
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 10px;
  opacity: 0.95;
}

/* Article container */
.blog-article-content {
  margin-top: 18px;
  padding: 0 18px;
}

/* Sections */
.blog-article-content section {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

html.light .blog-article-content section {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.blog-article-content section:first-child {
  border-top: none;
}

.blog-article-content h2 {
  font-size: 1.15rem;
  margin: 0 0 10px;
  line-height: 1.25;
}

.blog-article-content p {
  line-height: 1.75;
  margin: 10px 0;
}

.blog-article-content ul,
.blog-article-content ol {
  margin: 10px 0 10px 18px;
  padding: 0;
}

.blog-article-content li {
  line-height: 1.7;
  margin: 6px 0;
}

/* Definition / callout blocks (you already use fs-definition) */
.fs-definition {
  border-left: 4px solid rgba(30, 64, 175, 0.9);
  background: rgba(30, 64, 175, 0.12);
  padding: 12px 14px;
  border-radius: 12px;
  margin: 12px 0;
}

html.light .fs-definition {
  background: rgba(30, 64, 175, 0.08);
}

/* Strong emphasis */
.blog-article-content strong {
  font-weight: 700;
}

/* “Pour aller plus loin” section */
.blog-article-links {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
}

html.light .blog-article-links {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.blog-article-links ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.blog-article-links li {
  margin: 10px 0;
}

.blog-article-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
}

.blog-article-links a::after {
  content: "→";
  opacity: 0.8;
}

/* Links in content */
.blog-article-content a {
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.35);
}

html.light .blog-article-content a {
  border-bottom: 1px dashed rgba(0, 0, 0, 0.35);
}

.blog-article-content a:hover {
  border-bottom-style: solid;
}

/* Small “meta” spacing improvements on mobile */
@media (max-width: 640px) {
  .blog-article-header {
    padding: 14px 12px 0;
  }

  .blog-article-content {
    padding: 0 12px;
  }

  .blog-article {
    padding: 18px 12px 54px;
  }
}

/* ============================
   QA NAVIGATION (article)
   ============================ */

.qa-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft, #e5e7eb);
}

.qa-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;

  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;

  color: var(--primary-700, #1e40af);
  background: rgba(30, 64, 175, 0.06);

  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;

  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease;
}

.qa-nav-link:hover {
  background: rgba(30, 64, 175, 0.12);
  color: var(--primary-800, #1e3a8a);
  transform: translateY(-1px);
}

.qa-nav-link:active {
  transform: translateY(0);
}

.qa-nav-link:focus-visible {
  outline: 2px solid var(--primary-500, #3b82f6);
  outline-offset: 2px;
}

/* Optional icon alignment if you add SVG later */
.qa-nav-link svg {
  width: 1em;
  height: 1em;
  opacity: 0.8;
}

/* ============================
   MOBILE ADJUSTMENTS
   ============================ */

@media (max-width: 640px) {
  .qa-nav {
    gap: 0.5rem;
  }

  .qa-nav-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.65rem;
  }
}

/* ============================
   BLOG KICKER (context / breadcrumb)
   ============================ */

.blog-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;

  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;

  color: var(--text-muted, #6b7280);
  margin-bottom: 0.5rem;
}

/* Separator (•) spacing */
.blog-kicker::before {
  content: "";
}

/* Links inside kicker */
.blog-kicker a {
  color: var(--primary-700, #1e40af);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.blog-kicker a:hover {
  text-decoration: underline;
}

/* Optional emphasis (current page) */
.blog-kicker strong {
  font-weight: 600;
  color: var(--text-main, #111827);
}

/* ============================
   KICKER VARIANTS
   ============================ */

/* Used at top of article */
.blog-article-header .blog-kicker {
  margin-bottom: 0.75rem;
}

/* Used as bottom navigation (Retour) */
.blog-article-content > .blog-kicker {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft, #e5e7eb);
}

/* ============================
   MOBILE
   ============================ */

@media (max-width: 640px) {
  .blog-kicker {
    font-size: 0.8rem;
  }
}

/* ===== Top navigation (Retour au blog) ===== */

.blog-top-nav {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding: 0 1rem;
}

.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;

  font-size: 0.95rem;
  font-weight: 500;

  color: #1e40af; /* bleu Foresportia */
  text-decoration: none;

  padding: 0.45rem 0.75rem;
  border-radius: 6px;

  background: rgba(30, 64, 175, 0.05);
  border: 1px solid rgba(30, 64, 175, 0.15);

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

.blog-back-link:hover {
  background: rgba(30, 64, 175, 0.1);
  border-color: rgba(30, 64, 175, 0.3);
  transform: translateX(-2px);
}

.blog-back-link:active {
  transform: translateX(0);
}

.blog-back-link:focus-visible {
  outline: 2px solid #1e40af;
  outline-offset: 2px;
}
