/* ==========================================================================
   Espace stagiaire Provence FAC — complète site.css (charte du site)
   ========================================================================== */

@view-transition { navigation: none; }
:root { --ok: #3D6140; --ko: #C0573E; --ok-bg: #E8F0E3; --ko-bg: #FFF1EC; --nsp-bg: #EEF3E9; }

.espace main { min-height: 60vh; }
.brand span { display: inline-flex; flex-direction: column; line-height: 1.05; }
.brand small { font-family: var(--f-text); font-size: .74rem; font-weight: 500; letter-spacing: .02em; color: var(--violet-dark); }
.eyebrow { margin: 0 0 14px; font-size: .9rem; font-weight: 500; color: var(--violet-dark); letter-spacing: .01em; }
.h-small { font-size: 1.45rem; margin: 40px 0 16px; }
.h-tiny { font-family: var(--f-text); font-size: .9rem; font-weight: 500; color: var(--ink-strong); margin: 22px 0 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.narrow { max-width: 860px; }
.espace-hero { padding: clamp(32px, 5vw, 64px) 0 clamp(40px, 5vw, 64px); }
.espace-hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); }
.espace-hero--compact h1 { font-size: clamp(2rem, 3.8vw, 2.9rem); }
.espace-hero .lede { margin-top: 20px; }

/* ---------- Messages ---------- */
.flash { margin: 18px 0 0; padding: 14px 18px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--mist); color: var(--ink-strong); font-size: .97rem; }
.flash--succes { border-color: color-mix(in srgb, var(--violet) 45%, var(--line)); background: var(--ok-bg); }
.flash--erreur { border-color: color-mix(in srgb, var(--orange) 55%, var(--line)); background: var(--ko-bg); }
.form .flash, .login-card .flash { margin: 0 0 18px; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span:first-child, .choice-group > legend, .field legend { font-weight: 500; color: var(--ink-strong); font-size: .98rem; }
.field small, .choice-group small { color: var(--violet-dark); font-size: .86rem; line-height: 1.45; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
input[type=text], input[type=email], input[type=password], input:not([type]), select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px; border: 1px solid #D3DBCB; background: #fff;
  font: 400 1rem/1.4 var(--f-text); color: var(--ink-strong); transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 22%, transparent); }
[aria-invalid="true"] input, input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--ko); }
.pw { position: relative; display: block; }
.pw input { padding-right: 92px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 6px 12px; border: 0; border-radius: 9px; background: var(--mist); color: var(--violet-deep); font: 500 .85rem var(--f-text); cursor: pointer; }
.btn--block { width: 100%; }
.btn--danger { background: #fff; color: #B23A1F; border-color: color-mix(in srgb, var(--orange) 50%, var(--line)); }
.btn--danger:hover { background: var(--ko-bg); }
.req { color: var(--orange); }
.field-error { margin: 2px 0 0; color: #B23A1F; font-size: .9rem; font-weight: 500; }
.inline-check { display: flex; gap: 10px; align-items: center; font-size: .92rem; margin: 6px 0 12px; }
.inline-check input { width: 18px; height: 18px; accent-color: var(--violet-deep); }

/* ---------- Connexion ---------- */
.login { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh - var(--header-h) - 80px); }
.login-card { align-self: center; justify-self: center; width: min(100% - 2 * var(--gutter), 440px); padding: clamp(40px, 6vw, 72px) 0; }
.login-card--wide { width: min(100% - 2 * var(--gutter), 540px); }
.login-card h1 { font-size: clamp(2.2rem, 4vw, 3rem); }
.login-card .lede { margin: 14px 0 28px; font-size: 1.05rem; }
.login-help { margin-top: 22px; }
.login-aside { position: relative; overflow: hidden; background: var(--night); isolation: isolate; }
.login-aside::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(520px circle at 50% 46%, rgba(111,154,104,.38), transparent 62%), radial-gradient(420px circle at 80% 90%, rgba(180,131,106,.18), transparent 64%); }
.login-beam { position: absolute; left: 50%; top: 0; height: 46%; width: 2px; transform: translateX(-50%); background: linear-gradient(180deg, rgba(111,154,104,0), #6F9A68 60%, #fff); box-shadow: 0 0 22px 4px rgba(111,154,104,.55); }
.login-spot { position: absolute; left: 50%; top: 46%; width: 300px; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(111,154,104,.45) 0%, rgba(180,131,106,.14) 42%, rgba(217,174,85,0) 70%); }
.login-spot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.login-spot circle { fill: none; stroke-width: .45; opacity: .8; }
.login-spot i { position: absolute; inset: 41%; border-radius: 50%; background: radial-gradient(circle, #fff 0 22%, #CFE0C8 40%, #6F9A68 62%, rgba(111,154,104,0) 76%); box-shadow: 0 0 40px 8px rgba(111,154,104,.55); }
.login-steps { position: absolute; left: 0; right: 0; bottom: 12%; margin: 0; padding: 0; list-style: none; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.login-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: #E6ECE1; font-size: .92rem; }
.login-steps b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: var(--ink-strong); font: 500 .85rem var(--f-display); }
@media (max-width: 860px) { .login { grid-template-columns: 1fr; } .login-aside { display: none; } }
.checks { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: center; font-size: .95rem; }
.checks svg { width: 20px; height: 20px; flex: none; padding: 3px; border-radius: 50%; }
.checks .ok svg { background: var(--ok-bg); color: var(--ok); }
.checks .warn svg { background: var(--ko-bg); color: var(--ko); }

/* ---------- Tableau de bord ---------- */
.overall { display: flex; align-items: center; gap: 16px; margin-top: 30px; max-width: 520px; }
.overall span { font-size: .95rem; color: var(--violet-dark); white-space: nowrap; }
.overall-bar, .meter { flex: 1; height: 8px; border-radius: 8px; background: var(--mist-2); overflow: hidden; }
.overall-bar i, .meter i { display: block; height: 100%; border-radius: inherit; background: var(--spectrum); transition: width .6s var(--ease); }
.steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1000px) { .steps-grid { grid-template-columns: 1fr; max-width: 640px; } }
.step-card { --c: var(--violet); position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px 24px 24px; border-radius: var(--r-m); border: 1px solid var(--line); background: #fff; overflow: hidden; }
.step-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.step-card h2 { font-size: 1.6rem; }
.step-card .muted { font-size: .96rem; }
.step-card-head { display: flex; align-items: center; justify-content: space-between; }
.step-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--c); font: 500 1.05rem var(--f-display); color: var(--ink-strong); }
.step-num svg { width: 20px; height: 20px; color: var(--c); }
.step-card--fait .step-num { background: color-mix(in srgb, var(--c) 12%, #fff); }
.step-meta { margin: 4px 0 0; display: grid; gap: 6px; }
.step-meta div { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.step-meta dt { color: var(--violet-dark); }
.step-meta dd { margin: 0; color: var(--ink-strong); font-weight: 500; font-variant-numeric: tabular-nums; }
.step-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.step-card .fine { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: .8rem; font-weight: 500; white-space: nowrap; }
.badge--fait { background: var(--ok-bg); color: #2F5A33; }
.badge--encours { background: #FFF4E0; color: #8A5A10; }
.badge--afaire { background: var(--mist); color: var(--violet-dark); }
p.badge { margin: 12px 0 0; }
.next-steps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
.next-steps h2 { font-size: 1.9rem; margin-bottom: 10px; }
.next-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.next-list li { display: flex; gap: 16px; align-items: flex-start; }
.next-list b { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 1px solid var(--line); font: 500 1rem var(--f-display); }
.next-list span { color: var(--violet-dark); }
.next-list strong { display: block; color: var(--ink-strong); font-weight: 500; }
@media (max-width: 860px) { .next-steps { grid-template-columns: 1fr; } }

/* ---------- Positionnement ---------- */
.pos-form { gap: 28px; }
.pos-section { margin: 0; padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--r-m); background: #fff; display: grid; gap: 22px; min-width: 0; }
.pos-section > legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; margin-bottom: 4px; padding: 0; font-family: var(--f-display); font-size: 1.55rem; color: var(--ink-strong); }
.pos-section > legend + * { clear: both; }
.pos-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--mist-2); font-size: 1rem; }
.pos-intro { margin-top: -10px; }
.choice-group { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 10px; }
.choice-group > legend { margin-bottom: 10px; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-group--quiz .choices { flex-direction: column; }
.choice { position: relative; display: inline-flex; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 16px; border-radius: 12px; border: 1px solid #D3DBCB; background: #fff; font-size: .97rem; cursor: pointer; transition: border-color .2s, background-color .2s; }
.choice span::before { content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #B5C2AE; background: #fff; transition: all .2s; }
.choice input[type=checkbox] + span::before { border-radius: 5px; }
.choice input:checked + span { border-color: var(--violet); background: var(--ok-bg); color: var(--ink-strong); }
.choice input:checked + span::before { border-color: var(--violet-deep); background: var(--violet-deep); box-shadow: inset 0 0 0 3px #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--violet-deep); outline-offset: 2px; }
.choice--nsp span { color: var(--violet-dark); font-style: italic; }
.q--err .choices .choice span, .q--err.scale { border-color: color-mix(in srgb, var(--ko) 55%, #D3DBCB); }
.scale { margin: 0; padding: 0; border: 0; min-width: 0; }
.scale-head, .scale-row { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); gap: 6px; align-items: center; }
.scale-head { position: sticky; top: var(--header-h); z-index: 2; padding: 8px 0; background: #fff; font-size: .78rem; color: var(--violet-dark); text-align: center; border-bottom: 1px solid var(--line); }
.scale-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.scale-label { font-size: .95rem; color: var(--ink-strong); padding-right: 8px; }
.scale-opt { position: relative; display: grid; place-items: center; min-height: 40px; cursor: pointer; }
.scale-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.scale-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #B5C2AE; background: #fff; transition: all .2s; }
.scale-opt input:checked + .scale-dot { border-color: var(--violet-deep); background: var(--violet-deep); box-shadow: inset 0 0 0 4px #fff; }
.scale-opt input:focus-visible + .scale-dot { outline: 2px solid var(--violet-deep); outline-offset: 3px; }
.scale-txt { display: none; }
@media (max-width: 720px) {
  .scale-head { display: none; }
  .scale-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .scale-label { grid-column: 1 / -1; font-weight: 500; }
  .scale-opt { display: flex; gap: 8px; justify-content: flex-start; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; min-height: 44px; }
  .scale-txt { display: inline; font-size: .86rem; }
  .scale-dot { flex: none; width: 18px; height: 18px; }
}
.pos-submit { display: grid; justify-items: start; gap: 10px; }
.result-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px; border-radius: var(--r-m); background: var(--mist); }
.result-card h2 { font-size: 1.7rem; margin-bottom: 6px; }
.score-ring { --p: 0; flex: none; width: 132px; aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, #fff 78%, transparent 79% 100%), conic-gradient(var(--violet-deep) calc(var(--p) * 1%), var(--mist-2) 0); }
.score-ring b { font: 500 1.7rem/1 var(--f-display); color: var(--ink-strong); }
.score-ring span { font-size: .72rem; color: var(--violet-dark); max-width: 9em; margin-top: 4px; line-height: 1.2; }
@media (max-width: 560px) { .result-card { flex-direction: column; align-items: flex-start; } }
.pos-recap { margin-top: 30px; }
.pos-recap h3 { font-size: 1.3rem; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pos-recap dl { margin: 0; }
.pos-recap dl div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.pos-recap dt { color: var(--violet-dark); }
.pos-recap dd { margin: 0; color: var(--ink-strong); }
.pos-recap small { color: var(--violet-dark); }
@media (max-width: 640px) { .pos-recap dl div { grid-template-columns: 1fr; gap: 4px; } }
.level { display: inline-flex; gap: 3px; margin-right: 10px; vertical-align: middle; }
.level i { width: 14px; height: 6px; border-radius: 3px; background: var(--mist-2); }
.level--1 i:nth-child(-n+1), .level--2 i:nth-child(-n+2), .level--3 i:nth-child(-n+3), .level--4 i:nth-child(-n+4) { background: var(--violet); }
.mark { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 500; }
.mark svg { width: 13px; height: 13px; }
.mark--ok { background: var(--ok-bg); color: #2F5A33; }
.mark--ko { background: var(--ko-bg); color: #B23A1F; }
.mark--nsp { background: var(--mist); color: var(--violet-dark); }

/* ---------- Module ---------- */
.module-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.objectifs { padding: 24px 26px; border-radius: var(--r-m); background: rgba(255,255,255,.8); border: 1px solid var(--line); }
.objectifs h2 { font-family: var(--f-text); font-size: .95rem; font-weight: 500; letter-spacing: 0; color: var(--ink-strong); }
.objectifs .ticks { margin-top: 12px; gap: 8px; font-size: .95rem; }
.objectifs .ticks li::before { background: var(--c); box-shadow: 0 0 8px var(--c); }
@media (max-width: 900px) { .module-hero { grid-template-columns: 1fr; } }
.module-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); padding-block: clamp(36px, 5vw, 64px) clamp(64px, 8vw, 110px); }
.toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.toc-title { font-size: .82rem; font-weight: 500; color: var(--violet-dark); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--violet-dark); text-decoration: none; font-size: .93rem; line-height: 1.3; }
.toc a:hover { background: var(--mist); color: var(--ink-strong); }
.toc li.is-current a { background: var(--mist-2); color: var(--ink-strong); font-weight: 500; }
.toc-n { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #CBD5C3; font-size: .75rem; font-weight: 500; }
.toc-n svg { width: 13px; height: 13px; }
.toc li.is-read .toc-n { background: var(--violet-deep); border-color: var(--violet-deep); color: #fff; font-size: 0; }
.toc li.is-read .toc-n::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.toc-qcm a { margin-top: 8px; border: 1px dashed #CBD5C3; }
.toc-meter { margin-top: 18px; display: grid; gap: 8px; font-size: .85rem; color: var(--violet-dark); }
@media (max-width: 960px) {
  .module-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-m); }
}
.chapters { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(56px, 7vw, 88px); min-width: 0; }
.chapter { scroll-margin-top: calc(var(--header-h) + 20px); max-width: 760px; min-width: 0; }
.chapter-n { font-size: .82rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--violet-dark); margin-bottom: 8px; }
.chapter > h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); margin-bottom: 18px; }
.prose > p, .prose > ul, .prose > ol, .prose > dl, .prose > div, .prose > figure, .prose > h3 { margin-top: 16px; }
.prose h3 { font-size: 1.35rem; margin-top: 34px !important; }
.prose p { color: var(--ink); }
.prose strong { color: var(--ink-strong); font-weight: 600; }
.prose a { color: var(--violet-deep); }
.pills { list-style: none; padding: 0; display: grid; gap: 10px; }
.pills li { padding: 14px 18px; border-radius: 14px; background: var(--mist); color: var(--violet-dark); font-size: .97rem; }
.pills li strong { display: block; color: var(--ink-strong); font-weight: 500; margin-bottom: 2px; font-size: 1.02rem; }
.pills--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .pills--3 { grid-template-columns: 1fr; } }
.defs { margin: 0; display: grid; }
.defs div { display: grid; grid-template-columns: 11rem 1fr; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.defs div:last-child { border-bottom: 1px solid var(--line); }
.defs dt { font-family: var(--f-display); font-size: 1.2rem; color: var(--ink-strong); }
.defs dd { margin: 0; }
@media (max-width: 640px) { .defs div { grid-template-columns: 1fr; gap: 4px; } }
ol.numbered, ul.numbered { padding-left: 0; list-style: none; counter-reset: n; display: grid; gap: 10px; }
ol.numbered li, ul.numbered li { position: relative; padding-left: 40px; counter-increment: n; }
ol.numbered li::before { content: counter(n); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--mist-2); font: 500 .85rem var(--f-text); color: var(--ink-strong); }
ul.numbered li::before { content: ""; position: absolute; left: 6px; top: .62em; width: 14px; height: 2px; border-radius: 2px; background: var(--c, var(--violet)); }
.timeline { list-style: none; padding: 0; position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--violet), var(--orange) 64%, var(--jaune)); }
.timeline li { position: relative; padding: 0 0 18px 36px; color: var(--violet-dark); }
.timeline li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--violet); }
.timeline b { display: block; color: var(--ink-strong); font-weight: 500; }
.retenir { margin-top: 30px !important; padding: 22px 24px; border-radius: var(--r-m); border-left: 4px solid var(--c, var(--violet)); background: linear-gradient(90deg, var(--mist), #fff); }
.retenir h4 { margin: 0 0 8px; font: 500 .82rem var(--f-text); letter-spacing: .05em; text-transform: uppercase; color: var(--violet-dark); }
.retenir ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; color: var(--ink-strong); }
.note { padding: 12px 16px; border-radius: 12px; background: #FFF8EC; color: #6B4A12; font-size: .93rem; }

/* Bande de spectre */
.band-figure, .chart-figure { margin-left: 0; margin-right: 0; }
.band-figure figcaption, .chart-figure figcaption { margin-top: 12px; font-size: .88rem; color: var(--violet-dark); }
.spectrum-bar { position: relative; height: 112px; border-radius: 14px; overflow: hidden; margin-top: 8px;
  background: linear-gradient(90deg, #7B3FE4 0%, #3D6FF2 9%, #20B0E0 16%, #39C26A 22%, #E8DD3A 28%, #FF9A3C 32%, #E8412C 36%, #9B1D1D 40%, #3A1C2A 46%, #1B221C 60%, #1C231D 100%); }
.sb-zone { position: absolute; top: 8px; font-size: .74rem; font-weight: 500; color: rgba(255,255,255,.9); padding-left: 10px; letter-spacing: .03em; text-transform: uppercase; }
.sb-zone--ir { color: #C4D0BE; }
.sb-ipl { position: absolute; bottom: 0; height: 26px; background: repeating-linear-gradient(135deg, rgba(255,255,255,.18) 0 6px, rgba(255,255,255,.06) 6px 12px); border-top: 1px solid rgba(255,255,255,.4); }
.sb-ipl em { position: absolute; right: 10px; top: 4px; font-style: normal; font-size: .74rem; color: #fff; white-space: nowrap; }
.sb-mark { position: absolute; top: 30px; bottom: 26px; width: 2px; background: #fff; box-shadow: 0 0 10px 2px rgba(255,255,255,.7); }
.sb-mark b, .sb-mark i { position: absolute; left: 8px; white-space: nowrap; color: #fff; }
.sb-mark b { top: 2px; font-size: .86rem; }
.sb-mark i { top: 22px; font-style: normal; font-size: .72rem; color: #DCE6D6; }
.sb-mark:last-of-type b, .sb-mark:last-of-type i, .sb-mark--left b, .sb-mark--left i { left: auto; right: 8px; }
.spectrum-scale { position: relative; height: 22px; margin-top: 6px; font-size: .76rem; color: var(--violet-dark); }
.spectrum-scale span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.spectrum-scale span:first-child { transform: none; }
.spectrum-scale span:last-child { transform: translateX(-100%); }
@media (max-width: 560px) { .sb-mark i { display: none; } .spectrum-bar { height: 96px; } }
.chart-figure svg { display: block; width: 100%; height: auto; }
.chart-figure .ax { font: 400 11px var(--f-text); fill: var(--violet-dark); }
.chart-figure .lbl { font: 500 12px var(--f-text); }

/* Coupe de peau réutilisée */
.wl-explorer { display: grid; justify-items: center; padding: 22px; border-radius: var(--r-m); background: var(--mist); }
.wl-explorer .skin { max-width: 480px; }

/* Onglets */
.tabs { margin-top: 18px; }
.tab-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tab-list [role=tab] { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: 500 .95rem var(--f-text); color: var(--violet-dark); transition: all .2s; }
.tab-list [role=tab][aria-selected=true] { background: var(--ink-strong); border-color: var(--ink-strong); color: #fff; }
.tab-list [role=tab] i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.tab-panel { margin-top: 14px; padding: 20px 22px; border-radius: var(--r-m); border: 1px solid var(--line); background: #fff; }
.tab-panel h4 { margin: 0 0 8px; font: 400 1.3rem var(--f-display); color: var(--ink-strong); }
.tab-panel p + p { margin-top: 8px; }
.js .tab-panel[hidden] { display: none; }
.cycle svg { display: block; width: 100%; max-width: 640px; height: auto; margin: 0 auto 14px; }
.cycle .ph { transition: opacity .35s var(--ease); }
.cycle[data-active] .ph { opacity: .28; }
.cycle[data-active="cy-1"] .ph--1, .cycle[data-active="cy-2"] .ph--2, .cycle[data-active="cy-3"] .ph--3 { opacity: 1; }

/* Calculateur */
.calc { padding: 22px; border-radius: var(--r-m); background: var(--mist); display: grid; gap: 18px; }
.calc-inputs { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: end; }
.calc input[type=range] { width: 100%; accent-color: var(--violet-deep); min-height: 32px; }
.calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc-out div { padding: 14px 16px; border-radius: 12px; background: #fff; }
.calc-out span { display: block; font-size: .85rem; color: var(--violet-dark); }
.calc-out b { font: 500 1.7rem var(--f-display); color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.calc .fine { margin: 0; }
@media (max-width: 560px) { .calc-inputs, .calc-out { grid-template-columns: 1fr; } }

/* Tableau comparatif */
.table-wrap { overflow-x: auto; border-radius: var(--r-m); border: 1px solid var(--line); background: #fff; }
.table-wrap:focus-visible { outline: 2px solid var(--violet-deep); }
table.compare, table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
.compare th, .compare td, .data th, .data td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare thead th, .data thead th { background: var(--mist); color: var(--violet-dark); font-weight: 500; font-size: .82rem; white-space: nowrap; }
.compare tbody th { white-space: nowrap; color: var(--ink-strong); font-weight: 500; }
.compare tbody th i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.compare { min-width: 760px; }
tr:last-child > * { border-bottom: 0; }

/* Exercices */
.check { margin-top: 16px; padding: 20px 22px; border-radius: var(--r-m); border: 1px solid var(--line); background: #fff; }
.check-q { margin: 0 0 14px; color: var(--ink-strong); font-weight: 500; }
.check-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.check-opts--col { flex-direction: column; align-items: stretch; }
.check-opts button { appearance: none; cursor: pointer; min-height: 44px; padding: 10px 16px; border-radius: 12px; border: 1px solid #D3DBCB; background: #fff; font: 500 .95rem var(--f-text); color: var(--ink-strong); text-align: left; transition: all .2s; }
.check-opts button:hover:not(:disabled) { border-color: var(--violet); }
.check-opts button.is-ok { border-color: var(--ok); background: var(--ok-bg); }
.check-opts button.is-ko { border-color: var(--ko); background: var(--ko-bg); }
.check-opts button:disabled { cursor: default; }
.check-opts button:disabled:not(.is-ok):not(.is-ko) { opacity: .55; }
.check-fb { margin: 12px 0 0; font-size: .95rem; color: var(--violet-dark); }
.check-fb:empty { display: none; }
.check-fb strong { color: var(--ink-strong); }
.check-reset { margin-top: 10px; background: none; border: 0; padding: 0; color: var(--violet-deep); font: 500 .9rem var(--f-text); text-decoration: underline; cursor: pointer; }
.triage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.triage .check { margin: 0; display: flex; flex-direction: column; }
.triage .check-opts { margin-top: auto; }
@media (max-width: 760px) { .triage { grid-template-columns: 1fr; } }
.triage-score { margin-top: 14px; font-weight: 500; color: var(--ink-strong); }
.ci-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.ci { padding: 18px 18px 20px; border-radius: var(--r-m); border-top: 4px solid var(--c); background: #fff; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ci h3 { margin: 0 0 10px !important; font-size: 1.12rem !important; }
.ci ul { margin: 0; padding-left: 1.05em; display: grid; gap: 6px; font-size: .92rem; }
.ci--stop { --c: #C0573E; } .ci--wait { --c: #D9AE55; } .ci--care { --c: #6F9A68; }
@media (max-width: 900px) { .ci-grid { grid-template-columns: 1fr; } }
.checklists { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .checklists { grid-template-columns: 1fr; } }
.checklist { padding: 18px; border-radius: var(--r-m); background: var(--mist); }
.checklist h4 { margin: 0 0 10px; font: 500 1rem var(--f-text); color: var(--ink-strong); display: flex; justify-content: space-between; gap: 8px; }
.cl-count { font-weight: 400; color: var(--violet-dark); font-size: .85rem; }
.checklist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; padding: 6px 4px; border-radius: 8px; }
.checklist input { width: 18px; height: 18px; flex: none; margin-top: 2px; accent-color: var(--violet-deep); }
.checklist input:checked + span { color: var(--violet-dark); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--violet) 50%, transparent); }
.module-end { padding: 32px; border-radius: var(--r-l); background: var(--mist); max-width: 760px; }
.module-end h2 { font-size: 2rem; margin-bottom: 10px; }

/* ---------- QCM ---------- */
.quiz-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.quiz-facts div { padding: 16px; border-radius: 14px; background: var(--mist); text-align: center; }
.quiz-facts b { display: block; font: 500 1.8rem/1.1 var(--f-display); color: var(--ink-strong); }
.quiz-facts span { font-size: .85rem; color: var(--violet-dark); }
.attempts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.attempts li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .93rem; color: var(--violet-dark); }
.attempts b { color: var(--ink-strong); font-weight: 500; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .attempts li { grid-template-columns: 1fr auto; } .attempts li > span:first-child { grid-column: 1 / -1; } }
.quiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; font-size: .9rem; color: var(--violet-dark); font-variant-numeric: tabular-nums; }
.quiz-top .meter { height: 6px; }
.qcard { padding: clamp(22px, 3.4vw, 34px); border-radius: var(--r-l); border: 1px solid var(--line); background: #fff; box-shadow: 0 30px 60px -44px rgba(27,34,28,.45); }
.qcard h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.25; }
.qcard .q-type { margin: 10px 0 0; font-size: .86rem; color: var(--violet-dark); }
.qopts { display: grid; gap: 10px; margin-top: 22px; }
.qopt { position: relative; display: block; }
.qopt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.qopt span { display: flex; gap: 14px; align-items: flex-start; min-height: 52px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid #D3DBCB; background: #fff; font-size: 1rem; line-height: 1.4; color: var(--ink-strong); cursor: pointer; transition: border-color .2s, background-color .2s; }
.qopt span::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 2px solid #B5C2AE; background: #fff; transition: all .2s; }
.qopt input[type=checkbox] + span::before { border-radius: 6px; }
.qopt input:checked + span { border-color: var(--violet); background: var(--ok-bg); }
.qopt input:checked + span::before { border-color: var(--violet-deep); background: var(--violet-deep); box-shadow: inset 0 0 0 3px #fff; }
.qopt input:focus-visible + span { outline: 2px solid var(--violet-deep); outline-offset: 2px; }
.qopt input:disabled + span { cursor: default; }
.qopt.is-good span { border-color: var(--ok); background: var(--ok-bg); }
.qopt.is-bad span { border-color: var(--ko); background: var(--ko-bg); }
.qopt em { margin-left: auto; padding-left: 10px; flex: none; font-style: normal; font-size: .8rem; font-weight: 500; white-space: nowrap; }
.qopt.is-good em { color: #2F5A33; } .qopt.is-bad em { color: #B23A1F; }
.qfb { margin-top: 18px; padding: 16px 18px; border-radius: 14px; display: grid; gap: 4px; }
.qfb--ok { background: var(--ok-bg); } .qfb--ko { background: var(--ko-bg); }
.qfb strong { display: flex; align-items: center; gap: 8px; color: var(--ink-strong); font-weight: 600; }
.qfb strong svg { width: 18px; height: 18px; }
.qfb--ok strong svg { color: var(--ok); } .qfb--ko strong svg { color: var(--ko); }
.qfb p { margin: 0; color: var(--ink); }
.qactions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.qerr { margin-top: 12px; color: #B23A1F; font-size: .93rem; font-weight: 500; }
.qresult { text-align: center; padding: clamp(28px, 4vw, 44px); border-radius: var(--r-l); background: var(--mist); }
.qresult .score-ring { margin: 0 auto 18px; width: 150px; }
.qresult h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.qresult p { max-width: 52ch; margin: 10px auto 0; color: var(--violet-dark); }
.qresult .qactions { justify-content: center; }
.revoir { margin-top: 32px; }
.revoir h3 { font-size: 1.4rem; margin-bottom: 12px; }
.revoir ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.revoir li { padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.revoir li b { display: block; color: var(--ink-strong); font-weight: 500; margin-bottom: 6px; }
.revoir li p { margin: 4px 0 0; font-size: .94rem; color: var(--violet-dark); }
.revoir li p strong { color: var(--ink-strong); font-weight: 500; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fall 2.4s cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .2; } }

/* ---------- Administration ---------- */
.admin-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 1080px) { .admin-grid { grid-template-columns: minmax(0, 1fr); } }
.panel { padding: 24px; border-radius: var(--r-m); border: 1px solid var(--line); background: #fff; }
.panel .h-small { margin-top: 0; }
.panel form + form { margin-top: 8px; }
.panel--danger { border-color: color-mix(in srgb, var(--orange) 35%, var(--line)); }
.list-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.list-head .h-small { margin: 0 auto 0 0; }
.list-filter select { min-height: 40px; padding: 6px 12px; width: auto; }
.data--list th small, .data--list td small { display: block; margin-top: 3px; color: var(--violet-dark); font-size: .8rem; font-weight: 400; }
.data--list th a { color: var(--ink-strong); font-weight: 500; }
.data tbody tr:hover { background: #F7FAF4; }
.data tr.is-off { opacity: .55; }
.admin-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.admin-side { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 20px); }
@media (max-width: 1080px) { .admin-detail { grid-template-columns: minmax(0, 1fr); } .admin-side { position: static; } }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kpis div { padding: 16px 18px; border-radius: 14px; background: var(--mist); display: grid; gap: 4px; }
.kpis span { font-size: .84rem; color: var(--violet-dark); }
.kpis b { font: 500 1.3rem var(--f-display); color: var(--ink-strong); }
.kpis small { font-size: .8rem; color: var(--violet-dark); }
@media (max-width: 720px) { .kpis { grid-template-columns: 1fr; } }
.creds { margin-bottom: 26px; padding: 24px; border-radius: var(--r-m); background: var(--ok-bg); border: 1px solid color-mix(in srgb, var(--violet) 35%, var(--line)); display: grid; gap: 14px; }
.creds h2 { font-size: 1.5rem; }
.creds-dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.creds-dl div { padding: 12px 14px; border-radius: 12px; background: #fff; }
.creds-dl dt { font-size: .82rem; color: var(--violet-dark); }
.creds-dl dd { margin: 4px 0 0; font-weight: 500; color: var(--ink-strong); word-break: break-all; }
.creds code { font: 600 1.15rem/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .04em; }
.creds .actions { margin-top: 0; }
@media (max-width: 560px) { .creds-dl { grid-template-columns: 1fr; } }
.mini-list { list-style: none; margin: 0; padding: 0; font-size: .86rem; color: var(--violet-dark); display: grid; gap: 4px; }

/* ---------- Pied de page ---------- */
.espace-footer { padding: 28px 0 calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); font-size: .88rem; }
.espace-footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; color: var(--violet-dark); }
.espace-footer a { color: var(--violet-dark); text-decoration: none; }
.espace-footer a:hover { color: var(--violet-deep); text-decoration: underline; }

@media print {
  .site-header, .espace-footer, .toc, .admin-side, .actions, .qactions { display: none !important; }
  .module-layout, .admin-detail { display: block; }
}

/* ---------- Charte Provence FAC : typographie et en-tête ---------- */
body { background: #FCFCF8; }
h1, h2, h3 { font-weight: 600; font-stretch: 85%; letter-spacing: -.02em; }
h3 { font-stretch: 90%; letter-spacing: -.01em; }
.pos-section > legend, .defs dt, .tab-panel h4, .info-grid dd, .facts dt { font-weight: 600; font-stretch: 88%; }
.step-num, .next-list b, .login-steps b, .score-ring b, .calc-out b, .quiz-facts b, .kpis b { font-weight: 650; font-stretch: 85%; }
.brand { font-family: var(--f-display); font-weight: 600; font-stretch: 86%; letter-spacing: -.01em; }
.brand svg { width: 34px; height: 34px; }
.brand small { font-family: var(--f-text); font-stretch: 100%; letter-spacing: .01em; }
.site-header { background: color-mix(in srgb, #FCFCF8 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.btn { border-radius: 999px; }

/* ---------- Double authentification ---------- */
.a2f { display: grid; gap: 16px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.a2f .h-small { margin: 0; }
.a2f h3 { font-size: 1.2rem; }
.a2f-state { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--mist); color: var(--ink); }
.a2f-state svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--muted, #586157); }
.a2f-state--on { background: var(--ok-bg); }
.a2f-state--on svg { color: var(--violet-deep); }
.a2f-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.qr-box { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; align-items: center; padding: 16px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.qr { width: 180px; height: 180px; background: #fff; }
.qr svg { display: block; width: 100%; height: 100%; }
.qr-key { display: grid; gap: 6px; min-width: 0; }
.qr-key code { font-size: 1rem; letter-spacing: .06em; word-break: break-all; color: var(--ink-strong); }
@media (max-width: 520px) { .qr-box { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.code-input { font-size: 1.25rem !important; letter-spacing: .18em; font-variant-numeric: tabular-nums; }
.codes { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.codes code { display: block; padding: 8px 12px; border-radius: 10px; background: #fff; font-size: 1rem; letter-spacing: .08em; text-align: center; color: var(--ink-strong); }
.a2f-more { border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.a2f-more summary { padding: 12px 16px; cursor: pointer; font-weight: 600; color: var(--ink-strong); }
.a2f-more .form { padding: 0 16px 16px; }
.a2f-notice { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 22px; padding: 16px 20px; border-radius: var(--r-m); background: color-mix(in srgb, #D9AE55 22%, #fff); border: 1px solid color-mix(in srgb, #D9AE55 45%, var(--line)); }
.a2f-notice p { margin: 0; max-width: 62ch; }
