:root { color-scheme: light; --ink: #0c355c; --muted: #496574; --ocean: #126581; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #f3f7f8; color: var(--ink); font-family: system-ui, -apple-system, sans-serif; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border-radius: 9px; padding: 14px 22px; font-weight: 650; border: 1px solid transparent; }
button:hover { filter: brightness(.95); }
:is(a, button):focus-visible { outline: 3px solid #126581; outline-offset: 5px; }
.masthead { max-width: 1120px; margin: auto; padding: 28px 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { font-size: 18px; font-weight: 750; }
.brand span { display: block; font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 3px; }
.back { font-size: 13px; }
.back:hover { text-decoration: underline; }
main { max-width: 820px; margin: 34px auto 60px; padding: 0 28px; }
.eyebrow { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.badge { display: inline-block; background: #d9f2f5; color: #126581; padding: 5px 11px; border: 1px solid #abd5df; border-radius: 6px; font-size: 12px; font-weight: 700; }
h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.15; letter-spacing: -.045em; margin: 19px 0 12px; }
.intro { font-size: 19px; margin: 0; }
.instructions { color: var(--muted); font-size: 14px; margin: 12px 0 32px; }
.session { max-width: 560px; margin-inline: auto; }
.settings { max-width: 560px; margin-inline: auto; padding: 28px; background: white; border: 2px solid var(--ink); border-radius: 16px; box-shadow: 7px 7px 0 #ccdde3; }
.settings h2 { font-size: 24px; }
.settings fieldset { border: 0; padding: 0; margin: 24px 0; }
.settings legend { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.amount-options { display: flex; gap: 12px; flex-wrap: wrap; }
.amount-options label, .level-option { padding: 12px; border: 1px solid #abd5df; border-radius: 8px; background: #edf8fa; cursor: pointer; }
.level-option { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.level-option span span { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.settings input { accent-color: #126581; }
.settings input:focus-visible { outline: 3px solid var(--ocean); outline-offset: 3px; }
#available { font-size: 13px; color: var(--muted); }
button:disabled { opacity: .5; cursor: not-allowed; }
.session-heading { display: flex; justify-content: space-between; font-size: 12px; font-weight: 650; }
progress { appearance: none; width: 100%; height: 6px; display: block; margin: 12px 0 24px; border: 0; border-radius: 8px; overflow: hidden; background: #dce7ea; }
progress::-webkit-progress-bar { background: #dce7ea; }
progress::-webkit-progress-value { background: #126581; }
progress::-moz-progress-bar { background: #126581; }
.flashcard { position: relative; display: flex; flex-direction: column; aspect-ratio: 1; background: white; border: 2px solid var(--ink); border-radius: 16px; box-shadow: 7px 7px 0 #ccdde3; padding: 24px 30px 18px; }
.card-top, .card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 11px; color: var(--muted); }
.kind { color: var(--ocean); background: #edf8fa; padding: 6px 10px; border-radius: 5px; font-weight: 700; font-size: 12px; }
.card-content { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 25px 0; }
.context { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 600; letter-spacing: -.025em; margin: 0; }
h2:focus { outline: none; }
.flashcard.revealed h2 { font-size: 19px; color: var(--muted); }
#answer { font-size: clamp(18px, 3vw, 25px); margin-top: 24px; overflow-x: auto; padding: 4px; }
#answer mjx-container { font-size: 1.1em; }
#answer mjx-container[display="true"] { margin: 0; }
.card-bottom { border-top: 1px solid #e1eaed; padding-top: 15px; }
.card-bottom > span:last-child { font-size: 20px; }
.actions { text-align: center; margin: 27px 0 0; min-height: 100px; }
.primary { background: var(--ocean); color: white; }
#reveal { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 14px; background: transparent; }
#reveal:hover { background: rgb(18 101 129 / 3%); }
#rating p { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.ratings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ratings span { margin-right: 8px; }
.easy { background: #eaf4e7; color: #256039; border-color: #98bd98; }
.almost { background: #fff2dc; color: #875207; border-color: #dfb46f; }
.review { background: #fcebea; color: #9c3434; border-color: #dca09b; }
.secondary { background: white; color: var(--ink); border-color: #bdcfd5; }
.footnote { text-align: center; color: var(--muted); font-size: 11px; margin: 15px 0 0; }
.summary { text-align: center; background: white; border: 2px solid var(--ink); border-radius: 16px; padding: 32px; box-shadow: 7px 7px 0 #ccdde3; }
.summary h2 { margin: 18px 0 10px; }
.summary p { color: var(--muted); font-size: 14px; }
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 25px 0; }
.totals div { border-radius: 8px; padding: 14px 5px; font-size: 12px; }
.totals strong { display: block; font-size: 30px; }
.summary-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px; }
footer { max-width: 1064px; margin: auto; padding: 20px 28px; border-top: 1px solid #d5e1e5; display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media(max-width: 540px) { .masthead { padding: 20px; align-items: flex-start; } .back { max-width: 120px; text-align: right; } main { padding: 0 20px; margin-top: 22px; } .flashcard { padding: 18px; } .card-top { align-items: flex-start; } .kind { max-width: 68%; } .card-top > :last-child { white-space: nowrap; } .ratings { gap: 7px; } .ratings button { padding: 13px 5px; font-size: 13px; } .ratings span { margin-right: 3px; } .summary { padding: 24px 16px; } footer { flex-direction: column; } }

/* Navigation commune aux applications de flashcards. */
.exercise-nav { max-width: 1120px; margin: 0 auto; padding: 18px 28px 0; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.exercise-nav a { border-radius: 8px; padding: 10px 14px; background: var(--ocean); color: white; font-size: .95rem; font-weight: 900; }
.exercise-nav a:hover { filter: brightness(.95); }
@media (max-width: 540px) { .exercise-nav { padding-inline: 20px; } }

.exercise-nav { margin-bottom: 24px; }
