/* ===== Thème « Formation » — élégant, boutons bleus ===== */
:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #1b1f2a;
  --ink-2: #4a5061;
  --muted: #7a7f8c;
  --line: #e7e3da;
  --blue: #2152d9;
  --blue-dark: #173fae;
  --blue-soft: #eaf0fe;
  --danger: #c2362f;
  --ok: #1b7f4b;
  --warn: #b26a00;
  --d: #e34948; --i: #eda100; --s: #1baf7a; --c: #2a78d6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(27,31,42,.04), 0 8px 24px rgba(27,31,42,.06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 .5rem; }
h2 { font-size: 1.35rem; margin: 0 0 .75rem; }
h3 { font-size: 1.05rem; margin: 1.1rem 0 .4rem; }
a { color: var(--blue); text-underline-offset: 3px; }
img, video { max-width: 100%; display: block; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.lead { color: var(--ink-2); font-size: 1.05rem; margin: 0 0 1.25rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 600; color: var(--blue); margin: 0 0 .4rem; }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ----- Boutons ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .7rem 1.25rem; border-radius: 10px;
  border: 1px solid transparent; font: 600 .95rem/1.2 var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, box-shadow .15s, transform .15s, border-color .15s; }
.btn:focus-visible { outline: 3px solid #9db7f5; outline-offset: 2px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 1px 2px rgba(33,82,217,.3), 0 4px 14px rgba(33,82,217,.22); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 2px 4px rgba(33,82,217,.3), 0 8px 20px rgba(33,82,217,.28); }
.btn-primary:disabled { background: #a9b8e6; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-ghost { background: var(--surface); color: var(--blue); border-color: #cdd8f6; }
.btn-ghost:hover { background: var(--blue-soft); }
.btn-ghost:disabled { color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a02a24; }
.btn-sm { padding: .45rem .85rem; font-size: .85rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-add { background: var(--surface); border: 1px dashed #b9c8f1; color: var(--blue-dark); }
.btn-add:hover { background: var(--blue-soft); border-style: solid; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; width: 2rem; height: 2rem; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover:not(:disabled) { background: var(--blue-soft); color: var(--blue); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.danger:hover { background: #fdecea; color: var(--danger); }

/* ----- Formulaires ----- */
.form { display: grid; gap: 1rem; }
label { display: grid; gap: .35rem; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
label small { font-weight: 400; color: var(--muted); }
input, textarea, select { width: 100%; font: 1rem/1.4 var(--sans); color: var(--ink); background: #fff; border: 1px solid #d9d4c9;
  border-radius: 10px; padding: .7rem .85rem; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(33,82,217,.14); }
label.check { display: flex; align-items: flex-start; gap: .6rem; font-weight: 400; }
label.check input { width: auto; margin-top: .3rem; }
.inline { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.inline input, .inline select { flex: 1 1 200px; width: auto; }
.file-btn { display: inline-flex; font-weight: 600; }

/* ----- Alertes & pastilles ----- */
.alert { padding: .8rem 1rem; border-radius: 10px; margin: 0 0 1.25rem; font-size: .95rem; border: 1px solid; }
.alert-ok { background: #edf8f1; border-color: #bfe5cd; color: #145c38; }
.alert-error { background: #fdf0ee; border-color: #f3c7c2; color: #8f2620; }
.pill { display: inline-grid; place-items: center; min-width: 2.4rem; padding: .15rem .55rem; border-radius: 999px; font: 700 .8rem/1.4 var(--sans);
  color: #fff; letter-spacing: .04em; }
.pill-d { background: var(--d); } .pill-i { background: #c98500; } .pill-s { background: #15936a; } .pill-c { background: var(--c); }
.pill-lg { font-size: 1rem; min-width: 3rem; padding: .25rem .7rem; vertical-align: middle; }
.status { font-size: .85rem; font-weight: 600; }
.status.ok { color: var(--ok); } .status.wip { color: var(--warn); } .status.none { color: var(--muted); }

/* ----- Connexion / inscription ----- */
.auth-body { min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(1200px 600px at 50% -10%, #e4ebfb 0%, rgba(228,235,251,0) 60%), var(--bg); }
.auth-wrap { flex: 1; width: 100%; max-width: 440px; margin: 0 auto; padding: 3rem 16px 2rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font: 600 1.15rem var(--serif); margin-bottom: 1.75rem; }
.brand.small { margin: 0; font-size: 1.05rem; }
.brand-mark { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 10px; background: var(--blue); color: #fff;
  font: 700 .85rem var(--sans); letter-spacing: .05em; box-shadow: 0 4px 12px rgba(33,82,217,.3); }
.auth-wrap > .brand { display: flex; justify-content: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.auth-card { padding: 2.25rem 2rem; }
.auth-card h1 { font-size: 1.9rem; }
.switch { text-align: center; margin: 1.25rem 0 0; color: var(--ink-2); font-size: .95rem; }
.auth-foot { text-align: center; padding: 1.5rem; font-size: .85rem; }
.auth-foot a, .foot a { color: var(--muted); }

/* ----- Mise en page ----- */
.topbar { background: rgba(255,255,255,.85); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar-in { max-width: 1100px; margin: 0 auto; padding: .7rem 16px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.topnav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; font-size: .92rem; }
.topnav a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.topnav a:hover, .topnav a.on { color: var(--blue); }
.topnav a.on { font-weight: 700; }
.topnav form { margin: 0; }
.who { color: var(--muted); font-size: .85rem; }
.page { max-width: 1000px; margin: 0 auto; padding: 2rem 16px 3rem; }
.page.wide { max-width: 1100px; }
.foot { text-align: center; padding: 1.5rem 16px 2.5rem; color: var(--muted); font-size: .85rem; }
.crumbs { margin: 0 0 1rem; font-size: .9rem; }
.crumbs a { text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { color: var(--blue); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.head-row h1, .head-row h2 { margin: 0; }
.section-title { margin: 2.25rem 0 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; align-items: start; }

/* ----- Espace participant ----- */
.hero { display: grid; grid-template-columns: 1fr minmax(280px, 380px); gap: 1.5rem; align-items: end; }
@media (max-width: 720px) { .hero { grid-template-columns: 1fr; } }
.unlock label { margin-bottom: .5rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.fcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.fcard:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(27,31,42,.05), 0 16px 32px rgba(27,31,42,.1); }
.fcard-cover { aspect-ratio: 16 / 9; background: #e9eefb; overflow: hidden; }
.fcard-cover img { width: 100%; height: 100%; object-fit: cover; }
.fcard-cover-empty { display: grid; place-items: center; background: linear-gradient(135deg, #2152d9, #5b86f0); }
.fcard-cover-empty span { font: 600 3rem var(--serif); color: rgba(255,255,255,.9); }
.fcard-body { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.fcard-body h3 { margin: 0; font-size: 1.15rem; }
.fcard-body p { margin: 0; color: var(--ink-2); font-size: .92rem; flex: 1; }
.fcard-body .btn { align-self: flex-start; margin-top: .4rem; }
.empty { text-align: center; padding: 2rem; }
.list { display: grid; }
.list-row { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; padding: .75rem .25rem; border-bottom: 1px solid var(--line);
  color: inherit; text-decoration: none; }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: #fafaf7; }
.list-row form { margin: 0; }
.danger-zone { margin-top: 2.5rem; border: 1px solid #f0d3cf; border-radius: var(--radius); padding: .9rem 1.25rem; background: #fffaf9; }
.danger-zone summary { cursor: pointer; color: var(--danger); font-weight: 600; }
.danger-zone form { margin-top: 1rem; }

/* ----- Page formation ----- */
.formation .cover { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.5rem; box-shadow: var(--shadow); }
.formation-head { margin-bottom: 1.5rem; }
.disc-cta { display: flex; gap: 1.5rem; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #f1f5ff 100%); border-color: #d6e0fa; }
.disc-cta h2 { margin-bottom: .3rem; }
.disc-cta p { margin: .2rem 0; max-width: 60ch; }
.cta-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.prose { font-size: 1.05rem; }
.prose p, .prose li { color: #2c3140; }
.prose h2 { margin-top: 2rem; }
.prose blockquote { margin: 1.25rem 0; padding: .6rem 1.1rem; border-left: 3px solid var(--blue); background: var(--blue-soft); border-radius: 0 10px 10px 0; }
.prose figure { margin: 1.75rem 0; }
.prose figure img, .prose figure video { width: 100%; border-radius: 12px; box-shadow: var(--shadow); background: #000; }
.prose figcaption { text-align: center; color: var(--muted); font-size: .88rem; margin-top: .5rem; }
.yt { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0f1320; box-shadow: var(--shadow); }
.yt iframe { width: 100%; height: 100%; border: 0; }
.yt-play { width: 100%; height: 100%; border: 0; cursor: pointer; color: #fff; display: grid; place-content: center; gap: .4rem; text-align: center;
  background: radial-gradient(circle at 50% 45%, #2b3350, #0f1320); font: 600 1rem var(--sans); }
.yt-play small { color: #a9b0c4; font-weight: 400; }
.yt-icon { width: 4rem; height: 4rem; margin: 0 auto .4rem; border-radius: 50%; background: var(--blue); display: grid; place-items: center; font-size: 1.4rem;
  box-shadow: 0 8px 24px rgba(33,82,217,.5); transition: transform .15s; }
.yt-play:hover .yt-icon { transform: scale(1.08); }

/* ----- Test DISC ----- */
.test-head { margin-bottom: 1.5rem; }
.progress { height: 8px; background: #e6e2d8; border-radius: 999px; overflow: hidden; margin: 1rem 0 .4rem; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), #5b86f0); border-radius: 999px; transition: width .35s ease; }
.progress.small { height: 6px; margin: .2rem 0; }
.question { border: 1px solid var(--line); margin: 0; padding: 1.5rem; }
.question legend { font: 600 1.2rem var(--serif); padding: 0 .35rem; }
.q-head, .q-row { display: grid; grid-template-columns: 1fr 5.5rem 5.5rem; align-items: center; gap: .5rem; }
.q-head { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: .25rem; }
.q-col { text-align: center; }
.q-row { padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 12px; margin-bottom: .6rem; transition: background .15s, border-color .15s; }
.q-row.is-most { background: #edf3ff; border-color: #aac0f4; }
.q-row.is-least { background: #f7f6f2; border-color: #d9d4c9; }
.q-row.is-least .q-text { color: var(--muted); }
.q-text { font-size: 1rem; }
.q-pick { display: grid; place-items: center; cursor: pointer; }
.q-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.q-pick span:not(.sr) { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid #d3cec3;
  font-size: 1.1rem; filter: grayscale(1); opacity: .55; transition: all .15s; background: #fff; }
.q-pick:hover span:not(.sr) { opacity: .9; border-color: var(--blue); }
.q-pick input:checked + span { filter: none; opacity: 1; border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 3px rgba(33,82,217,.15); }
.q-pick.least input:checked + span { border-color: #8a8f9c; background: #efeee9; box-shadow: 0 0 0 3px rgba(122,127,140,.15); }
.q-pick input:focus-visible + span { outline: 3px solid #9db7f5; outline-offset: 2px; }
.q-hint { margin: .4rem 0 0; font-size: .85rem; }
.test-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; }
@media (max-width: 560px) {
  .q-head, .q-row { grid-template-columns: 1fr 3.2rem 3.2rem; }
  .q-head { font-size: .62rem; }
  .question { padding: 1rem; }
}

/* ----- Résultat DISC ----- */
.result-head { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; margin-bottom: 1.25rem; }
@media (max-width: 800px) { .result-head { grid-template-columns: 1fr; } }
.result-head h1 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
.tagline { font-weight: 600; color: var(--blue); margin: 0 0 .75rem; }
.blend { background: var(--blue-soft); border-radius: 10px; padding: .75rem 1rem; }
.disc-chart { margin: 0; display: grid; gap: .8rem; }
.dc-row { display: grid; grid-template-columns: 8.5rem 1fr 4.2rem; gap: .75rem; align-items: center; }
.dc-label { font-size: .92rem; color: var(--ink-2); }
.dc-label strong { color: var(--ink); display: inline-block; width: 1.1rem; }
.dc-bar { width: 100%; height: 14px; display: block; }
.dc-track { fill: #efece5; }
.dc-fill { transition: width .6s ease; }
.dc-d { fill: var(--d); } .dc-i { fill: var(--i); } .dc-s { fill: var(--s); } .dc-c { fill: var(--c); }
.dc-val { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.disc-chart figcaption { font-size: .82rem; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
@media (max-width: 700px) { .result-grid { grid-template-columns: 1fr; } }
.rcard h2 { font-size: 1.2rem; }
.rcard ul, .rcard ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .45rem; }
.rcard.good { border-top: 4px solid var(--ok); }
.rcard.warn { border-top: 4px solid #d98a00; }
.rcard .avoid li::marker { content: "✕  "; color: var(--danger); }
.rcard.tips { margin-bottom: 1.25rem; border-top: 4px solid var(--blue); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* ----- Admin ----- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); display: grid; gap: .15rem; }
.tile span { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.tile strong { font: 600 2.2rem/1.1 var(--serif); }
.tile small { color: var(--ink-2); }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.filters input, .filters select { width: auto; padding: .5rem .7rem; font-size: .9rem; }
.table-wrap { overflow-x: auto; padding: 0; }
.table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: .92rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .8rem 1rem; border-bottom: 1px solid var(--line); background: #fbfaf7; }
.table td { padding: .75rem 1rem; border-bottom: 1px solid #f0ede6; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table a { text-decoration: none; }
.add-form { margin-top: 1rem; }

/* ----- Éditeur ----- */
.editor { display: grid; gap: 1.25rem; }
.editor-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem; }
@media (max-width: 860px) { .editor-grid { grid-template-columns: 1fr; } }
.switch-row { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: center; font-weight: 400; margin-bottom: 1rem; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 2.6rem; height: 1.5rem; border-radius: 999px; background: #d9d4c9; position: relative; transition: background .15s; grid-row: 1; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 1.12rem; height: 1.12rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch-row input:checked + .switch-ui { background: var(--blue); }
.switch-row input:checked + .switch-ui::after { transform: translateX(1.1rem); }
.switch-row input:focus-visible + .switch-ui { outline: 3px solid #9db7f5; outline-offset: 2px; }
.cover-preview { aspect-ratio: 16 / 9; border-radius: 10px; border: 1px dashed #cfc9bd; display: grid; place-items: center; overflow: hidden; margin-bottom: .6rem; background: #faf9f6; }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.blocks-editor { display: grid; gap: 1rem; margin-bottom: 1rem; }
.block-card { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; background: #fcfbf8; }
.block-tools { display: flex; align-items: center; gap: .4rem; margin-bottom: .75rem; }
.block-type { font-weight: 700; font-size: .85rem; color: var(--ink-2); margin-right: auto; }
.md-bar { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .5rem; }
.md-bar button { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: .3rem .6rem; font-size: .82rem; cursor: pointer; color: var(--ink-2); }
.md-bar button:hover { background: var(--blue-soft); color: var(--blue); border-color: #cdd8f6; }
.media-block { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 1rem; align-items: start; }
@media (max-width: 640px) { .media-block { grid-template-columns: 1fr; } }
.media-preview { border-radius: 10px; overflow: hidden; background: #f0ede6; aspect-ratio: 16 / 9; display: grid; place-items: center; }
.media-preview img, .media-preview video { width: 100%; height: 100%; object-fit: cover; }
.media-empty { color: var(--muted); font-size: .9rem; }
.ok-hint { color: var(--ok); margin: 0; font-size: .88rem; }
.err-hint { color: var(--danger); margin: 0; font-size: .88rem; }
.upload-status { margin: 0; font-size: .85rem; }
.add-bar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding-top: .5rem; border-top: 1px dashed var(--line); }
.empty-blocks { text-align: center; padding: 1.5rem; }
.save-bar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: .75rem; padding: .9rem 1rem; background: rgba(246,244,239,.92);
  backdrop-filter: blur(6px); border-top: 1px solid var(--line); margin: 0 -16px; }

/* ----- Test : consigne en bas & écran de chargement ----- */
.test-note { margin: 1.5rem 0 0; font-size: .92rem; text-align: center; }
.loading-screen { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(900px 500px at 50% 30%, #eef3ff 0%, rgba(246,244,239,.97) 60%); animation: fade-in .3s ease; }
.loading-box { text-align: center; max-width: 420px; }
.loading-box h2 { font-size: 2rem; margin: 1.5rem 0 .3rem; }
.loading-main { font-size: 1.15rem; margin: 0 0 .6rem; color: var(--ink); }
.loading-step { min-height: 1.5em; font-size: .95rem; animation: pulse-text 1.5s ease-in-out infinite; }
.loader { display: flex; gap: .6rem; justify-content: center; }
.ld { width: 1.1rem; height: 1.1rem; border-radius: 50%; animation: bounce 1.1s ease-in-out infinite; }
.ld-d { background: var(--d); } .ld-i { background: var(--i); animation-delay: .12s; }
.ld-s { background: var(--s); animation-delay: .24s; } .ld-c { background: var(--c); animation-delay: .36s; }
body.is-loading { overflow: hidden; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .6; } 40% { transform: translateY(-14px); opacity: 1; } }
@keyframes pulse-text { 50% { opacity: .55; } }
@keyframes fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ld, .loading-step, .loading-screen { animation: none; } }

/* ----- Résultat : actions, réglages ----- */
.result-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.result-actions .crumbs { margin: 0; }
.pdf-hint { background: var(--blue-soft); border: 1px solid #cdd8f6; border-radius: 10px; padding: .7rem 1rem; font-size: .92rem; }
.print-only { display: none; }
.settings-zone { margin-top: 2.5rem; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.25rem; background: var(--surface); }
.settings-zone summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
.settings-zone form { margin-top: 1rem; max-width: 420px; }
.settings-zone + .danger-zone { margin-top: 1rem; }

/* ----- Impression / PDF ----- */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body { background: #fff; font-size: 11pt; }
  .topbar, .foot, .no-print, .crumbs, .danger-zone, .settings-zone, .btn { display: none !important; }
  .page { padding: 0; max-width: none; }
  .print-only { display: block; }
  .print-brand { font-size: 9pt; color: var(--muted); margin: 0 0 6mm; text-transform: uppercase; letter-spacing: .1em; }
  .card { box-shadow: none; border-color: #ddd; break-inside: avoid; }
  .result-head { grid-template-columns: 1.2fr 1fr; gap: 8mm; }
  .result-grid { grid-template-columns: 1fr 1fr; gap: 5mm; }
  .rcard { padding: 5mm; }
  .rcard ul, .rcard ol { gap: 1.5mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; text-decoration: none; }
}

/* ----- Analyse approfondie & carte des styles ----- */
.analysis { margin-bottom: 1.25rem; }
.analysis h3 { margin-top: 1.2rem; }
.analysis-grid { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 1.75rem; align-items: center; }
@media (max-width: 760px) { .analysis-grid { grid-template-columns: 1fr; } }
.analysis-text h3:first-child { margin-top: 0; }
.disc-map { width: 100%; height: auto; display: block; overflow: visible; }
.dm-rim { fill: #fff; stroke: #ece8df; stroke-width: 1; filter: drop-shadow(0 6px 18px rgba(27,31,42,.08)); }
.dm-ring { fill: none; stroke: #fff; stroke-width: 1.5; stroke-dasharray: 2 5; opacity: .9; }
.dm-edge { fill: none; stroke: #fff; stroke-width: 3; }
.dm-axis { stroke: #fff; stroke-width: 2.5; }
.dm-center { fill: #c9c3b6; }
.dm-lbl { font: 700 10.5px var(--sans); fill: #8a8f9c; letter-spacing: .12em; text-transform: uppercase; }
.dm-letter { font: 700 17px var(--serif); fill: #fff; }
.dm-name { font: 600 11px var(--sans); fill: var(--ink-2); letter-spacing: .02em; }
.dm-dot { stroke: #fff; stroke-width: 3; }
.dm-num { font: 700 11px var(--sans); fill: #fff; pointer-events: none; }
.dm-halo { opacity: .18; transform-box: fill-box; transform-origin: center; animation: dm-pulse 2.4s ease-in-out infinite; }
.dm-you rect { fill: var(--ink); }
.dm-you text { font: 700 10.5px var(--sans); fill: #fff; letter-spacing: .04em; }
.dm-pt { cursor: default; }
.dm-pt:hover .dm-dot { stroke-width: 4; }
@keyframes dm-pulse { 0%, 100% { transform: scale(.85); opacity: .22; } 50% { transform: scale(1.15); opacity: .08; } }
@media (prefers-reduced-motion: reduce) { .dm-halo { animation: none; } }
@media print { .dm-halo { animation: none; } }
.badge-int { display: inline-block; font: 700 .78rem var(--sans); padding: .2rem .6rem; border-radius: 999px; vertical-align: middle; background: var(--blue-soft); color: var(--blue-dark); }
.int-marque { background: #fdecea; color: #a02a24; } .int-mixte { background: #fff4db; color: #8a5a00; } .int-equilibre { background: #e7f6ee; color: #145c38; }
.adapt-low { background: #e7f6ee; color: #145c38; } .adapt-mid { background: #fff4db; color: #8a5a00; } .adapt-high { background: #fdecea; color: #a02a24; }
.adapt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin: .75rem 0; }
.disc-chart.mini { gap: .45rem; }
.disc-chart.mini figcaption { font-size: .88rem; margin-bottom: .2rem; }
.disc-chart.mini .dc-row { grid-template-columns: 1.5rem 1fr 3.2rem; }
.disc-chart.mini .dc-bar { height: 10px; }
@media print { .analysis { break-inside: auto; } .analysis-grid { grid-template-columns: 70mm 1fr; } }

/* ----- Admin : carte du jour ----- */
.lead.flush { margin: 0; }
.day-chips { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin: 0 0 1rem; }
.chip { display: inline-flex; gap: .35rem; align-items: center; padding: .25rem .65rem; border-radius: 999px; border: 1px solid #cdd8f6; background: #fff; font-size: .85rem; text-decoration: none; color: var(--blue-dark); }
.chip span { background: var(--blue-soft); border-radius: 999px; padding: 0 .4rem; font-size: .75rem; font-weight: 700; }
.chip.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.chip.on span { background: rgba(255,255,255,.25); color: #fff; }
.is-disabled { pointer-events: none; opacity: .4; }
.tile-mini strong { font-size: 1.6rem; }
.tile-link { text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.tile-link:hover { transform: translateY(-2px); }
.map-layout { display: grid; grid-template-columns: minmax(300px, 480px) 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 860px) { .map-layout { grid-template-columns: 1fr; } }
.num-dot { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; color: #fff; font-weight: 700; font-size: .85rem; }
.dc-bg-d { background: var(--d); } .dc-bg-i { background: #c98500; } .dc-bg-s { background: #15936a; } .dc-bg-c { background: var(--c); }

/* ----- Graphiques v2 : anneau, colonnes, carte plus compacte ----- */
.analysis-grid { grid-template-columns: minmax(200px, 270px) 1fr; }
.analysis-map { max-width: 270px; margin: 0 auto; width: 100%; }
.donut-wrap { margin: 0; display: grid; grid-template-columns: minmax(150px, 190px) 1fr; gap: 1.25rem; align-items: center; }
.donut-wrap figcaption { grid-column: 1 / -1; font-size: .82rem; }
@media (max-width: 420px) { .donut-wrap { grid-template-columns: 1fr; justify-items: center; } }
.disc-donut { width: 100%; height: auto; display: block; }
.dn-seg { transition: stroke-width .15s; }
.dn-seg:hover { stroke-width: 34; }
.dn-pct { font: 700 12px var(--sans); fill: #fff; pointer-events: none; }
.dn-center { font: 700 34px var(--serif); fill: var(--ink); letter-spacing: .02em; }
.dn-sub { font: 600 10px var(--sans); fill: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.donut-legend li { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; padding: .5rem .75rem; border-radius: 10px; background: #faf9f6; border: 1px solid var(--line); border-left-width: 4px; }
.donut-legend .lg-dot { width: .7rem; height: .7rem; border-radius: 50%; }
.lg-d { border-left-color: var(--d) !important; } .lg-d .lg-dot { background: var(--d); }
.lg-i { border-left-color: var(--i) !important; } .lg-i .lg-dot { background: var(--i); }
.lg-s { border-left-color: var(--s) !important; } .lg-s .lg-dot { background: var(--s); }
.lg-c { border-left-color: var(--c) !important; } .lg-c .lg-dot { background: var(--c); }
.lg-name { font-size: .92rem; color: var(--ink-2); }
.lg-name strong { color: var(--ink); margin-right: .15rem; }
.lg-val { font: 700 1.05rem var(--sans); font-variant-numeric: tabular-nums; }
.cols-wrap { margin: .75rem 0 1rem; max-width: 560px; }
.cols-legend { display: grid; gap: .3rem; font-size: .88rem; margin-bottom: .6rem; }
.sw { display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; vertical-align: -2px; margin-right: .45rem; }
.sw-shown { background: linear-gradient(90deg, var(--d) 0 25%, var(--i) 25% 50%, var(--s) 50% 75%, var(--c) 75%); }
.sw-natural { background: linear-gradient(90deg, var(--d) 0 25%, var(--i) 25% 50%, var(--s) 50% 75%, var(--c) 75%); opacity: .38; outline: 1.5px solid #b9b3a6; outline-offset: -1.5px; }
.disc-cols { width: 100%; height: auto; display: block; }
.disc-cols .col-natural { fill-opacity: .35; stroke-width: 1.5; }
.disc-cols path.col-natural[fill="#e34948"] { stroke: #e34948; } .disc-cols path.col-natural[fill="#eda100"] { stroke: #eda100; }
.disc-cols path.col-natural[fill="#1baf7a"] { stroke: #1baf7a; } .disc-cols path.col-natural[fill="#2a78d6"] { stroke: #2a78d6; }
.disc-cols .dc-grid { stroke: #efece5; stroke-width: 1; }
.disc-cols .dc-base { stroke: #cfc9bd; stroke-width: 1; }
.col-val { font: 700 11px var(--sans); fill: var(--ink-2); }
.col-lbl { font: 700 15px var(--serif); fill: var(--ink); }
@media print { .donut-wrap { grid-template-columns: 45mm 1fr; } .analysis-map { max-width: 60mm; } }


/* Aperçu administrateur */
.preview-bar { background: #fff4db; border: 1px solid #f1d9a0; color: #6b4a00; border-radius: 10px; padding: .7rem 1rem; margin-bottom: 1.25rem; font-size: .92rem; }
.preview-bar a { color: #6b4a00; font-weight: 600; }
.pw-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.pw-options h3 { margin: 0; font-size: 1rem; }
.settings-zone .pw-options form { margin-top: 0; max-width: none; }

/* ----- Chapitres, sommaire, progression ----- */
.test-progress { margin: 0 0 1rem; }
.toc .head-row { align-items: flex-start; }
.toc-list { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: .5rem; }
.toc-item { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; padding: .85rem 1rem; border: 1px solid var(--line);
  border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--surface-2); transition: border-color .15s, transform .15s, background .15s; }
.toc-item:hover { border-color: #b9c8f1; transform: translateX(3px); background: var(--blue-soft); }
.toc-num { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark); font-weight: 700; font-size: .9rem; flex: none; }
.is-done .toc-num { background: var(--ok); color: #fff; }
.toc-title { font-weight: 600; }
.toc-go { font-size: .85rem; color: var(--blue); font-weight: 600; }
.is-done .toc-go { color: var(--ok); }
.all-done { background: #e7f6ee; color: #145c38; border-radius: 10px; padding: .8rem 1rem; font-weight: 600; margin: 0; }
.progress-box { min-width: 220px; }
.progress-top { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; margin-bottom: .35rem; }
.pbar { display: block; width: 100%; height: 8px; }
.pbar-track { fill: var(--track); }
.pbar-fill { fill: var(--ok); }
.mini-progress { display: grid; grid-template-columns: minmax(60px, 120px) auto; gap: .5rem; align-items: center; margin-top: .35rem; }
.mini-progress small { color: var(--muted); white-space: nowrap; }
.ch-checks { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .35rem; }
.ch-check { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; font-size: .7rem; font-weight: 700; background: var(--track); color: var(--muted); }
.ch-check.on { background: var(--ok); color: #fff; }
.chapter-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 860px) { .chapter-layout { grid-template-columns: 1fr; } .chapter-side { position: static !important; } }
.chapter-side { position: sticky; top: 5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.side-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .25rem; }
.side-list a { display: flex; gap: .6rem; align-items: center; padding: .45rem .5rem; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: .92rem; }
.side-list a:hover { background: var(--blue-soft); }
.side-list a.on { background: var(--blue-soft); color: var(--blue-dark); font-weight: 700; }
.side-list .toc-num { width: 1.6rem; height: 1.6rem; font-size: .78rem; }
.chapter-crumbs { margin-bottom: 1rem; }
.done-box { margin: 2rem 0 1rem; padding: 1rem 1.25rem; border: 2px dashed #b9c8f1; border-radius: var(--radius); background: var(--surface); transition: all .2s; }
.done-box.is-done { border-style: solid; border-color: #9fd9b8; background: #edf8f1; }
.done-check { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: center; cursor: pointer; font-weight: 400; color: var(--ink); }
.done-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.done-ui { width: 1.9rem; height: 1.9rem; border-radius: 8px; border: 2px solid #9db0e8; background: #fff; display: grid; place-items: center; transition: all .15s; }
.done-check:hover .done-ui { border-color: var(--blue); }
.done-check input:checked + .done-ui { background: var(--ok); border-color: var(--ok); }
.done-check input:checked + .done-ui::after { content: "✓"; color: #fff; font-weight: 700; font-size: 1.15rem; }
.done-check input:focus-visible + .done-ui { outline: 3px solid #9db7f5; outline-offset: 2px; }
.chapter-nav { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0; padding-top: 1.25rem; border-top: 1px solid var(--line); }

/* ----- Commentaires ----- */
.comments { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.comment { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; margin-bottom: .75rem; }
.comment.reply { margin: .75rem 0 .25rem 1.5rem; background: var(--surface-2); }
.comment.by-admin { border-left: 4px solid var(--blue); }
.c-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.avatar { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark); font-weight: 700; font-size: .85rem; }
.by-admin .avatar { background: var(--blue); color: #fff; }
.badge-trainer { background: var(--blue); color: #fff; font-size: .7rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; letter-spacing: .03em; }
.c-body { white-space: normal; word-wrap: break-word; color: var(--ink); }
.c-del { margin-left: auto; }
.link-danger { background: none; border: 0; color: var(--danger); font-size: .82rem; cursor: pointer; padding: 0; }
.link-danger:hover { text-decoration: underline; }
.reply-box { margin-top: .6rem; }
.reply-box summary { cursor: pointer; color: var(--blue); font-size: .88rem; font-weight: 600; }
.reply-box form { margin-top: .5rem; }
.comment-form { margin-top: 1.25rem; }
.mod-list { display: grid; gap: .9rem; }
.mod-item.by-admin { border-left: 4px solid var(--blue); }
.mod-where { margin-left: auto; text-decoration: none; }
.mod-parent { margin: .3rem 0 .5rem; padding: .4rem .8rem; border-left: 3px solid var(--line); color: var(--muted); font-size: .88rem; }
.mod-actions { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-top: .6rem; }
.danger-text { color: var(--danger); border-color: #f0c9c5; }

/* ----- Éditeur : chapitres ----- */
.chapters-section { display: grid; gap: 1rem; }
.chapters-editor { display: grid; gap: 1rem; }
.ch-card { padding: 1rem 1.25rem; border-left: 4px solid var(--blue); }
.ch-head { display: flex; align-items: center; gap: .5rem; }
.ch-toggle { background: none; border: 0; font-size: 1.1rem; cursor: pointer; color: var(--ink-2); width: 1.6rem; }
.ch-num { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; flex: none; }
.ch-title-input { flex: 1; font: 600 1.05rem var(--serif); border-color: transparent; background: transparent; }
.ch-title-input:hover { border-color: var(--line); }
.ch-count { white-space: nowrap; }
.ch-stats { margin: .4rem 0 0 4.1rem; }
.ch-card.open .blocks-editor { margin-top: 1rem; }

/* ----- Paramètres ----- */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.info-list { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.5rem; margin: 0; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; }

/* ----- Bouton mode sombre ----- */
.theme-toggle { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; width: 2.3rem; height: 2.3rem; cursor: pointer; font-size: 1rem;
  display: grid; place-items: center; transition: transform .2s, background .2s; }
.theme-toggle:hover { transform: rotate(-15deg); background: var(--blue-soft); }
.auth-theme { position: fixed; top: calc(1rem + env(safe-area-inset-top, 0px)); right: 1rem; z-index: 10; }

/* ===== Mode sombre ===== */
:root { --surface-2: #faf9f6; --track: #efece5; }
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12151c; --surface: #1b1f29; --surface-2: #20242f; --ink: #eef0f5; --ink-2: #c3c8d4; --muted: #8d94a5; --line: #2d3240;
  --blue: #4f7df0; --blue-dark: #9db7ff; --blue-soft: #1f2a45; --track: #2a2f3c;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
}
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] .auth-body { background: radial-gradient(1200px 600px at 50% -10%, #1c2640 0%, rgba(28,38,64,0) 60%), var(--bg); }
[data-theme="dark"] .topbar { background: rgba(18,21,28,.85); }
[data-theme="dark"] input, [data-theme="dark"] textarea, [data-theme="dark"] select { background: #151922; border-color: #343a4a; color: var(--ink); }
[data-theme="dark"] .btn-ghost, [data-theme="dark"] .btn-add, [data-theme="dark"] .icon-btn, [data-theme="dark"] .md-bar button { background: var(--surface-2); border-color: #34405e; }
[data-theme="dark"] .btn-ghost:hover, [data-theme="dark"] .btn-add:hover { background: var(--blue-soft); }
[data-theme="dark"] .card, [data-theme="dark"] .tile, [data-theme="dark"] .fcard, [data-theme="dark"] .comment { border-color: var(--line); }
[data-theme="dark"] a.list-row:hover, [data-theme="dark"] .table th { background: var(--surface-2); }
[data-theme="dark"] .table td { border-color: var(--line); }
[data-theme="dark"] .alert-ok, [data-theme="dark"] .all-done, [data-theme="dark"] .done-box.is-done { background: #14301f; border-color: #25583a; color: #9be0b6; }
[data-theme="dark"] .alert-error { background: #3a1a18; border-color: #6d2c27; color: #f3b0a9; }
[data-theme="dark"] .danger-zone { background: #231716; border-color: #5a2a26; }
[data-theme="dark"] .preview-bar { background: #33290f; border-color: #6b5720; color: #f1d58a; }
[data-theme="dark"] .preview-bar a { color: #f1d58a; }
[data-theme="dark"] .q-row.is-least, [data-theme="dark"] .q-pick span:not(.sr) { background: var(--surface-2); }
[data-theme="dark"] .q-pick.least input:checked + span { background: #2a2f3c; }
[data-theme="dark"] .disc-cta { background: linear-gradient(135deg, #1b1f29 0%, #1c2640 100%); border-color: #2f3f66; }
[data-theme="dark"] .donut-legend li, [data-theme="dark"] .block-card, [data-theme="dark"] .cover-preview, [data-theme="dark"] .media-preview { background: var(--surface-2); border-color: var(--line); }
[data-theme="dark"] .dc-track, [data-theme="dark"] .disc-donut circle:first-child { fill: var(--track); }
[data-theme="dark"] .disc-donut circle:first-of-type { stroke: var(--track); }
[data-theme="dark"] .dn-center, [data-theme="dark"] .col-lbl { fill: var(--ink); }
[data-theme="dark"] .col-val { fill: var(--ink-2); }
[data-theme="dark"] .disc-cols .dc-grid { stroke: #2a2f3c; }
[data-theme="dark"] .dm-rim { fill: var(--surface); stroke: var(--line); }
[data-theme="dark"] .dm-name { fill: var(--ink-2); }
[data-theme="dark"] .loading-screen { background: radial-gradient(900px 500px at 50% 30%, #1c2640 0%, rgba(18,21,28,.97) 60%); }
[data-theme="dark"] .done-ui { background: #151922; border-color: #4a5a85; }
[data-theme="dark"] .rcard.good, [data-theme="dark"] .rcard.warn, [data-theme="dark"] .rcard.tips { border-top-width: 4px; }
[data-theme="dark"] .blend, [data-theme="dark"] .pdf-hint { background: var(--blue-soft); border-color: #2f3f66; }
[data-theme="dark"] .prose p, [data-theme="dark"] .prose li { color: var(--ink-2); }
[data-theme="dark"] .save-bar { background: rgba(18,21,28,.92); }
[data-theme="dark"] .switch-ui { background: #3a4050; }
[data-theme="dark"] .chip { background: var(--surface-2); border-color: #34405e; }
@media print { [data-theme="dark"] { color-scheme: light; --bg: #fff; --surface: #fff; --surface-2: #faf9f6; --ink: #1b1f2a; --ink-2: #4a5061; --muted: #7a7f8c; --line: #e7e3da; --track: #efece5; } }
.topnav a.admin-link { background: var(--blue); color: #fff; padding: .35rem .8rem; border-radius: 999px; font-weight: 600; }
.topnav a.admin-link:hover { background: var(--blue-dark); color: #fff; }
[data-theme="dark"] .topnav a.admin-link:hover { color: #12151c; }
.unlock-card { margin-bottom: 1.25rem; }
.hero { grid-template-columns: 1fr; }

/* ----- Lightbox : carte de positionnement ----- */
.map-open { margin-top: 1rem; }
.result-head .donut-wrap + .map-open { justify-self: start; }
dialog.lightbox { border: 0; border-radius: 18px; padding: 1.25rem 1.5rem 1.5rem; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
dialog.lightbox[open] { animation: lb-in .22s ease; }
dialog.lightbox::backdrop { background: rgba(15,19,32,.6); backdrop-filter: blur(3px); }
@keyframes lb-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.lb-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .5rem; }
.lb-head h2 { margin: 0; font-size: 1.2rem; }
.lb-close { background: var(--surface-2); border: 1px solid var(--line); border-radius: 50%; width: 2.2rem; height: 2.2rem; cursor: pointer; flex: none; color: var(--ink-2); }
.lb-close:hover { background: var(--blue-soft); color: var(--blue); }
.lb-map { max-width: 380px; margin: 0 auto; }
.lb-text { text-align: center; font-size: 1.05rem; margin: .5rem 0; }
@media (prefers-reduced-motion: reduce) { dialog.lightbox[open] { animation: none; } }

/* ----- Carte de positionnement au-dessus de l'anneau ----- */
.result-visuals { display: grid; gap: 1.25rem; }
.map-inline { margin: 0; text-align: center; }
.map-inline .disc-map { max-width: 300px; margin: 0 auto; }
.map-inline figcaption { font-size: .92rem; margin-top: .25rem; color: var(--ink-2); }
@media print { .map-inline .disc-map { max-width: 60mm; } }

/* Axes de progression dans l'en-tête du résultat */
.result-head { align-items: start; }
.tips-inline { margin-top: 1.25rem; padding: 1rem 1.1rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--blue); }
.tips-inline h2 { font-size: 1.1rem; margin: 0 0 .6rem; }
.tips-inline ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .5rem; }
