/*
 * Geopolo · articles d'analyse longue 2026
 * Socle structurel commun. Les composants transversaux (navigation, auteur,
 * partage, cartes et newsletter) restent pilotés par article-editorial.css.
 */

:root {
  --ink: #17181c;
  --paper: #f5f2eb;
  --offwhite: #fbfaf7;
  --mid: #66635d;
  --light: #918d85;
  --rule: #d9d5cb;
  --accent: var(--editorial-title, #55713a);
  --body-max: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--offwhite);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.75;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

#progress-bar {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 10000;
  width: 0;
  height: 3px;
  background: var(--editorial-title, #55713a);
  transition: width 90ms linear;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .48rem 1.6rem;
  background: #111216;
  color: #bcb8b0;
  font: 500 .68rem/1.4 "DM Mono", monospace;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.topbar a { color: #e5e1d9; }

.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 2rem 1rem;
  border-bottom: 2px solid #17181c;
  background: #fff;
}
.masthead__logo {
  color: #17181c;
  font: 900 clamp(1.8rem, 4vw, 2.8rem)/.95 "Playfair Display", Georgia, serif;
  letter-spacing: -.05em;
}
.masthead__logo em { color: var(--editorial-title, #55713a); font-weight: 900; }
.masthead__logo span {
  display: block;
  margin-top: .35rem;
  color: #68645d;
  font: italic 600 .45em/1.2 "Playfair Display", Georgia, serif;
  letter-spacing: 0;
}
.masthead__issue {
  color: var(--mid);
  font: 500 .64rem/1.7 "DM Mono", monospace;
  letter-spacing: .1em;
  text-align: right;
  text-transform: uppercase;
}

body > nav:not(.editorial-global-nav) {
  display: flex;
  flex-wrap: wrap;
  background: #111216;
}
body > nav:not(.editorial-global-nav) a {
  padding: .72rem 1rem;
  border-right: 1px solid #2a2b30;
  color: #d2cec6;
  font: 500 .66rem/1 "DM Mono", monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
}
body > nav:not(.editorial-global-nav) a.active { color: #fff; background: #282a31; }

.article-hero { background: #fff; }
.article-hero__content {
  width: min(100%, 930px);
  margin: 0 auto;
  padding: clamp(2.7rem, 7vw, 5.4rem) clamp(1.25rem, 6vw, 4rem) 1.6rem;
}
.article-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-bottom: 1rem;
}
.tag-badge {
  padding: .26rem .58rem;
  border: 1px solid color-mix(in srgb, var(--editorial-title, #55713a) 35%, #ddd);
  color: var(--editorial-title-dark, #3d5429);
  background: color-mix(in srgb, var(--editorial-title, #55713a) 6%, #fff);
  font: 600 .62rem/1.2 "DM Mono", monospace;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.article-hero h1 {
  max-width: 890px;
  margin: 0;
  color: var(--editorial-title, #55713a);
  font: 400 clamp(2.55rem, 6vw, 4.7rem)/.99 Georgia, serif;
  letter-spacing: -.04em;
}
.article-hero__sub {
  max-width: 790px;
  margin: 1.35rem 0 0;
  color: #303030;
  font: 400 clamp(1.05rem, 2vw, 1.3rem)/1.52 Arial, sans-serif;
}

.meta-bar {
  padding: .85rem 1.5rem;
  border-block: 1px solid var(--rule);
  background: #fff;
}
.meta-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1rem;
  width: min(100%, 850px);
  margin: 0 auto;
}
.meta-item, .meta-sep {
  color: var(--light);
  font: 500 .63rem/1.4 "DM Mono", monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.meta-item strong { color: var(--mid); }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--body-max)) 230px;
  align-items: start;
  gap: clamp(2rem, 5vw, 4rem);
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2rem) 2rem;
}
.article-body { min-width: 0; }
.article-body > p:first-of-type {
  color: #202125;
  font-size: 1.19rem;
  line-height: 1.55;
}
.article-body a:not(.tag-pill) {
  color: var(--editorial-title-dark, #3d5429);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--editorial-title, #55713a) 45%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: .16em;
}

.ch-label {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 3rem 0 .42rem;
  color: var(--editorial-title, #55713a);
  font: 600 .62rem/1.3 "DM Mono", monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.ch-label::after { width: 3.4rem; height: 1px; background: var(--rule); content: ""; }

.thesis-box,
.analysis-box,
.method-box {
  margin: 2rem 0;
  padding: 1.35rem 1.45rem;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--editorial-title, #55713a);
  background: #f7f5f0;
}
.thesis-box__eyebrow,
.analysis-box__eyebrow {
  display: block;
  margin-bottom: .55rem;
  color: var(--editorial-title-dark, #3d5429);
  font: 700 .61rem/1.3 "DM Mono", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.thesis-box p:last-child,
.analysis-box p:last-child,
.method-box p:last-child { margin-bottom: 0 !important; }

.data-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 2.2rem 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--rule);
}
.metric { min-width: 0; padding: 1.15rem 1rem; background: #fff; }
.metric__value {
  display: block;
  color: var(--editorial-title-dark, #3d5429);
  font: 700 clamp(1.5rem, 4vw, 2.15rem)/1 Georgia, serif;
  letter-spacing: -.035em;
}
.metric__label {
  display: block;
  margin-top: .45rem;
  color: var(--mid);
  font: 600 .59rem/1.45 "DM Mono", monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.stake-grid,
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin: 1.8rem 0 2.2rem;
}
.stake-card,
.scenario-card {
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--rule);
  background: #fff;
}
.stake-card h3,
.scenario-card h3 {
  margin: 0 0 .45rem;
  color: var(--editorial-title-dark, #3d5429);
  font: 800 1rem/1.2 Arial, sans-serif;
}
.stake-card p,
.scenario-card p { margin: 0 !important; font-size: .96rem !important; }

.timeline { margin: 2rem 0; border-left: 1px solid var(--rule); }
.timeline__item { position: relative; padding: 0 0 1.25rem 1.35rem; }
.timeline__item::before {
  position: absolute;
  top: .35rem;
  left: -.31rem;
  width: .58rem;
  height: .58rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--editorial-title, #55713a);
  box-shadow: 0 0 0 1px var(--editorial-title, #55713a);
  content: "";
}
.timeline__date { color: var(--editorial-title-dark, #3d5429); font: 700 .64rem/1.3 "DM Mono", monospace; text-transform: uppercase; }
.timeline__item p { margin: .25rem 0 0 !important; }

.source-notes {
  margin: 3rem 0 1rem;
  padding: 1.4rem;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  background: #fff;
}
.source-notes h2 { margin: 0 0 .8rem !important; font-size: 1.2rem !important; }
.source-notes ol { margin: 0; padding-left: 1.2rem; }
.source-notes li { margin: .45rem 0; color: var(--mid); font-size: .86rem; line-height: 1.5; }

.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  margin: 2.4rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
}
.article-tags__label,
.tag-pill {
  color: var(--mid);
  font: 600 .6rem/1.2 "DM Mono", monospace;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.tag-pill { padding: .28rem .58rem; border: 1px solid var(--rule); background: #fff; }

.sidebar { position: sticky; top: 68px; }
.sidebar-block { margin-bottom: 1.7rem; }
.sidebar-title {
  margin: 0 0 .6rem;
  padding-bottom: .45rem;
  border-bottom: 2px solid var(--ink);
  color: var(--mid);
  font: 700 .64rem/1.3 "DM Mono", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.toc-list { margin: 0; padding: 0; list-style: none; }
.toc-list li { border-bottom: 1px solid var(--rule); }
.toc-list a { display: flex; gap: .6rem; padding: .55rem 0; color: var(--mid); font: 600 .76rem/1.35 Arial, sans-serif; }
.toc-list a:hover,
.toc-list a.is-active { color: var(--editorial-title-dark, #3d5429); }
.toc-num { color: var(--editorial-title, #55713a); font: 600 .58rem/1.5 "DM Mono", monospace; }
.cta-box { padding: 1.2rem; background: #17181c; color: #fff; }
.cta-box h3 { margin: 0 0 .35rem; font: 700 1.03rem/1.25 Georgia, serif; }
.cta-box p { margin: 0 0 .8rem; color: #c4c0b9; font: 400 .76rem/1.5 Arial, sans-serif; }
.cta-box a { display: inline-block; padding: .48rem .7rem; background: var(--editorial-title, #55713a); color: #fff; font: 700 .61rem/1.2 "DM Mono", monospace; text-transform: uppercase; }

.editorial-share,
.editorial-related,
.editorial-newsletter { width: min(calc(100% - 2rem), 1040px); }

footer { margin-top: 3.5rem; padding: 2.2rem 1.5rem; background: #111216; color: #9a968e; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; width: min(100%, 1040px); margin: 0 auto; font: 500 .62rem/1.5 "DM Mono", monospace; letter-spacing: .06em; text-transform: uppercase; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a { color: #c2beb6; }

@media (max-width: 900px) {
  .article-layout { grid-template-columns: minmax(0, var(--body-max)); justify-content: center; }
  .sidebar { position: static; width: min(100%, var(--body-max)); }
  .sidebar .sidebar-block:first-child { display: none; }
}

@media (max-width: 640px) {
  .topbar { padding-inline: .85rem; font-size: .58rem; }
  .topbar span:last-child { display: none; }
  .masthead { align-items: flex-start; padding: 1rem; }
  .masthead__issue { display: none; }
  .article-hero__content { padding-top: 2.4rem; }
  .article-layout { padding-inline: 1rem; }
  .data-strip { grid-template-columns: 1fr; }
  .stake-grid, .scenario-grid { grid-template-columns: 1fr; }
  .meta-sep { display: none; }
}

@media print {
  #progress-bar, .topbar, nav, .sidebar, .editorial-share, .editorial-newsletter { display: none !important; }
  body { background: #fff !important; }
  .article-layout { display: block; padding: 0; }
}
