:root {
  --ro-bg: #f5f8f6;
  --ro-surface: #ffffff;
  --ro-ink: #17221d;
  --ro-muted: #65756c;
  --ro-green: #38b86b;
  --ro-green-dark: #1f8e4c;
  --ro-green-soft: #e9f8ef;
  --ro-gold: #f1b92b;
  --ro-red: #ef5b5b;
  --ro-red-soft: #fff0f0;
  --ro-blue: #4c8bf5;
  --ro-border: #dfe8e2;
  --ro-shadow: 0 10px 28px rgba(22, 52, 38, .09);
  --ro-radius: 22px;
  --ro-safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body { margin: 0 !important; min-height: 100%; background: var(--ro-bg) !important; }
body.revision-occult-clean-shell { overflow-x: hidden; color: var(--ro-ink); }
body.revision-occult-clean-shell * { box-sizing: border-box; }
body.revision-occult-clean-shell #wpadminbar { display: none !important; }
.ro-page { min-height: 100dvh; }
.ro-app { min-height: 100dvh; background: radial-gradient(circle at 90% -10%, #dff7e8 0, transparent 34%), var(--ro-bg); }
.ro-shell { min-height: 100dvh; max-width: 760px; margin: 0 auto; position: relative; padding-bottom: calc(88px + var(--ro-safe-bottom)); }
.ro-main { padding: 18px 18px 24px; }
.ro-loading { min-height: 100dvh; display: grid; place-content: center; text-align: center; color: var(--ro-muted); gap: 14px; }
.ro-loader { width: 48px; height: 48px; border: 5px solid #d9eee0; border-top-color: var(--ro-green); border-radius: 50%; animation: ro-spin .85s linear infinite; margin: 0 auto; }
@keyframes ro-spin { to { transform: rotate(360deg); } }

.ro-topbar { position: sticky; top: 0; z-index: 20; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: rgba(245,248,246,.92); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(223,232,226,.75); }
.ro-topbar-inner { max-width: 728px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ro-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ro-brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: #13251d; box-shadow: inset 0 -3px 0 rgba(0,0,0,.22); font-size: 23px; }
.ro-brand-copy { min-width: 0; }
.ro-brand-copy strong { display: block; font-size: 16px; line-height: 1.05; }
.ro-brand-copy small { display: block; color: var(--ro-muted); font-size: 11px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ro-stats { display: flex; gap: 7px; }
.ro-stat { display: inline-flex; align-items: center; gap: 4px; background: var(--ro-surface); border: 1px solid var(--ro-border); border-radius: 999px; padding: 7px 9px; font-weight: 800; font-size: 12px; box-shadow: 0 2px 0 rgba(22,52,38,.06); }
.ro-stat-heart { color: var(--ro-red); }
.ro-stat-fire { color: #f28a24; }
.ro-stat-xp { color: var(--ro-blue); }

.ro-hero { padding: 24px; background: linear-gradient(145deg, #13251d, #214936); border-radius: 28px; color: white; box-shadow: 0 16px 36px rgba(19,37,29,.2); position: relative; overflow: hidden; }
.ro-hero:after { content: ""; position: absolute; width: 220px; height: 220px; right: -78px; top: -98px; border-radius: 50%; background: rgba(87,220,135,.16); }
.ro-hero-row { display: flex; gap: 16px; align-items: center; position: relative; z-index: 1; }
.ro-mascot { flex: 0 0 82px; width: 82px; height: 82px; display: grid; place-items: center; border-radius: 26px; background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.14); font-size: 48px; filter: drop-shadow(0 7px 8px rgba(0,0,0,.2)); }
.ro-hero h1 { margin: 0 0 8px; font-size: clamp(25px, 7vw, 36px); line-height: 1.05; letter-spacing: -.03em; }
.ro-hero p { margin: 0; color: #cfe7d8; line-height: 1.45; font-size: 14px; }
.ro-daily { margin-top: 18px; position: relative; z-index: 1; }
.ro-progress-track { height: 12px; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; }
.ro-progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #50dc83, #a6ed70); transition: width .4s ease; }
.ro-progress-label { display: flex; justify-content: space-between; margin-top: 7px; font-size: 12px; color: #d6eadf; }

.ro-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 24px; }
.ro-btn { border: 0; border-radius: 16px; min-height: 52px; padding: 12px 16px; font: inherit; font-weight: 850; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; -webkit-tap-highlight-color: transparent; }
.ro-btn:active { transform: translateY(2px); box-shadow: none !important; }
.ro-btn:focus-visible, .ro-option:focus-visible, .ro-nav-btn:focus-visible, .ro-module-node:focus-visible { outline: 3px solid rgba(76,139,245,.35); outline-offset: 2px; }
.ro-btn-primary { background: var(--ro-green); color: #fff; box-shadow: 0 5px 0 var(--ro-green-dark); }
.ro-btn-secondary { background: var(--ro-surface); color: var(--ro-ink); border: 1px solid var(--ro-border); box-shadow: 0 4px 0 #d8e2dc; }
.ro-btn-dark { background: #1f3028; color: white; box-shadow: 0 5px 0 #0f1914; }
.ro-btn-danger { background: var(--ro-red); color: white; box-shadow: 0 5px 0 #c53f3f; }
.ro-btn-ghost { background: transparent; color: var(--ro-muted); border: 1px solid var(--ro-border); }
.ro-btn-wide { width: 100%; }
.ro-btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }

.ro-section-title { margin: 24px 2px 12px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.ro-section-title h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.ro-section-title p { margin: 4px 0 0; color: var(--ro-muted); font-size: 13px; }
.ro-section-title button { border: 0; background: transparent; color: var(--ro-green-dark); font-weight: 800; cursor: pointer; }

.ro-path { display: grid; gap: 14px; position: relative; }
.ro-path:before { content: ""; position: absolute; left: 34px; top: 35px; bottom: 35px; width: 5px; border-radius: 99px; background: #dce9e0; }
.ro-module { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 13px; position: relative; }
.ro-module-node { width: 70px; height: 70px; border: 0; border-radius: 24px; background: var(--ro-green); color: white; font-size: 31px; box-shadow: 0 6px 0 var(--ro-green-dark), 0 10px 24px rgba(31,142,76,.18); cursor: pointer; z-index: 1; }
.ro-module-node.is-mastered { background: var(--ro-gold); box-shadow: 0 6px 0 #c38b08, 0 10px 24px rgba(241,185,43,.2); }
.ro-module-card { background: var(--ro-surface); border: 1px solid var(--ro-border); border-radius: 20px; padding: 15px 16px; box-shadow: 0 4px 16px rgba(22,52,38,.05); cursor: pointer; }
.ro-module-card h3 { margin: 0 0 4px; font-size: 16px; }
.ro-module-card p { margin: 0 0 10px; font-size: 12px; color: var(--ro-muted); line-height: 1.35; }
.ro-module-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 11px; font-weight: 800; }
.ro-mini-track { flex: 1; height: 8px; border-radius: 999px; background: #e7eee9; overflow: hidden; }
.ro-mini-track i { display: block; height: 100%; background: var(--ro-green); border-radius: inherit; }
.ro-stars { color: var(--ro-gold); letter-spacing: 1px; }

.ro-bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 8px 12px calc(8px + var(--ro-safe-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(16px); border-top: 1px solid var(--ro-border); }
.ro-bottom-nav-inner { max-width: 728px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ro-nav-btn { border: 0; background: transparent; color: var(--ro-muted); border-radius: 14px; min-height: 54px; font: inherit; cursor: pointer; display: grid; place-items: center; gap: 2px; font-size: 20px; }
.ro-nav-btn span { font-size: 10px; font-weight: 800; }
.ro-nav-btn.is-active { background: var(--ro-green-soft); color: var(--ro-green-dark); }

.ro-card { background: var(--ro-surface); border: 1px solid var(--ro-border); border-radius: var(--ro-radius); padding: 18px; box-shadow: var(--ro-shadow); }
.ro-card + .ro-card { margin-top: 13px; }
.ro-card h2, .ro-card h3 { margin-top: 0; }
.ro-card p:last-child { margin-bottom: 0; }
.ro-page-title { margin: 10px 0 18px; }
.ro-page-title h1 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.ro-page-title p { margin: 6px 0 0; color: var(--ro-muted); }
.ro-study-card summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; }
.ro-study-card summary::-webkit-details-marker { display:none; }
.ro-study-emoji { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 25px; background: var(--ro-green-soft); }
.ro-study-title { flex: 1; }
.ro-study-title strong { display: block; }
.ro-study-title small { color: var(--ro-muted); }
.ro-chevron { transition: transform .2s ease; }
details[open] .ro-chevron { transform: rotate(180deg); }
.ro-study-content { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ro-border); }
.ro-script { white-space: pre-wrap; font-family: inherit; font-size: 14px; line-height: 1.62; color: #35453c; margin: 0; }
.ro-note { padding: 12px 14px; border-radius: 14px; background: #fff7da; color: #775909; font-size: 12px; line-height: 1.45; margin-bottom: 14px; }
.ro-key-dates { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 15px; }
.ro-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 10px; background: #eff4f1; color: #53635a; font-size: 11px; font-weight: 800; }

.ro-lesson-shell { min-height: 100dvh; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; background: var(--ro-bg); }
.ro-lesson-head { padding: calc(14px + env(safe-area-inset-top,0px)) 16px 12px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; }
.ro-icon-btn { width: 42px; height: 42px; border: 0; border-radius: 14px; background: transparent; color: var(--ro-muted); font-size: 24px; cursor: pointer; }
.ro-lesson-progress { height: 13px; border-radius: 999px; background: #dce6df; overflow: hidden; }
.ro-lesson-progress i { display: block; height: 100%; border-radius: inherit; background: var(--ro-green); transition: width .3s ease; }
.ro-lesson-heart { color: var(--ro-red); font-weight: 900; min-width: 42px; text-align: right; }
.ro-question-wrap { flex: 1; padding: 24px 18px 150px; display: flex; flex-direction: column; }
.ro-question-kicker { color: var(--ro-green-dark); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; }
.ro-question { font-size: clamp(24px, 7vw, 34px); line-height: 1.16; letter-spacing: -.035em; margin: 10px 0 24px; }
.ro-options { display: grid; gap: 12px; }
.ro-option { width: 100%; border: 2px solid var(--ro-border); border-bottom-width: 4px; border-radius: 17px; padding: 15px 16px; background: white; color: var(--ro-ink); font: inherit; font-weight: 760; text-align: left; cursor: pointer; transition: border .12s ease, background .12s ease, transform .12s ease; }
.ro-option:hover { border-color: #b9cec0; }
.ro-option.is-selected { border-color: var(--ro-blue); background: #edf4ff; color: #225fbf; }
.ro-option.is-correct { border-color: var(--ro-green); background: var(--ro-green-soft); color: var(--ro-green-dark); }
.ro-option.is-wrong { border-color: var(--ro-red); background: var(--ro-red-soft); color: #b53838; }
.ro-option-index { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 1px solid currentColor; margin-right: 10px; font-size: 11px; }
.ro-fill-input { width: 100%; min-height: 58px; border: 2px solid var(--ro-border); border-bottom-width: 4px; border-radius: 17px; padding: 13px 15px; background: white; color: var(--ro-ink); font: inherit; font-size: 17px; outline: none; }
.ro-fill-input:focus { border-color: var(--ro-blue); }
.ro-fill-input.is-correct { border-color: var(--ro-green); background: var(--ro-green-soft); color: var(--ro-green-dark); }
.ro-fill-input.is-wrong { border-color: var(--ro-red); background: var(--ro-red-soft); color: #9f2525; }
.ro-answer-comparison { display: grid; gap: 8px; margin: 0 0 12px 54px; }
.ro-answer-comparison > div { background: rgba(255,255,255,.72); border: 1px solid rgba(170,75,75,.18); border-radius: 12px; padding: 9px 11px; }
.ro-answer-comparison span { display: block; color: var(--ro-muted); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.ro-answer-comparison strong { display: block; color: var(--ro-ink); font-size: 14px; line-height: 1.35; }
.ro-order-zone { min-height: 84px; border: 2px dashed #c9d8cf; border-radius: 18px; padding: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; margin-bottom: 16px; background: rgba(255,255,255,.58); }
.ro-order-zone:empty:before { content: "Touche les éléments dans le bon ordre"; color: var(--ro-muted); font-size: 13px; padding: 9px; }
.ro-order-chip { border: 1px solid var(--ro-border); border-bottom-width: 3px; border-radius: 13px; padding: 10px 12px; background: white; font: inherit; font-weight: 750; cursor: pointer; color: var(--ro-ink); }
.ro-order-chip.is-used { opacity: .28; pointer-events: none; }
.ro-lesson-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 13px 16px calc(14px + var(--ro-safe-bottom)); background: white; border-top: 1px solid var(--ro-border); }
.ro-lesson-footer-inner { max-width: 728px; margin: 0 auto; }
.ro-feedback { background: white; }
.ro-feedback.is-correct { background: var(--ro-green-soft); border-top-color: #b9e6c9; }
.ro-feedback.is-wrong { background: var(--ro-red-soft); border-top-color: #f2caca; }
.ro-feedback-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.ro-feedback-icon { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 23px; background: white; }
.ro-feedback-copy strong { display: block; font-size: 18px; }
.ro-feedback-copy p { margin: 4px 0 0; color: var(--ro-muted); font-size: 13px; line-height: 1.4; }
.ro-feedback.is-correct .ro-feedback-copy strong { color: var(--ro-green-dark); }
.ro-feedback.is-wrong .ro-feedback-copy strong { color: #bd3f3f; }
.ro-shake { animation: ro-shake .35s ease; }
@keyframes ro-shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

.ro-summary { min-height: 100dvh; display: grid; place-items: center; padding: 24px 18px; }
.ro-summary-card { width: min(100%, 520px); text-align: center; background: white; border-radius: 30px; padding: 30px 22px; box-shadow: var(--ro-shadow); border: 1px solid var(--ro-border); }
.ro-summary-emoji { font-size: 68px; margin-bottom: 10px; }
.ro-summary h1 { margin: 0 0 8px; font-size: 30px; }
.ro-summary p { color: var(--ro-muted); }
.ro-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
.ro-summary-stat { border-radius: 16px; padding: 13px 7px; background: #f1f6f3; }
.ro-summary-stat strong { display: block; font-size: 21px; }
.ro-summary-stat small { color: var(--ro-muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }

.ro-mistake-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--ro-border); }
.ro-mistake-item:last-child { border-bottom: 0; }
.ro-mistake-count { flex: 0 0 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--ro-red-soft); color: var(--ro-red); font-weight: 900; }
.ro-mistake-copy strong { display: block; font-size: 14px; line-height: 1.35; }
.ro-mistake-copy small { color: var(--ro-muted); }
.ro-empty { text-align: center; padding: 30px 16px; }
.ro-empty-emoji { font-size: 54px; }

.ro-profile-stat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.ro-profile-stat { padding: 18px; border-radius: 18px; background: white; border: 1px solid var(--ro-border); }
.ro-profile-stat strong { display: block; font-size: 28px; }
.ro-profile-stat small { color: var(--ro-muted); font-weight: 700; }
.ro-setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ro-toggle { width: 52px; height: 30px; border-radius: 999px; border: 0; background: #cbd8d0; padding: 3px; cursor: pointer; }
.ro-toggle i { display: block; width: 24px; height: 24px; border-radius: 50%; background: white; transition: transform .2s ease; box-shadow: 0 2px 5px rgba(0,0,0,.16); }
.ro-toggle.is-on { background: var(--ro-green); }
.ro-toggle.is-on i { transform: translateX(22px); }

.ro-toast { position: fixed; left: 50%; bottom: calc(92px + var(--ro-safe-bottom)); transform: translate(-50%, 20px); background: #17221d; color: white; padding: 11px 15px; border-radius: 999px; font-size: 13px; font-weight: 750; z-index: 100; opacity: 0; pointer-events: none; transition: .2s ease; white-space: nowrap; max-width: calc(100vw - 24px); overflow: hidden; text-overflow: ellipsis; }
.ro-toast.is-visible { opacity: 1; transform: translate(-50%,0); }
.ro-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 120; overflow: hidden; }
.ro-confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: ro-fall 1.6s ease-in forwards; }
@keyframes ro-fall { to { transform: translate3d(var(--x), 110vh, 0) rotate(720deg); opacity: .85; } }

@media (min-width: 700px) {
  .ro-main { padding: 26px 24px 40px; }
  .ro-module { grid-template-columns: 82px 1fr; }
  .ro-path:before { left: 40px; }
  .ro-module-node { width: 80px; height: 80px; }
  .ro-question-wrap { padding-left: 50px; padding-right: 50px; }
}
@media (max-width: 390px) {
  .ro-brand-copy small { display: none; }
  .ro-stat { padding: 6px 7px; }
  .ro-hero { padding: 20px; }
  .ro-mascot { flex-basis: 66px; width: 66px; height: 66px; font-size: 39px; }
  .ro-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
