:root {
  --ink: #143a52;
  --muted: #526874;
  --paper: #fffdf8;
  --sun: #ffc857;
  --mint: #dff4ed;
  --mint-ink: #116149;
  --rose: #ffebe7;
  --rose-ink: #8b3024;
  --line: #d3dfe2;
  --shadow: 0 12px 32px #143a5214;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f4efe5 0, #fffdf8 52%);
  color: var(--ink);
  font: 16px/1.45 ui-rounded, "Avenir Next", Avenir, system-ui, sans-serif;
}
.app { max-width: 680px; margin: auto; padding: env(safe-area-inset-top) 18px calc(30px + env(safe-area-inset-bottom)); }
.app:has(.progress-grid) { max-width: 1020px; }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 18px; font-weight: 800; }
.brand-title { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { width: 38px; height: 38px; border-radius: 14px; background: var(--ink); color: var(--sun); display: grid; place-items: center; font-size: 22px; }
.account-trigger { display: inline-flex; min-width: 44px; max-width: 190px; min-height: 42px; align-items: center; justify-content: center; overflow: hidden; padding: 8px 12px; border: 1px solid #d7e2e3; border-radius: 999px; background: #fff; box-shadow: 0 4px 12px #143a520c; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.account-trigger:not(.signed-in) { width: auto; padding: 8px 16px; font-size: .86rem; font-weight: 700; color: #155c43; }
.account-trigger.signed-in { background: #eaf5f0; color: #155c43 !important; -webkit-text-fill-color: #155c43; }
.eyebrow { color: #914519; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.card { margin: 14px 0; padding: 22px; background: var(--paper); border: 1px solid #ebe7df; border-radius: 24px; box-shadow: var(--shadow); }
.hero { padding: 27px 23px; background: var(--ink); color: #fff; }
.hero { position: relative; overflow: hidden; border: 0; background: radial-gradient(circle at 94% 12%, #2d7180 0, transparent 32%), linear-gradient(135deg, #143a52, #1a5364); }
.hero::after { position: absolute; right: -25px; bottom: -70px; width: 190px; height: 190px; border: 1px solid #ffffff2b; border-radius: 50%; content: ""; box-shadow: 0 0 0 20px #ffffff0c, 0 0 0 42px #ffffff08; pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { margin: 8px 0 12px; font-size: clamp(2rem, 9vw, 3rem); line-height: 1.03; }
.hero p { margin: 0; color: #e3edf0; }
.home-hero { padding: 15px 20px; }
.home-hero h1 { max-width: 19ch; margin: 4px 0 6px; font-size: clamp(1.55rem, 4.8vw, 2.1rem); line-height: 1.08; }
.home-hero p { max-width: 44ch; }
.home-hero .eyebrow { color: #fff; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.progress-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 12px 10px; border-radius: 16px; background: #e9f1f2; text-align: center; }
.stat b { display: block; font-size: 1.35rem; }
.stat span { color: var(--muted); font-size: .75rem; }
.progress-grid .stat span { display: block; line-height: 1.35; }
.progress-grid .stat { padding: 12px 7px; }
.progress-grid .stat b { font-size: clamp(1.05rem, 4vw, 1.4rem); }
.reset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: -3px 0 15px; }
.reset-row .ghost { min-height: 42px; padding: 9px 12px; font-size: .88rem; }
button, .button {
  min-height: 50px;
  padding: 14px 16px;
  border: 0;
  border-radius: 15px;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}
.primary { background: var(--sun); color: #3d2d08 !important; -webkit-text-fill-color: #3d2d08; box-shadow: 0 4px 0 #d39e2b; }
.primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #d39e2b; }
.secondary { background: #e8f1f2; }
.ghost { background: transparent; border: 1px solid var(--line); }
.choice { display: flex; width: 100%; align-items: flex-start; gap: 12px; margin-top: 9px; background: #f5f8f8; border: 1px solid var(--line); }
.choice-letter { display: grid; width: 28px; min-width: 28px; height: 28px; place-items: center; margin-top: -3px; border-radius: 9px; background: #e3edef; color: var(--ink); font-weight: 850; }
.choice:focus-visible, button:focus-visible { outline: 3px solid #e67d35; outline-offset: 3px; }
.primary:disabled, .secondary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.row { display: flex; align-items: stretch; gap: 10px; }
.row > * { flex: 1; }
.row small { color: #514321; font-weight: 600; }
.topic { display: flex; width: 100%; align-items: center; justify-content: space-between; margin: 8px 0; background: #fff; border: 1px solid var(--line); }
.topic small { color: var(--muted); }
.pill { padding: 5px 8px; border-radius: 99px; background: var(--mint); color: var(--mint-ink); font-size: .74rem; font-weight: 800; }
.notice { padding: 13px 15px; border-left: 4px solid #668e9c; border-radius: 8px; background: #f2f6f7; color: #294858; font-size: .92rem; }
.source { margin-top: 18px; color: var(--muted); font-size: .8rem; }
.progress { height: 10px; margin: 12px 0; overflow: hidden; border-radius: 99px; background: #e3e9ea; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffc857, #e98848); }
.question { margin: 18px 0 24px; font-size: clamp(1.4rem, 5vw, 2rem); line-height: 1.2; }
.answer { margin: 14px 0; padding: 16px; border-radius: 18px; background: var(--mint); color: #173f35; }
.answer h3 { margin: 0 0 8px; color: var(--mint-ink); }
.answer li { margin: 6px 0; }
.explain { margin-top: 12px; font-size: .95rem; }
.feedback { margin: 13px 0; padding: 13px 15px; border-radius: 16px; }
.good { background: var(--mint); color: var(--mint-ink); }
.review { background: var(--rose); color: var(--rose-ink); }
.actions { position: sticky; bottom: 10px; padding: 10px 0; background: #fffdf8ee; }
.tiny { color: var(--muted); font-size: .82rem; }
details { margin: 10px 0; }
details summary { font-weight: 750; cursor: pointer; }
.break { background: #fff4d5; text-align: center; }
.break h2 { margin-top: 0; }
.result-hero { text-align: center; }
.result-icon { display: grid; width: 76px; height: 76px; place-items: center; margin: 17px auto 8px; border-radius: 50%; background: #ffffff20; font-size: 2.7rem; }
.result-icon.celebrate { animation: result-pop .65s cubic-bezier(.2,.8,.25,1.3) both, result-glow 1.8s ease-in-out .65s infinite alternate; }
.result-hero.passed { background: radial-gradient(circle at 50% 10%, #3a8979, transparent 50%), linear-gradient(135deg, #124c44, #176455); }
.result-hero.not-passed { background: radial-gradient(circle at 50% 10%, #8a7144, transparent 50%), linear-gradient(135deg, #4b4434, #625339); }
.exam-threshold { margin: 15px 0 0; color: var(--muted); font-weight: 700; text-align: center; }
@keyframes result-pop { from { opacity: 0; transform: scale(.35) rotate(-14deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes result-glow { from { box-shadow: 0 0 0 0 #ffc85700; } to { box-shadow: 0 0 0 9px #ffc85730, 0 0 28px #ffc8574d; } }
@media (prefers-reduced-motion: reduce) { .result-icon.celebrate { animation: none; } }
.topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.topline button { min-height: auto; padding: 8px 10px; }
.theme-banner { display: flex; flex-direction: column; gap: 2px; margin: 10px 0; padding: 11px 14px; border-left: 5px solid #b25b23; border-radius: 13px; background: #e5eef0; color: #143a52 !important; }
.theme-banner span { color: #853d16; font-size: .68rem; font-weight: 850; letter-spacing: .1em; }
.theme-banner b { color: #143a52; font-size: 1.05rem; }
.empty { padding: 38px 20px; color: var(--muted); text-align: center; }
.mode-card { padding: 23px; }
.mode-card.revision-mode, .mode-card.training-mode { border: 2px solid #c9dddf; box-shadow: 0 14px 34px #143a521a; }
.mode-card.revision-mode { background: linear-gradient(145deg, #f1f8f6, #fffdf8 62%); border-left: 7px solid #238067; }
.mode-card.training-mode { background: linear-gradient(145deg, #fff7e4, #fffdf8 62%); border-left: 7px solid #df9c20; }
.mode-card.revision-mode h2, .mode-card.training-mode h2 { font-size: clamp(1.45rem, 5vw, 1.75rem); }
.mode-card h2 { margin: 5px 0 7px; font-size: 1.45rem; }
.mode-card > p:not(.source) { color: var(--muted); }
.mode-card .row { margin-top: 14px; }
.mode-card .row button { text-align: center; }
.theme-entry { display: flex; width: 100%; align-items: center; gap: 12px; margin-top: 14px; border: 1px solid #d5e3e6; background: #f2f7f7; }
.livret-link { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px; border: 1px solid #cbded9; border-radius: 15px; background: #fff; color: #145d49; font-weight: 750; text-decoration: none; }
.livret-link > span:first-child { font-size: 1.45rem; }
.livret-link > span:nth-child(2) { flex: 1; }
.livret-link small { display: block; margin-top: 3px; color: var(--muted); font-size: .78rem; font-weight: 550; }
.livret-link:focus-visible { outline: 3px solid #e67d35; outline-offset: 3px; }
.theme-entry-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 14px; background: #dfecef; font-size: 1.35rem; }
.theme-entry > span:nth-child(2) { flex: 1; }
.theme-entry small { display: block; color: var(--muted); font-size: .78rem; font-weight: 550; }
.theme-grid { display: grid; grid-template-columns: 1fr; gap: 13px; margin: 14px 0 20px; }
.theme-tile { position: relative; display: flex; min-height: 196px; flex-direction: column; align-items: flex-start; gap: 6px; overflow: hidden; padding: 18px; border: 1px solid #ffffffb0; box-shadow: var(--shadow); }
.theme-tile::after { position: absolute; top: -26px; right: -23px; width: 118px; height: 118px; border: 1px solid #143a521a; border-radius: 50%; content: ""; box-shadow: 0 0 0 14px #143a5206, 0 0 0 30px #143a5205; }
.theme-tile > * { position: relative; z-index: 1; }
.theme-tile.blue { background: linear-gradient(135deg, #e9f3f8, #f9fcfc); }
.theme-tile.gold { background: linear-gradient(135deg, #fff2d3, #fffaf0); }
.theme-tile.mint { background: linear-gradient(135deg, #e4f3ed, #f7fbf8); }
.theme-tile.rose { background: linear-gradient(135deg, #f8e9e4, #fdf8f5); }
.theme-tile.lavender { background: linear-gradient(135deg, #eeeafb, #faf9ff); }
.theme-art { display: grid; width: 56px; height: 56px; place-items: center; margin-bottom: 3px; border-radius: 18px; background: #ffffffbd; box-shadow: 0 5px 14px #143a5214; font-size: 1.85rem; }
.theme-tag { color: #526874; font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.theme-tile b { max-width: 26ch; font-size: 1.02rem; line-height: 1.25; }
.theme-count { color: var(--muted); font-size: .8rem; }
.theme-open { margin-top: auto; color: #125875; font-size: .82rem; font-weight: 800; }
.theme-footnote { margin: 18px 4px 32px; }
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 16px; margin: 14px 0 20px; }
.home-main .hero { margin: 0 0 14px; }
.home-main .progress-grid { margin: 0; }
.cloud-card { display: flex; align-items: flex-start; gap: 12px; min-width: 0; margin: 0; padding: 16px; border: 1px solid #d8e3e4; border-radius: 18px; background: #ffffffed; box-shadow: var(--shadow); }
.cloud-card.is-connected { border-color: #b8ded1; background: linear-gradient(145deg, #f8fffb, #ffffff); }
.cloud-email { margin: 3px 0 8px !important; color: var(--ink) !important; font-weight: 700; overflow-wrap: anywhere; }
.cloud-status { margin: 8px 0 !important; padding: 9px 10px; border-radius: 11px; background: #eef5f5; color: var(--ink) !important; font-size: .76rem !important; }
.cloud-card.is-connected .cloud-status { background: #e5f5ed; color: #155c43 !important; }
.cloud-mark { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 13px; background: #edf4f4; font-size: 1.2rem; }
.cloud-content, .cloud-card > div { min-width: 0; flex: 1; }
.cloud-card b { font-size: .9rem; }
.cloud-card p { margin: 4px 0 10px; color: var(--muted); font-size: .78rem; }
.cloud-label, .account-login .cloud-label { display: block; margin: 15px 0 7px; color: var(--ink); font-size: 1.12rem; font-weight: 800; }
.cloud-card input, .account-login input { width: 100%; min-height: 56px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); font: inherit; font-size: 1.1rem; }
.cloud-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cloud-button { min-height: 42px; padding: 9px 12px; border-radius: 12px; background: var(--ink); color: #fff !important; -webkit-text-fill-color: #fff; font-size: .8rem; }
.cloud-button.secondary { background: #e8f1f2; color: var(--ink) !important; -webkit-text-fill-color: var(--ink); }
.account-page { max-width: 560px; margin: 20px auto 40px; }
.account-page > .ghost { min-height: 42px; padding: 8px 12px; }
.account-card { margin-top: 16px; }
.account-card h1 { margin: 6px 0 8px; font-size: clamp(1.7rem, 7vw, 2.2rem); }
.account-card > p { color: var(--muted); }
.account-card .cloud-card { margin-top: 18px; box-shadow: none; }
.account-saved { padding: 11px 13px; border-radius: 13px; background: #e5f5ed; color: #155c43 !important; font-weight: 700; }
.account-card .cloud-label { display: block; margin: 17px 0 7px; color: var(--ink); font-size: 1rem; font-weight: 800; }
.account-card input { width: 100%; min-height: 52px; margin-bottom: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); font: inherit; font-size: 1rem; }
.account-card .cloud-button + .cloud-button { margin-left: 7px; }
.account-error { padding: 11px 13px; border-radius: 13px; background: var(--rose); color: var(--rose-ink) !important; }
.app-footer { display: flex; flex-direction: column; align-items: center; gap: 9px; margin: 35px 0 10px; padding: 20px 8px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #d9e1df; text-align: center; }
.app-footer p { max-width: 38ch; margin: 0; }
.app-footer p:last-child { margin-top: 8px; color: #687b82; }
.footer-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.reset-button { min-height: 42px; padding: 8px 12px; border: 1px solid #e7b7ae; border-radius: 12px; background: #fff4f1; color: #923e35 !important; -webkit-text-fill-color: #923e35; font-size: .82rem; font-weight: 700; }
.source-button { border-color: #a8d2bd; background: #edf8f1; color: #246b4a !important; -webkit-text-fill-color: #246b4a; }
.quiz-status { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 13px 0 15px; }
.quiz-status > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 58px; padding: 10px 13px; border: 1px solid #d5e2e4; border-radius: 15px; background: #eaf2f3; }
.quiz-status > div:last-child { background: #fff2d2; border-color: #ead6a2; }
.quiz-status span { color: #526874; font-size: .7rem; font-weight: 850; letter-spacing: .055em; }
.quiz-status b { color: #143a52; font-size: clamp(1.25rem, 5vw, 1.65rem); white-space: nowrap; }
.review-counter { margin: 14px 0; font-size: 1rem; font-weight: 800; }
@media (min-width: 460px) { .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .theme-tile:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 720px) { .home-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; } .cloud-card { order: 2; } }
@media (max-width: 380px) { .mode-card .row { flex-direction: column; } .mode-card .row button { min-height: 56px; } .progress-grid .stat span { font-size: .68rem; } .quiz-status > div { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; } }
@media (min-width: 650px) { .app { padding-right: 28px; padding-left: 28px; } .card { padding: 27px; } .cloud-card { padding: 18px; } }

/* Fiches visuelles du Livret du citoyen */
.livret-home-card { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 22px; margin: 16px 0; overflow: hidden; border: 2px solid #e8c787; background: radial-gradient(circle at 8% 18%, #fff1cc 0, transparent 38%), linear-gradient(125deg, #fff9eb, #fffdf8 70%); }
.livret-home-art { display: grid; min-height: 155px; place-items: center; border-radius: 22px; background: linear-gradient(150deg, #f8e2b7, #f5ede0); }
.livret-home-art svg { width: min(100%, 180px); filter: drop-shadow(0 9px 8px #76502d20); }
.livret-home-copy h2 { max-width: 24ch; margin: 5px 0 7px; font-size: clamp(1.35rem, 4vw, 1.8rem); line-height: 1.08; letter-spacing: -.025em; }
.livret-home-copy > p { max-width: 48ch; margin: 0; color: var(--muted); }
.livret-home-progress { margin-top: 12px; color: var(--mint-ink); font-size: .82rem; font-weight: 800; }
.livret-home-progress .progress { height: 7px; margin: 6px 0 11px; background: #e8e4d9; }
.livret-home-progress .progress > span { background: linear-gradient(90deg, #56a788, #188064); }
.livret-open-button { display: inline-flex; min-width: 190px; align-items: center; justify-content: space-between; gap: 16px; }
.livret-open-button span { font-size: 1.25rem; }
.livret-hero { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 22px; margin-top: 16px; padding: 18px; overflow: hidden; border: 0; background: linear-gradient(135deg, #133b52, #1f6570); color: #fff; }
.livret-hero-art { display: grid; min-height: 150px; place-items: center; overflow: hidden; border-radius: 20px; background: #ffffff12; }
.livret-hero-art .livret-illustration { width: 100%; }
.livret-hero-copy h1 { margin: 7px 0 10px; font-size: clamp(1.8rem, 5vw, 2.5rem); line-height: 1.05; }
.livret-hero-copy > p { margin: 0; color: #e4eff0; }
.livret-hero .eyebrow { color: #ffd57c; }
.livret-progress-line { margin-top: 12px; color: #fff; font-size: .85rem; }
.livret-progress-line .progress { margin: 6px 0 10px; background: #ffffff30; }
.livret-progress-line .progress > span { background: linear-gradient(90deg, #ffcf65, #6ad0ae); }
.livret-pdf-link { display: inline-flex; min-height: 42px; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid #ffffff50; border-radius: 12px; background: #ffffff16; color: #fff; font-size: .84rem; font-weight: 800; text-decoration: none; }
.livret-pdf-link:focus-visible, .livret-topic-card:focus-visible, .livret-done-button:focus-visible { outline: 3px solid #db773d; outline-offset: 3px; }
.livret-topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 15px 0; }
.livret-topic-card { position: relative; display: flex; width: 100%; min-height: 284px; flex-direction: column; align-items: flex-start; gap: 8px; overflow: hidden; padding: 15px; border: 1px solid #ffffffb0; border-radius: 22px; box-shadow: var(--shadow); }
.livret-topic-card::after { position: absolute; top: 16px; right: 16px; color: #143a5226; content: "✦"; font-size: 1.1rem; }
.livret-topic-card.blue, .livret-detail-hero.blue { background: linear-gradient(150deg, #e3eff7, #f9fcfc); }
.livret-topic-card.gold, .livret-detail-hero.gold { background: linear-gradient(150deg, #fff0cf, #fffaf0); }
.livret-topic-card.mint, .livret-detail-hero.mint { background: linear-gradient(150deg, #e0f1e9, #f7fbf8); }
.livret-topic-card.rose, .livret-detail-hero.rose { background: linear-gradient(150deg, #f7e4dc, #fcf8f4); }
.livret-topic-card.lavender, .livret-detail-hero.lavender { background: linear-gradient(150deg, #ece8f7, #faf9fe); }
.livret-card-number { position: absolute; top: 13px; right: 16px; color: #143a5248; font-size: 1rem; font-weight: 900; }
.livret-card-art { display: grid; width: 100%; height: 104px; place-items: center; overflow: hidden; border-radius: 15px; background: #ffffff9c; }
.livret-card-art .livret-illustration { width: 100%; max-width: 245px; height: auto; }
.livret-tag { color: #5a6e76; font-size: .68rem; font-weight: 900; letter-spacing: .075em; text-transform: uppercase; }
.livret-topic-card > b { max-width: 28ch; color: var(--ink); font-size: .98rem; line-height: 1.2; }
.livret-topic-meta { color: var(--muted); font-size: .76rem; }
.livret-topic-card .progress { width: 100%; height: 6px; margin: auto 0 0; background: #143a5218; }
.livret-topic-card .progress > span { background: linear-gradient(90deg, #e4aa4b, #328b6e); }
.livret-topic-done { display: flex; width: 100%; align-items: center; justify-content: space-between; color: #445b66; font-size: .73rem; font-weight: 700; }
.livret-topic-done span { color: #155c59; font-weight: 850; }
.livret-provenance { margin: 17px 5px 32px; color: var(--muted); font-size: .79rem; line-height: 1.45; }
.livret-detail-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(190px, .7fr); align-items: center; gap: 12px; margin-top: 16px; overflow: hidden; border: 1px solid #ffffffb0; }
.livret-detail-copy h1 { margin: 7px 0 10px; font-size: clamp(1.65rem, 6vw, 2.4rem); line-height: 1.05; }
.livret-detail-copy > p { margin: 0; color: #415762; }
.livret-detail-progress { margin-top: 15px; color: #315a5a; font-size: .83rem; }
.livret-detail-progress .progress { height: 7px; margin: 6px 0 0; background: #143a5218; }
.livret-detail-progress .progress > span { background: linear-gradient(90deg, #e5ad4e, #348b6e); }
.livret-detail-art { display: grid; min-height: 165px; place-items: center; }
.livret-detail-art .livret-illustration { width: 100%; filter: drop-shadow(0 8px 6px #143a5216); }
.livret-chapter-intro { margin: 22px 3px 10px; }
.livret-chapter-intro h2 { margin: 0 0 3px; font-size: 1.3rem; }
.livret-chapter-intro p { margin: 0; color: var(--muted); font-size: .9rem; }
.livret-chapter-list { display: grid; gap: 11px; }
.livret-chapter { overflow: hidden; border: 1px solid #d8e3e2; border-radius: 18px; background: #fffefb; box-shadow: 0 5px 15px #143a5208; }
.livret-chapter.is-done { border-color: #a9d1be; background: #f8fcf8; }
.livret-chapter details { margin: 0; }
.livret-chapter summary { display: flex; min-height: 72px; align-items: center; gap: 11px; padding: 13px 15px; list-style: none; cursor: pointer; }
.livret-chapter summary::-webkit-details-marker { display: none; }
.livret-chapter-num { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 12px; background: #e8f0f1; color: #24566b; font-weight: 900; }
.livret-chapter-title { min-width: 0; flex: 1; }
.livret-chapter-title b { display: block; color: var(--ink); font-size: .94rem; line-height: 1.22; }
.livret-chapter-title small { display: block; margin-top: 4px; color: #60737c; font-size: .74rem; }
.livret-chevron { color: #52727b; font-size: 1.3rem; transition: transform .2s ease; }
.livret-chapter details[open] .livret-chevron { transform: rotate(180deg); }
.livret-chapter-body { padding: 0 16px 16px 62px; }
.livret-chapter-body > p { margin: 0 0 13px; color: #304b59; font-size: .95rem; line-height: 1.58; }
.livret-remember { display: flex; gap: 10px; padding: 12px; border-radius: 14px; background: #f1f6f2; color: #244d42; }
.livret-remember > span { flex: 0 0 auto; color: #df9f3a; font-size: 1.15rem; }
.livret-remember b { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.livret-remember p { margin: 2px 0 0; font-size: .86rem; line-height: 1.4; }
.livret-done-button { min-height: 42px; margin-top: 12px; padding: 9px 13px; border: 1px solid #9dbfc0; border-radius: 12px; background: #eef5f4; font-size: .8rem; }
.livret-done-button.completed { border-color: #a2cdb6; background: #ddf1e5; color: #155a45 !important; -webkit-text-fill-color: #155a45; }
.livret-next { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0; background: #f2f6f5; }
.livret-next b { display: block; margin: 4px 0; }
.livret-next p { margin: 0; color: var(--muted); font-size: .8rem; }
.livret-next .livret-pdf-link { flex: 0 0 auto; border-color: #bed3d1; background: #fff; color: #174f55; }
@media (max-width: 540px) {
 .home-hero { padding: 13px 16px; }
 .home-hero h1 { max-width: 17ch; margin: 3px 0 5px; font-size: clamp(1.35rem, 5.7vw, 1.75rem); line-height: 1.08; }
 .footer-actions { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
 .footer-actions .reset-button { min-width: 0; padding: 8px 5px; font-size: .72rem; line-height: 1.2; }
 .livret-home-card { grid-template-columns: 1fr; gap: 14px; padding: 17px; }
 .livret-home-art { min-height: 124px; }
 .livret-home-art svg { width: 150px; }
 .livret-hero { grid-template-columns: 1fr; gap: 15px; padding: 17px; }
 .livret-hero-art { min-height: 112px; }
 .livret-hero-art .livret-illustration { width: 235px; }
 .livret-topic-grid { grid-template-columns: 1fr; }
 .livret-topic-card { min-height: 235px; }
 .livret-card-art { height: 100px; }
 .livret-detail-hero { grid-template-columns: 1fr; gap: 2px; padding: 19px; }
 .livret-detail-art { grid-row: 1; min-height: 115px; }
 .livret-detail-art .livret-illustration { max-width: 250px; }
 .livret-detail-copy { grid-row: 2; }
 .livret-chapter-body { padding-left: 16px; }
 .livret-next { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .livret-chevron { transition: none; } }

/* Accueil compact et actions de révision explicites */
.livret-home-card { grid-template-columns: 84px minmax(0, 1fr) 148px; gap: 14px; min-height: 108px; align-items: center; padding: 14px 18px; }
.livret-home-art { min-height: 76px; border-radius: 17px; }
.livret-home-art svg { width: 82px; }
.livret-home-copy h2 { margin: 3px 0 4px; font-size: clamp(1.12rem, 2.5vw, 1.45rem); }
.livret-home-copy > p { font-size: .84rem; }
.livret-open-button { width: 100%; min-width: 0; justify-content: center; gap: 7px; padding: 11px 10px; font-size: .85rem; text-align: center; }
.revision-actions { display: grid; gap: 8px; margin-top: 13px; }
.revision-action { display: grid; width: 100%; grid-template-columns: 42px minmax(0, 1fr) 18px; align-items: center; gap: 11px; min-height: 64px; padding: 9px 12px; border: 1px solid #d5e3e6; background: #fff; }
.revision-action > span:nth-child(2) { min-width: 0; }
.revision-action b { display: block; color: var(--ink); font-size: .9rem; line-height: 1.2; }
.revision-action small { display: block; margin-top: 3px; color: var(--muted); font-size: .75rem; font-weight: 550; line-height: 1.25; }
.revision-action-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 13px; background: #e9f1f2; font-size: 1.22rem; }
.revision-action-arrow { color: #58737a; font-size: 1.15rem; font-weight: 800; text-align: center; }
.revision-action:disabled { opacity: .62; }
.revision-action:focus-visible { outline: 3px solid #e67d35; outline-offset: 3px; }
@media (max-width: 540px) {
 .livret-home-card { grid-template-columns: 58px minmax(0, 1fr) 96px; gap: 8px; min-height: 0; padding: 12px; }
 .livret-home-art { min-height: 58px; border-radius: 14px; }
 .livret-home-art svg { width: 62px; }
 .livret-home-copy h2 { font-size: .94rem; line-height: 1.1; }
 .livret-home-copy > p { font-size: .7rem; line-height: 1.25; }
 .livret-open-button { min-height: 48px; padding: 8px 6px; border-radius: 12px; font-size: .73rem; line-height: 1.15; }
 .livret-open-button span { font-size: 1rem; }
 .revision-action { grid-template-columns: 38px minmax(0, 1fr) 16px; gap: 9px; min-height: 60px; padding: 8px 10px; }
 .revision-action-icon { width: 36px; height: 36px; border-radius: 11px; font-size: 1.08rem; }
 .revision-action b { font-size: .84rem; }
 .revision-action small { font-size: .72rem; }
}

/* Accueil illustré, navigation et fiches plus lisibles */
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) 190px; align-items: center; gap: 12px; min-height: 174px; padding: 22px 25px; border: 1px solid #e5d7b8; background: linear-gradient(110deg, #fff8e8 0%, #f4efe0 58%, #e5f0e7 100%); color: var(--ink); }
.home-hero::after { display: none; }
.home-hero .eyebrow { color: #78551d; }
.home-hero h1 { max-width: 20ch; margin: 5px 0 8px; font-size: clamp(1.65rem, 4.2vw, 2.25rem); }
.home-hero p { max-width: 43ch; color: #435c65; }
.home-hero-art { position: relative; display: grid; min-height: 126px; place-items: center; }
.hero-art-sun { position: absolute; width: 105px; height: 105px; border-radius: 50%; background: #f5d379; box-shadow: 0 0 0 15px #f5d37945, 0 0 0 29px #f5d37920; }
.hero-art-book { z-index: 1; display: grid; width: 100px; height: 78px; place-items: center; border: 3px solid #8d5735; border-radius: 12px 12px 18px 18px; background: #fffdf5; box-shadow: 0 9px 0 #dfc493; font-size: 2.8rem; transform: rotate(-5deg); }
.hero-art-ribbon { position: absolute; z-index: 2; right: 0; bottom: 0; display: grid; width: 48px; height: 48px; place-items: center; border: 3px solid #fff; border-radius: 50%; background: #fff; box-shadow: 0 4px 12px #143a5220; font-size: 1.4rem; }
.topline .home-back, .account-page > .home-back { display: inline-flex; min-height: 46px; align-items: center; gap: 8px; padding: 9px 15px; border: 1px solid #a9c3c7; border-radius: 14px; background: #fff; box-shadow: 0 4px 0 #d8e5e5; color: #17465a !important; font-weight: 800; }
.home-back span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 8px; background: #e8f3ef; color: #17624b; font-size: 1.1rem; }
.livret-topic-card::after { display: none; }
.livret-card-number { top: 12px; right: 13px; z-index: 2; display: grid; width: 54px; height: 54px; place-items: center; border: 2px solid #ffffffcf; border-radius: 17px; background: #ffffffc9; color: #143a52; box-shadow: 0 3px 12px #143a5218; font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.livret-topic-card { padding: 17px; }
.livret-card-art { width: 100%; }
.livret-topic-done { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; }
.livret-open-chip { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 9px; padding: 8px 15px; border: 1px solid #b7ceca; border-radius: 13px; background: #fff; box-shadow: 0 3px 0 #d5e4df; color: #155744; font-size: .9rem; font-weight: 850; }
.livret-open-chip b { font-size: 1.15rem; }
.footer-actions button { display: flex; align-items: center; justify-content: center; text-align: center; white-space: normal; }
.account-security { display: grid; gap: 8px; margin: 18px 0; padding: 16px; border: 1px solid #d8e4e5; border-radius: 16px; background: #f7faf9; }
.account-security h2 { margin: 0 0 3px; font-size: 1.05rem; }
.account-security .cloud-label { margin: 3px 0 -5px; }
.account-security .cloud-button { width: 100%; }
.forgot-password { min-height: 42px; margin-top: 8px; padding: 8px 4px; background: transparent; color: #155c43 !important; text-decoration: underline; text-underline-offset: 3px; }
.danger-button { margin-top: 12px; background: #fbe8e5 !important; color: #842e24 !important; -webkit-text-fill-color: #842e24 !important; border: 1px solid #e8b7ae !important; }
@media (max-width: 540px) {
 .home-hero { grid-template-columns: minmax(0, 1fr) 95px; min-height: 138px; gap: 2px; padding: 16px; }
 .home-hero h1 { max-width: 20ch; font-size: clamp(1.3rem, 5.2vw, 1.65rem); }
 .home-hero p { font-size: .83rem; line-height: 1.35; }
 .home-hero-art { min-height: 100px; }
 .hero-art-sun { width: 66px; height: 66px; box-shadow: 0 0 0 10px #f5d37945, 0 0 0 20px #f5d37920; }
 .hero-art-book { width: 66px; height: 54px; font-size: 2rem; }
 .hero-art-ribbon { right: -2px; bottom: 2px; width: 34px; height: 34px; font-size: 1rem; }
 .footer-actions .reset-button { min-height: 54px; padding: 8px 6px; font-size: .72rem; line-height: 1.25; }
 .livret-card-number { top: 9px; right: 10px; width: 50px; height: 50px; font-size: 1.45rem; }
 .livret-topic-card { padding: 14px; }
 .livret-open-chip { min-height: 42px; padding: 8px 13px; font-size: .92rem; }
}

/* Indicateurs visuels de progression et fiches de lecture développées */
.progress-grid { align-items: stretch; }
.progress-grid .stat-visual { display: flex; min-width: 0; min-height: 132px; flex-direction: column; justify-content: center; gap: 9px; padding: 14px 12px; border: 1px solid #dce6e8; background: #fff; text-align: left; }
.stat-visual-main { display: flex; align-items: center; gap: 12px; }
.stat-gauge { display: grid; width: 84px; height: 84px; flex: 0 0 84px; place-items: center; border-radius: 50%; background: conic-gradient(var(--gauge-color) var(--meter), #e5ebed 0); }
.stat-face { display: grid; width: 66px; height: 66px; place-items: center; border-radius: 50%; background: #fff; font-size: 3rem; line-height: 1; }
.stat-figure { min-width: 0; }
.progress-grid .stat-visual .stat-figure b { display: block; color: var(--tone-color); font-size: clamp(1.35rem, 3vw, 1.8rem); font-weight: 900; line-height: 1.05; }
.stat-figure b i { font-size: .72em; font-style: normal; }
.stat-figure > span { display: block; margin-top: 4px; color: #364f5d; font-size: .77rem; font-weight: 800; line-height: 1.15; }
.progress-grid .stat-visual > small { display: block; color: var(--muted); font-size: .73rem; font-weight: 650; line-height: 1.25; }
.tone-red { --tone-color:#b53b42; --gauge-color:#d44f54; }
.tone-amber { --tone-color:#a76414; --gauge-color:#e49b32; }
.tone-blue { --tone-color:#276b9a; --gauge-color:#3e91bd; }
.tone-green { --tone-color:#16734f; --gauge-color:#279869; }
.livret-chapter-lead { margin: 0 0 13px; padding: 12px 14px; border-left: 4px solid #7ca3ac; border-radius: 0 12px 12px 0; background: #f1f6f6; color: #254b5a; font-size: .96rem; font-weight: 700; line-height: 1.48; }
.livret-learning-block { margin: 13px 0; padding: 14px 15px; border: 1px solid #e1e9e9; border-radius: 15px; background: #fff; }
.livret-learning-block h3 { margin: 0 0 7px; color: #25586c; font-size: .93rem; line-height: 1.25; }
.livret-learning-block p { margin: 0; color: #344e5a; font-size: .93rem; line-height: 1.58; }
.livret-remember { margin-top: 15px; }
@media (max-width: 540px) {
 .progress-grid { gap: 7px; }
 .progress-grid .stat-visual { min-height: 132px; align-items: center; gap: 7px; padding: 10px 5px; text-align: center; }
 .stat-visual-main { flex-direction: column; gap: 6px; }
 .stat-gauge { width: 72px; height: 72px; flex-basis: 72px; }
 .stat-face { width: 58px; height: 58px; font-size: 2.6rem; line-height: 1; }
 .progress-grid .stat-visual .stat-figure b { font-size: clamp(1.12rem, 5vw, 1.4rem); }
 .stat-figure > span { font-size: .67rem; }
 .progress-grid .stat-visual > small { font-size: .63rem; }
 .livret-learning-block { margin: 10px 0; padding: 12px; }
 .livret-learning-block p { font-size: .91rem; line-height: 1.55; }
 .livret-chapter-lead { font-size: .92rem; }
}

/* Version 4 : QCM par thème et espace compte organisé */
.quiz-theme-entry { position: relative; margin-top: 16px; padding-top: 22px; background: #fff; border: 1px solid #e3d7b6; box-shadow: 0 4px 0 #efe3c5; }
.quiz-theme-new, .theme-tile-new { display: inline-flex; align-items: center; justify-content: center; padding: 3px 9px; border-radius: 99px; background: #dff4ed; color: #116149; font-size: .66rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.quiz-theme-new { position: absolute; top: -10px; left: 14px; border: 2px solid #fffdf8; }
.quiz-theme-grid .theme-tile { position: relative; padding-top: 36px; }
.theme-tile-new { position: absolute; top: 12px; right: 12px; }
.quiz-theme-grid .theme-count { color: var(--muted); }
.account-page { max-width: 620px; margin: 0 auto; }
.account-page > .home-back { margin: 4px 0 10px; }
.account-card { padding: 23px; }
.account-card > h1 { margin: 4px 0 5px; font-size: clamp(1.55rem, 5vw, 2rem); }
.account-saved { margin: 10px 0 18px; padding: 10px 12px; border-radius: 13px; background: #eaf5f0; color: #155c43; font-size: .87rem; font-weight: 750; }
.account-data-panel { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 19px 0 14px; padding: 15px; border: 1px solid #e1d1ca; border-radius: 17px; background: #fff7f4; }
.account-data-panel b { color: var(--ink); font-size: .92rem; }
.account-data-panel p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.account-data-panel .reset-button { flex: 0 0 auto; }
.account-session-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.account-session-actions > button { width: 100%; }
.account-security { margin-top: 20px; padding: 17px; border: 1px solid #dbe6e6; border-radius: 18px; background: #f7faf9; }
@media (max-width: 540px) {
 .quiz-theme-entry { grid-template-columns: 38px minmax(0, 1fr) 16px; }
 .account-card { padding: 18px; }
 .account-data-panel { align-items: stretch; flex-direction: column; gap: 10px; }
 .account-data-panel .reset-button { width: 100%; min-height: 50px; }
 .account-session-actions { grid-template-columns: 1fr; }
}

/* Ajustements de navigation demandés pour les QCM thématiques */
.theme-hero .eyebrow { color: #ffe3a0; }
.theme-hero h1 { color: #fff; }
.theme-hero .theme-intro-title { margin: -2px 0 8px; color: #fff; font-size: 1.03rem; font-weight: 750; }
.training-primary-actions { align-items: stretch; }
.training-primary-actions > button { position: relative; display: flex; min-height: 82px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 12px 10px 9px; text-align: center; }
.training-primary-actions .theme-quiz-button { padding-top: 18px; background: var(--sun); color: #3d2d08 !important; -webkit-text-fill-color: #3d2d08; box-shadow: 0 4px 0 #d39e2b; }
.training-primary-actions .quiz-theme-new { top: -9px; left: 50%; z-index: 2; transform: translateX(-50%); white-space: nowrap; }
.training-primary-actions small, .exam-launch small { color: inherit; font-size: .76rem; font-weight: 650; line-height: 1.2; }
.exam-launch { display: flex; width: 100%; min-height: 64px; align-items: center; justify-content: center; gap: 9px; margin-top: 16px; border: 1px solid #b7c7d9; border-radius: 17px; background: linear-gradient(100deg, #e7eef7, #d9e4f2); box-shadow: 0 4px 0 #b9c9dd; color: #183c5a !important; -webkit-text-fill-color: #183c5a; text-align: center; }
.exam-launch small { color: #3d5870; }
.topline .home-back { white-space: nowrap; }
@media (max-width: 540px) {
 .training-primary-actions { gap: 9px; }
 .training-primary-actions > button { min-height: 78px; padding-right: 7px; padding-left: 7px; font-size: .88rem; }
 .training-primary-actions small, .exam-launch small { font-size: .7rem; }
 .exam-launch { min-height: 60px; margin-top: 14px; font-size: .92rem; }
 .theme-hero h1 { font-size: clamp(1.75rem, 8vw, 2.5rem); }
}

/* QCM compacts, avec le même format que les commandes de révision */
.training-action-list { display: grid; gap: 8px; margin-top: 14px; }
.training-action { grid-template-columns: 42px minmax(0, 1fr) 18px; min-height: 60px; margin: 0; padding: 8px 12px; background: #fff; }
.training-action .revision-action-icon { width: 40px; height: 40px; }
.training-action .revision-action b { font-size: .9rem; }
.training-theme-action { grid-template-columns: 42px minmax(0, 1fr) auto 18px; }
.training-theme-action .quiz-theme-new { position: static; transform: none; border: 1px solid #cde4d9; }
.exam-action { border-color: #ebd0ca; background: #fff7f5; }
.exam-action .revision-action-icon { background: #f9e4df; color: #8b3024; }
.exam-action .revision-action b { color: #82382d; }
.exam-action .revision-action-arrow { color: #a45245; }
.quiz-theme-grid .theme-open { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; margin-top: auto; padding: 9px 14px; border: 1px solid #b9d3ca; border-radius: 13px; background: #fff; box-shadow: 0 3px 0 #d5e4df; color: #155744; font-size: .88rem; font-weight: 850; }
.quiz-theme-grid .theme-tile:hover .theme-open { background: #eaf5f0; border-color: #82b5a3; }
@media (max-width: 540px) {
 .training-action { grid-template-columns: 38px minmax(0, 1fr) 16px; min-height: 58px; padding: 7px 10px; }
 .training-action .revision-action-icon { width: 36px; height: 36px; }
 .training-action .revision-action b { font-size: .84rem; }
 .training-theme-action { grid-template-columns: 38px minmax(0, 1fr) auto 16px; gap: 7px; }
 .training-theme-action .quiz-theme-new { padding: 3px 7px; font-size: .61rem; }
 .quiz-theme-grid .theme-open { min-height: 42px; padding: 8px 12px; font-size: .82rem; }
}

/* Version 4.1 : formats par thème, compte en panneaux et boutons de révision homogènes */
.quiz-theme-grid .theme-tile { min-height: 252px; padding-top: 18px; }
.topic-mode-actions { display: grid; width: 100%; gap: 8px; margin-top: auto; }
.quiz-theme-grid .theme-open, .revision-theme-grid .theme-open { display: inline-flex; width: 100%; min-height: 44px; align-items: center; justify-content: center; margin-top: 0; padding: 9px 12px; border: 1px solid #b9d3ca; border-radius: 13px; background: #fff; box-shadow: 0 3px 0 #d5e4df; color: #155744; font: inherit; font-size: .84rem; font-weight: 850; text-align: center; }
.quiz-theme-grid .theme-open:hover, .revision-theme-grid .theme-open:hover { background: #eaf5f0; border-color: #82b5a3; }
.quiz-theme-grid .theme-open-all { border-color: #c9d5e5; background: #f7f9fc; box-shadow: 0 3px 0 #dce3ed; color: #31516a; }
.quiz-nav-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.quiz-nav-actions .home-back { min-height: 42px; padding: 8px 11px; font-size: .8rem; }
.account-identity { display: flex; align-items: center; gap: 12px; margin: 14px 0 19px; padding: 14px; border: 1px solid #d8e7e1; border-radius: 16px; background: linear-gradient(120deg,#eef8f3,#f8fbf9); }
.account-avatar { display: grid; width: 46px; height: 46px; flex: 0 0 46px; place-items: center; border-radius: 15px; background: #d6eee3; color: #145c43; font-size: 1.3rem; font-weight: 850; }
.account-identity > div { display: grid; min-width: 0; gap: 3px; }
.account-identity b { color: var(--ink); font-size: .96rem; }
.account-identity > div > span { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.account-edit-list { display: grid; gap: 9px; margin: 18px 0; }
.account-edit-list > h2 { margin: 0 0 2px; color: var(--ink); font-size: 1.08rem; }
.account-edit-option { overflow: hidden; border: 1px solid #dce6e6; border-radius: 15px; background: #fff; }
.account-edit-toggle { display: flex; width: 100%; min-height: 64px; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; background: #fff; color: var(--ink); text-align: left; }
.account-edit-toggle > span:first-child { display: grid; min-width: 0; gap: 3px; }
.account-edit-toggle b { font-size: .9rem; }
.account-edit-toggle small { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.account-edit-toggle > span:last-child { flex: 0 0 auto; color: #155c43; font-size: .8rem; font-weight: 800; }
.account-edit-option:has(.account-edit-panel:not([hidden])) { border-color: #a8cfc0; box-shadow: 0 5px 16px #143a520c; }
.account-edit-panel { padding: 13px 14px 15px; border-top: 1px solid #e4ece9; background: #f8fbfa; }
.account-edit-panel[hidden] { display: none !important; }
.account-edit-panel .cloud-label { margin-top: 9px; }
.account-edit-panel input { margin-bottom: 3px; }
.account-panel-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.account-panel-actions .cloud-button { min-height: 44px; }
.account-panel-note { margin: 0 0 5px; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.account-session-actions { grid-template-columns: 1fr 1fr; gap: 9px; }
.account-session-actions > button { min-height: 48px; margin: 0; padding: 8px 9px; font-size: .78rem; }
.account-session-actions .danger-button { background: #fff1ef; color: #8e3029 !important; -webkit-text-fill-color: #8e3029; border: 1px solid #e9bdb7; }
.livret-hero { grid-template-columns: 165px minmax(0, 1fr); gap: 16px; padding: 15px; }
.livret-hero-art { min-height: 122px; }
.livret-hero-copy h1 { margin: 5px 0 7px; font-size: clamp(1.65rem, 4.5vw, 2.2rem); }
@media (max-width: 540px) {
 .quiz-theme-grid .theme-tile { min-height: 254px; padding: 15px; }
 .quiz-theme-grid .theme-open, .revision-theme-grid .theme-open { min-height: 44px; padding: 8px 10px; font-size: .78rem; }
 .quiz-nav-actions { gap: 6px; }
 .quiz-nav-actions .home-back { min-height: 40px; padding: 7px 9px; font-size: .72rem; }
 .topline:has(.quiz-nav-actions) { align-items: flex-start; }
 .topline:has(.quiz-nav-actions) > .pill { margin-top: 5px; font-size: .67rem; }
 .account-session-actions { grid-template-columns: 1fr 1fr !important; }
 .account-session-actions > button { min-height: 52px; font-size: .73rem; line-height: 1.2; }
 .account-panel-actions { display: grid; grid-template-columns: 1fr 1fr; }
 .account-panel-actions .cloud-button { padding: 8px 7px; font-size: .76rem; }
 .livret-hero { grid-template-columns: 72px minmax(0,1fr); align-items: start; gap: 11px; padding: 12px; }
 .livret-hero-art { min-height: 74px; border-radius: 14px; }
 .livret-hero-art .livret-illustration { width: 94px; }
 .livret-hero-copy h1 { margin: 3px 0 5px; font-size: 1.28rem; line-height: 1.08; }
 .livret-hero-copy .eyebrow { font-size: .62rem; }
 .livret-hero-copy > p { font-size: .74rem; line-height: 1.34; }
 .livret-hero .livret-progress-line { margin-top: 7px; }
 .livret-hero .livret-pdf-link { gap: 5px; margin-top: 7px; font-size: .68rem; }
}
@media (min-width: 541px) {
 .livret-hero { grid-template-columns: 140px minmax(0,1fr); gap: 14px; padding: 13px; }
 .livret-hero-art { min-height: 104px; }
 .livret-hero-copy h1 { font-size: clamp(1.55rem, 4vw, 2rem); }
 .livret-hero-copy > p { font-size: .9rem; line-height: 1.42; }
 .livret-hero .livret-pdf-link { min-height: 44px; margin-top: 9px; padding: 9px 12px; font-size: .86rem; }
}

/* Version 4.2 : confirmer le choix avant de comptabiliser la réponse */
.choice.selected { border: 2px solid #28689a; background: #eaf3fb; box-shadow: 0 0 0 2px #28689a22; }
.choice.selected .choice-letter { background: #28689a; color: #fff; }
.result-navigation { flex-wrap: wrap; gap: 10px; }
