:root {
  --bg: #07061a;
  --bg-2: #0d0b2b;
  --surface: #131138;
  --line: rgba(160, 150, 255, 0.16);
  --text: #eeecff;
  --muted: #a7a3d6;
  --blue: #3b6bff;
  --violet: #9b5cff;
  --pink: #d58bff;
  --grad: linear-gradient(100deg, #4d7dff 0%, #9b5cff 55%, #d58bff 100%);
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(155, 92, 255, 0.18), transparent 60%),
    radial-gradient(800px 500px at 0% 30%, rgba(59, 107, 255, 0.12), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px max(24px, calc((100vw - var(--max)) / 2));
  background: rgba(7, 6, 26, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 8px; font-family: var(--display); letter-spacing: 0.14em; }
.brand-mark {
  font-weight: 700; font-size: 20px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-word { font-weight: 500; font-size: 14px; color: var(--text); letter-spacing: 0.32em; }
.nav a { font-size: 14px; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 380px;
  display: flex; align-items: flex-end;
  padding: 64px max(24px, calc((100vw - var(--max)) / 2)) 56px;
  background: url("assets/hero.webp") center / cover no-repeat;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 6, 26, 0.25) 0%, rgba(7, 6, 26, 0.55) 55%, var(--bg) 100%),
    linear-gradient(90deg, rgba(7, 6, 26, 0.75) 0%, transparent 70%);
}
.hero-inner { position: relative; z-index: 1; max-width: 720px; }
.eyebrow {
  font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--pink);
  margin: 0 0 14px;
}
.hero h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(34px, 5vw, 56px); line-height: 1.08; margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0; color: #cfcbf5; font-size: 17px; max-width: 560px; }

/* ---------- Liste d'articles ---------- */
.section { padding: 40px max(24px, calc((100vw - var(--max)) / 2)) 80px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-family: var(--display); font-weight: 600; font-size: 24px; margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: 13px; color: var(--muted);
  padding: 7px 16px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--line);
  transition: all .2s;
}
.chip:hover { color: var(--text); border-color: rgba(160, 150, 255, 0.4); }
.chip.active { color: #fff; border-color: transparent; background: var(--grad); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(25, 22, 70, 0.7), rgba(15, 13, 46, 0.7));
  border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(155, 92, 255, 0.55);
  box-shadow: 0 18px 50px -20px rgba(123, 92, 255, 0.6);
}
.card:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }
.cover { aspect-ratio: 16 / 9; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.cover::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 22px);
  mix-blend-mode: overlay;
}
.cover.has-img::after { display: none; }
.card .cover { transition: transform .5s ease; }
.card:hover .cover { transform: scale(1.04); }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.tag {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
  color: var(--pink);
}
.tag.equity { color: #7fa2ff; }
.card h3 { font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1.25; margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.more { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.more span { color: var(--violet); transition: transform .2s; }
.card:hover .more span { transform: translateX(4px); }
.empty { color: var(--muted); padding: 40px 0; }

/* ---------- Page article ---------- */
.article-cover { height: 300px; background-size: cover; background-position: center; position: relative; }
.article-cover::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, var(--bg) 100%);
}
.article { max-width: 760px; margin: -110px auto 0; padding: 0 24px 90px; position: relative; }
.back { display: inline-flex; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 22px; transition: color .2s; }
.back:hover { color: var(--text); }
.article h1 { font-family: var(--display); font-weight: 600; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.12; margin: 12px 0 14px; letter-spacing: -0.01em; }
.article .lede { font-size: 19px; color: #cfcbf5; margin: 0 0 28px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.prose { font-size: 17px; color: #dcd9f7; }
.prose h2 { font-family: var(--display); font-weight: 600; font-size: 24px; color: var(--text); margin: 40px 0 12px; }
.prose h3 { font-family: var(--display); font-weight: 600; font-size: 19px; color: var(--text); margin: 28px 0 8px; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose a { color: #9fb6ff; text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose blockquote {
  margin: 26px 0; padding: 16px 22px; border-left: 3px solid var(--violet);
  background: rgba(155, 92, 255, 0.08); border-radius: 0 10px 10px 0; color: var(--text);
}
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--muted); font-weight: 500; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.prose img { border-radius: 10px; margin: 0 0 22px; }

/* ---------- Pied de page ---------- */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding: 22px max(24px, calc((100vw - var(--max)) / 2));
  border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
}

/* ---------- Choix de la langue ---------- */
.nav { display: flex; align-items: center; gap: 20px; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-switch button {
  font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--muted); background: transparent; border: 0; border-radius: 999px;
  padding: 5px 12px; cursor: pointer; transition: color .2s;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active { color: #fff; background: var(--grad); }

body.gated { overflow: hidden; }
.lang-gate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    linear-gradient(180deg, rgba(7, 6, 26, 0.55), rgba(7, 6, 26, 0.88)),
    url("assets/hero.webp") center / cover no-repeat, var(--bg);
}
.lang-gate[hidden] { display: none; }
.lang-gate-inner { text-align: center; }
.gate-brand { justify-content: center; margin-bottom: 18px; }
.gate-brand .brand-mark { font-size: 44px; }
.gate-brand .brand-word { font-size: 26px; }
.lang-gate p { color: #cfcbf5; margin: 0 0 30px; font-size: 15px; }
.gate-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.gate-buttons button {
  font-family: var(--display); font-size: 17px; font-weight: 600; color: #fff;
  min-width: 170px; padding: 15px 28px; border-radius: 12px; cursor: pointer;
  background: rgba(19, 17, 56, 0.7); border: 1px solid rgba(160, 150, 255, 0.4);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .2s, background .2s, border-color .2s;
}
.gate-buttons button:hover { transform: translateY(-2px); background: var(--grad); border-color: transparent; }

/* ---------- Articles longs : signature, graphiques, parties ---------- */
.prose .byline { color: var(--muted); font-size: 14px; font-style: italic; }
.prose figure { margin: 26px 0; }
.prose figure img { width: 100%; margin: 0; border: 1px solid var(--line); background: #fff; }
.prose h2.part {
  font-size: 28px; margin-top: 64px; padding-top: 36px; border-top: 1px solid var(--line);
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.prose .notice {
  font-size: 14px; color: var(--text); padding: 12px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(155, 92, 255, 0.1);
}
.article-cover { background-position: center 35%; }

/* ---------- Tableaux et chiffres clés TGE Research ---------- */
.prose figure.tge-fig {
  margin: 30px 0; padding: 22px 22px 18px; border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(28, 24, 78, 0.85), rgba(15, 13, 46, 0.85));
}
.tge-fig .tf-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.16em; }
.tge-fig .tf-eyebrow { color: var(--pink); }
.tge-fig .tf-brand { color: var(--muted); white-space: nowrap; }
.tge-fig .tf-title { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1.2; color: var(--text); }
.tge-fig .tf-sub { color: var(--muted); font-size: 14px; margin: 4px 0 16px; }
.tge-fig .tf-scroll { overflow-x: auto; }
.tge-fig table { margin: 0; font-size: 15px; min-width: 460px; }
.tge-fig th, .tge-fig td { text-align: center; padding: 11px 12px; white-space: nowrap; }
.tge-fig th:first-child, .tge-fig td:first-child { text-align: left; white-space: normal; }
.tge-fig thead th { background: rgba(155, 92, 255, 0.22); color: var(--text); font-weight: 600; border-bottom: 0; }
.tge-fig thead th:first-child { border-radius: 8px 0 0 8px; }
.tge-fig thead th:last-child { border-radius: 0 8px 8px 0; }
.tge-fig thead th.hl { background: var(--violet); color: #fff; }
.tge-fig td.hl { background: rgba(155, 92, 255, 0.12); color: #fff; font-weight: 600; }
.tge-fig tr.main td { color: var(--text); font-weight: 600; }
.tge-fig tr.sub td { color: var(--muted); font-size: 14px; }
.tge-fig tr.big td { font-family: var(--display); font-size: 17px; }
.tge-fig tr.big td.hl { background: var(--violet); }
.tge-fig td small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.tge-fig figcaption { margin-top: 14px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.tge-fig figcaption span { display: block; }
.tge-fig figcaption .strong { color: var(--text); font-weight: 600; font-size: 13px; }
.tf-kpis { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; }
.tf-kpis .kpi {
  grid-column: span 3; display: flex; flex-direction: column; gap: 6px; padding: 14px;
  border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
}
.tf-kpis .kpi.top { grid-column: span 4; background: linear-gradient(135deg, rgba(77, 125, 255, 0.35), rgba(155, 92, 255, 0.45)); border-color: transparent; }
.tf-kpis .k-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); line-height: 1.35; }
.tf-kpis .top .k-label { color: #e4defc; }
.tf-kpis .k-value { font-family: var(--display); font-weight: 600; font-size: 21px; color: var(--text); line-height: 1.1; margin-top: auto; }
.tf-kpis .top .k-value { font-size: 26px; }
.tf-kpis .k-delta { font-size: 12px; color: #6fe0a8; }
.tf-kpis .neg .k-value, .tf-kpis .neg .k-delta { color: #ff8f9c; }
@media (max-width: 700px) {
  .tf-kpis .kpi, .tf-kpis .kpi.top { grid-column: span 6; }
}
.tge-fig thead th { text-transform: none; letter-spacing: 0.02em; font-size: 14px; }
