/* Los! — Deutsch A1 · styles */

/* ---------- Polices (dans le site, pour marcher hors ligne) ---------- */
@font-face { font-family: "Barlow SC"; src: url("../fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow SC"; src: url("../fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow SC"; src: url("../fonts/barlow-semi-condensed-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

/* ---------- Couleurs ---------- */
:root {
  --red: #D91E12; --red-d: #A9170D; --red-s: #FDECEB; --red-t: #B0170C;
  --gold: #FAB92F; --gold-d: #D9960F; --gold-s: #FFF4D6; --gold-t: #8A5A00;
  --ink: #16181D; --unit-ink: #16181D; --unit-ink-d: #000000;
  --green: #1C9A52; --green-d: #147A40; --green-s: #E3F6EA; --green-t: #10703A;
  --orange: #F2730A;
  --m: #2563EB; --m-s: #E8EFFD; --f: #D6336C; --f-s: #FCE7EF; --n: #047857; --n-s: #DDF3EA; --pl: #D6336C; --pl-s: #FCE7EF;
  --der: var(--m); --die: var(--f); --das: var(--n);
  --bad: #E5484D; --bad-d: #B8343A; --bad-s: #FDECEC; --bad-t: #B4232A;
  --near: #F08C00; --near-d: #C46F00; --near-s: #FFF1DD; --near-t: #8F4F00;
  --bg: #FBF8F1; --card: #FFFFFF; --soft: #F2EEE4; --line: #E6E0D4; --line-2: #D5CEBF;
  --text: #16161D; --muted: #5F5E68;
  --btn-ink-bg: #16181D; --btn-ink-fg: #FFFFFF; --btn-ink-sh: #000000;
  --fb-box: rgba(255, 255, 255, 0.6);
  --font: "Atkinson", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-d: "Barlow SC", "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --red: #EE3B2D; --red-d: #B5231A; --red-s: #3A1714; --red-t: #FF8A80;
    --gold-s: #3A2E10; --gold-t: #FAD27A;
    --unit-ink: #2A2F3A; --unit-ink-d: #14171D;
    --green: #2FB66A; --green-d: #1F8A4E; --green-s: #12301F; --green-t: #6EE3A0;
    --m: #6EA0FF; --m-s: #1B2742; --f: #FF6B9A; --f-s: #3D1A28; --n: #34D399; --n-s: #123124; --pl: #FF6B9A; --pl-s: #3D1A28;
    --bad: #FF6B6F; --bad-d: #C2393E; --bad-s: #3A1719; --bad-t: #FF9EA1;
    --near: #FFA53D; --near-d: #C46F00; --near-s: #3A2A12; --near-t: #FFC27A;
    --bg: #101015; --card: #1A1A22; --soft: #23232D; --line: #2F2F3A; --line-2: #3D3D4A;
    --text: #F4F1EA; --muted: #A3A1AB;
    --btn-ink-bg: #F1F2F4; --btn-ink-fg: #16181D; --btn-ink-sh: #8A909C;
    --fb-box: rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --red: #EE3B2D; --red-d: #B5231A; --red-s: #3A1714; --red-t: #FF8A80;
  --gold-s: #3A2E10; --gold-t: #FAD27A;
  --unit-ink: #2A2F3A; --unit-ink-d: #14171D;
  --green: #2FB66A; --green-d: #1F8A4E; --green-s: #12301F; --green-t: #6EE3A0;
  --m: #6EA0FF; --m-s: #1B2742; --f: #FF6B9A; --f-s: #3D1A28; --n: #34D399; --n-s: #123124; --pl: #FF6B9A; --pl-s: #3D1A28;
  --bad: #FF6B6F; --bad-d: #C2393E; --bad-s: #3A1719; --bad-t: #FF9EA1;
  --near: #FFA53D; --near-d: #C46F00; --near-s: #3A2A12; --near-t: #FFC27A;
  --bg: #101015; --card: #1A1A22; --soft: #23232D; --line: #2F2F3A; --line-2: #3D3D4A;
  --text: #F4F1EA; --muted: #A3A1AB;
  --btn-ink-bg: #F1F2F4; --btn-ink-fg: #16181D; --btn-ink-sh: #8A909C;
  --fb-box: rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { touch-action: manipulation; }
a { color: inherit; }
img { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.ico { width: 22px; height: 22px; flex: none; }
.muted { color: var(--muted); font-size: 15px; }
mark { background: var(--gold-s); color: inherit; padding: 0 3px; border-radius: 4px; }

#app { min-height: 100vh; min-height: 100dvh; position: relative; }
.shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
.screen { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.screen-in { animation: screenin 0.24s ease-out both; }
.side { display: none; }
.nav-brand { display: none; }
.content { padding: 12px 16px calc(100px + var(--safe-b)); }
.no-tabs .content { padding-bottom: calc(32px + var(--safe-b)); }

.boot { position: fixed; inset: 0; display: grid; place-items: center; background: #D91E12; }
.boot img { width: 96px; height: 96px; animation: pop 0.6s ease both; }

/* ---------- Barres ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; }
.brand-name { font-family: var(--font-d); font-weight: 800; font-size: 24px; letter-spacing: 0.01em; }
.brand-level { font-family: var(--font-d); font-weight: 800; font-size: 12px; background: var(--gold); color: #16181D; border-radius: 6px; padding: 1px 6px; }
.top-stats { display: flex; align-items: center; gap: 4px; }
.tstat { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 12px; font-family: var(--font-d); font-weight: 800; font-size: 18px; color: var(--muted); position: relative; }
.tstat .ico { width: 22px; height: 22px; }
.tstat.streak.on { color: var(--orange); }
.tstat.streak.on .ico { fill: var(--orange); fill-opacity: 0.25; }
.tstat.xp { color: var(--gold-d); }
.tstat.xp .ico { fill: var(--gold); stroke: var(--gold-d); }
.tstat.goal { width: 38px; height: 38px; padding: 0; justify-content: center; }
.tstat.goal .ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 4; }
.ring-fg { fill: none; stroke: var(--green); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 0.6s; }
.tstat.goal .ico { width: 16px; height: 16px; color: var(--green); }

.backbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 6px;
  padding: calc(6px + var(--safe-t)) 8px 6px;
  background: var(--bg); background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.backbar-title { flex: 1; font-family: var(--font-d); font-weight: 800; font-size: 20px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn-space { width: 44px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0 auto; max-width: 560px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(6px + var(--safe-b));
  background: var(--card); border-top: 1px solid var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; text-decoration: none; color: var(--muted); font-family: var(--font-d); font-weight: 700; font-size: 13px; letter-spacing: 0.02em; }
.tab-ico { position: relative; width: 50px; height: 32px; display: grid; place-items: center; border-radius: 16px; transition: background 0.2s; }
.tab.active { color: var(--red); }
.tab.active .tab-ico { background: var(--red-s); }
.tab-badge { position: absolute; top: -4px; right: 4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font: 700 11.5px/19px var(--font); text-align: center; }

/* ---------- Boutons ---------- */
.btn {
  appearance: none; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border-radius: 16px; cursor: pointer; text-decoration: none; user-select: none;
  font-family: var(--font-d); font-weight: 800; font-size: 17px; letter-spacing: 0.07em; text-transform: uppercase;
  transition: transform 0.08s, box-shadow 0.08s, background-color 0.2s;
}
.btn .ico { width: 20px; height: 20px; }
.btn-ink { background: var(--btn-ink-bg); color: var(--btn-ink-fg); box-shadow: 0 4px 0 var(--btn-ink-sh); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 4px 0 var(--red-d); }
.btn-orange { background: var(--near); color: #16161D; box-shadow: 0 4px 0 var(--near-d); }
.ses-foot[data-fb="bad"] .btn-red { background: var(--bad); box-shadow: 0 4px 0 var(--bad-d); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-d); }
.btn-ghost { background: var(--card); color: var(--text); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); }
.btn-text-red { background: none; color: var(--red); min-height: 40px; padding: 0 6px; margin-top: 6px; }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 transparent; }
.btn:disabled { background: var(--soft); color: var(--muted); box-shadow: 0 4px 0 var(--line); border-color: transparent; cursor: default; }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 14.5px; border-radius: 12px; }
.icon-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; text-decoration: none; }
.icon-btn:active { background: var(--soft); }
.icon-btn .ico { width: 26px; height: 26px; }
.icon-btn-lg { width: 56px; height: 56px; background: var(--card); border: 2px solid var(--line); border-radius: 16px; color: var(--text); }
.link-btn { background: none; border: 0; padding: 10px; color: var(--muted); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.spk { width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--red); cursor: pointer; vertical-align: middle; }
.spk .ico { width: 20px; height: 20px; }
.spk.playing { animation: wiggle 0.5s ease-in-out infinite alternate; }
.spk-big { width: 104px; height: 104px; border: 0; border-radius: 28px; background: var(--red); color: #fff; box-shadow: 0 6px 0 var(--red-d); }
.spk-big .ico { width: 48px; height: 48px; }
.spk-big:active { transform: translateY(5px); box-shadow: none; }
.spk-slow.spk { width: 64px; height: 64px; border-radius: 20px; border-bottom-width: 4px; color: var(--text); }
.spk-slow .ico { width: 30px; height: 30px; }

/* ---------- Texte allemand et articles ---------- */
.de-word { font-weight: 700; }
.art { display: inline-block; padding: 0 6px; margin-right: 1px; border-radius: 6px; font-weight: 700; }
.art-m { color: var(--m); background: var(--m-s); }
.art-f { color: var(--f); background: var(--f-s); }
.art-n { color: var(--n); background: var(--n-s); }
.art-pl { color: var(--pl); background: var(--pl-s); }
.de-inline { display: inline; border: 0; padding: 0 1px; background: none; cursor: pointer; border-bottom: 2px dotted var(--line-2); font-size: inherit; line-height: inherit; }
.de-line { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; border: 0; padding: 0; background: none; text-align: left; cursor: pointer; font-size: inherit; }
.mini-spk { display: inline-grid; color: var(--muted); }
.mini-spk .ico { width: 17px; height: 17px; }
.de-txt { font-weight: 700; }

/* ---------- Parcours ---------- */
.path { padding-top: 6px; }
.unit { position: relative; margin: 12px 0 18px; padding: 18px 18px 24px; border-radius: 22px; color: #fff; overflow: hidden; }
.unit-ink { background: var(--unit-ink); color: #fff; }
.unit-red { background: var(--red); color: #fff; }
.unit-gold { background: var(--gold); color: #16181D; }
.unit-num { font-family: var(--font-d); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.unit-title { margin: 4px 90px 2px 0; font-family: var(--font-d); font-weight: 800; font-size: 26px; line-height: 1.05; }
.unit-de { font-size: 15px; opacity: 0.85; }
.unit-course {
  position: absolute; top: 16px; right: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 10px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, 0.35);
  font-family: var(--font-d); font-weight: 800; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
}
.unit-gold .unit-course { border-color: rgba(0, 0, 0, 0.18); }
.unit-course:active { transform: scale(0.96); }
.unit-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(255, 255, 255, 0.22); }
.unit-gold .unit-prog { background: rgba(0, 0, 0, 0.12); }
.unit-prog-fill { height: 100%; background: var(--gold); transition: width 0.6s; }
.unit-red .unit-prog-fill { background: #fff; }
.unit-gold .unit-prog-fill { background: #16181D; }
.unit-locked { filter: saturate(0.4); opacity: 0.75; }

.nodes { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 10px 0 30px; }
.node-wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; transform: translateX(var(--x, 0)); }
.node-wrap.has-pop { z-index: 15; }
.node {
  --c: var(--unit-ink); --cd: var(--unit-ink-d); --ci: var(--gold);
  position: relative; width: 76px; height: 70px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: var(--c); color: var(--ci); box-shadow: 0 7px 0 var(--cd);
  transition: transform 0.1s, box-shadow 0.1s;
}
.node .ico { width: 32px; height: 32px; stroke-width: 2.6; }
.node:active { transform: translateY(6px); box-shadow: 0 1px 0 var(--cd); }
.node-red { --c: var(--red); --cd: var(--red-d); --ci: #fff; }
.node-gold { --c: var(--gold); --cd: var(--gold-d); --ci: #16181D; }
.node-done .ico { stroke-width: 3; }
.node-done.node-ink .ico, .node-done.node-red .ico { fill: none; }
.node-open { opacity: 0.92; }
.node-locked { --c: var(--soft); --cd: var(--line-2); --ci: var(--muted); }
.node-locked .ico { width: 26px; height: 26px; }
.node-test { width: 88px; height: 80px; border-radius: 28px; }
.node-test .ico { width: 38px; height: 38px; }
.node-current::before {
  content: ""; position: absolute; inset: -9px -9px -15px; border-radius: 50%;
  border: 5px solid var(--c); opacity: 0.35; animation: ring 1.8s ease-out infinite;
}
.node-test.node-current::before { border-radius: 34px; }
.node-tag {
  position: relative; margin-bottom: 12px; padding: 7px 14px; border-radius: 12px;
  background: var(--card); border: 2px solid var(--line);
  font-family: var(--font-d); font-weight: 800; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red);
  animation: bob 1.6s ease-in-out infinite;
}
.node-tag::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg);
  background: var(--card); border-right: 2px solid var(--line); border-bottom: 2px solid var(--line);
}
.node-pop {
  position: absolute; top: calc(100% + 16px); left: 50%; z-index: 12;
  width: min(290px, calc(100vw - 32px)); padding: 16px; border-radius: 20px;
  background: var(--unit-ink); color: #fff;
  opacity: 0; transform: translateX(calc(-50% - var(--x, 0px))) translateY(-6px) scale(0.97);
  transition: opacity 0.18s, transform 0.18s;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}
.node-pop.show { opacity: 1; transform: translateX(calc(-50% - var(--x, 0px))); }
.pop-red { background: var(--red); }
.pop-gold { background: var(--gold); color: #16181D; }
.pop-off { background: var(--card); color: var(--text); border: 2px solid var(--line); }
.pop-title { font-family: var(--font-d); font-weight: 800; font-size: 21px; }
.pop-desc { margin: 2px 0 12px; font-size: 15px; opacity: 0.85; }
.node-pop .btn { background: #fff; color: #16181D; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); border: 0; }
.pop-gold .btn { background: #16181D; color: #fff; box-shadow: 0 4px 0 #000; }
.pop-locked { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 15px; }

.soon { margin: 6px 0 10px; padding: 16px; border-radius: 20px; border: 2px dashed var(--line-2); }
.soon-head { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.soon-head > div { display: flex; flex-direction: column; }
.soon-head strong { color: var(--text); font-family: var(--font-d); font-size: 20px; }
.soon-head span { font-size: 14.5px; }
.soon-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; }
.soon-list li { display: grid; grid-template-columns: 30px 1fr; column-gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); color: var(--muted); }
.soon-num { grid-row: span 2; font-family: var(--font-d); font-weight: 800; font-size: 18px; color: var(--line-2); }
.soon-title { color: var(--text); font-weight: 600; font-size: 15.5px; }
.soon-de { font-size: 13.5px; }
.path-end { text-align: center; font-family: var(--font-d); font-weight: 800; font-size: 20px; margin: 22px 0 6px; }
.path-end span { font-family: var(--font); font-weight: 400; font-size: 15px; color: var(--muted); }

/* ---------- Session (leçon, test…) ---------- */
.session { --gut: max(16px, calc((100% - 680px) / 2)); position: fixed; top: 0; left: 0; right: 0; bottom: var(--kb, 0px); z-index: 40; display: flex; flex-direction: column; background: var(--bg); }
.ses-top { display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--safe-t)) var(--gut) 8px; }
.pbar { flex: 1; height: 16px; border-radius: 9px; background: var(--soft); overflow: hidden; }
.pbar-fill { position: relative; width: 0; height: 100%; border-radius: 9px; background: var(--gold); transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.pbar-fill::after { content: ""; position: absolute; left: 8px; right: 8px; top: 4px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.45); }
.combo { min-width: 0; font-family: var(--font-d); font-weight: 800; font-size: 14px; color: var(--orange); white-space: nowrap; opacity: 0; transition: opacity 0.2s; }
.combo.on { opacity: 1; }
.ses-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px var(--gut, 16px) 28px; }
.ses-foot { position: relative; z-index: 3; display: flex; gap: 10px; padding: 12px var(--gut, 16px) calc(12px + var(--safe-b)); border-top: 2px solid var(--line); background: var(--bg); transition: background 0.2s; }
.ses-foot[data-fb] { border-color: transparent; }
.ses-foot[data-fb="good"] { background: var(--green-s); }
.ses-foot[data-fb="bad"] { background: var(--bad-s); }
.ses-foot[data-fb="near"] { background: var(--near-s); }
.ses-foot[data-fb="neutral"] { background: var(--soft); }
.btn-main { flex: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; max-height: 70%; overflow-y: auto;
  padding: 18px var(--gut, 18px) calc(88px + var(--safe-b));
  transform: translateY(100%); transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet.show { transform: translateY(0); }
.sheet.good { background: var(--green-s); color: var(--green-t); }
.sheet.bad { background: var(--bad-s); color: var(--bad-t); }
.sheet.near { background: var(--near-s); color: var(--near-t); }
.sheet.neutral { background: var(--soft); color: var(--text); }
.sheet-in { display: flex; flex-direction: column; gap: 8px; }
.fb-title { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-family: var(--font-d); font-weight: 800; font-size: 25px; }
.fb-title .ico { width: 30px; height: 30px; }
.fb-sub { font-family: var(--font); font-weight: 600; font-size: 15px; opacity: 0.85; }
.fb-label { font-weight: 700; font-size: 15px; }
.fb-answer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--text); font-size: 19px; }
.fb-note, .fb-meaning, .fb-heard { color: var(--text); font-size: 15.5px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.fb-ex { display: flex; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--fb-box); color: var(--text); font-size: 15.5px; }
.fb-ex .ico { width: 20px; height: 20px; color: var(--gold-d); margin-top: 1px; }

/* ---------- Exercices ---------- */
.ex { display: flex; flex-direction: column; gap: 16px; }
.ex.enter { animation: slidein 0.28s ease both; }
.ex-label { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-family: var(--font-d); font-weight: 800; font-size: 24px; line-height: 1.1; }
.ex-label .ico { width: 24px; height: 24px; color: var(--red); }
.ex-q { font-size: 20px; font-weight: 600; line-height: 1.4; }
.ex-sub { color: var(--muted); text-align: center; font-weight: 600; }
.ex-fr { color: var(--muted); font-size: 16px; }
.ex-fr-big { position: relative; padding: 14px 16px 14px 52px; border: 2px solid var(--line); border-radius: 18px; background: var(--card); font-size: 20px; font-weight: 700; }
.ex-fr-big::before { content: "FR"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font: 800 12px/1 var(--font-d); letter-spacing: 0.08em; color: var(--muted); background: var(--soft); padding: 5px 5px; border-radius: 6px; }

.opts { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 12px 14px; text-align: left; cursor: pointer;
  border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; background: var(--card); font-size: 18px;
  transition: background 0.15s, border-color 0.15s, transform 0.08s;
}
.opt:active:not(:disabled) { transform: translateY(2px); }
.opt-num { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 8px; color: var(--muted); font: 800 14px var(--font-d); }
.opt.sel { border-color: var(--gold-d); background: var(--gold-s); }
.opt.sel .opt-num { border-color: var(--gold-d); color: var(--gold-t); }
.opt.right { border-color: var(--green); background: var(--green-s); }
.opt.wrong { border-color: var(--bad); background: var(--bad-s); animation: shake 0.3s; }
.opt:disabled { cursor: default; color: var(--text); }
.opts-grid { display: grid; grid-template-columns: 1fr 1fr; }
.opts-grid .opt { justify-content: center; min-height: 100px; font-family: var(--font-d); font-weight: 800; font-size: 42px; }

.audio-bar { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 14px 0 4px; }

.gap-sent { font-size: 23px; font-weight: 600; line-height: 2.2; text-align: center; padding: 10px 0; }
.blank { display: inline-block; min-width: 96px; margin: 0 4px; padding: 0 12px; line-height: 1.6; border: 0; border-bottom: 3px solid var(--line-2); border-radius: 10px 10px 0 0; background: var(--soft); color: var(--text); font-weight: 700; cursor: pointer; vertical-align: baseline; }
.blank.filled { background: var(--gold-s); border-color: var(--gold-d); }
.blank.right { background: var(--green-s); border-color: var(--green); }
.blank.wrong { background: var(--red-s); border-color: var(--red); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip, .tile {
  padding: 10px 16px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 14px; background: var(--card);
  font-size: 19px; font-weight: 600; cursor: pointer; transition: opacity 0.15s, transform 0.08s;
}
.chip:active, .tile:active { transform: translateY(2px); }
.chip.used { opacity: 0.35; }

.build-line { min-height: 118px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; padding: 6px 0;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 54px, var(--line) 54px, var(--line) 56px); }
.build-line .tile { animation: pop 0.18s ease; }
.build-line.right .tile { border-color: var(--green); }
.build-line.wrong .tile { border-color: var(--red); }
.build-bank { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-top: 4px; }
.tile.ghost { background: var(--soft); border-color: var(--soft); color: transparent; pointer-events: none; }

.answer { width: 100%; min-height: 108px; resize: none; padding: 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); font-size: 19px; line-height: 1.4; }
.answer:focus { outline: none; border-color: var(--gold-d); }
.answer.right { border-color: var(--green); background: var(--green-s); }
.answer.wrong { border-color: var(--red); background: var(--red-s); }
.special-keys { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.key { min-width: 0; height: 46px; padding: 0; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 12px; background: var(--card); font-size: 20px; font-weight: 700; cursor: pointer; }
.special-keys.compact { display: flex; gap: 8px; }
.key:active { transform: translateY(2px); }
.special-keys.compact .key { min-width: 44px; height: 44px; font-size: 18px; }

.pairs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 6px; }
.pairs-col { display: flex; flex-direction: column; gap: 10px; }
.pair { min-height: 62px; padding: 8px 10px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 14px; background: var(--card); font-size: 17px; font-weight: 600; text-align: center; cursor: pointer; transition: all 0.15s; }
.pair.sel { border-color: var(--gold-d); background: var(--gold-s); }
.pair.done { border-color: var(--green); background: var(--green-s); opacity: 0.45; transform: scale(0.97); cursor: default; }
.pair.err { border-color: var(--red); background: var(--red-s); animation: shake 0.35s; }

.art-card { padding: 26px 16px; border: 2px solid var(--line); border-radius: 20px; background: var(--card); text-align: center; }
.art-word { font-size: 36px; font-weight: 700; }
.art-word .art { font-size: 36px; }
.art-slot { color: var(--muted); }
.art-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.art-btn { min-height: 76px; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 18px; background: var(--card); font-family: var(--font-d); font-weight: 800; font-size: 28px; cursor: pointer; }
.art-btn-m { color: var(--m); }
.art-btn-f { color: var(--f); }
.art-btn-n { color: var(--n); }
.art-btn-m.sel { background: var(--m-s); border-color: var(--m); }
.art-btn-f.sel { background: var(--f-s); border-color: var(--f); }
.art-btn-n.sel { background: var(--n-s); border-color: var(--n); }
.art-btn.right { background: var(--green-s); border-color: var(--green); }
.art-btn.wrong { background: var(--red-s); border-color: var(--red); animation: shake 0.35s; }

.speak-card { padding: 18px; border: 2px solid var(--line); border-radius: 20px; background: var(--card); display: flex; flex-direction: column; gap: 8px; }
.speak-de { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 25px; font-weight: 700; line-height: 1.25; }
.speak-de .spk-slow.spk { width: 38px; height: 38px; border-radius: 12px; border-bottom-width: 2px; }
.speak-de .spk-slow .ico { width: 20px; height: 20px; }
.mic-zone { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0 0; }
.mic { width: 104px; height: 104px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; box-shadow: 0 6px 0 var(--red-d); cursor: pointer; }
.mic .ico { width: 46px; height: 46px; }
.mic:active { transform: translateY(5px); box-shadow: none; }
.mic.busy { animation: micpulse 1.2s ease-out infinite; }
.mic.rec { background: var(--unit-ink); box-shadow: 0 6px 0 var(--unit-ink-d); }
.mic:disabled { opacity: 0.4; }
.mic-label { font-family: var(--font-d); font-weight: 700; font-size: 16px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.speak-status { text-align: center; font-weight: 600; min-height: 1.4em; }
.speak-heard:empty { display: none; }
.speak-heard { padding: 12px 14px; border-radius: 14px; background: var(--soft); }
.heard-label { font-size: 13px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.heard-txt { font-size: 18px; margin-bottom: 4px; }
.heard-words { display: flex; flex-wrap: wrap; gap: 6px; font-weight: 700; }
.hw.ok { color: var(--green); }
.hw.no { color: var(--red); text-decoration: underline wavy; text-underline-offset: 4px; }
.self-row:empty { display: none; }
.self-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.self-q { width: 100%; text-align: center; font-weight: 700; margin-top: 4px; }
.ex-speak .link-btn { align-self: center; }

/* ---------- Fin de session ---------- */
.end-body { display: flex; flex-direction: column; justify-content: center; }
.end { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 20px 0; }
.end-mark img { width: 112px; height: 112px; animation: pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.end-title { margin: 10px 0 0; font-family: var(--font-d); font-weight: 800; font-size: 34px; line-height: 1.05; }
.end-sub { margin: 0; color: var(--muted); max-width: 340px; }
.end-extra { margin: 0; font-weight: 700; color: var(--gold-d); }
.end-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin-top: 14px; }
.stat { border-radius: 16px; border: 2px solid var(--sc); overflow: hidden; background: var(--card); }
.stat-label { background: var(--sc); color: #fff; font: 800 12.5px/1 var(--font-d); letter-spacing: 0.08em; text-transform: uppercase; padding: 7px 4px; }
.stat-val { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 4px; font-family: var(--font-d); font-weight: 800; font-size: 21px; color: var(--sc); }
.stat-val .ico { width: 20px; height: 20px; }
.stat-gold { --sc: var(--gold-d); }
.stat-green { --sc: var(--green); }
.stat-red { --sc: var(--red); }
.stat-ink { --sc: var(--muted); }
.end-streak { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 16px; background: var(--gold-s); text-align: left; }
.end-streak .ico { width: 34px; height: 34px; color: var(--orange); fill: var(--orange); fill-opacity: 0.25; }
.end-streak div { display: flex; flex-direction: column; }
.end-streak span { font-size: 14.5px; color: var(--muted); }
.end-goal { width: 100%; display: flex; flex-direction: column; gap: 6px; margin-top: 6px; font-size: 14.5px; color: var(--muted); }
.goal-bar { height: 10px; border-radius: 6px; background: var(--soft); overflow: hidden; }
.goal-fill { height: 100%; border-radius: 6px; background: var(--green); transition: width 0.8s; }

/* ---------- Cours ---------- */
.course-hero { margin: 8px 0 10px; padding: 20px 18px; border-radius: 22px; }
.course-title { margin: 6px 0 2px; font-family: var(--font-d); font-weight: 800; font-size: 32px; line-height: 1.02; }
.course-help { display: flex; align-items: center; gap: 8px; margin: 6px 2px 4px; color: var(--muted); font-size: 14.5px; }
.course-help .ico { width: 18px; height: 18px; color: var(--red); }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; margin: 28px 0 10px; }
.sec-head h2 { margin: 0; font-family: var(--font-d); font-weight: 800; font-size: 25px; line-height: 1.1; }
.sec-head .de-sub { flex-basis: 100%; }
.de-sub { color: var(--muted); font-size: 15px; font-weight: 400; font-family: var(--font); }
.badge-plus { display: inline-block; padding: 3px 8px; border-radius: 99px; background: var(--gold-s); color: var(--gold-t); font: 800 11.5px/1.2 var(--font-d); letter-spacing: 0.06em; text-transform: uppercase; vertical-align: middle; }
.badge-plus.sm { margin-left: 6px; padding: 2px 6px; font-size: 10.5px; }

.callout { margin: 12px 0; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); }
.callout p { margin: 6px 0 0; }
.callout-title { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-d); font-weight: 800; font-size: 17px; text-transform: uppercase; letter-spacing: 0.05em; }
.callout-title .ico { width: 20px; height: 20px; align-self: center; }
.callout-title .de-sub { text-transform: none; letter-spacing: 0; font-size: 14px; }
.callout-key { background: var(--unit-ink); border-color: var(--unit-ink); color: #fff; }
.callout-key .ico { color: var(--gold); }
.callout-key .de-sub { color: rgba(255, 255, 255, 0.65); }
.callout-key .de-inline { border-color: rgba(255, 255, 255, 0.4); }
.callout-warn { background: var(--gold-s); border-color: var(--gold); }
.callout-warn .ico { color: var(--gold-d); }
.callout-tip .ico { color: var(--gold-d); }
.callout-plus { background: var(--soft); border-color: var(--soft); }
.callout-plus .ico { color: var(--muted); }

.letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.letter { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 14px; background: var(--card); cursor: pointer; }
.letter:active { transform: translateY(2px); }
.letter-big { font-family: var(--font-d); font-weight: 800; font-size: 27px; line-height: 1; }
.letter-hint { font-size: 12.5px; color: var(--muted); }
.special { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.special-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); }
.special-letter { border: 0; padding: 0; background: none; font-family: var(--font-d); font-weight: 800; font-size: 34px; line-height: 1; color: var(--red); cursor: pointer; }
.special-hint { font-weight: 600; font-size: 15px; }
.special-ex { display: flex; flex-direction: column; align-items: flex-start; border: 0; padding: 0; background: none; text-align: left; cursor: pointer; }
.special-ex .fr, .sound-ex .fr { color: var(--muted); font-size: 14px; }

.sounds { display: flex; flex-direction: column; gap: 8px; }
.sound-row { display: grid; grid-template-columns: 74px 1fr; grid-template-areas: "k say" "k ex"; gap: 2px 12px; align-items: center; width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); text-align: left; cursor: pointer; }
.sound-row:active { background: var(--soft); }
.sound-k { grid-area: k; display: flex; flex-direction: column; }
.sound-k strong { font-family: var(--font-d); font-weight: 800; font-size: 24px; color: var(--red); line-height: 1.05; }
.sound-k small { font-size: 12px; color: var(--muted); line-height: 1.2; }
.sound-say { grid-area: say; font-weight: 700; }
.sound-ex { grid-area: ex; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.sound-ex .hint { font-size: 14px; color: var(--muted); font-style: italic; }

.phrases { display: flex; flex-direction: column; gap: 8px; }
.phrase { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); text-align: left; cursor: pointer; }
.phrase:active { background: var(--soft); }
.phrase-de { font-weight: 700; font-size: 18px; }
.phrase-fr { color: var(--muted); font-size: 15px; }

.bullets { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }

.steck { border: 2px solid var(--line); border-radius: 20px; background: var(--card); overflow: hidden; }
.steck-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--soft); }
.steck-avatar { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--red); color: #fff; font: 800 24px var(--font-d); }
.steck-title { font-family: var(--font-d); font-weight: 800; font-size: 20px; }
.steck-sub { font-size: 14px; color: var(--muted); }
.steck-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); }
.steck-k { display: flex; flex-direction: column; }
.steck-k span { font-weight: 700; }
.steck-k small { color: var(--muted); font-size: 13px; }
.steck-v { min-height: 44px; border: 0; background: none; padding: 0; font-weight: 600; text-align: right; cursor: pointer; }

.textblock { margin-top: 12px; padding: 14px 16px; border-radius: 18px; border-left: 5px solid var(--gold); background: var(--card); }
.text-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.text-de { margin: 10px 0 0; font-size: 18.5px; line-height: 1.7; }
.sent { display: inline; padding: 1px 3px; border: 0; border-radius: 6px; background: none; text-align: left; cursor: pointer; font-weight: 600; }
.sent:active, .sent:hover { background: var(--gold-s); }
.text-fr { margin: 8px 0 0; color: var(--muted); }

.rows { display: flex; flex-direction: column; gap: 8px; }
.row-card { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); }
.cell-label { font: 800 11.5px/1.4 var(--font-d); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.cell-txt { font-size: 15.5px; }
.cell-de .de-line { font-size: 17px; }

.verb { border: 2px solid var(--line); border-radius: 18px; background: var(--card); overflow: hidden; }
.verb-title { padding: 10px 16px; background: var(--soft); font-family: var(--font-d); font-weight: 800; font-size: 18px; }
.verb-row { display: grid; grid-template-columns: 1fr 1fr; width: 100%; padding: 10px 16px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; }
.verb-row:active { background: var(--gold-s); }
.verb-p { color: var(--muted); }
.verb-f { font-weight: 800; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare-card { padding: 14px; border: 2px solid var(--line); border-radius: 18px; background: var(--card); display: flex; flex-direction: column; gap: 4px; }
.compare-title { font-family: var(--font-d); font-weight: 800; font-size: 30px; line-height: 1; color: var(--red); }
.compare-sub { font-weight: 700; font-size: 14.5px; }
.compare-card ul { margin: 4px 0 8px; padding-left: 18px; font-size: 14.5px; color: var(--muted); }
.compare-fr { font-size: 13.5px; color: var(--muted); }

.nouns { display: flex; flex-direction: column; gap: 8px; }
.noun-card { padding: 12px 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); }
.noun-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.noun-w { border: 0; padding: 0; background: none; font-size: 19px; cursor: pointer; }
.noun-fr { color: var(--muted); font-size: 14.5px; }
.noun-arrow { color: var(--muted); }
.noun-pro { font-family: var(--font-d); font-weight: 800; font-size: 22px; color: var(--red); }
.noun-ex { display: block; margin-top: 6px; border: 0; padding: 0; background: none; text-align: left; font-weight: 600; cursor: pointer; }
.noun-exfr { font-size: 14.5px; color: var(--muted); }
.course-end { margin: 28px 0 10px; }

/* ---------- Cartes communes ---------- */
.page-title { margin: 8px 0 4px; font-family: var(--font-d); font-weight: 800; font-size: 32px; }
.sec-title { margin: 26px 0 8px; font-family: var(--font-d); font-weight: 800; font-size: 21px; }
.card { display: block; margin: 12px 0; padding: 16px; border: 2px solid var(--line); border-radius: 20px; background: var(--card); text-decoration: none; }
.card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-family: var(--font-d); font-weight: 800; font-size: 19px; }
.card-title .ico { width: 20px; height: 20px; color: var(--muted); }
.card-sub { margin-top: 10px; color: var(--muted); font-size: 14.5px; }
.big-card { display: flex; align-items: center; gap: 14px; }
.big-card-ico { width: 54px; height: 54px; flex: none; display: grid; place-items: center; border-radius: 16px; background: var(--red-s); color: var(--red); }
.big-card-ico .ico { width: 28px; height: 28px; }
.ico-gold { background: var(--gold-s); color: var(--gold-d); }
.big-card-body { flex: 1; min-width: 0; }
.big-card-title { font-family: var(--font-d); font-weight: 800; font-size: 20px; }
.big-card-text { color: var(--muted); font-size: 15px; }
.big-card .btn { flex: none; }
.card-red { border-color: var(--red-s); }

.vocab-chap { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vocab-chap-title { font-weight: 700; }
.vocab-chap-btns { display: flex; flex-direction: column; gap: 8px; }
.search { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; padding: 0 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--muted); }
.search input { flex: 1; min-width: 0; height: 48px; border: 0; background: none; outline: none; font-size: 17px; color: var(--text); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 10px; font-size: 13.5px; color: var(--muted); }
.vocab-words { display: flex; flex-direction: column; gap: 6px; }
.word-row { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); text-align: left; cursor: pointer; }
.word-row:active { background: var(--soft); }
.word-de { font-size: 17.5px; }
.word-fr { color: var(--muted); font-size: 15px; }

.cards-main { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 24px; }
.flash-count { font-family: var(--font-d); font-weight: 800; color: var(--muted); }
.flash { width: 100%; min-height: 270px; display: grid; place-items: center; padding: 24px; border: 2px solid var(--line); border-bottom-width: 6px; border-radius: 26px; background: var(--card); cursor: pointer; }
.flash.flipped { background: var(--gold-s); border-color: var(--gold); }
.flash-face { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; animation: flip 0.3s ease; }
.flash-de { font-size: 34px; }
.flash-hint { font-size: 14px; color: var(--muted); }
.flash-fr { font-family: var(--font-d); font-weight: 800; font-size: 34px; }
.flash-small { font-size: 18px; }
.flash-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }

.mic-info { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--soft); font-size: 14.5px; color: var(--muted); }
.mic-info .ico { width: 20px; height: 20px; color: var(--red); }
.talk-card, .pron-card { display: flex; align-items: center; gap: 12px; margin: 10px 0; color: var(--text); }
.talk-card > .ico, .pron-card > .ico { color: var(--muted); }
.talk-avatar { width: 50px; height: 50px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: #16181D; font: 800 22px var(--font-d); }
.talk-body { flex: 1; min-width: 0; }
.talk-title { font-weight: 700; font-size: 17.5px; }
.talk-done { display: flex; align-items: center; gap: 2px; color: var(--green); font-weight: 700; font-size: 14px; }
.talk-done .ico { width: 16px; height: 16px; }
.pron-num { width: 50px; height: 50px; flex: none; display: grid; place-items: center; border-radius: 14px; font: 800 22px var(--font-d); }
.claude-card p { margin: 0 0 10px; }
.prompt-box { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--soft); font-family: var(--font); font-size: 14.5px; white-space: pre-wrap; }
.claude-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- Conversation ---------- */
.talk-sub { width: 44px; font-size: 0; }
.chat-main { flex: 1; padding-bottom: 20px; }
.chat { display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 92%; animation: slidein 0.25s ease both; }
.msg-avatar { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: #16181D; font: 800 17px var(--font-d); }
.bubble { padding: 12px 14px; border-radius: 18px; background: var(--card); border: 2px solid var(--line); }
.msg-bot .bubble { border-bottom-left-radius: 6px; }
.bubble-de { font-size: 19px; font-weight: 700; }
.bubble-fr { color: var(--muted); font-size: 15px; margin-top: 2px; }
.bubble-tools { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.bubble-tools .spk { width: 44px; height: 44px; }
.bubble-tools .spk-slow.spk { width: 44px; height: 44px; border-radius: 12px; border-bottom-width: 2px; }
.bubble-tools .spk-slow .ico { width: 18px; height: 18px; }
.bubble-tools .link-btn { padding: 4px 6px; font-size: 14px; }
.msg-me { align-self: flex-end; }
.msg-me .bubble { background: var(--unit-ink); border-color: var(--unit-ink); color: #fff; border-bottom-right-radius: 6px; font-size: 18px; }
.msg-note { align-self: stretch; padding: 10px 14px; border-radius: 14px; font-size: 15.5px; display: flex; flex-direction: column; gap: 6px; animation: slidein 0.25s ease both; }
.msg-note > div:first-child { display: flex; align-items: center; gap: 6px; }
.msg-note .ico { width: 20px; height: 20px; }
.msg-note.ok { background: var(--green-s); color: var(--green-t); }
.msg-note.bad { background: var(--gold-s); color: var(--text); }
.msg-note .de-line { font-size: 17px; }
.note-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.composer { position: sticky; bottom: 0; padding: 10px 12px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.composer-row { display: flex; align-items: center; gap: 8px; }
.talk-input { flex: 1; min-width: 0; height: 50px; padding: 0 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); font-size: 17px; }
.talk-input:focus { outline: none; border-color: var(--gold-d); }
.send-btn { background: var(--btn-ink-bg); color: var(--btn-ink-fg); }
.mic-small { background: var(--red); color: #fff; border-radius: 50%; }
.mic-small.busy { animation: micpulse 1.2s ease-out infinite; }
.talk-end { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; padding: 6px 0; }

/* ---------- Profil ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; margin: 10px 0 6px; }
.avatar { width: 64px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 20px; background: var(--red); color: #fff; font: 800 30px var(--font-d); }
.name-input { width: 100%; max-width: 240px; padding: 2px 6px; margin-left: -6px; border: 2px solid transparent; border-radius: 10px; background: none; font-family: var(--font-d); font-weight: 800; font-size: 28px; }
.name-input:focus { outline: none; border-color: var(--line); background: var(--card); }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.bstat { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "i v" "i l"; column-gap: 10px; align-items: center; padding: 12px 14px; border: 2px solid var(--line); border-radius: 18px; background: var(--card); }
.bstat .ico { grid-area: i; width: 30px; height: 30px; }
.bstat-val { grid-area: v; font-family: var(--font-d); font-weight: 800; font-size: 24px; line-height: 1.1; }
.bstat-label { grid-area: l; font-size: 13.5px; color: var(--muted); }
.bstat-orange .ico { color: var(--orange); fill: var(--orange); fill-opacity: 0.2; }
.bstat-gold .ico { color: var(--gold-d); fill: var(--gold); }
.bstat-ink .ico { color: var(--text); }
.bstat-red .ico { color: var(--red); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 140px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.day-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.day-bar { width: 70%; max-width: 32px; border-radius: 8px 8px 4px 4px; background: var(--line-2); transition: height 0.6s; }
.day-bar.hit { background: var(--gold); }
.day.today .day-bar { outline: 2px solid var(--text); outline-offset: 1px; }
.day-xp { font-size: 12px; color: var(--muted); min-height: 1.2em; }
.day-name { font-family: var(--font-d); font-weight: 800; font-size: 13px; text-transform: uppercase; color: var(--muted); }
.day.today .day-name { color: var(--text); }
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 14px; background: var(--soft); }
.seg-btn { flex: 1; min-height: 44px; padding: 0 8px; border: 0; border-radius: 10px; background: none; font-family: var(--font-d); font-weight: 800; font-size: 15px; letter-spacing: 0.03em; color: var(--muted); cursor: pointer; }
.seg-btn.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.prog-row { margin: 10px 0; }
.prog-label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; font-size: 15px; font-weight: 600; }
.prog-bar { height: 10px; border-radius: 6px; background: var(--soft); overflow: hidden; }
.prog-fill { height: 100%; border-radius: 6px; }
.account-mail { font-weight: 700; word-break: break-all; }
.sync-line { margin: 4px 0 12px; font-size: 14.5px; color: var(--muted); }
.sync-ok { color: var(--green); }
.sync-error { color: var(--red); }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.set-row { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
.set-label { font-weight: 700; font-size: 15.5px; }
.select { width: 100%; height: 48px; padding: 0 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); font-size: 16px; }
.test-voice { margin-top: -4px; }
.warn-line { display: flex; gap: 8px; font-size: 14px; color: var(--gold-t); }
.warn-line .ico { width: 18px; height: 18px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.toggle-text > div:first-child { font-weight: 700; }
.switch { position: relative; flex: none; width: 52px; height: 32px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-ui { position: absolute; inset: 0; border-radius: 16px; background: var(--line-2); transition: background 0.2s; pointer-events: none; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s; }
.switch input:checked + .switch-ui { background: var(--green); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--gold); outline-offset: 2px; }
.install-card .card-title .ico { color: var(--red); }
.install-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.install-steps .ico { width: 18px; height: 18px; vertical-align: -3px; color: var(--m); }
.version { text-align: center; color: var(--muted); font-size: 13.5px; margin: 20px 0 0; }

/* ---------- Connexion ---------- */
.welcome-main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: calc(24px + var(--safe-t)) 20px calc(24px + var(--safe-b)); }
.welcome-hero { display: flex; flex-direction: column; align-items: center; text-align: center; }
.welcome-logo { width: 96px; height: 96px; animation: pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.welcome-hero h1 { margin: 14px 0 0; font-family: var(--font-d); font-weight: 800; font-size: 46px; line-height: 1; }
.welcome-hero p { margin: 6px 0 0; color: var(--muted); }
.auth-form { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 2px solid var(--line); border-radius: 22px; background: var(--card); }
.field-label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 15px; }
.field { height: 52px; padding: 0 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--bg); font-size: 17px; font-weight: 400; }
.field:focus { outline: none; border-color: var(--gold-d); }
.form-error:empty, .form-info:empty { display: none; }
.form-error { padding: 10px 12px; border-radius: 12px; background: var(--red-s); color: var(--red-t); font-size: 15px; font-weight: 600; }
.form-info { display: flex; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--green-s); color: var(--green-t); font-size: 15px; font-weight: 600; }
.form-info .ico { width: 20px; height: 20px; }
.skip-auth { align-self: center; }
.welcome-note { margin: 0; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- Messages et fenêtres ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); z-index: 90;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px;
  background: var(--btn-ink-bg); color: var(--btn-ink-fg); font-weight: 600; font-size: 15px;
  opacity: 0; transform: translate(-50%, 12px); transition: opacity 0.2s, transform 0.2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.good { background: var(--green); color: #fff; }
.modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(10, 12, 16, 0.45); opacity: 0; transition: opacity 0.2s; }
.modal-wrap.show { opacity: 1; }
.modal { width: 100%; max-width: 380px; padding: 20px; border-radius: 22px; background: var(--card); transform: scale(0.96); transition: transform 0.2s; }
.modal-wrap.show .modal { transform: scale(1); }
.modal h3 { margin: 0; font-family: var(--font-d); font-weight: 800; font-size: 24px; }
.modal p { margin: 8px 0 0; color: var(--muted); }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 100; pointer-events: none; }

/* ---------- Animations ---------- */
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes slidein { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes ring { 0% { transform: scale(0.92); opacity: 0.5; } 100% { transform: scale(1.12); opacity: 0; } }
@keyframes micpulse { 0% { box-shadow: 0 0 0 0 rgba(217, 30, 18, 0.45); } 100% { box-shadow: 0 0 0 22px rgba(217, 30, 18, 0); } }
@keyframes wiggle { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes flip { from { opacity: 0; transform: rotateX(70deg); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Petits écrans */
@media (max-width: 360px) {
  .unit-title { font-size: 23px; }
  .opts-grid .opt { font-size: 34px; min-height: 84px; }
  .end-stats { gap: 6px; }
  .stat-val { font-size: 18px; }
}

/* =========================================================
   Ajouts : cartes du jour, badges, points faibles, bandeaux
   ========================================================= */

/* Numéro du chapitre en filigrane */
.unit::after {
  content: attr(data-num); position: absolute; right: 12px; bottom: -14px;
  font: 800 92px/1 var(--font-d); letter-spacing: -0.02em; opacity: 0.09; pointer-events: none;
}
.unit-gold::after { opacity: 0.12; }
.node-anim { display: flex; flex-direction: column; align-items: center; }

.learn-top { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.today { padding: 16px; border: 2px solid var(--line); border-radius: 22px; background: var(--card); display: flex; flex-direction: column; gap: 12px; }
.today-top { display: flex; align-items: center; gap: 14px; }
.today-ring { position: relative; width: 58px; height: 58px; flex: none; display: grid; place-items: center; color: var(--green); }
.today-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.today-ring .ring-bg, .today-ring .ring-fg { stroke-width: 6; }
.today-ring .ico { width: 24px; height: 24px; }
.today-text { flex: 1; min-width: 0; }
.today-label { font: 800 13px/1.2 var(--font-d); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.today-goal { font: 800 26px/1.1 var(--font-d); }
.today-hint { font-size: 14.5px; color: var(--muted); }
.today-next { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 14px; background: var(--soft); }
.today-next span { font: 800 12px/1.3 var(--font-d); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.today-next strong { font-size: 16.5px; }
.today-review { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; color: var(--red); font-weight: 700; text-decoration: none; }
.today-review span { flex: 1; }
.today-review .ico { width: 20px; height: 20px; }

.word-card { position: relative; padding: 14px 16px; border-radius: 22px; background: var(--gold-s); border: 2px solid transparent; overflow: hidden; }
.word-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(var(--ink) 0 33.3%, var(--red) 33.3% 66.6%, var(--gold) 66.6%); }
:root[data-theme="dark"] .word-card::before { background: linear-gradient(#5b6170 0 33.3%, var(--red) 33.3% 66.6%, var(--gold) 66.6%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .word-card::before { background: linear-gradient(#5b6170 0 33.3%, var(--red) 33.3% 66.6%, var(--gold) 66.6%); } }
.word-card-label { display: flex; align-items: center; gap: 6px; font: 800 13px/1 var(--font-d); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-t); }
.word-card-label .ico { width: 16px; height: 16px; }
.word-card-label .de-sub { text-transform: none; letter-spacing: 0; font-size: 13px; }
.word-card-main { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.word-card-de { font-size: 26px; }
.word-card-fr { color: var(--muted); }

.install-banner { display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 12px; border-radius: 18px; background: var(--unit-ink); color: #fff; }
.install-banner img { width: 44px; height: 44px; border-radius: 11px; }
.install-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.install-text strong { font-family: var(--font-d); font-size: 17px; }
.install-text .ico { width: 15px; height: 15px; vertical-align: -2px; }
.install-banner .icon-btn { color: rgba(255, 255, 255, 0.7); }
.install-banner .btn { background: #fff; color: #16181D; box-shadow: none; }

/* Badges */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; text-align: center; border-radius: 16px; opacity: 0.55; }
.badge.on { opacity: 1; }
.badge-ico { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--soft); color: var(--muted); border: 3px solid var(--line); }
.badge-ico .ico { width: 24px; height: 24px; }
.badge-ico.on { background: var(--gold); color: #16181D; border-color: var(--gold-d); box-shadow: 0 3px 0 var(--gold-d); }
.badge-title { font: 800 14.5px/1.15 var(--font-d); }
.badge-desc { font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.end-badge { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border-radius: 16px; background: var(--card); border: 2px solid var(--gold); text-align: left; animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) 0.3s both; }
.end-badge .badge-ico { width: 46px; height: 46px; flex: none; }
.end-badge div:last-child { display: flex; flex-direction: column; }
.end-badge span { font-size: 14px; color: var(--muted); }

/* Points faibles */
.weak-list { padding: 4px 16px; }
.weak-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.weak-row:first-child { border-top: 0; }
.weak-main { flex: 1; min-width: 0; }
.weak-main .de-line { font-size: 17px; min-height: 44px; }
.weak-fr { font-size: 14px; color: var(--muted); }
.weak-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.weak-count { font-size: 12.5px; font-weight: 700; color: var(--red); }
.weak-dots { display: flex; gap: 3px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.dot.on { background: var(--green); }
.vocab-all { display: flex; align-items: center; justify-content: space-between; color: var(--text); background: var(--unit-ink); border-color: var(--unit-ink); }
.vocab-all, .vocab-all .muted { color: #fff; }
.vocab-all .muted { opacity: 0.7; }
.vocab-all .unit-num { color: var(--gold); opacity: 1; }
.word-ch { font: 800 12px var(--font-d); color: var(--muted); padding: 2px 6px; border-radius: 6px; background: var(--soft); }
.empty { text-align: center; padding: 20px 0; }

/* Rappel */
.card-p { margin: 0 0 12px; }
.reminder-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.time-input { height: 44px; padding: 0 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); font-size: 17px; font-weight: 700; }

.bstat-green .ico { color: var(--green); }

/* Bandeaux hors ligne / mise à jour */
.net-banner, .update-banner {
  position: fixed; left: 50%; z-index: 95; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 24px);
  padding: 8px 14px; border-radius: 14px; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); animation: slidedown 0.3s ease both;
}
.net-banner { top: calc(8px + var(--safe-t)); background: var(--unit-ink); color: #fff; }
.net-banner .ico { width: 18px; height: 18px; color: var(--gold); }
.update-banner { bottom: calc(96px + var(--safe-b)); background: var(--card); color: var(--text); border: 2px solid var(--line); }
.update-banner .ico { width: 18px; height: 18px; color: var(--gold-d); }

@keyframes screenin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes slidedown { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* =========================================================
   Tablette (600 px et plus)
   ========================================================= */
@media (min-width: 600px) {
  .shell { max-width: 760px; }
  .content { padding-left: 28px; padding-right: 28px; }
  .topbar { padding-left: 28px; padding-right: 28px; }
  .tabbar { max-width: 760px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 18px 18px 0 0; }
  .learn-top { display: grid; grid-template-columns: 1.3fr 1fr; align-items: stretch; }
  .learn-top .install-banner { grid-column: 1 / -1; }
  .word-card { display: flex; flex-direction: column; justify-content: center; }
  .unit { padding: 22px 24px 28px; }
  .unit-title { font-size: 30px; }
  .unit::after { font-size: 120px; }
  .nodes { gap: 26px; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .letters { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); }
  .special { grid-template-columns: repeat(4, 1fr); }
  .sounds, .phrases { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .row-card { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .nouns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .vocab-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .vocab-list .card { margin: 0; }
  .vocab-list .vocab-all { grid-column: 1 / -1; }
  .talk-list, .pron-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .talk-list .card, .pron-list .card { margin: 0; }
  .vocab-words { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .opts-grid .opt { min-height: 120px; font-size: 48px; }
  .ex-label { font-size: 27px; }
  .ex-q { font-size: 22px; }
  .end { max-width: 520px; margin: 0 auto; }
  .welcome-main { max-width: 460px; margin: 0 auto; width: 100%; }
  .flash { min-height: 340px; }
  .cards-main { max-width: 520px; margin: 0 auto; width: 100%; }
  .toast { bottom: calc(110px + var(--safe-b)); }
}

/* =========================================================
   Grand écran (1024 px et plus) : menu à gauche, infos à droite
   ========================================================= */
@media (min-width: 1024px) {
  html, body { background: var(--bg); }
  .shell.has-tabs {
    max-width: 1320px; display: grid; align-items: start;
    grid-template-columns: 250px minmax(0, 1fr) 340px; grid-template-areas: "nav main side";
  }
  .shell.has-tabs > .screen { grid-area: main; min-height: 100dvh; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .shell.has-tabs .topbar { display: none; }
  .shell.has-tabs .content { padding: 32px 40px 60px; }
  .shell.has-tabs .learn-top { display: none; }

  .tabbar {
    grid-area: nav; position: sticky; top: 0; bottom: auto; height: 100vh; height: 100dvh; max-width: none; margin: 0;
    display: flex; flex-direction: column; gap: 6px; padding: 26px 16px;
    background: transparent; border: 0; border-radius: 0;
  }
  .nav-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; text-decoration: none; }
  .nav-brand img { width: 40px; height: 40px; border-radius: 11px; }
  .nav-brand .brand-name { font-size: 30px; }
  .tab { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 8px 12px; border: 2px solid transparent; border-radius: 16px; font-size: 17px; letter-spacing: 0.04em; text-transform: uppercase; }
  .tab:hover { background: var(--soft); }
  .tab-ico { width: 34px; height: 34px; background: none !important; }
  .tab-ico .ico { width: 26px; height: 26px; }
  .tab.active { background: var(--red-s); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
  .tab-badge { top: -6px; right: -8px; }

  .side { grid-area: side; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; max-height: 100vh; max-height: 100dvh; overflow-y: auto; padding: 26px 20px; }
  .side-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .side-stat { display: flex; align-items: center; gap: 10px; padding: 12px; border: 2px solid var(--line); border-radius: 18px; background: var(--card); color: var(--muted); }
  .side-stat .ico { width: 30px; height: 30px; }
  .side-stat div { display: flex; flex-direction: column; }
  .side-stat strong { font: 800 24px/1 var(--font-d); color: var(--text); }
  .side-stat span { font-size: 12.5px; }
  .side-stat.on .ico { color: var(--orange); fill: var(--orange); fill-opacity: 0.25; }
  .side-stat.xp .ico { color: var(--gold-d); fill: var(--gold); }
  .side .card { margin: 0; }
  .side-badges { color: var(--text); }
  .side-badge-row { display: flex; gap: 8px; }
  .side-badge-row .badge-ico { width: 44px; height: 44px; }
  .side-badge-row .badge-ico .ico { width: 20px; height: 20px; }

  .shell.no-tabs { max-width: 820px; }
  .no-tabs .content { padding-left: 40px; padding-right: 40px; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .toast { bottom: 28px; }
  .update-banner { bottom: 28px; }
  .unit-title { font-size: 32px; }
}

@media (min-width: 1280px) {
  .shell.has-tabs { grid-template-columns: 280px minmax(0, 1fr) 360px; }
}

/* =========================================================
   V1.2 — composants du brief
   ========================================================= */
.center { text-align: center; }
.page-sub { margin: 0 0 12px; color: var(--muted); }
.pl-tag { display: inline-block; padding: 0 5px; border-radius: 5px; background: var(--f-s); color: var(--f); font: 800 11px/1.6 var(--font-d); letter-spacing: 0.04em; vertical-align: 2px; }

/* Chapitre en haut (Apprendre) */
.chap-chip { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 10px 4px 4px; border: 2px solid var(--line); border-radius: 99px; background: var(--card); font: 800 17px var(--font-d); cursor: pointer; }
.chap-chip .brand-mark { width: 30px; height: 30px; border-radius: 50%; }
.chap-chip .ico { width: 18px; height: 18px; color: var(--muted); }
.chap-list { display: flex; flex-direction: column; gap: 6px; }
.chap-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 10px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); text-align: left; cursor: pointer; }
.chap-row.soon { opacity: 0.55; cursor: default; }
.chap-num { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--soft); font: 800 18px var(--font-d); color: var(--muted); }
.chap-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chap-txt span { font-size: 14px; color: var(--muted); }
.chap-prog { font: 800 14px var(--font-d); color: var(--muted); }

/* Nœud « pas encore fait » : blanc avec bordure */
.node-todo { --c: var(--card); --cd: var(--line-2); --ci: var(--muted); border: 3px solid var(--line-2); }
.node-todo .ico { width: 28px; height: 28px; }

/* Bulle de traduction d'un mot */
.de-tokens { display: inline; }
.tw { display: inline; padding: 0 1px; border: 0; border-radius: 4px; background: none; font: inherit; color: inherit; cursor: pointer; border-bottom: 2px dotted transparent; }
.tw:hover, .tw:focus-visible { border-bottom-color: var(--line-2); }
.tw:active { background: var(--gold-s); }
.tip { position: fixed; z-index: 120; max-width: min(280px, calc(100vw - 16px)); padding: 10px 12px; border-radius: 14px; background: var(--unit-ink); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); animation: pop 0.15s ease-out; }
.tip-de { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; }
.tip-de .spk { width: 36px; height: 36px; background: transparent; border-color: rgba(255, 255, 255, 0.25); color: var(--gold); }
.tip-fr { margin-top: 2px; color: rgba(255, 255, 255, 0.85); font-size: 15px; }

/* Feuille du bas */
.bs-wrap { position: fixed; inset: 0; z-index: 85; display: flex; align-items: flex-end; justify-content: center; background: rgba(10, 12, 16, 0.45); opacity: 0; transition: opacity 0.2s; }
.bs-wrap.show { opacity: 1; }
.bs { position: relative; width: 100%; max-width: 560px; max-height: 86vh; max-height: 86dvh; overflow-y: auto; padding: 10px 20px calc(24px + var(--safe-b)); border-radius: 24px 24px 0 0; background: var(--bg); transform: translateY(40px); transition: transform 0.22s ease-out; }
.bs-wrap.show .bs { transform: none; }
.bs-grab { width: 44px; height: 5px; margin: 0 auto 10px; border-radius: 3px; background: var(--line-2); }
.bs-title { margin-bottom: 12px; font: 800 20px var(--font-d); }
.bs-close { position: absolute; top: 8px; right: 8px; }

/* Feedback : orange « Fast! », Pourquoi ?, lettres fausses */
.why-btn { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-height: 40px; padding: 0 12px; border: 2px solid currentColor; border-radius: 99px; background: transparent; color: inherit; font-weight: 700; font-size: 15px; cursor: pointer; opacity: 0.9; }
.why-btn .ico { width: 18px; height: 18px; }
.diff { font-weight: 700; letter-spacing: 0.01em; }
.diff-bad { background: var(--near); color: #16161D; border-radius: 3px; padding: 0 1px; }
.sheet.bad .diff-bad { background: var(--bad); color: #fff; }
.fb-yours { color: var(--muted); font-size: 15px; }
.fb-yours span { text-decoration: line-through; text-decoration-color: var(--bad); }
.fb-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-check { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; background: var(--fb-box); color: var(--muted); font-size: 14px; font-weight: 600; }
.fb-check .ico { width: 15px; height: 15px; }
.fb-check.ok { color: var(--green-t); }
.fb-corr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--text); font-size: 15.5px; }
.fb-corr s { color: var(--bad); }
.fb-corr .ico { width: 16px; height: 16px; color: var(--muted); }
.fb-corr-why { width: 100%; color: var(--muted); font-size: 14px; }
.q-counter { font: 800 15px var(--font-d); color: var(--muted); white-space: nowrap; }

/* Article : boutons neutres jusqu'à la réponse */
.art-btn.art-neutral { color: var(--text); }
.art-btn.art-neutral.sel { background: var(--gold-s); border-color: var(--gold-d); color: var(--text); }
.art-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.art-btn .ico { width: 22px; height: 22px; }

/* Carte « nouveau mot » */
.word-intro { position: relative; padding: 22px 18px 18px; border: 2px solid var(--line); border-radius: 22px; background: var(--card); display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.word-intro::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 6px; background: linear-gradient(90deg, var(--der) 0 33.3%, var(--die) 33.3% 66.6%, var(--das) 66.6%); }
.wi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wi-word { font-size: 36px; line-height: 1.1; }
.wi-word .art { font-size: 32px; }
.wi-audio { display: flex; gap: 8px; }
.wi-audio .spk-slow.spk { width: 44px; height: 44px; border-radius: 12px; border-bottom-width: 2px; }
.wi-audio .spk-slow .ico { width: 20px; height: 20px; }
.wi-pl { font-size: 17px; color: var(--muted); }
.wi-fr { font: 800 22px var(--font-d); }
.wi-ex { margin-top: 6px; padding: 12px 14px; border-radius: 14px; background: var(--soft); }
.wi-ex-de { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 19px; font-weight: 600; }
.wi-ex-fr { color: var(--muted); font-size: 15px; }

/* Écriture libre */
.answer-long { min-height: 150px; }
.ai-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.ai-note .ico { width: 16px; height: 16px; color: var(--gold-d); }
.ex-sub.left { display: flex; align-items: flex-start; gap: 8px; text-align: left; font-weight: 400; }
.ex-sub.left .ico { width: 18px; height: 18px; color: var(--gold-d); margin-top: 2px; }

/* Fin de leçon : mots, erreurs */
.end-words, .end-mistakes { width: 100%; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 2px solid var(--line); text-align: left; }
.end-words-title { font: 800 14px var(--font-d); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.word-chip { min-height: 40px; padding: 4px 12px; border: 2px solid var(--line); border-radius: 99px; background: var(--card); font-size: 15.5px; cursor: pointer; }
.mistake-row { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 15px; }
.mistake-row:first-of-type { border-top: 0; }
.mistake-row .ico { width: 16px; height: 16px; color: var(--bad); margin-top: 3px; }

/* Réviser */
.due-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 16px; }
.due-num { grid-row: span 2; font: 800 64px/1 var(--font-d); color: var(--red); min-width: 56px; text-align: center; }
.due-text { display: flex; flex-direction: column; }
.due-text strong { font: 800 20px/1.15 var(--font-d); }
.due-card .btn { grid-column: 1 / -1; margin-top: 10px; }
.skill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.skill-card { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; color: var(--text); }
.skill-ico { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 6px; border-radius: 12px; background: var(--gold-s); color: var(--gold-d); }
.skill-card strong { font: 800 19px var(--font-d); }

/* Cartes à retourner */
.flash { position: relative; overflow: hidden; }
.flash::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--line-2); }
.flash[data-g="m"]::before { background: var(--der); }
.flash[data-g="f"]::before { background: var(--die); }
.flash[data-g="n"]::before { background: var(--das); }
.flash-pl { font-size: 17px; color: var(--muted); }
.flash-ex { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 16px; font-weight: 600; }
.flash-ex small { color: var(--muted); font-weight: 400; }
.flash-answer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.flash-answer .btn { padding: 0 10px; letter-spacing: 0.03em; font-size: 15px; }
.flash-tools { display: flex; gap: 10px; }
.cards-main .pbar { width: 100%; flex: none; }

/* Lexikon */
.lex-head { position: sticky; top: 0; z-index: 15; display: flex; flex-direction: column; gap: 10px; padding: calc(10px + var(--safe-t)) 16px 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.lex-head .page-title { margin: 0; }
.lex-search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--muted); }
.lex-input { flex: 1; min-width: 0; height: 48px; border: 0; background: none; outline: none; font-size: 17px; color: var(--text); }
.lex-keys { display: flex; gap: 6px; }
.lex-keys .key { width: 44px; height: 40px; flex: none; }
.lex-filters { display: flex; flex-direction: column; gap: 8px; }
.filter-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filter-chips::-webkit-scrollbar { display: none; }
.fchip { flex: none; min-height: 40px; padding: 0 14px; border: 2px solid var(--line); border-radius: 99px; background: var(--card); font-weight: 700; font-size: 15px; cursor: pointer; }
.fchip.on { background: var(--btn-ink-bg); border-color: var(--btn-ink-bg); color: var(--btn-ink-fg); }
.ch-select { height: 44px; }
.lex-content { padding-top: 12px; }
.lex-count { margin-bottom: 8px; font-size: 14px; }
.lex-list { display: flex; flex-direction: column; gap: 6px; }
.lex-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 0; border: 2px solid var(--line); border-radius: 16px; background: var(--card); }
.lex-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 12px; border: 0; background: none; text-align: left; cursor: pointer; }
.lex-de { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 17.5px; }
.lex-pl { font-size: 14px; color: var(--muted); }
.lex-pl .de-word { font-weight: 600; }
.lex-fr { color: var(--muted); font-size: 15px; }
.gram-card { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.gram-card.soon { opacity: 0.55; }
.gram-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gram-btns { display: flex; flex-direction: column; gap: 6px; }
.word-sheet { display: flex; flex-direction: column; gap: 10px; }
.ws-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ws-word { font-size: 34px; }
.ws-word .art { font-size: 30px; }
.ws-audio { display: flex; gap: 8px; }
.ws-audio .spk-slow.spk { width: 44px; height: 44px; border-radius: 12px; border-bottom-width: 2px; }
.ws-audio .spk-slow .ico { width: 20px; height: 20px; }
.ws-pl { color: var(--muted); }
.ws-fr { font: 800 22px var(--font-d); }
.ws-ex { padding: 12px 14px; border-radius: 14px; background: var(--card); border: 2px solid var(--line); }
.ws-ex-de { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 18px; font-weight: 600; }
.ws-ex-fr { color: var(--muted); font-size: 15px; }
.verb-row.irr .verb-f { color: var(--red); }
.irr-tag { margin-left: 8px; padding: 1px 6px; border-radius: 6px; background: var(--red-s); color: var(--red-t); font: 700 11px var(--font); vertical-align: 2px; }

/* Moi */
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head span { text-align: center; font: 800 12px var(--font-d); color: var(--muted); }
.cal-grid { margin-top: 6px; }
.cal-cell { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; background: var(--soft); font-size: 13px; font-weight: 600; color: var(--muted); }
.cal-cell.empty { background: none; }
.cal-cell.lvl-1 { background: var(--gold-s); color: var(--gold-t); }
.cal-cell.lvl-2 { background: color-mix(in srgb, var(--gold) 60%, var(--card)); color: #16161D; }
.cal-cell.lvl-3 { background: var(--gold); color: #16161D; }
.cal-cell.today { outline: 2px solid var(--text); outline-offset: 1px; }
.cal-legend { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.cal-legend .cal-cell { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }
.skill-row { margin: 12px 0; }
.skill-label { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.skill-label .ico { width: 18px; height: 18px; color: var(--muted); }
.skill-val { margin-left: auto; font-size: 13.5px; color: var(--muted); }
.prog-fill.skill-hoeren { background: var(--der); }
.prog-fill.skill-lesen { background: var(--das); }
.prog-fill.skill-schreiben { background: var(--gold); }
.prog-fill.skill-sprechen { background: var(--red); }
.prog-row.soon { opacity: 0.5; }

/* États vides + déco */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px; text-align: center; }
.empty-state strong { font: 800 22px var(--font-d); }
.empty-state span { color: var(--muted); max-width: 320px; }
.empty-state .btn { margin-top: 8px; }
.deco svg { width: 140px; height: 70px; }

/* Bienvenue */
.hello { min-height: 100dvh; justify-content: space-between; }
.hello-main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; width: 100%; max-width: 440px; margin: 0 auto; padding: calc(28px + var(--safe-t)) 20px 12px; }
.hello-art { display: flex; justify-content: center; }
.hello-logo { align-self: center; transform: rotate(-4deg); }
.hello-logo img { width: 120px; height: 120px; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.12)); }
.hello-title { margin: 0; text-align: center; font: 800 64px/1 var(--font-d); }
.hello-sub { margin: 0; text-align: center; color: var(--muted); font-size: 18px; }
.hello-h { margin: 0; text-align: center; font: 800 32px/1.1 var(--font-d); }
.hello-cta { margin-top: 10px; }
.goal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.goal-card { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 104px; justify-content: center; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 20px; background: var(--card); cursor: pointer; }
.goal-card strong { font: 800 30px var(--font-d); }
.goal-card span { color: var(--muted); }
.goal-card.on { border-color: var(--red); background: var(--red-s); }
.hello-spk { align-self: center; margin: 10px 0; }
.install-mini { display: flex; align-items: center; gap: 12px; margin: 0; }
.install-mini > .ico { width: 26px; height: 26px; color: var(--red); }
.install-mini div { display: flex; flex-direction: column; font-size: 14.5px; }
.hello-dots { display: flex; justify-content: center; gap: 8px; padding: 10px 0 calc(18px + var(--safe-b)); }
.hello-dots span { width: 8px; height: 8px; border-radius: 4px; background: var(--line-2); transition: width 0.2s; }
.hello-dots span.on { width: 24px; background: var(--red); }

/* Parler */
.scenario-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.scenario { margin: 0; display: flex; align-items: center; gap: 12px; color: var(--text); }
.scenario > .ico { color: var(--muted); }
.scenario-ico { width: 50px; height: 50px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--gold); color: #16161D; }
.scenario-ico .ico { width: 24px; height: 24px; }
.scenario-text { flex: 1; min-width: 0; }
.scenario-fr { font-weight: 700; font-size: 17px; }
.scenario-de { font: 800 15px var(--font-d); color: var(--red); }
.mission { position: sticky; top: calc(57px + var(--safe-t)); z-index: 12; margin: 0; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.mission-title { display: flex; align-items: center; gap: 6px; font: 800 15px var(--font-d); letter-spacing: 0.06em; text-transform: uppercase; }
.mission-title .ico { width: 18px; height: 18px; color: var(--red); }
.mission-title .muted { text-transform: none; letter-spacing: 0; font-family: var(--font); font-weight: 400; }
.mission-goals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.goal { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; background: var(--card); border: 2px solid var(--line); font-size: 14px; color: var(--muted); }
.goal-box { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border: 2px solid var(--line-2); border-radius: 50%; color: transparent; transition: all 0.2s; }
.goal-box .ico { width: 16px; height: 16px; stroke-width: 3; }
.goal.done { color: var(--text); font-weight: 700; border-color: var(--green); background: var(--green-s); }
.goal.done .goal-box { background: var(--green); border-color: var(--green); color: #fff; animation: pop 0.25s ease-out; }
.fr-btn { min-width: 44px; height: 44px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); font: 800 14px var(--font-d); color: var(--muted); cursor: pointer; }
.fr-btn[aria-pressed="true"] { background: var(--btn-ink-bg); color: var(--btn-ink-fg); border-color: var(--btn-ink-bg); }
.msg-me { flex-direction: column; align-items: flex-end; }
.correction { max-width: 100%; margin-top: 6px; padding: 8px 12px; border-radius: 14px; background: var(--near-s); color: var(--text); font-size: 15px; }
.correction-fixed { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; }
.correction-fixed > .ico { width: 16px; height: 16px; color: var(--near-d); }
.correction-fixed .spk { width: 36px; height: 36px; }
.correction-why { color: var(--muted); font-size: 14px; }
.help-row { display: flex; flex-direction: column; gap: 6px; }
.help-chip { min-height: 44px; padding: 8px 14px; border: 2px dashed var(--line-2); border-radius: 14px; background: var(--card); text-align: left; font-size: 16px; cursor: pointer; }
.composer-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.aide-btn { min-height: 44px; }
.typing .bubble { padding: 14px 16px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
.talk-end { align-items: stretch; text-align: left; gap: 12px; }
.talk-end-title { font: 800 22px var(--font-d); }
.talk-end-sec { display: flex; flex-direction: column; gap: 6px; }
@keyframes blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

@media (min-width: 600px) {
  .scenario-grid, .skill-grid { grid-template-columns: 1fr 1fr; }
  .skill-grid { grid-template-columns: repeat(4, 1fr); }
  .lex-head { padding-left: 28px; padding-right: 28px; }
  .bs { border-radius: 24px; margin-bottom: 24px; }
  .bs-wrap { align-items: center; }
  .cal-cell { border-radius: 12px; }
}
@media (min-width: 1024px) {
  .shell.has-tabs .lex-head { top: 0; padding-top: 28px; }
}
