/* ═════ Cours guidé, parcours, dialogues, accueil ═════ */
main.wrap, .s-body { animation: fadeUp .28s ease both; }
.ro { font-family: var(--font); font-size: .62em; color: var(--muted); font-weight: 500; letter-spacing: .02em; line-height: 1.3; }
.ro.block { display: block; margin-top: 2px; }
.ro.lg { font-size: 18px; margin-top: 4px; }
.s-prompt .ro.block { font-size: 17px; margin-top: 6px; }
.choice .ch-txt { display: flex; flex-direction: column; }
.choice .ro.block { font-size: 13px; margin-top: 1px; }
.v-jp .ro.block { font-size: 12.5px; }
.fb-answer .ro { font-size: 13px; margin-left: 6px; }
.fb-reveal { margin-top: 6px; }
.fb-reveal .jp { font-size: 17px; }
.fb-reveal .ro.block { font-size: 13px; }
.examples .ro.block { font-size: 13px; margin: 1px 0 2px; }
.ro-inline { font-family: var(--font); color: var(--muted); font-size: 14px; margin-left: 6px; }

/* Leçon 0 sur l'accueil */
.lessons.one { grid-template-columns: 1fr; }
.lesson-card.zero { background: linear-gradient(120deg, var(--accent-soft), var(--surface) 70%); border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.lc-n svg { width: 24px; height: 24px; color: var(--accent); }
.lc-badge.big .lc-n svg { width: 30px; height: 30px; }
.lesson-card.zero .lc-jp { white-space: normal; }
.lc-stats.one { grid-template-columns: 1fr; max-width: 320px; }
.quick-card.next { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.quick-card.next .qc-icon { background: color-mix(in srgb, var(--bg) 16%, transparent); color: var(--bg); }
.quick-card.next .qc-icon svg { fill: currentColor; }
.quick-card.next .qc-txt span { color: color-mix(in srgb, var(--bg) 70%, transparent); }

/* Parcours */
.path-head { display: flex; align-items: center; gap: 14px; margin: 4px 4px 8px; font-size: 14.5px; color: var(--muted); }
.path-head b { color: var(--ink); }
.path-head .pl-bar { flex: 1; }
.path-note { font-size: 13.5px; color: var(--muted); margin: 0 4px 8px; }
.path { list-style: none; margin: 14px 0 0; padding: 0; position: relative; }
.path::before { content: ""; position: absolute; left: 31px; top: 24px; bottom: 24px; width: 2px; background: var(--line); border-radius: 2px; }
.step { position: relative; margin-bottom: 8px; }
.step-btn { width: 100%; display: flex; align-items: center; gap: 16px; padding: 10px 14px 10px 8px; border-radius: 18px; text-align: left; border: 1px solid transparent; transition: background .15s, transform .12s; }
.step-btn:hover:not(:disabled) { background: var(--surface); }
.step-dot { position: relative; z-index: 1; width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); color: var(--ink-2); transition: transform .2s, background .2s; }
.step-dot svg { width: 21px; height: 21px; }
.step-dot b { font-size: 19px; font-weight: 700; }
.step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.step-body b { font-size: 16px; font-weight: 600; }
.step-body small { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-body small.jp { font-size: 14.5px; }
.step.done .step-dot { background: var(--good); border-color: var(--good); color: #fff; }
.step.done .step-dot svg { stroke-width: 2.6; }
.step-again { color: var(--muted); opacity: 0; transition: opacity .15s; }
.step-again svg { width: 18px; height: 18px; }
.step-btn:hover .step-again { opacity: 1; }
.step.current .step-btn { background: var(--surface); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: var(--shadow); padding: 14px 16px 14px 8px; }
.step.current .step-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: scale(1.08); animation: pulse 2.2s ease-in-out infinite; }
.step-cta { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: var(--accent); }
.step-cta svg { width: 17px; height: 17px; }
.step.locked { opacity: .45; }
.step.locked .step-dot svg { width: 17px; height: 17px; }
.step.t-exam .step-dot, .step.t-exam0 .step-dot { color: var(--gold); }
.step.t-exam.done .step-dot, .step.t-exam0.done .step-dot { background: var(--gold); border-color: var(--gold); color: #fff; }
.step.current.t-exam .step-dot, .step.current.t-exam0 .step-dot { color: #fff; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent); } 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 5%, transparent); } }

/* Pages de lecture */
.read-head { display: flex; align-items: center; gap: 16px; margin: 14px 0 20px; }
.read-head h1 { margin: 2px 0 0; font-size: 26px; letter-spacing: -.02em; line-height: 1.2; }
.read-icon { width: 52px; height: 52px; flex: none; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.read-icon svg { width: 26px; height: 26px; }
.prose .icon-btn.sm { font-size: 15px; color: var(--accent); }
.prose.culture { border-left: 4px solid var(--accent); }
.step-foot { display: flex; justify-content: center; margin: 28px 0 8px; }
.step-foot .btn svg { width: 18px; height: 18px; }

/* Dialogue */
.scene { font-style: italic; color: var(--muted); margin: -6px 0 14px; }
.cast { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.who { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); }
.who small { font-weight: 400; color: var(--muted); }
.who i, .avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12.5px; font-weight: 700; color: #fff; flex: none; }
.who-lea i, .avatar.who-lea { background: #d4442a; }
.who-kenta i, .avatar.who-kenta { background: #2f6db5; }
.who-mori i, .avatar.who-mori { background: #3a8a58; }
.who-mika i, .avatar.who-mika { background: #b5508f; }
.who-clerk i, .avatar.who-clerk { background: #8a7a5c; }
.dia-tools { display: flex; gap: 10px; margin-bottom: 18px; }
.dia-tools .btn { height: 42px; font-size: 14.5px; }
.dia-tools .btn svg { width: 16px; height: 16px; fill: currentColor; }
.toggle-btn.on { background: var(--surface-2); color: var(--ink); }
.dialogue { display: flex; flex-direction: column; gap: 12px; }
.bubble-row { display: flex; align-items: flex-end; gap: 10px; }
.bubble-row.me { flex-direction: row-reverse; }
.avatar { width: 34px; height: 34px; font-size: 14px; }
.bubble { max-width: 76%; padding: 12px 16px; border-radius: 20px 20px 20px 6px; background: var(--surface); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s, border-color .2s; }
.bubble-row.me .bubble { border-radius: 20px 20px 6px 20px; background: var(--accent-soft); border-color: transparent; }
.bubble-row.playing .bubble { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); transform: scale(1.015); }
.b-name { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .03em; margin-bottom: 2px; }
.b-jp { font-size: 19px; line-height: 1.55; }
.bubble .ro.block { font-size: 13px; margin-top: 2px; }
.b-fr { display: none; font-size: 14px; color: var(--ink-2); margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.dialogue.show-tr .b-fr { display: block; animation: fadeUp .2s ease; }

/* Écran de bienvenue */
body.in-welcome { background: radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), var(--bg) 60%); }
.welcome { max-width: 760px; margin: 0 auto; padding: 8vh 20px 48px; text-align: center; animation: fadeUp .4s ease both; }
.wl-logo { width: 78px; height: 78px; margin: 0 auto 22px; border-radius: 22px; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: var(--jp-hand); font-size: 44px; font-weight: 600; box-shadow: 0 14px 40px color-mix(in srgb, var(--accent) 35%, transparent); animation: pop .6s ease; }
.welcome h1 { font-size: 34px; letter-spacing: -.03em; margin: 0 0 12px; }
.wl-lead { font-size: 18px; color: var(--ink-2); max-width: 560px; margin: 0 auto 34px; }
.wl-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: left; }
.wl-card { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 8px; padding: 24px; border-radius: 22px; background: var(--surface); border: 1.5px solid var(--line); transition: transform .15s, border-color .15s, box-shadow .15s; }
.wl-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.wl-card b { font-size: 20px; letter-spacing: -.01em; }
.wl-card > span:not(.wl-icon) { color: var(--muted); font-size: 15px; line-height: 1.5; flex: 1; }
.wl-card em { font-style: normal; font-weight: 700; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.wl-card em svg { width: 17px; height: 17px; }
.wl-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 6px; }
.wl-icon svg { width: 24px; height: 24px; }
.result-msg.warn { background: var(--bad-soft); }
.row-btns .btn svg { width: 17px; height: 17px; }

@media (max-width: 600px) {
  .wl-choices { grid-template-columns: 1fr; }
  .welcome h1 { font-size: 27px; }
  .bubble { max-width: 82%; }
  .b-jp { font-size: 17.5px; }
  .step-cta { display: none; }
  .read-head h1 { font-size: 22px; }
}
