/* ─── Fonts ──────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* Charter — système sur macOS/iOS, fallbacks élégants pour les autres */
:root {
  --font-serif: 'Charter', 'Bitstream Charter', 'Sitka Text', Cambria, Georgia, serif;
  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;

  --accent:        #C6A44E;
  --accent-light:  #D4B96A;
  --accent-dark:   #A8893A;
  --accent-pale:   #F5EDD8;
  --accent-pale2:  #EDE0BE;

  --bg:            #FAFAF7;
  --bg-alt:        #F3F1EC;
  --bg-warm:       #F7F5F0;

  --text:          #1A1A18;
  --text-secondary:#6B6860;
  --text-muted:    #9B9688;

  --border:        #E8E5DD;
  --border-light:  #EDEAE2;

  --shadow-sm:  0 1px 3px rgba(26,26,24,.05);
  --shadow-md:  0 4px 20px rgba(26,26,24,.07);
  --shadow-lg:  0 12px 40px rgba(26,26,24,.11);

  --radius:     8px;
  --container:  1120px;
  --ease:       cubic-bezier(.4,0,.2,1);
}

/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 768px) { .container { padding: 0 20px; } }

/* ─── Header ─────────────────────────────────────────────────────────────────── */
--header-h: 64px;

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.header.scrolled {
  background: rgba(250, 250, 247, 0.96);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 16px rgba(26,26,24,.05);
}
.header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent), var(--accent-light));
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.logo-mark {
  width: 36px; height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(198,164,78,.3);
  transition: background .2s var(--ease), box-shadow .2s var(--ease);
}
.logo:hover .logo-mark { background: var(--accent-light); box-shadow: 0 4px 12px rgba(198,164,78,.4); }
.logo-text-block { display: flex; flex-direction: column; gap: 2px; }
.logo-text {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .04em;
  color: var(--text);
  line-height: 1;
}
.logo-sub {
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1;
}

.nav { display: flex; align-items: center; gap: 2px; }
.nav-link {
  position: relative;
  padding: 6px 13px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 13px; right: 13px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--accent-pale); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--text); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-switcher {
  display: flex; align-items: center; gap: 1px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 3px;
}
.lang-btn {
  padding: 4px 10px;
  border-radius: 5px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--text-muted);
  transition: all .2s var(--ease);
}
.lang-btn.active { background: #fff; color: var(--accent-dark); box-shadow: var(--shadow-sm); }
.search-btn {
  width: 36px; height: 36px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all .2s var(--ease);
}
.search-btn:hover { background: var(--accent-pale); color: var(--accent-dark); }

.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: 7px;
  transition: background .2s var(--ease);
}
.hamburger:hover { background: var(--bg-alt); }
.hamburger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--text-secondary); border-radius: 1px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch;
    padding: 10px 20px 14px; gap: 2px;
    transform: translateY(-100%); opacity: 0; pointer-events: none;
    transition: transform .3s var(--ease), opacity .3s var(--ease);
  }
  .nav.open { transform: translateY(0); opacity: 1; pointer-events: all; }
  .nav-link { padding: 9px 12px; }
}

/* ─── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 100px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 65% 10%, rgba(198,164,78,.09) 0%, transparent 70%),
    radial-gradient(ellipse 45% 55% at 15% 85%, rgba(198,164,78,.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { max-width: 680px; position: relative; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.hero-eyebrow::before {
  content: '';
  width: 22px; height: 1.5px;
  background: var(--accent);
  border-radius: 1px;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.18;
  color: var(--text);
  margin-bottom: 18px;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 540px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── Home articles section ──────────────────────────────────────────────────── */
.home-articles { padding: 0 0 88px; }
.home-articles-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.section-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.section-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap .2s var(--ease);
}
.section-link:hover { gap: 10px; }

/* ─── Category badges ────────────────────────────────────────────────────────── */
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--accent-pale);
  color: var(--accent-dark);
}
.category-badge-sm {
  font-size: .62rem;
  padding: 2px 7px;
}
.lang-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .05em;
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ─── Page header (articles, about, search) ──────────────────────────────────── */
.page-hero {
  padding: 90px 0 24px;
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 4px;
}
.page-subtitle { font-size: .85rem; color: var(--text-muted); }

/* ─── Filter bar ─────────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 36px;
}
.filter-label { font-size: .75rem; font-weight: 600; color: var(--text-muted); margin-right: 2px; }
.filter-btn {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  background: #fff;
  transition: all .2s var(--ease);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-pale); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.articles-count { font-size: .75rem; color: var(--text-muted); margin-left: auto; }

/* ─── Article grid (listing + search) ───────────────────────────────────────── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 64px;
}
@media (max-width: 1024px) { .articles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .articles-grid { grid-template-columns: 1fr; } }

.article-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent-pale2); }
.card-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.card-date { font-size: .72rem; color: var(--text-muted); margin-left: auto; }
.card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  transition: color .2s var(--ease);
}
.article-card:hover .card-title { color: var(--accent-dark); }
.card-excerpt {
  font-size: .83rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
  transition: gap .2s var(--ease);
}
.article-card:hover .card-link { gap: 9px; }

/* ─── Article standalone (no nav) ───────────────────────────────────────────── */
.article-page { background: var(--bg); }

.article-minimal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250,250,247,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.article-minimal-header.scrolled { border-bottom-color: var(--border); }
@media (max-width: 768px) { .article-minimal-header { padding: 0 20px; } }

.article-standalone {
  max-width: 780px;
  margin: 0 auto;
  padding: 80px 32px 96px;
}
@media (max-width: 768px) { .article-standalone { padding: 64px 20px 72px; } }

.article-standalone-header { margin-bottom: 40px; }

.article-standalone-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.article-date { font-size: .75rem; color: var(--text-muted); }
.translation-link {
  font-size: .72rem; font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s var(--ease);
}
.translation-link:hover { color: var(--accent-dark); }

.article-standalone-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  line-height: 1.2;
  margin-bottom: 14px;
}
.article-excerpt-hero {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
}

.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}
.article-tag {
  font-size: .72rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
}

.article-standalone-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}
.article-home-link {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .2s var(--ease);
}
.article-home-link:hover { color: var(--accent); }

/* ─── Floating Table of Contents ─────────────────────────────────────────────── */
.toc {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  left: max(16px, calc(50% - 390px - 260px));
  width: 220px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.toc-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 0 8px;
  transition: color .2s var(--ease);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.toc-toggle:hover { color: var(--accent); }

.toc-toggle-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform .25s var(--ease);
  color: var(--text-muted);
}
.toc.collapsed .toc-toggle-icon { transform: rotate(-90deg); }

.toc-body {
  overflow: hidden;
  max-height: 480px;
  transition: max-height .3s var(--ease), opacity .25s var(--ease);
  opacity: 1;
}
.toc.collapsed .toc-body {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}

.toc-item { display: block; }

.toc-link {
  display: block;
  font-family: var(--font-sans);
  font-size: .72rem;
  line-height: 1.45;
  color: var(--text-muted);
  padding: 4px 10px;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color .15s var(--ease), border-color .15s var(--ease);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toc-link:hover { color: var(--text); }
.toc-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}

/* Indentation by heading level */
.toc-link[data-level="2"] { padding-left: 10px; }
.toc-link[data-level="3"] { padding-left: 22px; font-size: .68rem; }
.toc-link[data-level="4"] { padding-left: 34px; font-size: .65rem; color: var(--text-muted); }

/* Hide TOC when viewport isn't wide enough */
@media (max-width: 1200px) { .toc { display: none; } }

/* ─── Article content ────────────────────────────────────────────────────────── */
.article-body { padding: 36px 0 72px; }
.article-content { max-width: 700px; }
.article-content p {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.82;
  color: var(--text);
  margin-bottom: 1.4em;
}
.article-content h2 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  margin: 2.2em 0 .6em;
  padding-top: .4em;
  border-top: 1px solid var(--border-light);
}
.article-content h3 { font-family: var(--font-serif); font-size: 1.2rem; margin: 1.8em 0 .5em; }
.article-content h4 { font-family: var(--font-serif); font-size: 1.02rem; margin: 1.5em 0 .4em; }
.article-content ul, .article-content ol {
  margin: 0 0 1.4em 1.4em;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.8;
}
.article-content li { margin-bottom: .4em; }
.article-content ul li { list-style: disc; }
.article-content ol li { list-style: decimal; }
.article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-content a:hover { color: var(--accent-dark); }
.article-content strong { font-weight: 700; }
.article-content em { font-style: italic; }
.article-content blockquote {
  border-left: 2.5px solid var(--accent);
  margin: 1.8em 0;
  padding: 14px 22px;
  background: var(--accent-pale);
  border-radius: 0 6px 6px 0;
}
.article-content blockquote p {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--accent-dark);
  margin: 0;
}
.article-content code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: .875em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 5px;
  color: var(--accent-dark);
}
.article-content pre {
  background: #1a1a18;
  border-radius: 8px;
  padding: 18px 22px;
  margin: 1.8em 0;
  overflow-x: auto;
}
.article-content pre code {
  background: none; border: none; padding: 0;
  color: #e4e4dc; font-size: .85rem; line-height: 1.6;
}
.article-content table {
  width: 100%; border-collapse: collapse;
  margin: 1.8em 0; font-size: .9rem;
}
.article-content th {
  background: var(--bg-alt);
  font-weight: 600;
  padding: 9px 14px;
  border: 1px solid var(--border);
  text-align: left;
  font-family: var(--font-sans);
  font-size: .8rem;
  letter-spacing: .02em;
}
.article-content td { padding: 9px 14px; border: 1px solid var(--border-light); font-family: var(--font-serif); }
.article-content tr:nth-child(even) td { background: var(--bg-alt); }
.article-content hr { border: none; border-top: 1px solid var(--border); margin: 2.5em 0; }
.article-content img { border-radius: 8px; margin: 1.8em 0; box-shadow: var(--shadow-md); }

/* ─── Data visualization components (viz-*) ──────────────────────────────────── */
/* Toutes les classes viz-* ne reçoivent PAS les styles de .article-content p, ul, ol */
/* car elles utilisent des éléments div/span. */

.article-content .viz-block {
  margin: 2.4em 0;
  font-family: var(--font-sans);
}
.article-content .viz-caption {
  font-size: .82rem;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 14px;
  font-family: var(--font-sans);
  letter-spacing: .01em;
}
.article-content .viz-caption-sub {
  display: block;
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 3px;
  font-style: italic;
  font-family: var(--font-serif);
}
.article-content .viz-source {
  font-size: .68rem;
  color: var(--text-muted);
  margin-top: 12px;
  font-family: var(--font-sans);
  letter-spacing: .01em;
  font-style: italic;
}

/* — Big stat card — */
.article-content .viz-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin: 1.8em 0;
}
.article-content .viz-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 18px;
  position: relative;
  overflow: hidden;
}
.article-content .viz-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
}
.article-content .viz-stat-value {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  letter-spacing: -.01em;
}
.article-content .viz-stat-value small {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 3px;
}
.article-content .viz-stat-label {
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-top: 8px;
}
.article-content .viz-stat-context {
  font-size: .76rem;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.4;
  font-family: var(--font-serif);
  font-style: italic;
}
.article-content .viz-stat.highlight { background: var(--accent-pale); border-color: var(--accent-pale2); }
.article-content .viz-stat.highlight::before { background: var(--accent-dark); }
.article-content .viz-stat.highlight .viz-stat-value { color: var(--accent-dark); }

/* — Horizontal bar chart — */
.article-content .viz-bars {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
}
.article-content .viz-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 90px;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-family: var(--font-sans);
}
.article-content .viz-bar-row + .viz-bar-row { border-top: 1px solid var(--border-light); }
.article-content .viz-bar-label {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text);
}
.article-content .viz-bar-label small {
  display: block;
  font-size: .65rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 1px;
}
.article-content .viz-bar-track {
  height: 22px;
  background: var(--bg-alt);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.article-content .viz-bar-fill {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  background: linear-gradient(90deg, var(--accent-light), var(--accent));
  border-radius: 4px;
  transition: width 1s var(--ease);
}
.article-content .viz-bar-fill.subtle {
  background: var(--bg-warm);
  border: 1px solid var(--border);
}
.article-content .viz-bar-fill.danger {
  background: linear-gradient(90deg, #C8703A, #A8552A);
}
.article-content .viz-bar-value {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-serif);
}
.article-content .viz-bar-value small {
  font-size: .65rem;
  font-weight: 400;
  color: var(--text-muted);
}
@media (max-width: 600px) {
  .article-content .viz-bar-row { grid-template-columns: 90px 1fr 70px; gap: 8px; }
  .article-content .viz-bar-label { font-size: .72rem; }
  .article-content .viz-bar-value { font-size: .75rem; }
}

/* — Stacked bar (composition) — */
.article-content .viz-stack {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
}
.article-content .viz-stack-bar {
  display: flex;
  height: 38px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.article-content .viz-stack-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
  position: relative;
  min-width: 0;
  font-family: var(--font-sans);
  letter-spacing: .02em;
}
.article-content .viz-stack-segment span { white-space: nowrap; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; }
.article-content .viz-stack-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.article-content .viz-stack-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .8rem;
  font-family: var(--font-sans);
}
.article-content .viz-stack-legend-dot {
  width: 12px; height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 4px;
}
.article-content .viz-stack-legend-text { line-height: 1.4; }
.article-content .viz-stack-legend-text strong { display: block; font-weight: 700; color: var(--text); }
.article-content .viz-stack-legend-text small { color: var(--text-muted); font-size: .72rem; font-family: var(--font-serif); }

/* Couleurs disponibles pour les segments */
.article-content .seg-1 { background: #1A1A18; }
.article-content .seg-2 { background: #4A4A42; }
.article-content .seg-3 { background: var(--accent-dark); }
.article-content .seg-4 { background: var(--accent); }
.article-content .seg-5 { background: var(--accent-light); }
.article-content .seg-6 { background: #C0AB7A; }
.article-content .seg-7 { background: #D5C8A6; }
.article-content .seg-8 { background: #B5B0A2; }

/* — Donut SVG (responsive) — */
.article-content .viz-donut-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}
@media (max-width: 600px) {
  .article-content .viz-donut-wrap { grid-template-columns: 1fr; gap: 20px; justify-items: center; }
}
.article-content .viz-donut {
  width: 220px;
  height: 220px;
  position: relative;
}
.article-content .viz-donut svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.article-content .viz-donut circle { fill: transparent; stroke-width: 28; }
.article-content .viz-donut-bg { stroke: var(--bg-alt); }
.article-content .viz-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.article-content .viz-donut-center-value {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}
.article-content .viz-donut-center-label {
  font-size: .68rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* — Compare cards (France vs other) — */
.article-content .viz-compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 1.6em 0;
}
.article-content .viz-compare-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  font-family: var(--font-sans);
}
.article-content .viz-compare-flag {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 6px;
}
.article-content .viz-compare-name {
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.article-content .viz-compare-value {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}
.article-content .viz-compare-context {
  font-size: .72rem;
  color: var(--text-secondary);
  font-family: var(--font-serif);
  font-style: italic;
  line-height: 1.4;
}
.article-content .viz-compare-card.highlight { background: var(--accent-pale); border-color: var(--accent); }
.article-content .viz-compare-card.highlight .viz-compare-value { color: var(--accent-dark); }

/* — Callout — */
.article-content .viz-callout {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  margin: 1.8em 0;
  font-family: var(--font-sans);
}
.article-content .viz-callout-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 8px;
}
.article-content .viz-callout-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
}

/* — Saving scenario card — */
.article-content .viz-saving {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 1.8em 0;
  font-family: var(--font-sans);
}
@media (max-width: 600px) { .article-content .viz-saving { grid-template-columns: 1fr; } }
.article-content .viz-saving-side {
  padding: 20px 22px;
}
.article-content .viz-saving-side + .viz-saving-side {
  border-left: 1px solid var(--border);
}
@media (max-width: 600px) {
  .article-content .viz-saving-side + .viz-saving-side { border-left: none; border-top: 1px solid var(--border); }
}
.article-content .viz-saving-label {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.article-content .viz-saving-value {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.article-content .viz-saving-value.economy { color: var(--accent-dark); }
.article-content .viz-saving-value.impact { color: #A8552A; }
.article-content .viz-saving-desc {
  font-size: .85rem;
  color: var(--text-secondary);
  font-family: var(--font-serif);
  line-height: 1.55;
}

/* — Top list (numérotée stylée) — */
.article-content .viz-toplist {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.article-content .viz-toplist-row {
  display: grid;
  grid-template-columns: 36px 1fr 110px;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
  font-family: var(--font-sans);
}
.article-content .viz-toplist-row:last-child { border-bottom: none; }
.article-content .viz-toplist-rank {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-dark);
  text-align: center;
}
.article-content .viz-toplist-name {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
}
.article-content .viz-toplist-name small {
  display: block;
  font-size: .7rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
  font-family: var(--font-serif);
  font-style: italic;
}
.article-content .viz-toplist-amount {
  text-align: right;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.article-content .viz-toplist-amount small {
  display: block;
  font-size: .65rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 1px;
}
@media (max-width: 600px) {
  .article-content .viz-toplist-row { grid-template-columns: 28px 1fr 80px; padding: 10px 14px; gap: 10px; }
  .article-content .viz-toplist-rank { font-size: .95rem; }
  .article-content .viz-toplist-amount { font-size: .85rem; }
}

/* — Final synthesis bar — */
/* ─── Line / Area chart ──────────────────────────────────────────────────────── */
.article-content .viz-chart {
  width: 100%;
  margin-top: 8px;
}
.article-content .viz-chart svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.article-content .viz-chart-grid line {
  stroke: var(--border-light);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}
.article-content .viz-chart-axis line {
  stroke: var(--border);
  stroke-width: 1;
}
.article-content .viz-chart-axis text {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  fill: var(--text-muted);
  letter-spacing: .02em;
}
.article-content .viz-chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.article-content .viz-chart-area {
  fill: var(--accent);
  opacity: .12;
}
.article-content .viz-chart-line.line-2 { stroke: var(--text-secondary); stroke-dasharray: 4 4; }
.article-content .viz-chart-dot {
  fill: var(--bg);
  stroke: var(--accent);
  stroke-width: 2;
}
.article-content .viz-chart-dot.peak {
  fill: var(--accent-dark);
  stroke: var(--accent-dark);
  r: 5;
}
.article-content .viz-chart-dot.trough {
  fill: var(--bg);
  stroke: var(--accent-dark);
  stroke-width: 2.5;
  r: 5;
}
.article-content .viz-chart-label {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
  fill: var(--text-secondary);
}
.article-content .viz-chart-label.peak { fill: var(--accent-dark); }
.article-content .viz-chart-label.muted { fill: var(--text-muted); font-weight: 500; }
.article-content .viz-chart-marker {
  stroke: var(--text-muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: .6;
}
.article-content .viz-chart-zone {
  fill: var(--accent-pale);
  opacity: .35;
}
.article-content .viz-chart-baseline {
  stroke: var(--text-secondary);
  stroke-width: 1;
}
@media (max-width: 600px) {
  .article-content .viz-chart-axis text { font-size: 9px; }
  .article-content .viz-chart-label { font-size: 9.5px; }
}

.article-content .viz-synthesis {
  background: linear-gradient(135deg, #1A1A18 0%, #2A2A22 100%);
  color: #fff;
  border-radius: 12px;
  padding: 32px 28px;
  margin: 2em 0;
  font-family: var(--font-sans);
}
.article-content .viz-synthesis-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.article-content .viz-synthesis-value {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  line-height: 1;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -.01em;
}
.article-content .viz-synthesis-value small {
  font-size: .4em;
  font-weight: 600;
  color: var(--accent-light);
  margin-left: 8px;
}
.article-content .viz-synthesis-desc {
  font-size: .95rem;
  color: rgba(255,255,255,.75);
  font-family: var(--font-serif);
  line-height: 1.6;
  max-width: 620px;
}

/* ─── Footnotes (marked-footnote + interactive tooltips) ─────────────────────── */
.article-content .footnotes {
  margin-top: 3em;
  padding-top: 1.5em;
  border-top: 1px solid var(--border);
  font-size: .875rem;
  color: var(--text-secondary);
}
.article-content .footnotes ol { margin-left: 1.2em; }
.article-content .footnotes li {
  font-family: var(--font-serif);
  font-size: .875rem;
  line-height: 1.6;
  margin-bottom: .6em;
}
.article-content .footnotes p { font-size: .875rem; margin-bottom: .3em; }

/* Inline footnote reference */
.article-content a[href^="#fn-"],
.article-content sup a {
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  vertical-align: super;
  line-height: 0;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--accent-pale);
  margin-left: 2px;
  border: 1px solid var(--accent-pale2);
  cursor: pointer;
  position: relative;
  transition: background .15s var(--ease);
}
.article-content a[href^="#fn-"]:hover,
.article-content sup a:hover { background: var(--accent-pale2); }

/* Tooltip popup */
.fn-tooltip {
  position: absolute;
  z-index: 200;
  max-width: 320px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-serif);
  font-size: .85rem;
  line-height: 1.55;
  color: var(--text);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s var(--ease), transform .15s var(--ease);
}
.fn-tooltip.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ─── Article nav ────────────────────────────────────────────────────────────── */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
  margin-top: 36px;
}
.article-nav-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  transition: all .2s var(--ease);
}
.article-nav-item:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.article-nav-item.next { text-align: right; }
.nav-direction { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 5px; }
.nav-title { font-family: var(--font-serif); font-weight: 700; font-size: .9rem; color: var(--text); line-height: 1.35; }

/* ─── Back link ──────────────────────────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 20px;
  transition: color .2s var(--ease);
}
.back-link:hover { color: var(--accent); }

/* ─── About ──────────────────────────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; gap: 36px; } }
.about-content p {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.1em;
}
.about-content p:first-child { font-size: 1.08rem; color: var(--text); }
.section { padding: 32px 0 64px; }
.section-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.themes-list { display: flex; flex-direction: column; gap: 10px; }
.theme-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color .2s var(--ease);
}
.theme-item:hover { border-color: var(--accent-pale2); }
.theme-icon { font-size: 1.2rem; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.theme-name { font-weight: 600; font-size: .875rem; margin-bottom: 2px; }
.theme-desc { font-size: .75rem; color: var(--text-muted); line-height: 1.5; }

/* ─── Search page ────────────────────────────────────────────────────────────── */
.search-header { padding: 90px 0 24px; }
.search-header h1 { font-family: var(--font-serif); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; margin-bottom: 16px; }
.search-form { display: flex; gap: 8px; max-width: 560px; }
.search-input {
  flex: 1; height: 48px;
  padding: 0 18px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: .95rem;
  color: var(--text);
  outline: none;
  transition: border-color .2s var(--ease);
}
.search-input:focus { border-color: var(--accent); }
.search-submit {
  height: 48px; padding: 0 22px;
  background: var(--accent); color: #fff;
  border-radius: 8px;
  font-weight: 600; font-size: .85rem;
  transition: background .2s var(--ease);
}
.search-submit:hover { background: var(--accent-light); }
.search-results-count { font-size: .85rem; color: var(--text-muted); margin-top: 14px; }
.search-results { padding: 28px 0 72px; }
.no-results { text-align: center; padding: 56px 0; color: var(--text-secondary); }
.no-results-icon { font-size: 2.5rem; margin-bottom: 14px; }
mark { background: var(--accent-pale); color: var(--accent-dark); border-radius: 2px; padding: 0 2px; }
.empty-state { text-align: center; padding: 56px 24px; color: var(--text-secondary); }
.empty-state-icon { font-size: 2rem; margin-bottom: 14px; }

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 44px; padding: 0 20px;
  border-radius: 8px;
  font-size: .85rem; font-weight: 600;
  transition: all .2s var(--ease);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-light); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-pale); }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 40px 0 28px; background: var(--bg); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  margin-bottom: 32px;
}
@media (max-width: 640px) { .footer-inner { flex-direction: column; } }
.footer-desc { font-size: .82rem; color: var(--text-muted); max-width: 240px; line-height: 1.6; margin-top: 10px; font-family: var(--font-serif); font-style: italic; }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a { font-size: .82rem; color: var(--text-muted); transition: color .2s var(--ease); }
.footer-nav a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  gap: 14px; flex-wrap: wrap;
}
.footer-copy { font-size: .73rem; color: var(--text-muted); }
.footer-domains { display: flex; gap: 10px; }
.footer-domains a { font-size: .68rem; font-weight: 600; letter-spacing: .04em; color: var(--text-muted); opacity: .5; transition: opacity .2s var(--ease); }
.footer-domains a:hover { opacity: 1; color: var(--accent); }

/* ─── 404 ────────────────────────────────────────────────────────────────────── */
.error-page { min-height: 80vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 120px 0; }
.error-code { font-family: var(--font-serif); font-size: 8rem; font-weight: 700; color: var(--bg-alt); line-height: 1; margin-bottom: 16px; }
.error-page h2 { font-family: var(--font-serif); margin-bottom: 10px; }
.error-page p { color: var(--text-secondary); margin-bottom: 28px; }

/* ─── Animations ─────────────────────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .1s; }
.delay-2 { transition-delay: .2s; }
.delay-3 { transition-delay: .3s; }
.delay-4 { transition-delay: .4s; }

@media (max-width: 480px) {
  .article-nav { grid-template-columns: 1fr; }
  .featured-article { padding: 20px; }
  .masthead { padding-top: 80px; }
}
