/* ==========================================================================
   L’énergie à bord · « Carnet de bord »
   Charte graphique Energy Observer Foundation :
   bleu profond structurant, lime énergisant, cadres arrondis, pictogramme
   filaire en arrière-plan, flèches et soulignement. Pas de dégradé de couleurs
   (seul le fondu de la photo d’accueil est conservé) et pas de grand encadré en
   couleur vive : les couleurs vives restent réservées aux boutons et aux repères.
   ========================================================================== */
/* Typographies. Brown et Akkurat sont remplacées par Figtree et IBM Plex Mono
   tant que les licences webfont ne sont pas disponibles. */
@font-face {
  font-family: "EOF Titres";
  src: url("assets/fonts/figtree-300-normal.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "EOF Titres";
  src: url("assets/fonts/figtree-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "EOF Titres";
  src: url("assets/fonts/figtree-600-normal.woff2") format("woff2");
  font-weight: 500 600;
  font-display: swap;
}

@font-face {
  font-family: "EOF Titres";
  src: url("assets/fonts/figtree-700-normal.woff2") format("woff2");
  font-weight: 700 900;
  font-display: swap;
}

@font-face {
  font-family: "EOF Texte";
  src: url("assets/fonts/lora-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "EOF Texte";
  src: url("assets/fonts/lora-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "EOF Texte";
  src: url("assets/fonts/lora-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "EOF Données";
  src: url("assets/fonts/ibm-plex-mono-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "EOF Données";
  src: url("assets/fonts/ibm-plex-mono-500-normal.woff2") format("woff2");
  font-weight: 500 900;
  font-display: swap;
}

:root {
  /* Couleurs de la charte EOF */
  --deep: #001023;
  --medium: #002e4a;
  --lime: #f1fe53;
  --blue: #0000f5;
  --turquoise: #98f8ec;
  --violet: #9353eb;
  --brick: #dc6d4c;
  --grey: #f0f0f0;
  --white: #fff;
  /* Nuances dérivées */
  --ink: var(--deep);
  --muted: #4d5a66;
  --line: #dfe2e6;
  --line-dark: #ffffff24;
  --brick-soft: #f7e0d9;
  /* Typographies */
  --font-title: "EOF Titres",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-text: "EOF Texte",Georgia,"Times New Roman",serif;
  --font-data: "EOF Données",ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;
  /* Formes */
  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --gutter: 16px;
}

/* Couleur de thème : fond, texte posé dessus */
.g-lime {
  --g: var(--lime);
  --g-ink: var(--deep);
}

.g-brick {
  --g: var(--brick);
  --g-ink: var(--deep);
}

.g-turquoise {
  --g: var(--turquoise);
  --g-ink: var(--deep);
}

.g-violet {
  --g: var(--violet);
  --g-ink: var(--white);
}

.g-blue {
  --g: var(--blue);
  --g-ink: var(--white);
}

.g-medium {
  --g: var(--medium);
  --g-ink: var(--white);
}

/* ---------- Base ---------- */
*,*:before,*:after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--grey);
  font: 17px/1.6 var(--font-title);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: clip;
}

/* Pictogramme décoratif du haut de page : il défile avec la page au lieu de rester
   fixe derrière le contenu. */
html {
  overflow-x: hidden;
}

body:before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 700px;
  height: 477px;
  right: -430px;
  top: -120px;
  background: url("assets/brand/eof-picto-filaire-navy.png") center/contain no-repeat;
  opacity: .5;
  transform: rotate(-8deg);
  pointer-events: none;
}

h1,h2,h3,p {
  margin-top: 0;
}

h1,h2,h3 {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: -.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(38px,10.5vw,68px);
  line-height: 1;
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(24px,6.4vw,32px);
  line-height: 1.1;
}

h3 {
  font-size: 18px;
  line-height: 1.2;
}

p {
  font-family: var(--font-text);
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

button,input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button,a,input,summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none!important;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.hero :focus-visible,.check :focus-visible,.bottom-nav :focus-visible,.quiz-result :focus-visible {
  outline-color: var(--lime);
}

main:focus {
  outline: none;
}

.skip {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 50;
  background: var(--lime);
  color: var(--deep);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.i {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mono {
  font-family: var(--font-data);
}

.muted {
  color: var(--muted);
}

.eyebrow {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.caption {
  font-family: var(--font-data);
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  margin: 14px 0 0;
}

.status {
  font-family: var(--font-data);
  font-size: 15px;
  color: var(--muted);
  margin: 12px 0 0;
  min-height: 1em;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--g,var(--ink));
  flex: none;
}

/* Soulignement de la charte : trait épais sous le mot clé */
.mark {
  background: linear-gradient(transparent 62%,var(--mark,var(--lime)) 62%, var(--mark,var(--lime)) 92%,transparent 92%);
  padding: 0 .06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero .mark,.quiz-result .mark {
  background: linear-gradient(transparent 86%,var(--lime) 86%,var(--lime) 96%,transparent 96%);
}

.mark-light {
  --mark: var(--turquoise);
}

/* Pictogramme EO filaire, en arrière-plan uniquement */
.picto {
  position: absolute;
  pointer-events: none;
  user-select: none;
  max-width: none;
}

/* ---------- En-tête ---------- */
.header {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px var(--gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 124px;
  height: auto;
}

.brand-section {
  padding-left: 12px;
  border-left: 1px solid #00102333;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Choix de la langue */
.lang-toggle {
  flex: none;
  min-width: 48px;
  min-height: 44px;
  padding: 6px 14px;
  border: 1.5px solid #00102326;
  border-radius: 999px;
  background: var(--white);
  font-family: var(--font-data);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .06em;
}

.lang-toggle:hover {
  border-color: var(--deep);
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 4px var(--gutter) 128px;
  min-height: 80vh;
}

/* ---------- Boutons ---------- */
.btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--deep);
  background: var(--white);
  color: var(--deep);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: transform .2s var(--ease),background .2s,color .2s;
}

.btn:active {
  transform: scale(.97);
}

.btn-primary {
  background: var(--deep);
  color: var(--white);
}

.btn-primary .i {
  color: var(--lime);
}

.btn-lime {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--deep);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: #ffffff66;
}

.btn-ghost-dark {
  background: transparent;
  margin-top: 18px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 6px 22px 6px 6px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--deep);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: transform .25s var(--ease);
}

.cta:hover .round-arrow {
  transform: translateX(3px);
}

.cta:active {
  transform: scale(.97);
}

.round-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--deep);
  color: var(--lime);
  transition: transform .25s var(--ease);
}

.cta-dark {
  background: var(--deep);
  color: var(--white);
}

.cta-dark .round-arrow {
  background: var(--lime);
  color: var(--deep);
}

/* ---------- Accueil : hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--r-xl);
  background: var(--deep);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-media {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 300px;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 40%;
  display: block;
  animation: settle 1.6s var(--ease) both;
}

/* Dégradé de la charte : fondu de l’image vers le bleu profond */
.hero-media:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,#00102300 0%,#00102300 45%,#001023b3 78%,var(--deep) 100%);
}

.hero-picto {
  z-index: -1;
  width: 620px;
  left: -190px;
  bottom: -40px;
  opacity: .9;
  animation: draw 2.4s .2s var(--ease) both;
}

.hero-copy {
  padding: 236px 24px 26px;
}

.hero .eyebrow {
  color: var(--lime);
  animation: rise .7s .1s var(--ease) both;
}

.hero h1 {
  max-width: 9.5ch;
  animation: rise .8s .18s var(--ease) both;
}

.hero-lead {
  font-size: 17.5px;
  line-height: 1.55;
  color: #ffffffde;
  max-width: 36ch;
  margin-bottom: 22px;
  animation: rise .8s .28s var(--ease) both;
}

.hero .cta {
  animation: rise .8s .38s var(--ease) both;
}

.hero-meta {
  font-family: var(--font-data);
  font-size: 14px;
  color: #ffffffa6;
  margin: 18px 0 0;
  animation: rise .8s .46s var(--ease) both;
}

/* ---------- Accueil : carnet de progression ---------- */
.progress-card {
  margin: 14px 0 8px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  align-items: center;
  padding: 16px 18px;
  background: var(--white);
  border-radius: var(--r-lg);
}

.progress-count {
  font-family: var(--font-data);
  line-height: 1;
  display: flex;
  align-items: baseline;
}

.progress-count strong {
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -.04em;
}

.progress-count span {
  font-size: 14px;
  color: var(--muted);
}

.progress-label {
  font-family: var(--font-title);
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 8px;
}

.progress-card .text-link {
  grid-column: 1/-1;
  justify-self: start;
  font-size: 15px;
  font-weight: 600;
}

.logbook {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(13,1fr); /* 26 cartes sur deux lignes */
  gap: 3px;
}

.logbook li {
  height: 12px;
  border-radius: 4px;
  background: var(--grey);
  box-shadow: inset 0 0 0 1px #0010231a;
  transition: background .4s;
}

.logbook li.is-done {
  background: var(--g);
  box-shadow: none;
}

/* ---------- Accueil : recherche et filtres ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 38px 0 16px;
}

.section-head h2 {
  margin: 0;
}

.section-note {
  font-family: var(--font-data);
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
  text-align: right;
  margin: 0;
}

.field-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.search-wrap {
  position: relative;
  margin-bottom: 12px;
}

.search-wrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.search {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px 12px 46px;
  border: 1.5px solid transparent;
  border-radius: var(--r-md);
  background: var(--white);
  font-family: var(--font-title);
  font-size: 16px;
}

.search::placeholder {
  color: #6a7580;
}

.search:focus {
  border-color: var(--deep);
  outline: none;
}

.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 14px;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filters button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-height: 42px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1.5px solid #0010231f;
  background: transparent;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 600;
  transition: background .2s,border-color .2s;
}

.filters button[aria-pressed=true] {
  background: var(--deep);
  border-color: var(--deep);
  color: var(--white);
}

/* ---------- Cartes « entrées du carnet » ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}

.themes {
  display: grid;
  gap: 26px;
}

.theme-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.theme-head .dot {
  width: 10px;
  height: 10px;
}

.theme .topic-group {
  display: none;
}

.theme-count {
  margin-left: auto;
  font-family: var(--font-data);
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}

.topic {
  --i: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 218px;
  padding: 16px 15px 14px;
  border-radius: var(--r-lg);
  background: var(--white);
  text-decoration: none;
  overflow: hidden;
  animation: rise .6s calc(var(--i) * 45ms + 80ms) var(--ease) both;
  transition: transform .25s var(--ease),box-shadow .25s;
}

/* Liseré de couleur en bas de carte, repris de la charte */
.topic:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: var(--g);
}

.topic:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -22px #00102366;
}

.topic:active {
  transform: scale(.98);
}

.topic-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.topic-index {
  font-family: var(--font-data);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
}

.topic-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.topic-picto {
  width: 52px;
  height: 52px;
  margin: 14px 0 10px;
  flex: none;
}

.topic-symbol {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 34px;
  line-height: 1;
  margin: 20px 0 14px;
  letter-spacing: -.04em;
}

.topic h3 {
  font-size: 17.5px;
  margin: 0 0 12px;
}

.topic-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--font-data);
  font-size: 14px;
  color: var(--muted);
  padding-bottom: 6px;
}

.badge-done {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ink);
}

.badge-done .i {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.badge-fav {
  color: var(--ink);
}

/* Flèche diagonale dans un carré, outil de la charte */
.corner-arrow {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--g);
  color: var(--g-ink);
  transition: transform .25s var(--ease);
}

.corner-arrow .i {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
}

.topic:hover .corner-arrow {
  transform: translate(2px,2px);
}

/* ---------- Encart quiz ---------- */
/* Encart sobre : fond blanc, l’accent de couleur est porté par le bouton */
.promo {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-top: 26px;
  padding: 26px 22px 22px;
  border-radius: var(--r-xl);
  background: var(--white);
}

.promo-picto {
  z-index: -1;
  width: 440px;
  right: -170px;
  top: -70px;
  opacity: .5;
}

.promo .eyebrow {
  color: var(--muted);
}

.promo h2 {
  max-width: 14ch;
  margin-bottom: 8px;
}

.promo p:not(.eyebrow) {
  margin: 0 0 20px;
  max-width: 30ch;
}

/* ---------- Leçon ---------- */
.lesson {
  max-width: 720px;
  margin: 0 auto;
}

.lesson-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 22px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.fav {
  min-height: 42px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1.5px solid #0010231f;
  background: var(--white);
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 600;
}

.fav[aria-pressed=true] {
  background: var(--deep);
  border-color: var(--deep);
  color: var(--lime);
}

.lesson-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font-family: var(--font-title);
}

.lesson-meta .topic-index {
  display: inline-flex;
  align-items: baseline;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--g);
  color: var(--g-ink);
  font-size: 15px;
}

.lesson-meta .topic-index span {
  opacity: .7;
  font-size: 13px;
}

.lesson-head h1 {
  font-size: clamp(34px,9vw,54px);
  margin-bottom: 22px;
}

/* « À retenir » : même composant que dans le livret */
.takeaway {
  position: relative;
  padding: 20px 20px 20px 24px;
  border-radius: var(--r-lg);
  background: var(--deep);
  color: var(--white);
  overflow: hidden;
}

.takeaway:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--lime);
}

.takeaway .eyebrow {
  color: var(--lime);
  margin-bottom: 8px;
}

.lead {
  font-family: var(--font-title);
  font-size: 19px;
  line-height: 1.4;
  font-weight: 600;
  margin: 0;
}

.panel {
  position: relative;
  margin: 16px 0;
  padding: 22px 20px;
  border-radius: var(--r-lg);
  background: var(--white);
  overflow: hidden;
}

.panel:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: var(--g);
}

.panel-kicker {
  font-family: var(--font-data);
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 6px;
}

.panel h2 {
  font-size: 24px;
  margin-bottom: 16px;
}

/* Curseurs */
.range {
  margin: 14px 0;
}

.range-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 16.5px;
  font-weight: 600;
}

.range-label strong {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 17px;
}

input[type=range] {
  --fill: 50%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 36px;
  background: transparent;
  margin: 0;
}

input[type=range]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 8px;
  background: linear-gradient(90deg,var(--deep) var(--fill),#00102317 var(--fill));
}

input[type=range]::-moz-range-track {
  height: 8px;
  border-radius: 8px;
  background: #00102317;
}

input[type=range]::-moz-range-progress {
  height: 8px;
  border-radius: 8px;
  background: var(--deep);
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--lime);
  border: 3px solid var(--deep);
  box-shadow: 0 4px 12px -4px #00102380;
}

input[type=range]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--lime);
  border: 3px solid var(--deep);
}

input[type=range]:focus-visible {
  outline-offset: 2px;
}

.splitbar {
  display: flex;
  height: 56px;
  border-radius: var(--r-sm);
  overflow: hidden;
  margin: 16px 0 10px;
}

.splitbar span {
  display: grid;
  place-items: center;
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 17px;
  transition: width .25s var(--ease);
  min-width: 0;
}

#useful {
  background: var(--deep);
  color: var(--white);
}

#other {
  background: var(--brick);
  color: var(--deep);
}

.legend {
  display: flex;
  gap: 16px;
  font-family: var(--font-data);
  font-size: 15.5px;
  color: var(--muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.swatch-ink {
  background: var(--deep);
}

.swatch-brick {
  background: var(--brick);
}

.chain-steps {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 22px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.chain-steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  text-align: center;
}

.chain-steps li + li::before {
  content: "×";
  position: absolute;
  left: -17px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-data);
  font-size: 16px;
  color: var(--muted);
}

.chain-steps strong {
  font-family: var(--font-title);
  font-size: 15.5px;
  line-height: 1.2;
}

.chain-rate {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
}

@media (max-width: 359px) {
  .chain-steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .chain-steps li {
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 16px;
  }

  .chain-steps li + li::before {
    left: 50%;
    top: -11px;
    transform: translate(-50%,-50%);
  }
}

.chain-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0 0;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  background: var(--deep);
  color: var(--white);
}

.chain-total span {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
}

.chain-total strong {
  font-family: var(--font-title);
  font-size: 22px;
}

.result-text {
  margin: 12px 0 0;
  font-size: 18px;
}

/* Sélecteurs segmentés */
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: var(--grey);
  margin-bottom: 14px;
  width: fit-content;
  max-width: 100%;
}

.segmented button {
  min-height: 40px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 600;
}

.segmented button[aria-pressed=true] {
  background: var(--deep);
  color: var(--white);
}

.segmented button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

/* Tasse contre piscine */
.versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 10px;
  margin: 8px 0 16px;
}

.vs-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.vs-disc {
  display: block;
  border-radius: 50%;
  background: var(--turquoise);
}

.vs-cup .vs-disc {
  width: 26px;
  height: 26px;
  background: var(--brick);
}

.vs-pool .vs-disc {
  width: 112px;
  height: 112px;
  background: var(--turquoise);
}

.vs-item figcaption {
  display: flex;
  flex-direction: column;
  font-family: var(--font-data);
  font-size: 15px;
  line-height: 1.5;
}

.vs-item strong {
  font-family: var(--font-title);
  font-size: 15px;
}

.vs-or {
  font-family: var(--font-text);
  font-style: italic;
  color: var(--muted);
  padding-bottom: 40px;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 8px;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--grey);
  font-weight: 600;
}

.steps span {
  font-family: var(--font-data);
  font-weight: 500;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--g);
  color: var(--g-ink);
  font-size: 15px;
}

.figure-link {
  display: block;
  border-radius: var(--r-md);
  box-shadow: 0 0 0 1px var(--line);
  overflow: hidden;
}

.figure {
  display: block;
  width: 100%;
  height: auto;
}

/* Animations dessinées dans la page (animations/) */
.anim-stage {
  position: relative;
}

@media (max-width:600px) {
  .panel .anim-stage {
    margin: 0 -20px;
  }
  .panel .anim-stage canvas {
    border-radius: 0;
  }
}

.anim-stage canvas {
  display: block;
  width: 100%;
  aspect-ratio: 5/3;
  border-radius: var(--r-md);
  background: var(--grey);
}

.anim-play {
  position: absolute;
  right: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--deep);
  color: var(--white);
  cursor: pointer;
}

.anim-play svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.anim-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 10px;
  text-align: center;
}

.anim-legend p {
  margin: 0;
  font-family: var(--font-data);
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
}

.anim-legend strong {
  display: block;
  font-family: var(--font-title);
  font-size: 15px;
  color: var(--ink);
}

.anim-readout {
  min-height: 4.8em;
}

.anim-equations {
  display: grid;
  gap: 4px;
  margin: 12px 0 0;
  font-family: var(--font-data);
  font-size: 15.5px;
}

.anim-equations div {
  display: flex;
  gap: 10px;
}

.anim-equations dt {
  min-width: 5.5em;
  color: var(--muted);
}

.anim-equations dd {
  margin: 0;
  font-family: var(--font-title);
  font-size: 15px;
}

.anim-stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
  margin: 14px 0 0;
}

.anim-stats div {
  display: flex;
  flex-direction: column;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
}

/* Deux chiffres seulement (carte « sobriété ») : deux colonnes, contenu centré */
.anim-stats.is-pair {
  grid-template-columns: repeat(2,1fr);
  text-align: center;
}

.anim-stats dt {
  font-family: var(--font-data);
  font-size: 15.5px;
  color: var(--muted);
}

.anim-stats dd {
  margin: auto 0 0;
  padding-top: 2px;
  font-family: var(--font-title);
  font-size: 23px;
  font-weight: 700;
  white-space: nowrap;
}

.choice {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.choice legend {
  padding: 0;
  margin-bottom: 8px;
  font-family: var(--font-data);
  font-size: 15.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 6px;
}

.choice-sub {
  grid-column: 1/-1;
  font-family: var(--font-data);
  font-size: 15px;
  color: var(--muted);
  margin-top: 2px;
}

.choice-grid button {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 52px;
  padding: 6px 4px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--ink);
  text-align: center;
  transition: background .2s,border-color .2s;
}

.choice-grid button.third {
  grid-column: span 2;
}

.choice-grid button.full {
  grid-column: 1/-1;
}

.choice-grid strong {
  font-family: var(--font-title);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.2;
}

.choice-grid small {
  font-family: var(--font-data);
  font-size: 15px;
  color: var(--muted);
}

.choice-grid button:hover:not(:disabled) {
  border-color: var(--deep);
}

.choice-grid button[aria-pressed=true] {
  background: var(--deep);
  border-color: var(--deep);
  color: var(--white);
}

.choice-grid button[aria-pressed=true] small {
  color: #ffffffb3;
}

.choice-grid button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.anim-outputs {
  display: grid;
  gap: 0;
  margin: 14px 0 0;
}

.anim-outputs>div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: baseline;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.anim-outputs dt {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 16px;
}

.anim-outputs dt small {
  display: block;
  font-family: var(--font-data);
  font-weight: 400;
  font-size: 15px;
  color: var(--muted);
}

.anim-outputs dd {
  margin: 0;
  text-align: right;
  font-family: var(--font-data);
  font-size: 15.5px;
  color: var(--muted);
}

.anim-outputs .lvl {
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
}

.anim-outputs .lvl i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--deep);
}

.anim-outputs .lvl i.cut {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--muted);
}

.anim-outputs .lvl i.off {
  background: var(--line);
}

.anim-outputs .cure {
  grid-column: 1/-1;
  text-align: left;
  color: var(--ink);
}

.anim-outputs .cure:before {
  content: "→ ";
  color: var(--muted);
}

.anim-outputs-title {
  margin: 22px 0 0;
}

.anim-key .key-c {
  background: var(--deep);
}

.anim-key .key-n {
  background: var(--violet);
}

.anim-key .key-s {
  background: var(--lime);
  box-shadow: inset 0 0 0 1.5px var(--deep);
}

.anim-key .key-pm {
  background: var(--muted);
}

/* Échappement : couleurs habituelles des modèles moléculaires, hors charte */
.anim-key.atom-key .key-c {
  background: #1b1b1b;
}

.anim-key.atom-key .key-o {
  background: #e0321f;
}

.anim-key.atom-key .key-n {
  background: #2f6fdc;
}

.anim-key.atom-key .key-s {
  background: #f5b800;
  box-shadow: inset 0 0 0 1.5px var(--deep);
}

.anim-key.atom-key .key-pm {
  background: #9aa0a6;
  box-shadow: inset 0 0 0 1.5px var(--deep);
}

.anim-key .key-elec {
  background: var(--blue);
}

.anim-key .key-h2 {
  background: var(--violet);
}

.anim-key .key-hot {
  background: var(--brick);
}

.anim-key .key-salt {
  background: var(--muted);
}

.anim-key .key-emit {
  background: #dc6d4c4d;
}

.anim-key .key-true,.anim-key .key-speed,.anim-key .key-app {
  width: 18px;
  height: 0;
  border-radius: 0;
  vertical-align: 4px;
  border-top: 3px solid var(--muted);
}

.anim-key .key-drag {
  width: 18px;
  height: 0;
  border-radius: 0;
  vertical-align: 4px;
  border-top: 3px solid var(--brick);
}

.anim-key .key-speed {
  border-top: 3px dashed var(--brick);
}

.anim-key .key-app {
  border-top: 4px solid var(--blue);
}

.anim-key .key-wind {
  background: var(--turquoise);
  box-shadow: inset 0 0 0 1.5px var(--deep);
}

.anim-key {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 12px 0 0;
  font-family: var(--font-data);
  font-size: 15.5px;
  color: var(--muted);
}

.anim-key i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: -1px;
}

.anim-key .key-e {
  background: var(--blue);
}

.anim-key .key-ion {
  background: var(--violet);
}

.anim-key .key-h {
  background: var(--white);
  box-shadow: inset 0 0 0 1.5px var(--deep);
}

.anim-key .key-o {
  background: var(--brick);
}

.anim-key .key-heat {
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: var(--brick);
  vertical-align: 3px;
}

.anim-presets {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  width: 100%;
  border-radius: var(--r-md);
}

.anim-presets button {
  border-radius: var(--r-sm);
}

/* Sélecteur placé juste sous un dessin : un espace pour qu'il ne se fonde pas dans le fond gris du canvas */
.anim-stage + .anim-presets {
  margin-top: 16px;
}

@media (min-width:560px) {
  .anim-presets {
    grid-template-columns: repeat(4,1fr);
  }
}

/* Sélecteur à deux choix (carte « Où va l’énergie ? ») : deux colonnes même sur grand écran */
@media (min-width:560px) {
  .anim-presets.is-pair {
    grid-template-columns: repeat(2,1fr);
  }
}

/* Sélecteur à trois choix (carte « L’énergie d’un voyage ») : trois colonnes, sur toutes les largeurs */
.anim-presets.is-triple {
  grid-template-columns: repeat(3,1fr);
}

/* Volets dépliables */
details {
  border-radius: var(--r-md);
  background: var(--white);
  margin: 10px 0;
}

details.reveal {
  background: var(--grey);
}

summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 14px 18px;
  font-family: var(--font-title);
  font-weight: 700;
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

summary:after {
  content: "";
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grey) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23001023' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center/16px no-repeat;
  transition: transform .3s var(--ease);
}

details.reveal summary:after {
  background-color: var(--white);
}

details[open] summary:after {
  transform: rotate(45deg);
}

details p,details blockquote {
  margin: 0;
  padding: 0 18px 18px;
}

details p+p {
  padding-top: 0;
}

blockquote {
  font-family: var(--font-text);
  font-style: italic;
  font-size: 18px;
  line-height: 1.5;
}

.fold-trap summary:before {
  content: "!";
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--brick);
  color: var(--deep);
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 14px;
  margin-right: -2px;
}

.fold-trap summary {
  justify-content: flex-start;
}

.fold-trap summary:after {
  margin-left: auto;
}

.explanation {
  padding: 18px 4px 8px;
}

.explanation .eyebrow {
  color: var(--muted);
}

.explanation p:last-child {
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
}

/* Question de vérification */
.check {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-top: 22px;
  padding: 24px 20px 22px;
  border-radius: var(--r-xl);
  background: var(--deep);
  color: var(--white);
}

.check-picto {
  z-index: -1;
  width: 520px;
  right: -250px;
  bottom: -150px;
  opacity: .55;
}

.check .eyebrow {
  color: var(--lime);
}

.check h2 {
  font-size: 23px;
  margin-bottom: 18px;
}

.answers {
  display: grid;
  gap: 8px;
}

.answers button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  width: 100%;
  padding: 8px 16px 8px 8px;
  border-radius: var(--r-md);
  border: 1.5px solid transparent;
  background: var(--white);
  color: var(--deep);
  text-align: left;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 16.5px;
  line-height: 1.3;
  transition: transform .15s var(--ease),background .2s;
}

.answers button:not(:disabled):active {
  transform: scale(.98);
}

.answer-key {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grey);
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 15px;
}

.answers button:disabled {
  cursor: default;
  opacity: .55;
}

.answers button.correct,.answers button.incorrect {
  opacity: 1;
}

.answers button.correct {
  background: var(--lime);
  border-color: var(--lime);
}

.answers button.correct .answer-key {
  background: var(--deep);
  color: var(--lime);
}

.answers button.incorrect {
  background: var(--brick-soft);
  border-color: var(--brick);
}

.answers button.incorrect .answer-key {
  background: var(--brick);
  color: var(--deep);
}

.feedback {
  margin: 16px 0 0;
  font-size: 17px;
  line-height: 1.55;
  min-height: 1px;
}

.feedback strong {
  font-family: var(--font-title);
  color: var(--lime);
}

.feedback.is-incorrect strong {
  color: #f3a58d;
}

.feedback:not(:empty) {
  animation: rise .4s var(--ease) both;
}

.lesson-nav {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.lesson-nav .btn {
  flex: 1;
  padding: 12px 14px;
}

.lesson-nav .btn-primary {
  flex: 1.4;
}

.source a {
  color: var(--ink);
}

/* ---------- Quiz ---------- */
.quiz-wrap {
  position: relative;
  max-width: 680px;
  margin: 6px auto 0;
}

/* Sur un petit écran, les pastilles passent sous « Le quiz · 01 / 10 ». */
.quiz-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  margin-bottom: 10px;
}

.quiz-head .eyebrow {
  margin: 0;
  white-space: nowrap;
}

.quiz-wrap > h1 {
  font-size: clamp(34px,9vw,52px);
}

.quiz-dots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
}

/* Les pastilles rétrécissent plutôt que de sortir de l'écran. */
.quiz-dots li {
  width: 22px;
  min-width: 10px;
  height: 8px;
  border-radius: 8px;
  background: #00102321;
  transition: background .3s,width .3s;
}

.quiz-dots li.is-current {
  width: 34px;
  background: var(--deep);
}

.quiz-dots li.is-correct {
  background: var(--lime);
  box-shadow: inset 0 0 0 1.5px var(--deep);
}

.quiz-dots li.is-incorrect {
  background: var(--brick);
}

.quiz-next {
  width: 100%;
  margin-top: 14px;
}

.quiz-result {
  overflow: hidden;
  isolation: isolate;
  padding: 30px 22px 26px;
  border-radius: var(--r-xl);
  background: var(--deep);
  color: var(--white);
}

.quiz-result .eyebrow {
  color: var(--lime);
}

.result-picto {
  z-index: -1;
  width: 640px;
  left: -240px;
  top: -120px;
  opacity: .7;
  animation: draw 2.2s var(--ease) both;
}

.score {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: clamp(84px,26vw,128px);
  line-height: 1;
  letter-spacing: -.06em;
  margin: 10px 0 14px;
  color: var(--lime);
}

.score span {
  font-size: .3em;
  letter-spacing: 0;
  color: #ffffffa6;
}

.quiz-result .quiz-dots li:not(.is-correct):not(.is-incorrect) {
  background: #ffffff2e;
}

.quiz-result .quiz-dots li.is-correct {
  box-shadow: none;
}

.result-copy {
  margin: 18px 0 14px;
  color: #ffffffde;
}

.review {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.review-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: #ffffff12;
  font-weight: 600;
  text-decoration: none;
}

.review-link .i {
  margin-left: auto;
  color: var(--lime);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Repères ---------- */
.page-intro {
  padding: 6px 0 4px;
}

.page-intro h1 {
  font-size: clamp(38px,10vw,60px);
}

.intro-copy {
  font-size: 18px;
  color: var(--muted);
  max-width: 44ch;
}

.empty {
  padding: 20px;
  border-radius: var(--r-lg);
  border: 1.5px dashed #00102333;
  color: var(--muted);
  margin: 0;
}

.glossary {
  margin: 0;
  display: grid;
  gap: 8px;
}

.glossary-group {
  margin: 0;
  border-radius: var(--r-lg);
}

.glossary-group summary {
  justify-content: flex-start;
  font-size: 17px;
}

.glossary-group summary .dot {
  width: 10px;
  height: 10px;
  background: var(--g);
}

.glossary-group summary .theme-count {
  margin-left: auto;
}

.glossary-group dl {
  margin: 0;
  padding: 0 0 6px;
}

.term {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.term dt {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-weight: 700;
  font-size: 19px;
  margin-bottom: 6px;
}


.term dd {
  margin: 0;
  font-family: var(--font-text);
  font-size: 16.5px;
  line-height: 1.55;
}

/* Page Manipuler : mission « Traverser l'Atlantique » */
.mission {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mission h2 {
  margin: 0;
}

.mission-head .eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
}

.mission-dots {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mission-dots li {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
}

.mission-dots .is-done {
  background: var(--deep);
}

.mission-dots .is-current {
  background: var(--blue);
}

.mission-boat {
  width: 100%;
  border-radius: var(--r-md);
  background: var(--grey);
}

.mission-boat .mb-ship {
  transition: transform .6s var(--ease);
}

.mission-boat .mb-wings,.mission-boat .mb-sun,.mission-boat .mb-panels,.mission-boat .mb-co2,.mission-boat .mb-alert {
  opacity: 0;
  transition: opacity .4s;
}

.mission-boat.has-wings .mb-wings,.mission-boat.has-sun .mb-sun,.mission-boat.has-sun .mb-panels,.mission-boat.has-co2 .mb-co2,.mission-boat.is-sunk .mb-alert {
  opacity: 1;
}

.mission-boat .mb-fill {
  transition: width .5s var(--ease),x .5s var(--ease);
}

.mission-gauge {
  margin: 0;
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.45;
}

.mission-delta {
  font-family: var(--font-data);
  font-size: 14px;
  color: var(--blue);
  white-space: nowrap;
}

.mission-options {
  margin-bottom: 12px;
}

.mission-takeaway {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border-left: 5px solid var(--lime);
  background: var(--grey);
}

.mission-takeaway .eyebrow {
  margin: 0;
  color: var(--muted);
}

.mission-takeaway p:not(.eyebrow) {
  margin: 4px 0 8px;
  font-family: var(--font-text);
  font-size: 16.5px;
  line-height: 1.5;
}

.mission-takeaway a {
  font-weight: 700;
  color: var(--ink);
}

.mission-next {
  width: 100%;
  justify-content: center;
}

.mission-next:disabled {
  opacity: .4;
}

.mission-recap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 12px;
}

.mission-recap div {
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--grey);
}

.mission-recap dt {
  font-family: var(--font-data);
  font-size: 14px;
  color: var(--muted);
}

.mission-recap dd {
  margin: 0;
  font-weight: 700;
  font-size: 18px;
}

.mission-lead {
  margin: 0 0 14px;
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.5;
}

.mission-more {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-weight: 700;
  color: var(--ink);
}

/* Pour aller plus loin : contenus Energy Observer */
.further {
  margin-bottom: 26px;
}

.further-grid {
  display: grid;
  gap: 8px;
}

.further-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 44px 14px 16px;
  border-radius: var(--r-md);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
}

.further-tile span {
  font-family: var(--font-text);
  font-size: 15.5px;
  color: var(--muted);
}

.further-tile svg {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 20px;
  height: 20px;
  transform: rotate(-90deg); /* lien externe : flèche vers le haut à droite */
}

.further-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 12px 0 0;
}

.further-social span {
  width: 100%;
  font-family: var(--font-data);
  font-size: 14px;
  color: var(--muted);
}

.further-social a {
  font-weight: 700;
  color: var(--ink);
}

/* Pied de page de l'accueil : liens vers Energy Observer */
.site-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 26px;
  padding: 20px 22px;
  border-radius: var(--r-xl);
  background: var(--deep);
  color: var(--white);
}

.site-footer img {
  flex: none;
  width: 44px;
  height: auto;
}

.site-footer p {
  margin: 0 0 6px;
  font-family: var(--font-data);
  font-size: 14px;
  color: #ffffffb3;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  font-weight: 700;
  color: var(--white);
}

/* Sources, sous le lexique */
.sources-intro {
  margin: 0 0 12px;
  font-family: var(--font-text);
  font-size: 16.5px;
  line-height: 1.55;
}

.sources {
  padding: 4px 18px 14px;
  border-radius: var(--r-lg);
  background: var(--white);
}

.sources h3 {
  margin: 14px 0 6px;
  font-size: 15px;
}

.sources ul {
  margin: 0;
  padding-left: 18px;
  font-family: var(--font-text);
  font-size: 15.5px;
  line-height: 1.5;
}

.sources li + li {
  margin-top: 6px;
}

.sources a {
  color: var(--ink);
  text-underline-offset: 3px;
}

/* ---------- Barre de navigation ---------- */
.bottom-nav {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(12px,env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 20px),520px);
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 26px;
  background: #001023f2;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px -16px #00102399;
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 56px;
  padding: 8px 2px 6px;
  border-radius: 20px;
  color: #ffffffb8;
  text-decoration: none;
  transition: background .25s,color .25s;
}

.bottom-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
}

.bottom-nav a[aria-current] {
  background: var(--lime);
  color: var(--deep);
}

/* ---------- Animations ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes settle {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1);
  }
}

/* Le pictogramme se dessine de gauche à droite */
@keyframes draw {
  from {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

.lesson,.quiz-wrap,.page-intro {
  animation: rise .45s var(--ease) both;
}

/* ---------- Écrans plus larges ---------- */
@media (min-width:640px) {
  :root {
    --gutter: 28px;
  }
  .header {
    padding: 20px var(--gutter);
  }
  .brand-logo {
    width: 150px;
  }
  .brand-section {
    font-size: 12px;
  }
  .grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 14px;
  }
  .topic {
    min-height: 236px;
    padding: 20px 18px 16px;
  }
  .topic h3 {
    font-size: 19px;
  }
  .promo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px;
  }
  .promo p:not(.eyebrow) {
    margin-bottom: 0;
  }
  .panel {
    padding: 28px;
  }
  .check {
    padding: 30px 28px;
  }
  .progress-card {
    grid-template-columns: auto 1fr auto;
    padding: 18px 24px;
  }
  .progress-card .text-link {
    grid-column: auto;
    justify-self: end;
  }
}

@media (min-width:900px) {
  .hero {
    min-height: 520px;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
  }
  .hero-media {
    top: 0;
    bottom: 0;
    left: 38%;
    height: auto;
  }
  .hero-media:after {
    background: linear-gradient(90deg,var(--deep) 0%,#001023e6 22%,#00102300 60%);
  }
  .hero-copy {
    grid-column: 1;
    align-self: end;
    padding: 48px;
  }
  .hero-picto {
    width: 760px;
    left: -220px;
    bottom: -120px;
  }
  .grid {
    grid-template-columns: repeat(4,minmax(0,1fr));
  }
}

@media (max-width:359px) {
  .bottom-nav span {
    font-size: 11px;
  }

  .grid {
    gap: 8px;
  }
  .topic {
    padding: 14px 12px 12px;
  }
  .topic-group {
    font-size: 11px;
  }
}

/* Réduction des animations : suit le réglage du système */
@media (prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    animation: none!important;
    transition: none!important;
  }
}
