/* ============================================================
   ARTICLE TOOLS — composants interactifs pour les articles
   et pages ressources (guide TVA, observatoire, baromètre…).
   Chargé seulement si le contenu contient « akra-tool »
   (voir inc/enqueue.php). Préfixe : .at-
   Sans JavaScript, tout le contenu reste visible et lisible.
   ============================================================ */

.article-content .at { margin-block: 2.2em !important; color: var(--ink-2); }
.article-content .at > *:first-child { margin-top: 0 !important; }
.article-content .at ul,
.article-content .at ol { padding-left: 0; list-style: none; display: block; }
.article-content .at ul li,
.article-content .at ol li { padding-left: 0; }
.article-content .at ul li::before,
.article-content .at ol li::before { display: none; }
.article-content .at a.btn,
.article-content .at a.at-card-link { text-decoration: none; }
.article-content .at a.btn-primary { color: #fff; }
.article-content .at h3 { margin: 0 !important; }
.at-kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 8px;
}

/* ── Badges ──────────────────────────────────────────── */
.at-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid var(--border-strong);
  color: var(--ink-3);
  background: var(--bg-3);
}
.at-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.at-badge--on   { color: var(--positive); border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.08); }
.at-badge--off  { color: var(--ink-3); }
.at-badge--risk { color: var(--negative); border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.08); }
.at-badge--info { color: var(--blue-light); border-color: rgba(59, 130, 246, 0.4); background: rgba(59, 130, 246, 0.08); }
[data-theme="light"] .at-badge--on { color: #047857; }
[data-theme="light"] .at-badge--risk { color: #b91c1c; }
[data-theme="light"] .at-badge--info { color: var(--blue-deep); }

/* ── En bref ─────────────────────────────────────────── */
/* blog.css stylise tous les <details> d'article en FAQ (badge « Q », chevron,
   padding à zéro en !important) : on neutralise ici pour l'encart. */
.article-content details.at-brief,
.article-content details.at-brief[open] {
  padding: 0;
  margin: 0 !important;
  border: 1px solid rgba(59, 130, 246, 0.32);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.10), rgba(34, 211, 238, 0.03) 70%), var(--bg-2);
  box-shadow: none;
  overflow: hidden;
}
[data-theme="light"] .article-content details.at-brief { background: linear-gradient(160deg, rgba(59, 130, 246, 0.07), #fff 70%); }
.article-content details.at-brief > summary {
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
  padding: 18px 24px !important;
  border-bottom: 1px solid var(--border) !important;
}
.article-content details.at-brief:not([open]) > summary { border-bottom: 0 !important; }
.article-content details.at-brief > summary::before,
.article-content details.at-brief > summary::after { display: none; }
.article-content details.at-brief[open] > ul { animation: none; margin: 0 !important; padding-top: 8px !important; border-top: 0 !important; }
.at-brief-title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.at-updated {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em;
  color: var(--ink-2);
  padding: 4px 11px; border-radius: var(--r-full);
  border: 1px solid var(--border-strong); background: var(--bg-3);
}
/* Variante bandeau (haut d'article) : le texte peut passer à la ligne */
.article-content p.at-updated--bar {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  padding: 10px 16px; border-radius: var(--r-md);
  font-size: 0.74rem; line-height: 1.5;
}
.at-updated--bar .at-live { align-self: center; }
.at-updated--bar strong { color: var(--ink); }
.at-live { width: 7px; height: 7px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: at-pulse 2.4s infinite; }
@keyframes at-pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.at-chevron { margin-left: auto; width: 18px; height: 18px; color: var(--ink-3); transition: transform var(--t-fast); }
.at-brief:not([open]) .at-chevron { transform: rotate(-90deg); }
.at-brief-list { padding: 8px 24px 18px !important; }
.at-brief-list li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 12px 0 !important;
  border-bottom: 1px dashed var(--border);
  font-size: 0.98rem;
  line-height: 1.6;
}
.at-brief-list li:last-child { border-bottom: 0; }
.at-brief-tag { font-family: var(--font-mono); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; color: var(--ink); text-transform: uppercase; }
.at-brief-tag--neutral { color: var(--positive); }
.at-brief-tag--cost { color: var(--negative); }
[data-theme="light"] .at-brief-tag--neutral { color: #047857; }
[data-theme="light"] .at-brief-tag--cost { color: #b91c1c; }
@media (max-width: 640px) {
  .at-brief > summary { padding: 16px 18px; }
  .at-brief-list { padding: 4px 18px 14px !important; }
  .at-brief-list li { grid-template-columns: 1fr; gap: 2px; }
}

.at-disclaimer {
  margin-top: 12px !important;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-size: 0.84rem !important;
  line-height: 1.55;
  color: var(--ink-3) !important;
}

/* ── Chronologie ─────────────────────────────────────── */
.at-timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 26px 22px 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  position: relative;
}
.at-tl-step { position: relative; padding: 30px 12px 0 0; }
.at-tl-step::before { content: ''; position: absolute; top: 9px; left: 0; right: 0; height: 2px; background: var(--border-strong); }
.at-tl-step:last-child::before { right: 50%; }
.at-tl-step::after {
  content: ''; position: absolute; top: 3px; left: 0;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg-2); border: 2px solid var(--ink-4);
}
.at-tl-step--key::after { border-color: var(--blue); background: var(--blue); box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.18); }
.at-tl-step--now::after { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.2); }
.at-tl-date { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; color: var(--ink); text-transform: uppercase; }
.at-tl-step--now .at-tl-date { color: var(--cyan); }
.at-tl-text { margin-top: 6px !important; font-size: 0.86rem !important; line-height: 1.5; color: var(--ink-3) !important; }
@media (max-width: 760px) {
  .at-timeline { grid-template-columns: 1fr; padding: 20px 18px; }
  .at-tl-step { padding: 0 0 18px 30px; }
  .at-tl-step:last-child { padding-bottom: 0; }
  .at-tl-step::before { top: 14px; bottom: 0; left: 6px; right: auto; width: 2px; height: auto; }
  .at-tl-step:last-child::before { display: none; }
  .at-tl-step::after { top: 4px; }
}

/* ── Tableau comparatif responsive (cartes sur mobile) ── */
.article-content .at-table-wrap { overflow: visible; }
.article-content .at-table { margin: 0 !important; font-size: 0.9rem; }
.article-content .at-table td { vertical-align: top; line-height: 1.55; }
.article-content .at-table td:first-child { color: var(--ink); font-weight: 600; }
.article-content .at-table .at-badge { white-space: normal; text-align: left; }
.at-table td small { display: block; font-weight: 400; color: var(--ink-3); font-size: 0.8rem; }
@media (max-width: 760px) {
  .article-content .at-table,
  .article-content .at-table tbody,
  .article-content .at-table tr,
  .article-content .at-table td { display: block; width: 100%; }
  .article-content .at-table { border: 0; }
  .article-content .at-table thead { display: none; }
  .article-content .at-table tr {
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--bg-2);
    overflow: hidden;
  }
  .article-content .at-table td { border: 0; border-bottom: 1px dashed var(--border); padding: 10px 16px; }
  .article-content .at-table td:last-child { border-bottom: 0; }
  .article-content .at-table td:first-child { font-size: 1.02rem; background: var(--bg-3); }
  .article-content .at-table td[data-label]:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-4);
    margin-bottom: 4px;
  }
}

/* ── Points clés (cartes horizontales, lisibles à toute largeur) ── */
.at-points { display: grid; gap: 12px; }
.at-point {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 4px 18px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--grad-card), var(--bg-2);
}
.at-point-num {
  grid-row: span 2;
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 700;
  color: var(--blue-light);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.at-point-title { margin: 0 !important; font-family: var(--font-display); font-weight: 700; font-size: 1.06rem; line-height: 1.35; color: var(--ink); }
.at-point p:not(.at-point-title) { font-size: 0.95rem !important; line-height: 1.65; margin: 0 !important; color: var(--ink-3); }
@media (max-width: 540px) {
  .at-point { grid-template-columns: 1fr; }
  .at-point-num { grid-row: auto; width: 36px; height: 36px; margin-bottom: 6px; }
}

/* ── Barre de recharge prépayée ──────────────────────── */
.at-split {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}
.at-split-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; margin-bottom: 14px; }
.at-split-head strong { font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); }
.at-split-bar { display: flex; height: 46px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--border); }
.at-split-seg { display: flex; align-items: center; padding: 0 14px; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.at-split-seg--media { flex: 5; background: linear-gradient(120deg, var(--blue-deep), var(--blue)); color: #fff; }
.at-split-seg--tax { flex: 1; background: repeating-linear-gradient(135deg, rgba(248,113,113,0.22) 0 6px, rgba(248,113,113,0.1) 6px 12px); color: var(--negative); justify-content: center; }
.at-split-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px !important; font-size: 0.82rem !important; color: var(--ink-3) !important; }

/* ── Sélecteur de profil / onglets ───────────────────── */
.at-tabs-nav {
  display: none;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  margin-bottom: 18px;
}
.at-tabs.is-enhanced .at-tabs-nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.at-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-3);
  font: 600 0.9rem/1.3 var(--font-body);
  padding: 12px 14px;
  border-radius: var(--r-md);
  cursor: pointer;
  text-align: center;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.at-tab small { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 3px; }
.at-tab:hover { color: var(--ink); background: var(--bg-3); }
.at-tab[aria-selected="true"] { color: var(--ink); background: var(--bg-3); border-color: rgba(59, 130, 246, 0.45); box-shadow: inset 0 -2px 0 var(--blue); }
.at-tab:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.at-tabs.is-enhanced .at-panel[hidden] { display: none; }
.at-tabs:not(.is-enhanced) .at-panel + .at-panel { margin-top: 18px; }
@media (max-width: 640px) {
  .at-tabs.is-enhanced .at-tabs-nav { grid-auto-flow: row; }
}

.at-panel {
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}
.at-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.article-content .at-panel h3 { font-family: var(--font-display); font-size: 1.22rem; line-height: 1.3; color: var(--ink); }
.at-panel > p, .at-panel-body > p { font-size: 0.98rem; margin-top: 0.9em !important; }
.at-panel > *:first-child { margin-top: 0 !important; }
.at-alert {
  margin-top: 18px !important;
  padding: 14px 18px;
  border-radius: var(--r-md);
  border: 1px solid rgba(248, 113, 113, 0.32);
  background: rgba(248, 113, 113, 0.06);
  font-size: 0.94rem !important;
}
.at-alert--info { border-color: rgba(59, 130, 246, 0.32); background: rgba(59, 130, 246, 0.06); }
@media (max-width: 640px) { .at-panel { padding: 20px 18px; } }

/* Étapes numérotées */
.at-steps { counter-reset: at-step; display: grid !important; gap: 10px; margin-top: 14px !important; }
.at-steps > li {
  counter-increment: at-step;
  position: relative;
  padding: 12px 16px 12px 52px !important;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-3);
  font-size: 0.96rem;
  line-height: 1.55;
}
.at-steps > li::after {
  content: counter(at-step, decimal-leading-zero);
  position: absolute; left: 14px; top: 12px;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700;
  color: var(--blue-light);
}

/* Liste à puces sobres */
.at-bullets { display: grid !important; gap: 10px; margin-top: 12px !important; }
.at-bullets > li { position: relative; padding-left: 22px !important; font-size: 0.96rem; line-height: 1.6; }
.article-content .at .at-bullets > li::before {
  display: block; content: ''; position: absolute; left: 2px; top: 0.62em;
  width: 8px; height: 8px; border-radius: 2px; background: var(--grad-accent);
}

/* Chemin de menu façon interface */
.at-path {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 12px 14px; margin-top: 16px !important;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--bg-0);
  font-family: var(--font-mono); font-size: 0.78rem;
}
[data-theme="light"] .at-path { background: #f3f6fb; }
.at-path-label { color: var(--ink-4); margin-right: 4px; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.64rem; }
.at-path-item { padding: 4px 10px; border-radius: 6px; background: var(--bg-3); border: 1px solid var(--border-strong); color: var(--ink); }
.at-path-sep { color: var(--ink-4); }

/* Emplacement à compléter (brouillon uniquement) */
.at-todo {
  margin-top: 16px !important;
  padding: 14px 18px;
  border: 2px dashed #f59e0b;
  border-radius: var(--r-md);
  background: rgba(245, 158, 11, 0.08);
  color: var(--ink) !important;
  font-size: 0.9rem !important;
}
.at-todo::before { content: 'À COMPLÉTER AVANT PUBLICATION · '; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; color: #d97706; letter-spacing: 0.06em; }

/* ── CTA ─────────────────────────────────────────────── */
.at-cta {
  position: relative;
  padding: 30px 32px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(59, 130, 246, 0.35);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(34, 211, 238, 0.12), transparent 55%),
    linear-gradient(160deg, rgba(59, 130, 246, 0.14), rgba(59, 130, 246, 0.03)),
    var(--bg-2);
  overflow: hidden;
}
.at-cta-title { font-family: var(--font-display); font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem); font-weight: 700; line-height: 1.25; color: var(--ink); margin: 0 0 10px !important; }
.at-cta p { font-size: 0.98rem; margin: 0 !important; }
.at-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 22px !important; }
.article-content .at-cta-link { font-weight: 600; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.article-content .at-cta-link:hover { color: var(--positive); }
.at-cta-link svg { width: 18px; height: 18px; color: var(--positive); }
.at-cta--author { display: grid; grid-template-columns: 112px 1fr; gap: 26px; align-items: center; }
.article-content .at-cta--author img { width: 112px; height: 112px; object-fit: cover; margin: 0 !important; border-radius: var(--r-lg); border: 1px solid var(--border-strong); }
@media (max-width: 640px) {
  .at-cta { padding: 24px 20px; }
  .at-cta--author { grid-template-columns: 1fr; gap: 16px; }
  .article-content .at-cta--author img { width: 76px; height: 76px; }
  .at-cta-actions .btn { width: 100%; white-space: normal; }
}

/* ── Calculateur ─────────────────────────────────────── */
.at-calc {
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  overflow: hidden;
}
.at-calc-head { padding: 20px 26px; border-bottom: 1px solid var(--border); background: linear-gradient(120deg, rgba(59,130,246,0.10), transparent 70%); }
.at-calc-head .at-cta-title { margin: 0 !important; font-size: 1.2rem; }
.at-calc-head p { font-size: 0.86rem !important; color: var(--ink-3) !important; margin: 4px 0 0 !important; }
.at-calc-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.at-calc-form { padding: 24px 26px; display: grid; gap: 22px; border-right: 1px solid var(--border); }
.at-calc-out { padding: 24px 26px; display: grid; gap: 14px; align-content: start; background: var(--bg-1); }
[data-theme="light"] .at-calc-out { background: #f6f8fc; }
.at-calc fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.at-calc legend, .at-field-label {
  display: block;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 10px;
}
.at-plat { display: grid; grid-template-columns: auto 1fr minmax(0, 150px); align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.at-plat:last-child { border-bottom: 0; }
.at-plat label { font-weight: 600; color: var(--ink); font-size: 0.95rem; cursor: pointer; }
.at-plat label small { display: block; font-weight: 400; font-size: 0.74rem; color: var(--ink-4); }
.at-check { width: 18px; height: 18px; accent-color: var(--blue); cursor: pointer; }
.at-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-3);
  color: var(--ink);
  font: 600 0.95rem/1.2 var(--font-mono);
  text-align: right;
}
.at-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
.at-input:disabled { opacity: 0.4; }
.at-input-wrap { position: relative; }
.at-input-wrap::after { content: 'MAD'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink-4); pointer-events: none; }
.at-input-wrap .at-input { padding-right: 44px; }
.at-radios { display: grid; gap: 8px; }
.at-radio {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-3);
  cursor: pointer;
  font-size: 0.92rem; line-height: 1.4; color: var(--ink-2);
  transition: border-color var(--t-fast), background-color var(--t-fast);
}
.at-radio input { accent-color: var(--blue); width: 16px; height: 16px; }
.at-radio:has(input:checked) { border-color: var(--blue); background: rgba(59, 130, 246, 0.08); color: var(--ink); }
.at-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.at-kpi {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-2);
}
.at-kpi--wide { grid-column: 1 / -1; }
.at-kpi-label { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); }
.at-kpi-val { display: block; margin-top: 4px; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }
.at-kpi-val--risk { color: var(--negative); }
.at-kpi-val--ok { color: var(--positive); }
[data-theme="light"] .at-kpi-val--risk { color: #b91c1c; }
[data-theme="light"] .at-kpi-val--ok { color: #047857; }
.at-kpi-sub { display: block; font-size: 0.78rem; color: var(--ink-3); margin-top: 2px; }
.at-gauge { height: 12px; border-radius: var(--r-full); background: var(--bg-3); border: 1px solid var(--border); overflow: hidden; display: flex; }
.at-gauge-media { background: linear-gradient(90deg, var(--blue-deep), var(--blue)); transition: flex-grow var(--t-med) var(--ease-out); }
.at-gauge-tax { background: var(--negative); transition: flex-grow var(--t-med) var(--ease-out); }
.at-gauge-legend { display: flex; justify-content: space-between; gap: 10px; font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-4); }
.at-calc-msg {
  padding: 14px 16px;
  border-radius: var(--r-md);
  font-size: 0.92rem; line-height: 1.55; color: var(--ink);
  border: 1px solid var(--border);
  background: var(--bg-2);
}
.at-calc-msg[data-tone="ok"] { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.07); }
.at-calc-msg[data-tone="risk"] { border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.07); }
.at-calc-msg a { font-weight: 600; }
.at-calc-note { font-size: 0.78rem !important; color: var(--ink-4) !important; margin: 0 !important; }
.at-calc-nojs { padding: 18px 26px; font-size: 0.9rem; color: var(--ink-3); }
.at-calc.is-enhanced .at-calc-nojs { display: none; }
.at-calc:not(.is-enhanced) .at-calc-body { display: none; }
/* Le calculateur se règle sur sa propre largeur (colonne d'article
   plus ou moins large selon la présence du sommaire). */
.at-calc { container-type: inline-size; }
@container (max-width: 780px) {
  .at-calc-body { grid-template-columns: 1fr; }
  .at-calc-form { border-right: 0; border-bottom: 1px solid var(--border); }
  .at-kpis { grid-template-columns: 1fr 1fr 1fr; }
  .at-kpi--wide { grid-column: auto; }
}
@container (max-width: 560px) {
  .at-kpis { grid-template-columns: 1fr 1fr; }
  .at-kpi--wide { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .at-calc-body { grid-template-columns: 1fr; }
  .at-calc-form { border-right: 0; border-bottom: 1px solid var(--border); }
}
@media (max-width: 480px) {
  .at-calc-form, .at-calc-out { padding: 20px 16px; }
  .at-plat { grid-template-columns: auto 1fr; }
  .at-plat .at-input-wrap { grid-column: 1 / -1; }
  .at-kpis { grid-template-columns: 1fr; }
}

/* ── Checklist ───────────────────────────────────────── */
.at-checklist {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  overflow: hidden;
}
.at-checklist-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.at-checklist-head .at-cta-title { margin: 0 !important; font-size: 1.12rem; }
.at-progress { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-3); }
.at-progress-bar { width: 120px; height: 6px; border-radius: var(--r-full); background: var(--bg-3); overflow: hidden; }
.at-progress-fill { display: block; height: 100%; width: 0; background: var(--grad-accent); transition: width var(--t-med) var(--ease-out); }
.at-checklist-list li { border-bottom: 1px solid var(--border); }
.at-checklist-list li:last-child { border-bottom: 0; }
.at-checklist-list label {
  display: grid; grid-template-columns: 22px 1fr; gap: 14px; align-items: start;
  padding: 14px 24px; cursor: pointer;
  font-size: 0.96rem; line-height: 1.5; color: var(--ink-2);
  transition: background-color var(--t-fast);
}
.at-checklist-list label:hover { background: var(--bg-3); }
.at-checklist-list input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--positive); cursor: pointer; }
.at-checklist-list input:checked + span { color: var(--ink-4); text-decoration: line-through; text-decoration-color: var(--ink-4); }
.at-checklist-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--bg-1); }
[data-theme="light"] .at-checklist-foot { background: #f6f8fc; }
.at-copy[data-done="1"] { border-color: var(--positive); color: var(--positive); }
@media (max-width: 480px) {
  .at-checklist-head, .at-checklist-list label, .at-checklist-foot { padding-inline: 16px; }
}

/* ── Cartes d'erreurs ────────────────────────────────── */
.at-errors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; counter-reset: at-err; }
.at-error {
  counter-increment: at-err;
  position: relative;
  padding: 22px 22px 20px 70px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-2);
}
.at-error::before {
  content: counter(at-err);
  position: absolute; left: 20px; top: 20px;
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  color: var(--negative);
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
}
.at-error:last-child:nth-child(odd) { grid-column: 1 / -1; }
.at-error-title { margin: 0 0 6px !important; font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; line-height: 1.35; color: var(--ink); }
.at-error p { margin: 0 !important; font-size: 0.92rem !important; line-height: 1.6; color: var(--ink-3); }
.at-errors-wrap { container-type: inline-size; }
@container (max-width: 640px) {
  .at-errors { grid-template-columns: 1fr; }
  .at-error:last-child:nth-child(odd) { grid-column: auto; }
}
@media (max-width: 720px) { .at-errors { grid-template-columns: 1fr; } }

/* ── FAQ accordéon ───────────────────────────────────
   Le look (carte, badge « Q », chevron) vient de blog.css, comme
   les autres FAQ du blog. On ne gère ici que l'espacement. */
.article-content .at-faq details { margin-block: 10px !important; }
.article-content .at-faq .at-faq-q { flex: 1; text-align: left; }
.article-content .at-faq details:first-child { margin-top: 0 !important; }
.article-content .at-faq .at-faq-a { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.article-content .at-faq .at-faq-a p { margin: 0 !important; font-size: 0.98rem; line-height: 1.75; }
.article-content .at-faq .at-faq-a p + p,
.article-content .at-faq .at-faq-a .at-todo { margin-top: 10px !important; }

/* ── Cartes de liens ─────────────────────────────────── */
.at-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.article-content a.at-card-link {
  display: grid; gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-2);
  color: var(--ink-3);
  font-size: 0.9rem; line-height: 1.5;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.article-content a.at-card-link:hover { border-color: rgba(59, 130, 246, 0.45); transform: translateY(-2px); color: var(--ink-3); }
.at-card-link strong { font-family: var(--font-display); font-size: 1rem; color: var(--ink); }
.at-card-link strong::after { content: ' →'; color: var(--blue-light); }
@media (max-width: 640px) { .at-links { grid-template-columns: 1fr; } }

/* ── Sources ─────────────────────────────────────────── */
.at-sources { display: grid !important; gap: 8px; font-size: 0.84rem; line-height: 1.5; }
.at-sources li { padding-left: 16px !important; position: relative; color: var(--ink-3); }
.article-content .at .at-sources li::before { display: block; content: ''; position: absolute; left: 2px; top: 0.6em; width: 6px; height: 6px; border-radius: 1px; background: var(--ink-4); }
.at-sources a { color: var(--ink-2); }

/* ── Tableau triable (pages à données) ───────────────── */
.at-sortable th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
.at-sortable th[data-sort]::after { content: ' ↕'; color: var(--ink-4); }
.at-sortable th[aria-sort="ascending"]::after { content: ' ↑'; color: var(--cyan); }
.at-sortable th[aria-sort="descending"]::after { content: ' ↓'; color: var(--cyan); }

@media (prefers-reduced-motion: reduce) {
  .at-live { animation: none; }
  .at-gauge-media, .at-gauge-tax, .at-progress-fill { transition: none; }
}
