/* =============================================================
   ChillBTC landing — Univers U1 Minimal Zen
   Palette: #FAFAF7 / #0B0B0B / #F7931A / #1F6F4A / #B33A3A
   Fonts:   Inter (corps) + IBM Plex Mono (chiffres, code)
   ============================================================= */

:root {
  --bg: #FAFAF7;
  --ink: #0B0B0B;
  --ink-soft: #241B17;
  --orange: #F7931A;
  --green: #1F6F4A;
  --red: #B33A3A;
  --muted: #6b6b66;
  --line: #e7e6e0;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.03), 0 4px 16px rgba(0,0,0,.04);
  --radius: 14px;
  --container: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typography ---------- */
h1, h2, h3 { letter-spacing: -0.02em; margin: 0; font-weight: 800; }
h1 { font-size: clamp(48px, 7vw, 88px); line-height: 1.05; }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; margin: 0 0 20px; }
h3 { font-size: 20px; line-height: 1.3; margin: 0 0 12px; }
p { margin: 0 0 16px; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  font-weight: 600; font-size: 16px;
  border-radius: 10px;
  text-decoration: none;
  transition: transform .12s ease, background .15s, color .15s;
  border: 1px solid var(--ink);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--orange); border-color: var(--orange); color: var(--bg); }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--bg); }

/* ---------- Nav top ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topnav .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  display: flex; align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-logo { width: 32px; height: 32px; }
.topnav-links {
  display: flex; gap: 28px;
  font-size: 14px; font-weight: 500;
}
.topnav-links a {
  text-decoration: none; color: var(--muted);
  transition: color .15s;
}
.topnav-links a:hover { color: var(--orange); }

@media (max-width: 640px) {
  .topnav-links { display: none; }
  .topnav .wrap { padding: 12px 16px; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 64px;
  text-align: center;
}
.hero-logo {
  width: 120px; height: 120px;
  margin: 0 auto 20px;
  display: block;
}
.wordmark {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.36em;
  color: var(--orange);
  margin-bottom: 24px;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0 0 16px;
}
.tagline {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 40px;
}
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}
.section-lead {
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 40px;
  font-size: 17px;
}

/* ---------- Downloads ---------- */
#download { background: var(--card); }
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.dl-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s, transform .12s, box-shadow .15s;
  display: flex; flex-direction: column; align-items: center;
}
.dl-card:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.dl-icon {
  width: 52px; height: 52px;
  color: var(--ink);
  margin-bottom: 18px;
}
.dl-label {
  font-weight: 800; font-size: 22px;
  margin-bottom: 4px;
}
.dl-hint {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 12px; color: var(--muted);
  letter-spacing: 0.02em;
}
.dl-size {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 11px; color: var(--orange);
  margin-top: 12px; letter-spacing: 0.05em; text-transform: uppercase;
}

/* ---------- Règle 100/50/0 ---------- */
.rule-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.rule-table th {
  background: var(--bg);
  padding: 14px 20px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.rule-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  vertical-align: middle;
}
.rule-table tbody tr:last-child td { border-bottom: none; }
.rule-table tbody tr:hover { background: rgba(247, 147, 26, 0.03); }
.badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  letter-spacing: 0.08em;
}
.badge-achat { background: #E7F5EE; color: var(--green); }
.badge-cash  { background: #FBE8E8; color: var(--red); }
.rule-table .pos { font-size: 16px; color: var(--ink); }
.rule-table .pos strong { color: var(--orange); }
.rule-table .pos-dot {
  display: inline-block;
  font-size: 18px;
  vertical-align: -2px;
  margin-right: 4px;
}
.rule-table .ctx { color: var(--muted); font-size: 13px; margin-top: 4px; font-style: italic; }

@media (max-width: 640px) {
  .rule-table th, .rule-table td { padding: 12px 12px; font-size: 13px; }
  .rule-table .pos { font-size: 14px; }
  .badge { padding: 4px 10px; font-size: 11px; }
}

/* ---------- Perf ---------- */
.perf { background: var(--card); }
.perf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.stat {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: left;
}
.stat-val {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 36px;
  font-weight: 500;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.stat-label {
  font-weight: 700; font-size: 15px;
  margin-bottom: 4px;
}
.stat-vs {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 12px; color: var(--muted);
}
.note-hodl {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 12px; color: var(--muted);
  margin: 24px 0 0;
  letter-spacing: 0.02em;
}
.perf-footnote {
  font-size: 13px; color: var(--muted);
  margin-top: 20px; font-style: italic;
}

/* ---------- Fit (tableau thème × oui / non) ---------- */
.fit-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  table-layout: fixed;
}
.fit-table thead th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.fit-table thead th.fit-theme { width: 18%; }
.fit-table thead th.fit-yes { width: 41%; color: var(--green); }
.fit-table thead th.fit-no  { width: 41%; color: var(--red); }
.fit-table thead .fit-emoji {
  display: inline-block;
  margin-right: 10px;
  font-size: 1.1em;
  vertical-align: -1px;
}
.fit-table tbody th.fit-theme {
  padding: 18px 20px;
  text-align: left;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  vertical-align: middle;
}
.fit-table tbody td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  vertical-align: middle;
  line-height: 1.5;
}
.fit-table tbody td.fit-yes { border-left: 3px solid var(--green); }
.fit-table tbody td.fit-no  { border-left: 3px solid var(--red); }
.fit-table tbody tr:last-child th,
.fit-table tbody tr:last-child td { border-bottom: none; }

@media (max-width: 720px) {
  .fit-table, .fit-table thead, .fit-table tbody,
  .fit-table tr, .fit-table th, .fit-table td {
    display: block; width: 100%;
  }
  .fit-table thead { display: none; }
  .fit-table tbody tr {
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
  }
  .fit-table tbody tr:last-child { border-bottom: none; }
  .fit-table tbody th.fit-theme {
    background: transparent;
    border: none;
    padding: 4px 20px;
    color: var(--ink);
    font-size: 16px;
  }
  .fit-table tbody td {
    border: none;
    padding: 6px 20px 6px 46px;
    position: relative;
  }
  .fit-table tbody td.fit-yes::before { content: "✅ "; position: absolute; left: 20px; }
  .fit-table tbody td.fit-no::before  { content: "❌ "; position: absolute; left: 20px; }
  .fit-table tbody td.fit-yes,
  .fit-table tbody td.fit-no { border-left: none; }
}

/* ---------- Disclaimer ---------- */
.disclaimer {
  background: #FFF4E5;
  border-top: 1px solid #F5D7A6;
  border-bottom: 1px solid #F5D7A6;
}
.disclaimer h2 {
  font-size: 20px;
  color: #8B5A00;
  margin-bottom: 12px;
}
.disclaimer p {
  font-size: 15px;
  color: #5C3B00;
  margin: 0;
  max-width: 820px;
}

/* ---------- Footer ---------- */
footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--line);
}
footer p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
footer a { color: var(--muted); text-decoration-color: var(--orange); }

/* ---------- FAQ ---------- */
.faq .section-lead { margin-bottom: 8px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 14px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.faq-item:first-of-type { margin-top: 32px; }
.faq-item:hover { box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.06); }
.faq-item[open] { border-color: var(--orange); }
.faq-item summary {
  cursor: pointer;
  padding: 20px 56px 20px 24px;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  position: relative;
  list-style: none;
  transition: color 0.15s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 26px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease, border-color 0.15s ease;
}
.faq-item[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
  border-color: var(--orange);
}
.faq-item summary:hover { color: var(--orange); }
.faq-answer {
  padding: 0 24px 20px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.65;
}
.faq-answer p { margin: 0 0 12px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer ul {
  margin: 0 0 4px;
  padding-left: 22px;
}
.faq-answer li { margin-bottom: 6px; }
.faq-answer a { color: var(--orange); text-decoration-color: rgba(247, 147, 26, 0.4); }
.faq-answer a:hover { text-decoration-color: var(--orange); }
.faq-answer code {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 14px;
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}
.faq-cta {
  margin-top: 40px;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .hero { padding: 64px 0 48px; }
  .hero-logo { width: 96px; height: 96px; margin-bottom: 24px; }
  section { padding: 56px 0; }
  .rule-box pre { font-size: 12px; }
  .faq-item summary { padding: 18px 48px 18px 20px; font-size: 16px; }
  .faq-item summary::after { right: 22px; }
  .faq-answer { padding: 0 20px 18px; font-size: 15px; }
}

/* =============================================================
   Jekyll sub-pages (signal, méthodologie, historique annuel/mensuel)
   ============================================================= */

/* ---------- Page content (prose) ---------- */
.page-content {
  padding: 56px 0 80px;
}
.page-content .wrap {
  max-width: 780px;
}
.page-content > .wrap > .wordmark {
  margin-bottom: 16px;
  text-align: left;
}
.page-content h1 {
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.1;
  margin: 48px 0 24px;
}
.page-content h1:first-of-type {
  margin-top: 0;
}
.page-content h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.25;
  margin: 40px 0 16px;
}
.page-content h3 {
  font-size: 18px;
  line-height: 1.3;
  margin: 28px 0 10px;
  font-weight: 700;
}
.page-content p {
  margin: 0 0 16px;
  font-size: 17px;
}
.page-content ul,
.page-content ol {
  margin: 0 0 20px;
  padding-left: 24px;
}
.page-content li {
  margin-bottom: 6px;
}
.page-content li > p {
  margin-bottom: 8px;
}
.page-content strong {
  font-weight: 700;
}
.page-content a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-underline-offset: 3px;
}
.page-content a:hover {
  text-decoration-thickness: 2px;
}
.page-content hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

/* ---------- Blockquote (notes, call-outs du signal et methodologie) ---------- */
.page-content blockquote {
  margin: 20px 0;
  padding: 14px 20px;
  background: var(--card);
  border-left: 3px solid var(--orange);
  border-radius: 0 8px 8px 0;
  color: var(--ink-soft);
  font-size: 15.5px;
}
.page-content blockquote p {
  margin: 0 0 8px;
}
.page-content blockquote p:last-child {
  margin-bottom: 0;
}

/* ---------- Code inline ---------- */
.page-content code {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 14px;
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}

/* ---------- Blocs <pre> (tableaux ASCII historique annuel/mensuel) ---------- */
.page-content pre {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
  overflow-x: auto;
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.page-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* ---------- Figures (méthodologie — PNG générés par methodology_figures.py) ---------- */
.page-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

@media (max-width: 640px) {
  .page-content { padding: 40px 0 56px; }
  .page-content pre { font-size: 11.5px; padding: 14px 16px; }
  .page-content h1 { margin-top: 32px; }
  .page-content h2 { margin-top: 28px; }
}

/* =============================================================
   Signal du mois — allocation card (Design 1) + signal table
   ============================================================= */

/* ---------- Allocation — 2 cartes BTC / USDC ---------- */
.signal-alloc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 28px 0 32px;
}
.signal-alloc .alloc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: opacity .2s ease;
}
.signal-alloc .alloc-card.alloc-btc  { border-top: 4px solid var(--orange); }
.signal-alloc .alloc-card.alloc-usdc { border-top: 4px solid #2775CA; }
.signal-alloc .alloc-card.alloc-dim  { opacity: 0.35; }
.signal-alloc .alloc-state {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 14px;
}
.signal-alloc .alloc-pct {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 48px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.signal-alloc .alloc-label {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Signal table — Tendance + Valorisation ---------- */
.signal-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 0 0 12px;
}
.signal-table th {
  background: var(--bg);
  padding: 12px 18px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.signal-table th.num-col   { text-align: right; }
.signal-table th.arrow-col { width: 40px; }
.signal-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  vertical-align: middle;
}
.signal-table tbody tr:last-child td { border-bottom: none; }
.signal-table .signal-sub {
  color: var(--muted);
  font-size: 14px;
}
.signal-table .num {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}
.signal-table .num.positive { color: var(--green); }
.signal-table .num.negative { color: var(--red); }
.signal-table .arrow {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  color: var(--muted);
  text-align: center;
}
.signal-table .decision {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12.5px;
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.signal-table .decision.achat { background: #E7F5EE; color: var(--green); }
.signal-table .decision.cash  { background: #FBE8E8; color: var(--red); }

/* ---------- Responsive signal page ---------- */
@media (max-width: 560px) {
  .signal-alloc { grid-template-columns: 1fr; gap: 14px; }
  .signal-alloc .alloc-pct { font-size: 40px; }
  .signal-alloc .alloc-card { padding: 24px 20px; }

  .signal-table th, .signal-table td { padding: 12px 12px; font-size: 14px; }
  .signal-table .signal-sub { display: block; font-size: 12px; }
  .signal-table .decision { padding: 4px 10px; font-size: 11.5px; }
}

/* =============================================================
   Historique annuel + mensuel — history-table + history-summary
   ============================================================= */

/* ---------- Table commune ---------- */
.history-table,
.history-summary {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 28px 0 24px;
}
.history-table th,
.history-summary th {
  background: var(--bg);
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.history-table td,
.history-table tbody th,
.history-summary td,
.history-summary tbody th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: middle;
}
.history-table tbody tr:last-child td,
.history-table tbody tr:last-child th,
.history-summary tbody tr:last-child td,
.history-summary tbody tr:last-child th { border-bottom: none; }

/* Première colonne (année / mois / métrique) — libellé */
.history-table tbody th[scope="row"],
.history-summary tbody th[scope="row"] {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--bg);
  text-transform: none;
  white-space: nowrap;
}
.history-summary tbody th[scope="row"] {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0;
}

/* Cellules num — mono, right-align, coloration par signe */
.history-table .num,
.history-summary .num {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}
.history-table .num.positive,
.history-summary .num.positive { color: var(--green); }
.history-table .num.negative,
.history-summary .num.negative { color: var(--red); }
.history-table .num.neutral,
.history-summary .num.neutral { color: var(--muted); }
.history-table .placeholder,
.history-summary .placeholder { color: var(--muted); text-align: center; }

/* Colonne ChillBTC — fond légèrement teinté (emphase) */
.history-table .chill,
.history-summary .chill { background: rgba(247, 147, 26, 0.04); }
.history-table thead .chill,
.history-summary thead .chill {
  color: var(--orange);
  background: var(--bg);
}

/* Hover row */
.history-table tbody tr:hover,
.history-summary tbody tr:hover { background: rgba(247, 147, 26, 0.06); }

/* ---------- Annuel : en-tête 2 niveaux ---------- */
.history-annual thead .group-header .group {
  text-align: center;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}
.history-annual thead .group-header .col-year {
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
.history-annual thead .sub-header th {
  font-size: 11px;
  padding: 10px 14px;
  text-align: right;
}

/* ---------- Mensuel : zebra + sticky header + colonnes ---------- */
.history-monthly thead th {
  position: sticky;
  top: 60px; /* offset sous la topnav sticky */
  z-index: 2;
  background: var(--bg);
}
.history-monthly tbody tr:nth-child(even) td,
.history-monthly tbody tr:nth-child(even) th[scope="row"] {
  background: rgba(11, 11, 11, 0.015);
}
.history-monthly tbody tr:nth-child(even) .chill {
  background: rgba(247, 147, 26, 0.055);
}
.history-monthly tbody tr:hover td,
.history-monthly tbody tr:hover th[scope="row"] {
  background: rgba(247, 147, 26, 0.08);
}
.history-monthly .col-month,
.history-monthly .col-alloc { text-align: left; }
.history-monthly .col-price { text-align: right; }
.history-monthly .alloc-cell {
  white-space: nowrap;
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 13px;
}
.history-monthly .alloc-dot {
  font-size: 15px;
  margin-right: 4px;
  vertical-align: -1px;
}
.history-monthly .num-price {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  text-align: right;
  white-space: nowrap;
  color: var(--ink);
}

/* ---------- Mobile — stack en cards (Option A) ---------- */
@media (max-width: 720px) {
  .history-table,
  .history-table thead,
  .history-table tbody,
  .history-table tr,
  .history-table td,
  .history-table tbody th {
    display: block;
    width: 100%;
  }
  .history-table thead { display: none; }
  .history-table {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
  }
  .history-table tbody tr {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 18px;
    margin-bottom: 14px;
  }
  .history-table tbody tr:hover,
  .history-table tbody tr:hover td,
  .history-table tbody tr:hover th[scope="row"] { background: var(--card); }
  .history-monthly tbody tr:nth-child(even) td,
  .history-monthly tbody tr:nth-child(even) th[scope="row"],
  .history-monthly tbody tr:nth-child(even) .chill { background: transparent; }

  .history-table tbody th[scope="row"] {
    padding: 4px 0 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    background: transparent;
  }
  .history-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border: none;
    font-size: 14px;
    background: transparent !important;
  }
  .history-table tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  }
  .history-table tbody td.placeholder::before,
  .history-table tbody td.alloc-cell::before,
  .history-table tbody td.num-price::before { content: attr(data-label); }
  .history-table .chill { background: transparent; }

  /* Sticky header désactivé sur mobile (plus de thead) */
  .history-monthly thead th { position: static; }

  /* Summary : reste en tableau compact sur mobile (3 colonnes petites) */
  .history-summary,
  .history-summary thead,
  .history-summary tbody,
  .history-summary tr,
  .history-summary td,
  .history-summary th { display: revert; }
  .history-summary thead { display: table-header-group; }
  .history-summary { display: table; }
  .history-summary th,
  .history-summary td { padding: 10px 10px; font-size: 13px; }
  .history-summary tbody th[scope="row"] { font-size: 13px; }
}
