/* ==========================================================================
   Plateforme de formation Terrain d'Idees
   Charte : anthracite dominant, bleu-vert signature (sauge) en accent, cuivre en touche rare.
   Langage visuel repris des recapitulatifs animes (rail graphite, scene blanche, noeuds de programme).
   Aucune regle de style dans le HTML : la politique de securite (CSP) interdit les styles en ligne.
   ========================================================================== */
:root {
  --white: #ffffff; --brume: #d9e7e8; --sauge: #8fb7ba; --ardoise: #2d353c; --gris: #2c343b; --graphite: #262e35;
  --sarcelle: #4b6f7b; --cuivre: #cc9966; --mist: #f2f7f7; --ink: #2d353c; --ink2: #5a6870; --ink3: #7f8d93;
  --line: #dbe7e8; --ok: #2f6f50; --ok-bg: #e7f3ec; --warn: #8a5a2b; --warn-bg: #f8efe6; --err: #9b2f2f; --err-bg: #f9eaea;
  --title: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: Calibri, "Segoe UI", Candara, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --r: 18px; --r-s: 12px; --shadow: 0 14px 34px rgba(45, 53, 60, .08); --shadow-lg: 0 30px 70px rgba(0, 0, 0, .28);
  --ease: cubic-bezier(.65, 0, .35, 1); --ease-out: cubic-bezier(.22, .61, .36, 1);
  --wrap: 1180px;
  /* Nuances derivees des couleurs de la charte (branding.palette) : /theme.css les recalcule pour chaque espace. */
  --on-sauge: #262e35; --sauge-hover: #a3c5c8; --sauge-2: #7aa9ad; --deep: #10161a;
  --dark-1: #2f3a42; --dark-2: #33414a; --dark-3: #3a454d; --dark-4: #4a565e;
  --tint-1: #f7fbfb; --tint-2: #e7efef; --line-strong: #c9dadb;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font: 17px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
img, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--sarcelle); text-underline-offset: 3px; }
a:hover { color: var(--ardoise); }
h1, h2, h3, h4 { font-family: var(--title); color: var(--ardoise); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.3px; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); letter-spacing: -1px; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.05rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--sauge); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ardoise); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.muted { color: var(--ink2); }
.small { font-size: .9rem; }
.center { text-align: center; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.underline-accent::after { content: ""; display: block; width: 56px; height: 4px; border-radius: 2px; background: var(--sauge); margin-top: 14px; }
.center .underline-accent::after, .underline-accent.center::after { margin-left: auto; margin-right: auto; }
svg.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -5px; }
svg.ic.sm { width: 17px; height: 17px; vertical-align: -3px; }
svg.ic.lg { width: 30px; height: 30px; }

/* ----- En-tete et pied de page ----- */
.site-head { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(6px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.brand img { display: block; width: auto; height: auto; max-width: 190px; max-height: 58px; }
.brand { text-decoration: none; }
.brand-name { display: block; margin: 0; font: 700 1.25rem/1.15 var(--title); color: var(--ardoise); letter-spacing: -.3px; text-decoration: none; }
.brand-name.on-dark { color: #fff; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a, .nav button.linkish { font: 600 16px/1 var(--body); color: var(--ardoise); text-decoration: none; padding: 10px 12px; border-radius: 10px; }
.nav a:hover, .nav button.linkish:hover { background: var(--mist); }
.nav a[aria-current="page"] { background: var(--mist); box-shadow: inset 0 -3px 0 var(--sauge); }
.nav form { margin: 0; }
button.linkish { background: none; border: 0; cursor: pointer; }
.site-foot { margin-top: 80px; background: var(--graphite); color: #b9c7cb; font-size: .95rem; }
.site-foot .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; padding-top: 46px; padding-bottom: 40px; }
.site-foot img { width: auto; height: auto; max-width: 180px; max-height: 70px; display: block; margin-bottom: 16px; }
.site-foot .brand-name { margin-bottom: 16px; }
.site-foot a { color: #dfe8ea; }
.site-foot h4 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: 0 0 8px; }
.site-foot .legal { grid-column: 1 / -1; border-top: 1px solid var(--dark-3); padding-top: 18px; font-size: .85rem; color: #8a979c; }

/* ----- Messages ----- */
.flash { margin: 18px auto 0; max-width: var(--wrap); padding: 0 22px; }
.flash div { padding: 14px 18px; border-radius: var(--r-s); font-weight: 600; display: flex; gap: 10px; align-items: center; }
.flash .ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #cfe5d8; }
.flash .err { background: var(--err-bg); color: var(--err); border: 1px solid #efd2d2; }
.alert { padding: 14px 18px; border-radius: var(--r-s); margin: 0 0 18px; }
.alert.err { background: var(--err-bg); color: var(--err); border: 1px solid #efd2d2; }
.alert.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #cfe5d8; }
.alert.info { background: var(--mist); color: var(--ardoise); border: 1px solid var(--line); }
.alert.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #ecd3b8; }

/* ----- Boutons et champs ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 12px; border: 1.5px solid var(--ardoise); background: var(--ardoise); color: #fff; font: 700 16px/1.2 var(--body); text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s, transform .2s var(--ease-out); }
.btn:hover { background: var(--dark-3); border-color: var(--dark-3); color: #fff; }
.btn:active { transform: scale(.98); }
.btn.sauge { background: var(--sauge); border-color: var(--sauge); color: var(--on-sauge); }
.btn.sauge:hover { background: var(--sauge-hover); border-color: var(--sauge-hover); color: var(--graphite); }
.btn.ghost { background: transparent; color: var(--ardoise); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--mist); color: var(--ardoise); }
.btn.ghost.on-dark { color: #dfe8ea; border-color: var(--dark-4); }
.btn.ghost.on-dark:hover { background: var(--dark-2); color: #fff; }
.btn.small { min-height: 38px; padding: 8px 14px; font-size: .92rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.danger { background: #fff; color: var(--err); border-color: #e3b9b9; }
.btn.danger:hover { background: var(--err-bg); }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
label { display: block; font-weight: 700; margin: 0 0 6px; color: var(--ardoise); }
.field { margin: 0 0 18px; }
.field .hint { font-size: .88rem; color: var(--ink2); margin-top: 6px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url],
input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  width: 100%; font: 17px/1.4 var(--body); color: var(--ardoise); background: #fff; border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; }
input:focus, select:focus, textarea:focus { border-color: var(--sarcelle); outline: 3px solid color-mix(in srgb, var(--sauge) 35%, transparent); outline-offset: 0; }
/* Cles et secrets de l'administration : champs de texte masques, et non champs « mot de passe ». Le navigateur n'y
   colle donc pas l'identifiant et le mot de passe enregistres pour le site, et ne propose pas d'enregistrer la cle. */
input.secret-input:not(:placeholder-shown) { -webkit-text-security: disc; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .04em; }
textarea { min-height: 120px; resize: vertical; }
textarea.code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .92rem; min-height: 520px; line-height: 1.55; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--sarcelle); flex: none; }
.form-card { max-width: 480px; margin: 48px auto; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { margin: 0; flex: 1 1 200px; }
.sep { display: flex; align-items: center; gap: 14px; color: var(--ink3); margin: 24px 0; font-size: .9rem; }
.sep::before, .sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ----- Atomes repris des recapitulatifs ----- */
.card { background: #fff; border: 1.5px solid var(--brume); border-radius: 20px; box-shadow: var(--shadow); padding: 26px; }
.card.flat { box-shadow: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--mist); border: 1.5px solid var(--brume); font: 600 .9rem/1.1 var(--body); color: var(--ardoise); white-space: nowrap; }
.chip svg.ic { width: 17px; height: 17px; color: var(--sarcelle); }
.chip.sauge { background: var(--sauge); border-color: var(--sauge); color: var(--on-sauge); }
.chip.dark { background: var(--ardoise); border-color: var(--ardoise); color: #fff; }
.chip.dark svg.ic { color: var(--sauge); }
.chip.cu { background: var(--warn-bg); border-color: #ecd3b8; color: var(--warn); }
.chip.ok { background: var(--ok-bg); border-color: #cfe5d8; color: var(--ok); }
.chip.err { background: var(--err-bg); border-color: #efd2d2; color: var(--err); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ardoise); color: #fff; font: 700 18px/1 var(--title); flex: none; }
.num.sauge { background: var(--sauge); color: var(--on-sauge); }
.ibub { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #fff; border: 2.5px solid var(--sauge); color: var(--sarcelle); flex: none; }
.ibub svg.ic { width: 24px; height: 24px; }
.kicker { font: 700 .82rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--sarcelle); margin: 0 0 12px; }
.lead { font-size: 1.2rem; color: var(--ink2); }
.bar { height: 8px; border-radius: 4px; background: var(--tint-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--sauge); border-radius: 4px; transition: width .9s var(--ease); }
.on-dark .bar, .rail .bar { background: var(--dark-3); }
.price { font: 700 2.2rem/1 var(--title); color: var(--ardoise); letter-spacing: -1px; }
.price small { font: 500 .95rem/1.3 var(--body); color: var(--ink2); letter-spacing: 0; display: block; margin-top: 8px; }
.section { padding: 64px 0; }
.section.mist { background: var(--mist); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

/* ----- Accueil ----- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 700px at 72% 18%, var(--dark-2) 0%, var(--graphite) 62%); color: #e6eef0; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 30px; align-items: end; min-height: 560px; }
.hero-text { padding: 72px 0 80px; }
.hero .wrap:not(:has(.hero-photo)) { grid-template-columns: minmax(0, 1fr); min-height: 0; }
.hero .wrap:not(:has(.hero-photo)) .hero-text { max-width: 860px; }
.trainer:not(:has(.ph)) { grid-template-columns: minmax(0, 1fr); }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 1.5rem + 3vw, 3.9rem); margin-bottom: 20px; }
.hero p { color: #b9c7cb; font-size: 1.22rem; max-width: 600px; margin-bottom: 30px; }
.hero .kicker { color: var(--sauge); }
.hero-photo { position: relative; align-self: end; display: flex; justify-content: center; }
.hero-photo::before { content: ""; position: absolute; width: 470px; height: 470px; max-width: 92%; aspect-ratio: 1; bottom: 40px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--sauge) 55%, transparent) 0%, color-mix(in srgb, var(--sauge) 0%, transparent) 68%); }
.hero-photo img { position: relative; display: block; width: 420px; max-width: 100%; height: auto; max-height: 640px; object-fit: contain; object-position: bottom; }
.hero .stem { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; pointer-events: none; }
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: -46px; position: relative; z-index: 2; }
.pillar { background: #fff; border: 1.5px solid var(--brume); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: flex-start; }
.pillar b { display: block; font: 700 1.05rem/1.2 var(--title); color: var(--ardoise); }
/* Texte des cartes seulement : la pastille de l'icone (span.ibub) garde son centrage et sa couleur. */
.pillar > div > span { display: block; font-size: .93rem; color: var(--ink2); margin-top: 4px; line-height: 1.4; }
.catalogue-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.ccard { display: flex; flex-direction: column; background: #fff; border: 1.5px solid var(--brume); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .35s var(--ease-out), box-shadow .35s; }
.ccard:hover { transform: translateY(-4px); box-shadow: 0 22px 48px rgba(38, 46, 53, .14); color: inherit; }
.cover { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(600px 300px at 80% 0%, var(--dark-3) 0%, var(--graphite) 70%); overflow: hidden; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover .gen { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 20px 22px; }
.cover .gen b { font: 700 1.5rem/1.1 var(--title); color: #fff; max-width: 85%; }
.cover .gen svg { position: absolute; right: -10px; bottom: -6px; width: 150px; height: 150px; }
.cover .gen svg .gen-stem { stroke: var(--sarcelle); }
.cover .gen svg .gen-leaf { fill: var(--sauge); }
.cover .gen svg .gen-leaf-2 { fill: var(--sauge-2); }
.cover .badge { position: absolute; left: 14px; top: 14px; }
.ccard .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.ccard h3 { margin: 0; font-size: 1.3rem; }
.ccard p { margin: 0; color: var(--ink2); font-size: .98rem; }
.ccard .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--tint-2); }
.ccard .foot .p { font: 700 1.25rem/1 var(--title); color: var(--ardoise); }
.empty { text-align: center; padding: 50px 20px; }
.empty img { width: 170px; display: block; margin: 0 auto 18px; border-radius: 50%; background: var(--brume); }
.trainer { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 34px; align-items: end; }
.trainer .ph { position: relative; display: flex; justify-content: center; border-radius: 22px; background: radial-gradient(circle at 50% 70%, var(--brume) 0%, var(--mist) 70%); overflow: hidden; padding-top: 20px; }
.trainer .ph img { display: block; width: 240px; }
.trainer .txt { padding-bottom: 12px; }
.quote { font: 700 1.5rem/1.3 var(--title); color: var(--ardoise); margin: 0 0 14px; }

/* ----- Fiche formation ----- */
.course-hero { background: radial-gradient(1100px 600px at 18% 0%, var(--tint-1) 0%, var(--tint-2) 48%, var(--brume) 100%); border-bottom: 1px solid var(--line); }
.course-hero .wrap { padding-top: 46px; padding-bottom: 46px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
.course-hero h1 { margin-bottom: 14px; }
.course-hero .sub { font-size: 1.28rem; color: var(--sarcelle); margin-bottom: 22px; }
.course-hero .prose { margin-top: 20px; }
.hero-objs { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; max-width: 680px; }
.hero-objs li { display: flex; gap: 12px; align-items: flex-start; font-size: 1.05rem; color: var(--ardoise); }
.hero-objs li svg.ic { color: var(--sarcelle); margin-top: 3px; }
.hero-objs-t { font: 700 .82rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--sarcelle); margin: 28px 0 0; }
.buy { position: sticky; top: 96px; }
.buy .cover { border-radius: 14px; margin: -6px -6px 18px; }
.buy ul { list-style: none; padding: 0; margin: 18px 0; }
.buy li { display: flex; gap: 10px; padding: 7px 0; color: var(--ardoise); font-size: .97rem; }
.buy li svg.ic { color: var(--sarcelle); }
.course-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; }
.course-body > .main > section { margin-bottom: 54px; }
.objs { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.objs li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; background: #fff; border: 1.5px solid var(--brume); border-radius: 16px; padding: 16px 18px; }
.objs li p { margin: 2px 0 6px; font-size: 1.05rem; color: var(--ardoise); }
.objs .bloom { font: 600 .8rem/1 var(--body); color: var(--sarcelle); }
.programme { display: grid; gap: 14px; }
.mod { border: 1.5px solid var(--brume); border-radius: 16px; background: #fff; overflow: hidden; }
.mod summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 18px; }
.mod summary::-webkit-details-marker { display: none; }
.mod summary h3 { margin: 0; font-size: 1.12rem; }
.mod summary .meta { font-size: .9rem; color: var(--ink2); }
.mod[open] summary { border-bottom: 1px solid var(--tint-2); background: var(--mist); }
.mod ol { list-style: none; margin: 0; padding: 8px 10px 12px; }
.mod li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 10px; }
.mod li:hover { background: var(--tint-1); }
.mod li .k { color: var(--sarcelle); }
.mod li .d { font-size: .88rem; color: var(--ink3); white-space: nowrap; }
.infos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1.5px solid var(--brume); border-radius: 16px; overflow: hidden; background: #fff; }
.infos div { padding: 16px 18px; border-bottom: 1px solid var(--tint-2); }
.infos div:nth-child(odd) { border-right: 1px solid var(--tint-2); }
.infos dt { font: 700 .8rem/1.2 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--sarcelle); margin-bottom: 6px; }
.infos dd { margin: 0; color: var(--ardoise); font-size: .98rem; }
.results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stat { background: #fff; border: 1.5px solid var(--brume); border-radius: 16px; padding: 18px; border-top: 4px solid var(--sauge); }
.stat b { display: block; font: 700 1.9rem/1.1 var(--title); color: var(--ardoise); }
.stat span { display: block; font-size: .92rem; color: var(--ink2); margin-top: 4px; }
.updated { font-size: .88rem; color: var(--ink3); }

/* ----- Lecteur (repris du recapitulatif anime) ----- */
.player-body { background: var(--graphite); }
.player { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.rail { background: var(--graphite); border-right: 1px solid var(--dark-2); color: #c3ced2; padding: 24px 18px 20px 22px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; }
.rail .logo img { width: auto; height: auto; max-width: 168px; max-height: 60px; display: block; }
.rail .logo { text-decoration: none; }
.rail .course-t { font: 700 1.06rem/1.25 var(--title); color: #fff; margin: 0; }
.rail .course-t a { color: inherit; text-decoration: none; }
.rail .prog { font-size: .86rem; color: #8a979c; }
.rail .prog .bar { margin: 8px 0 4px; }
.agenda { list-style: none; margin: 0; padding: 0; position: relative; }
.agenda::before { content: ""; position: absolute; left: 15px; top: 18px; bottom: 18px; width: 2px; background: var(--dark-3); border-radius: 2px; }
.agenda > li { position: relative; margin: 0 0 8px; }
.agenda .chap { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; }
.node { position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--graphite); border: 2px solid var(--dark-4); display: grid; place-items: center; font: 700 13px/1 var(--title); color: #8a979c; z-index: 1; transition: all .5s var(--ease); }
.leaf { position: absolute; width: 22px; height: 14px; left: 26px; top: -6px; transform: scale(0) rotate(-30deg); transform-origin: 0 100%; transition: transform .7s var(--ease-out); }
.leaf path { fill: var(--sauge); }
.agenda > li.done .node { background: var(--sauge); border-color: var(--sauge); color: var(--on-sauge); }
.agenda > li.done .leaf { transform: scale(1) rotate(-30deg); }
.agenda > li.cur .node { border-color: var(--sauge); color: #fff; background: var(--dark-2); box-shadow: 0 0 0 6px color-mix(in srgb, var(--sauge) 16%, transparent); }
.agenda .chap .t { display: block; font: 600 1rem/1.25 var(--title); color: #c3ced2; margin-top: 6px; }
.agenda > li.cur .chap .t { color: #fff; }
.agenda ol { list-style: none; margin: 8px 0 6px 44px; padding: 0; }
.agenda ol li { margin: 0 0 2px; }
.agenda ol a, .agenda ol span.lock { display: flex; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 10px; color: #a9b6bb; text-decoration: none; font-size: .92rem; line-height: 1.3; }
.agenda ol a:hover { background: var(--dark-1); color: #fff; }
.agenda ol a[aria-current="page"] { background: var(--dark-2); color: #fff; box-shadow: inset 3px 0 0 var(--sauge); }
.agenda ol .st { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--dark-4); flex: none; display: grid; place-items: center; }
.agenda ol .st.done { background: var(--sauge); border-color: var(--sauge); color: var(--on-sauge); }
.agenda ol .st.done svg.ic { width: 12px; height: 12px; stroke-width: 3; }
.agenda ol .st.started { border-color: var(--sauge); }
.agenda ol span.lock { color: #6c787d; cursor: not-allowed; }
.rail .rail-foot { margin-top: auto; border-top: 1px solid var(--dark-2); padding-top: 14px; font-size: .86rem; color: #7f8d93; display: flex; flex-direction: column; gap: 10px; }
.rail .rail-foot a { color: #c3ced2; }
.stagewrap { background: var(--mist); padding: 22px 26px 30px; min-width: 0; }
.stage-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.stage-top .crumb { font-size: .92rem; color: var(--ink2); }
.stage-top .count { margin-left: auto; font: 600 .92rem/1 var(--body); color: var(--ink3); font-variant-numeric: tabular-nums; }
.menu-btn { display: none; }
.stage { background: #fff; border-radius: 18px; box-shadow: 0 18px 44px rgba(38, 46, 53, .10); }   /* largeurs : plus bas */
.stage h1 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.5rem); margin-bottom: 8px; }
.stage .summary { color: var(--ink2); font-size: 1.1rem; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.lesson-nav { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--tint-2); }
.lesson-nav .grow { flex: 1; }
.lesson-nav form { margin: 0; }
.done-mark { display: inline-flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 700; }
.preview-band { background: var(--warn-bg); color: var(--warn); border: 1px solid #ecd3b8; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 600; }

/* contenus */
.prose { max-width: 820px; font-size: 1.06rem; }
.prose h2 { margin-top: 1.6em; font-size: 1.6rem; }
.prose h2::after { content: ""; display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--sauge); margin-top: 10px; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 4px solid var(--sauge); background: var(--mist); border-radius: 0 12px 12px 0; color: var(--ardoise); }
.prose code { background: var(--mist); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .92em; }
.prose pre { background: var(--graphite); color: #e6eef0; padding: 16px 18px; border-radius: 12px; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: .97rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { color: var(--sarcelle); font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }
.table-wrap { overflow-x: auto; }
.md-figure { margin: 1.6em 0; }
.md-figure img { display: block; border-radius: 14px; max-height: min(70vh, 640px); margin: 0 auto; }
.md-figure figcaption { margin-top: 8px; text-align: center; font-size: .9rem; color: var(--sarcelle); }
.md-info { margin: 1.5em 0; }
.md-info-title { font: 700 .82rem/1 var(--body); letter-spacing: .07em; text-transform: uppercase; color: var(--sarcelle); margin: 0 0 12px; }
.md-kpis ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.md-kpis li { margin: 0; padding: 16px 18px; border-radius: 14px; background: var(--mist); border-top: 3px solid var(--sauge); display: flex; flex-direction: column; gap: 4px; }
.md-kpi-value { font: 700 clamp(1.55rem, 1.2rem + 1.2vw, 2.1rem)/1.1 var(--title); color: var(--ardoise); }
.md-kpi-label { font-size: .98rem; line-height: 1.4; color: var(--ardoise); }
.md-kpi-note { font-size: .85rem; line-height: 1.4; color: var(--sarcelle); }
.md-steps ol { list-style: none; padding: 0; margin: 0; counter-reset: md-step; }
.md-steps li { position: relative; counter-increment: md-step; margin: 0; padding: 0 0 20px 54px; min-height: 40px; display: flex; flex-direction: column; gap: 2px; }
.md-steps li::before { content: counter(md-step); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--ardoise); color: #fff; font: 700 1rem/38px var(--title); text-align: center; }
.md-steps li:not(:last-child)::after { content: ""; position: absolute; left: 18px; top: 42px; bottom: 4px; width: 2px; background: var(--brume); }
.md-step-title { font-weight: 700; color: var(--ardoise); padding-top: 7px; line-height: 1.35; }
.md-step-text { color: var(--sarcelle); font-size: .97rem; line-height: 1.5; }
.md-bars ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(7em, 32%) minmax(0, 1fr) auto; gap: 12px 14px; }
.md-bars li { margin: 0; display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; }
.md-bar-label { font-size: .97rem; line-height: 1.35; color: var(--ardoise); }
.md-bar-track { display: block; height: 14px; background: var(--tint-2); border-radius: 0 6px 6px 0; }
.md-bar-fill { display: block; height: 100%; min-width: 2px; background: var(--sarcelle); border-radius: 0 6px 6px 0; }
.md-bar-value { font-weight: 700; color: var(--ardoise); white-space: nowrap; }
.md-compare th[scope=row] { color: var(--ardoise); text-transform: none; letter-spacing: 0; font-size: .97rem; }
.md-compare .md-compare-b { background: var(--tint-2); }
.md-callout { margin: 1.5em 0; padding: 16px 20px; border-radius: 14px; background: var(--mist); border: 1.5px solid var(--brume); border-left: 5px solid var(--sauge); }
.md-callout-title { font: 700 1.02rem/1.3 var(--title); color: var(--ardoise); margin: 0 0 6px; }
.md-callout > :last-child { margin-bottom: 0; }
.md-gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.md-gallery .md-figure { margin: 0; }
.video { position: relative; aspect-ratio: 16 / 9; background: var(--deep); border-radius: 14px; overflow: hidden; box-shadow: 0 18px 40px rgba(38, 46, 53, .18); }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--deep); }
.avatar-tag { display: inline-flex; align-items: center; gap: 8px; }
details.transcript { margin-top: 18px; border: 1.5px solid var(--brume); border-radius: 14px; background: #fff; }
details.transcript summary { cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--ardoise); display: flex; gap: 10px; align-items: center; }
details.transcript .prose { padding: 0 18px 16px; white-space: pre-line; font-size: 1rem; color: var(--ink2); }
.interactive { position: relative; border-radius: 16px; overflow: hidden; background: var(--graphite); box-shadow: 0 30px 70px rgba(0, 0, 0, .25); }
.interactive iframe { display: block; width: 100%; height: min(78vh, 760px); min-height: 460px; border: 0; background: var(--graphite); }
.interactive:fullscreen iframe { height: 100vh; }
.interactive-bar { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.interactive-bar .bar { flex: 1; min-width: 120px; }
.resource { display: flex; gap: 18px; align-items: center; padding: 20px; border: 1.5px solid var(--brume); border-radius: 16px; background: var(--mist); }
.resource b { display: block; font: 700 1.1rem/1.2 var(--title); color: var(--ardoise); }

/* quiz */
.quiz { display: grid; gap: 18px; max-width: 860px; }
.q { border: 1.5px solid var(--brume); border-radius: 16px; padding: 20px 22px; background: #fff; }
.q legend { font: 700 1.1rem/1.35 var(--title); color: var(--ardoise); padding: 0; margin-bottom: 12px; display: flex; gap: 12px; }
.q legend .num { width: 32px; height: 32px; font-size: 15px; }
.q .hint { font-size: .88rem; color: var(--ink3); margin: -6px 0 10px 44px; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin: 0 0 8px; border: 1.5px solid var(--line-strong); border-radius: 12px; cursor: pointer; font-weight: 400; transition: border-color .2s, background .2s; }
.opt:hover { border-color: var(--sauge); background: var(--tint-1); }
.opt input { margin-top: 3px; width: 19px; height: 19px; accent-color: var(--sarcelle); flex: none; }
.opt:has(input:checked) { border-color: var(--sarcelle); background: var(--tint-2); }
.res-head { display: flex; gap: 18px; align-items: center; padding: 20px 22px; border-radius: 16px; margin-bottom: 18px; }
.res-head.good { background: var(--ok-bg); border: 1px solid #cfe5d8; }
.res-head.bad { background: var(--warn-bg); border: 1px solid #ecd3b8; }
.res-head .res-score { font: 700 2.3rem/1 var(--title); color: var(--ardoise); white-space: nowrap; }
.qr { border: 1.5px solid var(--brume); border-radius: 14px; padding: 16px 18px; margin: 0 0 12px; background: #fff; }
.qr.good { border-color: #b9dbc7; }
.qr.bad { border-color: #e7c4c4; }
.qr h4 { margin: 0 0 8px; font-size: 1.02rem; display: flex; gap: 10px; align-items: flex-start; }
.qr ul { list-style: none; padding: 0; margin: 0 0 8px; }
.qr li { padding: 5px 0 5px 28px; position: relative; color: var(--ink2); }
.qr li.right { color: var(--ok); font-weight: 600; }
.qr li.right::before { content: "✓"; position: absolute; left: 4px; }
.qr li.wrong { color: var(--err); text-decoration: line-through; }
.qr li.wrong::before { content: "✗"; position: absolute; left: 4px; text-decoration: none; }
.qr .expl { background: var(--mist); border-radius: 10px; padding: 10px 14px; color: var(--ardoise); font-size: .97rem; }

/* espace apprenant */
.page-head { padding: 40px 0 10px; }
.my-courses { display: grid; gap: 18px; }
.mycard { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 22px; align-items: center; background: #fff; border: 1.5px solid var(--brume); border-radius: 20px; padding: 14px; box-shadow: var(--shadow); }
.mycard .cover { border-radius: 14px; }
.mycard h3 { margin: 0 0 6px; }
.mycard .bar { margin: 12px 0 6px; max-width: 420px; }
.course-home { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; align-items: start; }
.side-box { display: grid; gap: 16px; position: sticky; top: 96px; }
.survey-scale { display: flex; gap: 8px; flex-wrap: wrap; }
.survey-scale label { margin: 0; }
.survey-scale input { position: absolute; opacity: 0; }
.survey-scale span { display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 10px; border-radius: 12px; border: 1.5px solid var(--line-strong); font-weight: 700; cursor: pointer; background: #fff; }
.survey-scale input:checked + span { background: var(--ardoise); border-color: var(--ardoise); color: #fff; }
.survey-scale input:focus-visible + span { outline: 3px solid var(--sauge); outline-offset: 2px; }
.survey-q { padding: 18px 0; border-bottom: 1px solid var(--tint-2); }
.survey-q p { font-weight: 700; margin-bottom: 10px; }
.scale-legend { display: flex; justify-content: space-between; max-width: 290px; font-size: .82rem; color: var(--ink3); margin-top: 6px; }

/* attestation */
.cert { max-width: 1050px; margin: 30px auto; background: #fff; border: 1.5px solid var(--brume); border-radius: 18px; padding: 46px 56px; position: relative; overflow: hidden; }
.cert::before { content: ""; position: absolute; right: -120px; top: -120px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--sauge) 35%, transparent), color-mix(in srgb, var(--sauge) 0%, transparent) 70%); }
.cert-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.cert-head img { width: auto; height: auto; max-width: 220px; max-height: 80px; }
.cert-head .brand-name { font-size: 1.5rem; }
.cert h1 { font-size: 2.3rem; margin: 30px 0 4px; }
.cert .who { font: 700 1.9rem/1.2 var(--title); color: var(--sarcelle); margin: 18px 0; }
.cert .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 22px 0; }
.cert .grid div { background: var(--mist); border-radius: 12px; padding: 12px 14px; }
.cert .grid b { display: block; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--sarcelle); }
.cert ol { margin: 6px 0 0; padding-left: 1.2em; }
.cert .sign { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 28px; gap: 20px; }
.cert .legal { font-size: .8rem; color: var(--ink3); margin-top: 24px; border-top: 1px solid var(--line); padding-top: 12px; }

/* televersement */
.drop { border: 2.5px dashed var(--sauge-hover); border-radius: 20px; padding: 46px 24px; text-align: center; background: var(--mist); cursor: pointer; transition: background .2s, border-color .2s; }
.drop.over { background: var(--tint-2); border-color: var(--sarcelle); }
.drop b { display: block; font: 700 1.25rem/1.3 var(--title); color: var(--ardoise); margin: 12px 0 6px; }

/* administration */
.admin-nav { background: var(--graphite); }
.admin-nav .wrap { display: flex; gap: 4px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.admin-nav a { color: #c3ced2; text-decoration: none; font-weight: 600; padding: 9px 13px; border-radius: 10px; font-size: .95rem; }
.admin-nav a:hover, .admin-nav a[aria-current="page"] { background: var(--dark-2); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 26px; }
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1.5px solid var(--brume); border-radius: 16px; overflow: hidden; font-size: .96rem; }
.table th { text-align: left; font: 700 .78rem/1.2 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--sarcelle); background: var(--mist); padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--tint-2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num-cell { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score { display: inline-grid; place-items: center; min-width: 52px; height: 30px; padding: 0 10px; border-radius: 999px; font: 700 .9rem/1 var(--body); background: var(--mist); border: 1.5px solid var(--brume); }
.score.good { background: var(--ok-bg); color: var(--ok); border-color: #cfe5d8; }
.score.mid { background: var(--warn-bg); color: var(--warn); border-color: #ecd3b8; }
.score.low { background: var(--err-bg); color: var(--err); border-color: #efd2d2; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.checks li.block { border-color: #efd2d2; background: var(--err-bg); }
.checks li.advice { border-color: #ecd3b8; background: var(--warn-bg); }
.checks li.okk { border-color: #cfe5d8; background: var(--ok-bg); }
.checks b { display: block; color: var(--ardoise); }
.checks span { display: block; font-size: .92rem; color: var(--ink2); margin-top: 4px; }
.checks em { font-style: normal; font-size: .8rem; color: var(--sarcelle); font-weight: 700; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.code-box { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; background: var(--graphite); color: #e6eef0; border-radius: 12px; padding: 12px 14px; word-break: break-all; font-size: .92rem; }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps-list li { counter-increment: s; position: relative; padding: 2px 0 14px 42px; }
.steps-list li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--sauge); color: var(--on-sauge); font: 700 .95rem/30px var(--title); text-align: center; }
.oauth-card { max-width: 460px; margin: 60px auto; }
.oauth-card .logo { width: auto; height: auto; max-width: 200px; max-height: 70px; display: block; margin-bottom: 22px; }
.oauth-card .brand-name { margin-bottom: 22px; }
.oauth-card h1 { font-size: 1.9rem; letter-spacing: -.5px; }

/* complements */
.section-title { margin-top: 38px; }
.infos.single { grid-template-columns: minmax(0, 1fr); border: 0; border-radius: 0; }
.infos.single div { border-right: 0 !important; padding: 12px 0; }
blockquote.small { margin: 0 0 10px; padding: 10px 14px; border-left: 3px solid var(--sauge); background: var(--mist); border-radius: 0 10px 10px 0; }
code { background: var(--mist); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .9em; word-break: break-all; }
.trainer-mini h3 { margin-bottom: 8px; }
.stage .prose + .video, .stage .prose + .interactive, .stage .prose + .resource, .stage .prose + .quiz { margin-top: 18px; }
img.center { display: block; margin: 0 auto 10px; }

/* ----- Page de lecon : largeurs adaptees a chaque ecran -----
   La scene s'elargit (jusqu'a 1680 px) et se centre. Le texte garde une largeur de lecture confortable (80 a 90
   caracteres par ligne), avec une police un peu plus grande sur grand ecran ; images, tableaux, galeries, chiffres
   cles, video, contenu interactif et live prennent la largeur disponible. Telephone : marges reduites, images bord
   a bord. Les marges laterales passent par --pad-x, pour que les images bord a bord restent alignees sur la carte. */
.stage-top { max-width: 1680px; margin-left: auto; margin-right: auto; }
.stage {
  --fs: clamp(1.02rem, .94rem + .18vw, 1.15rem);
  --measure: calc(var(--fs) * 44);
  --wide: 84rem;
  --pad-x: clamp(16px, 3.4vw, 64px);
  --video-w: min(var(--wide), max(20rem, calc((100vh - 170px) * 16 / 9)));
  max-width: 1680px; margin: 0 auto; padding: clamp(22px, 2.6vw, 44px) var(--pad-x) 30px;
}
article.stage > *, .stage .prose > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
article.stage > .prose { max-width: none; }
.stage .prose { font-size: var(--fs); }
.stage .summary { font-size: calc(var(--fs) * 1.04); }
article.stage > .preview-band, article.stage > .lesson-nav, article.stage > .video,
.stage .prose > .md-figure, .stage .prose > .md-gallery, .stage .prose > .md-kpis, .stage .prose > .table-wrap,
.stage .prose > pre { max-width: var(--wide); }
/* video : la plus large possible, mais entiere a l'ecran (hauteur de la fenetre) */
article.stage > .video { width: min(100%, var(--video-w)); }
article.stage > .interactive, article.stage > .interactive-bar, article.stage > .live { max-width: none; }
.stage .interactive iframe { height: min(82vh, 900px); }
.stage .md-figure img { max-height: min(82vh, 920px); }
.stage .prose h2, .stage .prose h3 { scroll-margin-top: 18px; }
/* Lecons a media (video, contenu interactif, live) : titre et textes alignes sur le bord gauche du media */
.stage-media { --track: 100%; }
.stage.kind-video, .stage.kind-video_avatar { --track: var(--video-w); }
.stage-media > .lesson-meta, .stage-media > h1, .stage-media > .summary, .stage-media > .preview-band,
.stage-media > details.transcript, .stage-media > .alert, .stage-media .prose > * {
  margin-left: max(0px, calc((100% - var(--track)) / 2)); margin-right: auto;
}
article.stage-media > .lesson-nav { max-width: var(--track); }
/* Tres grands ecrans (iMac 27", ecrans 4K et QHD) : scene, texte et visuels encore plus grands */
@media (min-width: 2200px) {
  .stage-top, .stage { max-width: 1920px; }
  .stage { --fs: 1.2rem; --wide: 100rem; }
}

/* Images des lecons : agrandissement au clic (sur telephone, une infographie se parcourt en grand) */
.stage .prose .md-figure img { cursor: zoom-in; }
.stage .prose > .md-figure { position: relative; }
.img-zoom { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--deep); color: #fff; }
.img-zoom::backdrop { background: color-mix(in srgb, var(--deep) 60%, transparent); }
.img-zoom-box { width: 100%; height: 100%; overflow: auto; display: grid; place-items: center; overscroll-behavior: contain; }
.img-zoom-box img { display: block; width: auto; height: auto; max-width: 96vw; max-height: 92vh; border-radius: 6px; cursor: zoom-out; }
.img-zoom.pan .img-zoom-box { place-items: start; }
.img-zoom.pan .img-zoom-box img { max-width: none; max-height: none; margin: 60px 12px 16px; border-radius: 0; cursor: grab; }
.img-zoom-close { position: fixed; top: 12px; right: 12px; z-index: 2; }
.img-zoom-hint { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #e6eef0; font-size: .88rem; white-space: nowrap; }
@media (hover: none) {
  .stage .prose > .md-figure::after { content: "Agrandir"; position: absolute; top: 8px; right: 8px; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--deep) 66%, transparent); color: #fff; font: 600 .7rem/1.3 var(--body); pointer-events: none; }
}

/* Sommaire de la lecon, sous la lecon en cours dans le programme */
.agenda ol.outline { list-style: none; margin: 2px 0 10px 17px; padding: 2px 0 2px 12px; border-left: 2px solid var(--dark-3); }
.agenda ol.outline li { margin: 0; }
.agenda ol.outline a { display: block; padding: 5px 8px; border-radius: 8px; font-size: .86rem; line-height: 1.3; color: #93a1a6; }
.agenda ol.outline a:hover { background: var(--dark-1); color: #fff; }
.agenda ol.outline a[aria-current="location"] { color: #fff; background: var(--dark-1); box-shadow: inset 2px 0 0 var(--sauge); }

/* ==========================================================================
   Webinaires : salle, regie
   ========================================================================== */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.h3 { font-size: 1.2rem; }
.field.grow, .inline-form .field.grow { flex: 3 1 320px; }
.room-body { background: var(--mist); }
.room-top .wrap { gap: 18px; }
.room-title { display: flex; align-items: center; gap: 12px; min-width: 0; margin-left: auto; }
.room-title b { font: 700 1.02rem/1.25 var(--title); color: var(--ardoise); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; }
.room { padding-top: 22px; padding-bottom: 36px; }
.room-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.room-screen { position: relative; }
.room-wait, .room-join { background: radial-gradient(900px 500px at 20% 0%, var(--dark-2) 0%, var(--graphite) 70%); color: #e6eef0; border-radius: 18px; padding: 46px 34px; min-height: 340px; display: flex; flex-direction: column; justify-content: center; }
.room-wait h1 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
.room-wait .kicker, .room-join .kicker { color: var(--sauge); }
.room-wait .lead, .room-join .lead { color: #c9d5d8; }
.room-join { align-items: flex-start; }
.room-wait .muted { color: #a9b8bd; }
.countdown { font: 600 1.05rem/1.2 var(--body); color: #c9d5d8; margin: 10px 0 18px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.countdown b { font: 700 2.4rem/1 var(--title); color: #fff; font-variant-numeric: tabular-nums; }
.countdown .cd-days.hidden { display: none; }
.video.sync { display: grid; place-items: center; }
.sync-join { position: absolute; z-index: 2; }
.sync-tools { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; z-index: 2; }
.announce { margin-top: 16px; padding: 14px 18px; border-radius: 14px; background: var(--ardoise); color: #fff; font-weight: 600; border-left: 5px solid var(--sauge); }
.offers { display: grid; gap: 14px; margin-top: 16px; }
.offer-card { border-top: 4px solid var(--cuivre); display: grid; gap: 4px; }
.offer-card h3 { margin-bottom: 4px; }
.offer-card .btn { justify-self: start; margin-top: 8px; }
.poll { margin-top: 16px; }
.poll-choices { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.poll-row { display: flex; justify-content: space-between; gap: 10px; font-size: .97rem; margin-bottom: 4px; }
.poll-row.mine span { font-weight: 700; color: var(--sarcelle); }
.room-info { margin-top: 18px; }
.room-side { position: sticky; top: 18px; display: grid; gap: 12px; }
.chat { padding: 20px; display: flex; flex-direction: column; max-height: calc(100vh - 140px); }
.chat h2 { margin-bottom: 10px; }
.chat-list { list-style: none; margin: 0 0 12px; padding: 0; overflow-y: auto; display: grid; gap: 10px; min-height: 120px; max-height: 52vh; }
.chat-msg { background: var(--mist); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; }
.chat-msg p { margin: 2px 0 0; font-size: .96rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg.host { background: var(--tint-2); border-color: var(--sauge); }
.chat-msg.me { border-color: var(--line-strong); }
.chat-msg.masked { opacity: .45; }
.chat-msg.question { border-left: 4px solid var(--cuivre); }
.chat-head b { color: var(--ardoise); font-size: .92rem; }
.chat-form { display: grid; gap: 8px; }
.chat-form textarea { min-height: 64px; resize: vertical; }
.chat-form .btn { justify-self: end; }
.chat-note { color: var(--sarcelle); margin: 8px 0 0; }
.presence { padding: 0 6px; }
.room-foot { padding: 22px 0 30px; }
.room-foot a { color: var(--ink2); }
.regie .chat-list { max-height: 60vh; }
.regie-items { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.regie-items li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.regie-items li:last-child { border-bottom: 0; }
.regie aside .card + .card { margin-top: 16px; }
.regie .chat-msg .actions { margin-top: 6px; }

/* ==========================================================================
   Tunnels de vente : blocs
   ========================================================================== */
.funnel-head .wrap { justify-content: space-between; }
.wrap.narrow, .narrow { max-width: 860px; }
.fb { padding: 30px 0; }
.fb-hero { padding: 64px 0 54px; }
.fb-hero.fond-clair { background: #fff; }
.fb-hero.fond-brume { background: radial-gradient(1100px 600px at 18% 0%, var(--tint-1) 0%, var(--tint-2) 48%, var(--brume) 100%); }
.fb-hero.fond-sombre { background: radial-gradient(1000px 560px at 20% 0%, var(--dark-2) 0%, var(--graphite) 70%); color: #e6eef0; }
.fb-hero.fond-sombre h1, .fb-hero.fond-sombre h2 { color: #fff; }
.fb-hero.fond-sombre .kicker { color: var(--sauge); }
.fb-hero .wrap { max-width: 980px; text-align: center; }
.fb-hero .wrap.with-img { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 34px; align-items: center; text-align: left; }
.fb-hero .wrap.with-img img { border-radius: 18px; box-shadow: var(--shadow-lg); }
.fb-hero .sub { font-size: 1.25rem; color: inherit; opacity: .92; max-width: 760px; margin: 0 auto; }
.fb-hero .wrap.with-img .sub { margin: 0; }
.fb-hero.fond-clair .sub, .fb-hero.fond-brume .sub { color: var(--sarcelle); }
.fb-list { max-width: none; }
.fb-cta { padding: 16px 0 36px; }
.fb-quote { margin: 0; border-left: 5px solid var(--sauge); }
.fb-quote p { font: italic 1.12rem/1.6 var(--body); color: var(--ardoise); }
.fb-quote footer { color: var(--ink2); font-size: .95rem; }
.mod.faq summary { grid-template-columns: minmax(0, 1fr); }
.mod.faq .prose { padding: 4px 22px 16px; }
.fb-price { max-width: 520px; margin: 0 auto; text-align: left; border-top: 4px solid var(--sauge); }
.fb-price ul { list-style: none; padding: 0; margin: 18px 0; }
.fb-price li { display: flex; gap: 10px; padding: 6px 0; }
.fb-price li svg.ic { color: var(--sarcelle); flex: none; margin-top: 3px; }
.countdown-block .countdown { justify-content: center; color: var(--ink2); }
.countdown-block .countdown b { color: var(--ardoise); }
.countdown-block .cd-live { font-weight: 700; color: var(--ardoise); }
.fb-assure { display: flex; gap: 16px; align-items: flex-start; max-width: 640px; margin: 0 auto; }
.fb-webinar { border-top: 4px solid var(--sauge); }
.fb-sessions { list-style: none; padding: 0; margin: 6px 0 10px; display: grid; gap: 8px; }
.fb-sessions li { display: flex; gap: 10px; align-items: center; font-weight: 600; color: var(--ardoise); }
.fb-sessions svg.ic { color: var(--sarcelle); }
.fb-form, .fb-order, .fb-upsell { max-width: 640px; margin: 0 auto; }
.order-line { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.order-line .num-cell { font-weight: 700; white-space: nowrap; }
.order-bump { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0; padding: 14px 16px; border: 2px dashed var(--cuivre); border-radius: 14px; background: #fdf8f3; cursor: pointer; }
.order-bump input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--sarcelle); flex: none; }
.order-bump, .order-bump .small { font-weight: 400; }
.order-bump b { font-weight: 700; }
.fb-upsell { border-top: 4px solid var(--cuivre); }
.fb-upsell form + form { margin-top: 12px; }
.fb-sep { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }

/* editeur de blocs */
.block-editor .card + .card, .block-editor .card + fieldset, .block-editor fieldset + fieldset, .block-editor fieldset + .card { margin-top: 16px; }
.block-card { border-left: 4px solid var(--sauge); }
.block-card legend { padding: 0 8px; }
.sticky-save { position: sticky; bottom: 0; background: rgba(255, 255, 255, .94); padding: 14px 0; margin-top: 16px; border-top: 1px solid var(--line); z-index: 5; }
@media (max-width: 1100px) {
  .room-grid { grid-template-columns: minmax(0, 1fr); }
  .room-side { position: static; }
  .chat { max-height: none; }
  .fb-hero .wrap.with-img { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .room-title b { max-width: 40vw; }
  .room-wait, .room-join { padding: 30px 20px; min-height: 260px; }
  .countdown b { font-size: 1.9rem; }
  .fb-hero { padding: 44px 0 38px; }
}

/* diffusion depuis la regie */
.diffusion-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.diffusion-status { margin: 0; font-weight: 600; color: var(--ardoise); }
.diffusion-status.live::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #c0392b; margin-right: 8px; vertical-align: middle; }
.studio { margin-top: 16px; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.studio-screen { position: relative; aspect-ratio: 16 / 9; background: var(--deep); border-radius: 14px; overflow: hidden; }
.studio-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.studio-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #9fb0b5; margin: 0; }
.err-text { color: var(--err); }
.ok-text { color: var(--ok); font-weight: 600; }
#st-key-box { white-space: pre-wrap; margin-top: 8px; }
fieldset.diffusion { border: 1.5px solid var(--brume); border-radius: 14px; padding: 14px 16px; }
@media (max-width: 1100px) { .studio-grid { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   Live anime par une IA : salle de l'apprenant, tableau des visuels, administration
   ========================================================================== */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.section-gap { margin-top: 18px; }
.plain-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.add-live { margin: 10px 0 4px; padding: 12px 0 0; border-top: 1px dashed var(--line); }
.model-form { align-items: center; gap: 10px 14px; }
.model-form .field { flex: 0 1 150px; }
.model-form .check { align-items: center; gap: 8px; }
.ctx-thumb { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; vertical-align: middle; margin-right: 8px; border: 1px solid var(--line); }
aside > .card + .card, aside > details.card { margin-top: 18px; }
aside .check { margin: 0 0 12px; }
.live-log .chat-msg p { white-space: pre-wrap; }

.live { margin-top: 18px; }
.live-intro { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); gap: 26px; align-items: start; }
.live-intro-side { display: grid; gap: 8px; background: var(--mist); border: 1.5px solid var(--brume); border-radius: 18px; padding: 20px; }
.live-intro-side p { margin: 0 0 6px; }
.live-ai-note { display: flex; gap: 12px; align-items: flex-start; background: var(--tint-2); border: 1.5px solid var(--sauge); border-radius: 14px; padding: 14px 16px; }
.live-ai-note svg.ic { color: var(--sarcelle); margin-top: 2px; }
.live-plan { margin: 0 0 16px; padding-left: 22px; }
.live-plan li { margin-bottom: 4px; }
.live-facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--ink2); }
.live-facts li { display: flex; gap: 10px; align-items: flex-start; }
.live-facts svg.ic { width: 18px; height: 18px; color: var(--sarcelle); margin-top: 2px; }
.btn.loading { opacity: .85; pointer-events: none; }
.btn.loading svg.ic { display: none; }
.btn.loading::before, .spinner { content: ""; display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(45, 53, 60, .25); border-top-color: var(--ardoise); animation: live-spin .8s linear infinite; flex: none; }
@keyframes live-spin { to { transform: rotate(360deg); } }
.live-wait { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; color: var(--sarcelle); font-weight: 600; }
.live-face .spinner { width: 26px; height: 26px; border-color: rgba(255, 255, 255, .25); border-top-color: var(--sauge); }
.live-voice { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: color-mix(in srgb, var(--deep) 82%, transparent); color: #fff; font: 600 .92rem/1.2 var(--body); max-width: calc(100% - 24px); }
.live-voice.listening { background: var(--ok); }
.live-voice.hearing { background: var(--cuivre); color: var(--graphite); }
.live-voice.muted { background: rgba(155, 47, 47, .92); }
.live-out { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--deep) 70%, transparent); color: rgba(255, 255, 255, .6); font: 600 .82rem/1.2 var(--body); }
.live-out.on { color: #fff; }
.live-out-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.live-out-bars i { display: block; width: 3px; height: 4px; border-radius: 2px; background: currentColor; }
.live-out.on .live-out-bars i { animation: live-out 0.9s ease-in-out infinite; }
.live-out.on .live-out-bars i:nth-child(2) { animation-delay: .15s; }
.live-out.on .live-out-bars i:nth-child(3) { animation-delay: .3s; }
@keyframes live-out { 0%, 100% { height: 4px; } 50% { height: 14px; } }
@media (prefers-reduced-motion: reduce) { .live-out.on .live-out-bars i { animation: none; height: 10px; } }
.live-meter { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.live-meter i { display: block; width: 4px; height: 4px; border-radius: 2px; background: currentColor; transition: height .08s linear; }
.live-voice.muted .live-meter, .live-voice.waiting .live-meter { opacity: .35; }
.live-mic[aria-pressed="true"] { background: var(--ok-bg); border-color: #9cc9b0; color: var(--ok); }
.live-board-wait { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border-radius: 12px; background: #fff; border: 1.5px dashed var(--sauge); color: var(--sarcelle); font-weight: 600; }
.live-paused { margin-top: 8px; padding: 26px; border: 1.5px solid var(--brume); border-radius: 18px; background: var(--mist); }

.live-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.live-top .grow { flex: 1; }
.live-top .btn[aria-pressed="true"] { background: var(--ardoise); border-color: var(--ardoise); color: #fff; }
.live-steps { list-style: none; counter-reset: ls; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 14px; }
.live-steps li { counter-increment: ls; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1.5px solid var(--brume); background: #fff; font-size: .88rem; color: var(--ink2); }
.live-steps li::before { content: counter(ls); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--mist); font: 700 .8rem/1 var(--title); color: var(--sarcelle); }
.live-steps li.done { border-color: #cfe5d8; background: var(--ok-bg); color: var(--ok); }
.live-steps li.done::before { content: "✓"; background: var(--ok); color: #fff; }
.live-steps li.current { border-color: var(--sarcelle); color: var(--ardoise); font-weight: 700; }
.live-steps li.current::before { background: var(--sarcelle); color: #fff; }
/* La video garde sa largeur de colonne et ses proportions, quelle que soit la hauteur du tableau : etiree a la hauteur
   d'un tableau haut, elle s'elargissait (rapport 4/3) et passait par-dessus. Elle reste visible en faisant defiler. */
.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; align-items: start; }
.live-scene { position: sticky; top: 12px; align-self: start; width: 100%; min-width: 0; aspect-ratio: 4 / 3; background: var(--deep); border-radius: 16px; overflow: hidden; box-shadow: 0 18px 40px rgba(38, 46, 53, .18); display: grid; place-items: center; }
.live-scene video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--deep); }
.live-face { display: grid; justify-items: center; gap: 8px; color: #dfe8ea; text-align: center; padding: 56px 20px 20px; }
.live-face b { font: 700 1.2rem/1.2 var(--title); color: #fff; }
.live-face-bubble { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; border: 3px solid var(--sauge); color: var(--sauge); }
.live-face-bubble svg.ic { width: 44px; height: 44px; }
.live-room.is-busy .live-face-bubble { animation: live-pulse 1.4s var(--ease) infinite; }
.live-captions { position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--deep) 86%, transparent); color: #fff; font-size: 1.02rem; line-height: 1.4; text-align: center; }
.live-room.is-text .live-scene { aspect-ratio: auto; height: 430px; display: flex; flex-direction: column; align-items: stretch; }
.live-room.is-text .live-face { flex: none; padding: 52px 20px 10px; }
.live-room.is-text .live-face-bubble { width: 64px; height: 64px; }
.live-room.is-text .live-face-bubble svg.ic { width: 30px; height: 30px; }
.live-room.is-text .live-captions { position: static; flex: 1 1 auto; min-height: 0; overflow-y: auto; background: transparent; font-size: 1.05rem; padding: 0 20px; margin: 0 0 16px; text-align: left; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .35) transparent; }
#live-sound { position: absolute; top: 12px; left: 12px; }
.live-board { background: var(--mist); border: 1.5px solid var(--brume); border-radius: 16px; padding: 18px; min-height: 260px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; min-width: 0; }
.live-board-empty { display: grid; justify-items: center; gap: 10px; text-align: center; color: var(--ink2); padding: 34px 12px; }
.live-board-empty p { margin: 0; max-width: 34ch; }
.live-status { min-height: 1.5em; margin: 12px 0 6px; color: var(--ink2); }
.live-suggestions { margin-bottom: 10px; align-items: center; min-height: 38px; }
.live-suggestion[aria-pressed="true"] { background: var(--sauge); border-color: var(--sarcelle); color: var(--on-sauge); }
.live-pick { flex: 1 1 100%; height: 3px; border-radius: 2px; background: var(--brume); overflow: hidden; visibility: hidden; }
.live-pick.run { visibility: visible; }
.live-pick::after { content: ""; display: block; height: 100%; width: 100%; background: var(--sarcelle); transform-origin: left; transform: scaleX(0); }
.live-pick.run::after { animation: live-pick linear forwards; animation-duration: inherit; }
@keyframes live-pick { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.test-mode { margin-top: 10px; padding: 12px 14px; border-radius: 12px; border: 1.5px dashed var(--brume); background: var(--mist); display: grid; gap: 8px; }
.test-mode.on { border-color: var(--cuivre); background: #fbf3ea; }
.test-mode p { margin: 0; }
.test-mode .inline-form { align-items: center; }
.live-board-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.live-board-nav .btn { white-space: nowrap; flex: none; }
.live-board-nav span { flex: 1 1 auto; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-doc { display: grid; gap: 12px; }
.lb-doc-text { max-height: 360px; overflow-y: auto; padding: 14px 16px; border-radius: 12px; background: var(--mist); border: 1px solid var(--line); font-size: 1rem; line-height: 1.55; color: var(--ardoise); overflow-wrap: anywhere; user-select: text; }
.lb-doc-text p { margin: 0 0 10px; }
.lb-doc-text ul { margin: 0 0 10px; padding-left: 20px; }
.lb-doc-text > :last-child { margin-bottom: 0; }
.lb-copy { justify-self: start; }
.chat-doc { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px dashed var(--sauge); font-size: .94rem; }
.chat-doc b { display: block; margin-bottom: 6px; font-size: .86rem; color: var(--sarcelle); }
.chat-doc p { margin: 0 0 6px; }
.chat-doc ul { margin: 0 0 6px; padding-left: 18px; }
.live-suggestion { cursor: pointer; font: inherit; font-size: .92rem; background: #fff; display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-suggestion:hover { border-color: var(--sarcelle); }
.live-input { display: flex; gap: 10px; align-items: stretch; }
.live-input input[type=text] { flex: 1; min-width: 0; }
.live-log-box { margin-top: 16px; border: 1.5px solid var(--brume); border-radius: 14px; padding: 10px 14px; }
.live-log-box summary, .live-past summary { cursor: pointer; font-weight: 700; color: var(--ardoise); }
.live-log { max-height: 320px; margin: 12px 0 4px; }
.live-end { margin-top: 22px; padding-top: 20px; border-top: 2px solid var(--brume); }
.live-end .card { margin-bottom: 18px; }
.live-past { margin-top: 22px; }
.live-past .card { margin-top: 12px; padding: 18px; }
@keyframes live-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sauge) 55%, transparent); } 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--sauge) 0%, transparent); } }

/* Tableau : visuels dessines a partir de la description fournie par l'IA */
.lb-card { background: #fff; border: 1.5px solid var(--brume); border-radius: 14px; padding: 18px; }
.lb-card h3 { font-size: 1.12rem; margin-bottom: 14px; }
.lb-note { margin: 12px 0 0; font-size: .88rem; color: var(--ink2); }
.lb-in { opacity: 0; animation: lb-in .5s var(--ease-out) forwards; }
@keyframes lb-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.lb-num { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--sarcelle); color: #fff; font: 700 .9rem/1 var(--title); }
.lb-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.lb-points li { display: flex; gap: 12px; align-items: flex-start; }
.lb-points b, .lb-steps b, .lb-cnode b, .lb-node b, .lb-col > b, .lb-timeline b { display: block; font: 700 1rem/1.25 var(--title); color: var(--ardoise); }
.lb-points span:not(.lb-num), .lb-steps span:not(.lb-num), .lb-cnode span, .lb-node span, .lb-timeline div span, .lb-figure span { display: block; font-size: .9rem; color: var(--ink2); line-height: 1.35; margin-top: 2px; }
.lb-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.lb-steps li { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 12px; padding-bottom: 16px; }
.lb-steps li .lb-num { grid-row: 1 / span 2; position: relative; z-index: 1; }
.lb-steps li b, .lb-steps li span:not(.lb-num) { grid-column: 2; }
.lb-steps li b { align-self: center; }
.lb-steps li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--sauge); }
.lb-steps li:last-child { padding-bottom: 0; }
.lb-cycle { position: relative; width: min(100%, 440px); aspect-ratio: 1 / 1; margin: 0 auto; }
.lb-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.lb-cnode { position: absolute; transform: translate(-50%, -50%); width: 34%; background: #fff; border: 1.5px solid var(--sauge); border-radius: 12px; padding: 8px 10px; text-align: center; box-shadow: 0 6px 16px rgba(45, 53, 60, .08); }
.lb-cnode.lb-in { animation-name: lb-pop; }
@keyframes lb-pop { from { opacity: 0; transform: translate(-50%, -50%) scale(.85); } to { opacity: 1; transform: translate(-50%, -50%); } }
.lb-edge { fill: none; stroke: var(--sarcelle); stroke-width: 1.8; }
.lb-wires .lb-edge { stroke-width: 2; }
.lb-arrow-head { fill: var(--sarcelle); }
.lb-draw { stroke-dasharray: 600; stroke-dashoffset: 600; animation: lb-draw .7s var(--ease-out) forwards; }
@keyframes lb-draw { to { stroke-dashoffset: 0; } }
.lb-edge-label { font: 600 12px var(--body); fill: var(--sarcelle); paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.lb-diagram { position: relative; }
.lb-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.lb-layers { position: relative; display: flex; gap: 46px; align-items: center; justify-content: center; }
.lb-layer { display: grid; gap: 22px; flex: 1 1 0; min-width: 0; }
.lb-node { background: #fff; border: 1.5px solid var(--sauge); border-radius: 12px; padding: 10px 12px; text-align: center; box-shadow: 0 6px 16px rgba(45, 53, 60, .08); }
.lb-compare { display: grid; gap: 12px; }
.lb-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lb-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lb-col { background: var(--mist); border: 1.5px solid var(--brume); border-radius: 12px; padding: 12px; }
.lb-col ul { margin: 8px 0 0; padding-left: 18px; font-size: .92rem; }
.lb-badge { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 999px; background: var(--sauge); color: var(--on-sauge); font-size: .8rem; font-weight: 700; }
.lb-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.lb-figure { background: var(--mist); border: 1.5px solid var(--brume); border-top: 4px solid var(--cuivre); border-radius: 12px; padding: 12px; }
.lb-figure b { display: block; font: 700 1.7rem/1.1 var(--title); color: var(--ardoise); }
.lb-figure .lb-figure-label { font-weight: 700; color: var(--ardoise); }
.lb-table { font-size: .92rem; }
.lb-quote { margin: 0; padding: 6px 0 6px 18px; border-left: 4px solid var(--sauge); }
.lb-quote p { margin: 0; font: 600 1.15rem/1.4 var(--title); color: var(--ardoise); }
.lb-quote cite { display: block; margin-top: 8px; font-style: normal; font-size: .9rem; color: var(--ink2); }
.lb-timeline { list-style: none; padding: 0 0 0 14px; margin: 0; border-left: 2px solid var(--sauge); display: grid; gap: 14px; }
.lb-timeline li { position: relative; display: grid; grid-template-columns: minmax(70px, auto) minmax(0, 1fr); gap: 12px; }
.lb-timeline li::before { content: ""; position: absolute; left: -21px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--sarcelle); border: 2px solid #fff; }
.lb-when { font: 700 .9rem/1.3 var(--title); color: var(--sarcelle); }
.lb-image { margin: 0; }
.lb-image img { display: block; width: 100%; max-height: 420px; object-fit: contain; border-radius: 10px; background: var(--mist); }
.lb-image figcaption { margin-top: 8px; font-size: .9rem; color: var(--ink2); }
.lb-wait { display: grid; place-items: center; min-height: 180px; border-radius: 10px; background: var(--mist); color: var(--ink2); animation: live-pulse 1.6s var(--ease) infinite; }
.lb-question { border-color: var(--cuivre); }
.lb-choices { display: grid; gap: 8px; }
.lb-choice { text-align: left; font: inherit; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: #fff; color: var(--ardoise); cursor: pointer; }
.lb-choice:hover:not(:disabled) { border-color: var(--sarcelle); background: var(--mist); }
.lb-choice:disabled { cursor: default; opacity: .85; }
.lb-choice.picked { border-color: var(--ardoise); font-weight: 700; }
.lb-choice.right { border-color: #9cc9b0; background: var(--ok-bg); color: var(--ok); opacity: 1; }
.lb-choice.wrong { border-color: #e3b9b9; background: var(--err-bg); color: var(--err); opacity: 1; }
.lb-feedback { margin: 12px 0 0; }
@media (max-width: 900px) {
  .live-intro, .live-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .live-scene { position: relative; top: auto; aspect-ratio: 16 / 10; }
  .live-room.is-text .live-scene { height: 340px; }
  .live-board { padding: 12px; }
  .live-board-nav .btn { padding: 6px 10px; font-size: .85rem; min-height: 34px; }
  .live-board-nav span { font-size: .82rem; }
  .lb-layers { gap: 30px; }
  .lb-cols-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .live-input { flex-wrap: wrap; }
  .live-input input[type=text] { flex: 1 1 100%; order: -1; }
  .live-input .btn { flex: 1; }
  .lb-cols-2 { grid-template-columns: minmax(0, 1fr); }
  .lb-cnode { width: 40%; font-size: .9rem; }
}

/* largeurs des barres de progression (pas de style en ligne) */
.w0{width:0%} .w1{width:1%} .w2{width:2%} .w3{width:3%} .w4{width:4%} .w5{width:5%} .w6{width:6%} .w7{width:7%} .w8{width:8%} .w9{width:9%} .w10{width:10%} .w11{width:11%} .w12{width:12%} .w13{width:13%} .w14{width:14%} .w15{width:15%} .w16{width:16%} .w17{width:17%} .w18{width:18%} .w19{width:19%} .w20{width:20%} .w21{width:21%} .w22{width:22%} .w23{width:23%} .w24{width:24%} .w25{width:25%} .w26{width:26%} .w27{width:27%} .w28{width:28%} .w29{width:29%} .w30{width:30%} .w31{width:31%} .w32{width:32%} .w33{width:33%} .w34{width:34%} .w35{width:35%} .w36{width:36%} .w37{width:37%} .w38{width:38%} .w39{width:39%} .w40{width:40%} .w41{width:41%} .w42{width:42%} .w43{width:43%} .w44{width:44%} .w45{width:45%} .w46{width:46%} .w47{width:47%} .w48{width:48%} .w49{width:49%} .w50{width:50%} .w51{width:51%} .w52{width:52%} .w53{width:53%} .w54{width:54%} .w55{width:55%} .w56{width:56%} .w57{width:57%} .w58{width:58%} .w59{width:59%} .w60{width:60%} .w61{width:61%} .w62{width:62%} .w63{width:63%} .w64{width:64%} .w65{width:65%} .w66{width:66%} .w67{width:67%} .w68{width:68%} .w69{width:69%} .w70{width:70%} .w71{width:71%} .w72{width:72%} .w73{width:73%} .w74{width:74%} .w75{width:75%} .w76{width:76%} .w77{width:77%} .w78{width:78%} .w79{width:79%} .w80{width:80%} .w81{width:81%} .w82{width:82%} .w83{width:83%} .w84{width:84%} .w85{width:85%} .w86{width:86%} .w87{width:87%} .w88{width:88%} .w89{width:89%} .w90{width:90%} .w91{width:91%} .w92{width:92%} .w93{width:93%} .w94{width:94%} .w95{width:95%} .w96{width:96%} .w97{width:97%} .w98{width:98%} .w99{width:99%} .w100{width:100%}
.md-bar-fill.w0 { min-width: 0; }
@media (max-width: 1100px) {
  .player { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; inset: 0 auto 0 0; width: min(330px, 88vw); z-index: 40; transform: translateX(-102%); transition: transform .35s var(--ease); box-shadow: var(--shadow-lg); }
  .rail.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .stagewrap { padding: 14px 12px 24px; }
  .stage { border-radius: 16px; }
  .course-hero .wrap, .course-body, .course-home, .two-col { grid-template-columns: minmax(0, 1fr); }
  .buy, .side-box { position: static; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-text { padding: 56px 0 10px; }
  .hero-photo img { width: 300px; }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-foot .wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .brand img { max-width: 150px; max-height: 48px; }
  .site-head .wrap { min-height: 62px; gap: 8px; }
  .nav a, .nav button.linkish { padding: 8px 8px; font-size: 15px; }
  .grid-2, .grid-3, .results, .infos, .cert .grid { grid-template-columns: minmax(0, 1fr); }
  .infos div:nth-child(odd) { border-right: 0; }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .mycard { grid-template-columns: minmax(0, 1fr); }
  .trainer { grid-template-columns: minmax(0, 1fr); }
  .courses { grid-template-columns: minmax(0, 1fr); }
  .cert { padding: 26px 20px; }
  .table { display: block; overflow-x: auto; }
  .interactive iframe { min-height: 380px; }
  .md-bars ul { grid-template-columns: minmax(0, 1fr) auto; }
  .md-bar-label { grid-column: 1 / -1; }
}
/* Telephone (apres les regles tablette, qu'il complete) : marges reduites, images de la lecon bord a bord */
@media (max-width: 560px) {
  .stagewrap { padding: 10px 8px 20px; }
  .stage { border-radius: 14px; }
  .stage .prose > .md-figure { max-width: none; margin-left: calc(-1 * var(--pad-x)); margin-right: calc(-1 * var(--pad-x)); }
  .stage .prose > .md-figure img { border-radius: 0; }
  .stage .prose > .md-figure figcaption { padding: 0 var(--pad-x); }
  /* tableaux : une fiche par ligne, chaque valeur sous le titre de sa colonne (plus de colonnes ecrasees) */
  .stage .prose .table-wrap { overflow: visible; }
  .stage .prose .table, .stage .prose .table tbody, .stage .prose .table tr, .stage .prose .table td,
  .stage .prose .table th[scope="row"] { display: block; width: auto; }
  .stage .prose .table { border: 0; border-radius: 0; background: none; overflow: visible; }
  .stage .prose .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stage .prose .table tr { margin: 0 0 12px; padding: 12px 14px; border: 1.5px solid var(--brume); border-radius: 14px; background: #fff; }
  .stage .prose .table td, .stage .prose .table th[scope="row"] { padding: 3px 0; border: 0; background: none; }
  .stage .prose .table th[scope="row"], .stage .prose .table td[data-label=""] { font-weight: 700; color: var(--ardoise); }
  .stage .prose .table td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; margin-top: 6px; font: 700 .74rem/1.3 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--sarcelle); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01s !important; animation: none !important; }
}
/* ----------------------------------------------------- Charte graphique et espaces (administration) */
.brand-form { display: grid; gap: 20px; }
.brand-group { margin: 0; min-width: 0; }
.brand-group legend { font: 700 1.15rem/1.2 var(--title); color: var(--ardoise); padding: 0 8px; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 4px 22px; }
.brand-color { width: 100%; height: 52px; padding: 4px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: #fff; cursor: pointer; }
.brand-image { padding-bottom: 18px; border-bottom: 1px solid var(--tint-2); }
.brand-image:last-child { border-bottom: 0; padding-bottom: 0; }
.brand-thumb { margin: 0 0 10px; padding: 12px; border: 1.5px dashed var(--line-strong); border-radius: 12px; background: var(--mist); display: flex; width: fit-content; max-width: 100%; }
.brand-thumb.on-dark { background: var(--graphite); border-color: var(--dark-4); }
.brand-thumb img { display: block; max-width: 100%; max-height: 120px; width: auto; height: auto; }
.brand-image-actions { margin-top: 10px; gap: 6px 20px; }
.brand-preview h2 { margin-top: 4px; }
.brand-preview .btn { cursor: default; }
.brand-preview-dark { margin: 16px 0 12px; padding: 18px; border-radius: 14px; background: var(--graphite); color: #dfe8ea; }
.brand-preview-dark img { max-width: 170px; max-height: 48px; width: auto; height: auto; }
.brand-preview-dark p { margin: 10px 0 0; font-size: .92rem; }
.space-card { margin-bottom: 24px; }
.space-card h2 { margin: 0 0 4px; }
.space-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.space-head p { margin: 0; }
.space-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.space-stats .stat b small { font-size: .55em; font-weight: 600; color: var(--ink3); }
.space-admins { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.space-admins li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border: 1.5px solid var(--brume); border-radius: 12px; background: var(--mist); }
.space-admins form { margin: 0; }
.space-open { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--tint-2); }
.space-link input { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem; }
.space-link { margin-bottom: 24px; border-color: var(--cuivre); }
.space-steps { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 8px; }
.space-command { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86rem; line-height: 1.5; resize: vertical; background: var(--mist); }
@media (max-width: 760px) {
  .space-card .grid-2 { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .site-head, .site-foot, .flash, .no-print, .admin-nav { display: none !important; }
  body { background: #fff; }
  .cert { border: 0; margin: 0; padding: 0; max-width: none; box-shadow: none; }
  .cert::before { display: none; }
  @page { size: A4 landscape; margin: 14mm; }
}
