/* =========================================================
   B@O — Be Aware Online · feuille de style du site
   Polices auto-hébergées (SIL OFL) : Atkinson Hyperlegible, Baloo 2
   ========================================================= */

@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: italic; font-weight: 700; font-display: swap; src: url("../fonts/atkinson-hyperlegible-latin-700-italic.woff2") format("woff2"); }
@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/baloo-2-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/baloo-2-latin-800-normal.woff2") format("woff2"); }

/* ---------- Jetons de design ---------- */
:root {
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Baloo 2", "Atkinson Hyperlegible", system-ui, sans-serif;

  --bg: #f8f5ec;
  --surface: #fffdf8;
  --surface-2: #f1eee2;
  --ink: #1b2a1f;
  --muted: #4c5b50;
  --line: #dcdccb;

  --brand: #1e4d2b;        /* vert jungle */
  --brand-strong: #153a20;
  --brand-ink: #ffffff;
  --leaf: #3d7a45;
  --leaf-soft: #e5efdb;
  --lime: #a9c96b;
  --gold: #e3a72f;
  --gold-soft: #fbefd2;
  --gold-ink: #6b4a05;
  --bad: #b3412c;          /* tuile « mauvaise situation » */
  --bad-soft: #f8e2dc;
  --good: #2f7a3c;         /* tuile « bonne situation » */
  --good-soft: #e1f0dc;
  --action: #16768c;       /* cartes action (cyan) */
  --action-soft: #dcf0f4;
  --power: #5a3f8e;        /* cartes pouvoir (violet) */
  --power-soft: #ece6f6;
  --link: #1d5e86;

  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 22px;
  --shadow: 0 1px 2px rgba(27, 42, 31, .06), 0 6px 18px rgba(27, 42, 31, .07);
  --shadow-l: 0 2px 4px rgba(27, 42, 31, .06), 0 16px 40px rgba(27, 42, 31, .12);
  --maxw: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
  --fs: 1.0625rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1912; --surface: #162319; --surface-2: #1c2c20; --ink: #e8efe4; --muted: #b3c2b0; --line: #2d4033;
    --brand: #8fc77a; --brand-strong: #b4dda3; --brand-ink: #0f1912; --leaf: #8fc77a; --leaf-soft: #1f3324;
    --lime: #9fc565; --gold: #f0bb4f; --gold-soft: #3a2f14; --gold-ink: #f6d58c;
    --bad: #f08f7b; --bad-soft: #3b211b; --good: #8fd69a; --good-soft: #1b3320;
    --action: #6cc6dc; --action-soft: #15323a; --power: #bba4ec; --power-soft: #2a2140; --link: #8cc8ef;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35);
    --shadow-l: 0 2px 4px rgba(0,0,0,.4), 0 16px 40px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1912; --surface: #162319; --surface-2: #1c2c20; --ink: #e8efe4; --muted: #b3c2b0; --line: #2d4033;
  --brand: #8fc77a; --brand-strong: #b4dda3; --brand-ink: #0f1912; --leaf: #8fc77a; --leaf-soft: #1f3324;
  --lime: #9fc565; --gold: #f0bb4f; --gold-soft: #3a2f14; --gold-ink: #f6d58c;
  --bad: #f08f7b; --bad-soft: #3b211b; --good: #8fd69a; --good-soft: #1b3320;
  --action: #6cc6dc; --action-soft: #15323a; --power: #bba4ec; --power-soft: #2a2140; --link: #8cc8ef;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35);
  --shadow-l: 0 2px 4px rgba(0,0,0,.4), 0 16px 40px rgba(0,0,0,.45);
  color-scheme: dark;
}
:root[data-text="large"] { --fs: 1.1875rem; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: var(--fs); line-height: 1.6;
  overflow-x: hidden;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; color: var(--brand-strong); font-weight: 800; letter-spacing: -.01em; }
:root[data-theme="dark"] h1, :root[data-theme="dark"] h2, :root[data-theme="dark"] h3, :root[data-theme="dark"] h4 { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(h1,h2,h3,h4) { color: var(--ink); } }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 700; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin: .25em 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
blockquote { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.22em; }
.icon-lg { width: 28px; height: 28px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--brand); color: var(--brand-ink); padding: .6em 1em; border-radius: var(--radius-s); font-weight: 700; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section--tint { background: var(--surface-2); }
.section--brand { background: var(--brand); color: var(--brand-ink); }
.section--brand h2, .section--brand h3 { color: var(--brand-ink); }
.section-head { max-width: 760px; margin-bottom: 2rem; }
.section-head p { color: var(--muted); font-size: 1.08em; }
.section--brand .section-head p { color: inherit; opacity: .9; }
.eyebrow { display: inline-flex; align-items: center; gap: .5em; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--leaf); margin-bottom: .6rem; }
.section--brand .eyebrow { color: var(--lime); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .9em; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand-strong); margin-right: auto; }
.brand-mark {
  font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; line-height: 1;
  background: var(--brand); color: #fff; padding: .28em .45em .18em; border-radius: 12px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.18);
}
.brand-mark b { color: var(--gold); font-weight: 800; }
:root[data-theme="dark"] .brand-mark { background: #1e4d2b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-mark { background: #1e4d2b; } }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-display); font-size: 1.08rem; color: var(--ink); }
.brand-text span { font-size: .75rem; color: var(--muted); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.main-nav a {
  display: block; padding: .5em .62em; border-radius: 10px; text-decoration: none;
  color: var(--ink); font-weight: 700; font-size: .93rem; white-space: nowrap;
}
.main-nav a:hover { background: var(--leaf-soft); }
.main-nav a[aria-current="page"] { background: var(--brand); color: var(--brand-ink); }
.header-tools { display: flex; gap: 6px; }
.tool-btn, .nav-toggle {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
}
.tool-btn:hover, .nav-toggle:hover { background: var(--leaf-soft); }
.tool-btn[aria-pressed="true"] { background: var(--gold-soft); border-color: var(--gold); }
.nav-toggle { display: none; }
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: block; }

@media (max-width: 1400px) { .brand-text span { display: none; } }
@media (max-width: 1240px) {
  .nav-toggle { display: inline-grid; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; max-height: calc(100vh - var(--header-h));
    overflow-y: auto; background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-l); display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; padding: 12px var(--gutter) 20px; gap: 4px; }
  .main-nav a { font-size: 1.05rem; padding: .75em .9em; }
  .brand-text span { display: none; }
}
@media (max-width: 420px) { .brand-text { display: none; } }

/* ---------- Fil d'Ariane & en-tête de page ---------- */
.page-hero { background: linear-gradient(135deg, var(--brand) 0%, #2b6a3a 100%); color: #fff; position: relative; overflow: hidden; }
.page-hero::after {
  content: ""; position: absolute; right: -80px; top: -60px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(169,201,107,.45), rgba(169,201,107,0) 70%); pointer-events: none;
}
:root[data-theme="dark"] .page-hero { background: linear-gradient(135deg, #14301c 0%, #1e4d2b 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .page-hero { background: linear-gradient(135deg, #14301c 0%, #1e4d2b 100%); } }
.page-hero .container { position: relative; z-index: 1; padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(36px, 6vw, 64px); }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero .lead { color: rgba(255,255,255,.9); max-width: 760px; margin-bottom: 0; }
.page-hero .eyebrow { color: var(--lime); }
.breadcrumb { font-size: .88rem; margin-bottom: 1.2rem; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4em; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: .4em; opacity: .7; }
.breadcrumb a { color: #fff; }
.breadcrumb [aria-current] { opacity: .85; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.4rem; }
.hero-chips span { display: inline-flex; align-items: center; gap: .45em; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); padding: .35em .8em; border-radius: 999px; font-weight: 700; font-size: .92rem; }

/* ---------- Accueil : hero ---------- */
.hero { position: relative; overflow: hidden; background:
  radial-gradient(1200px 500px at 85% -10%, rgba(169,201,107,.35), transparent 60%),
  radial-gradient(700px 400px at -10% 110%, rgba(227,167,47,.18), transparent 60%),
  var(--bg); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 64px); align-items: center; padding-top: clamp(32px, 6vw, 72px); padding-bottom: clamp(40px, 7vw, 88px); }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin-bottom: .25em; }
.hero h1 .at { color: var(--gold); }
.hero .tagline { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 2.4vw, 1.7rem); color: var(--leaf); margin-bottom: .8em; line-height: 1.25; }
.hero-art { position: relative; }
.hero-art img { border-radius: 28px; box-shadow: var(--shadow-l); transform: rotate(1.5deg); border: 6px solid var(--surface); }
.hero-art .float-chip {
  position: absolute; display: inline-flex; align-items: center; gap: .45em; padding: .5em .85em; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow); font-weight: 700; font-size: .92rem; color: var(--ink);
}
.hero-art .c1 { left: -14px; top: 12%; }
.hero-art .c2 { right: -10px; top: 46%; }
.hero-art .c3 { left: 6%; bottom: -14px; }
.hero-art .float-chip .icon { color: var(--leaf); }
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 520px; margin: 8px auto 0; }
  .hero-art .c1 { left: 0; } .hero-art .c2 { right: 0; }
}

/* ---------- Boutons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.4rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 46px;
  padding: .65em 1.2em; border-radius: 12px; border: 2px solid transparent; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; line-height: 1.2; transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-gold { background: var(--gold); color: #2b1f05; }
.btn-ghost { background: transparent; border-color: currentColor; color: var(--brand-strong); }
.btn-light { background: #fff; color: #1e4d2b; }
.btn-outline-light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-sm { min-height: 38px; padding: .45em .85em; font-size: .92rem; border-radius: 10px; }
:root[data-theme="dark"] .btn-ghost { color: var(--ink); }

/* ---------- Grilles & cartes ---------- */
.grid { display: grid; gap: clamp(14px, 2vw, 22px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.grid-6 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 26px); box-shadow: var(--shadow); position: relative;
}
.card > :last-child { margin-bottom: 0; }
.card h3 { margin-bottom: .35em; }
.card-icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: var(--leaf-soft); color: var(--leaf); margin-bottom: .9rem;
}
.card-icon .icon { width: 28px; height: 28px; }
.card--link { text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow-l); }
.card--link .more { margin-top: auto; padding-top: .8rem; display: inline-flex; align-items: center; gap: .4em; font-weight: 700; color: var(--link); }
.card--feature { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card--feature .card-media { background: var(--surface-2); aspect-ratio: 16/10; overflow: hidden; display: grid; place-items: center; }
.card--feature .card-media img { width: 100%; height: 100%; object-fit: cover; }
.card--feature .card-body { padding: clamp(18px, 2.4vw, 26px); display: flex; flex-direction: column; flex: 1; }
.card--feature .card-body > :last-child { margin-bottom: 0; }
.card--accent-bad { border-top: 5px solid var(--bad); }
.card--accent-good { border-top: 5px solid var(--good); }
.card--accent-action { border-top: 5px solid var(--action); }
.card--accent-gold { border-top: 5px solid var(--gold); }
.card--accent-power { border-top: 5px solid var(--power); }
.card--accent-brand { border-top: 5px solid var(--leaf); }

/* Notions (4) */
.notion { text-align: left; }
.notion .card-icon { background: var(--action-soft); color: var(--action); }
.notion--1 .card-icon { background: var(--bad-soft); color: var(--bad); }
.notion--2 .card-icon { background: var(--gold-soft); color: var(--gold-ink); }
.notion--3 .card-icon { background: var(--action-soft); color: var(--action); }
.notion--4 .card-icon { background: var(--power-soft); color: var(--power); }

/* Gestes (5 + joker) */
.gestes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 14px; }
.geste {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .35rem;
}
.geste .gicon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--action); color: #fff; }
:root[data-theme="dark"] .geste .gicon { color: #0f1912; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .geste .gicon { color: #0f1912; } }
.geste .gicon .icon { width: 24px; height: 24px; }
.geste strong { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.geste q, .geste .quote { font-style: italic; color: var(--muted); font-size: .95em; }
.geste--joker { background: var(--gold-soft); border-color: var(--gold); }
.geste--joker .gicon { background: var(--gold); color: #2b1f05; }
.section--brand .geste { color: var(--ink); }

/* Statistiques */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 3.4vw, 2.4rem); line-height: 1; color: var(--brand-strong); }
:root[data-theme="dark"] .stat b { color: var(--leaf); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stat b { color: var(--leaf); } }
.stat span { display: block; margin-top: .35em; color: var(--muted); font-size: .92rem; }
.section--brand .stat { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); box-shadow: none; }
.section--brand .stat b, .section--brand .stat span { color: #fff; }

/* Bandeau de faits */
.facts { display: flex; flex-wrap: wrap; gap: 10px 26px; padding: 18px 0; }
.facts div { display: flex; align-items: center; gap: .55em; font-weight: 700; }
.facts .icon { color: var(--leaf); width: 22px; height: 22px; }
.facts-band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Encadrés ---------- */
.callout { display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); margin: 1.2rem 0; }
.callout > .icon { width: 26px; height: 26px; margin-top: 2px; }
.callout > div > :last-child { margin-bottom: 0; }
.callout-title { font-weight: 700; display: block; margin-bottom: .2em; }
.callout--info { background: var(--action-soft); border-color: transparent; }
.callout--info > .icon { color: var(--action); }
.callout--warn { background: var(--bad-soft); border-color: transparent; }
.callout--warn > .icon { color: var(--bad); }
.callout--tip { background: var(--gold-soft); border-color: transparent; }
.callout--tip > .icon { color: var(--gold-ink); }
.callout--good { background: var(--good-soft); border-color: transparent; }
.callout--good > .icon { color: var(--good); }
.example { border-left: 5px solid var(--gold); background: var(--surface-2); padding: 14px 18px; border-radius: 0 var(--radius-s) var(--radius-s) 0; margin: 1.2rem 0; }
.example > :last-child { margin-bottom: 0; }
.example-label { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--gold-ink); display: block; margin-bottom: .25rem; }
.pull { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.3; color: var(--brand-strong); border-left: 6px solid var(--lime); padding: .3em 0 .3em 1em; margin: 1.5rem 0; }
:root[data-theme="dark"] .pull { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pull { color: var(--ink); } }
.quote-chip { display: inline-block; background: var(--leaf-soft); color: var(--ink); border-radius: 10px; padding: .25em .7em; font-style: italic; margin: .15em 0; }

/* Chaîne de progression */
.chain { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0; margin: 1rem 0; list-style: none; }
.chain li { margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.chain li span { background: var(--brand); color: var(--brand-ink); padding: .4em .85em; border-radius: 999px; font-weight: 700; font-size: .9rem; letter-spacing: .04em; }
.chain li:nth-child(even) span { background: var(--leaf); }
.chain li + li::before { content: "→"; color: var(--muted); font-weight: 700; }
.section--brand .chain li span { background: rgba(255,255,255,.14); color: #fff; }

/* Étapes numérotées */
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 14px; }
.steps > li { counter-increment: step; position: relative; padding: 16px 18px 16px 66px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 0; box-shadow: var(--shadow); }
.steps > li::before {
  content: counter(step); position: absolute; left: 16px; top: 14px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-family: var(--font-display); font-weight: 800; font-size: 1.1rem;
}
.steps > li > :last-child { margin-bottom: 0; }
.steps h3, .steps h4 { margin-bottom: .2em; }

/* Frise chronologique */
.timeline { position: relative; list-style: none; padding: 0; margin: 0; }
.timeline::before { content: ""; position: absolute; left: 22px; top: 6px; bottom: 6px; width: 4px; border-radius: 4px; background: linear-gradient(var(--lime), var(--leaf)); }
.timeline > li { position: relative; padding: 0 0 26px 66px; margin: 0; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline .dot { position: absolute; left: 0; top: 0; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 4px solid var(--leaf); font-family: var(--font-display); font-weight: 800; color: var(--brand-strong); font-size: .95rem; }
:root[data-theme="dark"] .timeline .dot { color: var(--ink); }
.timeline .when { font-weight: 700; color: var(--leaf); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.timeline h3 { margin: .1em 0 .35em; }
.timeline .card { padding: 16px 20px; }

/* Séquences (FabLab) */
.seq { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; counter-reset: seq; }
.seq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.seq-item .num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; margin-bottom: .5rem; }
.seq-item.is-gold .num { background: var(--gold); color: #2b1f05; }
.seq-item h3 { font-size: 1.15rem; margin-bottom: .3em; }
.seq-item p { font-size: .93rem; color: var(--muted); margin-bottom: .6em; }
.seq-item .dur { margin-top: auto; font-weight: 700; color: var(--leaf); font-size: .9rem; display: inline-flex; gap: .35em; align-items: center; }
.seq-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin: 1.2rem 0 .4rem; background: var(--surface-2); }
.seq-bar span { display: block; height: 100%; border-right: 2px solid var(--surface); }
.seq-bar span:nth-child(odd) { background: var(--leaf); } .seq-bar span:nth-child(even) { background: var(--lime); }
.seq-bar span.is-gold { background: var(--gold); }
.seq-legend { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); }

/* ---------- Tableaux ---------- */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); margin: 1rem 0 1.4rem; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
caption { text-align: left; padding: 12px 16px 0; font-weight: 700; color: var(--muted); caption-side: top; }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--leaf-soft); color: var(--ink); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 700; color: var(--ink); }
.table-compact td, .table-compact th { padding: 9px 12px; }
.table-min { min-width: 640px; }
.check-cell { text-align: center; }
.check-box { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--muted); border-radius: 4px; }

/* ---------- Mise en page avec sommaire ---------- */
.with-toc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 18px); max-height: calc(100vh - var(--header-h) - 36px); overflow-y: auto; }
.toc details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 10px 14px 16px; box-shadow: var(--shadow); }
.toc summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding-right: 6px; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; padding: 0; margin: .6rem 0 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: .35em .6em; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: .92rem; border-left: 3px solid transparent; }
.toc a:hover { color: var(--ink); background: var(--surface-2); }
.toc a.is-active { color: var(--brand-strong); border-left-color: var(--leaf); background: var(--leaf-soft); font-weight: 700; }
:root[data-theme="dark"] .toc a.is-active { color: var(--ink); }
.prose > section { padding-bottom: clamp(28px, 4vw, 44px); margin-bottom: clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.prose > section:last-child { border-bottom: 0; margin-bottom: 0; }
.prose h2 { display: flex; align-items: center; gap: .5em; }
.prose h2 .h-num { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; border-radius: 10px; background: var(--leaf-soft); color: var(--leaf); font-size: .75em; }
@media (max-width: 960px) {
  .with-toc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; }
}

/* ---------- Onglets ---------- */
.tabs { margin: 1rem 0; }
.tablist { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 1.2rem; }
.tab {
  font: inherit; font-weight: 700; padding: .65em 1.1em; border: 0; background: transparent; color: var(--muted);
  border-radius: 10px 10px 0 0; cursor: pointer; position: relative; bottom: -2px; border-bottom: 3px solid transparent;
}
.tab:hover { color: var(--ink); background: var(--surface-2); }
.tab[aria-selected="true"] { color: var(--brand-strong); border-bottom-color: var(--gold); background: var(--surface); }
:root[data-theme="dark"] .tab[aria-selected="true"] { color: var(--ink); }
.tab .tab-sub { display: block; font-weight: 400; font-size: .8rem; }
.tabpanel[hidden] { display: none; }
.tabpanel:focus-visible { outline-offset: 6px; }

/* ---------- Accordéons ---------- */
.accordion { display: grid; gap: 10px; }
.accordion details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.accordion summary { cursor: pointer; list-style: none; padding: 16px 18px; display: flex; align-items: center; gap: 14px; font-weight: 700; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .acc-num { flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; }
.accordion summary .acc-title { flex: 1; }
.accordion summary .acc-title small { display: block; font-weight: 400; color: var(--muted); font-size: .9rem; }
.accordion summary .icon { transition: transform .2s ease; color: var(--muted); }
.accordion details[open] summary .icon { transform: rotate(180deg); }
.accordion .acc-body { padding: 0 18px 18px 70px; }
.accordion .acc-body > :last-child { margin-bottom: 0; }
@media (max-width: 600px) { .accordion .acc-body { padding-left: 18px; } }

/* ---------- Galerie d'éléments de jeu ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 16px; }
.gallery figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.gallery figure img { border-radius: 10px; margin: 0 auto; width: 100%; height: 220px; object-fit: contain; }
.gallery figcaption { margin-top: .6rem; font-size: .9rem; color: var(--muted); }
.gallery figcaption strong { display: block; color: var(--ink); font-size: 1rem; }
.media-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.media-row--rev > :first-child { order: 2; }
@media (max-width: 860px) { .media-row { grid-template-columns: 1fr; } .media-row--rev > :first-child { order: 0; } }
.framed { border-radius: var(--radius-l); box-shadow: var(--shadow-l); border: 5px solid var(--surface); }

/* Personnages */
.characters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; list-style: none; padding: 0; }
.characters li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: center; box-shadow: var(--shadow); margin: 0; }
.characters .emoji { font-size: 2rem; line-height: 1; display: block; margin-bottom: .3rem; }
.characters strong { display: block; font-family: var(--font-display); font-size: 1.2rem; }
.characters span { color: var(--muted); font-size: .92rem; }

/* ---------- Simulateur de jauge ---------- */
.sim { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(18px, 3vw, 36px); align-items: start; }
@media (max-width: 720px) { .sim { grid-template-columns: 1fr; } }
.gauge { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 14px 16px; box-shadow: var(--shadow); }
.gauge ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.gauge li { margin: 0; display: flex; align-items: center; gap: 10px; height: 22px; font-weight: 700; font-size: .9rem; }
.gauge li .bar { flex: 1; height: 100%; border-radius: 6px; background: var(--surface-2); position: relative; }
.gauge li.pos .bar { background: color-mix(in srgb, var(--good) 22%, transparent); }
.gauge li.neg .bar { background: color-mix(in srgb, var(--bad) 22%, transparent); }
.gauge li.zero .bar { background: color-mix(in srgb, var(--gold) 35%, transparent); }
.gauge li .val { width: 2.2em; text-align: right; color: var(--muted); }
.gauge li.is-current .bar { background: var(--brand); box-shadow: 0 0 0 3px var(--gold); }
.gauge li.is-current .val { color: var(--ink); }
.gauge li.is-current .bar::after { content: "🐼 Bao"; position: absolute; left: 8px; top: 50%; transform: translateY(-50%); color: #fff; font-size: .82rem; }
.gauge li.is-limit .val { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; }
.sim-controls { display: grid; gap: 14px; }
.sim-controls fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 16px; margin: 0; background: var(--surface); }
.sim-controls legend { font-weight: 700; padding: 0 .3em; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-block; padding: .5em .9em; border-radius: 10px; border: 2px solid var(--line); cursor: pointer; font-weight: 700; background: var(--surface); }
.seg input:checked + span { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.seg input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.sim-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sim-actions .btn { flex: 1 1 200px; justify-content: flex-start; }
.btn-plus { background: var(--good-soft); color: var(--ink); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.btn-minus { background: var(--bad-soft); color: var(--ink); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.sim-status { padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); font-weight: 700; min-height: 3.2em; }
.sim-status.is-win { background: var(--good-soft); color: var(--ink); }
.sim-status.is-lose { background: var(--bad-soft); color: var(--ink); }
.sim-log { font-size: .9rem; color: var(--muted); max-height: 9em; overflow-y: auto; padding-left: 1.2em; margin: 0; }

/* ---------- Activité « une situation, plusieurs réponses » ---------- */
.activity { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-l); overflow: hidden; }
.activity-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; background: var(--leaf-soft); border-bottom: 1px solid var(--line); }
.activity-head .progress { font-weight: 700; color: var(--muted); }
.activity-body { padding: clamp(18px, 3vw, 30px); }
.situation-card { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border-radius: var(--radius); background: var(--surface-2); border-left: 6px solid var(--gold); margin-bottom: 1.2rem; }
.situation-card .tag { display: inline-block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.situation-card p { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.2rem, 2.2vw, 1.5rem); line-height: 1.3; margin: .2em 0 0; color: var(--ink); }
.act-step { margin: 1.2rem 0; }
.act-step h3 { font-size: 1.1rem; margin-bottom: .6rem; display: flex; flex-wrap: wrap; gap: .5em; align-items: center; }
.act-step legend { padding: 0; }
.act-step h3 .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: .95rem; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: inline-flex; align-items: center; gap: .5em; padding: .55em .95em; border-radius: 12px; border: 2px solid var(--line);
  background: var(--surface); cursor: pointer; font-weight: 700; user-select: none;
}
.choice span:hover { border-color: var(--leaf); }
.choice input:checked + span { background: var(--action); border-color: var(--action); color: #fff; }
:root[data-theme="dark"] .choice input:checked + span { color: #0f1912; }
.choice input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.choice--good input:checked + span { background: var(--good); border-color: var(--good); }
.choice--bad input:checked + span { background: var(--bad); border-color: var(--bad); }
.choice input:disabled + span { opacity: .5; cursor: not-allowed; }
.feedback { margin-top: 1.2rem; padding: 18px 20px; border-radius: var(--radius); background: var(--good-soft); }
.feedback[hidden] { display: none; }
.feedback h3 { font-size: 1.15rem; }
.feedback ul { margin-bottom: .6em; }
.feedback .match { font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: .35em; padding: .15em .6em; border-radius: 999px; font-size: .85rem; font-weight: 700; background: var(--surface); border: 1px solid var(--line); }
.pill--yes { background: var(--action); color: #fff; border-color: var(--action); }
:root[data-theme="dark"] .pill--yes { color: #0f1912; }
.activity-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }

/* ---------- Ressources ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 1.4rem; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 180px; }
.field label { font-weight: 700; font-size: .9rem; }
.field input, .field select {
  font: inherit; padding: .55em .8em; border-radius: 10px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); min-height: 44px; width: 100%;
}
.field input:focus, .field select:focus { border-color: var(--leaf); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 50%, transparent); }
.search-field { flex: 2 1 260px; position: relative; }
.search-field .icon { position: absolute; left: 12px; bottom: 12px; color: var(--muted); }
.search-field input { padding-left: 2.4em; }
.res-count { font-weight: 700; color: var(--muted); margin-bottom: 1rem; }
.res-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.res { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.res[hidden] { display: none; }
.res-thumb { flex: none; width: 76px; height: 96px; border-radius: 8px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; border: 1px solid var(--line); }
.res-thumb img { width: 100%; height: 100%; object-fit: cover; }
.res-thumb .icon { width: 32px; height: 32px; color: var(--leaf); }
.res-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.res-body h3 { font-size: 1.12rem; margin-bottom: .2em; }
.res-body p { font-size: .93rem; color: var(--muted); margin-bottom: .6em; }
.res-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: .7em; }
.res-meta span { font-size: .78rem; font-weight: 700; padding: .15em .55em; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.res-meta .t-lang { background: var(--action-soft); color: var(--ink); }
.res-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.empty-state { text-align: center; padding: 30px; color: var(--muted); }

/* ---------- Vidéo (chargement à la demande) ---------- */
.video { position: relative; aspect-ratio: 16/9; border-radius: var(--radius-l); overflow: hidden; background: #0f2416; box-shadow: var(--shadow-l); }
.video:has(> .video-consent) { aspect-ratio: auto; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-consent { position: relative; width: 100%; aspect-ratio: 16/9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; text-align: center; color: #fff;
  background: radial-gradient(circle at 30% 20%, rgba(169,201,107,.35), transparent 50%), linear-gradient(135deg, #1e4d2b, #10301a); }
.video-consent .play { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #2b1f05; border: 0; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.video-consent .play .icon { width: 34px; height: 34px; margin-left: 4px; }
.video-consent p { margin: 0; max-width: 520px; font-size: .92rem; opacity: .9; }
.video-consent strong { font-family: var(--font-display); font-size: 1.25rem; }
.video-consent a { color: #fff; }

/* ---------- Illustration jeu en ligne ---------- */
.device { background: linear-gradient(160deg, #1b7f96, #16596c); border-radius: 26px; padding: 18px; box-shadow: var(--shadow-l); color: #fff; }
.device-screen { background: #fdfbf3; border-radius: 16px; padding: 18px; color: #1b2a1f; }
.device-screen .bubble { background: #e1f0f4; border-radius: 14px 14px 14px 4px; padding: 10px 14px; margin-bottom: 10px; font-weight: 700; max-width: 90%; }
.device-screen .bubble.me { background: #fbefd2; border-radius: 14px 14px 4px 14px; margin-left: auto; }
.device-screen .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.device-screen .opts span { background: #1e4d2b; color: #fff; border-radius: 10px; padding: 8px 10px; text-align: center; font-weight: 700; font-size: .9rem; }
.device-langs { display: flex; gap: 8px; justify-content: center; margin-top: 12px; font-weight: 700; font-size: .85rem; }
.device-langs span { background: rgba(255,255,255,.18); border-radius: 999px; padding: .2em .7em; }

/* ---------- Publics ---------- */
.audience { display: flex; flex-direction: column; }
.audience .card-icon { width: 60px; height: 60px; border-radius: 18px; }
.audience ul { list-style: none; padding: 0; margin: .4rem 0 0; }
.audience li { margin: 0; border-top: 1px solid var(--line); }
.audience li a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: .6em 0; text-decoration: none; font-weight: 700; }
.audience li a:hover { text-decoration: underline; }

/* Bloc 3018 */
.help-3018 { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; background: var(--brand); color: #fff; border-radius: var(--radius-l); padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow-l); }
:root[data-theme="dark"] .help-3018 { background: #1e4d2b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .help-3018 { background: #1e4d2b; } }
.help-3018 .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(3rem, 8vw, 4.6rem); line-height: .9; color: var(--gold); }
.help-3018 > div { flex: 1 1 300px; }
.help-3018 h2, .help-3018 h3 { color: #fff; margin-bottom: .3em; }
.help-3018 p { margin-bottom: .5em; }
.help-3018 a { color: #fff; font-weight: 700; }

/* Bandeau CTA */
.cta-band { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; background: var(--gold-soft); border: 2px solid var(--gold); border-radius: var(--radius-l); padding: clamp(20px, 3vw, 32px); }
.cta-band h2 { margin-bottom: .2em; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.cta-band p { margin: 0; color: var(--muted); max-width: 640px; }

/* Liste à puces cochées */
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 1.9em; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .3em; width: 1.2em; height: 1.2em; border-radius: 50%; background: var(--good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/70% no-repeat; }
.cols-2 { columns: 2 260px; column-gap: 32px; }
.cols-2 li { break-inside: avoid; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: .4rem 0 1rem; }
.tags li { margin: 0; background: var(--leaf-soft); border-radius: 999px; padding: .2em .75em; font-size: .92rem; font-weight: 700; color: var(--ink); }

/* Niveaux (cartes) */
.level-badge { display: inline-flex; align-items: center; gap: .4em; padding: .2em .7em; border-radius: 999px; font-weight: 700; font-size: .85rem; background: var(--leaf-soft); color: var(--ink); }
.level-1 { border-top: 5px solid var(--lime); }
.level-2 { border-top: 5px solid var(--leaf); }
.level-3 { border-top: 5px solid var(--gold); }

/* Logos texte partenaires */
.partners { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.partners li { margin: 0; display: inline-flex; align-items: center; gap: .5em; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .4em .9em; font-weight: 700; font-size: .93rem; }
.partners .flag { font-size: 1.2em; line-height: 1; }

/* Retour en haut */
.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; box-shadow: var(--shadow-l); cursor: pointer; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Pied de page ---------- */
.site-footer { background: #10261a; color: #dfe9da; margin-top: 0; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; padding-top: 48px; padding-bottom: 36px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { color: #fff; font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .8em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .35em 0; }
.site-footer li a { text-decoration: none; }
.site-footer li a:hover { text-decoration: underline; }
.footer-about p { font-size: .95rem; opacity: .9; }
.footer-eu { display: inline-flex; align-items: center; gap: .6em; background: #003399; color: #fff; padding: .45em .9em; border-radius: 8px; font-weight: 700; font-size: .9rem; }
.footer-eu .icon { color: #ffcc00; width: 26px; height: 26px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px var(--gutter) 22px; font-size: .86rem; opacity: .85; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.footer-credit { flex-basis: 100%; }

/* ---------- Sélecteur de langue (FR · EN · EL · FI) ---------- */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-btn { width: auto; min-width: 42px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; letter-spacing: .04em; }
.lang-menu[open] > .lang-btn { background: var(--leaf-soft); }
.lang-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; list-style: none; margin: 0; padding: 6px; min-width: 11rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-l); }
.lang-list a { display: block; padding: .55em .8em; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 700; }
.lang-list a:hover { background: var(--leaf-soft); }
.lang-list a[aria-current="true"] { background: var(--brand); color: var(--brand-ink); }
@media (max-width: 420px) { .lang-btn .lang-code { display: none; } .lang-btn { padding: 0; width: 42px; justify-content: center; } }

/* Grec : les polices auto-hébergées ne couvrent que l'alphabet latin, on utilise les polices système */
html[lang="el"] { --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif; --font-display: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif; }
html[lang="el"] .brand-mark { font-family: "Baloo 2", system-ui, sans-serif; }
/* Grec : libellés plus longs, le menu passe en mode compact plus tôt */
html[lang="el"] .brand-text span { display: none; }
@media (max-width: 1340px) {
html[lang="el"] .nav-toggle { display: inline-grid; }
html[lang="el"] .main-nav { position: fixed; inset: var(--header-h) 0 auto 0; max-height: calc(100vh - var(--header-h)); overflow-y: auto; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-l); display: none; }
html[lang="el"] .main-nav.is-open { display: block; }
html[lang="el"] .main-nav ul { flex-direction: column; padding: 12px var(--gutter) 20px; gap: 4px; }
html[lang="el"] .main-nav a { font-size: 1.05rem; padding: .75em .9em; }
}
@media (max-width: 420px) { .lang-list { position: fixed; left: 16px; right: 16px; top: calc(var(--header-h) + 4px); min-width: 0; } }

/* ---------- Impression ---------- */
.print-only { display: none; }
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f4f4f4; --ink: #000; --muted: #333; --line: #bbb; }
  body { font-size: 11pt; background: #fff; }
  .site-header, .site-footer, .to-top, .toc, .btn-row, .no-print, .video, .filters, .breadcrumb { display: none !important; }
  .print-only { display: block; }
  .page-hero { background: none !important; color: #000; }
  .page-hero h1, .page-hero .lead, .page-hero .eyebrow { color: #000 !important; }
  .with-toc { display: block; }
  .card, .geste, .stat, .table-wrap, .steps > li { box-shadow: none; break-inside: avoid; }
  .section { padding: 16pt 0; }
  a { color: #000; }
  .tabpanel[hidden] { display: block !important; }
  .tablist { display: none; }
  details { display: block; } details > summary { list-style: none; }
  .accordion .acc-body { padding-left: 18px; }
}
