/* Écrans d'accueil, d'offre et de compte (js/onboard.js) : une page de parchemin dans une reliure de cuir, comme le livre du menu. */
#ob { position: fixed; inset: 0; z-index: 35; display: none; place-items: center; padding: calc(12px + var(--safe-t, 0px)) 12px calc(12px + var(--safe-b, 0px)); background: rgba(12, 8, 6, .62); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); touch-action: pan-y; user-select: none; }
#ob.on { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.ob-reel { min-width: 0; max-width: calc(100% + 12px); }
#ob.wait { cursor: progress; } #ob.wait .ob-go { filter: saturate(.6) brightness(.9); pointer-events: none; }
.ob-card { position: relative; width: min(560px, 100%); max-height: 100%; display: flex; padding: 10px; background: #4a2416; box-shadow: 0 0 0 3px #1e0f08, inset 0 0 0 3px #6e3a22, 0 34px 70px -24px rgba(0, 0, 0, .9); }
#ob[data-s=ob_tour] .ob-card, #ob[data-s=ob_plan] .ob-card { width: min(720px, 100%); }
.ob-card.in { animation: obin .34s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes obin { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.ob-pg { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b89a62 transparent; padding: 18px 34px 26px; display: flex; flex-direction: column; color: var(--bink, #33241a); background: linear-gradient(180deg, var(--parch-2, #f4e9cb), var(--parch, #ecdcb8)); box-shadow: inset 0 0 0 1px rgba(120, 84, 40, .3), inset 0 0 40px -10px rgba(120, 84, 40, .35); text-align: left; }
.ob-pg > * { flex: none; }
.ob-top { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; min-height: 40px; margin: 0 -18px 2px; }
.ob-back, .ob-x { width: 40px; height: 40px; display: grid; place-items: center; color: var(--brass, #8a6430); font-size: 30px; line-height: 1; cursor: pointer; }
.ob-back svg { width: 10px; height: 15px; } .ob-back:hover, .ob-x:hover, .ob-back:focus-visible, .ob-x:focus-visible { color: var(--rub, #9a3324); outline: none; }
.ob-x { grid-column: 3; }
.ob-dots { display: flex; justify-content: center; gap: 8px; } .ob-dots i { width: 9px; height: 9px; background: #d2bd8e; box-shadow: 0 0 0 2px #b89a62; }
.ob-dots i.ok { background: var(--brass, #8a6430); box-shadow: 0 0 0 2px #6b4a20; } .ob-dots i.on { background: var(--rub, #9a3324); box-shadow: 0 0 0 2px #5a1a10; transform: scale(1.2); }
.ob-med { align-self: center; width: 64px; height: 64px; display: grid; place-items: center; margin: 0 0 10px; color: #f3dcaa; background: #8a2e20; box-shadow: 0 0 0 3px #2a120c, inset -3px -3px 0 #62190f, inset 3px 3px 0 #b85a44; }
.ob-med svg { width: 34px; height: 34px; }
.ob-k { font-size: 14px; letter-spacing: .16em; text-transform: uppercase; color: var(--rub, #9a3324); text-align: center; }
.ob-h { font-family: var(--disp); font-weight: 400; font-size-adjust: none; letter-spacing: 0; font-size: clamp(36px, 7vw, 50px); line-height: 1; margin: 6px 0 0; color: #2a1c12; text-align: center; overflow-wrap: anywhere; }
.ob-h::first-letter { color: var(--rub, #9a3324); }
.ob-rule { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 14px; color: var(--brass, #8a6430); }
.ob-rule::before, .ob-rule::after { content: ''; width: 64px; height: 2px; background: currentColor; opacity: .5; }
.ob-rule i { width: 8px; height: 8px; background: var(--rub, #9a3324); transform: rotate(45deg); }
.ob-p { font-size: 20px; line-height: 1.2; color: var(--bink, #33241a); margin: 0 0 10px; text-align: center; }
.ob-p b { font-weight: 400; color: var(--rub, #9a3324); overflow-wrap: anywhere; }
.ob-mute { color: var(--bink-2, #6b5236); font-size: 18px; }
.ob-lead { font-size: 23px; line-height: 1.18; text-align: center; color: #2a1c12; margin: 0 0 14px; }
.ob-lbl { display: block; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--brass, #8a6430); margin: 10px 0 7px; }
.ob-in { width: 100%; font: 20px/1.2 var(--sans); padding: 11px 14px 12px; color: #2a1c12; background: #fffaeb; border: 0; border-radius: 0; box-shadow: inset 0 0 0 2px #b89a62, inset 3px 3px 0 rgba(120, 84, 40, .12); outline: none; user-select: text; -webkit-user-select: text; touch-action: manipulation; }
.ob-in:focus { box-shadow: inset 0 0 0 3px var(--rub, #9a3324); }
.ob-in::placeholder { color: #a8936c; }
.ob-code { font-size: 32px; letter-spacing: .45em; text-align: center; padding-left: calc(14px + .45em); }
.ob-url { font-size: 16px; margin-bottom: 4px; }
.ob-msg { min-height: 22px; margin: 6px 0 2px; font-size: 17px; color: var(--rub, #9a3324); text-align: center; } .ob-msg.ok { color: #2f6a36; }
.ob-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ob-seg button, .ob-ans button { font: 20px/1.15 var(--sans); color: #2a1c12; background: rgba(255, 250, 232, .7); box-shadow: 0 0 0 2px #c2a66e; padding: 12px 14px 13px; cursor: pointer; transition: background .12s, box-shadow .12s, color .12s; }
.ob-seg button:hover, .ob-ans button:hover, .ob-seg button:focus-visible, .ob-ans button:focus-visible { box-shadow: 0 0 0 3px var(--rub, #9a3324); background: #fffaeb; outline: none; }
.ob-seg button.sel, .ob-ans button.sel { background: #8a2e20; color: #fbeed2; box-shadow: 0 0 0 3px #2a120c, inset -3px -3px 0 #62190f, inset 3px 3px 0 #b85a44; }
.ob-ans { display: grid; gap: 12px; margin: 4px 2px 6px; }
.ob-ans button { display: flex; align-items: center; gap: 14px; text-align: left; min-height: 60px; font-size: 22px; padding: 14px 18px 15px; }
.ob-ans button i { flex: none; width: 10px; height: 10px; background: var(--brass, #8a6430); transform: rotate(45deg); transition: transform .2s; }
.ob-ans button.sel i { background: #e9c15e; transform: rotate(225deg) scale(1.2); }
/* boutons : le principal reprend le bouton « Jouer » du livre ; le second, un bouton de parchemin */
.ob-pg .btn { width: 100%; margin-top: 16px; font-size: 21px; padding: 13px 20px 14px; text-align: center; }
.ob-pg .ob-go { background: #8a2e20; color: #fbeed2; box-shadow: 0 0 0 3px #2a120c, inset -3px -3px 0 #62190f, inset 3px 3px 0 #b85a44, 0 9px 0 -3px rgba(60, 30, 10, .35); font-size: 23px; }
.ob-pg .ob-go:disabled { opacity: .6; }
.ob-pg .ob-alt { background: #f1e2bd; color: #2a1c12; box-shadow: 0 0 0 3px #3a2616, inset -3px -3px 0 #c9b083, inset 3px 3px 0 #fff8e2, 0 9px 0 -3px rgba(60, 30, 10, .25); font-size: 19px; }
.ob-pg .btn:focus-visible { outline: 3px solid #e9c15e; outline-offset: 4px; }
.ob-link { align-self: center; margin-top: 14px; padding: 8px 14px; font-size: 18px; color: var(--bink-2, #6b5236); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; transition: opacity .6s; }
.ob-link:hover, .ob-link:focus-visible { color: var(--rub, #9a3324); outline: none; }
.ob-link.wait { opacity: 0; pointer-events: none; }
.ob-note { font-size: 16px; color: var(--bink-2, #6b5236); text-align: center; margin-top: 10px; }
.ob-or { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; color: #a08a62; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; }
.ob-or::before, .ob-or::after { content: ''; flex: 1; height: 2px; background: currentColor; opacity: .35; }
.ob-or + .btn { margin-top: 12px; }
.ob-list { list-style: none; display: grid; gap: 8px; margin: 4px 0 4px; }
.ob-list li { position: relative; padding-left: 22px; font-size: 19px; line-height: 1.18; color: var(--bink, #33241a); }
.ob-list li::before { content: ''; position: absolute; left: 3px; top: .45em; width: 8px; height: 8px; background: var(--rub, #9a3324); transform: rotate(45deg); }
.ob-price { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 14px; margin: 0 0 12px; }
.ob-price b { font-family: var(--disp); font-weight: 400; font-size-adjust: none; font-size: 60px; line-height: .9; color: var(--rub, #9a3324); }
.ob-price s { font-size: 26px; color: #8a7350; text-decoration-thickness: 2px; }
.ob-price span { flex-basis: 100%; text-align: center; font-size: 16px; color: var(--bink-2, #6b5236); }
.ob-promo { margin: -4px auto 12px; padding: 5px 12px 6px; font-size: 17px; color: #fbeed2; background: #8a2e20; box-shadow: 0 0 0 2px #2a120c; text-align: center; }
/* la visite : des clips qui défilent */
.ob-reel { display: grid; grid-auto-flow: column; grid-auto-columns: min(300px, 78%); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 6px 12px; margin: 2px -6px 0; scrollbar-width: thin; scrollbar-color: #b89a62 transparent; touch-action: pan-x pan-y; }
.ob-clip { scroll-snap-align: start; margin: 0; min-width: 0; }
.ob-v { aspect-ratio: 16 / 9; background: #1a120c; box-shadow: 0 0 0 3px #3a2616, 0 0 0 6px #c9a868, 0 0 0 8px #3a2616; margin: 8px; overflow: hidden; }
.ob-v video, .ob-v img { display: block; width: 100%; max-width: 100%; min-width: 0; height: 100%; object-fit: cover; image-rendering: pixelated; }
.ob-clip figcaption { font-size: 18px; line-height: 1.1; text-align: center; margin-top: 8px; color: #2a1c12; }
/* le parcours : les 7 livres en médaillons */
.ob-path { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 6px 0 14px; position: relative; }
.ob-path::before { content: ''; position: absolute; left: 7%; right: 7%; top: 27px; border-top: 4px dotted #8a6430; }
.ob-path li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0; }
.ob-path i { width: 54px; height: 54px; border-radius: 50%; background: #5a4630 center / cover; image-rendering: pixelated; box-shadow: 0 0 0 3px #3a2616, 0 0 0 6px #c9a868, 0 0 0 8px #3a2616; margin-bottom: 8px; }
.ob-path li:not(.ok) i { filter: sepia(.4) brightness(.85); }
.ob-path li.ok i { box-shadow: 0 0 0 3px #3a2616, 0 0 0 6px #e9c15e, 0 0 0 9px #8a2e20, 0 0 18px 4px rgba(233, 193, 94, .6); }
.ob-path b { font-weight: 400; font-size: 15px; line-height: 1; color: #2a1c12; }
.ob-path span { font-size: 13px; color: var(--brass, #8a6430); text-transform: uppercase; letter-spacing: .06em; } .ob-path li.ok span { color: #2f6a36; }
.ob-toast { position: fixed; left: 50%; top: calc(20px + var(--safe-t, 0px)); transform: translateX(-50%); z-index: 36; padding: 10px 18px 11px; font-size: 18px; color: #fbeed2; background: #4a2416; box-shadow: 0 0 0 3px #1e0f08, inset 0 0 0 2px #6e3a22; animation: obin .3s both; }
.ob-load { position: fixed; left: 50%; bottom: calc(40px + var(--safe-b, 0px)); transform: translateX(-50%); z-index: 36; padding: 10px 20px 11px 44px; font-size: 18px; color: #f1dfb4; background: #4a2416; box-shadow: 0 0 0 3px #1e0f08, inset 0 0 0 3px #6e3a22; opacity: 0; pointer-events: none; transition: opacity .25s; }
.ob-load::before { content: ''; position: absolute; left: 18px; top: 50%; width: 10px; height: 10px; margin-top: -5px; background: #e9c15e; animation: obspin 1s steps(4) infinite; }
.ob-load.on { opacity: 1; }
@keyframes obspin { to { transform: rotate(360deg); } }

/* accueil : bouton du compte à côté de la roue, épisodes du jeu complet */
#home .home-tools > #home-acct { display: flex; width: auto; gap: 8px; padding: 0 14px 0 11px; font-size: 18px; max-width: 220px; }
#home-acct svg { width: 18px; height: 18px; flex: none; } #home-acct span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#home-acct:hover svg { transform: none; }
.md.paid i { filter: sepia(.6) brightness(.7) saturate(.8); }
.md.paid b { background: #8a6430; }
.md.paid::after { content: ''; position: absolute; right: -6px; bottom: -4px; width: 26px; height: 26px; background: #d9ac5e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath d='M5 7V4h1V3h4v1h1v3h1v6H4V7zM6 7h4V4H6z' fill='%232a1a0e' fill-rule='evenodd'/%3E%3C/svg%3E") center / 18px no-repeat; box-shadow: 0 0 0 3px #2a1a0e; }
#home.is-paid .ill { filter: sepia(.5) brightness(.6) saturate(.8); }
#home.is-paid .ill-lock { opacity: 1; color: #f3dcaa; flex-direction: column; gap: 6px; display: flex; align-items: center; justify-content: center; }
#home.is-paid .ill-lock::after { content: attr(data-t); font-size: 20px; letter-spacing: .14em; text-transform: uppercase; padding: 4px 12px 5px; color: #2a1a0e; background: #d9ac5e; box-shadow: 0 0 0 3px #2a1a0e; }
#home.is-paid #play { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #d9ac5e; color: #24170c; box-shadow: 0 0 0 3px #2a1a0e, inset -3px -3px 0 #a87a3a, inset 3px 3px 0 #f3d898, 0 9px 0 -3px rgba(60, 30, 10, .35); }
#home.is-paid #play svg { width: 18px; height: 18px; flex: none; }
.t-chips .chip.paid { display: inline-flex; align-items: center; gap: 5px; color: #6b4a20; box-shadow: 0 0 0 2px #b8903e; background: #f3dcaa; } .t-chips .chip.paid svg { width: 12px; height: 12px; }
#s-acct .btn { font-size: 16px; padding: 8px 18px 9px; }

@media (max-width: 600px) {
  .ob-pg { padding: 12px 18px 20px; }
  .ob-top { margin: 0 -10px 0; }
  .ob-h { font-size: 38px; }
  .ob-p { font-size: 19px; } .ob-lead { font-size: 21px; }
  .ob-ans button { font-size: 20px; min-height: 56px; }
  .ob-path { grid-template-columns: repeat(4, 1fr); row-gap: 14px; } .ob-path::before { display: none; }
  .ob-path i { width: 46px; height: 46px; }
  .ob-price b { font-size: 52px; }
  #home .home-tools > #home-acct span { display: none; } #home .home-tools > #home-acct { padding: 0; width: 46px; justify-content: center; }
}
@media (max-height: 560px) { .ob-med { display: none; } .ob-h { font-size: 34px; } .ob-rule { margin: 8px 0 10px; } }
@media (prefers-reduced-motion: reduce) { .ob-card.in { animation: none; } }
