/* Lilou Dentaire · feuille de style unique
   Idée de mise en page : une application de révision calme. Fond clair légèrement bleuté, cartes arrondies,
   un bleu-vert clinique comme couleur principale, un corail pour l'action, une couleur par famille de kystes. */
:root {
  color-scheme: light;
  --bg: #f4f7f7;
  --surface: #ffffff;
  --surface-2: #f8fbfb;
  --ink: #17242c;
  --muted: #5b6b74;
  --line: #dfe7e8;
  --teal: #0f6b6b;
  --teal-2: #138585;
  --teal-soft: #e2f1f0;
  --coral: #c4482a;
  --coral-ink: #a8401f;
  --line-strong: #84939b;
  --coral-soft: #fdebe5;
  --sun-soft: #fff3d1;
  --sun-ink: #5a4300;
  --ok: #1d7a46;
  --ok-soft: #e3f4ea;
  --ko: #b3322a;
  --ko-soft: #fbe7e5;
  --fa: #b0365f;
  --fb: #2f62b0;
  --fc: #8f5d05;
  --fd: #6c4aa6;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(23, 36, 44, .05), 0 6px 20px rgba(23, 36, 44, .06);
  --font-display: "Outfit", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* schémas */
  --bone: #ddd3c1; --gum: #e9a39e; --gum2: #f4cbc6; --enamel: #fdfcf7; --dentin: #efe5c8; --tooth-line: #6f6552;
  --pulp: #d9736b; --dead: #6b6b6b; --deadcrown: #bdb8ac; --lucent: #26303c; --lisere: #ffffff;
  --pin: #17242c; --pin-ink: #ffffff; --svgbg: #eef2f4; --blood: #8e2430; --air: #aebccb;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--font-body); }
a { color: var(--teal); }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4.4vw, 40px); font-weight: 700; }
h2 { font-size: clamp(21px, 2.8vw, 26px); font-weight: 600; }
h3 { font-size: 19px; font-weight: 600; }
h4 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14.5px; }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .fade { animation: fade .2s ease-out; }
  @keyframes fade { from { transform: translateY(4px); } to { transform: none; } }
}

/* ---------- barre du haut et navigation ---------- */
.topbar { -webkit-backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 10px max(16px, calc((100% - 1160px) / 2)); background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand img { display: block; height: 42px; width: auto; }
.mainnav { display: flex; gap: 4px; margin-left: auto; }
.mainnav a { text-decoration: none; color: var(--muted); font-weight: 700; font-size: 15.5px; padding: 8px 14px; border-radius: 999px; }
.mainnav a:hover { color: var(--ink); background: var(--surface-2); }
.mainnav a.on { color: var(--teal); background: var(--teal-soft); }
.account { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--coral-soft); color: var(--coral); font: 700 16px var(--font-display); text-decoration: none; }
.tabbar { display: none; }
@media (max-width: 760px) {
  .mainnav { display: none; }
  .account { margin-left: auto; }
  .brand img { height: 36px; }
  .tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--muted); text-decoration: none; padding: 4px 0; }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.on { color: var(--teal); }
  body { padding-bottom: 76px; }
}

/* ---------- mise en page ---------- */
main { max-width: 1160px; margin: 0 auto; padding: 28px 16px 64px; outline: none; }
.page-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 24px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.crumbs { font-size: 14.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.stack { display: grid; gap: 18px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.fade > section, .fade > .grid, .fade > .tiles + section { margin-top: 36px; }
.fade > :first-child { margin-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.link { text-decoration: none; color: inherit; display: block; transition: border-color .15s, transform .15s; }
.card.link:hover { border-color: var(--teal-2); }
.card h3 + p, .card h2 + p { margin-top: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 15.5px var(--font-body); padding: 11px 18px; border-radius: 12px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; min-height: 44px; }
.btn.primary { background: var(--coral); color: #fff; }
.btn.primary:hover { background: #a93b20; }
.btn.teal { background: var(--teal); color: #fff; }
.btn.teal:hover { background: #0b5858; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--teal-2); color: var(--teal); }
.btn.small { padding: 7px 12px; min-height: 36px; font-size: 14.5px; border-radius: 10px; }
.btn[disabled] { opacity: 1; background: var(--surface-2); color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chip.fam { color: var(--fam); border-color: color-mix(in srgb, var(--fam) 35%, transparent); background: color-mix(in srgb, var(--fam) 8%, white); }
.fam-a { --fam: var(--fa); } .fam-b { --fam: var(--fb); } .fam-c { --fam: var(--fc); } .fam-d { --fam: var(--fd); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-new { color: #56656e; background: #eef2f3; }
.st-seen { color: var(--teal); background: var(--surface); box-shadow: inset 0 0 0 1px #b9dcd9; }
.st-progress { color: var(--teal); background: var(--teal-soft); }
.st-due { color: #7a5200; background: #fff3d6; }
.st-fragile { color: var(--ko); background: var(--ko-soft); }
.st-mastered { color: var(--ok); background: var(--ok-soft); }

.bar { height: 8px; border-radius: 99px; background: #e8eeef; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--teal-2); border-radius: 99px; }
.ring { width: 112px; height: 112px; flex: none; }
.ring .track { stroke: #e3ebec; }
.ring .val { stroke: var(--teal-2); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.ring text { font: 700 24px var(--font-display); fill: var(--ink); text-anchor: middle; }
.ring text.sub { font: 400 11px var(--font-body); fill: var(--muted); }

/* ---------- accueil ---------- */
.hello { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
.hello p { color: var(--muted); max-width: 60ch; margin-top: 6px; }
.next-card { background: linear-gradient(135deg, var(--teal) 0%, #13807a 100%); color: #fff; border: 0; }
.next-card .eyebrow { color: #e0f4f1; }
.next-card h2 { margin: 6px 0 8px; }
.next-card p { color: #dff3f1; max-width: 56ch; }
.next-card .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.kpi { display: flex; gap: 18px; align-items: center; }
.kpi-list { display: grid; gap: 6px; font-size: 15px; }
.kpi-list b { font-family: var(--font-display); font-size: 20px; margin-right: 4px; }
.list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.list a, .list > li > div { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.list a:hover { background: var(--surface-2); }
.list .grow { flex: 1; min-width: 0; }
.list .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--fam, var(--teal)); flex: none; }
.empty { color: var(--muted); font-size: 15px; padding: 6px 0; }

/* ---------- bibliothèque ---------- */
.search { position: relative; }
.search input { width: 100%; font: 400 17px var(--font-body); padding: 14px 16px 14px 46px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); }
.search input:focus { border-color: var(--teal-2); outline: none; box-shadow: 0 0 0 4px var(--teal-soft); }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; }
.results { display: grid; gap: 8px; margin-top: 12px; }
.result { display: block; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.result small { display: block; color: var(--muted); margin-top: 2px; }
.result mark { background: var(--sun-soft); color: inherit; border-radius: 3px; }
.card.chapter-card { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: center; }
.chapter-card .illu svg { width: 100%; height: auto; border-radius: 14px; display: block; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14.5px; color: var(--muted); margin: 10px 0 14px; }
.meta b { color: var(--ink); }
@media (max-width: 640px) { .card.chapter-card { grid-template-columns: 1fr; } .chapter-card .illu { max-width: 260px; } }

/* ---------- chapitre ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 20px; scrollbar-width: none; }
.tabs a { white-space: nowrap; text-decoration: none; font-weight: 700; font-size: 15px; color: var(--muted); padding: 9px 15px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); }
.tabs a.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.family { border-left: 5px solid var(--fam); }
.family-head { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.family-head .num { font: 700 26px var(--font-display); color: var(--fam); }
.family details { margin-top: 12px; }
.family summary { cursor: pointer; font-weight: 700; color: var(--fam); }
.family .common { margin-top: 10px; color: var(--ink); max-width: 75ch; }
.family .extra { margin-top: 10px; }
.family .extra ul { margin: 6px 0 0; padding-left: 20px; }
.notion-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; margin-top: 16px; }
.ncard { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.ncard:hover { border-color: var(--fam); background: var(--surface); }
.ncard h4 { font-size: 17px; }
.ncard p { font-size: 14.5px; color: var(--muted); }
.ncard .row { margin-top: auto; justify-content: space-between; }
.tree { display: grid; gap: 14px; }
.tree .q { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.tree .branches { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
@media (max-width: 860px) { .tree .branches { grid-template-columns: 1fr; } }
.tree .leaves { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.leaf { border-left: 4px solid var(--fam); padding: 4px 0 4px 12px; }
.leaf h4 a { color: var(--fam); text-decoration: none; }
.leaf ul { margin: 6px 0 0; padding-left: 16px; font-size: 14.5px; }

.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.scroll table { min-width: 900px; }
.scroll table.narrow { min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
thead th { position: sticky; top: 0; background: var(--surface-2); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { border-left: 4px solid var(--fam, transparent); white-space: nowrap; }
tbody th a { color: var(--ink); text-decoration: none; }
tbody th a:hover { color: var(--teal); text-decoration: underline; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.tile b { display: block; font: 700 24px var(--font-display); color: var(--teal); font-variant-numeric: tabular-nums; }
.tile span { font-size: 14.5px; color: var(--muted); }
.trap { border-top: 4px solid var(--coral); }

/* ---------- fiche notion ---------- */
.notion-head { display: grid; gap: 10px; }
.notion-head .row { gap: 8px; }
.levels { display: inline-grid; grid-template-columns: repeat(3, auto); background: #e7eeef; border-radius: 14px; padding: 4px; gap: 4px; margin-top: 4px; }
.levels a { text-decoration: none; color: var(--muted); font-weight: 700; font-size: 15px; padding: 9px 16px; border-radius: 10px; display: flex; gap: 8px; align-items: center; }
.levels a .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: #fff; color: var(--muted); }
.levels a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.levels a.on .n { background: var(--teal); color: #fff; }
@media (max-width: 520px) { .levels { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); } .levels a { padding: 9px 4px; justify-content: center; gap: 5px; font-size: 13.5px; } .levels a .n { width: 18px; height: 18px; font-size: 11px; } }
.l1 { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 22px; align-items: start; }
@media (max-width: 820px) { .l1 { grid-template-columns: 1fr; } }
.schema svg { width: 100%; height: auto; display: block; border-radius: 14px; border: 1px solid var(--line); }
.legend { list-style: none; margin: 10px 0 0; padding: 0; counter-reset: l; display: grid; gap: 6px; font-size: 14.5px; }
.legend li { counter-increment: l; display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.legend li::before { content: counter(l); width: 20px; height: 20px; border-radius: 50%; background: var(--pin); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
.def { font-size: 20px; line-height: 1.45; font-family: var(--font-body); }
.ess { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ess li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; }
.ess li::before { content: ""; width: 20px; height: 20px; margin-top: 3px; border-radius: 6px; background: var(--teal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%230f6b6b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.keep { background: var(--sun-soft); color: var(--sun-ink); border-radius: 14px; padding: 12px 16px; font-weight: 700; }
.mnemo { background: var(--teal-soft); border-radius: 14px; padding: 12px 16px; }
.keep > small, .mnemo > small, .warn > small { display: block; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 2px; font-weight: 700; }
.mnemo > small { color: var(--teal); }
.warn { background: var(--coral-soft); border-radius: 14px; padding: 12px 16px; }
.warn > small { color: var(--coral-ink); }
.radios { display: grid; gap: 12px; }
.radios figure { margin: 0; }
.radios img { display: block; width: 100%; border-radius: 12px; background: #000; border: 1px solid var(--line); }
.radios figcaption { font-size: 13.5px; color: var(--muted); margin-top: 5px; }
.acc { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.acc + .acc { margin-top: 10px; }
.acc summary { cursor: pointer; list-style: none; padding: 14px 16px; font: 600 17px var(--font-display); display: flex; justify-content: space-between; align-items: center; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 22px; color: var(--teal); }
.acc[open] summary::after { content: "−"; }
.acc .body { padding: 0 16px 16px; display: grid; gap: 10px; }
.acc .body p { max-width: 75ch; }
.doc { max-width: 860px; }
.doc dl { margin: 0; display: grid; gap: 12px; }
.doc .rub { display: grid; grid-template-columns: 170px 1fr; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.doc dt { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fam); padding-top: 3px; }
.doc dd { margin: 0; }
@media (max-width: 600px) { .doc .rub { grid-template-columns: 1fr; gap: 2px; } }
.doc ul.points { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.hors { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); border-left: 3px dotted var(--line); padding-left: 8px; }
.verif { border-left: 5px solid var(--vc, var(--muted)); }
.verif.v-verifie { --vc: var(--ok); } .verif.v-nuance { --vc: #b07b00; } .verif.v-contradiction { --vc: var(--coral); } .verif.v-cours { --vc: #7a8a93; }
.verif ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.refs { font-size: 14px; }
.pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.resume { position: sticky; top: 70px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 14px; margin-bottom: 18px; }
.resume .btn { background: #fff; color: var(--ink); }

/* ---------- QCM ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
label.f { display: grid; gap: 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
select, input[type=text], input[type=password], input:not([type]) { font: 400 16px var(--font-body); padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); width: 100%; }
select:focus, input:focus { border-color: var(--teal-2); outline: none; box-shadow: 0 0 0 4px var(--teal-soft); }
.mode-card { display: flex; flex-direction: column; gap: 10px; }
.mode-card .btn { align-self: flex-start; margin-top: auto; }
.mode-card .big { font: 700 34px var(--font-display); color: var(--teal); }
.quiz { max-width: 820px; margin: 0 auto; }
.quiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.quiz-top .bar { flex: 1; }
.qcard { padding: 24px; }
.qcard .prompt { font: 600 21px/1.35 var(--font-display); margin: 8px 0 16px; }
.case-info { background: var(--surface-2); border: 1px dashed var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; font-size: 15.5px; }
.case-info.past { opacity: .75; }
.qmedia { margin: 0 0 16px; }
.qmedia svg, .qmedia img { width: 100%; max-height: 360px; object-fit: contain; display: block; border-radius: 12px; border: 1px solid var(--line); background: var(--svgbg); }
.qmedia img { background: #000; }
.opts { display: grid; gap: 10px; }
.opt { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; text-align: left; width: 100%; font: 400 16.5px/1.4 var(--font-body); color: var(--ink); padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; }
.opt:hover:not([disabled]) { border-color: var(--teal-2); }
.opt .mk { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; font: 700 13px var(--font-display); color: var(--muted); }
.opts.single .opt .mk { border-radius: 50%; }
.opt.sel { border-color: var(--teal); background: var(--teal-soft); }
.opt.sel .mk { background: var(--teal); border-color: var(--teal); color: #fff; }
.opt.good { border-color: var(--ok); background: var(--ok-soft); }
.opt.good .mk { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.bad { border-color: var(--ko); background: var(--ko-soft); }
.opt.bad .mk { background: var(--ko); border-color: var(--ko); color: #fff; }
.opt.missed { border-style: dashed; border-color: var(--ok); }
.opt[disabled] { cursor: default; }
.opt .why { display: block; font-size: 14.5px; color: var(--muted); margin-top: 4px; }
.tf { grid-template-columns: 1fr 1fr; }
.feedback { margin-top: 16px; border-radius: 14px; padding: 16px; display: grid; gap: 8px; }
.feedback.good { background: var(--ok-soft); }
.feedback.bad { background: var(--ko-soft); }
.feedback h3 { color: var(--ok); }
.feedback.bad h3 { color: var(--ko); }
.quiz-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.score { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.review-item { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.review-item summary { cursor: pointer; padding: 12px 14px; display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; list-style: none; }
.review-item summary::-webkit-details-marker { display: none; }
.review-item .body { padding: 0 14px 14px 50px; display: grid; gap: 8px; font-size: 15.5px; }
.mark-ok, .mark-ko { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; }
.mark-ok { background: var(--ok); } .mark-ko { background: var(--ko); }
.hist td, .hist th { font-size: 14.5px; }

/* ---------- connexion ---------- */
body.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 500px at 50% -10%, var(--teal-soft), var(--bg)); }
.auth-card { width: min(100%, 420px); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 30px 26px; box-shadow: var(--shadow); display: grid; gap: 12px; }
.auth-logo { height: 52px; width: auto; margin-bottom: 8px; }
.form { display: grid; gap: 8px; margin-top: 6px; }
.form label { font-size: 14px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.form .btn { margin-top: 12px; }
.alert { background: var(--ko-soft); color: var(--ko); border-radius: 12px; padding: 10px 12px; font-weight: 700; }
.ok { background: var(--ok-soft); color: var(--ok); border-radius: 12px; padding: 10px 12px; font-weight: 700; }
.links { font-size: 15px; }

/* ---------- schémas (SVG des fiches) ---------- */
svg .bg { fill: var(--svgbg); } svg .bone { fill: var(--bone); } svg .gum { fill: var(--gum); } svg .gum2 { fill: var(--gum2); }
svg .ridge { fill: none; stroke: var(--gum); stroke-width: 26; stroke-linecap: round; }
svg .raphe { stroke: var(--gum); stroke-width: 2; stroke-dasharray: 5 4; }
svg .pearl { fill: #fff6c8; stroke: #a88a2a; stroke-width: 1.2; }
svg .crown { fill: var(--enamel); stroke: var(--tooth-line); stroke-width: 1.5; } svg .crown.dead { fill: var(--deadcrown); }
svg .root { fill: var(--dentin); stroke: var(--tooth-line); stroke-width: 1.5; }
svg .pulp { fill: none; stroke: var(--pulp); stroke-width: 3; stroke-linecap: round; } svg .pulp.dead { stroke: var(--dead); }
svg .cyst { fill: var(--lucent); stroke: var(--lisere); stroke-width: 3; } svg .cyst.thin { stroke-width: 2; }
svg .cyst.over { fill-opacity: .82; } svg .cyst.empty { fill-opacity: .9; }
svg .pocket { fill: var(--lucent); } svg .nodule { fill: #8fb4e6; stroke: #2a5ea6; stroke-width: 1.5; }
svg .calc { fill: var(--lisere); } svg .mid { stroke: var(--pin); stroke-width: 1.5; stroke-dasharray: 3 5; }
svg .canal { fill: none; stroke: var(--lucent); stroke-width: 2; stroke-dasharray: 7 4; }
svg .air { fill: var(--air); } svg .sinus { fill: var(--air); stroke: var(--lisere); stroke-width: 2; }
svg .scar { stroke: #b5412c; stroke-width: 3; stroke-dasharray: 5 3; }
svg .spine { fill: var(--enamel); stroke: var(--tooth-line); stroke-width: 1; }
svg .gland { fill: #e9b98b; stroke: #9a6a3a; stroke-width: 1.5; }
svg .blood { fill: var(--blood); stroke: var(--lisere); stroke-width: 2.5; }
svg .septa { fill: none; stroke: var(--lisere); stroke-width: 1.6; opacity: .85; }
svg .arrow { stroke: #f2b544; stroke-width: 3; } svg .arh { fill: #f2b544; }
svg .lumen { fill: var(--lucent); } svg .ker { fill: #f2c9a0; stroke: var(--tooth-line); stroke-width: 1; }
svg .epi { fill: #f1b7c4; stroke: var(--tooth-line); stroke-width: 1; } svg .conj { fill: #c9d9ee; stroke: var(--tooth-line); stroke-width: 1; }
svg .nuc { fill: #4b2a6b; } svg .gran { fill: #6b3a8a; }
svg .lblinv { fill: #fff; font: 700 15px sans-serif; text-anchor: middle; letter-spacing: .08em; }
svg .lead { stroke: var(--pin); stroke-width: 1.4; }
svg .pin circle { fill: var(--pin); stroke: var(--svgbg); stroke-width: 1.5; }
svg .pin text { fill: var(--pin-ink); font: 700 11px sans-serif; text-anchor: middle; }

/* ---------- vue PDF et impression ---------- */
.print-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.paper { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 34px 38px; max-width: 900px; margin: 0 auto; font-size: 15px; }
.paper h1 { font-size: 30px; }
.paper h2 { font-size: 22px; margin-top: 26px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.paper h3 { font-size: 19px; color: var(--fam, var(--ink)); }
.paper .pnotion { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.paper .pgrid { display: grid; grid-template-columns: 250px 1fr; gap: 16px; margin-top: 10px; }
.paper .pgrid svg, .paper .pgrid img { width: 100%; height: auto; display: block; border-radius: 6px; }
.paper .pgrid img { margin-top: 6px; }
.paper .doc .rub { grid-template-columns: 140px 1fr; padding-bottom: 6px; }
.paper .src { font-size: 12.5px; color: var(--muted); }
.paper table { font-size: 12.5px; }
.paper .scroll { overflow: visible; }
.paper .scroll table { min-width: 0; }
@media (max-width: 700px) { .paper { padding: 20px 16px; } .paper .pgrid { grid-template-columns: 1fr; } }
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body { background: #fff; padding: 0; font-size: 11pt; }
  .topbar, .tabbar, .print-bar, .skip, .resume { display: none !important; }
  main { padding: 0; max-width: none; }
  .paper { border: 0; padding: 0; max-width: none; border-radius: 0; }
  .paper h2 { break-after: avoid; }
  .paper .pnotion h3 { break-after: avoid; }
  .paper .pgrid > div:first-child, .paper .keep, .paper .warn, .paper .doc .rub { break-inside: avoid; }
  .paper .pfam { break-before: page; }
  .keep, .mnemo, .warn, .chip, .badge, svg, img, thead th, tbody th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; text-decoration: none; }
  .paper .refs a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; word-break: break-all; }
}

/* ---------- correctifs d'audit UX ---------- */
.search input[type=text] { padding: 14px 16px 14px 46px; font-size: 17px; border-radius: 14px; }
select, input[type=text], input[type=password], input[type=date], input:not([type]), textarea { border-color: var(--line-strong); }
textarea { font: 400 16px var(--font-body); padding: 11px 12px; border: 1.5px solid var(--line-strong); border-radius: 12px; width: 100%; resize: vertical; margin-top: 4px; }
input[type=date] { font: 400 16px var(--font-body); padding: 9px 12px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.card.family .bar > i { background: var(--fam); }
.quiz-actions { align-items: center; }
.pager > :last-child { margin-left: auto; text-align: right; }
.family-head { flex-wrap: nowrap; } .family-head h2 { min-width: 0; }
.opt.missed { background: var(--ok-soft); }
.opt.missed .mk { border-color: var(--ok); color: var(--ok); background: #fff; }
@media (hover: none) {
  .opt:hover:not([disabled]) { border-color: var(--line); }
  .opt.sel:hover:not([disabled]) { border-color: var(--teal); }
  .list a:hover { background: transparent; }
}
@media (max-width: 760px) {
  .btn.small { min-height: 44px; }
  .leaf li a { display: inline-block; padding: 6px 0; }
  .qcard { padding: 18px 16px 0; }
  .quiz-actions { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 6; margin: 16px -16px 0; padding: 12px 16px; background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
  .quiz-actions .btn { flex: 1 1 auto; }
  .quiz-actions > .row { flex: 1 1 100%; }
  .feedback { scroll-margin-bottom: 160px; }
}
@media (max-width: 600px) {
  .scroll table.narrow { min-width: 0; }
  .scroll tbody th { white-space: normal; }
  .scroll th, .scroll td { padding: 10px 8px; }
  table.pairs thead { display: none; }
  table.pairs tr { display: grid; gap: 2px; padding: 10px 12px; border-bottom: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--fam, transparent); }
  table.pairs tbody tr:last-child { border-bottom: 0; }
  table.pairs th, table.pairs td { padding: 0; border: 0; }
  table.prog :is(th, td):is(:nth-child(4), :nth-child(6)), table.hist :is(th, td):nth-child(3) { display: none; }
  .scroll table:not(.narrow) :is(tbody th, thead th:first-child) { position: sticky; left: 0; z-index: 2; min-width: 128px; max-width: 128px; white-space: normal; border-left: 0; box-shadow: inset 4px 0 0 var(--fam, transparent), inset -1px 0 0 var(--line); }
  .scroll table:not(.narrow) tbody th { background: var(--surface); }
}
@media (max-width: 520px) {
  .list a, .list > li > div { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 4px; align-items: start; }
  .list a .dot, .list > li > div .dot { margin-top: 8px; }
  .list a > .badge, .list a > .small:last-child, .list > li > div > .btn, .list > li > div > .badge { grid-column: 2; justify-self: start; }
  .row > .btn { flex: 1 1 auto; }
  .tabs { margin-inline: -16px; padding-inline: 16px; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
}

/* ---------- séance du jour, rappel libre, progression ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
a.plain { color: inherit; text-decoration: none; }
.chip.streak { color: #7a5200; background: var(--sun-soft); border-color: #f0dca0; }
.chip.hot { color: #fff; background: var(--coral); border-color: var(--coral); }
.warn-card { border-left: 5px solid var(--coral); }
.plan { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.plan li { display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, .1); border-radius: 12px; padding: 10px 12px; }
.plan .tick { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7); }
.plan li.done .tick { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%230f6b6b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; border-color: #fff; }
.plan li.done b { text-decoration: line-through; opacity: .8; }
.plan .small { color: #dff3f1; }
.plan .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .55); background: transparent; }
.plan.express li { background: var(--surface); border: 1px solid var(--line); }
.plan.express .tick { border-color: var(--teal-2); }
.plan.express .small { color: var(--muted); }
.express-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; border-left: 5px solid var(--coral); }
.recall-answer { background: var(--teal-soft); border-radius: 14px; padding: 12px 16px; margin-top: 4px; }
.recall-answer small { display: block; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; font-weight: 700; color: var(--teal); }
.recall-fold summary { font-size: 15.5px; }
.feedback .keep, .feedback .mnemo { margin: 0; }
ul.answers { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 3px; }
.cal { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; margin: 12px 0 8px; max-width: 420px; }
.cal .day { aspect-ratio: 1; border-radius: 4px; background: #e8eeef; }
.cal .day.l1 { background: #b9dcd9; } .cal .day.l2 { background: #4fa7a2; } .cal .day.l3 { background: var(--teal); }
.reread .pnotion { margin-top: 12px; display: grid; gap: 6px; }
.notice { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 50; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 15px; box-shadow: var(--shadow); }
body.auth .ess { margin: 4px 0 6px; padding: 0; }
@media print { .reread .btn, .quiz .score, .review-item, .notice { display: none !important; } }

.list a.plain { display: inline; padding: 0; }
.list > li > div { align-items: center; }

/* ---------- accueil simplifié : photo et deux grandes entrées ---------- */
.hello { grid-template-columns: auto 1fr; }
.avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--teal-soft); }
.account { overflow: hidden; }
.account img { width: 100%; height: 100%; object-fit: cover; display: block; }
.big-entries { margin-top: 20px; }
.entry { display: grid !important; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 6px 18px; align-items: center; padding: 22px; }
.entry .btn { grid-column: 2; justify-self: start; margin-top: 8px; }
.entry h2 { margin-bottom: 4px; }
.entry-ill { grid-row: span 2; width: 96px; height: 96px; display: grid; place-items: center; }
.entry-map .entry-ill { grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; background: var(--surface-2); border-radius: 18px; }
.entry-map .entry-ill i { display: block; width: 100%; height: 100%; border-radius: 9px; background: var(--fam); opacity: .85; }
.entry-ex .ring { width: 96px; height: 96px; }
.entry-map { border-top: 4px solid var(--coral); }
.entry-ex { border-top: 4px solid var(--teal); }
@media (max-width: 560px) { .entry { grid-template-columns: 1fr; } .entry-ill { grid-row: auto; width: 72px; height: 72px; } .entry .btn { grid-column: 1; } .entry-ex .ring { width: 72px; height: 72px; } .hello { grid-template-columns: auto 1fr; } .avatar { width: 64px; height: 64px; } }

/* ---------- carte des kystes (carte mentale) ---------- */
.fade.still { animation: none; }
.carte-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.carte-head p.muted { margin-top: 6px; max-width: 62ch; }
.mmap { margin-top: 22px; }
.mm-root { margin: 0 auto; max-width: 520px; text-align: center; background: var(--ink); color: #fff; border-radius: 20px; padding: 14px 22px; position: relative; }
.mm-root b { display: block; font: 700 22px var(--font-display); }
.mm-root span { font-size: 14px; opacity: .85; }
.mm-branches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 34px; position: relative; }
.mm-branches::before { content: ""; position: absolute; top: -18px; left: 12.5%; right: 12.5%; height: 2px; background: var(--line-strong); }
.mm-root::after { content: ""; position: absolute; left: 50%; bottom: -20px; width: 2px; height: 20px; background: var(--line-strong); }
.mm-branch { position: relative; min-width: 0; }
.mm-branch::before { content: ""; position: absolute; top: -18px; left: 50%; width: 2px; height: 18px; background: var(--line-strong); }
.mm-branch header { display: flex; gap: 10px; align-items: center; background: var(--fam); color: #fff; border-radius: 14px; padding: 10px 12px; }
.mm-branch header h2 { font-size: 18px; color: #fff; }
.mm-branch header p { font-size: 13px; opacity: .9; line-height: 1.3; }
.mm-num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .22); font: 700 15px var(--font-display); }
.mm-tiles { display: grid; gap: 10px; margin-top: 10px; padding-left: 14px; border-left: 2px solid color-mix(in srgb, var(--fam) 35%, transparent); }
.mtile { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; padding: 8px 10px 8px 8px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.mtile::before { content: ""; position: absolute; left: -16px; top: 50%; width: 14px; height: 2px; background: color-mix(in srgb, var(--fam) 35%, transparent); }
.mtile:hover, .mtile:focus-visible { border-color: var(--fam); box-shadow: var(--shadow); }
@media (prefers-reduced-motion: no-preference) { .mtile:hover { transform: translateY(-1px); } }
.mtile.on { border-color: var(--fam); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fam) 25%, transparent); }
.mt-ill { width: 64px; height: 44px; border-radius: 9px; overflow: hidden; background: var(--svgbg); display: block; }
.mt-ill svg { width: 100%; height: 100%; display: block; }
.mt-ill svg .pin, .mt-ill svg .lead { display: none; }
.mt-txt { min-width: 0; }
.mt-txt b { display: block; font: 600 15.5px/1.2 var(--font-display); color: var(--fam); }
.mt-txt small { display: block; font-size: 13px; line-height: 1.3; color: var(--muted); margin-top: 2px; }
.mt-dot.mt-dot { position: absolute; top: 8px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 2px var(--surface); }
.mt-dot.st-new { color: #b8c4ca; }
.mm-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; margin-top: 18px; }
.mm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mm-legend .mt-dot.mt-dot { position: static; box-shadow: none; display: inline-block; }
.mm-clues { margin-top: 22px; }
.clues { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.clues li { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.clues a { font-weight: 700; text-align: right; }
@media (max-width: 1100px) { .mm-branches { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 26px; } .mm-branches::before, .mm-branch::before, .mm-root::after { display: none; } .mm-branches { margin-top: 20px; } }
@media (max-width: 640px) { .mm-branches { grid-template-columns: minmax(0, 1fr); } .clues li { grid-template-columns: 1fr; } .clues a { text-align: left; } }

/* ---------- panneau de détail ---------- */
html.lock { overflow: hidden; }
.drawer-back { position: fixed; inset: 0; background: rgba(23, 36, 44, .38); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100%); background: var(--bg); z-index: 41; display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(23, 36, 44, .18); }
@media (prefers-reduced-motion: no-preference) { .fade:not(.still) .drawer, .drawer.slide { animation: slidein .22s ease-out; } @keyframes slidein { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } } }
.dr-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 18px 20px 10px; background: var(--surface); border-top: 5px solid var(--fam); }
.dr-head h2 { margin-top: 8px; font-size: 26px; color: var(--fam); outline: none; }
.dr-close { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); font-size: 18px; }
.dr-tabs { display: flex; gap: 4px; padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; }
.dr-tabs a { flex: none; padding: 12px 14px; text-decoration: none; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.dr-tabs a.on { color: var(--fam); border-bottom-color: var(--fam); }
.dr-tabs .cnt { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--fam); color: #fff; font-size: 12px; padding: 0 5px; }
.dr-body { flex: 1; overflow-y: auto; padding: 18px 20px 24px; overscroll-behavior: contain; }
.dr-body .schema { background: var(--surface); border-radius: 14px; padding: 10px; margin: 0; border: 1px solid var(--line); }
.dr-body .schema svg { width: 100%; height: auto; display: block; }
.dr-radio { margin: 0; background: #0d1215; border-radius: 14px; overflow: hidden; }
.dr-radio img { display: block; width: 100%; height: auto; }
.dr-radio figcaption { color: #dfe7e8; font-size: 14px; padding: 8px 12px; }
.dr-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.dr-nav { display: flex; gap: 6px; }
@media (max-width: 640px) { .drawer { width: 100%; } .dr-foot .btn.primary { flex: 1 1 100%; } .dr-nav { flex: 1; justify-content: space-between; } }

/* ---------- espace exercices ---------- */
.ex-tests { margin-top: 18px; }
.ex-test { text-align: left; font: inherit; cursor: pointer; display: flex !important; flex-direction: column; gap: 6px; align-items: flex-start; }
.ex-test .btn { margin-top: 8px; }
.ex-test:first-child { border-top: 4px solid var(--coral); }
.ex-test:last-child { border-top: 4px solid var(--teal); }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 8px; }
.ex-cell { position: relative; text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); border-left: 5px solid var(--fam); background: var(--surface); color: var(--ink); text-decoration: none; min-height: 60px; }
.ex-cell:hover { border-color: var(--fam); }
.ex-cell b { font: 600 15px/1.2 var(--font-display); color: var(--ink); padding-right: 14px; }
.ex-cell small { font-size: 13px; color: var(--muted); }
.ex-cell.st-mastered { background: var(--ok-soft); } .ex-cell.st-fragile { background: var(--ko-soft); } .ex-cell.st-due { background: #fff3d6; }
.ex-cell .mt-dot.mt-dot { top: 10px; right: 10px; }
.ex-cell.vv-ok { background: var(--ok-soft); } .ex-cell.vv-ok small { color: var(--ok); font-weight: 700; }
.ex-cell.vv-mid { background: #fff3d6; } .ex-cell.vv-mid small { color: #7a5200; font-weight: 700; }
.ex-cell.vv-ko { background: var(--ko-soft); } .ex-cell.vv-ko small { color: var(--ko); font-weight: 700; }
.mverdict { border-top: 5px solid var(--teal); }
.mverdict.v-ok { border-top-color: var(--ok); } .mverdict.v-mid { border-top-color: #c98a00; } .mverdict.v-ko { border-top-color: var(--ko); }
.mverdict h2 { margin: 2px 0 4px; }
@media print { .drawer, .drawer-back { display: none !important; } }
.entry-ex .entry-ill svg { width: 80px; height: 80px; fill: var(--teal-soft); stroke: var(--teal); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.entry-ex .entry-ill svg rect { stroke: none; }
.mt-txt b { padding-right: 12px; }
.mtile { grid-template-columns: 76px 1fr; }
.mt-ill { width: 76px; height: 50px; }
@media (max-width: 640px) { .dr-tabs a { padding: 12px 10px; } .dr-tabs { padding: 0 8px; } .entry-ex .entry-ill svg { width: 60px; height: 60px; } }
:root { --fo: #2e5a6b; }
.fam-o { --fam: var(--fo); }
.mm-method { max-width: 980px; margin: 0 auto 26px; }
.mm-method header { display: flex; gap: 10px; align-items: center; background: var(--fam); color: #fff; border-radius: 14px; padding: 10px 12px; }
.mm-method header h2 { font-size: 18px; color: #fff; }
.mm-method header p { font-size: 13px; opacity: .9; }
.mm-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); border-left: 0; padding-left: 0; }
.mm-row .mtile::before { display: none; }
@media (max-width: 560px) {
  .entry { grid-template-columns: 56px 1fr; padding: 16px; gap: 4px 14px; }
  .entry-ill { grid-row: auto; width: 56px; height: 56px; padding: 4px !important; gap: 3px !important; }
  .entry-ex .entry-ill svg { width: 56px; height: 56px; }
  .entry h2 { font-size: 20px; }
  .entry .btn { grid-column: 1 / -1; justify-self: stretch; }
}
/* retours de l'audit pédagogique */
.dr-body.stack { grid-auto-rows: max-content; align-content: start; }
.skills { display: grid; gap: 8px; margin: 12px 0 4px; max-width: 520px; }
.skill { display: grid; grid-template-columns: 150px 1fr 48px; gap: 10px; align-items: center; font-size: 15px; }
.skill b { text-align: right; }
.opts.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 760px) {
  .quiz-actions > .small.muted { display: none; }
  .quiz-actions > .row { flex-wrap: nowrap; }
  .quiz-actions { padding: 8px 16px; }
  .qmedia img { max-height: 32vh; width: auto; margin: 0 auto; display: block; }
  .opts.grid2 .opt { padding: 10px; font-size: 15px; }
  .skill { grid-template-columns: 120px 1fr 40px; }
}
@media (max-width: 380px) { .opts.grid2 { grid-template-columns: 1fr; } }
.duel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.duel-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.duel-cols > * { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; border-top: 4px solid var(--fam); background: var(--surface-2); color: var(--ink); text-decoration: none; }
.duel-cols .mt-ill { width: 100%; height: 64px; }
.duel-cols b { color: var(--fam); font-family: var(--font-display); }
.duel-cols p { font-size: 14.5px; line-height: 1.4; }
@media (max-width: 420px) { .duel-cols { grid-template-columns: 1fr; } }
.verif.v-complement { --vc: #2e5a6b; }
/* classes de schéma pour les cours d'endodontie, d'implantologie et de prothèse */
svg .metal { fill: #c3cbd1; stroke: #5d6970; stroke-width: 1.4; } svg .thread { stroke: #5d6970; stroke-width: 1.6; }
svg .gp { fill: #e8792e; stroke: #a8501a; stroke-width: 1; } svg .sealer { fill: #f3d36b; }
svg .cement { fill: #efe3a8; stroke: #a8964a; stroke-width: 1; } svg .ceram { fill: #fbf8ef; stroke: var(--tooth-line); stroke-width: 1.5; }
svg .resin { fill: #f3c7d4; stroke: #a85a72; stroke-width: 1.2; } svg .tissue { fill: #f2b8a8; } svg .nerve { fill: none; stroke: #e2b13c; stroke-width: 3; }
svg .lbl { fill: var(--ink); font: 600 12px sans-serif; } svg .lbl.c { text-anchor: middle; }
.fam-e { --fam: #3f7d3a; } .fam-f { --fam: #2b6a8f; }

/* ---------- plusieurs cours : tableau de bord, bandeau du cours, Mes cours ---------- */
.nav-search { display: inline-flex !important; align-items: center; padding: 8px 10px !important; }
.nav-search svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.coursebar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin: -6px 0 18px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.cb-title { display: flex; gap: 10px; align-items: baseline; min-width: 0; text-decoration: none; color: var(--ink); font-weight: 700; }
.cb-title span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62ch; }
.cb-code { flex: none; font-size: 12.5px; letter-spacing: .04em; color: var(--teal); background: var(--teal-soft); border-radius: 999px; padding: 3px 9px; }
.cb-switch select { font: inherit; font-size: 14.5px; max-width: 280px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
@media (max-width: 640px) { .cb-title span:last-child { white-space: normal; } .cb-switch, .cb-switch select { width: 100%; max-width: none; } }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 16px; }
.course-card { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: start; border-top: 4px solid var(--teal); }
.cc-ill { display: block; border-radius: 14px; overflow: hidden; background: var(--svgbg); }
.cc-ill svg { display: block; width: 100%; height: auto; }
.cc-ill svg .pin, .cc-ill svg .lead { display: none; }
.cc-body h2 { font-size: 21px; line-height: 1.25; margin: 2px 0 6px; }
.cc-body .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); margin: 10px 0; }
.cc-prog { display: grid; gap: 5px; margin-bottom: 12px; }
.cc-actions { gap: 6px; }
@media (max-width: 560px) { .course-card { grid-template-columns: 96px 1fr; gap: 12px; } .cc-ill { grid-row: span 1; } .cc-body h2 { font-size: 18.5px; } .cc-actions { grid-column: 1 / -1; } }
.resume-card { display: grid !important; grid-template-columns: 1fr auto; gap: 2px 14px; align-items: center; margin: 4px 0 8px; border-left: 5px solid var(--teal); }
.resume-card b { grid-column: 1; font-family: var(--font-display); font-size: 18px; }
.resume-card .btn { grid-row: 1 / span 2; grid-column: 2; }
.mescours-teaser { margin-top: 26px; }
.module-head h1 { max-width: 30ch; }
.link-chip { text-decoration: none; }
.pdf-list { display: grid; gap: 12px; }
.pdf-item { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pdf-item h2 { font-size: 19px; line-height: 1.3; margin: 2px 0 4px; }
.pdf-ico { position: relative; flex: none; width: 52px; height: 62px; }
.pdf-ico svg { width: 100%; height: 100%; fill: var(--surface-2); stroke: #b5412c; stroke-width: 2; stroke-linejoin: round; }
.pdf-ico b { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-size: 11px; color: #fff; background: #b5412c; margin: 0 6px; border-radius: 4px; }
.pdf-actions { gap: 6px; }
.pdf-frame { margin-top: 16px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #525659; }
.pdf-frame iframe { display: block; width: 100%; height: 82vh; border: 0; }
.pdf-mobile { display: none; }
@media (max-width: 760px) { .pdf-frame { display: none; } .pdf-mobile { display: block; margin-top: 12px; } }
.case-card { text-align: left; font: inherit; cursor: pointer; display: flex !important; flex-direction: column; gap: 4px; border-left: 5px solid var(--coral); }

/* carte : nombre de branches selon le nombre de parties du cours */
@media (min-width: 1101px) {
  .mm-branches.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mm-branches.n2::before { left: 25%; right: 25%; }
  .mm-branches.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mm-branches.n3::before { left: 16.67%; right: 16.67%; }
  .mm-branches.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; } .mm-branches.n5::before { left: 10%; right: 10%; }
  .mm-branches.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 26px; } .mm-branches.n6::before, .mm-branches.n6 .mm-branch::before { display: none; }
  .mm-branches.n5 .mtile { grid-template-columns: 1fr; } .mm-branches.n5 .mt-ill { width: 100%; height: 60px; }
}
.mm-num { width: auto !important; min-width: 32px; padding: 0 7px; border-radius: 16px !important; font-size: 13.5px !important; white-space: nowrap; }
.cc-body > p.muted { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.course-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
/* retours de l'audit UX multicours */
.qcard .chip { white-space: normal; }
.case-title { font-weight: 700; color: var(--muted); font-size: 14px; margin: 0 0 6px; }
.chip.multi { color: #7a5200; background: #fff3d6; border-color: #f0dca0; }
button.chip { cursor: pointer; font-family: inherit; }
.plan .btn { white-space: nowrap; }
.parts { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 10px; padding: 0; margin: 0; }
.parts a { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--fam); border-radius: 14px; color: var(--ink); text-decoration: none; }
.parts .grow { flex: 1; }
.parts .num { flex: none; min-width: 34px; height: 34px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--fam); color: #fff; font-weight: 700; font-size: 13px; }
@media (max-width: 640px) {
  .coursebar { flex-wrap: nowrap; padding: 6px 8px; gap: 8px; }
  .cb-title span:last-child { display: none; }
  .cb-switch { flex: 1; min-width: 0; width: auto; }
}
@media (max-width: 560px) {
  .course-card { grid-template-columns: 1fr; gap: 10px; }
  .cc-ill { height: 84px; display: flex; justify-content: center; max-width: none; }
  .cc-ill svg { width: auto; height: 100%; }
  .pdf-item { display: grid; grid-template-columns: 40px 1fr; align-items: start; }
  .pdf-ico { width: 40px; height: 48px; }
  .pdf-actions { grid-column: 1 / -1; }
}
/* ---------- accueil compact : filtres, chapitres, tuiles de cours ---------- */
.cfilters { display: grid; gap: 10px; margin-bottom: 8px; }
.small-search { margin: 0; }
.cf-chips { gap: 6px; align-items: center; }
.fchip { font: inherit; font-size: 14px; font-weight: 700; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); cursor: pointer; }
.fchip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.fselect { font: inherit; font-size: 14px; padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); max-width: 100%; }
.ch-title { font-size: 17px; margin: 22px 0 10px; display: flex; gap: 10px; align-items: baseline; }
.ctile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.ctile { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-sm, none); }
.ctile[hidden], .ch-section[hidden] { display: none; }
.ct-top { display: flex; gap: 8px; align-items: center; min-width: 0; }
.ct-mat { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctile h3 { font-size: 16.5px; line-height: 1.3; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ct-meta { font-size: 13.5px; color: var(--muted); margin: 0; }
.ct-prog { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.ct-actions { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 2px; }
.ct-links { display: inline-flex; gap: 12px; margin-left: auto; font-size: 14px; font-weight: 700; }
.ct-links a { color: var(--teal); text-decoration: none; }
.ct-links a:hover { text-decoration: underline; }
.cf-chips .fselect { width: auto; flex: 0 1 auto; }
.ctile { gap: 4px; padding: 10px 12px; }
.ctile .bar { height: 6px; }
.ctile .btn.small { padding: 6px 14px; }
@media (max-width: 560px) { .ctile h3 { font-size: 15.5px; } .ct-actions { gap: 6px; } .ct-links { gap: 10px; } }

/* ---------- assistant IA ---------- */
.mainnav .nav-ai { display: inline-flex; align-items: center; gap: 6px; }
.mainnav .nav-ai svg { width: 17px; height: 17px; fill: currentColor; stroke: none; }
@media (max-width: 1180px) and (min-width: 761px) { .mainnav a { padding: 8px 10px; font-size: 15px; } }
@media (max-width: 980px) and (min-width: 761px) { .mainnav .nav-ai { font-size: 0; gap: 0; } .mainnav .nav-ai svg { width: 20px; height: 20px; } }
@media (max-width: 760px) {
  .tabbar { grid-template-columns: repeat(6, 1fr); }
  .tabbar a { font-size: 11.5px; }
  .tabbar a[data-nav="ai"] svg { fill: currentColor; stroke: none; }
}
.btn.ask { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--teal) 40%, var(--line)); color: var(--teal); }
.btn.ask svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; stroke-linecap: round; }
.btn.ask:hover { background: var(--teal-soft); }
.notion-tools { margin: 4px 0 10px; }
.module-head .btn.ask { padding: 5px 12px; font-size: 14px; border-radius: 999px; }
.goto { scroll-margin: 90px; }
.flash { animation: flash 2.4s ease-out; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral) 45%, transparent); background-color: var(--sun-soft); } 100% { box-shadow: 0 0 0 0 transparent; } }
.pdf-page { margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; background: var(--sun-soft); color: var(--sun-ink); font-size: 15px; }

.ai { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; align-items: start; }
.ai-side { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 110px); }
.ai-side .ai-new { width: 100%; justify-content: center; }
#ai-list { overflow-y: auto; min-height: 0; }
.ai-convs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ai-convs li { display: flex; align-items: stretch; border-radius: 12px; }
.ai-convs li:hover { background: var(--surface); }
.ai-convs li.on { background: var(--teal-soft); }
.ai-convs a { flex: 1; min-width: 0; padding: 8px 10px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.ai-convs a span { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-convs a small { color: var(--muted); font-size: 12.5px; }
.ai-del { border: 0; background: none; color: var(--muted); font-size: 18px; padding: 0 10px; border-radius: 10px; cursor: pointer; opacity: .55; }
.ai-convs li:hover .ai-del, .ai-del:focus-visible, .ai-del.armed { opacity: 1; }
.ai-del.armed { font-size: 12.5px; font-weight: 700; color: #fff; background: var(--ko); margin: 6px 4px; }
.ai-main { min-width: 0; display: flex; flex-direction: column; min-height: calc(100vh - 140px); }
.ai-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 10px; }
.ai-head h1 { font-size: clamp(26px, 3.6vw, 34px); }
.ai-histbtn { display: none; }
.ai-ctxchip { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-size: 14px; max-width: 100%; }
.ai-ctxchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-ctxchip button { border: 0; background: rgba(255,255,255,.7); color: var(--teal); width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; flex: none; }
.ai-thread { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 6px 0 20px; }
.ai-msg.me { display: flex; justify-content: flex-end; }
.ai-msg.me .bubble { max-width: min(80%, 620px); background: var(--teal); color: #fff; padding: 10px 16px; border-radius: 20px 20px 6px 20px; font-size: 16px; overflow-wrap: anywhere; }
.ai-msg.bot { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
.ai-badge { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--teal), var(--teal-2)); color: #fff; font: 700 13px/1 var(--font-display); flex: none; }
.ai-body { background: var(--surface); border: 1px solid var(--line); border-radius: 6px 20px 20px 20px; padding: 14px 18px; box-shadow: var(--shadow); min-width: 0; display: flex; flex-direction: column; gap: 10px; overflow-wrap: anywhere; }
.ai-body h3 { font-size: 18px; margin-top: 4px; }
.ai-body h4 { font-size: 16px; margin-top: 2px; }
.ai-body ul, .ai-body ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.ai-body pre { margin: 0; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; overflow-x: auto; font-size: 14px; }
.ai-body code { font-size: .92em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.ai-body hr { border: 0; border-top: 1px solid var(--line); width: 100%; margin: 2px 0; }
.ai-body blockquote { margin: 0; padding: 10px 14px; border-left: 4px solid var(--line-strong); background: var(--surface-2); border-radius: 0 12px 12px 0; }
.ai-body blockquote.ai-ext { border-left-color: var(--fd); background: color-mix(in srgb, var(--fd) 7%, white); }
.ai-table { font-size: 14.5px; }
.cite { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; margin: 0 1px 0 2px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font: 700 11.5px/1 var(--font-body); text-decoration: none; vertical-align: 2px; }
.cite:hover { background: var(--teal); color: #fff; }
.fiche-link { font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.ai-further { border-top: 1px dashed var(--line); padding-top: 10px; }
.ai-further h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.ai-further ul { list-style: none; padding: 0; gap: 6px; }
.ai-further li { font-size: 14.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ai-further li::before { content: "→"; color: var(--teal); }
.ai-sugg { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-sugg .chip, .ai-starter { cursor: pointer; white-space: normal; text-align: left; }
.ai-sugg .chip { color: var(--teal); background: var(--surface); border-color: color-mix(in srgb, var(--teal) 35%, var(--line)); font-size: 13.5px; padding: 6px 12px; }
.ai-sugg .chip:hover, .ai-starter:hover { background: var(--teal-soft); }
.ai-status { color: var(--muted); font-size: 14.5px; display: flex; align-items: center; gap: 10px; }
.dots { width: 26px; height: 8px; background: radial-gradient(circle, var(--teal) 3px, transparent 3.5px) 0 0 / 9px 8px repeat-x; opacity: .7; }
@media (prefers-reduced-motion: no-preference) { .dots { animation: dots 1s steps(3) infinite; } @keyframes dots { from { clip-path: inset(0 66% 0 0); } to { clip-path: inset(0 -10% 0 0); } } }
.ai-err { color: var(--ko); background: var(--ko-soft); padding: 8px 12px; border-radius: 10px; font-size: 15px; }
.ai-empty { display: flex; flex-direction: column; gap: 18px; padding: 10px 0; }
.ai-hello { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; }
.ai-hello .ai-badge { width: 48px; height: 48px; font-size: 16px; }
.ai-hello p { margin-top: 4px; max-width: 62ch; }
.ai-starters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ai-starter { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px 14px; font: 600 15px/1.35 var(--font-body); color: var(--ink); box-shadow: var(--shadow); }
.ai-off { display: flex; flex-direction: column; gap: 10px; }
.ai-compose { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: end; background: linear-gradient(to bottom, transparent, var(--bg) 24%); padding: 18px 0 8px; }
.ai-compose textarea { flex: 1; resize: none; min-height: 50px; max-height: 200px; padding: 13px 16px; border-radius: 18px; border: 1.5px solid var(--line-strong); font: 400 16px/1.4 var(--font-body); color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.ai-compose textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.ai-compose .btn { min-height: 50px; border-radius: 16px; }
.ai-foot { padding-bottom: 6px; }
.ai-qcm { border: 1.5px solid color-mix(in srgb, var(--teal) 30%, var(--line)); border-radius: 16px; padding: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.aq-q { font-weight: 700; font-size: 16.5px; }
.aq-opts { display: flex; flex-direction: column; gap: 8px; }
.aq-opt { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; font: 400 15.5px/1.4 var(--font-body); color: var(--ink); cursor: pointer; }
.aq-opt b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.aq-opt small { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; }
.aq-opt.sel { border-color: var(--teal); background: var(--teal-soft); }
.aq-opt.sel b { background: var(--teal); color: #fff; border-color: var(--teal); }
.aq-opt.ok { border-color: var(--ok); background: var(--ok-soft); }
.aq-opt.ok b { background: var(--ok); color: #fff; border-color: var(--ok); }
.aq-opt.ko { border-color: var(--ko); background: var(--ko-soft); }
.aq-opt.ko b { background: var(--ko); color: #fff; border-color: var(--ko); }
.aq-opt:disabled { cursor: default; }
.ai-qcm > .btn { align-self: flex-start; }
.aq-res { border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.aq-res.good { background: var(--ok-soft); }
.aq-res.bad { background: var(--ko-soft); }
@media (max-width: 900px) {
  .ai { grid-template-columns: 1fr; }
  .ai-histbtn { display: inline-flex; }
  .ai-side { display: none; position: static; max-height: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
  .ai-side.open { display: flex; order: 1; }
  .ai-main { order: 0; }
  .ai-side.open { order: -1; }
}
@media (max-width: 760px) {
  .ai-main { min-height: calc(100vh - 180px); }
  .ai-compose { bottom: calc(58px + env(safe-area-inset-bottom)); }
  .ai-starters { grid-template-columns: 1fr; }
  .ai-msg.bot { grid-template-columns: 1fr; gap: 6px; }
  .ai-msg.bot .ai-badge { width: 26px; height: 26px; font-size: 11px; }
  .ai-body { padding: 12px 14px; border-radius: 6px 18px 18px 18px; }
  .ai-msg.me .bubble { max-width: 88%; }
  .ai-head h1 { font-size: 26px; }
}
@media (max-width: 760px) { .tabbar a { white-space: nowrap; letter-spacing: -.01em; } }
@media (max-width: 400px) { .tabbar a { font-size: 10.5px; } .ai-table { font-size: 13px; } .ai-table th, .ai-table td { padding: 6px 7px; } }
/* tableaux de l'assistant : tout visible sur téléphone, sans défilement horizontal */
.ai-table { width: 100%; table-layout: fixed; }
.ai-table th, .ai-table td { overflow-wrap: break-word; hyphens: auto; vertical-align: top; }
@media (max-width: 520px) { .ai-table { font-size: 12.5px; } .ai-table th, .ai-table td { padding: 6px 6px; } .ai-table th:first-child, .ai-table td:first-child { width: 24%; } }
.scroll table.ai-table { min-width: 0; }
.scroll table.ai-table :is(tbody th, thead th:first-child) { position: static; min-width: 0; max-width: none; box-shadow: none; }

/* ---------- rangement personnel des cours ---------- */
.org-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 4px 0 14px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg-b { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font: 600 14px/1.2 var(--font-body); color: var(--muted); cursor: pointer; }
.seg-b[aria-pressed="true"] { background: var(--surface); color: var(--teal); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ct-orig { margin: -4px 0 4px; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.org-hint { margin: 0 0 14px; }
.org-card { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.org-glist { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.org-glist li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.org-gname, .org-name, #org-new { flex: 1; min-width: 180px; padding: 9px 12px; border: 1.5px solid var(--line-strong); border-radius: 12px; font: 600 15px/1.3 var(--font-body); color: var(--ink); background: var(--surface); }
.org-gname:focus, .org-name:focus, #org-new:focus, .org-sel:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.org-name { width: 100%; font-weight: 600; }
.org-name::placeholder { color: var(--ink); opacity: .55; }
.org-ib { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; min-width: 34px; height: 34px; cursor: pointer; font-size: 16px; color: var(--ink); }
.org-ib:disabled { opacity: .35; cursor: default; }
.org-ib.danger { color: var(--ko); }
.org-ib.armed { background: var(--ko); color: #fff; font-size: 13px; font-weight: 700; padding: 0 10px; }
.org-add { gap: 8px; }
.org-link { border: 0; background: none; padding: 0; color: var(--teal); font: inherit; text-decoration: underline; cursor: pointer; }
.org-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 200px; gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.org-row:first-child { border-top: 0; }
.org-row .cb-code { margin-top: 9px; justify-self: start; }
.org-row p { margin-top: 4px; }
.org-sel { padding: 9px 10px; border: 1.5px solid var(--line-strong); border-radius: 12px; font: 600 14px/1.2 var(--font-body); background: var(--surface); color: var(--ink); }
.org-bar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 0; background: linear-gradient(to bottom, transparent, var(--bg) 30%); }
@media (max-width: 760px) {
  .org-row { grid-template-columns: 1fr; gap: 6px; }
  .org-row .cb-code { margin-top: 0; }
  .org-bar { bottom: calc(58px + env(safe-area-inset-bottom)); }
}
.org-reset { margin: 0 0 4px; }
