/* Rue des Lilas — illustrated bedtime stories (shelf + night-time reader). */

/* Shelf on the Histoires du soir page */
.rdls2-shelf { margin: 18px 0 8px; }
.rdls2-shelf .list-h small { font-weight: 600; font-size: .8rem; opacity: .7; margin-left: 6px; }
.rdls2-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 8px; }
.rdls2-card { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 14px; border-radius: 18px; text-decoration: none; color: #f6f1ff; box-shadow: 0 8px 22px #0003; transition: transform .15s; position: relative; overflow: hidden; }
.rdls2-card:hover { transform: translateY(-3px); }
.rdls2-card::after { content: "✦ ✧ ✦"; position: absolute; right: 10px; top: 6px; font-size: .7rem; opacity: .5; letter-spacing: 4px; }
.rdls2-card .em { font-size: 2.2rem; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: #ffffff22; }
.rdls2-card .tx { display: grid; gap: 3px; }
.rdls2-card .tag { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; opacity: .85; }
.rdls2-card strong { font-size: 1.05rem; line-height: 1.25; }
.rdls2-card .muted { color: #e6dcf5 !important; font-size: .85rem; line-height: 1.35; }
.rdls2-card .read { font-size: .78rem; font-weight: 800; color: #ffd86b; }
.sky-pink { background: linear-gradient(150deg, #5b2a6e, #b04f8a); }
.sky-blue { background: linear-gradient(150deg, #142447, #2d4f8a); }
.sky-purple { background: linear-gradient(150deg, #241a4a, #5a3d99); }

/* Reader */
.rdls2 { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: auto 1fr auto; color: #f6f1ff; font-family: var(--font, system-ui, sans-serif); overflow: hidden; animation: rdls2-in .35s ease-out; }
@keyframes rdls2-in { from { opacity: 0; } }
.rdls2 *, .rdls2 *::before, .rdls2 *::after { box-sizing: border-box; }
.rdls2 button { font: inherit; color: inherit; cursor: pointer; }
.rdls2 [hidden] { display: none !important; }
.rdls2-open #app { visibility: hidden; }
.rdls2-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.rdls2-sky i { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; background: #fff; opacity: .2; animation: rdls2-tw 3.5s ease-in-out infinite; }
@keyframes rdls2-tw { 50% { opacity: .95; transform: scale(1.4); } }
.rdls2-sky .moon { position: absolute; right: 7%; top: 9%; width: 70px; height: 70px; border-radius: 50%; box-shadow: -14px 8px 0 0 #fbe7a1; transform: rotate(-20deg); opacity: .85; }
.rdls2.sky-pink { background: radial-gradient(ellipse at 70% 10%, #8a3f86, #2e1740 60%, #1b0f2b); }
.rdls2.sky-blue { background: radial-gradient(ellipse at 70% 10%, #2c4f8f, #101c3a 60%, #070e22); }
.rdls2.sky-purple { background: radial-gradient(ellipse at 70% 10%, #5b3fa3, #1d1442 60%, #0f0a26); }

.rdls2-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: #0000002e; backdrop-filter: blur(6px); }
.rdls2-back { border: 0; background: none; padding: 6px 8px; margin-left: -8px; border-radius: 10px; font-weight: 700; color: #ffd86b; }
.rdls2-back:hover { background: #ffffff1a; }
.rdls2-title { flex: 1; min-width: 0; display: grid; }
.rdls2-title strong { font-family: "Fraunces", var(--serif, Georgia, serif); font-weight: 600; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rdls2-title small { font-size: .75rem; opacity: .75; }
.rdls2-tool { border: 1px solid #ffffff40; background: #ffffff14; border-radius: 999px; min-width: 40px; height: 36px; padding: 0 10px; font-size: .85rem; font-weight: 700; }
.rdls2-tool[aria-pressed="true"] { background: #ffd86b; color: #2a1d4a; border-color: #ffd86b; }

.rdls2-main { overflow-y: auto; min-height: 0; padding: 14px clamp(14px, 4vw, 40px) 20px; }
.rdls2-page { max-width: 720px; margin: 0 auto; text-align: center; opacity: 0; transition: opacity .45s ease, transform .45s ease; }
.rdls2-page.from-right { transform: translateX(40px); } .rdls2-page.from-left { transform: translateX(-40px); }
.rdls2-page.in { opacity: 1; transform: none; }
.rdls2-scene { font-size: clamp(4.2rem, 16vw, 7rem); line-height: 1.1; margin: 8px 0 6px; filter: drop-shadow(0 8px 18px #0006); animation: rdls2-float 4s ease-in-out infinite; letter-spacing: .05em; }
@keyframes rdls2-float { 50% { transform: translateY(-8px); } }
.rdls2-ch { font-family: "Fraunces", var(--serif, Georgia, serif); font-weight: 600; font-size: clamp(1.3rem, 4vw, 1.7rem); color: #ffd86b; margin: 4px 0 12px; }
.rdls2-ch small { display: none; font-family: var(--font, system-ui, sans-serif); font-size: .85rem; color: #e6dcf5; font-weight: 400; font-style: italic; }
.rdls2.show-en .rdls2-ch small { display: block; }
.rdls2-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; text-align: left; }
.rdls2-lines li { padding: 12px 16px; border-radius: 16px; background: #ffffff12; border: 1px solid #ffffff1c; font-size: clamp(1.08rem, 2.8vw, 1.28rem); line-height: 1.55; cursor: pointer; transition: background .25s, transform .25s; }
.rdls2-lines li:hover { background: #ffffff1f; }
.rdls2-lines li.cur { background: #ffd86b2e; border-color: #ffd86b; transform: scale(1.015); box-shadow: 0 0 22px #ffd86b33; }
.rdls2-en { display: none; font-size: .82em; color: #d9cdee; font-style: italic; margin-top: 4px; }
.rdls2.show-en .rdls2-en { display: block; }
.rdls2-pn { font-size: .8rem; opacity: .55; margin: 14px 0 0; }

.rdls2-guess .q, .rdls2-joke .q { font-size: clamp(1.15rem, 3vw, 1.4rem); font-weight: 700; line-height: 1.45; margin: 4px 0 14px; cursor: pointer; }
.rdls2-guess .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rdls2-opt { border: 2px solid #ffffff40; background: #ffffff14; border-radius: 16px; padding: 14px 10px; font-size: 1.1rem; font-weight: 800; transition: transform .12s; }
.rdls2-opt:hover:not(:disabled) { transform: translateY(-2px); border-color: #ffd86b; }
.rdls2-opt:disabled { cursor: default; }
.rdls2-opt.right { background: #3f9a6b; border-color: #9fe0bd; }
.rdls2-opt.wrong { opacity: .45; }
.rdls2-verdict { margin-top: 14px; padding: 14px; border-radius: 16px; background: #ffffff18; animation: rdls2-in .4s ease; }
.rdls2-verdict.ok { border: 1px solid #9fe0bd; } .rdls2-verdict.ko { border: 1px solid #ffd86b; }
.rdls2-verdict p { margin: 0 0 10px; font-size: 1.08rem; line-height: 1.5; }
.rdls2-joke .a { font-size: clamp(1.3rem, 3.6vw, 1.7rem); font-weight: 800; color: #ffd86b; animation: rdls2-pop .45s ease; }
@keyframes rdls2-pop { from { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } }

.rdls2-btn { border: 2px solid #ffd86b; background: #ffd86b; color: #2a1d4a !important; border-radius: 999px; padding: 10px 18px; font-weight: 800; font-size: 1rem; }
.rdls2-btn.ghost { background: none; color: #ffd86b !important; }
.rdls2-btn.reveal { animation: rdls2-wig 2.4s ease-in-out infinite; }
@keyframes rdls2-wig { 0%, 80%, 100% { transform: none; } 85% { transform: rotate(-4deg); } 90% { transform: rotate(4deg); } }
.rdls2-page.end h2 { font-family: "Fraunces", var(--serif, Georgia, serif); font-size: 2.6rem; color: #ffd86b; margin: 0; }
.rdls2-sub { font-size: 1.15rem; margin: 4px 0 18px; }
.rdls2-endbtns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* Bottom bar */
.rdls2-bar { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: #0000003a; backdrop-filter: blur(6px); }
.rdls2-nav { width: 52px; height: 52px; border-radius: 50%; border: 1px solid #ffffff40; background: #ffffff14; font-size: 1.1rem; }
.rdls2-nav:disabled { opacity: .3; cursor: default; }
.rdls2-mid { display: grid; justify-items: center; gap: 6px; }
.rdls2-play { width: 64px; height: 64px; border-radius: 50%; border: 0; background: #ffd86b; color: #2a1d4a !important; font-size: 1.5rem; box-shadow: 0 0 0 6px #ffd86b33; }
.rdls2-play.on { animation: rdls2-glow 1.6s infinite; }
@keyframes rdls2-glow { 50% { box-shadow: 0 0 0 14px #ffd86b14; } }
.rdls2-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.rdls2-dots i { width: 8px; height: 8px; border-radius: 50%; background: #ffffff40; font-style: normal; }
.rdls2-dots i.done { background: #ffd86b99; }
.rdls2-dots i.cur { background: #ffd86b; transform: scale(1.4); }
.rdls2-dots i.end { width: auto; height: auto; background: none; font-size: .7rem; line-height: 8px; color: #ffffff60; }
.rdls2-dots i.end.cur { color: #ffd86b; }
.rdls2-opts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.rdls2-opts button { border: 1px solid #ffffff40; background: none; border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 700; }
.rdls2-opts button[aria-pressed="true"] { background: #ffffff26; border-color: #ffd86b; color: #ffd86b; }

@media (max-width: 640px) {
  .rdls2-back span { display: none; }
  .rdls2-guess .opts { grid-template-columns: 1fr; }
  .rdls2-sky .moon { display: none; }
}
@media (prefers-reduced-motion: reduce) { .rdls2-sky i, .rdls2-scene, .rdls2-play.on, .rdls2-btn.reveal { animation: none !important; } .rdls2-page { transition: none; } }
