/* Kotoba — apprentissage JP / ZH. Même palette « soft summer » sombre que la nutrition
   (famille visuelle cohérente). Lilas = japonais, rose = mandarin. */

:root {
  --fond: #121A20;               /* ardoise-pétrole (≠ prune des autres apps) */
  --surface: #1E2B32;
  --surface-2: #17232A;
  --encre: #E7EEF0;
  --encre-douce: #A4B5B9;
  --encre-faible: #6F8186;
  --ligne: #2B3B42;
  --ligne-douce: #1F2D33;
  --jade: #8FC7AC;               /* accent mandarin */
  --jade-clair: #ABDDC4;
  --azur: #90B7D8;               /* accent japonais */
  --azur-clair: #ADD1EE;
  --corail: #D6A79E;             /* note « encore » — doux, jamais de rouge vif */
  --sauge: #8FC7AC;              /* pastille « appris » */
  /* alias pour les dégradés de marque (toujours jade → azur) */
  --lilas: var(--jade); --lilas-clair: var(--jade-clair);
  --rose: var(--azur); --rose-clair: var(--azur-clair);
  --accent: var(--azur);         /* japonais par défaut ; bascule selon la langue (js) */
  --accent-clair: var(--azur-clair);
  --rayon: 20px;
  --rayon-s: 14px;
  --ombre: 0 1px 0 var(--ligne-douce), 0 18px 34px -28px rgba(0,0,0,.6);
}
:root[data-langue="zh"] { --accent: var(--jade); --accent-clair: var(--jade-clair); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--encre);
  background:
    radial-gradient(120% 90% at 88% -12%, color-mix(in srgb, var(--jade) 22%, transparent), transparent 60%),
    radial-gradient(95% 78% at 0% 112%, color-mix(in srgb, var(--azur) 20%, transparent), transparent 58%),
    var(--fond);
  background-attachment: fixed;
  font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  min-height: 100vh;
}
button, input, textarea, select { font: inherit; color: inherit; }
.titre, .seg-nom, .chiffre-n, .carte-titre, .fab, .btn, .mot-grand, .lecture, .note,
.mini-n, .segment .seg { font-family: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif; }

/* ---------- structure ---------- */
.app { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.vue { padding: calc(14px + env(safe-area-inset-top)) 18px 0; max-width: 540px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 14px; }
.entete { margin: 6px 2px 2px; padding-right: 44px; }
.entete-reglages { display: flex; align-items: center; justify-content: space-between; padding-right: 0; padding-top: 6px; }
.date { margin: 0 0 3px; color: var(--encre-faible); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.titre { margin: 0; font-size: 27px; font-weight: 600; letter-spacing: -.02em; }

.rouage { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 14px; z-index: 20;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--ligne);
  background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--encre-douce);
  font-size: 18px; backdrop-filter: blur(8px); cursor: pointer; }

/* ---------- cartes ---------- */
.carte { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon);
  box-shadow: var(--ombre); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.carte-titre { margin: 0; font-size: 15px; font-weight: 600; }
.aide { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--encre-faible); }

/* ---------- segment langue ---------- */
.segment { display: flex; gap: 6px; background: var(--surface-2); border: 1px solid var(--ligne);
  border-radius: var(--rayon-s); padding: 5px; }
.seg { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 0; background: transparent; color: var(--encre-douce); cursor: pointer;
  border-radius: 11px; padding: 9px 4px; transition: background .2s, color .2s; }
.seg-nom { font-size: 17px; font-weight: 600; }
.seg-sous { font-size: 10.5px; color: var(--encre-faible); font-family: -apple-system, system-ui, sans-serif; }
.seg.actif { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--accent-clair); }
.seg.actif .seg-sous { color: color-mix(in srgb, var(--accent-clair) 75%, var(--encre-faible)); }

/* ---------- carte du jour ---------- */
.jour-chiffres { display: flex; align-items: center; }
.chiffre { flex: 1; text-align: center; }
.chiffre-sep { width: 1px; align-self: stretch; background: var(--ligne); margin: 4px 0; }
.chiffre-n { font-size: 40px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.chiffre-neuf { color: var(--accent-clair); }
.chiffre-k { font-size: 11.5px; color: var(--encre-faible); font-weight: 600; margin-top: 2px; }
.jour-etat { margin: 2px 0 0; text-align: center; font-size: 13px; color: var(--encre-douce); }
.jour-actions { display: flex; gap: 10px; margin-top: 4px; }
.jour-actions .btn { flex: 1; }

/* ---------- progression ---------- */
.barre-appris { height: 10px; border-radius: 999px; background: var(--ligne); overflow: hidden; }
.barre-appris-r { height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--lilas), var(--rose)); transition: width .5s ease; }
.mini-stats { display: flex; gap: 8px; }
.mini { flex: 1; background: var(--surface-2); border-radius: var(--rayon-s); padding: 11px 8px; text-align: center; }
.mini-n { display: block; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-k { font-size: 10.5px; color: var(--encre-faible); }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--rayon-s); padding: 13px 16px;
  font-size: 15px; font-weight: 600; cursor: pointer; width: 100%; }
.btn:disabled { opacity: .4; cursor: default; }
.btn-plein { background: linear-gradient(150deg, var(--accent), var(--rose)); color: #2E2340; }
.btn-doux { background: var(--surface-2); border-color: var(--ligne); color: var(--encre); }
.btn-fantome { background: transparent; border-color: var(--ligne); color: var(--encre-douce); }
.btn-danger { color: var(--corail); border-color: color-mix(in srgb, var(--corail) 40%, var(--ligne)); }

/* ---------- nav ---------- */
.onglets { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 30;
  width: 100%; max-width: 540px; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 46px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-top: 1px solid var(--ligne); backdrop-filter: blur(12px); }
.onglets > button[data-vue] { display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: 0; background: transparent; cursor: pointer; color: var(--encre-faible); font-size: 10.5px; font-weight: 600;
  font-family: ui-rounded, system-ui, sans-serif; }
.onglets > button[data-vue] span { font-size: 19px; line-height: 1; }
.onglets > button.actif { color: var(--accent-clair); }
.fab { width: 58px; height: 58px; margin-top: -26px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(150deg, var(--accent), var(--rose)); color: #2E2340;
  display: grid; place-items: center; font-size: 24px; line-height: 1;
  box-shadow: 0 14px 26px -8px color-mix(in srgb, var(--accent) 60%, transparent), inset 0 1px 0 rgba(255,255,255,.35); }
.fab span { margin-left: 3px; }

/* ---------- réglages ---------- */
.btn-fermer { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--ligne);
  background: var(--surface-2); color: var(--encre-douce); font-size: 15px; cursor: pointer; flex: 0 0 auto; }
.ligne { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 14px; }
.ligne select { width: 56%; background: var(--surface-2); border: 1px solid var(--ligne); border-radius: 10px; padding: 9px 11px; }
.ligne.interrupteur input { width: auto; transform: scale(1.3); accent-color: var(--accent); }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--ligne);
  background: var(--surface-2); color: var(--encre); font-size: 18px; cursor: pointer; }
.stepper span { min-width: 34px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.version { text-align: center; color: var(--encre-faible); font-size: 12px; margin: 6px 0 0; }

/* ---------- recherche + liste cartes ---------- */
.recherche { display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--ligne); border-radius: var(--rayon-s); padding: 12px 14px; }
.recherche svg { width: 18px; height: 18px; color: var(--encre-faible); flex: 0 0 auto; }
.recherche input { flex: 1; border: 0; background: transparent; outline: none; font-size: 15px; }
.cat-titre { display: flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em; color: var(--encre-faible); margin: 16px 2px 8px; }
.ligne-mot { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 11px 14px; background: var(--surface); border: 1px solid var(--ligne);
  border-radius: var(--rayon-s); margin-bottom: 7px; cursor: pointer; box-shadow: var(--ombre); }
.lm-emo { font-size: 22px; flex: 0 0 auto; width: 30px; text-align: center; }
.lm-mid { flex: 1; min-width: 0; }
.lm-mot { display: block; font-size: 16px; font-weight: 600; }
.lm-mot small { font-weight: 400; color: var(--encre-douce); font-size: 12.5px; margin-left: 8px; }
.lm-fr { display: block; font-size: 11.5px; color: var(--encre-faible); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-pastille { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: var(--ligne); }
.lm-pastille.cours { background: var(--accent); }
.lm-pastille.appris { background: var(--sauge); }
.etat { text-align: center; color: var(--encre-faible); font-size: 13px; padding: 28px 10px; }

/* ---------- session plein écran ---------- */
.session { position: fixed; inset: 0; z-index: 60; background:
    radial-gradient(120% 80% at 50% -10%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 55%), var(--fond);
  display: flex; flex-direction: column; max-width: 540px; margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top)) 18px calc(16px + env(safe-area-inset-bottom)); }
.session-tete { display: flex; align-items: center; gap: 12px; }
.progres { flex: 1; height: 8px; border-radius: 999px; background: var(--ligne); overflow: hidden; }
.progres-r { height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width .3s ease; }
.session-compte { font-size: 12.5px; font-weight: 600; color: var(--encre-faible); font-variant-numeric: tabular-nums; min-width: 42px; text-align: right; }

.carte-zone { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; text-align: center; padding: 10px 0; }
.mode-tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--encre-faible); }

/* le « recto » — soit l'écriture, soit un gros bouton son */
.mot-grand { font-size: clamp(58px, 22vw, 104px); font-weight: 600; line-height: 1; letter-spacing: .01em; }
.emo-grand { font-size: clamp(66px, 26vw, 120px); line-height: 1; }
.lecture { font-size: 22px; font-weight: 600; color: var(--accent-clair); font-variant-numeric: tabular-nums; }
.sens-peek { font-size: 17px; color: var(--encre-douce); }

/* bouton haut-parleur */
.hp { width: 96px; height: 96px; border-radius: 50%; border: 1px solid var(--ligne);
  background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent-clair);
  font-size: 40px; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 12px 30px -14px color-mix(in srgb, var(--accent) 70%, transparent); }
.hp:active { transform: scale(.95); }
.hp.petit { width: 52px; height: 52px; font-size: 22px; }
.hp.lecture-son { display: inline-flex; }

.reveal { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.reveal-ligne { display: flex; align-items: center; gap: 14px; }
.phrase { margin-top: 6px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--ligne);
  border-radius: var(--rayon-s); max-width: 340px; }
.phrase-mot { font-size: 19px; font-weight: 600; }
.phrase-lec { font-size: 13px; color: var(--accent-clair); margin-top: 3px; }
.phrase-fr { font-size: 12.5px; color: var(--encre-faible); margin-top: 2px; }

.bouton-peek { border: 0; background: transparent; color: var(--encre-faible); font-size: 13px;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* bas de session : « Voir » puis les 3 notes */
.session-bas { display: flex; flex-direction: column; gap: 10px; min-height: 56px; }
.notes { display: flex; gap: 8px; }
.note { flex: 1; border: 1px solid var(--ligne); border-radius: var(--rayon-s); padding: 13px 6px;
  font-size: 13.5px; font-weight: 600; cursor: pointer; background: var(--surface-2); color: var(--encre);
  display: flex; flex-direction: column; align-items: center; gap: 2px; }
.note small { font-size: 10px; font-weight: 500; color: var(--encre-faible); }
.note.facile { border-color: color-mix(in srgb, var(--azur) 50%, var(--ligne)); color: var(--azur-clair); }
.note.bien   { border-color: color-mix(in srgb, var(--jade) 50%, var(--ligne)); color: var(--jade-clair); }
.note.encore { border-color: color-mix(in srgb, var(--corail) 45%, var(--ligne)); color: var(--corail); }

/* écran de fin de session */
.fin { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.fin-emo { font-size: 64px; }
.fin-titre { font-size: 22px; font-weight: 600; font-family: ui-rounded, system-ui, sans-serif; }
.fin-sous { font-size: 14px; color: var(--encre-douce); max-width: 300px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 90; background: var(--encre); color: var(--fond); padding: 11px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.4);
  display: flex; align-items: center; gap: 14px; max-width: 88vw; }
.toast button { border: 0; background: transparent; color: var(--lilas); font-weight: 700; cursor: pointer; font-size: 13.5px; }

/* ---------- nav à 3 onglets (sans fab) ---------- */
.onglets.tri { justify-content: space-around; padding-left: 20px; padding-right: 20px; }

/* ---------- section Phrases : parcours ---------- */
.motif { display: block; width: 100%; text-align: left; margin-bottom: 9px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon-s);
  box-shadow: var(--ombre); padding: 14px 15px; }
.motif-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.motif-t { font-size: 15.5px; font-weight: 600; font-family: ui-rounded, system-ui, sans-serif; }
.motif-check { color: var(--sauge); font-weight: 700; }
.motif-sous { font-size: 12px; color: var(--encre-faible); margin: 3px 0 10px; }
.motif-jauge { height: 6px; border-radius: 999px; background: var(--ligne); overflow: hidden; }
.motif-jauge-r { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--jade), var(--azur)); }

/* ---------- exercices (dans l'overlay session) ---------- */
.motif-nom { font-size: 22px; font-weight: 600; font-family: ui-rounded, system-ui, sans-serif; letter-spacing: -.01em; }
.mode-tag.ok { color: var(--jade-clair); }

.lecon-exs { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 340px; }
.lecon-ex { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon-s); padding: 14px; }
.lecon-emo { font-size: 30px; letter-spacing: 4px; }
.lecon-txt { font-size: 22px; font-weight: 600; }
.lecon-lec { font-size: 13px; color: var(--accent-clair); }

.scene-mini { font-size: 40px; letter-spacing: 6px; }
.scene-mini.grand { font-size: 52px; }
.choix-scenes { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 320px; }
.scene { font-size: 34px; letter-spacing: 8px; cursor: pointer; padding: 16px 10px;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon-s); }
.scene.faux { opacity: .4; border-color: color-mix(in srgb, var(--corail) 55%, var(--ligne)); }

.phrase-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; }
.tuile { font-size: 20px; font-weight: 600; padding: 10px 14px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: 12px; color: var(--encre);
  font-family: ui-rounded, system-ui, sans-serif; }
.tuile.fixe { cursor: default; }
.tuile-trou { font-size: 20px; font-weight: 700; padding: 10px 20px; border-radius: 12px;
  border: 1.6px dashed color-mix(in srgb, var(--accent) 60%, var(--ligne)); color: var(--accent-clair);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }

.options { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.option { font-size: 19px; font-weight: 600; padding: 12px 18px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: 12px; color: var(--encre);
  font-family: ui-rounded, system-ui, sans-serif; }
.option.faux { opacity: .4; border-color: color-mix(in srgb, var(--corail) 55%, var(--ligne)); }

.reponse { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px;
  min-height: 52px; width: 100%; max-width: 340px; padding: 10px; border-radius: var(--rayon-s);
  border: 1px dashed var(--ligne); }
.reponse.faux { animation: secoue .3s; border-color: color-mix(in srgb, var(--corail) 60%, var(--ligne)); }
.reponse-vide { color: var(--encre-faible); font-size: 12.5px; }
.banque { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; max-width: 340px; }

.phrase-finale { font-size: 30px; font-weight: 600; }

@keyframes secoue { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---------- niveau + série ---------- */
.niveau-chip { display: flex; align-items: center; gap: 12px; background: var(--surface);
  border: 1px solid var(--ligne); border-radius: var(--rayon-s); box-shadow: var(--ombre); padding: 11px 14px; }
.niv-emo { font-size: 26px; flex: 0 0 auto; }
.niv-mid { flex: 1; min-width: 0; }
.niv-haut { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.niv-nom { font-size: 13.5px; font-weight: 600; font-family: ui-rounded, system-ui, sans-serif; }
.niv-xp { font-size: 11.5px; color: var(--encre-faible); font-variant-numeric: tabular-nums; }
.niv-bar { height: 7px; border-radius: 999px; background: var(--ligne); overflow: hidden; margin-top: 5px; }
.niv-bar-r { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--jade), var(--azur)); transition: width .5s ease; }
.niv-serie { flex: 0 0 auto; font-size: 12.5px; font-weight: 600; color: var(--accent-clair); font-variant-numeric: tabular-nums; }

/* ---------- quêtes du jour ---------- */
.quetes-tete { display: flex; align-items: center; justify-content: space-between; }
.anneau-quetes { position: relative; width: 44px; height: 44px; flex: 0 0 auto; }
.anneau-quetes svg { transform: rotate(-90deg); }
.aq-fond { fill: none; stroke: var(--ligne); stroke-width: 4; }
.aq-jauge { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.aq-txt { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  font-family: ui-rounded, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
#liste-quetes { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.quete { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--ligne); border-radius: var(--rayon-s); padding: 12px 14px; }
.quete .q-emo { font-size: 20px; width: 26px; text-align: center; flex: 0 0 auto; }
.q-mid { flex: 1; min-width: 0; }
.q-lab { display: block; font-size: 14px; font-weight: 600; }
.q-sous { display: block; font-size: 11.5px; color: var(--encre-faible); margin-top: 1px; }
.q-prog { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--encre-douce); font-variant-numeric: tabular-nums; }
.quete.fait { opacity: .7; }
.quete.fait .q-emo { color: var(--sauge); }
.quete.fait .q-lab { text-decoration: line-through; text-decoration-color: var(--encre-faible); }

/* ---------- badges ---------- */
.badges-compte { font-size: 12px; font-weight: 600; color: var(--encre-faible); }
.grille-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--ligne); border-radius: 12px; padding: 10px 4px; }
.badge-emo { font-size: 22px; filter: grayscale(1); opacity: .45; }
.badge.ok .badge-emo { filter: none; opacity: 1; }
.badge-nom { font-size: 8.5px; line-height: 1.2; text-align: center; color: var(--encre-faible); }
.badge.ok .badge-nom { color: var(--encre-douce); }

/* ---------- Desktop : barre latérale + grilles 2 colonnes ---------- */
@media (min-width: 820px) {
  /* la nav du bas devient un rail vertical à gauche */
  .onglets.tri {
    top: 0; bottom: 0; left: 0; right: auto; transform: none;
    width: 94px; height: 100vh; max-width: none;
    flex-direction: column; justify-content: flex-start; gap: 6px;
    padding: 26px 9px calc(26px + env(safe-area-inset-bottom));
    border-top: 0; border-right: 1px solid var(--ligne);
  }
  .onglets.tri > button[data-vue] { width: 100%; padding: 13px 0; gap: 5px; border-radius: 12px; }
  .onglets.tri > button[data-vue] span { font-size: 21px; }
  .onglets.tri > button.actif { background: color-mix(in srgb, var(--accent) 16%, transparent); }
  .onglets.tri > button[data-vue]:hover { color: var(--accent-clair); }

  /* contenu décalé pour laisser la place au rail */
  .app { padding-bottom: 0; padding-left: 94px; }
  .vue { padding-top: 26px; }

  /* les vues « liste » respirent plus large */
  #vue-cartes, #vue-phrases { max-width: 780px; }

  /* deck en 2 colonnes (titres de catégorie sur toute la largeur) */
  #liste-cartes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
  #liste-cartes .cat-titre { grid-column: 1 / -1; }
  #liste-cartes .ligne-mot { margin-bottom: 0; }

  /* parcours de motifs en 2 colonnes */
  #liste-motifs { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  #liste-motifs .motif { margin-bottom: 0; }

  /* session d'étude : fond plein écran, contenu centré et confortable */
  .session { max-width: none; }
  .session-tete, .carte-zone, .session-bas { width: 100%; max-width: 600px; margin-left: auto; margin-right: auto; }

  .rouage { right: 22px; }

  /* survol souris */
  .ligne-mot:hover, .motif:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--ligne)); }
  .btn:hover:not(:disabled) { filter: brightness(1.06); }
  .scene:hover, .option:hover, .tuile:hover, .lecon-ex:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--ligne)); }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .reponse.faux { animation: none; } }
