/* ════════════════════════════════════════════════════════════
   DECISIO.BE — article.css
   CSS commun aux articles régionaux (droit-enregistrement-*).
   À inclure : <link rel="stylesheet" href="/css/article.css">
   ════════════════════════════════════════════════════════════ */

/* ── READING PROGRESS BAR ──────────────────────────────────── */
.reading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  width: 0%;
  z-index: 1000;
  transition: width 0.1s ease;
}

/* ── ARTICLE LAYOUT ────────────────────────────────────────── */
.article-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 60px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 40px;
  align-items: start;
}

/* ── ARTICLE HEADER ────────────────────────────────────────── */
.article-header { margin-bottom: 40px; }

.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.article-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
}
.tag-region {
  background: rgba(0,61,165,0.08);
  color: var(--bxl);
  border: 1px solid rgba(0,61,165,0.2);
}
.tag-region.tag-fla {
  background: rgba(26,26,26,0.07);
  color: var(--fla);
  border-color: rgba(26,26,26,0.2);
}
.tag-region.tag-wal {
  background: rgba(204,0,0,0.07);
  color: var(--wal);
  border-color: rgba(204,0,0,0.2);
}
.tag-theme {
  background: rgba(232,70,42,0.08);
  color: var(--accent);
  border: 1px solid rgba(232,70,42,0.2);
}
.tag-level {
  background: rgba(0,0,0,0.05);
  color: var(--muted);
  border: 1px solid rgba(0,0,0,0.1);
}
.tag-new {
  background: rgba(26,138,74,0.1);
  color: var(--green);
  border: 1px solid rgba(26,138,74,0.2);
}

.article-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 16px;
}
.article-intro {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 24px;
}
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 16px 0;
  border-top: 1px solid rgba(0,0,0,0.08);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.meta-item strong { color: var(--black); font-weight: 600; }

/* ── ARTICLE BODY ──────────────────────────────────────────── */
.article-body h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.5px;
  margin: 48px 0 16px;
  line-height: 1.2;
}
.article-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.3px;
  margin: 32px 0 12px;
  color: var(--accent);
}
.article-body p {
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 20px;
  color: var(--black);
}
.article-body a {
  color: var(--accent2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body a:hover { color: var(--accent); }
.article-body ul, .article-body ol { margin: 16px 0 20px 24px; }
.article-body li { font-size: 16px; line-height: 1.7; margin-bottom: 8px; }
.article-body strong { font-weight: 600; }

/* ── KEY HIGHLIGHT ─────────────────────────────────────────── */
.key-highlight {
  background: var(--black);
  color: white;
  border-radius: 20px;
  padding: 36px 40px;
  margin: 40px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.kh-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  letter-spacing: -2px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}
.kh-label {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
}

/* ── INFO / SUCCESS / WARNING BOX ──────────────────────────── */
.info-box {
  background: var(--cream);
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 28px 0;
}
.info-box-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-box p { font-size: 15px; margin-bottom: 8px; }
.info-box p:last-child { margin-bottom: 0; }

.warning-box {
  background: rgba(232,70,42,0.05);
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 28px 0;
}
.success-box {
  background: rgba(26,138,74,0.06);
  border-left: 4px solid var(--green);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 28px 0;
}
.success-box .info-box-title { color: var(--green); }

/* ── CALC TABLE ────────────────────────────────────────────── */
.calc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid var(--black);
  font-size: 15px;
}
.calc-table th {
  background: var(--black);
  color: white;
  padding: 14px 18px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
}
.calc-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  vertical-align: middle;
}
.calc-table tr:last-child td { border-bottom: none; }
.calc-table tr:nth-child(even) td { background: var(--cream); }
.calc-table .highlight td {
  background: rgba(26,138,74,0.08) !important;
  font-weight: 600;
}
.calc-table .economy { color: var(--green); font-weight: 700; }
.calc-table .total-row td {
  background: var(--black) !important;
  color: white !important;
  font-weight: 700;
}
.calc-table .warning-row td {
  background: rgba(232,70,42,0.05) !important;
  color: var(--accent);
  font-weight: 600;
}

/* ── STEPS ─────────────────────────────────────────────────── */
.steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 28px 0;
}
.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: white;
  border: 1.5px solid var(--black);
  border-radius: 16px;
  padding: 20px 24px;
  transition: all 0.2s;
}
.step:hover { transform: translateX(4px); border-color: var(--accent); }
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 100px;
  background: var(--accent);
  color: white;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-content strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.step-content span {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── CHECKLIST ─────────────────────────────────────────────── */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}
.check-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  background: white;
  border: 1.5px solid var(--black);
  border-radius: 12px;
}
.check-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.check-text { font-size: 15px; line-height: 1.5; }
.check-text strong {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}
.check-text span { font-size: 13px; color: var(--muted); }

/* ── TIMELINE (évolution historique) ───────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 28px 0;
  position: relative;
}
.timeline-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: white;
  border: 1.5px solid var(--black);
  border-radius: 14px;
  padding: 18px 22px;
  position: relative;
}
.timeline-item.current-item {
  background: var(--cream);
  border-color: var(--accent);
  box-shadow: 3px 3px 0 var(--accent);
}
.timeline-dot {
  width: 56px;
  height: 56px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}
.timeline-dot.old {
  background: var(--cream);
  color: var(--muted);
  border: 1.5px solid var(--muted);
}
.timeline-dot.current {
  background: var(--accent);
  color: white;
  border: 1.5px solid var(--accent);
}
.timeline-content { flex: 1; }
.timeline-year {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
  font-weight: 600;
}
.timeline-rate {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 4px;
}
.timeline-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── MODESTE BOX (Flandre) ─────────────────────────────────── */
.modeste-box {
  background: var(--fla);
  color: white;
  border-radius: 16px;
  padding: 28px 32px;
  margin: 28px 0;
}
.modeste-box h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--fla-gold);
  margin-bottom: 12px;
}
.modeste-box p {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
  margin-bottom: 12px;
}
.modeste-box p:last-child { margin-bottom: 0; }
.modeste-box strong { color: white; }

/* ── BEFORE / AFTER (réformes) ─────────────────────────────── */
.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0;
}
.ba-card {
  border-radius: 16px;
  padding: 24px 28px;
  border: 1.5px solid var(--black);
}
.ba-card.before { background: rgba(232,70,42,0.04); }
.ba-card.after {
  background: rgba(26,138,74,0.06);
  border-color: var(--green);
}
.ba-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 12px;
}
.ba-card.after .ba-label { color: var(--green); }
.ba-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.ba-card.after .ba-title { color: var(--green); }
.ba-items { display: flex; flex-direction: column; gap: 10px; }
.ba-item {
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.ba-item-icon { flex-shrink: 0; font-size: 14px; margin-top: 1px; }

/* ── ENERGY GRID (Bruxelles) ───────────────────────────────── */
.energy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}
.energy-card {
  background: white;
  border: 1.5px solid var(--black);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}
.energy-jump {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--green);
  margin-bottom: 6px;
}
.energy-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.energy-saving { font-size: 18px; font-weight: 700; color: var(--black); }

/* ── REGION COMPARE BOX ────────────────────────────────────── */
.region-compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--black);
  border-radius: 16px;
  overflow: hidden;
  margin: 28px 0;
}
.rc-card { background: white; padding: 24px; text-align: center; }
.rc-card.active { background: rgba(0,61,165,0.05); }
.rc-region { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.rc-rate {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -1px;
  margin-bottom: 4px;
}
.rc-note { font-size: 12px; color: var(--muted); line-height: 1.4; }
.rc-example {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  margin-top: 8px;
}

/* ── QUOTE ─────────────────────────────────────────────────── */
.article-quote {
  background: var(--black);
  color: white;
  border-radius: 16px;
  padding: 32px 36px;
  margin: 36px 0;
  position: relative;
}
.article-quote::before {
  content: '"';
  font-family: var(--font-display);
  font-size: 80px;
  color: var(--accent);
  line-height: 0.6;
  display: block;
  margin-bottom: 16px;
}
.article-quote p {
  font-size: 18px;
  line-height: 1.65;
  font-style: italic;
  color: rgba(255,255,255,0.9);
  margin-bottom: 12px;
}
.article-quote cite {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  font-style: normal;
}

/* ── CTA QUIZ ──────────────────────────────────────────────── */
.article-quiz-cta {
  background: var(--cream);
  border: 1.5px solid var(--black);
  border-radius: 20px;
  padding: 32px;
  margin: 40px 0;
  display: flex;
  align-items: center;
  gap: 24px;
}
.quiz-cta-text h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 8px;
}
.quiz-cta-text p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.article-quiz-cta .btn-primary {
  padding: 12px 24px;
  font-size: 14px;
  white-space: nowrap;
}

/* ── ARTICLE FOOTER ────────────────────────────────────────── */
.article-footer {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1.5px solid var(--black);
}
.update-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--muted);
}
.sources-section h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 16px;
}
.sources-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.source-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
.source-item a {
  color: var(--accent2);
  text-decoration: underline;
}
.source-dot {
  width: 6px;
  height: 6px;
  border-radius: 100px;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 5px;
}

/* ── RELATED ARTICLES ──────────────────────────────────────── */
.related-section { margin-top: 60px; }
.related-section h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid var(--black);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.related-card {
  background: white;
  border: 1.5px solid var(--black);
  border-radius: 14px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 3px 3px 0 var(--black);
}
.related-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.related-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}
.related-time {
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
}

/* ── SIDEBAR ───────────────────────────────────────────────── */
.article-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar-card {
  background: white;
  border: 1.5px solid var(--black);
  border-radius: 16px;
  padding: 24px;
}
.sidebar-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 16px;
}

/* ── TABLE OF CONTENTS ─────────────────────────────────────── */
.toc-list { display: flex; flex-direction: column; gap: 4px; }
.toc-item { display: flex; align-items: flex-start; gap: 10px; }
.toc-num {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  min-width: 18px;
  margin-top: 3px;
}
.toc-link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s;
}
.toc-link:hover { color: var(--accent); }

/* ── QUICK CALC ────────────────────────────────────────────── */
.quick-calc {
  background: var(--black);
  border-radius: 16px;
  padding: 24px;
  color: white;
}
.quick-calc h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 16px;
  color: white;
}
.calc-input-group { margin-bottom: 16px; }
.calc-input-group label {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 6px;
}
.calc-input-group input {
  width: 100%;
  background: #222;
  border: 1.5px solid #333;
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.calc-input-group input:focus { border-color: var(--accent); }
.calc-input-group input::placeholder { color: rgba(255,255,255,0.2); }
.calc-result-box {
  background: #1a1a1a;
  border-radius: 10px;
  padding: 16px;
  margin-top: 4px;
  display: none;
}
.calc-result-box.show { display: block; }
.crb-label {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.crb-saving {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: #4ade80;
  margin-bottom: 4px;
}
.crb-detail {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
  white-space: pre-line;
}

/* ── MOBILE (≤ 900px) ──────────────────────────────────────── */
@media (max-width: 900px) {
  .article-wrapper {
    grid-template-columns: 1fr;
    padding: 32px 24px;
    gap: 32px;
  }
  .article-sidebar { position: static; }
  .key-highlight {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 24px;
  }
  .region-compare { grid-template-columns: 1fr; }
  .energy-grid { grid-template-columns: 1fr; }
  .before-after { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .article-quiz-cta {
    flex-direction: column;
    text-align: center;
  }
  .article-body h2 { font-size: 22px; margin: 36px 0 12px; }
  .calc-table { font-size: 13px; }
  .calc-table th, .calc-table td { padding: 10px 12px; }
}

@media (max-width: 560px) {
  .article-title { font-size: 26px; }
  .article-intro { font-size: 16px; }
  .kh-value { font-size: 32px; }
  .article-quote { padding: 24px; }
}

/* ════════════════════════════════════════════════════════════
   MOBILE FIXES POUR LES CALCULATEURS
   (spécificité .article-body > inline <style> des pages calc)
   ════════════════════════════════════════════════════════════ */

@media (max-width: 740px) {
  /* Wrappers principaux — moins de padding sur mobile */
  .article-body .calc-wrap {
    padding: 18px 14px;
    border-radius: 16px;
    margin: 16px 0 20px;
  }
  .article-body .calc-results {
    padding: 18px 14px;
    border-radius: 16px;
  }
  .article-body .analyzer-hero {
    padding: 20px 16px;
    border-radius: 18px;
  }
  .article-body .result-header,
  .article-body .score-block,
  .article-body .roast-box {
    padding: 18px;
    border-radius: 16px;
  }
  .article-body .result-card {
    padding: 16px;
    border-radius: 14px;
  }

  /* Grilles — 1 colonne partout */
  .article-body .calc-grid { grid-template-columns: 1fr !important; gap: 14px 0; }
  .article-body .charts-grid { grid-template-columns: 1fr !important; gap: 12px; }
  .article-body .cards-grid { grid-template-columns: 1fr !important; gap: 12px; }
  .article-body .detail-grid { grid-template-columns: 1fr !important; padding: 14px 16px; }
  .article-body .manual-grid { grid-template-columns: 1fr !important; }

  /* KPI grid — 2 colonnes serrées sur mobile */
  .article-body .kpi-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
    margin-bottom: 16px;
  }
  .article-body .kpi {
    padding: 12px;
    border-radius: 12px;
  }
  .article-body .kpi-value { font-size: 16px; }
  .article-body .kpi-label { font-size: 10px; letter-spacing: 0.8px; }
  .article-body .kpi-hint { font-size: 10px; }

  /* Titres dans calcs */
  .article-body .calc-results h3 { font-size: 17px; }
  .article-body .calc-group h4 { font-size: 12px; }

  /* Inputs / selects — touch friendly + pas de zoom iOS */
  .article-body .calc-field input,
  .article-body .calc-field select,
  .article-body .manual-grid input,
  .article-body .manual-grid select,
  .article-body .url-form-wrap input {
    font-size: 16px !important; /* indispensable pour ne pas déclencher le zoom iOS sur focus */
    min-height: 44px;
    padding: 10px 12px;
  }
  .article-body .url-form-wrap button,
  .article-body .manual-submit {
    min-height: 48px;
    font-size: 15px;
  }

  /* Mode tabs (analyseur) */
  .article-body .mode-tabs {
    width: 100%;
    display: flex;
    justify-content: stretch;
  }
  .article-body .mode-tab {
    flex: 1;
    padding: 10px 12px;
    font-size: 13px;
  }

  /* Verdict box */
  .article-body .verdict-box {
    padding: 12px 14px;
    font-size: 14px;
    margin-top: 14px;
  }

  /* Charts — éviter l'overflow */
  .article-body .chart-svg { width: 100%; height: auto; }
  .article-body .chart-card { padding: 14px; border-radius: 14px; }
  .article-body .chart-card h3 { font-size: 14px; }
  .article-body .chart-sub { font-size: 11px; }
  .article-body .chart-legend-inline { font-size: 10px; gap: 10px; }

  /* Score circle (analyseur) */
  .article-body .score-circle-wrap { width: 160px; height: 160px; margin: 0 auto; }
  .article-body .score-block { grid-template-columns: 1fr !important; text-align: center; }
  .article-body .score-text { font-size: 18px; }

  /* Timeline table — déjà overflow-x:auto mais on resserre */
  .article-body .timeline-wrap { padding: 14px; border-radius: 14px; }
  .article-body .timeline-table { font-size: 12px; min-width: 540px; }
  .article-body .timeline-table th,
  .article-body .timeline-table td { padding: 8px 10px; }

  /* Result-card metric-grid (analyseur) */
  .article-body .metric-grid { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .article-body .m-value { font-size: 16px; }
  .article-body .works-bars { grid-template-columns: 1fr !important; gap: 8px; }

  /* AI summary split */
  .article-body .ai-split { grid-template-columns: 1fr !important; gap: 14px; }

  /* Donut chart wrapper */
  .article-body .donut-wrap { grid-template-columns: 1fr; gap: 12px; }

  /* Waterfall SVG (salaire) */
  .article-body .waterfall-svg { min-height: 200px; }

  /* Custom checkboxes (salaire) — agrandir pour touch */
  .article-body .calc-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 420px) {
  /* Très petits écrans — KPI en 1 colonne */
  .article-body .kpi-grid { grid-template-columns: 1fr !important; }
  .article-body .kpi-value { font-size: 18px; }
  .article-body .article-title { font-size: 24px !important; }
}

/* ════════════════════════════════════════════════════════════
   ANTI-OVERFLOW HORIZONTAL — sécurité globale
   ════════════════════════════════════════════════════════════ */
html, body { overflow-x: hidden; max-width: 100vw; }
.article-wrapper { max-width: 100%; }
.article-main, .article-body { min-width: 0; }
.article-body img,
.article-body svg,
.article-body table { max-width: 100%; }

/* Tableaux longs : autoriser scroll horizontal interne plutôt que pousser la page */
.article-body .calc-table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Inputs / selects ne doivent JAMAIS dépasser leur conteneur */
.article-body input,
.article-body select,
.article-body textarea { max-width: 100%; }
