@font-face { font-family: "BC"; font-weight: 900; font-display: swap; src: url("/assets/fonts/barlowcondensed-900.woff2") format("woff2"); }
@font-face { font-family: "BC"; font-weight: 700; font-display: swap; src: url("/assets/fonts/barlowcondensed-700.woff2") format("woff2"); }
@font-face { font-family: "B"; font-weight: 500; font-display: swap; src: url("/assets/fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "B"; font-weight: 700; font-display: swap; src: url("/assets/fonts/barlow-700.woff2") format("woff2"); }
:root { --y: #FFCA2A; --yd: #B98900; --k: #0B0B0B; --w: #fff; --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--k); color: var(--w); font-family: "B", -apple-system, system-ui, sans-serif; overflow: hidden; overscroll-behavior: none; -webkit-user-select: none; user-select: none; touch-action: none; }
#app { position: fixed; inset: 0; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
a { color: var(--y); }
.muted { color: rgba(255,255,255,.72); }
.tiny { font-size: 12px; }
.center { text-align: center; }
.screen { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: calc(20px + var(--sat)) 20px calc(20px + var(--sab)); z-index: 5; text-align: center; }
.screen.is-on { display: flex; animation: fadein .25s ease; }
.screen--dim { background: rgba(11,11,11,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
#loading { background: radial-gradient(70% 60% at 50% 40%, rgba(255,202,42,.25), transparent 70%), var(--k); }
.bar { width: min(280px, 70vw); height: 10px; border-radius: 99px; background: #222; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--yd), var(--y)); transition: width .2s; }

/* Logo OASIS RUSH (création originale, typographie) */
.brand-logo { margin: 0; display: inline-flex; flex-direction: column; align-items: center; line-height: .82; font-family: "BC", Impact, sans-serif; font-weight: 900; transform: rotate(-4deg); filter: drop-shadow(0 8px 0 rgba(0,0,0,.35)); }
.bl-oasis { font-size: 64px; color: var(--y); -webkit-text-stroke: 3px var(--k); paint-order: stroke fill; letter-spacing: .02em; }
.bl-rush { font-size: 58px; color: var(--w); font-style: italic; -webkit-text-stroke: 3px var(--k); paint-order: stroke fill; letter-spacing: .06em; position: relative; padding: 0 14px; }
.bl-rush::before, .bl-rush::after { content: ""; position: absolute; top: 50%; width: 28px; height: 6px; border-radius: 6px; background: var(--y); box-shadow: 0 -12px 0 -1px var(--y), 0 12px 0 -1px var(--y); }
.bl-rush::before { right: 100%; } .bl-rush::after { left: 100%; transform: scaleX(-1); }
.brand-logo--xl .bl-oasis { font-size: clamp(76px, 22vw, 120px); -webkit-text-stroke: 4px var(--k); }
.brand-logo--xl .bl-rush { font-size: clamp(66px, 19vw, 104px); -webkit-text-stroke: 4px var(--k); }

/* Accueil */
#home { justify-content: space-between; background: linear-gradient(180deg, rgba(11,11,11,.55) 0%, rgba(11,11,11,0) 32%, rgba(11,11,11,0) 45%, rgba(11,11,11,.85) 78%); }
.home-top { margin-top: 26px; display: grid; justify-items: center; gap: 6px; }
.kicker { margin: 0; font-family: "BC"; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--y); font-size: 15px; }
.tagline { margin: 6px 0 0; font-family: "BC"; font-weight: 700; text-transform: uppercase; font-size: 20px; letter-spacing: .03em; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.home-bottom { width: min(420px, 100%); display: grid; gap: 12px; }
.corner-logo { position: absolute; left: 14px; top: calc(12px + var(--sat)); }
.corner-logo img { width: 52px; height: 52px; border-radius: 50%; clip-path: circle(47.5%); display: block; }
.sound-btn { position: absolute; right: 14px; top: calc(14px + var(--sat)); }
.player-card { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; text-align: left; background: rgba(20,20,20,.82); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 12px 14px; }
.player-card div { display: grid; }
.player-card span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.player-card strong { font-family: "BC"; font-weight: 900; font-size: 24px; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-card .link { grid-column: 1 / -1; justify-self: start; }
.home-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.help { margin: 0; font-size: 13px; }
.reward-teaser { margin: 0; background: var(--y); color: var(--k); border-radius: 14px; padding: 10px 12px; font-weight: 700; font-size: 14px; }
.reward-teaser button { font: inherit; background: none; border: 0; color: inherit; text-decoration: underline; padding: 0; cursor: pointer; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 20px; border-radius: 18px; border: 0; font-family: "BC", Impact, sans-serif; font-weight: 900; font-size: 22px; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.btn:active { transform: translateY(3px); }
.btn--play { background: var(--y); color: var(--k); box-shadow: 0 5px 0 var(--yd), 0 14px 30px rgba(255,202,42,.25); min-height: 66px; font-size: 28px; }
.btn--play:active { box-shadow: 0 2px 0 var(--yd); }
.btn--dark { background: #1c1c1c; color: var(--w); box-shadow: 0 4px 0 #000; border: 1px solid #2c2c2c; font-size: 19px; }
.btn--order { background: var(--w); color: var(--k); box-shadow: 0 5px 0 #bbb; width: 100%; font-size: 22px; }
.btn--sm { min-height: 52px; font-size: 21px; }
.icon-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(20,20,20,.75); color: var(--w); font-size: 20px; cursor: pointer; display: grid; place-items: center; }
.link { background: none; border: 0; color: var(--y); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 4px 0; min-height: 32px; }
.title { margin: 0; font-family: "BC"; font-weight: 900; font-size: 40px; letter-spacing: .02em; color: var(--y); }

/* HUD */
.hud { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-score { position: absolute; left: 14px; top: calc(12px + var(--sat)); display: grid; font-family: "BC"; font-weight: 900; text-shadow: 0 3px 0 rgba(0,0,0,.45); }
.hud-score span { font-size: 44px; line-height: 1; color: var(--w); -webkit-text-stroke: 2px var(--k); paint-order: stroke fill; }
.hud-score small { font-size: 18px; color: var(--y); -webkit-text-stroke: 1px var(--k); paint-order: stroke fill; }
.hud-items { position: absolute; left: 14px; top: calc(78px + var(--sat)); display: flex; gap: 8px; }
.hud-items span { background: rgba(11,11,11,.7); border-radius: 999px; padding: 4px 10px; font-family: "BC"; font-weight: 900; font-size: 18px; }
.hud-pause { position: absolute; right: 14px; top: calc(12px + var(--sat)); font-size: 15px; }
.hud-power { position: absolute; right: 14px; top: calc(72px + var(--sat)); display: grid; gap: 4px; justify-items: end; font-family: "BC"; font-weight: 900; color: var(--y); }
.hud-power i { display: block; width: 110px; height: 8px; border-radius: 9px; background: rgba(0,0,0,.6); overflow: hidden; }
.hud-power b { display: block; height: 100%; width: 100%; background: var(--y); }
.hud-toast { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font-family: "BC"; font-weight: 900; font-size: 34px; color: var(--y); -webkit-text-stroke: 2px var(--k); paint-order: stroke fill; text-align: center; white-space: nowrap; opacity: 0; pointer-events: none; }
.hud-toast.is-on { animation: toast 1.4s ease forwards; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.08); } 75% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -12px) scale(1); } }
.hud-tuto { position: absolute; left: 50%; bottom: calc(110px + var(--sab)); transform: translateX(-50%); background: rgba(11,11,11,.78); border-radius: 18px; padding: 12px 18px; display: grid; gap: 4px; font-size: 16px; animation: fadein .3s; white-space: nowrap; }
.hud-tuto b { display: inline-block; min-width: 48px; color: var(--y); font-family: "BC"; font-size: 22px; }

/* Fin */
.over-card { width: min(420px, 100%); display: grid; gap: 10px; max-height: 100%; overflow-y: auto; }
.over-score { margin: 0; font-family: "BC"; font-weight: 900; font-size: 84px; line-height: .9; color: var(--y); -webkit-text-stroke: 3px var(--k); paint-order: stroke fill; }
.over-best, .over-rank { margin: 0; font-weight: 700; }
.over-items { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.over-items li { background: rgba(255,255,255,.08); border-radius: 999px; padding: 4px 12px; font-family: "BC"; font-size: 20px; font-weight: 900; }
.over-fun { margin: 4px 0; font-family: "BC"; font-weight: 900; font-size: 26px; line-height: 1.05; text-transform: uppercase; }
.over-reward { border-radius: 18px; padding: 14px; background: #1a1a1a; border: 2px solid #333; font-weight: 700; }
.over-reward.is-win { background: var(--y); color: var(--k); border-color: var(--k); box-shadow: 0 6px 0 var(--yd); }
.over-reward .code { display: block; font-family: "BC"; font-size: 34px; letter-spacing: .06em; margin: 6px 0; user-select: text; -webkit-user-select: text; }

/* Modales */
.modal { position: absolute; inset: 0; z-index: 10; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal-card { position: relative; width: min(480px, 100%); max-height: 88%; overflow-y: auto; background: #141414; border-radius: 26px 26px 0 0; padding: 22px 18px calc(22px + var(--sab)); display: grid; gap: 12px; animation: up .25s ease; text-align: left; -webkit-user-select: text; user-select: text; touch-action: pan-y; }
@media (min-width: 640px) { .modal { align-items: center; } .modal-card { border-radius: 26px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-x { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #262626; color: #fff; font-size: 18px; cursor: pointer; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tabs button { min-height: 42px; border-radius: 12px; border: 1px solid #333; background: #1c1c1c; color: #fff; font-family: "BC"; font-weight: 900; font-size: 17px; text-transform: uppercase; cursor: pointer; }
.tabs button.is-on { background: var(--y); color: var(--k); border-color: var(--y); }
.board, .history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.board li, .history li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: #1c1c1c; font-weight: 700; }
.board li b:first-child { font-family: "BC"; font-size: 22px; color: var(--y); }
.board li:nth-child(1) { background: linear-gradient(90deg, rgba(255,202,42,.35), #1c1c1c); }
.board li.is-me { outline: 2px solid var(--y); }
.board .sc, .history .sc { font-family: "BC"; font-weight: 900; font-size: 22px; }
.history li { grid-template-columns: 1fr auto; }
.sub { margin: 8px 0 0; font-family: "BC"; font-weight: 900; text-transform: uppercase; font-size: 20px; }
#pseudo-form { display: grid; gap: 10px; }
#pseudo-input { min-height: 54px; border-radius: 14px; border: 2px solid #333; background: #0b0b0b; color: #fff; font-size: 20px; padding: 0 14px; font-family: "B"; }
#pseudo-input:focus { outline: none; border-color: var(--y); }
.err { margin: 0; color: #ff8a80; font-weight: 700; min-height: 1.2em; }
.challenges { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.challenges li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; background: #1c1c1c; border-radius: 16px; padding: 12px 14px; }
.challenges li strong { font-family: "BC"; font-weight: 900; font-size: 20px; text-transform: uppercase; }
.challenges li span { grid-column: 1; color: rgba(255,255,255,.75); font-size: 14px; }
.challenges li em { grid-row: 1 / 3; grid-column: 2; font-style: normal; font-family: "BC"; font-weight: 900; font-size: 20px; color: var(--y); }
.challenges li.is-done { background: linear-gradient(90deg, rgba(255,202,42,.28), #1c1c1c); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; }
.check input { width: 24px; height: 24px; flex: none; accent-color: var(--y); }
.rotate-hint { display: none; }
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  .rotate-hint { display: grid; place-items: center; position: fixed; inset: 0; z-index: 50; background: var(--k); color: var(--y); font-family: "BC"; font-weight: 900; font-size: 28px; text-align: center; padding: 20px; }
}
.noscript { padding: 40px; }
