:root {
  --ink: #111418;
  --ink-2: #3a4049;
  --muted: #6b727c;
  --line: #e3e6ea;
  --bg: #ffffff;
  --bg-soft: #f4f5f1;
  --navy: #10302a;        /* vert sapin */
  --accent: #b07d2b;      /* laiton */
  --accent-ink: #87601e;  /* laiton foncé, texte sur blanc */
  --accent-light: #d1a35a;/* laiton clair, sur fond sombre */
  --accent-2: #1d5c4f;    /* liens */
  --max: 1180px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }

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

/* ---------- Bandeau ---------- */
.demo-bar {
  background: #fff4d6;
  color: #6a4b00;
  font-size: 13px;
  text-align: center;
  padding: 6px 16px;
  border-bottom: 1px solid #f0e0a8;
}

.masthead {
  background: var(--navy);
  color: #fff;
}
.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand-name {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.brand-name span { color: var(--accent-light); }
.masthead-meta { font-size: 13px; color: #b8c9c2; }
.btn {
  display: inline-block;
  background: var(--accent-ink);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 4px;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }

.nav {
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav ul {
  list-style: none;
  margin: 0 auto;
  padding: 0 16px;
  max-width: var(--max);
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav ul::-webkit-scrollbar { display: none; }
.nav a {
  display: block;
  padding: 13px 0 11px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.nav a:hover, .nav a.active { border-bottom-color: var(--accent); text-decoration: none; }

/* ---------- Étiquettes ---------- */
.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.tag-exemple {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6a4b00;
  background: #fff4d6;
  border: 1px solid #f0e0a8;
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: 2px;
}
.meta { font-size: 13px; color: var(--muted); }

/* ---------- Visuels de remplacement ---------- */
.visual {
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: var(--navy);
}
.visual svg { width: 100%; height: 100%; }
.v-chips { background: linear-gradient(135deg, #10302a, #2f5e52); }
.v-geo   { background: linear-gradient(135deg, #1b2a27, #4a6b5f); }
.v-ia    { background: linear-gradient(135deg, #1f2a2e, #3d5560); }
.v-energ { background: linear-gradient(135deg, #3a2a12, #b07d2b); }
.v-sea   { background: linear-gradient(135deg, #0f2d33, #2e6a6a); }

/* ---------- Accueil ---------- */
.home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  padding: 28px 16px 56px;
  max-width: var(--max);
  margin: 0 auto;
}
.lead { border-bottom: 1px solid var(--line); padding-bottom: 28px; }
.lead h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 10px 0 12px;
}
.lead .visual { margin-bottom: 18px; }
.lead p.dek { font-size: 19px; color: var(--ink-2); margin: 0 0 12px; }
.lead ul { margin: 0 0 12px; padding-left: 20px; }
.lead li { margin-bottom: 6px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 32px 0 6px;
}
.section-title::after { content: ""; flex: 1; height: 2px; background: var(--ink); }

.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.story h2 {
  font-size: 22px;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 6px 0 8px;
}
.story p { margin: 0 0 8px; color: var(--ink-2); font-size: 16px; }
.story p.meta { font-size: 13px; color: var(--muted); margin: 0; }
.story .visual { aspect-ratio: 4 / 3; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding-top: 16px;
}
.card h3 { font-size: 18px; line-height: 1.25; margin: 10px 0 6px; }
.card p { margin: 0; font-size: 15px; color: var(--ink-2); }
.card .visual { aspect-ratio: 3 / 2; }

/* ---------- Colonne latérale ---------- */
.rail > * + * { margin-top: 28px; }
.box {
  border-top: 4px solid var(--ink);
  padding-top: 12px;
}
.box h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.box ol { margin: 0; padding: 0; list-style: none; counter-reset: n; }
.box ol li {
  counter-increment: n;
  display: grid;
  grid-template-columns: 28px 1fr;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}
.box ol li::before {
  content: counter(n);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.1;
}
.box-dark {
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 20px;
}
.box-dark p { color: #c8d6d0; font-size: 15px; margin: 6px 0 14px; }
.box-dark h4 { color: #fff; }
.chiffre { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--accent-light); }

/* ---------- Article ---------- */
.article {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}
.article h1 {
  font-size: clamp(30px, 4.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 10px 0 16px;
}
.byline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  font-size: 14px;
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-soft);
  display: grid; place-items: center;
  font-weight: 800; color: var(--navy);
}
.byline strong { display: block; }
.article .visual { margin-bottom: 8px; }
.caption { font-size: 13px; color: var(--muted); margin: 0 0 24px; }
.article p { margin: 0 0 18px; }
.article p strong:first-child { font-weight: 800; }
.article ul { margin: 0 0 18px; padding-left: 22px; }
.article li { margin-bottom: 8px; }
.callout {
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
  padding: 16px 18px;
  margin: 24px 0;
  border-radius: 0 4px 4px 0;
}
.callout p:last-child { margin-bottom: 0; }
.go-deeper {
  border-top: 4px solid var(--ink);
  margin-top: 36px;
  padding-top: 14px;
}
.go-deeper a { color: var(--accent-2); font-weight: 700; }
.readtime { font-size: 13px; color: var(--muted); margin-bottom: 4px; }

/* ---------- Pied de page ---------- */
.footer {
  background: var(--navy);
  color: #b8c9c2;
  font-size: 14px;
  padding: 36px 0;
}
.footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.footer .brand-name { color: #fff; font-size: 20px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 18px; }
.footer a { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .home { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .masthead-meta { display: none; }
  .story { grid-template-columns: 1fr 110px; gap: 14px; }
  .story h2 { font-size: 18px; }
  .story p { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Figures (articles) ---------- */
.figure {
  margin: 28px 0;
  padding: 24px;
  background: var(--bg-soft);
  border-top: 4px solid var(--navy);
  border-radius: 0 0 4px 4px;
}
.figure h3 { margin: 0 0 4px; font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; }
.figure .fig-dek { margin: 0 0 18px; font-size: 14px; color: var(--ink-2); }
.figure .fig-source { margin: 16px 0 0; font-size: 12px; color: var(--muted); }

.seuils { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; background: var(--line); }
.seuil { background: #fff; padding: 16px 14px; }
.seuil .big { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; color: var(--navy); }
.seuil .big sup { font-size: 0.55em; }
.seuil .lbl { font-size: 13px; color: var(--ink-2); margin-top: 6px; line-height: 1.35; }
.ou { text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin-top: 10px; }

.usage { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; }
.usage th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--ink); }
.usage td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.4; }
.usage tr:last-child td { border-bottom: 0; }
.usage td:first-child { font-weight: 600; }
.statut { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; font-weight: 700; padding: 3px 9px 3px 7px; border-radius: 999px; border: 1px solid; }
.statut .ic { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; color: #fff; font-weight: 800; }
.s-libre  { color: #1f5a39; background: #e8f3ec; border-color: #b9dcc6; } .s-libre .ic  { background: #2f7d4f; }
.s-auto   { color: #6b4c17; background: #f7efe0; border-color: #e3cfa6; } .s-auto .ic   { background: #9a6d22; }
.s-autor  { color: #8a3a12; background: #fbeadf; border-color: #efc2a5; } .s-autor .ic  { background: #c0571f; }
.s-interd { color: #8a1f22; background: #f8e3e3; border-color: #e7b3b4; } .s-interd .ic { background: #a3262a; }

.article sup { font-size: 0.68em; line-height: 0; }
.article sup a { color: var(--accent-2); font-weight: 700; }
.sources { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 13px; color: var(--ink-2); }
.sources h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.sources ol { padding-left: 20px; margin: 0; }
.sources li { margin-bottom: 6px; overflow-wrap: anywhere; }
.sources a { color: var(--accent-2); }
.analyse { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

@media (max-width: 620px) {
  .figure { padding: 18px 14px; margin-left: -16px; margin-right: -16px; border-radius: 0; }
  .seuils { grid-template-columns: 1fr; }
  .seuil .big { font-size: 26px; }
  .usage thead { display: none; }
  .usage, .usage tbody, .usage tr, .usage td { display: block; width: 100%; }
  .usage tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .usage td { border: 0; padding: 4px 12px; }
}

/* ---------- Auteur ---------- */
.byline a.byline-link {
  display: flex;
  align-items: center;
  gap: 12px;
}
.byline a.byline-link:hover { text-decoration: none; }
.byline a.byline-link:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.byline a.byline-link .meta { display: block; }
.meta a { font-weight: 600; }
