/* ==========================================================================
   Accueil : le récit au scroll
   ========================================================================== */

:root {
  --qn-w: 1.6rem;
  --node: 46px;
  --ocean: #8eaecb;
  --land: #f1f0ea;
  --water: rgba(46, 96, 140, 0.13);
}

/* ---------- Héros ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  padding: 0 var(--gutter);
}
.hero-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  column-gap: var(--s-5);
  min-height: 56px;
  padding-right: 52px;
  font-size: var(--step--1);
  font-weight: 520;
}
/* le contexte : une thèse, volontairement vulgarisée (discret, jamais collant) */
.hero-ctx {
  order: 2;
  flex: 1 1 100%;
  max-width: 34rem;
  margin-right: -52px;
  padding-bottom: var(--s-2);
  color: var(--ink-2);
  font-weight: 480;
  line-height: 1.35;
  text-wrap: balance;
}
.hero-top .lnk {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background-position: 0 72%, 0 72%;
  padding-bottom: 0;
}
.hero-main {
  align-self: center;
  max-width: 76rem;
  padding: 2vh 0 4vh;
}
.h1 {
  font-size: var(--step-4);
  line-height: 1.03;
  letter-spacing: -0.032em;
  font-weight: 640;
  max-width: 12.4em;
}
.concept {
  margin-top: var(--s-6);
  max-width: 33rem;
  font-size: var(--step-1);
  line-height: 1.42;
  letter-spacing: -0.006em;
}
.start {
  margin-top: var(--s-6);
}
/* légende des molécules du ciel : laquelle est laquelle, et ce qu'on en fait */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  margin-top: var(--s-5);
  font-size: 0.8125rem;
  font-weight: 540;
  line-height: 1.3;
  color: var(--ink-2);
}
.legend li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.lg-art {
  flex: none;
  display: inline-flex;
}
.lg-art svg {
  display: block;
  overflow: visible;
}
.start:hover .ic {
  transform: translateY(3px);
}

/* lignes du H1 (animation d'entrée, posée par home.js) */
.h1 .ln {
  display: block;
  overflow: clip;
  overflow-clip-margin: 0.12em;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}
.h1 .ln > span {
  display: inline-block;
  will-change: transform;
}
.js.motion:not(.ready) .h1,
.js.motion:not(.ready) .concept,
.js.motion:not(.ready) .start,
.js.motion:not(.ready) .legend {
  visibility: hidden;
}

/* ---------- La chaîne : héros, puis barre de progression collante ---------- */
.chain-slot {
  height: 132px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter);
}
.chain {
  padding-bottom: 18px;
}
.chain-list {
  display: flex;
  align-items: flex-start;
  max-width: 76rem;
}
.link {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  justify-content: center;
  --fill: 0;
}
.link:first-child {
  justify-content: flex-start;
}
.link:last-child {
  justify-content: flex-end;
}
.link a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 44px;
  text-decoration: none;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.link:first-child a {
  align-items: flex-start;
}
.link:last-child a {
  align-items: flex-end;
}
.link:first-child .lbl {
  text-align: left;
}
.link:last-child .lbl {
  text-align: right;
}
/* le bâtonnet entre deux maillons, et son remplissage (progression) */
.link + .link::before,
.link + .link::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(var(--node) / 2 - 3px);
  height: 6px;
  border-radius: 3px;
  left: var(--bond-l, 0);
  right: var(--bond-r, 0);
}
.link + .link::before {
  background: rgba(22, 23, 26, 0.22);
}
.link + .link::after {
  background: var(--ink);
  transform-origin: left center;
  transform: scaleX(var(--fill));
}
.node {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--node);
  height: var(--node);
  border-radius: 50%;
  background: rgba(243, 243, 239, 0.72);
  box-shadow: inset 0 0 0 1.5px rgba(22, 23, 26, 0.4);
  color: var(--ink);
  transition: background-color 0.45s var(--ease-out), color 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), transform var(--t-press) ease-out;
}
.node::after {
  /* le petit reflet du plastique */
  content: "";
  position: absolute;
  top: 17%;
  left: 21%;
  width: 22%;
  height: 16%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: rotate(-30deg);
  opacity: 0.6;
}
.node .ic {
  width: 24px;
  height: 24px;
}
.link.is-lit .node {
  background: var(--atom-c);
  color: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--atom-c);
}
.link.is-lit .node::after {
  background: rgba(255, 255, 255, 0.34);
  opacity: 1;
}
.link.is-now .node {
  box-shadow: inset 0 0 0 1.5px var(--atom-c), 0 0 0 5px rgba(22, 23, 26, 0.16);
}
.link a:active .node {
  transform: scale(0.97);
}
.lbl {
  max-width: 9.5em;
  font-size: 0.8125rem;
  font-stretch: 84%;
  font-weight: 560;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}
.link.is-now .lbl {
  font-weight: 680;
}

/* barre collante, une fois le héros passé */
.chain.is-docked {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: var(--bar-h);
  padding: 0 calc(max(var(--gutter), 12px) + 52px) 0 max(var(--gutter), 12px);
  display: flex;
  align-items: center;
  /* le même ciel que derrière, à la hauteur de la barre (couleurs posées par home.js) ; la couleur
     pleine dessous est celle que Safari (iOS 26) lit pour teinter sa barre d'état */
  background: linear-gradient(180deg, var(--bg-a), var(--bg-b));
  background-color: var(--bg-a);
  box-shadow: 0 1px 0 rgba(22, 23, 26, 0.12);
  animation: dock-in 0.6s var(--ease-out) both;
  --node: 36px;
}
.chain.is-docked .chain-list {
  width: 100%;
  max-width: 34rem;
}
.chain.is-docked .lbl {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.chain.is-docked .node .ic {
  width: 20px;
  height: 20px;
}
.chain.is-docked .link a {
  min-height: 44px;
  justify-content: center;
  align-items: center;
}
@keyframes dock-in {
  from {
    opacity: 0;
    transform: translateY(-70%);
  }
}

/* ---------- Questions : socle commun ---------- */
.q {
  max-width: 82rem;
  margin: 0 auto;
  padding: var(--s-9) var(--gutter);
}
.q-head {
  max-width: 46rem;
}
h2 {
  font-size: var(--step-3);
  line-height: 1.06;
  letter-spacing: -0.024em;
}
.q {
  padding-left: calc(var(--gutter) + var(--qn-w));
}
/* .step : même retrait, posé dans ses raccourcis padding plus bas (scène du carbone) */
.q h2,
.step h2 {
  margin-left: calc(-1 * var(--qn-w));
  padding-left: var(--qn-w);
  /* - 0.168em : l'espace qui suit le numéro (Radio Canada Big). Sans lui, la 1re ligne
     du titre commence une espace plus à droite que les lignes suivantes. */
  text-indent: calc(-1 * var(--qn-w) - 0.168em);
}
.qn {
  display: inline-block;
  width: var(--qn-w);
  text-indent: 0;
  font-family: var(--f-text);
  font-size: max(0.4em, 0.6875rem);
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: 0.62em;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.key {
  margin-top: var(--s-4);
  max-width: 27em;
  font-family: var(--f-big);
  font-size: var(--step-2);
  font-weight: 460;
  line-height: 1.2;
  letter-spacing: -0.014em;
  text-wrap: balance;
}
.key strong {
  font-weight: 660;
}
.big {
  font-family: var(--f-big);
  font-size: var(--step-big);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.045em;
}

/* ---------- Q1 : la course ---------- */
.race {
  position: relative;
  margin-top: var(--s-7);
  max-width: 64rem;
}
.race-plot svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.race-lanes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.lane {
  position: absolute;
  left: 0;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: var(--step--1);
  line-height: 1.25;
}
.lane-co2 {
  top: var(--lane-co2, 0%);
}
.lane-ch4 {
  top: var(--lane-ch4, 50%);
}
.gas {
  font-family: var(--f-big);
  font-size: var(--step-1);
  font-weight: 680;
  letter-spacing: -0.01em;
}
.lane {
  right: 0;
}
.lane-t {
  color: var(--ink-2);
  font-weight: 520;
}
.lane-end {
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
}
.lane-co2 .lane-end {
  margin-left: auto;
}
.lane-ch4 .lane-end {
  position: absolute;
  left: var(--ch4-end-x, 20%);
  top: var(--ch4-end-dy, 40px);
  transform: translateY(-50%);
}
.race-plot .axis-t {
  font: 500 var(--svg-fs, 15px)/1 var(--f-text);
  fill: var(--ink-2);
}
.race-plot .axis-t.em {
  font-weight: 700;
  fill: var(--ink);
}

/* ---------- 150× ---------- */
.m150 {
  display: grid;
  gap: var(--s-6);
  max-width: 82rem;
  margin: 0 auto;
  padding: var(--s-8) var(--gutter) var(--s-9);
}
.m150 .big {
  font-variant-numeric: proportional-nums;
}
.m150-txt {
  max-width: 24em;
  font-family: var(--f-big);
  font-size: var(--step-2);
  font-weight: 460;
  line-height: 1.2;
  letter-spacing: -0.014em;
}
.m150-txt strong {
  font-weight: 680;
}
.grid150 {
  display: flex;
  align-items: flex-end;
  gap: var(--s-6);
  margin-top: var(--s-6);
}
.g-cell {
  display: grid;
  gap: var(--s-3);
  justify-items: start;
}
.g-l {
  font-size: var(--step--1);
  font-weight: 560;
  color: var(--ink-2);
}
.g-art svg {
  height: auto;
}
.m150-detail {
  margin-top: var(--s-5);
  max-width: 30rem;
  color: var(--ink-2);
}

/* ---------- La scène du carbone (Q2 à Q5) ---------- */
.scene {
  position: relative;
  max-width: 88rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.scene-art {
  position: sticky;
  top: var(--bar-h);
  z-index: 2;
  margin: 0 calc(-1 * var(--gutter));
  padding: 10px var(--gutter) 6px;
}
/* même dégradé que le ciel derrière, prolongé de 28 px en fondu : le texte passe dessous
   sans couture. Un calque sans enfant, dont home.js règle les deux couleurs. */
.art-bg {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  bottom: -28px;
  background: linear-gradient(180deg, var(--bg-a) 0, var(--bg-b) var(--bg-stop, 88%), transparent 100%);
  pointer-events: none;
}
.stage-box {
  position: relative;
  /* --sv : 1svh figé par home.js (la barre d'adresse ne fait pas varier la boîte) */
  width: min(100%, calc(38 * var(--sv, 1svh)));
  aspect-ratio: 1;
  margin: 0 auto;
}
.stage-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
/* une seule ligne sous le dessin, pendant le filtre (ce qui entre, ce qui sort) ; les listes
   des questions vivent dans le texte, avec leur question */
.stage-key {
  position: absolute;
  left: 50%;
  top: 100%;
  width: calc(100vw - 2 * var(--gutter));
  max-width: 30rem;
  transform: translateX(-50%);
  padding-top: 8px;
  text-align: center;
  font-size: 0.8125rem;
  font-stretch: 88%;
  font-weight: 540;
  line-height: 1.3;
  text-wrap: balance;
  color: var(--ink);
}
.stage {
  padding-bottom: 2.75rem;
}
.js .stage-key {
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}
.js .stage-key.is-on {
  opacity: 1;
}

/* listes des questions 2 à 5 (dans le texte ou dans le repli) */
.facts {
  display: grid;
  gap: 0.4rem;
  max-width: 30rem;
}
.step > .facts {
  margin-top: var(--s-4);
}
.fact {
  line-height: 1.35;
}
.fact-n {
  display: inline-block;
  min-width: 1.7em;
  margin-right: 0.15em;
  font-family: var(--f-big);
  font-size: 1.3em;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}
.facts-ok .fact::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 0.55em;
  border-radius: 50%;
  background: var(--atom-c);
  vertical-align: 0.02em;
}
.facts-src .ic {
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 0.45em;
  vertical-align: -0.35em;
}
.step-p {
  margin-top: var(--s-4);
  max-width: 34rem;
}

.scene-steps {
  position: relative;
  z-index: 1;
  padding-bottom: 45svh;
}
.step {
  min-height: 64svh;
  padding: 10svh 0 6svh var(--qn-w);
}
/* deuxième temps d'une question (Q5 : le filtre, puis ce qu'il couvre) : un écart FIXE avant lui.
   Pas de marge automatique : un repli ouvert dessous la mangerait et ferait remonter le texte au
   lieu de s'ouvrir vers le bas. Court sur petit écran (un grand vide dans le texte gêne). */
.step-2 .key-2 {
  padding-top: 30svh;
}
/* Q3 : tout le texte se lit devant le four (chauffe, carbone qui reste, explication) ; le zoom
   dans le biochar se fait APRÈS, dans l'écart avant Q4, plus long sur petit écran */
.step-out .key-2 {
  margin-top: var(--s-4);
}
.step-out {
  padding-bottom: 26svh;
}
.step h2 {
  font-size: var(--step-2);
  line-height: 1.1;
}
.step .key {
  font-size: var(--step-1);
  line-height: 1.25;
}

.plain li + li {
  margin-top: 0.25em;
}

/* ---------- 0,004 % : zoom arrière ---------- */
.zoom {
  position: relative;
}
.zoom-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}
.map {
  position: absolute;
  inset: 0;
}
.map-cv {
  display: block;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 13%, #000 87%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 13%, #000 87%, transparent 100%);
}
.map-place,
.map-scale {
  position: absolute;
  left: 0;
  top: 0;
  font-size: var(--step--1);
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
}
.map-place {
  color: var(--ink-2);
  font-stretch: 90%;
  letter-spacing: 0.01em;
}
.map-scale {
  display: grid;
  justify-items: center;
  gap: 4px;
}
.map-scale-bar {
  display: block;
  width: var(--scale-w, 60px);
  height: 8px;
  border: 1.75px solid var(--ink);
  border-top: 0;
}
.map-cap {
  position: absolute;
  right: var(--gutter);
  bottom: max(18px, env(safe-area-inset-bottom));
  font-size: var(--step--1);
  font-weight: 520;
  color: var(--ink-2);
}
.zoom-texts {
  position: relative;
  margin-top: -100svh;
}
.zt {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 112svh;
  padding: 18svh var(--gutter) 16svh;
}
.zt p {
  max-width: 24em;
  font-family: var(--f-big);
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.014em;
}
.zt-a {
  justify-content: flex-end;
}
.zt-b {
  justify-content: center;
}
.zt-b .big {
  max-width: none;
  font-size: var(--step-big);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.045em;
}
.zt-b .zt-sub {
  margin-top: var(--s-5);
  max-width: 22em;
}
.zt-c {
  min-height: 90svh;
  justify-content: center;
}
.zt-c p {
  font-size: var(--step-3);
  line-height: 1.08;
  letter-spacing: -0.022em;
  font-weight: 620;
  max-width: 16em;
}
/* le fond de la boîte de la carte ne sert que sur petit écran (voir dessous) */
.zoom-stage .art-bg {
  display: none;
}
/* Petit écran : la carte dans une boîte collée sous la barre, entière ; le texte défile dessous et
   passe sous la boîte, jamais sur la carte (même principe que la scène du carbone). */
@media (max-width: 899px) {
  .motion .zoom-stage {
    top: var(--bar-h);
    z-index: 2;
    height: calc(46 * var(--sv, 1svh));
    overflow: visible;
  }
  .motion .zoom-stage .art-bg {
    display: block;
  }
  .motion .map {
    overflow: hidden;
  }
  .motion .zoom-texts {
    margin-top: 0;
  }
  .motion .zt {
    min-height: calc(72 * var(--sv, 1svh));
    padding: 6svh var(--gutter);
    justify-content: center;
  }
}
/* hauteur d'écran stable, lue par home.js (100svh ne suit pas la barre d'adresse) */
.vh-probe {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 100svh;
  visibility: hidden;
  pointer-events: none;
}

/* ---------- Q6 : le chaînon manquant ---------- */
.links6 {
  margin-top: var(--s-7);
}
.chain6 {
  display: grid;
  gap: var(--s-5);
  max-width: 40rem;
}
.l6 {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: var(--s-4);
  align-items: start;
}
.l6-node {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--atom-c);
}
.l6-node::after {
  content: "";
  position: absolute;
  top: 18%;
  left: 22%;
  width: 26%;
  height: 18%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  transform: rotate(-30deg);
}
.l6 + .l6::before {
  content: "";
  position: absolute;
  left: 12px;
  width: 6px;
  bottom: calc(100% - 15px);
  height: calc(var(--l6-gap, 100%) + var(--s-5));
  border-radius: 3px;
  background: var(--ink);
}
.l6.missing .l6-node {
  background: transparent;
  border: 2.25px dashed var(--ink);
}
.l6.missing .l6-node::after {
  display: none;
}
.l6.missing::before,
.l6.missing + .l6::before {
  background: repeating-linear-gradient(180deg, var(--ink) 0 7px, transparent 7px 13px);
}
.l6-t {
  padding-top: 2px;
  font-weight: 480;
}
.l6.missing .l6-t {
  font-weight: 650;
}
.analogy {
  margin-top: var(--s-7);
  max-width: 34rem;
  padding-left: 0;
  font-size: var(--step-1);
  line-height: 1.42;
}
.reasons {
  display: grid;
  gap: var(--s-4);
}
.reasons li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--s-3);
  align-items: start;
}
.reasons .ic {
  margin-top: 2px;
}

/* ---------- Q7 : la balance ---------- */
.money {
  display: grid;
  gap: var(--s-6);
  margin-top: var(--s-7);
  max-width: 64rem;
}
.scale-art {
  max-width: 34rem;
}
.scale-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.sc-post,
.sc-foot,
.sc-beam {
  fill: none;
  stroke: var(--ink);
  stroke-width: 7;
  stroke-linecap: round;
}
.sc-beam {
  stroke-width: 8;
}
.sc-str {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.7;
}
.sc-pan {
  fill: var(--ink);
}
.sc-pivot {
  fill: var(--atom-c);
}
.sc-pivot-hi {
  fill: rgba(255, 255, 255, 0.4);
}
.pans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
  margin: var(--s-4) 0 0;
}
.pan {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
}
.pan-rev {
  text-align: right;
}
.pan dt {
  font-size: var(--step--1);
  color: var(--ink-2);
  font-weight: 520;
  line-height: 1.3;
}
.pan dd {
  margin: 0;
  font-family: var(--f-big);
  font-size: var(--step-2);
  font-weight: 650;
  letter-spacing: -0.02em;
}
.net {
  align-self: center;
}
.net-n {
  font-family: var(--f-big);
  font-size: clamp(3.6rem, 1.6rem + 7vw, 7.5rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.net-l {
  margin-top: var(--s-2);
  font-weight: 560;
  color: var(--ink-2);
}

/* ---------- Q8 : deux zones ---------- */
.zones {
  display: grid;
  gap: var(--s-7);
  margin-top: var(--s-7);
  max-width: 64rem;
}
.zone {
  display: grid;
  gap: var(--s-4);
  align-content: start;
}
.zone-art {
  width: 100%;
  max-width: 300px;
  height: auto;
  overflow: visible;
}
.zone p {
  max-width: 28rem;
}
.zs-water {
  fill: var(--water);
}
.zs-wave {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.55;
}
.k-stipe {
  fill: none;
  stroke: var(--kelp);
  stroke-width: 5;
  stroke-linecap: round;
}
.k-blade {
  fill: var(--kelp-2);
  stroke: var(--kelp);
  stroke-width: 1.75;
  stroke-linejoin: round;
}
.zb-box {
  fill: rgba(243, 243, 239, 0.5);
  stroke: var(--ink);
  stroke-width: 3;
}
.zb-lid {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.zb-bact rect {
  fill: var(--bact);
  stroke: var(--bact-2);
  stroke-width: 1.75;
}
.zb-hi rect {
  fill: rgba(255, 255, 255, 0.55);
}

/* ---------- La courbe 2025-2055 ---------- */
.tl {
  max-width: 82rem;
  margin: 0 auto;
  padding: var(--s-9) var(--gutter);
}
.tl h2 {
  display: flex;
  align-items: flex-start;
  gap: 0.35em;
  max-width: 20em;
}
.tl-ic {
  width: 0.9em;
  height: 0.9em;
  margin-top: 0.08em;
  stroke-width: 1.6;
}
.curve {
  position: relative;
  margin-top: var(--s-7);
  max-width: 72rem;
}
.curve-ax {
  margin-bottom: var(--s-3);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-2);
}
.curve-plot svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.curve-plot .grid {
  stroke: rgba(22, 23, 26, 0.16);
  stroke-width: 1;
}
.curve-plot .tick {
  font: 500 var(--svg-fs, 14px)/1 var(--f-text);
  fill: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.curve-plot .ax-t {
  font: 600 14px/1 var(--f-text);
  fill: var(--ink-2);
}
.curve-plot .line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.curve-plot .area {
  fill: rgba(22, 23, 26, 0.07);
}
.curve-plot .pt {
  fill: var(--atom-c);
  /* anneau de la couleur du ciel à cet endroit du récit (presque dégagé) */
  stroke: #bfd8ec;
  stroke-width: 3;
}
.curve-pts li {
  position: absolute;
  display: grid;
  gap: 1px;
  font-size: var(--step--1);
  line-height: 1.2;
  white-space: nowrap;
}
.curve-pts .yr {
  font-weight: 700;
}
.curve-pts .cl {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  font-weight: 520;
  color: var(--ink-2);
}
.ic-ok {
  width: 1.1em;
  height: 1.1em;
  stroke-width: 2.2;
}
.curve.is-list .curve-pts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  margin-top: var(--s-4);
}
.curve.is-list .curve-pts li {
  position: static;
  white-space: normal;
}
html:not(.js) .curve-pts {
  position: static;
}
html:not(.js) .curve-pts li {
  position: static;
}
.tl-ctx {
  display: grid;
  gap: var(--s-4);
  margin-top: var(--s-8);
  max-width: 64rem;
}
.tl-big {
  font-family: var(--f-big);
  font-size: var(--step-3);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}
.tl-big strong {
  display: block;
  font-size: clamp(4rem, 1.4rem + 10vw, 10rem);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.045em;
}
.tl-a,
.tl-b {
  max-width: 32rem;
  font-size: var(--step-1);
  line-height: 1.4;
}
.tl-c {
  max-width: 30rem;
  color: var(--ink-2);
}

/* ---------- Q9 : les risques ---------- */
.risks {
  display: grid;
  margin-top: var(--s-7);
  max-width: 50rem;
  border-bottom: 1px solid var(--hair);
}
.risk {
  display: grid;
  gap: var(--s-2) var(--s-5);
  padding: var(--s-5) 0;
  border-top: 1px solid var(--hair);
}
/* ---------- Q10 : le thermomètre ---------- */
.thermo {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "art n" "art l" "more more";
  gap: var(--s-2) var(--s-5);
  align-items: center;
  margin-top: var(--s-7);
  max-width: 56rem;
}
.thermo-read {
  display: contents;
}
.thermo-art {
  grid-area: art;
}
.thermo-n {
  grid-area: n;
  align-self: end;
}
.thermo-l {
  grid-area: l;
  align-self: start;
}
.thermo-more {
  grid-area: more;
}
.thermo-art svg {
  width: clamp(140px, 30vw, 250px);
  height: auto;
  overflow: visible;
}
.thermo-n {
  font-family: var(--f-big);
  font-size: clamp(3.6rem, 1.4rem + 8vw, 9rem);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.045em;
  white-space: nowrap;
}
.thermo-l {
  margin-top: var(--s-3);
  max-width: 18em;
  font-weight: 560;
}
.thermo-more {
  display: grid;
  gap: 0;
  margin: var(--s-5) 0 0;
  max-width: 22rem;
  border-top: 1px solid var(--hair);
}
.thermo-more div {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  gap: var(--s-3);
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--hair);
}
.thermo-more dt {
  font-family: var(--f-big);
  font-size: var(--step-1);
  font-weight: 700;
}
.thermo-more dd {
  margin: 0;
  color: var(--ink-2);
  font-weight: 520;
}
.thermo-art .t-glass {
  fill: rgba(243, 243, 239, 0.55);
  stroke: var(--ink);
  stroke-width: 3;
}
.thermo-art .t-fill {
  fill: var(--ink);
}
.thermo-art .t-cut {
  fill: var(--ink);
}
.thermo-art .t-ghost {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-dasharray: 5 5;
  opacity: 0.6;
}
.thermo-art .t-link {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-dasharray: 2 6;
  stroke-linecap: round;
}
.thermo-art .t-tick {
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
}
.thermo-art .t-lab {
  font: 600 18px/1 var(--f-text);
  fill: var(--ink-2);
}
/* Q8 : les deux phrases qui expliquent la phrase-clé ; Q10 : pourquoi « juste un bout » */
.q-lead {
  margin-top: var(--s-4);
  max-width: 34rem;
  font-size: var(--step-1);
  line-height: 1.42;
}
.q-more {
  margin-top: var(--s-7);
  max-width: var(--measure);
}
.q-more + .honest {
  margin-top: var(--s-6);
}
.honest {
  margin-top: var(--s-7);
  max-width: 40rem;
  padding: var(--s-5) var(--s-5) var(--s-5) var(--s-5);
  border-radius: 24px;
  box-shadow: inset 0 0 0 1.75px var(--ink);
  background: rgba(243, 243, 239, 0.32);
  font-size: var(--step-1);
  line-height: 1.42;
}

/* ---------- Fin ---------- */
.end {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  max-width: 82rem;
  margin: 0 auto;
  padding: var(--s-9) var(--gutter) var(--s-8);
}
.end-big {
  font-size: clamp(3rem, 0.8rem + 9vw, 9.5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.045em;
}
.end-big span {
  display: block;
}
.end-txt {
  margin-top: var(--s-7);
  max-width: 36rem;
  font-size: var(--step-1);
  line-height: 1.42;
}
.end-kick {
  margin-top: var(--s-5);
  max-width: 22em;
  font-family: var(--f-big);
  font-size: var(--step-2);
  font-weight: 560;
  line-height: 1.15;
  letter-spacing: -0.016em;
}
.cta {
  margin-top: var(--s-7);
}
.btn-lg {
  min-height: 60px;
  padding: 1rem 1.6rem 1rem 1.9rem;
  font-size: var(--step-1);
}
.btn-lg:hover .ic {
  transform: translateX(4px);
}
.cta-sub {
  margin-top: var(--s-3);
  max-width: 30rem;
  font-size: var(--step--1);
  color: var(--ink-2);
  font-weight: 500;
}

/* ---------- Pause des molécules ---------- */
.pause {
  position: fixed;
  z-index: 30;
  top: 6px;
  right: max(10px, env(safe-area-inset-right));
}
.pause .ic-play,
.pause[aria-pressed="true"] .ic-pause {
  display: none;
}
.pause[aria-pressed="true"] .ic-play {
  display: block;
}

/* ==========================================================================
   Écrans plus larges
   ========================================================================== */
@media (min-width: 560px) {
  .grid150 {
    gap: var(--s-7);
  }
}

@media (min-width: 720px) {
  :root {
    --node: 52px;
  }
  .hero-top {
    flex-wrap: nowrap;
  }
  .hero-ctx {
    order: 0;
    flex: 0 1 auto;
    margin-right: auto;
    padding-bottom: 0;
  }
  .lbl {
    font-size: 0.9375rem;
    max-width: 11em;
  }
  .chain-slot {
    height: 148px;
  }
  .node .ic {
    width: 26px;
    height: 26px;
  }
  .zones {
    grid-template-columns: 1fr 1fr;
  }
  .risk {
    grid-template-columns: 9.5rem 1fr;
  }
  .grav {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.3rem;
  }
  .tl-ctx {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--s-8);
    align-items: end;
  }
  .tl-big {
    grid-row: span 3;
  }
  .money {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    column-gap: var(--s-8);
  }
  .thermo {
    grid-template-areas: none;
    column-gap: var(--s-6);
  }
  .thermo-read {
    display: block;
  }
  .thermo-art,
  .thermo-n,
  .thermo-l,
  .thermo-more {
    grid-area: auto;
  }
}

@media (min-width: 900px) {
  :root {
    --qn-w: 2.6rem;
  }
  .m150 {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--s-8);
    align-items: center;
  }
  .chain.is-docked .chain-list {
    max-width: 52rem;
  }
  .chain.is-docked {
    --node: 34px;
  }
  .chain.is-docked .link a {
    flex-direction: row;
    gap: 8px;
  }
  .chain.is-docked .lbl {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    max-width: none;
    font-size: 0.8125rem;
    white-space: nowrap;
  }
  .chain.is-docked .link {
    flex: 0 1 auto;
  }
  .chain.is-docked .chain-list {
    gap: 30px;
    justify-content: flex-start;
  }
  .chain.is-docked .link + .link::before,
  .chain.is-docked .link + .link::after {
    left: -24px;
    right: auto;
    width: 18px;
    top: calc(var(--node) / 2 - 2.5px);
    height: 5px;
  }

  /* scène : texte à gauche, image collante à droite */
  .scene {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    column-gap: var(--s-8);
  }
  .scene-art {
    grid-column: 2;
    grid-row: 1;
    height: calc(100svh - var(--bar-h));
    margin: 0;
    padding: 0;
    background: none;
    display: grid;
    place-items: center;
  }
  .scene-art .art-bg {
    display: none;
  }
  .stage {
    width: 100%;
  }
  .stage {
    padding-bottom: 4.6rem;
  }
  .stage-box {
    width: min(100%, calc(100svh - var(--bar-h) - 10rem));
  }
  .stage-key {
    width: 100%;
    max-width: 34rem;
    padding-top: 16px;
    font-size: 0.9375rem;
  }

  .scene-steps {
    grid-column: 1;
    grid-row: 1;
  }
  .step {
    min-height: 100svh;
    padding: 30svh 0 20svh var(--qn-w);
  }
  .step-2 .key-2 {
    padding-top: 66svh;
  }
  .step h2 {
    font-size: var(--step-3);
  }
  .step .key {
    font-size: var(--step-2);
  }

  /* Q6 : la chaîne à gauche, le reste à droite */
  .q6 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--s-8);
    align-items: start;
  }
  .q6 .q-head {
    grid-column: 2;
    grid-row: 1;
  }
  .q6 .links6 {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-top: 0.4rem;
  }
  .q6 .analogy {
    grid-column: 2;
  }
  .q6 .fold {
    grid-column: 1 / -1;
    max-width: none;
  }
  .q6 .fold-body > p {
    max-width: 46rem;
  }
  .q6 .reasons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--s-7);
  }

  /* Q9 : titre à gauche, liste à droite */
  .q9 {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    column-gap: var(--s-8);
    align-items: start;
  }
  .q9 .q-head {
    position: sticky;
    top: calc(var(--bar-h) + 32px);
  }
  .q9 .risks {
    margin-top: 0;
  }
}

@media (min-width: 1200px) {
  .hero-main {
    padding-top: 0;
  }
}

/* ---------- Sans JS : tout reste lisible ---------- */
html:not(.js) .scene-art {
  position: static;
}
html:not(.js) .stage-svg {
  display: none;
}
html:not(.js) .stage-box {
  aspect-ratio: auto;
}
html:not(.js) .stage-key {
  display: none;
}
html:not(.js) .zoom-stage {
  display: none;
}
html:not(.js) .zoom-texts {
  margin-top: 0;
}

/* ---------- Mouvement réduit : vignettes fixes ---------- */
@media (prefers-reduced-motion: reduce) {
  .chain.is-docked,
  .art-bg {
    transition: --bg-a 1.2s ease, --bg-b 1.2s ease;
  }
  /* le fond de la page suit le ciel par paliers, au même rythme que ses calques */
  html,
  body {
    transition: background-color 1.2s ease;
  }
}
.rm .scene-art {
  display: none;
}
.rm .step,
.rm .step-2 {
  min-height: 0;
  padding: var(--s-7) 0 var(--s-7) var(--qn-w);
}
.rm .step-2 .key-2 {
  padding-top: var(--s-4);
}
.vignette {
  margin-top: var(--s-5);
  max-width: 26rem;
}
.vignette .stage-box {
  width: 100%;
}
.vignette .stage-key {
  position: static;
  opacity: 1;
  transform: none;
  width: auto;
  max-width: none;
  text-align: left;
  padding-top: var(--s-3);
}
.rm .zoom-stage {
  position: relative;
  height: auto;
}
.rm .zoom {
  height: auto;
}
.rm .zoom-texts {
  margin-top: 0;
}
.rm .zt {
  min-height: 0;
  padding: var(--s-7) var(--gutter);
}
.rm .map {
  position: relative;
  height: 70svh;
}

/* ---------- Le kit plat (atomes, liaisons) : voir base.css ---------- */
.g-f {
  fill: rgba(22, 23, 26, 0.17);
}
.g-o {
  fill: var(--kelp);
}

/* scène du carbone */
.sc-wave {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.5;
}
.sc-body {
  fill: rgba(243, 243, 239, 0.62);
  stroke: var(--ink);
  stroke-width: 3.5;
}
.sc-pipe {
  fill: none;
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sc-pipe-thin {
  stroke-width: 3;
}
.sc-pipe-gas {
  stroke-width: 5;
  opacity: 0.85;
}
.sc-loop {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 3 9;
  opacity: 0.75;
}
.sc-arrow {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.75;
}
.sc-flask {
  fill: rgba(243, 243, 239, 0.55);
  stroke: var(--ink);
  stroke-width: 3;
}
.sc-oil,
.sc-drop {
  fill: #6b4a1e;
}
.sc-heat-l {
  fill: none;
  stroke: var(--ember);
  stroke-width: 3;
  stroke-linecap: round;
}
.sc-box {
  fill: rgba(243, 243, 239, 0.4);
  stroke: var(--ink);
  stroke-width: 3.5;
}
.sc-src {
  overflow: visible;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--ink);
}
.b-body {
  fill: var(--bact);
  stroke: var(--bact-2);
  stroke-width: 1.75;
}
.b-hi {
  fill: rgba(255, 255, 255, 0.6);
}
.sc-f {
  font: 700 19px/1 var(--f-big);
  fill: var(--ink);
}
.sc-lattice .bond {
  stroke-width: 3;
}
