/* ═══════════════════════════════════════════════════════════════
   BLOG DriveBook — feuille de style partagée
   Palette + typo alignées sur la vitrine (index.html) et les pages
   légales : navy #144393 / gold #F9BD09, Outfit + DM Sans.
   Fichier partagé (et non CSS inline comme la landing) parce que le
   blog est une collection : N articles réutilisent exactement le même
   gabarit, un seul fichier évite la duplication et se met en cache
   navigateur d'un article à l'autre.
   Mobile-first : les media queries ne montent QUE vers le desktop.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --navy:        #144393;
  --navy-dark:   #0E2F66;
  --navy-pale:   #E8EEF8;
  --gold:        #F9BD09;
  --gold-dark:   #D6A007;
  --gold-pale:   #FFFCE5;
  --text:        #1A1A2E;
  --text-muted:  #6B7280;
  --text-soft:   #9CA3AF;
  --bg:          #F5F7FA;
  --white:       #FFFFFF;
  --border:      #E2E5ED;
  --r-sm:        8px;
  --r-md:        14px;
  --r-lg:        20px;
  --r-pill:      999px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--navy-dark); }
h1, h2, h3 { font-family: 'Outfit', sans-serif; color: var(--navy); line-height: 1.25; font-weight: 800; }

/* Libellé lu par les lecteurs d'écran uniquement (caption de tableau). */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ═══════════ TOPBAR (identique aux pages légales) ═══════════ */
header.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.topbar-inner {
  max-width: 760px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--navy); text-decoration: none;
  font-weight: 800; font-family: 'Outfit', sans-serif;
}
.brand img { height: 28px; width: auto; }
.topbar-cta {
  font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 700;
  color: var(--navy); text-decoration: none;
  border: 2px solid var(--navy); border-radius: var(--r-pill);
  padding: 7px 16px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.topbar-cta:hover { background: var(--navy); color: var(--white); }

/* ═══════════ LAYOUT ═══════════ */
main { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }

/* ═══════════ FIL D'ARIANE ═══════════ */
.breadcrumb {
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 18px; line-height: 1.5;
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li { display: flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "›"; color: var(--text-soft); }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--navy); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 500; }

/* ═══════════ EN-TÊTE D'ARTICLE ═══════════ */
.article-head { margin-bottom: 24px; }
.article-head h1 { font-size: clamp(25px, 6vw, 36px); margin-bottom: 12px; }
.article-meta {
  font-size: 13px; color: var(--text-muted);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
}
.article-meta .sep { color: var(--text-soft); }
.article-meta time { color: var(--text-muted); }

/* ═══════════ CORPS D'ARTICLE ═══════════ */
.article-body { font-size: 16.5px; }
.article-body > p { margin: 0 0 18px; }
.article-body h2 {
  font-size: clamp(20px, 4.5vw, 25px);
  margin: 36px 0 14px; padding-top: 4px;
  color: var(--navy-dark);
}
.article-body h3 { font-size: 18px; margin: 26px 0 10px; color: var(--navy-dark); }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 20px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { font-weight: 700; color: var(--text); }
.article-body blockquote {
  margin: 0 0 18px; padding: 14px 16px;
  background: var(--navy-pale); border-left: 4px solid var(--navy);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 15.5px;
}
.article-body hr {
  border: 0; border-top: 1px solid var(--border);
  margin: 36px 0 24px;
}

/* Encart de mise en avant (règle transversale, changement récent…) */
.callout {
  background: var(--gold-pale);
  border: 1px solid #F2E3A6;
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 14px 16px; margin: 0 0 22px;
  font-size: 15.5px;
}

/* ═══════════ TABLEAUX ═══════════
   Mobile : scroll horizontal dans un conteneur dédié (le tableau
   comparatif 4 colonnes reste lisible sans casser la mise en page,
   et garde sa lecture en grille — l'empilement perdrait la
   comparaison région par région qui est tout l'intérêt). */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--white);
}
.table-wrap table {
  border-collapse: collapse;
  width: 100%;
  min-width: 620px;      /* force le scroll plutôt que l'écrasement sur mobile */
  font-size: 14.5px;
}
/* Exception : tableau étroit (2 colonnes courtes) qui tient sans défiler
   à 375 px. À réserver aux tableaux qui restent lisibles à pleine largeur
   mobile, sans message « faites défiler » dessous. */
.table-wrap table.table-narrow { min-width: 0; }
.table-wrap th, .table-wrap td {
  padding: 11px 13px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.table-wrap thead th {
  background: var(--navy);
  color: var(--white);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.table-wrap tbody th {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--navy-dark);
  background: var(--navy-pale);
  white-space: nowrap;
}
.table-wrap tbody tr:last-child th,
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap td strong { color: var(--navy-dark); }
/* Légende de tableau — VISIBLE et portée par le <caption>, donc elle voyage
   avec le tableau si celui-ci est cité hors de l'article. Règle du projet :
   un tableau doit rester compréhensible seul.
   `display:block` la sort de la boîte de tableau (sinon elle hériterait du
   min-width 620px et sortirait de l'écran) ; `position:sticky; left:0` la
   maintient visible pendant le défilement horizontal du tableau sur mobile. */
.table-wrap caption {
  /* Reste un vrai <caption> avec son `display: table-caption` par défaut :
     c'est ce qui garantit son placement AU-DESSUS du tableau. Lui donner
     `display:block` le fait absorber par la grille et il réapparaît sous
     l'en-tête. La boîte du caption fait donc la largeur de la table (620px
     mini) — c'est le span interne qui porte la largeur lisible. */
  padding: 0;
  text-align: left;
}
/* Le contenu réel : borné à la fenêtre visible et collé au bord gauche, donc
   entièrement lisible même pendant le défilement horizontal du tableau. */
.table-wrap caption .cap-inner {
  display: block;
  position: sticky;
  left: 0;
  box-sizing: border-box;
  width: min(calc(100vw - 40px), 700px);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-muted);
  background: var(--white);
  padding: 12px 13px 10px;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 760px) {
  .table-wrap caption .cap-inner { font-size: 14px; }
}

/* Sous-titres du bloc Sources (« Données belges », « Recherche
   internationale ») — plus discrets que le h2 « SOURCES » qui les chapeaute. */
.sources-group {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin: 16px 0 8px;
  letter-spacing: .3px;
}
.sources-group:first-of-type { margin-top: 4px; }

.table-hint {
  font-size: 12.5px; color: var(--text-soft);
  margin: 0 0 22px;
}
@media (min-width: 760px) {
  .table-hint { display: none; }   /* pas de scroll horizontal sur desktop */
}

/* ═══════════ SOURCES + FRAÎCHEUR ═══════════ */
.sources {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 18px 18px 6px;
  margin: 32px 0 20px;
}
.sources h2 {
  font-size: 16px; margin: 0 0 12px;
  font-family: 'Outfit', sans-serif; color: var(--navy-dark);
  text-transform: uppercase; letter-spacing: .6px;
}
.sources ul { margin: 0 0 12px; padding-left: 18px; }
.sources li { font-size: 14px; color: var(--text-muted); margin-bottom: 9px; }
.verified {
  background: var(--navy-pale); color: var(--navy-dark);
  border-radius: var(--r-sm); padding: 12px 14px;
  font-size: 13.5px; margin: 0 0 8px;
}
.verified strong { font-weight: 700; }

/* ═══════════ INDEX DU BLOG ═══════════ */
.blog-intro { margin-bottom: 26px; }
.blog-intro h1 { font-size: clamp(26px, 6vw, 36px); margin-bottom: 10px; }
.blog-intro p { color: var(--text-muted); font-size: 16px; }

.post-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.post-card {
  display: block;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px;
  text-decoration: none; color: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.post-card:hover {
  border-color: var(--navy); color: inherit;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(20,67,147,.08);
}
.post-card h2 {
  font-size: 19px; margin: 0 0 8px; color: var(--navy);
  line-height: 1.3;
}
.post-card .post-meta {
  font-size: 12.5px; color: var(--text-muted);
  display: flex; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 10px;
}
.post-card .post-meta .sep { color: var(--text-soft); }
.post-card .post-desc { font-size: 15px; color: var(--text-muted); margin-bottom: 10px; }
.post-card .post-more {
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 14px;
  color: var(--gold-dark);
}

.blog-empty {
  background: var(--white); border: 1px dashed var(--border);
  border-radius: var(--r-md); padding: 20px;
  color: var(--text-muted); font-size: 15px;
}

/* ═══════════ FOOTER ═══════════ */
footer.blog-footer {
  background: var(--navy-dark); color: rgba(255,255,255,.65);
  padding: 28px 16px; text-align: center; font-size: 13px;
  margin-top: 40px;
}
.blog-footer .footer-inner { max-width: 760px; margin: 0 auto; }
.blog-footer .footer-brand {
  font-family: 'Outfit', sans-serif; font-size: 16px;
  color: var(--white); font-weight: 800; margin-bottom: 12px;
}
.blog-footer .footer-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px 16px; margin-bottom: 12px;
}
.blog-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.blog-footer a:hover { color: var(--gold); text-decoration: underline; }
.blog-footer .footer-legal { font-size: 12px; color: rgba(255,255,255,.45); }
.blog-footer .footer-legal a { color: rgba(255,255,255,.55); }

/* ═══════════ DESKTOP ═══════════ */
@media (min-width: 760px) {
  .topbar-inner { padding: 14px 20px; }
  main { padding: 36px 20px 60px; }
  .article-body { font-size: 17px; }
  .sources { padding: 22px 24px 10px; }
}
