:root {
  color-scheme: light;
  --red: #e11d34;
  --red-dark: #b80e26;
  --red-soft: #fff0f2;
  --ink: #172033;
  --muted: #687086;
  --line: #e6e8ee;
  --surface: #ffffff;
  --background: #f5f6f9;
  --shadow: 0 18px 50px rgba(23, 32, 51, 0.1);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% -10%, rgba(225, 29, 52, 0.11), transparent 31rem),
    var(--background);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
button { font: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 3px solid rgba(225, 29, 52, 0.28); outline-offset: 3px; }

.app-shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: 18px 0 110px; }
.topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 38px; }
.brand { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; color: inherit; padding: 0; cursor: pointer; text-align: left; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; flex: none; }
.brand-mark svg { display: block; width: 44px; height: 44px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.1rem; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: .76rem; margin-top: -2px; }
.wordmark em { font-style: normal; color: var(--red); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.streak { height: 44px; display: flex; align-items: center; gap: 5px; padding: 0 13px; border: 1px solid var(--line); background: rgba(255,255,255,.82); border-radius: 999px; }
.streak small { color: var(--muted); }
.streak { color: var(--ink); font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.streak:hover, .streak:focus-visible { border-color: var(--red); }
.streak.active { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.icon-button { height: 44px; padding: 0 17px; border: 0; border-radius: 999px; background: var(--ink); color: white; cursor: pointer; font-weight: 750; }

.view { display: none; animation: view-in .28s ease both; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
.today-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .75fr); gap: 20px; }
.today-card { position: relative; overflow: hidden; min-height: 310px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: clamp(30px, 5vw, 58px); border-radius: var(--radius-xl); background: var(--red); color: white; box-shadow: 0 24px 60px rgba(185, 14, 38, .22); }
.today-card::after { content: ""; position: absolute; width: 310px; height: 310px; border: 56px solid rgba(255,255,255,.08); border-radius: 50%; right: -135px; bottom: -165px; }
.today-copy { position: relative; z-index: 1; max-width: 520px; }
.eyebrow { margin: 0 0 8px; color: var(--red); text-transform: uppercase; letter-spacing: .11em; font-size: .74rem; font-weight: 850; }
.today-card .eyebrow { color: rgba(255,255,255,.72); }
h1, h2, h3, p { text-wrap: pretty; }
h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 4.1rem); line-height: .98; letter-spacing: -.055em; }
.today-copy > p:not(.eyebrow) { max-width: 450px; margin: 18px 0 0; color: rgba(255,255,255,.84); font-size: 1.05rem; }
.lesson-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0; }
.lesson-meta span { padding: 7px 11px; border-radius: 999px; background: rgba(255,255,255,.14); font-size: .82rem; font-weight: 700; }
.primary-button, .secondary-button { min-height: 48px; border-radius: 999px; padding: 0 20px; font-weight: 800; cursor: pointer; border: 0; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.primary-button { background: var(--ink); color: white; box-shadow: 0 10px 24px rgba(23,32,51,.18); }
.today-card .primary-button { background: white; color: var(--red-dark); }
.secondary-button { background: #eef0f4; color: var(--ink); }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.primary-button.full { width: 100%; }
.progress-medallion { position: relative; z-index: 1; flex: 0 0 auto; text-align: center; }
.progress-ring { --progress: 0deg; width: 132px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(white var(--progress), rgba(255,255,255,.22) 0); }
.progress-ring::before { content: ""; grid-area: 1/1; width: 102px; aspect-ratio: 1; border-radius: 50%; background: var(--red); }
.progress-ring span { grid-area: 1/1; z-index: 1; font-size: 1.5rem; font-weight: 900; }
.progress-medallion small { display: block; margin-top: 8px; color: rgba(255,255,255,.78); }

.daily-phrase { position: relative; overflow: hidden; min-height: 310px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow); }
.daily-phrase::before { content: ""; position: absolute; inset: auto -35px -65px auto; width: 150px; height: 150px; background: var(--red-soft); border-radius: 50%; }
.chip { display: inline-flex; align-items: center; min-height: 30px; padding: 0 11px; border-radius: 999px; background: var(--red-soft); color: var(--red-dark); font-size: .76rem; font-weight: 850; }
.sound-button { position: absolute; right: 25px; top: 24px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--ink); color: white; cursor: pointer; }
.phrase-main { margin: 62px 0 5px; font-size: clamp(1.8rem, 3vw, 2.8rem); line-height: 1.05; letter-spacing: -.04em; font-weight: 900; }
.phrase-translation { margin: 0; color: var(--muted); font-size: 1.03rem; }
.pronunciation { display: inline-block; margin: 25px 0 0; padding: 7px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 46px 2px 18px; }
.section-heading h2, .page-heading h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.05; letter-spacing: -.045em; }
.section-heading > span { color: var(--muted); font-size: .9rem; }
.section-heading.compact { margin: 0 0 20px; }
.section-heading.compact h2 { font-size: 1.45rem; }
.lesson-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lesson-item { width: 100%; min-height: 112px; display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: inherit; text-align: left; cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.lesson-item:hover { transform: translateY(-2px); border-color: rgba(225,29,52,.3); box-shadow: 0 14px 28px rgba(23,32,51,.07); }
.lesson-number { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: var(--red-soft); color: var(--red); font-weight: 900; }
.lesson-item.completed .lesson-number { background: var(--ink); color: white; }
.lesson-text strong, .lesson-text small { display: block; }
.lesson-text strong { font-size: 1.03rem; }
.lesson-text small { margin-top: 3px; color: var(--muted); font-size: .82rem; }
.lesson-status { color: var(--muted); font-size: 1.1rem; }
.lesson-item.completed .lesson-status { color: var(--red); }

.page-heading { max-width: 650px; margin: 16px 0 36px; }
.page-heading h1 { font-size: clamp(2.7rem, 6vw, 5rem); }
.page-heading > p:last-child { color: var(--muted); font-size: 1.05rem; }
.review-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; }
.quiz-card, .favorites-card, .week-card, .install-card { border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow); }
.quiz-card { padding: clamp(24px, 4vw, 40px); }
.quiz-topline { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.quiz-topline > span:last-child { color: var(--muted); font-weight: 750; }
.quiz-label { margin: 45px 0 8px; color: var(--muted); }
.quiz-card h2 { margin: 0 0 28px; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.04em; }
.quiz-options { display: grid; gap: 9px; }
.quiz-option { min-height: 52px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 13px; background: white; color: var(--ink); text-align: left; cursor: pointer; font-weight: 700; }
.quiz-option:hover { border-color: var(--red); }
.quiz-option.correct { border-color: #199168; background: #edf9f5; color: #126448; }
.quiz-option.wrong { border-color: var(--red); background: var(--red-soft); color: var(--red-dark); }
.quiz-option:disabled { cursor: default; }
.quiz-feedback { min-height: 25px; margin: 14px 0; font-weight: 750; }
.favorites-card { padding: clamp(24px, 4vw, 34px); }
.favorites-list { display: grid; gap: 10px; }
.favorite-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.favorite-row:last-child { border-bottom: 0; }
.favorite-row strong, .favorite-row small { display: block; }
.favorite-row small { color: var(--muted); margin-top: 2px; }
.mini-sound { border: 0; background: var(--red-soft); width: 38px; height: 38px; border-radius: 50%; cursor: pointer; }
.empty-state { padding: 25px 0; color: var(--muted); text-align: center; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stats-grid article { min-height: 165px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; }
.stat-icon { width: 36px; height: 36px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); border-radius: 11px; font-weight: 900; }
.stats-grid strong, .stats-grid small { display: block; }
.stats-grid strong { margin-top: 20px; font-size: 2.5rem; letter-spacing: -.05em; }
.stats-grid small { color: var(--muted); }
.week-card { margin-top: 20px; padding: clamp(24px, 4vw, 34px); }
.week-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 9px; }
.day-cell { display: grid; justify-items: center; gap: 8px; color: var(--muted); font-size: .78rem; }
.day-dot { width: 100%; max-width: 72px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 18px; background: #f1f2f5; color: #a0a5b2; font-weight: 900; }
.day-cell.active .day-dot { background: var(--red); color: white; box-shadow: 0 9px 20px rgba(225,29,52,.2); }
.install-card { margin-top: 20px; padding: clamp(25px, 4vw, 40px); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--ink); color: white; }
.install-card h2 { margin: 0; font-size: 1.7rem; }
.install-card p:last-child { margin-bottom: 0; color: #bdc3d1; }
.install-card .eyebrow { color: #ff7889; }
.install-card .primary-button { background: white; color: var(--ink); flex: 0 0 auto; }

.bottom-nav { position: fixed; z-index: 20; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(600px, calc(100% - 28px)); display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px; border: 1px solid rgba(255,255,255,.15); border-radius: 22px; background: rgba(23,32,51,.94); box-shadow: 0 20px 50px rgba(23,32,51,.25); backdrop-filter: blur(18px); }
.nav-button { min-height: 54px; display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center; gap: 7px; border: 0; border-radius: 16px; background: transparent; color: #aeb5c5; cursor: pointer; }
.nav-button span { font-size: 1.25rem; }
.nav-button small { font-size: .78rem; font-weight: 750; }
.nav-button.active { background: white; color: var(--ink); }

dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(13,18,30,.64); backdrop-filter: blur(4px); }
.install-dialog { width: min(590px, calc(100% - 24px)); max-height: calc(100vh - 30px); overflow: auto; border-radius: var(--radius-xl); background: white; box-shadow: 0 30px 100px rgba(0,0,0,.28); }
.lesson-dialog[open], .install-dialog[open] { animation: dialog-in .25s ease both; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.dialog-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px 18px; background: rgba(255,255,255,.95); backdrop-filter: blur(12px); }
.dialog-head h2 { margin: 0; font-size: 1.65rem; letter-spacing: -.035em; }
.close-button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #f0f1f4; color: var(--ink); font-size: 1.55rem; cursor: pointer; }
.dialog-progress { padding: 0 28px 20px; color: var(--muted); font-size: .82rem; }
.dialog-progress > div { height: 5px; margin-top: 9px; border-radius: 99px; background: #eceef2; overflow: hidden; }
.dialog-progress i { display: block; width: 25%; height: 100%; background: var(--red); transition: width .25s ease; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 20px 28px 28px; }
.install-steps { margin: 0; padding: 10px 48px 28px 62px; }
.install-steps li { padding: 5px 0 12px 8px; }
.install-dialog > .primary-button { width: calc(100% - 56px); margin: 0 28px 28px; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 95px; transform: translate(-50%, 20px); padding: 11px 16px; border-radius: 999px; background: var(--ink); color: white; opacity: 0; pointer-events: none; transition: .22s ease; box-shadow: var(--shadow); font-size: .88rem; font-weight: 750; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Lecteur de leçon ---------- */
.lesson-dialog .dialog-actions { position: sticky; bottom: 0; z-index: 3; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.lesson-dialog { width: min(760px, calc(100% - 24px)); max-height: calc(100vh - 30px); overflow: auto; border-radius: var(--radius-xl); background: white; box-shadow: 0 30px 100px rgba(0,0,0,.28); }
.step { padding: 0 28px; }
.step-title { margin: 0 0 16px; font-size: 1.3rem; letter-spacing: -.02em; }
.instruction { margin: 0 0 14px; color: var(--muted); font-size: .92rem; }
.tn { color: #0f3f66; font-weight: 850; letter-spacing: -.01em; }
.fr { color: var(--ink); }
.pron { display: block; margin-top: 6px; color: #a3233a; font-size: .84rem; font-weight: 750; }
.note { margin: 14px 0 0; color: var(--muted); font-size: .9rem; }
.sound-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.sound-keys span { display: grid; justify-items: center; padding: 10px 6px; border-radius: 12px; background: var(--ink); color: #dfe3ec; font-size: .74rem; font-weight: 750; text-align: center; }
.sound-keys b { color: #ffcd6b; font-size: 1.35rem; line-height: 1.1; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.recall-card, .vocab-card { position: relative; display: grid; align-content: start; gap: 4px; padding: 16px 16px 52px; border: 1px solid var(--line); border-radius: 16px; background: #f8f9fb; }
.recall-card .fr { font-size: .95rem; }
.recall-card .answer { display: none; margin-top: 6px; }
.recall-card .tn { font-size: 1.15rem; }
.recall-card.revealed .answer { display: block; }
.recall-card.revealed .reveal-button { display: none; }
.reveal-button { justify-self: start; margin-top: 8px; min-height: 36px; padding: 0 14px; border: 1px dashed #b9c0cf; border-radius: 999px; background: white; color: var(--ink); font-weight: 750; font-size: .84rem; cursor: pointer; }
.vocab-card.wide { grid-column: 1 / -1; }
.vocab-card .tn { font-size: 1.2rem; }
.vocab-card .fr { color: var(--muted); }
.card-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge { padding: 3px 9px; border-radius: 6px; background: var(--red); color: white; font-size: .68rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.tip-inline { color: var(--muted); font-size: .8rem; }
.card-actions { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.star { width: 38px; height: 38px; border: 0; border-radius: 50%; background: white; color: var(--red); font-size: 1.2rem; cursor: pointer; box-shadow: 0 4px 12px rgba(23,32,51,.08); }
.pron-tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.pron-tips span { padding: 10px 12px; border-radius: 12px; background: var(--red-soft); font-size: .84rem; }
.pron-tips strong { display: block; color: #a3233a; }
.extra-block { margin-top: 20px; }
.extra-block h4, .grammar-title { margin: 0 0 10px; font-size: 1.02rem; }
.table-rows { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.table-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: .93rem; }
.table-row:last-child { border-bottom: 0; }
.table-row:nth-child(even) { background: #fafbfc; }
.table-row strong { color: #0f3f66; }
.table-row.head { background: var(--ink); color: white; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.conj .table-row { grid-template-columns: 90px 1fr; }
.bubbles { display: grid; gap: 10px; }
.bubble { position: relative; max-width: 86%; padding: 12px 16px 46px; border-radius: 16px; background: #e8f1f8; }
.bubble.right { justify-self: end; background: #f9e8eb; }
.bubble .speaker { display: block; color: var(--muted); font-size: .7rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.bubble .tn { display: block; margin-top: 3px; font-size: 1.08rem; }
.bubble .fr { display: block; margin-top: 2px; color: #4b5468; font-size: .9rem; }
.bubbles.no-french .fr { visibility: hidden; height: 0; margin: 0; }
.hide-french { margin-top: 14px; min-height: 40px; font-size: .86rem; }
.callout { margin-top: 16px; padding: 14px 16px; border: 1px solid #ecd7a2; border-radius: 14px; background: #fff7e0; color: #7a5300; font-size: .9rem; font-weight: 650; }
.callout b { display: block; margin-bottom: 3px; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.callout.blue { border-color: #cfe0ef; background: #eaf3fb; color: #0f3f66; }
.formula-box { padding: 18px 20px; border-radius: 16px; background: #13304f; color: white; }
.formula-box strong { display: block; margin-bottom: 6px; color: #ffcd6b; font-size: 1.2rem; }
.formula-box p { margin: 0; color: #e7ecf4; font-size: .93rem; }
.grammar-title + .formula-box { margin-bottom: 12px; }
.examples { display: grid; gap: 8px; margin-top: 12px; }
.example { padding: 12px 14px; border-left: 4px solid #2d8c68; border-radius: 4px 12px 12px 4px; background: #f6f8f9; }
.example .tn, .example .fr { display: block; }
.example .fr { color: #4b5468; font-size: .9rem; }
.conj + .examples { margin-top: 14px; }
.exercise-list, .question-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: item; }
.exercise-list li, .question-list li { position: relative; padding: 14px 16px 14px 54px; border-radius: 14px; background: #f5f3fa; counter-increment: item; }
.question-list li { background: #f2f6fa; }
.exercise-list li::before, .question-list li::before { content: counter(item); position: absolute; left: 14px; top: 13px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #7a59b0; color: white; font-size: .82rem; font-weight: 850; }
.question-list li::before { background: var(--ink); border-radius: 8px; }
.question-list .tn, .question-list .fr { display: block; }
.question-list .fr { margin-top: 2px; color: #4b5468; font-size: .9rem; }
.question-list details { margin-top: 6px; font-size: .88rem; }
.question-list summary { cursor: pointer; color: var(--red-dark); font-weight: 750; }
.exercise-text { margin-top: 10px; padding: 12px; border-radius: 12px; background: white; }
.exercise-text .tn, .exercise-text .fr { display: block; }
.exercise-text .fr { margin-top: 6px; color: #4b5468; font-size: .9rem; }
.goal { margin-top: 18px; padding: 22px; border-radius: 18px; background: var(--ink); color: white; text-align: center; }
.goal span { color: #ffcd6b; font-size: .78rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.goal p { margin: 6px 0 0; font-weight: 650; }
.segmented { display: inline-flex; margin-top: 22px; padding: 4px; border-radius: 999px; background: #eef0f4; }
.segmented button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: .82rem; font-weight: 750; cursor: pointer; }
.segmented button.active { background: white; color: var(--ink); box-shadow: 0 2px 8px rgba(23,32,51,.1); }
.quiz-card .quiz-label { margin-top: 26px; }
.quiz-source { margin: -18px 0 22px; color: var(--muted); font-size: .8rem; }
/* Fiches */
.fiches-count { margin: -18px 0 18px; color: var(--muted); font-weight: 650; }
.fiches-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; padding-bottom: 24px; }
.fiche-card { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.fiche-card > a { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--background); }
.fiche-card img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .25s ease; }
.fiche-card > a:hover img, .fiche-card > a:focus-visible img { transform: scale(1.03); }
.fiche-card figcaption { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; }
.fiche-card figcaption small, .fiche-card figcaption strong { display: block; }
.fiche-card figcaption small { color: var(--red); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.fiche-card figcaption strong { font-size: .95rem; line-height: 1.25; }
.fiche-download { flex: none; padding: 7px 10px; border-radius: 10px; background: var(--red-soft); color: var(--red-dark); font-size: .78rem; font-weight: 800; text-decoration: none; }
@media (max-width: 480px) { .fiches-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .fiche-card figcaption { flex-direction: column; align-items: flex-start; } }

@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
  .sound-keys { grid-template-columns: repeat(2, 1fr); }
  .bubble { max-width: 94%; }
  .segmented { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .segmented button { padding: 0 8px; }
}

@media (max-width: 800px) {
  .app-shell { width: min(100% - 28px, 650px); padding-top: 12px; }
  .topbar { margin-bottom: 22px; }
  .icon-button { width: 44px; padding: 0; font-size: 0; }
  .icon-button::before { content: "↓"; font-size: 1.2rem; }
  .today-grid, .review-layout { grid-template-columns: 1fr; }
  .today-card { min-height: 350px; align-items: end; padding: 30px; }
  .progress-medallion { position: absolute; right: 24px; top: 24px; }
  .progress-ring { width: 82px; }
  .progress-ring::before { width: 64px; }
  .progress-ring span { font-size: 1rem; }
  .progress-medallion small { display: none; }
  .today-copy { padding-top: 65px; }
  .daily-phrase { min-height: 255px; }
  .lesson-list { grid-template-columns: 1fr; }
  .lesson-item { min-height: 96px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stats-grid article { min-height: 120px; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center; }
  .stats-grid strong { margin-top: 0; }
  .stats-grid small { grid-column: 2; margin-top: -18px; }
  .install-card { display: block; }
  .install-card .primary-button { width: 100%; margin-top: 20px; }
}

@media (max-width: 480px) {
  .brand small, .streak small { display: none; }
  .top-actions { gap: 6px; }
  .today-card { padding: 24px; border-radius: 24px; }
  .today-copy > p:not(.eyebrow) { font-size: .95rem; }
  .section-heading { margin-top: 34px; }
  .section-heading > span { font-size: .78rem; }
  .nav-button { grid-template-columns: 1fr; gap: 0; }
  .dialog-head { padding: 20px 20px 14px; }
  .dialog-progress { padding: 0 20px 16px; }
  .step { padding: 0 20px; }
  .dialog-actions { padding: 16px 20px 20px; }
  .week-row { gap: 5px; }
  .day-dot { border-radius: 13px; }
}

/* ---------- Verbes ---------- */
.verbs-rules { margin: -14px 0 22px; display: grid; gap: 6px; font-weight: 600; }
.verbs-rules strong { color: #5c3e00; }
.verbs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 30px; }
.verbs-toolbar .segmented { margin-top: 0; }
.verbs-search { flex: 1 1 260px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; }
.verbs-search:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.verbs-list { display: grid; gap: 10px; padding-bottom: 24px; }
.verbs-group { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 4px; font-size: 1.25rem; letter-spacing: -.02em; }
.verbs-group:first-child { margin-top: 0; }
.verbs-group span { color: var(--muted); font-size: .9rem; font-weight: 700; }
.verb-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.verb-card[open] { box-shadow: var(--shadow); }
.verb-card summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.verb-card summary::-webkit-details-marker { display: none; }
.verb-card summary::after { content: "+"; flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #f1f2f5; color: var(--muted); font-weight: 800; }
.verb-card[open] summary::after { content: "–"; }
.verb-name { flex: 1; min-width: 0; }
.verb-name strong, .verb-name small { display: block; }
.verb-name strong { font-size: 1.05rem; }
.verb-name small { margin-top: 2px; font-size: .9rem; }
.verb-badge { flex: none; padding: 4px 9px; border-radius: 999px; background: #edf9f5; color: #126448; font-size: .72rem; font-weight: 850; }
.verb-badge.new { background: var(--red-soft); color: var(--red-dark); }
.verb-body { padding: 0 18px 18px; }
.verb-table { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.verb-row { display: grid; grid-template-columns: 96px repeat(var(--cols), minmax(0, 1fr)); align-items: center; border-bottom: 1px solid var(--line); }
.verb-table.cols-1 { --cols: 1; } .verb-table.cols-3 { --cols: 3; }
.verb-row:last-child { border-bottom: 0; }
.verb-row:nth-child(even) { background: #fafbfc; }
.verb-row.head { background: var(--ink); color: white; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.verb-row.head span { padding: 8px 10px; }
.verb-person { padding: 8px 10px; line-height: 1.15; }
.verb-person b, .verb-person small { display: block; }
.verb-person b { font-size: .86rem; }
.verb-person small { color: var(--muted); font-size: .72rem; }
.verb-form { min-height: 40px; padding: 6px 10px; border: 0; background: transparent; color: #0f3f66; font: inherit; font-size: .95rem; font-weight: 800; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.verb-form:hover, .verb-form:focus-visible { background: var(--red-soft); }
.verb-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin: 12px 0 0; font-size: .9rem; }
.verb-extra b { margin-right: 6px; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.verb-extra .verb-form { min-height: 32px; padding: 4px 6px; border-radius: 8px; }
.verb-extra small { margin-right: 10px; color: var(--muted); font-size: .75rem; }
.verb-example { position: relative; margin-top: 14px; padding-right: 58px; }
.verb-example .mini-sound { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.verb-days { margin: 10px 0 0; color: var(--muted); font-size: .8rem; }
@media (max-width: 600px) {
  .verbs-toolbar .segmented { width: 100%; }
  .verbs-toolbar .segmented { grid-template-columns: repeat(3, 1fr); }
  .verbs-toolbar .segmented.tenses { grid-template-columns: repeat(4, 1fr); }
  .verb-card summary { padding: 13px 14px; }
  .verb-body { padding: 0 12px 14px; }
  .verb-row { grid-template-columns: 66px repeat(var(--cols), minmax(0, 1fr)); }
  .verb-person { padding: 7px 8px; }
  .verb-table.cols-3 .verb-form { padding: 6px 6px; font-size: .8rem; }
  .verb-row.head span { padding: 8px 6px; font-size: .64rem; }
}
@media (max-width: 480px) { .nav-button small { font-size: .66rem; } }

/* ---------- Vocabulaire ---------- */
.vocab-hide { min-height: 40px; margin: 0; }
.vocab-themes { display: flex; gap: 8px; margin: -12px 0 26px; padding-bottom: 6px; overflow-x: auto; scrollbar-width: thin; }
.theme-chip { flex: none; min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: .85rem; font-weight: 750; cursor: pointer; white-space: nowrap; }
.theme-chip.active { border-color: var(--ink); background: var(--ink); color: white; }
.vocab-list { padding-bottom: 24px; }
.vocab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.word-tile { display: flex; flex-direction: column; gap: 4px; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.word-tile:hover, .word-tile:focus-visible { border-color: var(--red); }
.word-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.word-tile .tn { font-size: 1.05rem; overflow-wrap: anywhere; }
.word-tile .fr { color: #4b5468; font-size: .88rem; }
.word-tile .verb-badge { padding: 2px 7px; font-size: .66rem; }
.word-note { color: var(--muted); font-size: .76rem; }
.vocab-list.hide-french .word-tile:not(.revealed) .fr, .vocab-list.hide-french .word-tile:not(.revealed) .word-note { display: none; }
.vocab-list.hide-french .word-tile:not(.revealed)::after { content: "Touche pour voir"; color: var(--muted); font-size: .76rem; }
@media (max-width: 600px) {
  .vocab-hide { width: 100%; }
  .vocab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .word-tile { padding: 11px 12px; }
  .vocab-themes { margin-right: -14px; }
}
@media (max-width: 480px) { .nav-button small { font-size: .68rem; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
