:root {
  --bg: #f7f5f0; --paper: #ffffff; --ink: #1f2430; --muted: #6b7280; --line: #e5e1d8;
  --navy: #162e4b; --red: #b12024;
  --accent: #162e4b; --accent-ink: #ffffff; --cta: #b12024; --cta-ink: #ffffff; --good: #15803d; --good-bg: #ecfdf3; --bad: #b12024; --bad-bg: #fbeeee;
  --tip: #fff7e6; --warn: #fbeeee; --rule: #eaeff6; --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(31,36,48,.06);
  --serif: "Source Serif 4", Georgia, serif; --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #12161d; --paper: #1b2230; --ink: #e8e6e1; --muted: #9aa0ad; --line: #2c3341; --accent: #9ab6df; --accent-ink: #0b1020; --cta: #d4383d; --cta-ink: #ffffff; --good: #4ade80; --good-bg: #0f2a1a; --bad: #f87171; --bad-bg: #2f1414; --tip: #2a2410; --warn: #2f1616; --rule: #1f2b3f; --shadow: 0 1px 2px rgba(0,0,0,.4); }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.55; font-size: 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 2rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.15rem; }
p { margin: 0 0 .8rem; }
code { font-family: ui-monospace, Menlo, monospace; font-size: .95em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.lead { font-size: 1.1rem; color: var(--muted); }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.err { color: var(--bad); min-height: 1.2em; font-size: .9rem; }
.note { background: var(--tip); padding: .6rem .8rem; border-radius: 8px; font-size: .85rem; }

/* ---------- barre ---------- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1rem; padding: .6rem 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo { width: 40px; height: 40px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; }
.brand-org { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--red); font-weight: 600; }
.nav a.btn-nav { background: var(--cta) !important; color: var(--cta-ink) !important; }
.footer { display: flex; align-items: center; justify-content: center; gap: .8rem; }
.footer-logo { width: 44px; height: 44px; }
.eyebrow { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--red); font-weight: 700; margin-bottom: .3rem; }
.hero-art { position: relative; }
.hero-logo { width: 150px; display: block; margin: 0 auto .8rem; }
.btn.primary { background: var(--cta); color: var(--cta-ink); border-color: var(--cta); }
.nav { margin-left: auto; display: flex; gap: .2rem; flex-wrap: wrap; }
.nav a { padding: .45rem .75rem; border-radius: 8px; color: var(--ink); font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--bg); text-decoration: none; }
.nav a.active { background: var(--rule); color: var(--accent); }
.nav a.btn-nav { background: var(--accent); color: var(--accent-ink); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .3rem .6rem; font-size: 1.2rem; color: var(--ink); }
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--paper); border-bottom: 1px solid var(--line); padding: .5rem 16px 1rem; margin: 0; }
  .nav.open { display: flex; }
}

/* ---------- mise en page ---------- */
.app { max-width: 960px; margin: 0 auto; padding: 1.5rem 16px 4rem; }
.footer { text-align: left; color: var(--muted); font-size: .85rem; padding: 2rem 16px; border-top: 1px solid var(--line); }
.loading { text-align: center; color: var(--muted); padding: 4rem 0; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }
.section-title { margin: 1.5rem 0 .75rem; }
.actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }

/* ---------- boutons et formulaires ---------- */
.btn { display: inline-block; padding: .55rem 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn.ghost { background: transparent; }
.btn.big { padding: .8rem 1.4rem; font-size: 1.05rem; }
.btn.mini { padding: .25rem .6rem; font-size: .8rem; }
.btn:disabled { opacity: .5; cursor: default; }
label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: .8rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input:not([type]) { display: block; width: 100%; margin-top: .3rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--ink); font: inherit; }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth { max-width: 440px; margin: 1rem auto; }
.auth form .btn { width: 100%; margin-top: .4rem; }
form.inline { display: flex; gap: .5rem; align-items: center; }
form.inline input { width: 90px; margin: 0; }

/* ---------- accueil ---------- */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; padding: 2rem 0 2.5rem; }
.hero h1 { font-size: 2.8rem; }
.hero-cta { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.2rem 0 .6rem; }
.sample { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); font-family: var(--serif); font-size: 1.2rem; transform: rotate(-1.5deg); }
.blank-demo { text-decoration: underline wavy var(--bad); }
.sample-fb { margin-top: .8rem; font-family: var(--sans); font-size: .9rem; background: var(--good-bg); color: var(--good); padding: .5rem .7rem; border-radius: 8px; }
@media (max-width: 720px) { .hero { grid-template-columns: 1fr; } .hero h1 { font-size: 2.1rem; } .hero-art { display: none; } }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.feature { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.feature-ico { font-size: 1.6rem; margin-bottom: .4rem; }
.feature p { font-size: .9rem; color: var(--muted); margin: 0; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }
.levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; }
@media (max-width: 900px) { .levels { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .levels { grid-template-columns: 1fr 1fr; } }
.level-card { display: block; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: var(--radius); padding: 1rem; color: var(--ink); }
.level-card:hover { text-decoration: none; box-shadow: var(--shadow); }
.level-card h3 { font-size: 1.05rem; } .level-card p { font-size: .85rem; color: var(--muted); }
.level-id { font-weight: 700; color: var(--c); font-size: 1.3rem; }
.pricing { margin-top: 2.5rem; }
.price-card { max-width: 520px; margin: 0 auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; box-shadow: var(--shadow); }
.price { font-family: var(--serif); font-size: 2rem; font-weight: 700; margin: .5rem 0 1rem; } .price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.price-card ul { text-align: left; padding-left: 1.2rem; margin-bottom: 1.5rem; }

/* ---------- tableau de bord ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.stats { display: flex; gap: .6rem; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: .6rem 1rem; text-align: center; min-width: 92px; }
.stat b { display: block; font-size: 1.5rem; font-family: var(--serif); } .stat span { font-size: .75rem; color: var(--muted); }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: .5rem 0; }
.bar > div { height: 100%; background: var(--c, var(--accent)); border-radius: 99px; transition: width .4s; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 1rem; }
.chip { display: inline-block; padding: .3rem .7rem; border-radius: 99px; background: var(--rule); color: var(--accent); font-size: .85rem; font-weight: 500; }
.chip.mini { padding: .1rem .5rem; font-size: .75rem; }
.chip:hover { text-decoration: none; filter: brightness(.95); }

/* ---------- listes de leçons ---------- */
.level-sec { margin-bottom: 2rem; }
.level-head { margin-bottom: .5rem; }
.badge { display: inline-block; color: #fff; font-family: var(--sans); font-size: .75rem; font-weight: 700; padding: .15rem .5rem; border-radius: 6px; vertical-align: middle; }
.unit { margin: 1rem 0 .3rem; color: var(--muted); font-family: var(--sans); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-list li a { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; margin-bottom: .4rem; color: var(--ink); }
.lesson-list li a:hover { text-decoration: none; border-color: var(--accent); }
.lesson-list .num { flex: 0 0 auto; min-width: 26px; height: 26px; padding: 0 .4rem; display: grid; place-items: center; border-radius: 99px; background: var(--rule); color: var(--accent); font-weight: 700; font-size: .8rem; }
.lesson-list .ttl { flex: 1; } .lesson-list .meta { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pill { display: inline-block; font-size: .75rem; font-weight: 600; padding: .15rem .55rem; border-radius: 99px; background: var(--line); color: var(--muted); }
.pill.ok { background: var(--good-bg); color: var(--good); } .pill.free { background: var(--rule); color: var(--accent); } .pill.soon { opacity: .7; }
.lock { font-size: .9rem; }

/* ---------- leçon ---------- */
.lesson-head { margin-bottom: 1.5rem; } .lesson-head h1 { margin-top: .4rem; }
.lesson-body { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.75rem; margin-bottom: 1.25rem; font-size: 1.05rem; }
.lesson-body > p { font-family: var(--serif); font-size: 1.1rem; }
.lesson-body.locked { max-height: 260px; overflow: hidden; position: relative; }
.lesson-body.locked::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, var(--paper)); }
.blk { border-radius: 10px; padding: 1rem 1.1rem; margin: 1rem 0; }
.blk h3 { margin-bottom: .4rem; } .blk p:last-child { margin: 0; }
.blk.rule { background: var(--rule); border-left: 4px solid var(--accent); }
.blk.tip { background: var(--tip); } .blk.warn { background: var(--warn); }
.blk.tip b, .blk.warn b { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .3rem; }
.gtable { width: 100%; border-collapse: collapse; font-size: .95rem; }
.gtable th, .gtable td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--line); }
.gtable th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.gtable.center-t { max-width: 300px; margin: 1rem auto; }
.examples { list-style: none; padding: 0; margin: 0; }
.examples li { padding: .4rem 0; border-bottom: 1px dashed var(--line); }
.examples .fr { font-family: var(--serif); font-size: 1.1rem; display: block; }
.examples .note { font-size: .85rem; color: var(--muted); }
.paywall { border: 2px dashed var(--line); }
.scroll { overflow-x: auto; }

/* ---------- exercices ---------- */
.session-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.counter { font-weight: 700; color: var(--muted); white-space: nowrap; }
.card.ex { position: relative; padding-top: 2.2rem; }
.ex-type { position: absolute; top: .8rem; left: 1.25rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.ex-q { font-family: var(--serif); font-size: 1.3rem; margin: .5rem 0 1rem; }
.ex-q.quote { background: var(--bg); padding: .7rem 1rem; border-radius: 10px; }
.ex-instruction { font-weight: 600; margin-bottom: .3rem; }
.options { display: grid; gap: .5rem; }
.opt, .tok { font: inherit; text-align: left; padding: .6rem .9rem; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 10px; cursor: pointer; }
.opt:hover, .tok:hover { border-color: var(--accent); }
.opt.sel, .tok.sel { border-color: var(--accent); background: var(--rule); }
.opt.good, .tok.good { border-color: var(--good); background: var(--good-bg); }
.opt.bad, .tok.bad { border-color: var(--bad); background: var(--bad-bg); }
.opt:disabled, .tok:disabled { cursor: default; }
.tokens { display: flex; flex-wrap: wrap; gap: .5rem; }
.tok { font-family: var(--serif); font-size: 1.15rem; padding: .4rem .8rem; }
.order-out { min-height: 54px; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .6rem; border: 1.5px dashed var(--line); border-radius: 10px; margin-bottom: .8rem; }
.order-out.good { border-color: var(--good); background: var(--good-bg); } .order-out.bad { border-color: var(--bad); background: var(--bad-bg); }
.tok.picked { background: var(--rule); border-color: var(--accent); }
.blank { display: inline-block; vertical-align: baseline; }
.blank-input { display: inline-block !important; width: 9ch !important; min-width: 6ch; margin: 0 .2rem !important; padding: .15rem .4rem !important; font-family: var(--serif) !important; font-size: 1.2rem !important; text-align: center; border-radius: 6px !important; }
.free-input { font-family: var(--serif) !important; font-size: 1.15rem !important; }
input.good { border-color: var(--good) !important; background: var(--good-bg) !important; }
input.bad { border-color: var(--bad) !important; background: var(--bad-bg) !important; }
.conj-table { border-collapse: collapse; margin: .5rem 0; }
.conj-table td { padding: .25rem .5rem; } .conj-table td:first-child { font-family: var(--serif); font-size: 1.05rem; white-space: nowrap; }
.conj-table input { margin: 0 !important; padding: .4rem .6rem !important; width: 260px; max-width: 60vw; }
.accent-bar { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .6rem; }
.accent-bar button { font: inherit; font-family: var(--serif); font-size: 1.05rem; width: 36px; height: 34px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; cursor: pointer; }
.accent-bar button:hover { border-color: var(--accent); }
.feedback { display: none; margin-top: 1rem; padding: .9rem 1rem; border-radius: 10px; }
.feedback.show { display: block; }
.feedback.good { background: var(--good-bg); color: var(--good); } .feedback.bad { background: var(--bad-bg); color: var(--bad); }
.feedback p { margin: .3rem 0 0; color: var(--ink); } .feedback .explain { color: var(--ink); opacity: .85; font-size: .95rem; }
.ex-actions { display: flex; gap: .6rem; margin-top: 1rem; }
.result .score { font-family: var(--serif); font-size: 3.2rem; font-weight: 700; color: var(--bad); }
.result .score.ok { color: var(--good); }
.result .big-badge { display: inline-block; padding: .2rem 1.2rem; border-radius: 16px; background: var(--good-bg); }
.mini-ex { position: relative; padding-top: 2rem; }
.mini-ex .explain { color: var(--muted); font-size: .9rem; margin: 0; }
.codes { background: var(--bg); padding: .6rem; border-radius: 8px; font-size: .9rem; min-height: 1.5rem; white-space: pre-wrap; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 10px; font-size: .9rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.good { background: var(--good); color: #fff; }

/* ---------- page légale ---------- */
.legal { max-width: 720px; margin: 0 auto; }
.legal h3 { margin-top: 1.4rem; }

/* ---------- nouveaux types d'exercices ---------- */
.ex-q.en { font-style: italic; }
.ex-q.cloze { line-height: 2.2; }
.match-table { border-collapse: collapse; width: 100%; max-width: 520px; }
.match-table td { padding: .35rem .5rem; } .match-table td:first-child { font-family: var(--serif); font-size: 1.1rem; }
.match-table select { width: 100%; padding: .45rem .6rem; border: 1.5px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--ink); font: inherit; }
.match-table select.good { border-color: var(--good); background: var(--good-bg); } .match-table select.bad { border-color: var(--bad); background: var(--bad-bg); }
.match-table .fix { color: var(--good); font-weight: 600; white-space: nowrap; }
.sort-list { display: flex; flex-direction: column; gap: .5rem; }
.sort-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 10px; }
.sort-word { font-family: var(--serif); font-size: 1.1rem; flex: 1 1 120px; }
.opt.cat { padding: .35rem .7rem; font-size: .9rem; }

/* ---------- infographies ---------- */
.figure { margin: 1.2rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.figure figcaption { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; margin-bottom: .6rem; }
.fig-wrap { overflow-x: auto; }
.fig { display: block; width: 100%; height: auto; max-width: 760px; margin: 0 auto; font-family: var(--sans); }
.fig text { fill: var(--ink); font-size: 13px; }
.fig .fig-label { font-weight: 600; font-size: 13px; }
.fig .fig-muted { fill: var(--muted); font-size: 12px; }
.fig .fig-axis { stroke: var(--muted); stroke-width: 2; } .fig .fig-axis-fill { fill: var(--muted); }
.fig .fig-node { fill: var(--rule); stroke: var(--accent); stroke-width: 1.5; } .fig .fig-node-text { font-weight: 600; font-size: 13px; }
.fig .fig-leaf { fill: var(--good-bg); stroke: var(--good); stroke-width: 1.5; } .fig .fig-leaf-text { font-weight: 700; font-size: 14px; fill: var(--good); }
.fig .fig-edge { fill: none; stroke-width: 2; } .fig .fig-edge.yes { stroke: var(--good); } .fig .fig-edge.no { stroke: var(--red); }
.fig .fig-edge-label { font-size: 12px; font-weight: 700; } .fig .fig-edge-label.yes { fill: var(--good); } .fig .fig-edge-label.no { fill: var(--red); }
.fig .fig-step-title { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; } .fig .fig-step-text { font-size: 14px; }
.fig .fig-arrow { font-size: 22px; fill: var(--muted); } .fig .fig-slot-text { font-size: 13px; font-weight: 600; }
.fig-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; }
.fig-col { border: 1.5px solid var(--c); border-top-width: 6px; border-radius: 12px; padding: .7rem .9rem; }
.fig-col h4 { margin: 0 0 .4rem; color: var(--c); font-family: var(--sans); font-size: 1rem; }
.fig-col ul { margin: 0; padding-left: 1.1rem; font-size: .95rem; } .fig-col li { margin: .2rem 0; }
.fig-note { font-size: .85rem; color: var(--muted); margin: .5rem 0 0; }

/* ---------- séances par niveau ---------- */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin: 1rem 0; }
@media (max-width: 720px) { .modes { grid-template-columns: 1fr; } }
.mode-card { display: flex; flex-direction: column; gap: .3rem; padding: 1rem; border: 1.5px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper); }
.mode-card:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow); }
.mode-card.done { border-color: var(--good); }
.mode-card b { font-family: var(--serif); font-size: 1.1rem; }
.mode-num { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 99px; background: var(--cta); color: var(--cta-ink); font-weight: 700; font-size: .85rem; }
.mode-card.done .mode-num { background: var(--good); }
.mode-card .pill { align-self: flex-start; margin-top: .3rem; }

/* ---------- badges ---------- */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.badge-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; padding: .8rem .5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); opacity: .55; filter: grayscale(1); }
.badge-card.got { opacity: 1; filter: none; border-color: var(--good); background: var(--good-bg); }
.badge-ico { font-size: 1.8rem; } .badge-card b { font-size: .9rem; }

/* ---------- test de niveau ---------- */
.passage { font-family: var(--serif); font-size: 1.05rem; line-height: 1.7; position: relative; padding-top: 2.2rem; }
.passage h3 { margin-bottom: .6rem; }
.skills { display: flex; gap: 2rem; justify-content: center; margin: 1rem 0; flex-wrap: wrap; }
.skill { display: flex; flex-direction: column; align-items: center; }

/* ---------- fiche à imprimer ---------- */
.fiche { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; max-width: 800px; margin: 1rem auto; }
.fiche-head { display: flex; gap: 1rem; align-items: center; border-bottom: 3px solid var(--red); padding-bottom: .8rem; margin-bottom: 1rem; }
.fiche-head img { width: 64px; height: 64px; } .fiche-head h1 { font-size: 1.6rem; margin: .1rem 0; }
.fiche-org { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--red); font-weight: 700; }
.fiche-foot { margin-top: 1.5rem; padding-top: .6rem; border-top: 1px solid var(--line); font-size: .75rem; color: var(--muted); }
.fiche .blk { break-inside: avoid; } .fiche .figure { break-inside: avoid; }
@media print {
  .topbar, .footer, .no-print, .toast { display: none !important; }
  body { background: #fff; color: #000; } .app { padding: 0; max-width: none; }
  .fiche { border: 0; box-shadow: none; padding: 0; margin: 0; max-width: none; }
  .blk.rule { background: #eef3ff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .blk.tip, .blk.warn, .fig-col, .figure { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- démo sur la page d'accueil ---------- */
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; margin: 2rem 0; }
@media (max-width: 800px) { .demo { grid-template-columns: 1fr; } }
.demo .card.ex { margin: 0; }
.demo-note { font-size: .85rem; color: var(--muted); margin-top: .5rem; }

/* ---------- pleine largeur ---------- */
.topbar { padding-left: clamp(16px, 3vw, 56px); padding-right: clamp(16px, 3vw, 56px); }
.app { max-width: none; padding: 1.5rem clamp(16px, 3vw, 56px) 4rem; }
/* Les textes longs gardent une largeur lisible, centrée. Les exercices prennent toute la largeur. */
.lesson-head, .lesson-body, .crumbs:has(+ .lesson-head), .fiche, .legal, .paywall { max-width: 1100px; margin-left: auto; margin-right: auto; }
.lesson-body + .card { max-width: 1100px; margin-left: auto; margin-right: auto; }
@media (min-width: 1100px) {
  .session:has(.passage) { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; align-items: start; }
  .session:has(.passage) > .session-head, .session:has(.passage) > .bar { grid-column: 1 / -1; }
  .session .options { grid-template-columns: 1fr 1fr; }
  .result + section { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; } .result + section > h3 { grid-column: 1 / -1; }
}
.auth { max-width: 440px; }
@media (min-width: 1100px) {
  .lesson-list { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem .8rem; }
  .lesson-list li a { margin-bottom: 0; height: 100%; }
  .features { gap: 1.25rem; }
  .hero { padding: 3rem 0 3.5rem; }
  .hero h1 { font-size: 3.4rem; }
  .badges { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}
@media (min-width: 1500px) {
  .lesson-list { grid-template-columns: 1fr 1fr 1fr; }
  .grid2.dash-main { grid-template-columns: 1fr 1fr; }
}
.lesson-head + .card { max-width: 1100px; margin-left: auto; margin-right: auto; }

/* ---------- recherche et exercices par type ---------- */
.nav-search { display: flex; align-items: center; margin-right: .3rem; }
.nav-search input, .search-input { padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 99px; background: var(--bg); color: var(--ink); font: inherit; font-size: .9rem; }
.nav-search input { width: 160px; }
.nav-search input:focus, .search-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 720px) { .nav-search { margin: 0 0 .4rem; } .nav-search input { width: 100%; } }
.search-box { display: flex; gap: .5rem; margin: .6rem 0 1.2rem; max-width: 760px; }
.search-box .search-input { flex: 1; font-size: 1.05rem; padding: .7rem 1.1rem; background: var(--paper); }
.search-list .ttl { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.search-list .sub { line-height: 1.35; }
.chip.on { background: var(--accent); color: var(--accent-ink); }
.center-chips { justify-content: center; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; margin: 1rem 0; }
.type-card { display: flex; flex-direction: column; gap: .3rem; padding: 1.1rem; border: 1.5px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper); }
a.type-card:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow); }
.type-card b { font-family: var(--serif); font-size: 1.1rem; }
.type-card .pill { align-self: flex-start; margin-top: auto; }
.type-card.off { opacity: .5; }
.type-ico { font-size: 1.7rem; line-height: 1; }

/* ---------- menu Outils ---------- */
.nav { align-items: center; }
.nav-more { position: relative; }
.nav-more summary { list-style: none; cursor: pointer; padding: .45rem .75rem; border-radius: 8px; font-weight: 500; font-size: .95rem; color: var(--ink); }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary::after { content: " ▾"; font-size: .8em; color: var(--muted); }
.nav-more summary:hover { background: var(--bg); } .nav-more summary.active { background: var(--rule); color: var(--accent); }
.nav-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 210px; display: flex; flex-direction: column; padding: .4rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
@media (max-width: 720px) { .nav-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 .8rem; } }

/* ---------- signalement, chronomètre ---------- */
.link-btn { margin-left: auto; background: none; border: 0; padding: .3rem; color: var(--muted); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--accent); }
.report { margin-top: 1rem; padding: 1rem; border: 1px dashed var(--line); border-radius: 12px; background: var(--bg); }
.report p { margin: .2rem 0 .6rem; }
textarea { display: block; width: 100%; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); font: inherit; resize: vertical; }
.timer { display: inline-block; margin-right: .6rem; padding: .2rem .6rem; border-radius: 99px; background: var(--rule); color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.timer.low { background: var(--bad-bg); color: var(--bad); }
.center-stats { justify-content: center; margin: 1rem 0; }
.actions.left { justify-content: flex-start; margin-top: .6rem; }
.type-grid.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.pill.late { background: var(--bad-bg); color: var(--bad); }
.done-row { opacity: .5; }
.scroll.tall { max-height: 520px; overflow: auto; }

/* ---------- objectif de la semaine, devoirs ---------- */
.goal-row { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.goal-row p { margin: 0 0 .3rem; } .goal-pick { margin: .5rem 0 0; } .goal-pick .chip { cursor: pointer; }
.hw { margin: .3rem 0 1rem; padding-left: 1.1rem; } .hw li { margin: .25rem 0; }
.class-code { font-family: ui-monospace, Menlo, monospace; font-size: 1.3rem; font-weight: 700; letter-spacing: .06em; color: var(--accent); }
form.inline input[name=name] { width: auto; flex: 1; min-width: 200px; }
form.assign { flex-wrap: wrap; margin-top: 1rem; } form.assign select { flex: 1; min-width: 240px; padding: .55rem .6rem; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--ink); font: inherit; }
form.assign input[type=date] { width: auto; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--ink); font: inherit; }
.roster th { white-space: nowrap; } .roster td { vertical-align: middle; }

/* ---------- conjugueur ---------- */
.cj-head h2 { font-size: 2rem; margin-bottom: .2rem; }
.cj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.cj-tense { padding: .9rem 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.cj-tense h4 { margin: 0 0 .5rem; color: var(--accent); font-size: .95rem; }
.cj-tense ul { list-style: none; margin: 0; padding: 0; } .cj-tense li { padding: .12rem 0; font-family: var(--serif); }

/* ---------- glossaire ---------- */
.gl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: .8rem; }
.gl-card { padding: 1rem 1.1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.gl-card h3 { margin: 0 0 .3rem; font-size: 1.1rem; } .gl-card p { margin: .3rem 0; }
.gl-en { font-family: var(--sans, inherit); font-size: .8rem; font-weight: 500; color: var(--muted); font-style: italic; }
.gl-ex { font-family: var(--serif); padding-left: .7rem; border-left: 3px solid var(--rule); }
.gl-inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.gl-inline a { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .9rem; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; background: var(--paper); color: var(--ink); }
.gl-inline a:hover { text-decoration: none; border-color: var(--accent); }
.chips a.chip[data-cat] { cursor: pointer; }

/* ---------- certificat ---------- */
.cert-name-field { display: block; max-width: 420px; margin: 1rem 0 .3rem; }
.cert { max-width: 1000px; margin: 1rem auto; padding: 14px; background: var(--c, var(--accent)); border-radius: 6px; color: #1b2433; }
.cert-in { background: #fffdf8; border: 2px solid #c9b37a; outline: 1px solid #c9b37a; outline-offset: -8px; padding: 2.2rem 2rem 1.6rem; text-align: center; }
.cert-in img { width: 84px; } .cert-in p { margin: .35rem 0; }
.cert-org { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: #5b6472; }
.cert-in h1 { font-size: 2.4rem; margin: .4rem 0 .6rem; color: #162e4b; }
.cert-name { font-family: var(--serif); font-size: 2.2rem; font-weight: 700; color: #b12024; border-bottom: 1px solid #c9b37a; display: inline-block; padding: 0 1.5rem .2rem; min-width: 300px; }
.cert-level { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; } .cert-level span { display: inline-block; padding: .05rem .7rem; border-radius: 99px; background: var(--c); color: #fff; }
.cert-foot { display: flex; justify-content: space-around; gap: 2rem; margin: 1.8rem 0 1rem; }
.cert-foot div { display: flex; flex-direction: column; min-width: 200px; } .cert-foot span { border-bottom: 1px solid #1b2433; padding-bottom: .2rem; font-family: var(--serif); } .cert-foot small { color: #5b6472; margin-top: .2rem; }
.cert-note { font-size: .72rem; color: #5b6472; }
@media print { .cert { -webkit-print-color-adjust: exact; print-color-adjust: exact; margin: 0; max-width: none; page-break-inside: avoid; } @page { margin: 12mm; } }

/* ---------- accueil bilingue ---------- */
.lang-switch { display: flex; justify-content: flex-end; margin-bottom: -.5rem; }
.lang-switch .btn { font-size: .9rem; padding: .35rem .8rem; }
@media (min-width: 900px) { .features { grid-template-columns: repeat(3, 1fr); } }

/* =====================================================================
   DESIGN V3 : en-tête, menu, notifications, cartes, offres
   ===================================================================== */
:root { --radius: 16px; --shadow: 0 1px 2px rgba(22,46,75,.06), 0 10px 30px rgba(22,46,75,.08); --shadow-lg: 0 4px 10px rgba(22,46,75,.08), 0 22px 48px rgba(22,46,75,.14); --gold: #f2b134; }
body { background: radial-gradient(1200px 500px at 85% -10%, rgba(47,127,214,.07), transparent 60%), radial-gradient(900px 420px at -5% 0%, rgba(177,32,36,.05), transparent 60%), var(--bg); background-attachment: fixed; }
h1 { font-size: clamp(1.7rem, 2.4vw, 2.3rem); letter-spacing: -.01em; }
.app > h1:first-child { margin-top: .5rem; }
.section-title { display: flex; align-items: center; gap: .6rem; margin: 2.2rem 0 1rem; font-size: 1.35rem; }
.section-title::before { content: ""; width: 6px; height: 1.2em; border-radius: 99px; background: linear-gradient(var(--red), var(--gold)); flex: 0 0 auto; }
.section-title.center { justify-content: center; } .section-title.center::before { display: none; }
.card, .feature, .level-card, .type-card, .mode-card, .gl-card, .cj-tense, .badge-card, .stat { border-radius: var(--radius); }
.card { padding: 1.4rem 1.5rem; }
a.level-card, a.type-card, a.mode-card, .lesson-card, .feature { transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
a.level-card:hover, a.type-card:hover, a.mode-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.btn { border-radius: 12px; transition: transform .12s ease, box-shadow .12s ease, filter .12s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22,46,75,.12); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn.primary { background: linear-gradient(180deg, #c5282d, var(--cta)); box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.btn.ghost:hover { background: var(--paper); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid rgba(47,127,214,.5); outline-offset: 2px; }
.chip { transition: background .12s, color .12s; } .chip:hover { background: var(--accent); color: var(--accent-ink); filter: none; }
.pill { padding: .2rem .65rem; }
.pill.lockp { background: var(--tip); color: #8a5a00; }
.feature-ico, .type-ico { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--rule); font-size: 1.5rem; margin-bottom: .6rem; }
.feature { padding: 1.3rem; } .feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat { box-shadow: var(--shadow); border: 0; }
.footer { background: var(--paper); margin-top: 2rem; }

/* ---------- en-tête ---------- */
.topbar { display: block; padding-top: 0; padding-bottom: 0; box-shadow: 0 1px 0 var(--line), 0 6px 20px rgba(22,46,75,.05); border-bottom: 0; z-index: 40; }
.topbar-row { display: flex; align-items: center; gap: 1rem; padding: .65rem 0; }
.brand-logo { width: 44px; height: 44px; }
.top-search { flex: 1 1 320px; max-width: 620px; margin: 0 auto; display: flex; align-items: center; gap: .55rem; padding: 0 1rem; height: 44px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--bg); color: var(--muted); transition: border-color .15s, box-shadow .15s, background .15s; }
.top-search:focus-within { border-color: var(--accent); background: var(--paper); box-shadow: 0 0 0 4px rgba(47,127,214,.14); color: var(--accent); }
.top-search svg { flex: 0 0 auto; }
.top-search input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: .98rem; padding: 0; margin: 0; }
.top-search input::placeholder { color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: 99px; background: var(--paper); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.icon-btn:hover { border-color: var(--accent); background: var(--rule); }
.bell-wrap { position: relative; }
.bell-dot { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 700; border: 2px solid var(--paper); }
.bell-dot[hidden] { display: none; }
.bell-dot.late { background: var(--red); color: #fff; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(177,32,36,.5); } 50% { box-shadow: 0 0 0 7px rgba(177,32,36,0); } }
@media (prefers-reduced-motion: reduce) { .bell-dot.late { animation: none; } * { transition: none !important; } }
.bell-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(370px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 60; padding: .4rem; }
.bell-head { padding: .6rem .8rem .4rem; font-family: var(--serif); font-weight: 700; font-size: 1.05rem; }
.bell-item { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem .8rem; border-radius: 12px; color: var(--ink); }
.bell-item:hover { background: var(--rule); text-decoration: none; }
.bell-item > span:last-child { display: flex; flex-direction: column; gap: .1rem; min-width: 0; } .bell-item b { font-size: .92rem; line-height: 1.3; }
.bell-ico { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: var(--rule); font-size: 1.1rem; }
.bell-item.late .bell-ico { background: var(--bad-bg); } .bell-item.late b { color: var(--bad); }
.bell-empty { padding: 1rem; text-align: center; color: var(--muted); margin: 0; }
.account-chip { display: flex; align-items: center; gap: .5rem; height: 44px; padding: 0 .9rem 0 .3rem; border: 1.5px solid var(--line); border-radius: 99px; color: var(--ink); font-weight: 600; font-size: .95rem; background: var(--paper); }
.account-chip:hover { text-decoration: none; border-color: var(--accent); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 99px; background: linear-gradient(135deg, var(--navy), #2f7fd6); color: #fff; font-weight: 700; }
.account-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-toggle { display: flex !important; align-items: center; gap: .5rem; height: 44px; margin: 0; padding: 0 .9rem; border: 1.5px solid var(--line); border-radius: 99px; background: var(--paper); color: var(--ink); font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; }
.nav-toggle:hover, .nav-toggle.on { border-color: var(--accent); background: var(--rule); color: var(--accent); }
.burger { display: inline-flex; flex-direction: column; gap: 4px; width: 18px; } .burger i { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.nav-toggle.on .burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); } .nav-toggle.on .burger i:nth-child(2) { opacity: 0; } .nav-toggle.on .burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- menu horizontal ---------- */
.menubar { display: none; gap: .3rem; padding: .1rem 0 .6rem; overflow-x: auto; scrollbar-width: thin; }
.menubar.open { display: flex; animation: drop .18s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.menubar a { flex: 0 0 auto; display: flex; align-items: center; gap: .45rem; padding: .5rem .9rem; border-radius: 99px; color: var(--ink); font-weight: 600; font-size: .93rem; white-space: nowrap; border: 1.5px solid transparent; }
.menubar a:hover { background: var(--rule); text-decoration: none; }
.menubar a.active { background: var(--accent); color: var(--accent-ink); }
.menubar .mi { font-size: 1.05rem; line-height: 1; }
@media (max-width: 899px) {
  .topbar-row { flex-wrap: wrap; gap: .6rem; }
  .brand { margin-right: auto; } .brand-org { display: none; }
  .top-search { order: 5; flex: 1 1 100%; max-width: none; }
  .account-name, .nav-toggle-txt { display: none; } .account-chip { padding: 0 .3rem; } .nav-toggle { padding: 0 .85rem; }
  .top-actions .btn.ghost { display: none; } .top-actions .btn { padding: .5rem .8rem; font-size: .9rem; }
  .menubar.open { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; padding-bottom: .8rem; overflow: visible; }
  .menubar a { background: var(--bg); border-radius: 14px; padding: .7rem .8rem; white-space: normal; }
}

/* ---------- niveaux et cartes de leçons ---------- */
.level-sec { margin: 0 0 2.5rem; padding: 1.4rem; border-radius: 22px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, var(--paper)), var(--paper) 140px); border: 1px solid color-mix(in srgb, var(--c) 25%, var(--line)); }
.level-head { margin-bottom: 1.1rem; }
.level-title { display: flex; align-items: center; gap: 1rem; } .level-title h2 { margin: 0; font-size: 1.6rem; } .level-title p { margin: .1rem 0 0; }
.level-big { flex: 0 0 auto; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; background: var(--c); color: #fff; font-weight: 800; font-size: 1.5rem; box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 40%, transparent); }
.level-prog { display: flex; align-items: center; gap: .8rem; margin-top: .8rem; } .level-prog .bar { flex: 1; max-width: 420px; margin: 0; }
.level-actions { margin: .9rem 0 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.lesson-card { position: relative; display: flex; flex-direction: column; gap: .45rem; min-height: 170px; padding: 1.1rem 1.1rem 1rem; background: var(--paper); border: 1.5px solid var(--line); border-radius: 18px; color: var(--ink); overflow: hidden; box-shadow: 0 1px 2px rgba(22,46,75,.05); }
.lesson-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--c); }
.lesson-card:hover { text-decoration: none; transform: translateY(-4px); border-color: var(--c); box-shadow: var(--shadow-lg); }
.lc-top { display: flex; align-items: center; gap: .6rem; }
.lc-num { flex: 0 0 auto; min-width: 34px; height: 34px; padding: 0 .55rem; display: grid; place-items: center; border-radius: 11px; background: color-mix(in srgb, var(--c) 14%, var(--paper)); color: var(--c); font-weight: 800; font-size: .9rem; }
.lc-unit { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); line-height: 1.25; }
.lc-title { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; line-height: 1.3; }
.lc-meta { font-size: .8rem; color: var(--muted); }
.lc-foot { margin-top: auto; padding-top: .5rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.dots { display: inline-flex; gap: 4px; } .dots i { width: 10px; height: 10px; border-radius: 99px; background: var(--line); } .dots i.half { background: var(--gold); } .dots i.on { background: var(--good); }
.lesson-card.done { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.lesson-card.done::after { content: "✓"; position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 99px; background: var(--good); color: #fff; font-weight: 800; font-size: .85rem; }
.lesson-card.locked .lc-title { color: var(--muted); } .lesson-card.soon { opacity: .6; }
.lesson-list, .lesson-list li a { border-radius: 14px; }

/* ---------- offres ---------- */
.promo { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.3rem; margin: 1rem auto 1.5rem; max-width: 1100px; border-radius: 18px; color: #fff; background: linear-gradient(110deg, var(--navy), #2a5a94 60%, #2f7fd6); box-shadow: var(--shadow); }
.promo > div { flex: 1 1 260px; display: flex; flex-direction: column; } .promo b { font-family: var(--serif); font-size: 1.15rem; } .promo span { opacity: .92; font-size: .95rem; }
.promo-tag { flex: 0 0 auto; padding: .5rem .8rem; border-radius: 14px; background: var(--gold); color: #3b2a00 !important; opacity: 1 !important; font-weight: 800; font-size: 1.3rem !important; transform: rotate(-4deg); }
.promo .btn { border: 0; background: #fff; color: var(--navy); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; max-width: 1100px; margin: 0 auto 1rem; align-items: stretch; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 480px; } }
.plan { position: relative; display: flex; flex-direction: column; padding: 1.6rem 1.5rem; background: var(--paper); border: 1.5px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.plan.best { border-color: var(--red); box-shadow: var(--shadow-lg); }
@media (min-width: 901px) { .plan.best { transform: translateY(-10px); } }
.plan-flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); padding: .2rem .9rem; border-radius: 99px; background: var(--red); color: #fff; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.plan h3 { font-size: 1.3rem; } .plan .price { margin: .2rem 0 .3rem; font-size: 2.3rem; }
.plan .trial { display: inline-block; align-self: flex-start; padding: .25rem .7rem; border-radius: 99px; background: var(--good-bg); color: var(--good); font-weight: 700; font-size: .88rem; }
.plan ul { list-style: none; margin: .8rem 0 1.2rem; padding: 0; flex: 1; } .plan li { position: relative; padding: .28rem 0 .28rem 1.6rem; font-size: .95rem; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 800; }
.plan .btn { text-align: center; } .plan .fine { margin: .8rem 0 0; line-height: 1.45; }
.faq { max-width: 820px; margin: 0 auto; }
.faq-item { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1.1rem; margin-bottom: .6rem; }
.faq-item summary { cursor: pointer; font-weight: 600; } .faq-item p { margin: .6rem 0 0; color: var(--muted); }
.code-grid { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0; }
.code-chip { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; padding: .25rem .6rem; border-radius: 8px; background: var(--rule); color: var(--accent); } .code-chip.used { background: var(--line); color: var(--muted); text-decoration: line-through; }

/* ---------- divers ---------- */
.hero { padding-top: 1rem; } .hero h1 { background: linear-gradient(100deg, var(--navy), #2f7fd6); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero h1 { background: linear-gradient(100deg, #9ab6df, #dbe7f7); -webkit-background-clip: text; background-clip: text; } }
.dash-head h1 { font-size: clamp(1.8rem, 2.6vw, 2.5rem); }
.session-head { margin-bottom: .3rem; } .card.ex { border-radius: 20px; padding: 2.4rem 1.6rem 1.5rem; }
.opt, .tok { border-radius: 12px; transition: border-color .12s, background .12s, transform .12s; } .opt:hover:not(:disabled), .tok:hover:not(:disabled) { transform: translateY(-1px); }
.result .score { font-size: 3.6rem; }
.grid2 > .card { margin-bottom: 0; } .grid2 { margin-bottom: 1.25rem; }
@media (min-width: 1100px) { .grid2:has(> :nth-child(3)) { grid-template-columns: repeat(3, 1fr); } }
@media print { .menubar, .topbar { display: none !important; } }
@media (max-width: 899px) {
  .brand { flex: 1 1 0; min-width: 0; } .brand-logo { width: 38px; height: 38px; } .brand-name { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .brand-text { min-width: 0; }
  .topbar-row { gap: .45rem; } .icon-btn, .nav-toggle, .account-chip { height: 40px; } .icon-btn { width: 40px; } .avatar { width: 30px; height: 30px; }
  .level-sec { padding: 1rem; } .level-big { width: 52px; height: 52px; font-size: 1.2rem; }
}

/* ---------- glossaire en couleurs ---------- */
.gl-card { position: relative; border: 1.5px solid color-mix(in srgb, var(--c) 28%, var(--line)); border-left: 6px solid var(--c); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 7%, var(--paper)), var(--paper) 70px); transition: transform .16s ease, box-shadow .16s ease; }
.gl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.gl-cat { display: inline-block; margin-bottom: .4rem; padding: .12rem .6rem; border-radius: 99px; background: color-mix(in srgb, var(--c) 15%, var(--paper)); color: var(--c); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.gl-card .gl-ex { border-left-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.gl-chip { display: inline-flex; align-items: center; gap: .4rem; background: color-mix(in srgb, var(--c) 12%, var(--paper)); color: var(--ink); }
.gl-chip i { width: 10px; height: 10px; border-radius: 99px; background: var(--c); }
.gl-chip:hover, .gl-chip.on { background: var(--c); color: #fff; } .gl-chip:hover i, .gl-chip.on i { background: #fff; }
.card.danger { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.card.danger h3 { color: var(--bad); }
.del-form { margin-top: .8rem; padding: 1rem; border: 1px dashed var(--bad); border-radius: 12px; background: var(--bad-bg); }

/* =====================================================================
   DESIGN V4 : chaleureux, simple, visuel (d'après la maquette validée)
   ===================================================================== */
:root { --bg: #fbf6ee; --paper: #ffffff; --ink: #1d2433; --muted: #5f6472; --line: #ece4d6; --rule: #eaf1fb; --tip: #fff8e1; --gold: #fde68a; --gold-ink: #6b4b00; --radius: 22px; --shadow: 0 1px 2px rgba(22,46,75,.05), 0 10px 30px rgba(22,46,75,.07); --shadow-lg: 0 6px 14px rgba(22,46,75,.08), 0 24px 54px rgba(22,46,75,.16); --serif: "Fraunces", Georgia, serif; --sans: "Nunito", system-ui, sans-serif; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #14171f; --paper: #1d222d; --ink: #ebe7df; --muted: #a3a8b5; --line: #2b3140; --rule: #1f2b3f; --tip: #2a2410; --gold: #b08a1f; --gold-ink: #fff3c4; } }
body { background: var(--bg); font-weight: 500; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 3vw, 2.8rem); } h2 { font-size: 1.6rem; }
.lead { font-size: 1.15rem; line-height: 1.55; }
.section-title { font-size: 1.7rem; margin: 2.4rem 0 1rem; } .section-title::before { display: none; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; } .row-head .section-title { margin-bottom: 1rem; } .row-head a { font-weight: 800; }
.card { border-radius: var(--radius); box-shadow: none; border: 1px solid var(--line); }
.card.slim { padding: 1rem 1.2rem; } .card.slim > b { display: block; margin-bottom: .4rem; } .card.slim .chips { margin: .2rem 0 .3rem; }
.btn { border-radius: 999px; font-weight: 800; padding: .6rem 1.15rem; border-width: 2px; }
.btn.primary { background: var(--cta); box-shadow: 0 8px 20px rgba(177,32,36,.22); }
.btn.outline { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn.big { padding: .85rem 1.6rem; font-size: 1.1rem; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(22,46,75,.14); }
.chip { border-radius: 999px; font-weight: 700; background: #f4ede0; color: var(--ink); }
.chip.on, .chip:hover { background: var(--accent); color: var(--accent-ink); }
.pill { font-weight: 800; padding: .25rem .7rem; } .pill.gold { background: var(--gold); color: var(--gold-ink); }
.tag { display: inline-block; padding: .35rem .85rem; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-weight: 800; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }
.eyebrow { color: var(--red); } .eyebrow.gold { color: var(--gold); }
input[type=text], input[type=email], input[type=password], input[type=number], input:not([type]), textarea, .match-table select, form.assign select { border-radius: 14px; border-width: 2px; background: var(--paper); }
.blk { border-radius: 18px; } .blk.rule { background: var(--rule); border-left-width: 6px; }
.blk.tip, .blk.warn { border-radius: 18px; }
.lesson-body { border-radius: var(--radius); border: 1px solid var(--line); }
.lesson-body > p { font-family: var(--sans); font-size: 1.05rem; }
.opt, .tok { border-radius: 14px; border-width: 2px; font-weight: 600; }
.card.ex { border-radius: var(--radius); }
.ex-q { font-family: var(--serif); font-weight: 600; }
.feedback { border-radius: 16px; }
.toast { border-radius: 999px; }
.footer { background: transparent; border-top: 1px solid var(--line); }

/* ---------- en-tête ---------- */
.topbar { background: var(--paper); box-shadow: none; border-bottom: 1px solid var(--line); }
.brand-name { font-size: 1.3rem; font-weight: 800; } .brand-org { font-weight: 800; }
.top-search { background: #f4ede0; border-color: transparent; height: 46px; } .top-search:focus-within { background: var(--paper); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(22,46,75,.12); }
.icon-btn, .account-chip, .nav-toggle { border-width: 2px; height: 46px; } .icon-btn { width: 46px; }
.account-chip { font-weight: 800; } .avatar { background: var(--accent); }
.menubar a { font-weight: 800; padding: .55rem 1rem; } .menubar a.active { background: var(--accent); color: var(--accent-ink); }
.menubar a:hover { background: #f4ede0; }
.menubar .mi { display: none; }
.bell-panel { border-radius: 20px; }

/* ---------- accueil ---------- */
.hero.v4 { gap: 3rem; padding: 2.5rem 0 2rem; }
.hero.v4 h1 { font-size: clamp(2.4rem, 4.6vw, 4rem); line-height: 1.02; color: var(--accent); background: none; -webkit-text-fill-color: initial; }
.hero.v4 h1 em { font-style: normal; color: var(--red); }
.hero.v4 .tag { margin-bottom: 1rem; }
.hero.v4 .lead { max-width: 560px; font-size: 1.25rem; }
.hero-checks { display: flex; gap: 1.4rem; flex-wrap: wrap; font-weight: 700; font-size: .92rem; color: var(--muted); margin: .4rem 0 0; }
.hero-art.v4 { position: relative; min-height: 460px; display: block; }
.hero-panel { position: absolute; left: 30px; top: 20px; right: 20px; height: 380px; border-radius: 28px; background: var(--navy); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .5rem; padding: 1.6rem 2rem 2rem; text-align: center; overflow: hidden; }
.hero-panel::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 999px; background: rgba(255,255,255,.06); top: -160px; right: -120px; }
.hero-panel img { width: 120px; height: 120px; object-fit: contain; position: relative; filter: drop-shadow(0 10px 24px rgba(0,0,0,.35)); }
.hero-panel-txt { position: relative; display: flex; flex-direction: column; gap: .3rem; } .hero-panel-txt b { font-family: var(--serif); font-size: 1.6rem; } .hero-panel-txt span { color: #cbd5e1; font-size: .95rem; max-width: 320px; }
.sample.v4 { position: absolute; left: -10px; bottom: -14px; width: min(340px, 80%); transform: rotate(-3deg); border-radius: 20px; box-shadow: var(--shadow-lg); border: 0; padding: 1.1rem 1.2rem; font-size: 1.3rem; }
.sample.v4 .sample-fb { border-radius: 10px; font-weight: 700; }
.sticker-round { position: absolute; right: 0; top: -10px; width: 150px; height: 150px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(8deg); font-weight: 800; line-height: 1.1; box-shadow: var(--shadow); }
.sticker-round b { font-family: var(--serif); font-size: 2.5rem; } .sticker-round span { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.sticker-done { position: absolute; right: 30px; bottom: 0; display: flex; align-items: center; gap: .8rem; padding: .75rem 1rem; border-radius: 16px; background: var(--paper); box-shadow: var(--shadow-lg); transform: rotate(2deg); }
.sticker-done .ok-dot { width: 44px; height: 44px; border-radius: 999px; background: var(--good); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; }
.sticker-done > div { display: flex; flex-direction: column; line-height: 1.2; } .sticker-done b { font-size: .95rem; } .sticker-done span:not(.ok-dot) { font-size: .82rem; color: var(--muted); }
@media (max-width: 720px) { .hero.v4 { grid-template-columns: 1fr; } .hero-art.v4 { display: block; min-height: 380px; margin-top: .5rem; } .hero-panel { left: 0; right: 0; height: 260px; } .sticker-round { width: 110px; height: 110px; } .sticker-round b { font-size: 1.8rem; } .sample.v4 { bottom: 0; } }
.level-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin: 1.5rem 0 1rem; }
.tile { display: flex; flex-direction: column; gap: .3rem; padding: 1.3rem 1.2rem; border-radius: 22px; background: var(--c); color: #fff; min-height: 150px; transition: transform .16s, box-shadow .16s; }
.tile:hover { text-decoration: none; transform: translateY(-4px); box-shadow: 0 16px 34px color-mix(in srgb, var(--c) 45%, transparent); }
.tile b { font-family: var(--serif); font-size: 2.5rem; font-weight: 800; line-height: 1; } .tile-name { font-weight: 800; font-size: 1.05rem; } .tile-sub { font-size: .82rem; opacity: .92; }
@media (max-width: 900px) { .level-tiles { grid-template-columns: repeat(3, 1fr); } } @media (max-width: 560px) { .level-tiles { grid-template-columns: 1fr 1fr; } }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.step { display: flex; flex-direction: column; gap: .7rem; padding: 1.6rem; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.step b { font-family: var(--serif); font-size: 1.35rem; color: var(--accent); } .step > span { color: var(--muted); line-height: 1.5; }
.step-ico { width: 100%; max-width: 220px; height: 130px; border-radius: 16px; display: grid; place-items: center; } .step-ico.blue { background: var(--rule); } .step-ico.orange { background: #fff1e6; } .step-ico.green { background: var(--good-bg); }
.step-ico svg { width: 80px; height: 80px; }
@media (max-width: 800px) { .steps3 { grid-template-columns: 1fr; } }
.demo-band { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: start; margin: 2.5rem 0; padding: 2.5rem 3rem; border-radius: 28px; background: var(--navy); color: #fff; }
.demo-band h2 { font-size: 2.2rem; line-height: 1.1; color: #fff; margin: .6rem 0; } .demo-band p { color: #cbd5e1; font-size: 1.05rem; } .tag.gold { background: transparent; color: var(--gold); padding: 0; }
.demo-band #demoFig { margin-top: 1.2rem; } .demo-band #demoFig .figure { background: var(--paper); color: var(--ink); } .demo-band #demoFig > p { color: #cbd5e1; }
.demo-card { margin: 0; background: var(--paper); color: var(--ink); }
@media (max-width: 900px) { .demo-band { grid-template-columns: 1fr; padding: 1.6rem; } }
.teacher-band { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin: 1rem 0 2rem; padding: 1.4rem 1.8rem; border-radius: 22px; background: var(--tip); border: 1px solid #f3e2a5; }
.teacher-band > div { flex: 1 1 320px; display: flex; flex-direction: column; gap: .2rem; } .teacher-band b { font-family: var(--serif); font-size: 1.25rem; color: var(--accent); } .teacher-band span { color: var(--gold-ink); }
.plan { border-radius: 26px; box-shadow: none; } .plan.best { box-shadow: var(--shadow-lg); border-width: 3px; }
.plan:nth-child(3) { background: var(--tip); border-color: #f3e2a5; }
.promo { border-radius: 22px; }

/* ---------- tableau de bord ---------- */
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; margin: .5rem 0 1rem; }
.welcome { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 1rem; padding: 2rem 2.2rem; border-radius: 28px; background: var(--navy); color: #fff; }
.welcome::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 999px; background: rgba(255,255,255,.06); top: -200px; right: -120px; }
.welcome h1 { color: #fff; font-size: clamp(1.7rem, 2.6vw, 2.5rem); margin: 0; position: relative; }
.welcome .eyebrow { margin: 0; position: relative; }
.next-card { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border-radius: 18px; background: rgba(255,255,255,.1); color: #fff; }
.next-card:hover { text-decoration: none; background: rgba(255,255,255,.16); }
.next-card .lvl { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-family: var(--serif); font-weight: 800; font-size: 1.25rem; }
.next-txt { flex: 1; display: flex; flex-direction: column; gap: .15rem; min-width: 0; } .next-txt b { font-size: 1.1rem; } .next-txt span { color: #cbd5e1; font-size: .9rem; }
.welcome-stats { position: relative; display: flex; gap: 1.6rem; flex-wrap: wrap; color: #cbd5e1; font-size: .92rem; }
.welcome-stats b { color: #fff; font-family: var(--serif); font-size: 1.5rem; margin-right: .2rem; }
.welcome-access { position: relative; margin: 0; font-size: .85rem; color: #cbd5e1; } .welcome-access a { color: var(--gold); } .welcome-done { position: relative; font-size: 1.1rem; }
.dash-side { display: flex; flex-direction: column; gap: 1.25rem; } .dash-side .card { margin: 0; }
.goal-row svg text { fill: var(--ink); }
.level-card { border-radius: 20px; border-top-width: 6px; box-shadow: none; } .level-card h3 { font-size: 1.05rem; } .level-id { font-family: var(--serif); font-size: 1.6rem; }
.shortcuts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin: 1.5rem 0; }
.shortcut { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.3rem; border-radius: 22px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); transition: transform .16s, box-shadow .16s; }
.shortcut:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.shortcut > span:last-child { display: flex; flex-direction: column; gap: .15rem; min-width: 0; } .shortcut b { font-size: 1.05rem; } .shortcut > span:last-child > span { font-size: .85rem; color: var(--muted); }
.sc-ico { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 1.6rem; }
.sc-ico.gold { background: var(--gold); } .sc-ico.blue { background: var(--rule); } .sc-ico.green { background: var(--good-bg); } .sc-ico.red { background: var(--bad-bg); }
.badge-card { border-radius: 20px; } .badge-card.got { background: var(--good-bg); }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: 1fr; } .shortcuts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .shortcuts { grid-template-columns: 1fr; } .welcome { padding: 1.4rem; } }

/* ---------- page de leçon ---------- */
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 2rem; align-items: start; max-width: 1400px; margin: 0 auto; }
.lesson-main { min-width: 0; } .lesson-main .lesson-head, .lesson-main .lesson-body { max-width: none; }
.lesson-head h1 { font-size: clamp(1.9rem, 3vw, 2.8rem); line-height: 1.08; color: var(--accent); }
.lesson-next { margin: 1rem 0 2rem; }
.lesson-side { position: sticky; top: 130px; display: flex; flex-direction: column; gap: 1rem; }
.play { display: flex; flex-direction: column; gap: .7rem; padding: 1.4rem; border-radius: 24px; background: var(--navy); color: #fff; }
.play-title { font-family: var(--serif); font-size: 1.4rem; } .play-sub { font-size: .88rem; color: #cbd5e1; margin-bottom: .2rem; }
.play-row { display: flex; align-items: center; gap: .8rem; padding: .8rem .9rem; border-radius: 16px; background: rgba(255,255,255,.12); color: #fff; }
.play-row:hover { text-decoration: none; background: rgba(255,255,255,.2); }
.play-row.done, .play-row.now { background: var(--paper); color: var(--ink); } .play-row.now { outline: 3px solid var(--gold); }
.play-num { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 999px; background: rgba(255,255,255,.2); display: grid; place-items: center; font-weight: 800; }
.play-row.done .play-num { background: var(--good); color: #fff; } .play-row.now .play-num { background: var(--cta); color: #fff; }
.play-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; } .play-txt b { font-size: 1rem; } .play-txt span { font-size: .82rem; opacity: .8; }
.play-row.done .play-txt span, .play-row.now .play-txt span { color: var(--muted); opacity: 1; }
.side-link { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.2rem; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); font-weight: 800; }
.side-link:hover { text-decoration: none; border-color: var(--accent); }
.lesson-grid .crumbs { grid-column: 1 / -1; }
@media (max-width: 960px) { .lesson-grid { grid-template-columns: 1fr; } .lesson-side { position: static; } }
.mode-card, .type-card, .gl-card, .cj-tense, .lesson-card { border-radius: 20px; }
.lesson-card::before { height: 6px; }
.level-sec { border-radius: 26px; }
.cert { border-radius: 10px; }

/* ---------- INFOGRAPHIES EN HTML (etapes, cases, arbres) : le texte s'adapte a la largeur ---------- */
.fig-wrap { overflow: visible; }
.fig-wrap:has(svg.fig) { overflow-x: auto; }
.fig-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: .7rem 1.7rem; padding: .2rem 0; }
.fig-step { position: relative; display: flex; flex-direction: column; gap: .35rem; padding: .85rem .9rem .9rem; border-radius: 14px; background: color-mix(in srgb, var(--c) 10%, var(--paper)); border-top: 4px solid var(--c); min-width: 0; }
.fig-step-title { font-weight: 800; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--c); line-height: 1.25; overflow-wrap: anywhere; }
.fig-step-text { font-size: .98rem; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.fig-step.has-next::after { content: "→"; position: absolute; right: -1.4rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--muted); }
.fig-slots { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .6rem 1.7rem; padding: .2rem 0; }
.fig-slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; min-width: 64px; max-width: 200px; }
.fig-slot-text { display: block; width: 100%; box-sizing: border-box; padding: .6rem .8rem; border-radius: 12px; border: 1.5px solid var(--c); background: color-mix(in srgb, var(--c) 14%, var(--paper)); font-weight: 700; font-size: .95rem; text-align: center; line-height: 1.3; }
.fig-slot.edge .fig-slot-text { border-style: dashed; font-weight: 600; color: var(--muted); }
.fig-slot-n { font-size: .8rem; font-weight: 700; color: var(--muted); }
.fig-slot.has-next::after { content: "→"; position: absolute; right: -1.35rem; top: .5rem; font-size: 1.3rem; color: var(--muted); }
.fig-tree { display: flex; flex-direction: column; align-items: stretch; }
.fig-node { display: flex; flex-direction: column; gap: .5rem; }
.fig-q { align-self: flex-start; padding: .55rem .9rem; border-radius: 12px; background: var(--rule); border: 1.5px solid var(--accent); font-weight: 700; font-size: .95rem; line-height: 1.35; }
.fig-branches { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: start; gap: .6rem .9rem; padding-left: 1rem; border-left: 3px solid var(--line); margin-left: .6rem; }
.fig-branch { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.fig-edge-label { align-self: flex-start; padding: .1rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.fig-edge-label.yes { background: var(--good-bg); color: var(--good); } .fig-edge-label.no { background: #fdecec; color: var(--red); }
.fig-leaf { display: flex; flex-direction: column; gap: .2rem; padding: .7rem .9rem; border-radius: 12px; background: var(--good-bg); border: 1.5px solid var(--good); line-height: 1.35; overflow-wrap: anywhere; }
.fig-leaf b { color: var(--good); font-size: 1rem; } .fig-leaf .fig-muted { color: var(--muted); font-size: .88rem; }
@media (max-width: 640px) {
  .fig-steps { grid-template-columns: 1fr; gap: 1.6rem; }
  .fig-step.has-next::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -1.5rem; transform: translateX(-50%); }
  .fig-branches { grid-template-columns: 1fr; }
}
@media print { .fig-step, .fig-slot-text, .fig-q, .fig-leaf, .fig-edge-label { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .fig-steps { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); } }

/* ---------- bouton Deconnexion en haut ---------- */
.logout-btn { display: inline-flex; align-items: center; width: auto; gap: .4rem; padding: 0 .9rem 0 .7rem; font-weight: 700; font-size: .92rem; font-family: inherit; }
.logout-btn:hover { border-color: var(--red); color: var(--red); background: #fdecec; }
@media (max-width: 720px) { .logout-label { display: none; } .logout-btn { width: 40px; padding: 0; } }

/* ---------- bandeau "bientot d'autres langues" ---------- */
.soon-band { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin: 1.2rem 0 1.6rem; padding: 1.1rem 1.5rem; border-radius: 22px; background: var(--navy); color: #fff; }
.soon-flags { display: flex; gap: .2rem; font-size: 1.9rem; line-height: 1; }
.soon-flags span { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 999px; background: rgba(255,255,255,.12); }
.soon-band > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: .15rem; }
.soon-band b { font-family: var(--serif); font-size: 1.2rem; } .soon-band > div > span { color: #cbd5e1; font-size: .98rem; }
.soon-band .tag.gold { background: var(--gold); color: var(--gold-ink); padding: .35rem .85rem; }
.top-actions .btn { white-space: nowrap; }

/* ---------- DEUXIEME CHANCE, REGLE SOUS LA CORRECTION ---------- */
.retry, input.retry, select.retry, .opt.retry, .tok.retry, .order-out.retry { border-color: #e08a1e !important; background: #fff4e2 !important; box-shadow: 0 0 0 2px rgba(224,138,30,.25); }
.feedback.retry { background: #fff4e2; color: #9a5a05; }
.feedback .why { font-weight: 800; color: var(--accent); }
.rule-more { margin-top: .8rem; border-top: 1px dashed color-mix(in srgb, currentColor 35%, transparent); padding-top: .6rem; color: var(--ink); }
.rule-more summary { cursor: pointer; font-weight: 800; color: var(--accent); list-style: none; display: inline-flex; align-items: center; gap: .4rem; }
.rule-more summary::before { content: "📘"; } .rule-more summary::-webkit-details-marker { display: none; }
.rule-more[open] summary { margin-bottom: .5rem; }
.rule-more .blk { margin: .4rem 0; background: var(--paper); } .rule-more .blk h3 { font-size: 1.05rem; }
.mini-ex .rule-more { border-top-color: var(--line); }
.mini-ex .explain { font-size: .95rem; color: var(--ink); opacity: .85; margin-top: .4rem; }

/* ---------- EVALUATIONS NOTEES, LECTURE ---------- */
.graded-tag { background: var(--navy); color: #fff; margin-bottom: .6rem; }
.play-row.quiz { background: rgba(253,230,138,.16); border: 1.5px dashed rgba(253,230,138,.7); } .play-row.quiz .play-num { background: var(--gold); color: var(--gold-ink); }
.play-row.quiz.done { background: var(--paper); border-style: solid; border-color: var(--gold); }
.lesson-side .side-link + .side-link { margin-top: -.4rem; }
.read-card .gl-cat { align-self: flex-start; }
.reading { font-size: 1.15rem; line-height: 1.75; } .reading p { margin: 0 0 1rem; }
.vocab dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: .5rem 0 0; } .vocab dt { font-weight: 800; } .vocab dd { margin: 0; }
@media (max-width: 560px) { .vocab dl { grid-template-columns: 1fr; } .vocab dd { margin-bottom: .4rem; } }
.card.passage { max-height: 46vh; overflow: auto; font-family: var(--sans); font-size: 1.08rem; padding-top: 2.6rem; } .card.passage h3 { font-family: var(--serif); margin-top: 0; }
@media (min-width: 1000px) { .card.passage { max-height: calc(100vh - 220px); position: sticky; top: 150px; } }

/* ---------- VERSIONS A IMPRIMER ---------- */
.print-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--paper); }
.seg a { padding: .5rem .9rem; font-weight: 700; font-size: .92rem; color: var(--ink); text-decoration: none; } .seg a.on { background: var(--navy); color: #fff; }
.paper { position: relative; background: #fff; color: #111; border: 1px solid var(--line); border-radius: 12px; padding: 2.2rem 2.4rem 3.4rem; max-width: 860px; margin: 0 auto 2rem; font-size: 1rem; line-height: 1.5; }
.paper a { color: inherit; }
.paper-head { display: flex; gap: 1rem; align-items: center; border-bottom: 3px solid var(--red); padding-bottom: .7rem; margin-bottom: .9rem; }
.paper-head img { width: 62px; height: 62px; object-fit: contain; } .paper-head h1 { font-size: 1.5rem; margin: .1rem 0; color: var(--navy); }
.paper-id { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; margin: 0 0 1.2rem; font-weight: 700; font-size: .95rem; } .paper-id .p-score { margin-left: auto; }
.p-line { display: inline-block; border-bottom: 1.2px solid #444; height: 1.05em; vertical-align: baseline; margin: 0 .2em; }
.p-write { border-bottom: 1.2px solid #444; height: 1.9rem; margin: .1rem 0 .3rem; }
.p-list { padding-left: 1.5rem; margin: 0; } .p-list > li { margin: 0 0 1.05rem; padding-left: .3rem; break-inside: avoid; } .p-list > li::marker { font-weight: 800; color: var(--navy); }
.p-q { margin: 0 0 .35rem; } .p-ins { margin: 0 0 .25rem; font-style: italic; color: #444; font-size: .95rem; }
.p-q.quote { border-left: 3px solid #999; padding-left: .7rem; }
.p-opts { list-style: none; padding: 0; margin: .2rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; } .p-opts li { display: flex; align-items: baseline; gap: .35rem; }
.p-box { display: inline-block; width: .85em; height: .85em; border: 1.3px solid #333; border-radius: 2px; flex: none; position: relative; top: .1em; } .p-let { font-weight: 700; }
.p-conj { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem 1.5rem; }
.p-cloze { line-height: 2.1; } .p-cloze sup { font-size: .65em; color: #555; }
.p-match { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; } .p-match ol, .p-match ul { margin: 0; padding-left: 1.3rem; } .p-match ul { list-style: none; padding: 0; } .p-match li { margin: .25rem 0; }
.p-bank { display: flex; flex-wrap: wrap; gap: .35rem .6rem; } .p-bank span { border: 1px solid #888; border-radius: 6px; padding: .05rem .5rem; }
.p-sort { width: 100%; border-collapse: collapse; margin-top: .3rem; } .p-sort th, .p-sort td { border: 1px solid #555; padding: .3rem .5rem; text-align: left; } .p-sort td { height: 3.6rem; }
.p-passage { font-size: 1.02rem; line-height: 1.65; border: 1px solid #bbb; border-radius: 10px; padding: 1rem 1.2rem; margin-bottom: 1.2rem; } .p-passage p { margin: 0 0 .7rem; } .p-vocab { font-family: var(--sans); font-size: .88rem; color: #333; border-top: 1px dashed #bbb; padding-top: .5rem; margin-bottom: 0 !important; }
.p-key { break-before: page; margin-top: 2rem; border-top: 3px solid var(--navy); padding-top: 1rem; } .p-key h2 { color: var(--navy); margin: 0; } .p-key ol { padding-left: 1.5rem; } .p-key li { margin: .35rem 0; }
.p-why { display: block; font-size: .88rem; color: #444; }
.paper-foot { margin-top: 1.6rem; padding-top: .5rem; border-top: 1px solid #bbb; font-size: .72rem; color: #555; line-height: 1.35; text-align: center; }
.paper.grades .stats { margin: 0 0 1rem; } .paper.grades h3 { margin: 1.2rem 0 .4rem; color: var(--navy); }
.paper-tbl { width: 100%; border-collapse: collapse; } .paper-tbl > tbody > tr > td, .paper-tbl > tfoot > tr > td { padding: 0; border: 0; } .foot-space { height: 0; }
@media print {
  @page { margin: 13mm 13mm 11mm; }
  html, body, .app { background: #fff !important; }
  .foot-space { height: 19mm; }
  .paper { border: 0; border-radius: 0; padding: 0; margin: 0; max-width: none; font-size: 11.5pt; }
  .paper-foot { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; background: #fff; }
  .paper .pill { border: 1px solid #999; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .paper-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .scroll { overflow: visible; }
}
.p-vocab { break-inside: avoid; }

/* FEN Grammatik: English translation under each German example */
.examples .ex-en { display: block; color: var(--muted, #5b6677); font-style: italic; font-size: .95em; margin-top: .1rem; }

/* Lesen showcase on the home page */
.lesen-band { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); gap:32px; align-items:center; margin:56px 0; }
.lesen-txt h2 { margin:10px 0 10px; }
.lesen-txt p { margin:0 0 18px; }
.lesen-txt .block { display:block; margin-top:10px; }
.lesen-cards { display:grid; grid-template-columns:1fr; gap:12px; }
.lesen-cards .type-card { text-align:left; }
@media (max-width:820px) { .lesen-band { grid-template-columns:1fr; } }

/* ---- professional type: Inter for text and UI, Plus Jakarta Sans for headings (2026-10-09) ---- */
:root { --serif: "Plus Jakarta Sans", "Inter", system-ui, sans-serif; --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; }
h1, h2, h3, h4, .brand-name, .price, .stat b, .soon-band b, .plan h3 { font-family: var(--serif); letter-spacing: -.01em; }
.hero h1 { letter-spacing: -.02em; line-height: 1.05; }
.lesson-body > p, .examples .fr, .examples .de, .sample { font-family: var(--sans); }
body { font-weight: 400; }
.btn { font-weight: 700; }
/* pricing: centered grid, room for the "most popular" flag, equal cards */
.pricing { margin-top: 3rem; }
.pricing .section-title { margin-bottom: 1.8rem; }
.plans { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); max-width: 1100px; gap: 1.4rem; margin-top: 1.2rem; }
.plan { padding: 1.8rem 1.7rem 1.7rem; }
.plan-flag { top: -14px; z-index: 2; }
.plan .price { margin: .4rem 0 .6rem; }
.plan ul { margin: 1rem 0 1.4rem; }
.plan li { padding: .32rem 0 .32rem 1.7rem; line-height: 1.45; }
/* "stay tuned" band: readable link, even spacing */
.soon-band { margin: 2.2rem 0 2rem; padding: 1.3rem 1.6rem; gap: 1.4rem; }
.soon-band a { color: var(--gold); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.soon-band > div > span { line-height: 1.5; }
/* section rhythm on the home page */
.section-title { margin-top: 2.8rem; }
.steps3 { margin-bottom: .5rem; }
.demo-band { margin-top: 2.6rem; }
.level-tiles { margin-top: 1.4rem; }

/* two-plan pricing (German): narrower, centered, balanced cards */
.plans { max-width: 860px; }
.plan .free-trial { background: var(--rule); color: var(--navy); }
.plan h3 { font-size: 1.4rem; }
.plan .btn { margin-top: auto; }
