/* v1.95 : KAMSA Rush (espace client) — plein écran noir / bleu nuit / rouge KAMSA, d'après la maquette validée */
body.rush-open { overflow: hidden; }
.rush { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: #04070d; font-family: 'Segoe UI', Roboto, Arial, sans-serif; color: #eef2f8; touch-action: none; user-select: none; -webkit-user-select: none; }
.rush * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.rush-game { position: relative; height: 100%; max-height: 100dvh; aspect-ratio: 9 / 16; max-width: 100vw; background: #0b1220; overflow: hidden; box-shadow: 0 0 60px rgba(225, 29, 36, .18); }
.rush canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.rush-hud { position: absolute; left: 0; right: 0; top: 0; padding: 10px 12px; display: flex; align-items: center; gap: 10px; pointer-events: none; z-index: 3; background: linear-gradient(180deg, rgba(4, 7, 13, .85), transparent); }
.rush-hud img { height: 26px; }
.rush-hearts { display: flex; gap: 4px; margin-left: 4px; }
.rush-hearts i { width: 16px; height: 16px; border-radius: 4px; background: #e11d24; box-shadow: 0 0 8px #e11d24; display: block; transition: .2s; }
.rush-hearts i.off { background: #2b3446; box-shadow: none; }
.rush-sp { margin-left: auto; margin-right: 34px; text-align: right; font: 800 13px/1.1 'Arial Narrow', Arial, sans-serif; letter-spacing: .06em; }
.rush-sp b { display: block; font-size: 18px; color: #ffd27a; }
.rush-prog { position: absolute; left: 12px; right: 12px; top: 46px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); z-index: 3; overflow: hidden; }
.rush-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8f0b12, #ff2a35); box-shadow: 0 0 10px #ff2a35; }
.rush-ammo { position: absolute; left: 12px; top: 58px; z-index: 3; font: 700 12px Arial; color: #b9c3d6; pointer-events: none; }
.rush-ammo b { color: #fff; font-size: 15px; }
.rush-bossbar { position: absolute; left: 12px; right: 12px; top: 58px; z-index: 3; display: none; }
.rush-bossbar div { font: 800 12px 'Arial Narrow', Arial; letter-spacing: .12em; color: #ffd27a; text-align: center; margin-bottom: 3px; }
.rush-bossbar span { display: block; height: 9px; border-radius: 5px; background: rgba(255, 255, 255, .12); overflow: hidden; border: 1px solid rgba(255, 210, 122, .4); }
.rush-bossbar span i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #f5b22e, #ffe59a); transition: width .2s; }
.rush-fire { position: absolute; right: 14px; bottom: 18px; z-index: 4; width: 78px; height: 78px; border-radius: 50%; border: 3px solid #ffd27a; background: radial-gradient(circle at 35% 30%, #ff5a60, #b3121a); color: #fff; font: 900 13px 'Arial Narrow', Arial; letter-spacing: .06em; box-shadow: 0 0 24px rgba(225, 29, 36, .7); display: none; cursor: pointer; }
.rush-fire:active { transform: scale(.94); }
.rush-scr { position: absolute; inset: 0; z-index: 6; display: none; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; padding: 22px 18px; gap: 11px; overflow-y: auto;
  background: radial-gradient(ellipse at 50% 115%, rgba(225, 29, 36, .35), transparent 60%), linear-gradient(180deg, rgba(10, 17, 30, .95), rgba(4, 7, 13, .97)); }
.rush-scr.on { display: flex; animation: rush-in .35s ease; }
.rush-scr > :first-child { margin-top: auto; } .rush-scr > :last-child { margin-bottom: auto; } /* centré, sans couper le haut quand ça déborde */
@keyframes rush-in { from { opacity: 0; transform: scale(.97); } }
.rush-logo { width: 52%; max-width: 210px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .6)); }
.rush-scr h1 { margin: 0; font: 900 34px/1 'Arial Narrow', Arial; letter-spacing: .04em; background: linear-gradient(100deg, #b9861f, #ffe59a 45%, #fff 50%, #ffe59a 55%, #b9861f); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rush-sh 3s infinite; }
@keyframes rush-sh { 0% { background-position: 130% 0; } 60%, 100% { background-position: -30% 0; } }
.rush-scr h2 { margin: 0; font: 800 15px 'Arial Narrow', Arial; letter-spacing: .18em; color: #ff5a60; text-transform: uppercase; }
.rush-scr p { margin: 0; font-size: 14px; color: #c9d2e0; line-height: 1.45; max-width: 340px; }
.rush-mycar { font-size: 13px; color: #c9d2e0; display: flex; gap: 8px; align-items: center; }
.rush-mycar b { background: #fff; color: #0b1220; padding: 2px 8px 2px 14px; border-radius: 4px; font-family: Arial; letter-spacing: .06em; border-left: 6px solid #0a7a3b; }
.rush-mycar i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); display: inline-block; }
.rush-advs { display: flex; gap: 6px; }
.rush-advs button { width: 34px; height: 30px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .05); color: #c9d2e0; font: 800 14px Arial; cursor: pointer; }
.rush-advs button.on { background: #e11d24; border-color: #e11d24; color: #fff; }
.rush-advname { font: 800 13px 'Arial Narrow', Arial; letter-spacing: .12em; color: #ffd27a; text-transform: uppercase; }
.rush-worlds { display: grid; gap: 7px; width: 100%; max-width: 340px; }
.rush-world { display: grid; gap: 1px; text-align: left; padding: 9px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); color: #eef2f8; cursor: pointer; font-family: inherit; }
.rush-world b { font: 800 14.5px 'Arial Narrow', Arial; letter-spacing: .03em; }
.rush-world small { color: #9aa6bb; font-size: 12px; }
.rush-world em { font-style: normal; font-size: 12px; color: #ffd27a; }
.rush-world.won { border-color: rgba(255, 210, 122, .45); }
.rush-world.locked { opacity: .45; cursor: default; }
.rush-world:not(.locked):hover { border-color: #e11d24; }
.rush-rules { font-size: 12.5px; color: #9aa6bb; display: grid; gap: 5px; text-align: left; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 10px 12px; max-width: 340px; }
.rush-rules b { color: #fff; }
.rush-btn { border: 0; border-radius: 12px; padding: 13px 26px; font: 900 16px 'Arial Narrow', Arial; letter-spacing: .08em; color: #fff; background: linear-gradient(180deg, #ff2a35, #b3121a); box-shadow: 0 8px 24px rgba(225, 29, 36, .45); cursor: pointer; }
.rush-btn.gold { background: linear-gradient(180deg, #ffe59a, #f5b22e); color: #3a2606; box-shadow: 0 8px 24px rgba(246, 196, 83, .45); }
.rush-link { border: 0; background: none; color: #9aa6bb; text-decoration: underline; font-size: 13px; cursor: pointer; }
.rush-note { font-size: 12.5px !important; color: #9aa6bb !important; }
.rush-terms { max-width: 360px; text-align: left; display: grid; gap: 8px; }
.rush-terms p { font-size: 13px !important; }
.rush-reward { width: 100%; max-width: 330px; border-radius: 16px; padding: 2px; background: conic-gradient(from 0deg, #b9861f, #ffe59a, #e11d24, #f6c453, #b9861f); }
.rush-reward > div { border-radius: 14px; background: #0b1220; padding: 14px; display: grid; gap: 4px; justify-items: center; }
.rush-reward small { font: 800 11px 'Arial Narrow', Arial; letter-spacing: .2em; color: #ffd27a; }
.rush-reward b { font: 900 22px 'Arial Narrow', Arial; }
.rush-reward span { font-size: 12.5px; color: #b9c3d6; }
.rush-reward code { margin: 4px 0; font: 800 18px monospace; letter-spacing: .1em; padding: 6px 12px; border-radius: 8px; background: #fff; color: #0b1220; user-select: all; -webkit-user-select: all; }
.rush-badge { font: 800 16px 'Arial Narrow', Arial; letter-spacing: .06em; color: #ffd27a; padding: 8px 14px; border-radius: 12px; border: 1px solid rgba(255, 210, 122, .4); background: rgba(255, 210, 122, .08); }
.rush-mute { position: absolute; left: 10px; bottom: 10px; z-index: 7; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); color: #c9d2e0; border-radius: 8px; padding: 6px 9px; font-size: 12px; cursor: pointer; }
.rush-close { position: absolute; right: 8px; top: 8px; z-index: 8; width: 30px; height: 30px; border-radius: 8px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); color: #fff; font-size: 14px; cursor: pointer; }
.rush-toast { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); z-index: 5; font: 900 28px 'Arial Narrow', Arial; letter-spacing: .06em; color: #ffd27a; text-shadow: 0 0 20px rgba(246, 196, 83, .8), 0 3px 0 #7a5410; pointer-events: none; opacity: 0; white-space: nowrap; }
.rush-toast.on { animation: rush-tst 1.6s ease forwards; }
@keyframes rush-tst { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 70% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -70%) scale(.95); } }
@media (prefers-reduced-motion: reduce) { .rush-scr.on, .rush-toast.on, .rush-scr h1 { animation: none; } .rush-toast.on { opacity: 1; } }
/* carte « KAMSA Rush » sur l'accueil de l'espace client */
.pt-rush { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; color: #eef2f8; text-align: left; width: 100%; border: 0; cursor: pointer;
  background: radial-gradient(ellipse at 90% 120%, rgba(225, 29, 36, .45), transparent 60%), linear-gradient(120deg, #0b1220, #14223b); box-shadow: 0 10px 26px rgba(10, 18, 32, .25); font-family: inherit; }
.pt-rush.off { cursor: default; opacity: .92; }
.pt-rush img { height: 30px; }
.pt-rush b { display: block; font: 800 17px Barlow, sans-serif; } .pt-rush small { color: #b9c3d6; font-size: 13px; }
.pt-rush em { font-style: normal; font: 800 14px Barlow, sans-serif; padding: 8px 14px; border-radius: 10px; background: linear-gradient(180deg, #ff3b3f, #c8161c); white-space: nowrap; }
.pt-rush-code { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted, #6b7688); }
.pt-rush-code code { font: 800 14px monospace; letter-spacing: .08em; padding: 3px 8px; border-radius: 6px; background: #fff; border: 1px solid #e5e9f0; color: #0b1220; }
@media (max-width: 480px) { .pt-rush { grid-template-columns: minmax(0, 1fr) auto; } .pt-rush img { display: none; } }

/* v1.96 : rendu 3D (canvas WebGL sous le calque 2D), choix du mode de difficulté */
.rush canvas.rush-gl { z-index: 0; } .rush canvas.rush-2d { z-index: 1; }
.rush-modes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; width: 100%; max-width: 380px; }
.rush-modes button { border: 1px solid rgba(255, 255, 255, .14); border-radius: 9px; padding: 7px 2px; background: rgba(255, 255, 255, .04); color: #eef2f8; font: 800 11px 'Arial Narrow', Arial; letter-spacing: .02em; cursor: pointer; display: grid; gap: 2px; }
.rush-modes button small { font: 600 8.5px Arial; color: #9aa6ba; }
.rush-modes button.on { background: linear-gradient(160deg, #e11d24, #4a0a0e); border-color: #ff5a60; }
.rush-modes button.on small { color: #ffd9db; }
@media (prefers-reduced-motion: reduce) { .rush-scr.on { animation: none; } }
