/* COM'QUEST — plateforme de formation
   Concept : catalogue de cours clair et éditorial (fond blanc, titres en serif),
   lecteur sombre centré sur la vidéo, programme toujours visible à droite. */
:root {
  --ink: #1C1D1F;
  --ink-2: #2D2F31;
  --muted: #6A6F73;
  --line: #D1D7DC;
  --line-soft: #E9ECEE;
  --bg: #FFFFFF;
  --bg-soft: #F7F9FA;
  --brand: #312783;
  --brand-dark: #231B63;
  --brand-tint: #ECEAF8;
  --blue: #007DB3;
  --accent: #FF7700;
  --green: #1E9E76;
  --green-tint: #E3F5EE;
  --red: #C4314B;
  --red-tint: #FBEAEC;
  --amber: #B4690E;
  --amber-tint: #FCF3E6;
  --night: #1C1D1F;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--brand); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 1340px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.ic { width: 1em; height: 1em; flex: none; vertical-align: -0.125em; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 4px; font-weight: 700; font-size: 15px; text-decoration: none; background: none; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover:not(:disabled) { background: #3E4143; }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover:not(:disabled) { background: var(--bg-soft); }
.btn-ghost { color: var(--brand); padding: 0 8px; }
.btn-ghost:hover { background: var(--brand-tint); }
.btn-light { border-color: #fff; color: #fff; }
.btn-light:hover { background: rgba(255,255,255,.1); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- En-tête ---------- */
.top { position: sticky; top: 0; z-index: 40; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06); }
.top-in { display: flex; align-items: center; gap: 18px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand-mark { width: 34px; height: 34px; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 22px; letter-spacing: -.01em; }
.brand-name span { color: var(--accent); }
.nav-cat { position: relative; }
.nav-cat > button, .top-link { background: none; border: 0; padding: 8px 6px; font-size: 14px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.nav-cat > button:hover, .top-link:hover { color: var(--brand); }
.cat-menu { position: absolute; top: calc(100% + 18px); left: 0; width: 280px; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 8px 0; }
.cat-menu a { display: flex; justify-content: space-between; padding: 10px 18px; color: var(--ink); text-decoration: none; font-size: 14px; }
.cat-menu a:hover { color: var(--brand); background: var(--bg-soft); }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; border: 1px solid var(--ink); border-radius: 999px; background: var(--bg-soft); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 14px; }
.search:focus-within { box-shadow: 0 0 0 3px var(--brand-tint); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; border: 0; flex: none; }
.top-right { display: flex; align-items: center; gap: 14px; }

/* ---------- Accueil ---------- */
.hello { display: flex; align-items: center; gap: 16px; padding: 40px 0 8px; }
.hello .avatar { width: 64px; height: 64px; font-size: 24px; }
.hello h1 { font-family: var(--serif); font-size: 28px; }
.hello p { color: var(--muted); }
.hero { position: relative; margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 400px; background: var(--brand); overflow: hidden; }
.hero-copy { position: relative; z-index: 1; align-self: center; margin: 40px 0 40px 48px; background: #fff; padding: 28px 28px 30px; max-width: 460px; box-shadow: 0 8px 24px rgba(0,0,0,.18); display: grid; gap: 14px; }
.hero-copy h1 { font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); }
.hero-copy p { color: var(--ink-2); font-size: 17px; }
.hero-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); height: 100%; }
.hero-photos img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.hero-band { position: absolute; left: 0; bottom: 0; width: 50%; height: 100%; background: repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 2px, transparent 2px 22px); pointer-events: none; }
.section { padding: 48px 0 8px; display: grid; gap: 20px; }
.section-h { display: grid; gap: 6px; }
.section-h h2 { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 32px); }
.section-h p { color: var(--muted); max-width: 70ch; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tab { background: none; border: 0; padding: 12px 14px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); }
.tab-panel { border: 1px solid var(--line); padding: 28px; display: grid; gap: 22px; }
.tab-panel-h { display: grid; gap: 8px; max-width: 760px; }
.tab-panel-h h3 { font-family: var(--serif); font-size: 22px; }
.tab-panel-h p { color: var(--ink-2); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px 20px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 300px); gap: 20px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.rail > * { scroll-snap-align: start; }

/* ---------- Carte de cours ---------- */
.card { display: grid; gap: 8px; align-content: start; text-decoration: none; color: var(--ink); background: none; border: 0; padding: 0; text-align: left; }
.card:hover .card-t { color: var(--brand); }
.card:hover .cover { filter: brightness(.94); }
.card-t { font-weight: 700; font-size: 16px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-by { color: var(--muted); font-size: 13px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 13px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; font-size: 12px; font-weight: 700; border-radius: 3px; background: var(--brand-tint); color: var(--brand); }
.badge-green { background: var(--green-tint); color: var(--green); }
.badge-amber { background: var(--amber-tint); color: var(--amber); }
.prog { height: 4px; background: var(--line-soft); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--brand); }
.prog-l { font-size: 12px; color: var(--muted); }

/* Couverture générée */
.cover { position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; border: 1px solid var(--line-soft); background: var(--c1); transition: filter .15s; }
.cover-photo img { position: absolute; right: 0; top: 0; width: 46%; height: 100%; object-fit: cover; object-position: center 15%; }
.cover-photo::before { content: ""; position: absolute; inset: 0; background: var(--c1); clip-path: polygon(0 0, 62% 0, 54% 100%, 0 100%); z-index: 1; }
.cover-pattern { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 2px, transparent 2px 16px); z-index: 1; }
.cover-txt { position: absolute; z-index: 2; left: 7%; top: 12%; bottom: 12%; width: 44%; display: flex; flex-direction: column; justify-content: space-between; color: #fff; }
.cover-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; opacity: .85; }
.cover-art { position: absolute; z-index: 1; right: 0; top: 0; width: 50%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 9% 5% 9% 3%; }
.cover-art .art { width: 100%; height: 100%; }
.cover-title { font-family: var(--serif); font-weight: 700; font-size: clamp(14px, 1.25vw, 18px); line-height: 1.15; }
.cover-bar { width: 32px; height: 4px; background: var(--c2); }
.cover-type { background: linear-gradient(120deg, var(--c1) 55%, var(--c2) 55%); }
.cover-type .cover-txt { width: 52%; }
.cover-mark { position: absolute; z-index: 2; right: 7%; bottom: 8%; font-family: var(--serif); font-weight: 700; color: #fff; font-size: clamp(36px, 4vw, 60px); line-height: 1; letter-spacing: -.02em; }
.cover.lg .cover-title { font-size: clamp(18px, 2vw, 26px); }

/* Exercices */
.exo { border: 1px solid var(--line); padding: 20px 22px; display: grid; gap: 10px; }
.exo.ok { border-color: var(--green); background: var(--green-tint); }
.exo-h { display: grid; gap: 4px; }
.exo-n { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.exo-h h3 { font-family: var(--serif); font-size: 20px; }
.exo-l { color: var(--ink-2); font-size: 15px; }
.exo .answer { min-height: 110px; }
.exo-c { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.exo-c input { width: 20px; height: 20px; accent-color: var(--brand); }
.lvl-h { font-family: var(--serif); font-size: 20px; margin: 22px 0 12px; }

/* ---------- Bandeau pratique ---------- */
.practice-band { margin-top: 56px; background: var(--night); color: #fff; }
.practice-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding-top: 48px; padding-bottom: 48px; }
.practice-in h2 { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 34px); }
.practice-in p { color: #D1D7DC; margin-top: 10px; max-width: 58ch; }
.practice-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pcard { background: #2D2F31; padding: 16px; display: grid; gap: 10px; text-decoration: none; color: #fff; border: 1px solid #3E4143; }
.pcard:hover { border-color: #fff; }
.pcard img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: top; }
.pcard b { font-size: 15px; } .pcard span { color: #D1D7DC; font-size: 13px; }
.foot { margin-top: 64px; background: var(--night); color: #D1D7DC; font-size: 14px; }
.foot-in { padding-top: 32px; padding-bottom: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.foot .brand { color: #fff; }

/* ---------- Catalogue et recherche ---------- */
.page-h { padding: 40px 0 8px; display: grid; gap: 8px; }
.page-h h1 { font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); }
.page-h p { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0 8px; }
.chip { border: 1px solid var(--ink); background: #fff; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.chip.on { background: var(--ink); color: #fff; }
.list-row { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.list-row:hover h3 { color: var(--brand); }
.list-row h3 { font-size: 17px; }
.list-row p { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.hit { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); align-items: flex-start; }
.hit:hover b { color: var(--brand); }
.hit small { color: var(--muted); display: block; }
.empty { padding: 40px 0; color: var(--muted); }

/* ---------- Page de cours ---------- */
.c-hero { background: var(--night); color: #fff; }
.c-hero-in { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; padding-top: 36px; padding-bottom: 36px; }
.crumbs { font-size: 14px; color: #C0C4FC; font-weight: 700; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: #C0C4FC; text-decoration: none; }
.c-hero h1 { font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); margin-top: 14px; }
.c-sub { font-size: 19px; margin-top: 12px; color: #fff; max-width: 62ch; }
.c-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 14px; color: #fff; }
.c-meta span { display: inline-flex; align-items: center; gap: 6px; }
.c-by { margin-top: 10px; font-size: 14px; }
.c-by a { color: #C0C4FC; }
.c-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; padding-top: 32px; }
.c-main { display: grid; gap: 32px; min-width: 0; }
.c-side { position: relative; }
.buy { position: sticky; top: 96px; margin-top: -260px; background: #fff; color: var(--ink); box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.08); border: 1px solid var(--line-soft); }
.buy-body { padding: 22px; display: grid; gap: 14px; }
.buy h4 { font-size: 16px; }
.incl { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; }
.incl li { display: flex; gap: 10px; align-items: center; }
.box { border: 1px solid var(--line); padding: 24px; display: grid; gap: 14px; }
.box h2, .c-main h2 { font-family: var(--serif); font-size: 24px; }
.learn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; list-style: none; padding: 0; margin: 0; font-size: 14px; }
.learn li { display: flex; gap: 12px; }
.learn .ic { color: var(--ink); margin-top: 3px; }
.curr-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.acc { border: 1px solid var(--line); }
.acc-sec + .acc-sec { border-top: 1px solid var(--line); }
.acc-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: var(--bg-soft); border: 0; text-align: left; }
.acc-head b { flex: 1; font-size: 16px; }
.acc-head small { color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.acc-head .ic { transition: transform .2s; }
.acc-sec.open .acc-head .ic { transform: rotate(180deg); }
.acc-body { padding: 8px 20px 14px; display: none; }
.acc-sec.open .acc-body { display: grid; }
.acc-item { display: flex; align-items: center; gap: 14px; padding: 8px 0; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.acc-item:hover span.t { color: var(--brand); text-decoration: underline; }
.acc-item .t { flex: 1; }
.acc-item .d { color: var(--muted); }
.prose { display: grid; gap: 12px; font-size: 15px; color: var(--ink-2); max-width: 760px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.sources { font-size: 13px; color: var(--muted); display: grid; gap: 4px; }

/* ---------- Lecteur ---------- */
.player-top { position: sticky; top: 0; z-index: 40; background: var(--night); color: #fff; border-bottom: 1px solid #3E4143; }
.player-top-in { display: flex; align-items: center; gap: 18px; height: 56px; padding: 0 20px; }
.player-top .brand { color: #fff; }
.player-top .brand-name { font-size: 18px; }
.player-top .sep { width: 1px; height: 28px; background: #3E4143; }
.player-title { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; text-decoration: none; }
.ring { --p: 0; width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), #3E4143 0); display: grid; place-items: center; flex: none; }
.ring span { width: 26px; height: 26px; border-radius: 50%; background: var(--night); display: grid; place-items: center; }
.ring .ic { color: #fff; width: 14px; height: 14px; }
.player-prog { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #D1D7DC; white-space: nowrap; }
.player { display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.stage { min-width: 0; }
.video { position: relative; background: #000; aspect-ratio: 16 / 9; max-height: calc(100vh - 56px - 60px); width: 100%; margin: 0 auto; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-off { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; color: #fff; text-align: center; padding: 24px; }
.video-off p { color: #D1D7DC; max-width: 52ch; }
.stage-bar { display: flex; align-items: center; gap: 10px; padding: 10px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.stage-bar .credit { flex: 1; min-width: 200px; font-size: 13px; color: var(--muted); }
.stage-tabs { display: flex; gap: 4px; padding: 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.stage-body { padding: 28px 24px 64px; }
.lesson { max-width: 820px; display: grid; gap: 16px; }
.lesson-h small { color: var(--muted); font-size: 14px; }
.lesson-h h1 { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 32px); margin-top: 6px; }
.content { display: grid; gap: 14px; font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.content h3 { font-family: var(--serif); font-size: 21px; color: var(--ink); margin-top: 10px; }
.content ul, .content ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.content strong { color: var(--ink); }
.content table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.content th, .content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.content th { background: var(--bg-soft); color: var(--ink); }
.table-wrap { overflow-x: auto; }
.content .ex { background: var(--bg-soft); border-left: 4px solid var(--brand); padding: 14px 18px; }
.content .tip { background: var(--amber-tint); border-left: 4px solid var(--amber); padding: 14px 18px; }
.keys { border: 1px solid var(--line); padding: 20px 22px; display: grid; gap: 10px; }
.keys h3 { font-size: 16px; }
.keys ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.keys li { display: flex; gap: 10px; font-size: 15px; }
.keys .ic { color: var(--green); margin-top: 4px; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 20px; }
.notes textarea { width: 100%; min-height: 220px; border: 1px solid var(--ink); padding: 14px; font-size: 15px; resize: vertical; }
.notes small { color: var(--muted); }
.res { display: grid; gap: 12px; font-size: 15px; }
.res a { word-break: break-word; }

/* Programme latéral */
.side { border-left: 1px solid var(--line); position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; background: #fff; }
.side-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.s-sec { border-bottom: 1px solid var(--line); }
.s-head { width: 100%; display: grid; gap: 2px; text-align: left; padding: 14px 16px; background: var(--bg-soft); border: 0; }
.s-head b { font-size: 15px; }
.s-head small { color: var(--muted); font-size: 12px; }
.s-items { display: grid; }
.s-sec.closed .s-items { display: none; }
.s-item { display: flex; gap: 12px; padding: 10px 16px; text-decoration: none; color: var(--ink-2); font-size: 14px; align-items: flex-start; }
.s-item:hover { background: var(--bg-soft); }
.s-item.on { background: #D1D7DC; color: var(--ink); }
.s-item .tt { flex: 1; display: grid; gap: 4px; }
.s-item small { color: var(--muted); display: inline-flex; gap: 6px; align-items: center; font-size: 12px; }
.check { width: 18px; height: 18px; border: 1px solid var(--ink-2); border-radius: 2px; flex: none; margin-top: 2px; display: grid; place-items: center; background: #fff; padding: 0; }
.check.ok { background: var(--brand); border-color: var(--brand); color: #fff; }
.check .ic { width: 12px; height: 12px; }

/* Quiz et exercices */
.quiz { max-width: 760px; display: grid; gap: 18px; }
.quiz-h small { color: var(--muted); }
.quiz-h h1 { font-family: var(--serif); font-size: 26px; margin-top: 6px; }
.q { font-size: 19px; font-weight: 700; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; gap: 14px; align-items: flex-start; text-align: left; border: 1px solid var(--ink); background: #fff; padding: 14px 16px; font-size: 15px; }
.opt:hover:not(:disabled) { background: var(--bg-soft); }
.opt .k { width: 26px; height: 26px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.opt.sel { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.opt.right { border-color: var(--green); background: var(--green-tint); }
.opt.right .k { background: var(--green); border-color: var(--green); color: #fff; }
.opt.wrong { border-color: var(--red); background: var(--red-tint); }
.opt.wrong .k { background: var(--red); border-color: var(--red); color: #fff; }
.opt.miss { border-style: dashed; border-color: var(--green); }
.opt:disabled { cursor: default; }
.fb { padding: 16px 18px; display: grid; gap: 8px; border-left: 4px solid var(--ink); background: var(--bg-soft); }
.fb.ok { border-color: var(--green); background: var(--green-tint); }
.fb.ko { border-color: var(--red); background: var(--red-tint); }
.fb.mid { border-color: var(--amber); background: var(--amber-tint); }
.fb b { font-size: 16px; }
.score-big { font-family: var(--serif); font-size: 56px; font-weight: 700; line-height: 1; }
.q-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.meter { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 14px; color: var(--ink-2); }
.meter .prog { height: 8px; }
.meter b { font-variant-numeric: tabular-nums; }

/* Pratique */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.case-card { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 18px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); align-items: start; }
.case-card:hover { border-color: var(--ink); }
.case-card:hover b { color: var(--brand); }
.case-ph .ic, .persona .ph .ic { width: 40%; height: 40%; }
.case-ph { width: 84px; height: 84px; object-fit: cover; object-position: top; background: var(--brand-tint); display: grid; place-items: center; font-family: var(--serif); font-size: 28px; color: var(--brand); font-weight: 700; }
.case-card b { font-size: 16px; }
.case-card p { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.case-card .card-meta { margin-top: 8px; }
.run { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; padding-top: 32px; align-items: start; }
.run-side { position: sticky; top: 96px; display: grid; gap: 14px; }
.persona { border: 1px solid var(--line); }
.persona img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
.persona .ph { aspect-ratio: 4 / 5; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); font-family: var(--serif); font-size: 64px; font-weight: 700; }
.persona div.cap { padding: 12px 14px; display: grid; }
.persona small { color: var(--muted); }
.say { background: var(--bg-soft); border-left: 4px solid var(--brand); padding: 16px 18px; font-size: 17px; }
.say b { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.post { border: 1px solid var(--line); padding: 14px; display: grid; gap: 10px; max-width: 560px; background: #fff; }
.post-h { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.post-h small { display: block; color: var(--muted); font-size: 12px; }
.pav { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.pav.o { background: var(--accent); }
.post-c { display: flex; gap: 10px; background: var(--bg-soft); padding: 10px 12px; font-size: 15px; }
.post-c small { color: var(--muted); font-size: 12px; }
textarea.answer { width: 100%; min-height: 180px; border: 1px solid var(--ink); padding: 14px; font-size: 15px; resize: vertical; }
.crit { display: grid; gap: 8px; }
.crit > div { display: grid; grid-template-columns: 120px minmax(0, 1fr) 48px; gap: 12px; align-items: center; font-size: 14px; }
.crit .prog { height: 8px; }
.crit b { text-align: right; font-variant-numeric: tabular-nums; }

/* Mon apprentissage */
.my-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.my-row h3 { font-size: 17px; }
.my-row p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.my-row .prog { margin-top: 10px; height: 6px; }

/* Certificat */
.cert-page { padding: 40px 0; display: grid; gap: 20px; justify-items: center; }
.cert { width: min(960px, 100%); aspect-ratio: 1.414 / 1; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.08); padding: 5%; display: grid; grid-template-rows: auto 1fr auto; position: relative; }
.cert::before { content: ""; position: absolute; inset: 14px; border: 2px solid var(--brand); pointer-events: none; }
.cert-top { display: flex; justify-content: space-between; align-items: center; }
.cert-mid { align-self: center; display: grid; gap: 12px; }
.cert-mid small { text-transform: uppercase; letter-spacing: .16em; font-weight: 700; color: var(--accent); font-size: 13px; }
.cert-mid h1 { font-family: var(--serif); font-size: clamp(26px, 4vw, 46px); }
.cert-mid .who { font-family: var(--serif); font-size: clamp(22px, 3vw, 34px); color: var(--brand); }
.cert-bot { display: flex; justify-content: space-between; gap: 20px; font-size: 13px; color: var(--muted); align-items: flex-end; }
.cert-bot p { max-width: 56ch; }

/* Modale et notifications */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal-ov { position: absolute; inset: 0; background: rgba(28,29,31,.7); }
.modal-card { position: relative; width: min(520px, 100%); background: #fff; padding: 28px; display: grid; gap: 16px; box-shadow: 0 8px 32px rgba(0,0,0,.3); }
.modal-card h2 { font-family: var(--serif); font-size: 24px; }
.modal-card input { width: 100%; height: 48px; border: 1px solid var(--ink); padding: 0 14px; font-size: 16px; }
.modal-x { position: absolute; top: 12px; right: 12px; background: none; border: 0; width: 36px; height: 36px; display: grid; place-items: center; }
.toast { position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; font-size: 14px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.25); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .c-hero-in, .c-body { grid-template-columns: minmax(0, 1fr); }
  .buy { position: static; margin-top: 0; }
  .c-side { order: -1; }
  .player { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; border-left: 0; border-top: 1px solid var(--line); }
  .run { grid-template-columns: minmax(0, 1fr); }
  .run-side { position: static; grid-template-columns: 140px minmax(0, 1fr); }
  .practice-in { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .top-in { gap: 10px; height: 64px; }
  .nav-cat { display: none; }
  .search { height: 42px; padding: 0 14px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-photos { height: 220px; order: -1; }
  .hero-copy { margin: -40px 16px 24px; }
  .hero-band { display: none; }
  .learn { grid-template-columns: minmax(0, 1fr); }
  .list-row, .my-row { grid-template-columns: minmax(0, 1fr); }
  .practice-cards { grid-template-columns: minmax(0, 1fr); }
  .player-prog span.lbl { display: none; }
  .tab-panel { padding: 18px; }
}
@media (max-width: 560px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .brand-name { display: none; }
  .rail { grid-auto-columns: 78%; }
  .stage-body, .stage-bar { padding-left: 16px; padding-right: 16px; }
  .stage-tabs { padding: 0 8px; }
  .player-top-in { padding: 0 12px; gap: 10px; }
  .crit > div { grid-template-columns: 90px minmax(0, 1fr) 44px; }
  .run-side { grid-template-columns: minmax(0, 1fr); }
  .top-in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 10px; }
  .top-right { margin-left: auto; gap: 6px; }
  .top-link.hide-m { display: inline; }
  .top-link { font-size: 12.5px; padding: 6px 2px; }
  .search { order: 5; flex: 1 1 100%; height: 40px; }
  .avatar { width: 36px; height: 36px; font-size: 14px; }
}
@media print {
  .top, .foot, .no-print { display: none !important; }
  .cert { box-shadow: none; border: 0; width: 100%; }
  .cert-page { padding: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Couvertures photo ---------- */
.cover-img { background: #141414; border: 0; }
.cover-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.82) 100%); }
.cover-cap { position: absolute; left: 6%; right: 6%; bottom: 8%; display: grid; gap: 3px; color: #fff; z-index: 2; }
.cover-cap .cover-label { font-size: 10px; color: #FFB066; opacity: 1; }
.cover-cap .cover-title { font-size: clamp(14px, 1.15vw, 17px); text-shadow: 0 1px 6px rgba(0,0,0,.5); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover .cover-img img { transform: scale(1.04); }

/* ---------- Thème sombre (accueil) ---------- */
body.theme-dark { background: #141414; color: #E5E5E5; }
body.theme-dark .top { background: linear-gradient(180deg, rgba(0,0,0,.85), rgba(20,20,20,.92)); box-shadow: none; backdrop-filter: blur(6px); }
body.theme-dark .brand, body.theme-dark .nav-cat > button, body.theme-dark .top-link { color: #fff; }
body.theme-dark .top-link:hover, body.theme-dark .nav-cat > button:hover { color: #FFB066; }
body.theme-dark .search { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.35); color: #fff; }
body.theme-dark .search input::placeholder { color: rgba(255,255,255,.6); }
body.theme-dark .avatar { background: var(--accent); color: #1A0E00; }
body.theme-dark .foot { background: #0B0B0B; color: #A3A3A3; border-top: 1px solid #262626; }
body.theme-dark .foot .brand { color: #fff; }

.nf-hero { position: relative; min-height: min(86vh, 760px); display: flex; align-items: flex-end; overflow: hidden; background: #000; margin-top: -72px; }
.nf-slide { position: absolute; inset: 0; background-size: cover; opacity: 0; transition: opacity 1.1s ease; }
.nf-slide.on { opacity: 1; }
.nf-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.55) 42%, rgba(0,0,0,.05) 75%), linear-gradient(0deg, #141414 0%, rgba(20,20,20,0) 34%); }
.nf-hero-in { position: relative; z-index: 2; width: 100%; padding-top: 140px; padding-bottom: 34px; display: grid; gap: 22px; }
.nf-copy { max-width: 620px; display: grid; gap: 14px; color: #fff; }
.nf-k { text-transform: uppercase; letter-spacing: .18em; font-size: 12px; font-weight: 700; color: #FFB066; }
.nf-copy h1 { font-family: var(--serif); font-size: clamp(36px, 5.2vw, 68px); line-height: 1.02; letter-spacing: -.01em; text-shadow: 0 2px 18px rgba(0,0,0,.45); }
.nf-copy p { font-size: clamp(15px, 1.3vw, 18px); max-width: 56ch; color: #EDEDED; }
.nf-meta { max-width: none !important; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px !important; color: #D4D4D4 !important; }
.nf-meta b { color: #fff; }
.nf-meta span { display: inline-flex; align-items: center; gap: 14px; }
.nf-meta span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #888; }
.nf-btn-main { background: var(--accent); color: #1A0E00; border-radius: 6px; min-height: 48px; padding: 0 26px; font-size: 16px; }
.nf-btn-main:hover { background: #FF8A1F; }
.nf-btn-main .ic, .nf-btn-sec .ic { width: 20px; height: 20px; }
.nf-btn-sec { background: rgba(109,109,110,.7); color: #fff; border-radius: 6px; min-height: 48px; padding: 0 22px; font-size: 16px; }
.nf-btn-sec:hover { background: rgba(109,109,110,.5); }
.nf-dots { display: flex; gap: 8px; }
.nf-dots button { width: 26px; height: 4px; border: 0; padding: 0; background: rgba(255,255,255,.35); border-radius: 2px; }
.nf-dots button.on { background: #fff; width: 40px; }
.nf-pills { display: flex; align-items: center; gap: 10px; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: none; }
.nf-pills::-webkit-scrollbar { display: none; }
.nf-pills-l { color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; margin-right: 4px; }
.pill { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 9px 18px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; backdrop-filter: blur(4px); }
.pill:hover { background: var(--accent); border-color: var(--accent); color: #1A0E00; }
.pill-w { background: #fff; color: #141414; border-color: #fff; }
.pill-w:hover { background: #E5E5E5; border-color: #E5E5E5; color: #141414; }

.nf-body { padding: 6px 0 56px; display: grid; gap: 34px; }
.nf-body > *, .nf-row, .nf-rail-w, .nf-hero-in > * { min-width: 0; }
.nf-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.nf-body { grid-template-columns: minmax(0, 1fr); overflow-x: clip; }
.nf-row-h { display: flex; align-items: baseline; gap: 16px; padding: 0 max(24px, 4vw); }
.nf-row-h h2 { font-size: clamp(18px, 1.6vw, 22px); color: #fff; font-weight: 700; }
.nf-row-h a { color: #FFB066; font-size: 13px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.nf-rail-w { position: relative; }
.nf-rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 21vw, 320px); gap: 10px; overflow-x: auto; padding: 8px max(24px, 4vw) 14px; scroll-snap-type: x proximity; scroll-padding: 0 max(24px, 4vw); scrollbar-width: none; }
.nf-rail::-webkit-scrollbar { display: none; }
.nf-tile { scroll-snap-align: start; display: grid; gap: 8px; text-decoration: none; color: #E5E5E5; transition: transform .2s; }
.nf-tile .cover { border-radius: 6px; }
.nf-tile:hover { transform: translateY(-4px); }
.nf-tile:hover .cover { box-shadow: 0 10px 28px rgba(0,0,0,.6); outline: 2px solid rgba(255,255,255,.85); }
.nf-tile:hover .cover-img img { transform: scale(1.06); }
.nf-info { display: grid; gap: 2px; font-size: 13px; color: #A3A3A3; }
.nf-info b { color: #fff; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.nf-prog { height: 3px; background: #404040; border-radius: 2px; overflow: hidden; }
.nf-prog i { display: block; height: 100%; background: var(--accent); }
.nf-arrow { position: absolute; top: 8px; bottom: 60px; width: max(24px, 4vw); z-index: 3; border: 0; background: rgba(20,20,20,.6); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.nf-arrow .ic { width: 28px; height: 28px; }
.nf-arrow.l { left: 0; } .nf-arrow.r { right: 0; }
.nf-rail-w:hover .nf-arrow { opacity: 1; }
.nf-arrow:focus-visible { opacity: 1; }
.nf-band { margin: 10px max(24px, 4vw) 0; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); background: linear-gradient(120deg, #231B63, #312783 60%, #4A2F9E); border-radius: 10px; overflow: hidden; color: #fff; }
.nf-band > div { padding: clamp(24px, 4vw, 48px); display: grid; gap: 14px; align-content: center; }
.nf-band h2 { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 34px); }
.nf-band p { color: #DCD8F5; max-width: 60ch; }
.nf-band img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; object-position: center 15%; }
@media (max-width: 760px) {
  .nf-hero { min-height: 0; margin-top: -64px; }
  .nf-hero-in { padding-top: 150px; padding-bottom: 22px; gap: 18px; }
  .nf-copy { gap: 10px; }
  .nf-copy h1 { font-size: 34px; }
  .nf-btn-main, .nf-btn-sec { min-height: 44px; padding: 0 18px; font-size: 15px; }
  .nf-body { gap: 26px; }
  .nf-shade { background: linear-gradient(0deg, #141414 0%, rgba(0,0,0,.75) 45%, rgba(0,0,0,.25) 100%); }
  .nf-band { grid-template-columns: 1fr; }
  .nf-band img { min-height: 200px; max-height: 240px; }
  .nf-arrow { display: none; }
  .nf-rail { grid-auto-columns: 72vw; }
}

/* ---------- Entretien : configuration ---------- */
.iv-setup { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px 32px; padding-bottom: 56px; align-items: start; }
.iv-step { grid-column: 1; display: grid; gap: 14px; }
.iv-step h2 { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 22px; }
.iv-step h2 span { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-family: var(--sans); font-size: 14px; }
.iv-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.iv-theme { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; text-align: left; padding: 8px; border: 1px solid var(--line); background: #fff; border-radius: 6px; }
.iv-theme img { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; }
.iv-theme b { display: block; font-size: 13px; line-height: 1.25; }
.iv-theme small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; margin-top: 2px; }
.iv-theme:hover { border-color: var(--ink); }
.iv-theme.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); background: var(--brand-tint); }
.iv-years { display: grid; gap: 8px; }
.iv-yrow { display: flex; align-items: center; gap: 14px; }
.iv-yrow input { flex: 1; accent-color: var(--accent); }
.iv-yrow output { min-width: 130px; font-weight: 700; }
.iv-profiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.iv-prof { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); background: #fff; border-radius: 6px; }
.iv-prof small { color: var(--muted); font-size: 12px; }
.iv-prof.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: #FFF4EA; }
.iv-sum { grid-column: 2; grid-row: 1 / span 4; position: sticky; top: 92px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.iv-sum img { width: 100%; height: 200px; object-fit: cover; object-position: center 15%; }
.iv-sum > div { padding: 18px; display: grid; gap: 10px; }
.iv-sum h3 { font-family: var(--serif); font-size: 22px; }
.iv-sum .nf-k { color: var(--accent); }
@media (max-width: 900px) { .iv-setup { grid-template-columns: 1fr; } .iv-sum { grid-column: 1; grid-row: auto; position: static; } .iv-profiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Assistant ---------- */
:root { --as-w: 420px; --as-w-wide: 680px; }
.as-fab { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: inline-flex; align-items: center; gap: 10px; padding: 0 22px 0 16px; height: 54px; border-radius: 999px; border: 0; background: var(--brand); color: #fff; font-weight: 700; font-size: 15px; box-shadow: 0 10px 28px rgba(49,39,131,.45); transition: transform .15s, background .15s; }
.as-fab .ic { width: 22px; height: 22px; }
.as-fab:hover { background: var(--brand-dark); transform: translateY(-2px); }
.as-panel { position: fixed; right: 22px; bottom: 22px; z-index: 61; width: min(440px, calc(100vw - 24px)); height: min(700px, calc(100vh - 44px)); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto auto; background: #fff; color: var(--ink); border-radius: 14px; overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,.3); }
/* Ordinateur : panneau ancré à droite, la page reste lisible à côté */
@media (min-width: 1200px) {
  body.as-docked { padding-right: var(--as-w); }
  body.as-docked-wide { padding-right: var(--as-w-wide); }
}
@media (min-width: 900px) {
  .as-panel { top: 0; right: 0; bottom: 0; height: 100vh; width: var(--as-w); border-radius: 0; box-shadow: -8px 0 30px rgba(0,0,0,.12); border-left: 1px solid var(--line); }
  .as-panel.wide { width: var(--as-w-wide); }
}
@media (max-width: 899px) { .desk-only { display: none !important; } }
.as-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--brand); color: #fff; }
.as-av { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #1A0E00; display: grid; place-items: center; flex: none; }
.as-av .ic { width: 20px; height: 20px; }
.as-title { flex: 1; min-width: 0; display: grid; gap: 4px; }
.as-title b { font-size: 16px; }
.as-pill { display: inline-flex; align-items: center; gap: 6px; justify-self: start; font-size: 11.5px; font-weight: 600; background: rgba(255,255,255,.14); border-radius: 999px; padding: 2px 9px; }
.as-pill i { width: 7px; height: 7px; border-radius: 50%; background: #FFC08A; }
.as-pill.on i { background: #3EE0A1; }
.as-hbtns { display: flex; gap: 4px; }
.as-hbtns button { background: none; border: 0; color: #fff; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; }
.as-hbtns button:hover { background: rgba(255,255,255,.16); }
.as-hbtns .ic { width: 19px; height: 19px; }
.as-ctx { display: flex; align-items: center; gap: 8px; padding: 9px 16px; font-size: 12.5px; background: var(--bg-soft); border-bottom: 1px solid var(--line-soft); min-width: 0; }
.as-ctx > span { color: var(--muted); flex: none; }
.as-ctx b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.as-link { margin-left: auto; flex: none; background: none; border: 0; padding: 0; color: var(--brand); font-weight: 700; font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; }
.as-log { overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; background: #FBFBFD; scroll-behavior: smooth; }
.as-welcome { display: grid; gap: 10px; padding: 4px 2px; }
.as-welcome h3 { font-family: var(--serif); font-size: 22px; }
.as-welcome p { color: var(--ink-2); font-size: 14.5px; }
.as-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 6px; }
.as-cards button { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 11px 12px; font-size: 13.5px; line-height: 1.35; transition: border-color .15s, box-shadow .15s; }
.as-cards button:hover { border-color: var(--brand); box-shadow: 0 4px 12px rgba(49,39,131,.12); }
.as-msg { max-width: 92%; padding: 11px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.as-panel.wide .as-msg { max-width: 86%; }
.as-msg p + p, .as-msg ul, .as-msg ol, .as-msg h4 { margin-top: 8px; }
.as-msg ul, .as-msg ol { padding-left: 20px; margin-bottom: 0; }
.as-msg h4 { font-size: 15px; font-family: var(--serif); }
.as-msg code { background: rgba(0,0,0,.06); padding: 1px 4px; border-radius: 3px; font-size: 13px; }
.as-msg a { font-weight: 700; }
.as-u { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.as-a { align-self: flex-start; background: #fff; border: 1px solid var(--line-soft); border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.as-src { font-size: 12px; color: var(--muted); margin-top: 8px; }
.as-tools { display: flex; gap: 4px; margin-top: 8px; border-top: 1px solid var(--line-soft); padding-top: 6px; }
.as-tools button { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; color: var(--muted); font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px; }
.as-tools button:hover { background: var(--bg-soft); color: var(--brand); }
.as-tools .ic { width: 14px; height: 14px; }
.as-typing { display: inline-flex; gap: 4px; }
.as-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: asb 1s infinite; }
.as-typing i:nth-child(2) { animation-delay: .15s; } .as-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes asb { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.as-quick { display: flex; gap: 6px; padding: 10px 12px 0; overflow-x: auto; scrollbar-width: none; background: #fff; border-top: 1px solid var(--line-soft); }
.as-quick::-webkit-scrollbar { display: none; }
.as-quick button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.as-quick button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.as-quick button:disabled { opacity: .5; }
.as-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px 6px; background: #fff; }
.as-form textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; line-height: 1.45; min-height: 48px; max-height: 180px; }
.as-form textarea:focus { outline: 2px solid var(--brand); border-color: transparent; }
.as-form button { width: 48px; height: 48px; border: 0; border-radius: 12px; background: var(--accent); color: #1A0E00; display: grid; place-items: center; flex: none; }
.as-form button:disabled { opacity: .5; }
.as-form button .ic { width: 20px; height: 20px; }
.as-hint { font-size: 11px; color: var(--muted); padding: 0 14px 10px; background: #fff; }
.as-set { padding: 18px 16px; display: grid; gap: 10px; align-content: start; overflow-y: auto; font-size: 14px; grid-row: 3 / span 4; }
.as-set input { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.as-set ol { padding-left: 20px; margin: 0; display: grid; gap: 4px; }
@media (max-width: 899px) and (min-width: 601px) { .as-panel { width: 460px; } }
@media (max-width: 600px) {
  .as-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; }
  .as-fab span { display: none; }
  .as-fab { padding: 0; width: 56px; justify-content: center; }
  .as-hint { display: none; }
  .as-form { padding-bottom: max(10px, env(safe-area-inset-bottom, 0px)); }
}
@media print { .as-fab, .as-panel { display: none !important; } body.as-docked, body.as-docked-wide { padding-right: 0 !important; } }

@media (max-width: 560px) { .nf-hero { margin-top: 0; } .nf-hero-in { padding-top: 110px; } }
@media (max-width: 560px) { .iv-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .iv-theme { grid-template-columns: minmax(0, 1fr); align-items: start; padding: 6px; } .iv-theme img { width: 100%; height: 64px; } .iv-yrow { flex-wrap: wrap; } .iv-yrow output { min-width: 0; } .iv-step h2 { font-size: 19px; } }
@media (max-width: 860px) { .run-side .persona { display: flex; align-items: center; gap: 4px; } .run-side .persona img, .run-side .persona .ph { width: 72px; height: 72px; aspect-ratio: auto; flex: none; font-size: 28px; } .run-side .persona .ph .ic { width: 50%; height: 50%; } .run-side { gap: 10px; } }

/* ---------- Documents de la formation ---------- */
.docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.doc-card { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #fff; }
.doc-thumb { position: relative; aspect-ratio: 210 / 297; background: var(--c1); border-radius: 4px; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 10px; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.doc-thumb img { position: absolute; left: 0; top: 0; width: 100%; height: 58%; object-fit: cover; }
.doc-thumb::after { content: ""; position: absolute; left: 0; right: 0; top: 30%; height: 30%; background: linear-gradient(180deg, rgba(0,0,0,0), var(--c1)); }
.doc-thumb > :not(img) { position: relative; z-index: 1; }
.doc-k { font-size: 7px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: #FFB066; }
.doc-thumb b { font-family: var(--serif); font-size: 11px; line-height: 1.15; }
.doc-logo { display: flex; align-items: center; gap: 4px; font-size: 7px; font-weight: 700; margin-top: 4px; }
.doc-logo .brand-mark { width: 12px; height: 12px; }
.doc-b { display: grid; gap: 6px; align-content: start; }
.doc-b h3 { font-family: var(--serif); font-size: 19px; }
.doc-b p { color: var(--ink-2); font-size: 14px; }
.doc-b small { color: var(--muted); }
.doc-b .q-actions { margin-top: 6px; flex-wrap: wrap; }
.modal-doc .modal-card { width: min(1100px, calc(100vw - 24px)); max-width: none; height: calc(100vh - 40px); display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; padding: 18px; }
.doc-prev-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-right: 40px; }
.doc-prev-h small { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; }
.doc-prev-h h2 { font-family: var(--serif); font-size: 22px; }
.doc-frame { width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 6px; background: #E9ECEE; }
@media (max-width: 760px) { .docs { grid-template-columns: minmax(0, 1fr); } .doc-card { grid-template-columns: 96px minmax(0, 1fr); } .modal-doc .modal-card { width: 100vw; height: 100dvh; padding: 12px; border-radius: 0; } }

/* ---------- Lecteur : annonces et fin d'extrait ---------- */
.video { position: relative; }
.v-over { position: absolute; inset: 0; z-index: 3; background: rgba(10,10,20,.88); color: #fff; display: grid; place-items: center; text-align: center; padding: 20px; }
.v-over > div { display: grid; gap: 10px; justify-items: center; max-width: 560px; }
.v-over small { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; color: #FFB066; font-weight: 700; }
.v-over b { font-family: var(--serif); font-size: clamp(18px, 2.4vw, 26px); }
.v-over span { color: #CFCFE0; font-size: 14px; }
.v-over .q-actions { justify-content: center; flex-wrap: wrap; }
.v-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.v-opt input { accent-color: var(--accent); }
@media (max-width: 760px) { .modal.modal-doc { padding: 0; } }

.iv-recs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.iv-rec { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; padding: 10px; border: 1px solid var(--line); background: #fff; border-radius: 6px; }
.iv-rec img { width: 72px; height: 88px; object-fit: cover; object-position: top; border-radius: 4px; }
.iv-rec small { display: block; color: var(--muted); font-size: 12px; }
.iv-rec.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: #FFF4EA; }
@media (max-width: 560px) { .iv-recs { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Mode Agence ---------- */
.ag-hero { background: linear-gradient(120deg, #140F3D, #312783 55%, #4A2F9E); color: #fff; }
.ag-hero-in { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; padding-top: 48px; padding-bottom: 48px; align-items: center; }
.ag-hero h1 { font-family: var(--serif); font-size: clamp(30px, 3.6vw, 46px); margin: 8px 0 14px; }
.ag-hero p { color: #DCD8F5; max-width: 62ch; }
.ag-hero .q-actions { margin-top: 20px; }
.ag-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 22px; display: grid; gap: 10px; }
.ag-card small { text-transform: uppercase; letter-spacing: .14em; font-size: 11px; color: #FFB066; font-weight: 700; }
.ag-card > b { font-family: var(--serif); font-size: 26px; }
.ag-card > span { font-size: 13px; color: #DCD8F5; }
.ag-xp { height: 8px; background: rgba(255,255,255,.18); border-radius: 4px; overflow: hidden; }
.ag-xp i { display: block; height: 100%; background: var(--accent); }
.ag-grades { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.ag-grades li { display: flex; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,.55); border-left: 3px solid rgba(255,255,255,.2); padding-left: 10px; }
.ag-grades li.on { color: #fff; border-color: var(--accent); }
.ag-grades small { color: inherit; letter-spacing: 0; text-transform: none; font-weight: 400; }
.ag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.ag-m { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; text-decoration: none; color: var(--ink); background: #fff; transition: box-shadow .2s, transform .2s; }
.ag-m:hover { box-shadow: 0 10px 26px rgba(0,0,0,.12); transform: translateY(-2px); }
.ag-m.locked { opacity: .55; }
.ag-m.locked:hover { transform: none; box-shadow: none; }
.ag-img { position: relative; aspect-ratio: 16 / 8; }
.ag-img img { width: 100%; height: 100%; object-fit: cover; }
.ag-img .badge { position: absolute; left: 10px; top: 10px; }
.ag-b { padding: 14px 16px 16px; display: grid; gap: 6px; align-content: start; }
.ag-b small { color: var(--muted); font-size: 12px; }
.ag-b b { font-family: var(--serif); font-size: 19px; line-height: 1.2; }
.ag-b p { font-size: 14px; color: var(--ink-2); }
.ag-how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 0; list-style: none; counter-reset: s; margin-bottom: 48px; }
.ag-how li { counter-increment: s; background: var(--bg-soft); padding: 16px; border-radius: 8px; font-size: 14px; }
.ag-how li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 8px; }
.pj-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; padding-bottom: 56px; }
.pj-main { display: grid; gap: 22px; }
.pj-brief { background: var(--bg-soft); padding: 20px 22px; border-radius: 8px; display: grid; gap: 8px; }
.pj-brief h2, .pj-grid-eval h2 { font-family: var(--serif); font-size: 22px; }
.pj-brief ul { margin: 0; padding-left: 20px; }
.pj-step { border: 1px solid var(--line); border-radius: 8px; padding: 18px; display: grid; gap: 10px; }
.pj-step-h { display: flex; gap: 14px; }
.pj-step-h > span { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--accent); color: #1A0E00; display: grid; place-items: center; font-weight: 700; }
.pj-step-h h3 { font-size: 17px; }
.pj-step-h p { color: var(--ink-2); font-size: 14px; }
.pj-tip { font-size: 13px; color: var(--muted); }
.pj-t { min-height: 130px; }
.pj-grid-eval { display: grid; gap: 8px; }
.pj-side { position: sticky; top: 92px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.pj-side img { width: 100%; height: 150px; object-fit: cover; }
.pj-side > div { padding: 16px; display: grid; gap: 8px; }
.pj-side h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 6px; }
.pj-side a { font-size: 14px; font-weight: 600; }
.pj-side ol { margin: 0; padding-left: 20px; font-size: 14px; display: grid; gap: 4px; }
.pj-side li.ok { color: var(--green); font-weight: 700; }
.pf-item { border: 1px solid var(--line); border-radius: 8px; padding: 20px; margin-bottom: 20px; display: grid; gap: 14px; break-inside: avoid; }
.pf-h { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; }
.pf-h img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.pf-h small { color: var(--accent); font-weight: 700; }
.pf-h h2 { font-family: var(--serif); font-size: 22px; margin: 4px 0 6px; }
.pf-s h3 { font-size: 15px; }
.pf-s p { font-size: 14px; color: var(--ink-2); }
@media (max-width: 900px) { .ag-hero-in, .pj-grid { grid-template-columns: minmax(0, 1fr); } .pj-side { position: static; } .ag-how { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ag-how { grid-template-columns: minmax(0, 1fr); } .pf-h { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Bouton retour ---------- */
.backbar { padding-top: 14px; padding-bottom: 0; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; font-size: 14px; }
.back-btn .ic { width: 18px; height: 18px; }
.back-btn:hover { border-color: var(--ink); background: var(--bg-soft); }
.back-btn.back-dark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); color: #fff; height: 34px; flex: none; }
.back-btn.back-dark:hover { background: rgba(255,255,255,.18); }
body.theme-dark .back-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); color: #fff; }
.ag-hero + .backbar, main > .backbar + .ag-hero { margin-top: 0; }
@media (max-width: 560px) { .back-btn.back-dark span { display: none; } .back-btn.back-dark { padding: 0 8px; } }
@media (min-width: 900px) { .as-quick { flex-wrap: wrap; overflow: visible; } .as-pill { white-space: nowrap; } }
.as-pill { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
