/* sam quiz : badges SG et scenes de deblocage */
.bd-entry { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 14px; padding: 14px; border: 1px solid var(--line, #e5e7eb); border-radius: 14px; background: #fff; color: var(--ink, #111827); font: inherit; text-align: left; cursor: pointer; }
.bd-entry:active { transform: scale(0.98); }
.bd-entry-ico { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: #fff7ed; font-size: 1.4rem; }
.bd-entry-txt { flex: 1; min-width: 0; }
.bd-entry-txt strong { display: block; font-size: 1rem; }
.bd-entry-sub { display: block; margin-top: 2px; color: var(--muted, #6b7280); font-size: 0.78rem; }
.bd-entry-bar { display: block; height: 6px; margin-top: 8px; border-radius: 999px; background: #eef0f4; overflow: hidden; }
.bd-entry-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #f59e0b, #ef4444); transition: width 0.6s ease; }
.bd-entry-count { flex: none; padding: 4px 10px; border-radius: 999px; background: #f3f4f6; color: var(--muted, #6b7280); font-size: 0.78rem; font-weight: 800; }

.bd-screen { position: fixed; inset: 0; z-index: 30; overflow-y: auto; background: var(--bg, #f6f7fb); color: var(--ink, #111827); animation: fadeIn 0.2s ease both; }
.bd-screen[hidden] { display: none; }
.bd-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top, 0px)); background: #3730a3; color: #fff; }
.bd-top h2 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.bd-x { width: 36px; height: 36px; border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 1rem; cursor: pointer; }
.bd-body { max-width: 560px; margin: 0 auto; padding: 18px 16px calc(40px + env(safe-area-inset-bottom, 0px)); }
.bd-sum { display: flex; flex-direction: column; margin-bottom: 14px; }
.bd-sum b { font-size: 1.6rem; font-weight: 900; }
.bd-sum span { color: var(--muted, #6b7280); font-size: 0.85rem; }
.bd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bd-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px 14px; border: 1px solid var(--line, #e5e7eb); border-radius: 14px; background: #fff; color: inherit; font: inherit; text-align: center; cursor: pointer; }
.bd-card:active { transform: scale(0.97); }
.bd-card.on { border-color: transparent; background: linear-gradient(145deg, var(--c1), var(--c2)); color: #fff; }
.bd-ico { font-size: 2.4rem; line-height: 1.2; }
.bd-card.off .bd-ico { filter: grayscale(1); opacity: 0.35; }
.bd-cname { font-weight: 800; font-size: 0.95rem; }
.bd-csg { font-size: 0.78rem; opacity: 0.8; }
.bd-replay { margin-top: 4px; font-size: 0.78rem; font-weight: 800; }
.bd-pbar { width: 100%; height: 6px; margin-top: 6px; border-radius: 999px; background: #eef0f4; overflow: hidden; }
.bd-pbar i { display: block; height: 100%; border-radius: 999px; background: #4f46e5; }
.bd-ptxt { font-size: 0.72rem; color: var(--muted, #6b7280); }
.bd-hint { min-height: 1.4em; margin: 12px 2px 0; color: var(--muted, #6b7280); font-size: 0.85rem; }

.bd-scene { position: fixed; inset: 0; z-index: 60; overflow: hidden; background: radial-gradient(circle at 50% 38%, var(--c1) 0%, #0b0b24 62%); color: #fff; animation: bdIn 0.4s ease both; }
.bd-scene.out { animation: bdOut 0.3s ease both; }
@keyframes bdIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bdOut { to { opacity: 0; } }
.bd-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bd-rays { position: absolute; left: 50%; top: 38%; width: 150vmax; height: 150vmax; margin: -75vmax 0 0 -75vmax; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.16) 0 5deg, transparent 5deg 15deg); -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 55%); mask-image: radial-gradient(circle, #000 0%, transparent 55%); animation: bdSpin 18s linear infinite, bdFade 1.2s ease both; }
@keyframes bdSpin { to { transform: rotate(360deg); } }
@keyframes bdFade { from { opacity: 0; } to { opacity: 1; } }
.bd-center { position: absolute; left: 50%; top: 38%; width: 0; height: 0; }
.bd-medal { position: absolute; left: -80px; top: -80px; width: 160px; height: 160px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, var(--c1), var(--c2)); border: 6px solid rgba(255, 255, 255, 0.9); box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.12), 0 0 60px var(--c1), 0 0 120px var(--c2); animation: bdMedal 1.2s cubic-bezier(0.2, 1.3, 0.3, 1) 0.15s both, bdPulse 2.4s ease-in-out 1.4s infinite; }
.bd-medal span { font-size: 4.6rem; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35)); }
@keyframes bdMedal { 0% { transform: scale(0) rotate(-540deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes bdPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.bd-ring { position: absolute; left: -80px; top: -80px; width: 160px; height: 160px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.7); opacity: 0; animation: bdRing 2.2s ease-out 0.6s infinite; }
.bd-ring.r2 { animation-delay: 1.7s; }
@keyframes bdRing { 0% { transform: scale(0.8); opacity: 0.9; } 100% { transform: scale(3.2); opacity: 0; } }

.bd-text { position: absolute; left: 0; right: 0; top: calc(38% + 110px); padding: 0 24px calc(24px + env(safe-area-inset-bottom, 0px)); text-align: center; }
.bd-text > * { animation: bdUp 0.7s ease both; }
@keyframes bdUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes bdShine { to { background-position: 200% 0; } }
.bd-kicker { margin: 0; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); animation-delay: 0.9s; }
.bd-name { margin: 6px 0 0; font-size: 2.1rem; font-weight: 900; background: linear-gradient(90deg, #fff, var(--c1), #fff); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: bdUp 0.7s ease 1.1s both, bdShine 2.5s linear 1.8s infinite; }
.bd-sgline { margin: 6px 0 0; font-size: 1.1rem; font-weight: 800; animation-delay: 1.3s; }
.bd-tag { margin: 10px 0 0; font-size: 0.95rem; opacity: 0.9; animation-delay: 1.5s; }
.bd-next { max-width: 340px; margin: 16px auto 0; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.14); font-size: 0.88rem; animation-delay: 1.8s; }
.bd-go { width: 100%; max-width: 340px; margin-top: 18px; padding: 14px; border: none; border-radius: 12px; background: #fff; color: #111827; font: inherit; font-weight: 800; cursor: pointer; opacity: 0; pointer-events: none; animation: none; transition: opacity 0.3s ease; }
.bd-scene.ready .bd-go { opacity: 1; pointer-events: auto; }
