/* ==========================================================================
   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;
}
*, *::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: 190px; }
.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: 180px; display: block; 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 #3a454d; 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: #3a454d; border-color: #3a454d; color: #fff; }
.btn:active { transform: scale(.98); }
.btn.sauge { background: var(--sauge); border-color: var(--sauge); color: var(--graphite); }
.btn.sauge:hover { background: #a3c5c8; border-color: #a3c5c8; color: var(--graphite); }
.btn.ghost { background: transparent; color: var(--ardoise); border-color: #c7d8da; }
.btn.ghost:hover { background: var(--mist); color: var(--ardoise); }
.btn.ghost.on-dark { color: #dfe8ea; border-color: #46535c; }
.btn.ghost.on-dark:hover { background: #33404a; 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], select, textarea {
  width: 100%; font: 17px/1.4 var(--body); color: var(--ardoise); background: #fff; border: 1.5px solid #c9dadb; border-radius: 12px; padding: 12px 14px; }
input:focus, select:focus, textarea:focus { border-color: var(--sarcelle); outline: 3px solid rgba(143, 183, 186, .35); outline-offset: 0; }
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); }
.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(--graphite); }
.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: #e3eded; 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: #3a454d; }
.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%, #33424b 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 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, rgba(143, 183, 186, .55) 0%, rgba(143, 183, 186, 0) 68%); }
.hero-photo img { position: relative; display: block; width: 420px; max-width: 100%; }
.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); }
.pillar 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%, #3b4a53 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 .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 #e7efef; }
.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%, #f7fbfb 0%, #eaf2f3 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 #e7efef; 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: #f7fafa; }
.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 #e7efef; }
.infos div:nth-child(odd) { border-right: 1px solid #e7efef; }
.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 #333d45; 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: 168px; display: block; }
.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: #3a454d; 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 #4a565e; 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(--graphite); }
.agenda > li.done .leaf { transform: scale(1) rotate(-30deg); }
.agenda > li.cur .node { border-color: var(--sauge); color: #fff; background: #33414a; box-shadow: 0 0 0 6px rgba(143, 183, 186, .16); }
.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: #2f3a42; color: #fff; }
.agenda ol a[aria-current="page"] { background: #33414a; color: #fff; box-shadow: inset 3px 0 0 var(--sauge); }
.agenda ol .st { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #4a565e; flex: none; display: grid; place-items: center; }
.agenda ol .st.done { background: var(--sauge); border-color: var(--sauge); color: var(--graphite); }
.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 #333d45; 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); padding: 34px 40px 30px; max-width: 1100px; }
.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 #e7efef; }
.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: #e3eded; 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: #f1f8f8; }
.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: #10161a; 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: #10161a; }
.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 #dde8e9; border-radius: 12px; cursor: pointer; font-weight: 400; transition: border-color .2s, background .2s; }
.opt:hover { border-color: var(--sauge); background: #f7fbfb; }
.opt input { margin-top: 3px; width: 19px; height: 19px; accent-color: var(--sarcelle); flex: none; }
.opt:has(input:checked) { border-color: var(--sarcelle); background: #eef6f6; }
.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 #c9dadb; 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 #e7efef; }
.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, rgba(143, 183, 186, .35), rgba(143, 183, 186, 0) 70%); }
.cert-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.cert-head img { width: 220px; }
.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 #a9c3c6; border-radius: 20px; padding: 46px 24px; text-align: center; background: var(--mist); cursor: pointer; transition: background .2s, border-color .2s; }
.drop.over { background: #e6f1f1; 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: #33414a; 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 #e9f0f0; 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(--graphite); font: 700 .95rem/30px var(--title); text-align: center; }
.oauth-card { max-width: 460px; margin: 60px auto; }
.oauth-card .logo { width: 200px; display: block; 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; }

/* 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 { padding: 24px 20px 22px; 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 { width: 150px; }
  .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; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01s !important; animation: none !important; }
}
@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; }
}
