/* Guillaume le conquérant de l'espace — ambiance grille néon */
:root {
  --bg: #02030a;
  --bg2: #050b18;
  --panel: rgba(5, 14, 30, .78);
  --panel2: rgba(8, 22, 44, .9);
  --line: rgba(0, 240, 255, .32);
  --cyan: #00f0ff;
  --orange: #ff8a1f;
  --magenta: #ff2bd6;
  --green: #3dff8b;
  --yellow: #ffe14d;
  --violet: #9b6bff;
  --red: #ff3b5c;
  --text: #dff8ff;
  --muted: #7fa3b8;
  --accent: var(--cyan);
  --glow: 0 0 6px rgba(0, 240, 255, .7), 0 0 18px rgba(0, 240, 255, .35);
  --cut: polygon(0 10px, 10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(ellipse at 50% -10%, #0b2340 0%, var(--bg2) 40%, var(--bg) 75%) fixed, var(--bg);
  color: var(--text);
  font: 500 17px/1.4 'Rajdhani', system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .orb { font-family: 'Orbitron', 'Rajdhani', sans-serif; letter-spacing: .04em; margin: 0; }
h2 { font-size: 1.15rem; text-transform: uppercase; }
h3 { font-size: .95rem; text-transform: uppercase; color: var(--accent); }
a { color: var(--cyan); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.c-cyan { --accent: var(--cyan); } .c-orange { --accent: var(--orange); } .c-magenta { --accent: var(--magenta); }
.c-green { --accent: var(--green); } .c-yellow { --accent: var(--yellow); } .c-violet { --accent: var(--violet); }

/* ---------- Décor : étoiles et grille ---------- */
#space { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }
.floor { position: fixed; left: -50%; right: -50%; bottom: 0; height: 38vh; z-index: -1; perspective: 300px; perspective-origin: 50% 0; pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.95), transparent 92%); mask-image: linear-gradient(to top, rgba(0,0,0,.95), transparent 92%); }
.floor-grid { position: absolute; left: 0; right: 0; bottom: 0; height: 400%; transform: rotateX(74deg); transform-origin: 50% 100%;
  background-image: linear-gradient(rgba(0,240,255,.55) 1.5px, transparent 1.5px), linear-gradient(90deg, rgba(0,240,255,.45) 1.5px, transparent 1.5px);
  background-size: 60px 60px; animation: floor 2.4s linear infinite; filter: drop-shadow(0 0 4px rgba(0,240,255,.6)); opacity: .55; }
@keyframes floor { to { background-position: 0 60px; } }
body.running .floor-grid { animation-duration: .9s; }

/* ---------- Barre du haut et navigation ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: calc(8px + var(--safe-t)) 16px 8px;
  background: linear-gradient(to bottom, rgba(2,3,10,.95), rgba(2,3,10,.6)); backdrop-filter: blur(6px); border-bottom: 1px solid rgba(0,240,255,.15); }
.top-lvl { text-decoration: none; }
.hex { display: grid; place-items: center; width: 40px; height: 44px; font: 900 1rem 'Orbitron'; color: var(--bg);
  background: var(--cyan); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); filter: drop-shadow(0 0 6px var(--cyan)); }
.top-xp { flex: 1; min-width: 0; }
.top-rank { font: 700 .72rem 'Orbitron'; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: rgba(0,240,255,.06); font-size: 1.1rem; cursor: pointer; }
.icon-btn:active { transform: scale(.92); }

.nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 6px 4px calc(6px + var(--safe-b)); background: rgba(2,4,12,.94); border-top: 1px solid rgba(0,240,255,.25);
  box-shadow: 0 -6px 30px rgba(0,240,255,.08); backdrop-filter: blur(8px); }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; text-decoration: none; color: var(--muted); min-width: 0;
  font: 700 .6rem 'Orbitron'; letter-spacing: .03em; text-transform: uppercase; position: relative; transition: color .25s; }
.nav a span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a .ni { font-size: 1.25rem; filter: grayscale(.8) brightness(.8); transition: filter .25s, transform .25s; }
.nav a.on { color: var(--cyan); text-shadow: var(--glow); }
.nav a.on .ni { filter: none; transform: translateY(-2px); }
.nav a.on::after { content: ''; position: absolute; top: -7px; left: 25%; right: 25%; height: 2px; background: var(--cyan); box-shadow: var(--glow); }

/* ---------- Vues ---------- */
.view { max-width: 600px; margin: 0 auto; padding: 14px 16px calc(96px + var(--safe-b)); min-height: 80vh; }
.view.enter { animation: viewIn .45s cubic-bezier(.2,.8,.2,1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
body.running .view { padding-bottom: calc(24px + var(--safe-b)); }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.between { justify-content: space-between; }

.panel { position: relative; background: var(--panel); border: 1px solid var(--line); padding: 14px; clip-path: var(--cut);
  box-shadow: inset 0 0 30px rgba(0,240,255,.05); }
.panel::before { content: ''; position: absolute; top: 0; left: 10px; width: 46px; height: 2px; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.panel.glow { border-color: var(--accent); box-shadow: inset 0 0 26px color-mix(in srgb, var(--accent) 18%, transparent), 0 0 18px color-mix(in srgb, var(--accent) 25%, transparent); }
.sec-title { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; font: 700 .8rem 'Orbitron'; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sec-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

/* ---------- Boutons ---------- */
.btn { --c: var(--accent); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px;
  border: 1.5px solid var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); color: var(--c); cursor: pointer; overflow: hidden;
  font: 700 .82rem 'Orbitron'; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; clip-path: var(--cut);
  text-shadow: 0 0 8px color-mix(in srgb, var(--c) 70%, transparent); transition: transform .12s, background .2s, box-shadow .2s; }
.btn::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  transform: skewX(-20deg); animation: sweep 3.8s ease-in-out infinite; pointer-events: none; }
@keyframes sweep { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.btn:active { transform: scale(.97); background: color-mix(in srgb, var(--c) 25%, transparent); }
.btn.solid { background: var(--c); color: #021018; text-shadow: none; box-shadow: 0 0 22px color-mix(in srgb, var(--c) 55%, transparent); }
.btn.big { min-height: 62px; font-size: 1rem; width: 100%; }
.btn.block { width: 100%; }
.btn.ghost { --c: var(--muted); }
.btn.warn { --c: var(--orange); }
.btn.danger { --c: var(--red); }
.btn.ok { --c: var(--green); }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: .68rem; }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn .btn-prog { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--c); box-shadow: 0 0 8px var(--c); transition: width .2s; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; background: rgba(0,240,255,.05); white-space: nowrap; }
.chip.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 30%, transparent); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
button.chip { cursor: pointer; }

/* ---------- Formulaires ---------- */
.field { display: block; }
.field > span { display: block; font: 700 .68rem 'Orbitron'; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.input, .field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 10px 12px; background: rgba(0, 12, 26, .85);
  border: 1px solid rgba(0,240,255,.3); color: var(--text); outline: none; border-radius: 0; font-size: 1.05rem; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 0 14px rgba(0,240,255,.3); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.seg { display: flex; border: 1px solid var(--line); }
.seg button { flex: 1; min-height: 44px; border: 0; background: transparent; color: var(--muted); font: 700 .72rem 'Orbitron'; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.seg button.on { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.stepper { display: flex; align-items: stretch; border: 1px solid var(--line); background: rgba(0,12,26,.85); }
.stepper button { width: 52px; border: 0; background: rgba(0,240,255,.08); color: var(--cyan); font: 900 1.4rem 'Orbitron'; cursor: pointer; }
.stepper button:active { background: rgba(0,240,255,.25); }
.stepper input { flex: 1; min-width: 0; text-align: center; border: 0; background: transparent; font: 700 1.5rem 'Orbitron'; color: var(--text); outline: none; padding: 6px 0; }
.colors { display: flex; gap: 10px; }
.colors button { width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; background: var(--accent); cursor: pointer; box-shadow: 0 0 10px var(--accent); }
.colors button.on { border-color: #fff; transform: scale(1.12); }

/* ---------- XP ---------- */
.xpbar { position: relative; height: 14px; background: rgba(0,240,255,.08); border: 1px solid rgba(0,240,255,.4); overflow: hidden;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.xpbar.small { height: 8px; }
.xpbar i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #0077ff, var(--cyan) 70%, #fff);
  box-shadow: 0 0 12px var(--cyan); transition: width .9s cubic-bezier(.2,.8,.2,1); }
.xpbar i::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 8px, rgba(255,255,255,.18) 8px 11px);
  animation: xpStripes 1s linear infinite; }
@keyframes xpStripes { to { background-position: 26px 0; } }
.xpbar.huge { height: 30px; }
.xpbar.huge i { transition: none; }
.xp-txt { display: flex; justify-content: space-between; font: 700 .78rem 'Orbitron'; color: var(--muted); margin-top: 6px; }

/* ---------- Connexion ---------- */
.login { min-height: 82vh; display: flex; flex-direction: column; justify-content: center; gap: 22px; text-align: center; }

/* ---------- Titre animé ---------- */
.title { text-align: center; padding: 6px 0 2px; }
.title .t1 { font: 900 clamp(1.25rem, 6.4vw, 2rem)/1.05 'Orbitron'; color: #fff; text-transform: uppercase; letter-spacing: .06em;
  text-shadow: 0 0 6px var(--cyan), 0 0 22px var(--cyan), 0 0 44px rgba(0,120,255,.8); animation: flicker 6s infinite; }
.title .t2 { font: 700 clamp(.7rem, 3.4vw, .95rem) 'Orbitron'; letter-spacing: .32em; color: var(--orange); text-transform: uppercase;
  text-shadow: 0 0 10px var(--orange); margin-top: 6px; }
@keyframes flicker { 0%, 92%, 96%, 100% { opacity: 1; } 93%, 95% { opacity: .55; } 94% { opacity: .9; } }

/* ---------- Héros ---------- */
.hero-wrap { position: relative; display: grid; place-items: center; margin: 6px auto 0; width: min(78vw, 320px); }
.hero-wrap svg.hero { width: 100%; height: auto; overflow: visible; position: relative; z-index: 1; }
.hero-wrap .pad { position: absolute; bottom: 2%; left: 50%; width: 82%; aspect-ratio: 3.2; transform: translateX(-50%); border-radius: 50%;
  border: 2px solid var(--cyan); box-shadow: 0 0 20px var(--cyan), inset 0 0 26px rgba(0,240,255,.5); background: radial-gradient(ellipse, rgba(0,240,255,.35), transparent 70%); }
.hero-wrap .pad::before, .hero-wrap .pad::after { content: ''; position: absolute; inset: -14% -8%; border-radius: 50%; border: 1px dashed rgba(0,240,255,.55); animation: spin 12s linear infinite; }
.hero-wrap .pad::after { inset: 18% 20%; border-style: solid; border-color: rgba(255,138,31,.6); animation-duration: 7s; animation-direction: reverse; }
.hero-wrap .beam { position: absolute; bottom: 8%; left: 50%; width: 60%; height: 85%; transform: translateX(-50%);
  background: linear-gradient(to top, rgba(0,240,255,.22), transparent 80%); clip-path: polygon(20% 100%, 80% 100%, 100% 0, 0 0); animation: beam 3s ease-in-out infinite; }
@keyframes beam { 50% { opacity: .5; } }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-wrap .hero3d { position: relative; z-index: 1; width: 100%; aspect-ratio: 260 / 340; touch-action: pan-y; cursor: grab; }
.hero-wrap .hero3d canvas { display: block; width: 100%; height: 100%; }
.hero-wrap .hero3d .bolts { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible;
  fill: none; stroke: #fff; stroke-width: .7; stroke-linejoin: round; filter: drop-shadow(0 0 2px var(--aura, #9fdcff)) drop-shadow(0 0 5px var(--aura, #9fdcff)); }
.hero-wrap.powering { animation: heroShake .09s linear infinite; }
.hero-wrap.powering .pad { box-shadow: 0 0 40px var(--yellow), inset 0 0 30px var(--yellow); border-color: var(--yellow); }
@keyframes heroShake { 25% { transform: translate(2px, -1px); } 50% { transform: translate(-2px, 1px); } 75% { transform: translate(1px, 2px); } }
/* ---------- ATLAS toujours visible (dock) ---------- */
.coach-dock { position: fixed; left: 0; top: 0; z-index: 18; transform-origin: 0 0; will-change: transform; pointer-events: none; }
.coach-dock.anim { transition: transform .38s cubic-bezier(.2,.8,.2,1); }
.coach-dock .dock-box { position: relative; pointer-events: auto; touch-action: pan-y; cursor: pointer; }
.coach-dock .dock-box canvas { display: block; width: 100%; height: 100%; }
.coach-dock .dock-box .bolts { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible;
  fill: none; stroke: #fff; stroke-width: .7; filter: drop-shadow(0 0 2px var(--aura, #9fdcff)) drop-shadow(0 0 5px var(--aura, #9fdcff)); }
.coach-dock.mini .dock-box::before { content: ''; position: absolute; inset: 4% 2%; border-radius: 50% 50% 46% 46%; z-index: -1;
  background: radial-gradient(circle at 50% 40%, rgba(0,240,255,.28), rgba(2,8,20,.9) 70%); border: 4px solid var(--cyan);
  box-shadow: 0 0 40px rgba(0,240,255,.6), inset 0 0 40px rgba(0,240,255,.3); }
.dock-bubble { position: fixed; z-index: 19; right: 102px; top: 76px; max-width: min(64vw, 320px); padding: 8px 12px; font-size: .95rem; line-height: 1.3;
  background: rgba(4,14,30,.96); border: 1px solid var(--violet); box-shadow: 0 0 14px rgba(155,107,255,.5); border-radius: 12px 2px 12px 12px; pointer-events: none;
  animation: popIn .3s ease-out; }
.dock-bubble.low { top: auto; bottom: calc(96px + var(--safe-b)); right: 90px; border-radius: 12px 12px 2px 12px; }
.dock-bubble.big { right: 16px; left: 16px; max-width: none; text-align: center; border-radius: 12px; top: 72px; bottom: auto; }
body.running .dock-bubble { display: none; }

/* ---------- Page Coach ---------- */
.coach-head { display: flex; align-items: center; gap: 14px; }
.coach-head .coach-slot { width: 128px; margin: 0; flex: none; }
.coach-head .coach-slot .pad { width: 92%; }
.coach-id .cname { font: 900 1.6rem 'Orbitron'; color: #fff; text-shadow: var(--glow); letter-spacing: .12em; }
.quick { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.quick .chip { flex: none; padding: 8px 12px; font-weight: 600; }
.nbar .xpbar { margin-top: 3px; }
.meals { margin-top: 12px; display: grid; gap: 8px; }
.meal { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid rgba(255,138,31,.3); background: rgba(255,138,31,.05); }
.mscore { font: 900 .9rem 'Orbitron'; padding: 4px 8px; border: 1px solid; }
.mscore.sok { color: var(--green); border-color: var(--green); }
.mscore.smid { color: var(--yellow); border-color: var(--yellow); }
.mscore.slow { color: var(--red); border-color: var(--red); }
.chat { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.msg { max-width: 88%; padding: 10px 12px; line-height: 1.4; animation: popIn .35s ease-out both; scroll-margin-bottom: 175px; scroll-margin-top: 90px; }
#nutri summary { list-style: none; cursor: pointer; }
#nutri summary::-webkit-details-marker { display: none; }
#nutri .nsum { display: flex; gap: 14px; flex-wrap: wrap; font-size: .9rem; margin-top: 6px; }
#nutri .nsum b { font-family: 'Orbitron'; color: var(--orange); }
#nutri[open] .nsum, details[open] > summary .nsum { display: none; }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin-bottom: 0; }
.msg ul { margin: 4px 0 6px; padding-left: 18px; } .msg li { margin: 2px 0; }
.msg.me { align-self: flex-end; background: rgba(0,240,255,.12); border: 1px solid rgba(0,240,255,.4); border-radius: 14px 14px 2px 14px; }
.msg.me img { display: block; max-width: 180px; max-height: 180px; border-radius: 8px; margin-bottom: 6px; }
.msg.bot { align-self: flex-start; background: rgba(155,107,255,.1); border: 1px solid rgba(155,107,255,.45); border-radius: 14px 14px 14px 2px; }
.msg .who { font: 700 .7rem 'Orbitron'; letter-spacing: .12em; color: var(--violet); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.msg .who .mini { width: 28px; height: 24px; font-size: .75rem; }
.msg .act { margin-top: 8px; padding: 8px; border: 1px dashed rgba(61,255,139,.5); background: rgba(61,255,139,.06); display: grid; gap: 6px; font-size: .92rem; }
.msg.typing { display: flex; gap: 5px; padding: 14px; }
.msg.typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); animation: blink 1s infinite; }
.msg.typing span:nth-child(2) { animation-delay: .2s; } .msg.typing span:nth-child(3) { animation-delay: .4s; }
.coach-input { position: sticky; bottom: calc(76px + var(--safe-b)); z-index: 5; display: flex; gap: 8px; align-items: center; margin-top: 14px; padding: 8px;
  background: rgba(2,6,16,.94); border: 1px solid var(--line); backdrop-filter: blur(6px); }
.coach-input input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; background: rgba(0,12,26,.85); border: 1px solid rgba(0,240,255,.3); color: var(--text); outline: none; font-size: 1rem; }
.coach-input .icon-btn { flex: none; }
.coach-input .send { background: var(--cyan); color: #021018; font-weight: 900; }
.icon-btn.mic.on { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 0 rgba(255,59,92,.7); animation: recPulse 1.2s infinite; }
.chk { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.chk input { width: 22px; height: 22px; accent-color: var(--cyan); }
.notes { display: grid; gap: 6px; }
.note { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid rgba(0,240,255,.2); font-size: .92rem; }
/* ---------- Repas du jour, historique, sommeil ---------- */
.mthumb { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; flex: none; }
.daynav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 12px; text-align: center; }
.daynav .icon-btn { display: grid; place-items: center; text-decoration: none; font-size: 1.4rem; color: var(--cyan); }
.success-box { display: flex; align-items: center; gap: 16px; }
.ring-s { --p: 0; --c: var(--muted); width: 84px; height: 84px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255,255,255,.08) 0); position: relative; filter: drop-shadow(0 0 8px var(--c)); }
.ring-s::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: #050c1a; }
.ring-s b { position: relative; font: 900 1.15rem 'Orbitron'; color: #fff; }
.ring-s.sok { --c: var(--green); } .ring-s.smid { --c: var(--yellow); } .ring-s.slow { --c: var(--red); }
.tasks { display: grid; gap: 8px; }
.task { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid rgba(0,240,255,.2); background: rgba(0,240,255,.03); cursor: pointer; transition: all .2s; }
.task .tcheck { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--muted); font-weight: 900; font-size: 1rem; }
.task .ttime { font: 700 .75rem 'Orbitron'; color: var(--cyan); }
.task.st-done, .task.st-photo { border-color: rgba(61,255,139,.5); background: rgba(61,255,139,.06); }
.task.st-done .tcheck, .task.st-photo .tcheck { border-color: var(--green); background: var(--green); color: #021018; box-shadow: 0 0 12px rgba(61,255,139,.6); }
.task.st-partial .tcheck { border-color: var(--yellow); color: var(--yellow); }
.task.st-partial { border-color: rgba(255,225,77,.45); }
.task.st-missed { opacity: .65; }
.task.st-missed .tcheck { border-color: var(--red); color: var(--red); }
.task.st-missed b { text-decoration: line-through; }
.tmeal { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.tmeal img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.mealgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .mealgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mealcard { position: relative; border: 1px solid rgba(255,138,31,.35); background: rgba(5,14,30,.8); cursor: pointer; overflow: hidden; }
.mealcard img, .mealcard .noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: grid; place-items: center; font-size: 2rem; background: rgba(255,138,31,.08); }
.mealcard .mscore { position: absolute; top: 6px; right: 6px; background: rgba(2,6,16,.85); }
.mealcard .mc-body { padding: 8px; }
.mealcard .pcount { position: absolute; top: 6px; left: 6px; padding: 2px 6px; font: 700 .7rem 'Orbitron'; background: rgba(2,6,16,.85); border: 1px solid var(--orange); color: var(--orange); }
.pgallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -4px; padding: 0 4px; scrollbar-width: none; }
.pgallery figure { margin: 0; flex: 0 0 auto; width: 100%; scroll-snap-align: center; position: relative; }
.pgallery:has(figure + figure) figure { width: 82%; }
.pgallery img { width: 100%; max-height: 50vh; object-fit: cover; border: 1px solid var(--line); cursor: zoom-in; display: block; }
.pgallery figcaption { position: absolute; bottom: 6px; left: 6px; padding: 2px 8px; font: 700 .7rem 'Orbitron'; background: rgba(2,6,16,.85); }
.mealcard b { font-size: .95rem; line-height: 1.2; display: block; }
.macros { display: flex; gap: 6px; margin-top: 4px; font: 700 .68rem 'Orbitron'; }
.macros .pr { color: var(--magenta); } .macros .gl { color: var(--yellow); } .macros .li { color: var(--green); }
.dayhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 16px 0 8px; }
.dayhead a { color: var(--text); text-decoration: none; text-transform: capitalize; }
.night { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(0,240,255,.1); cursor: pointer; }
.night:first-child { border-top: 0; }
.night b.orb.good { color: var(--green); } .night b.orb.mid { color: var(--yellow); } .night b.orb.bad { color: var(--red); }
/* ---------- Objectifs (barres) et hydratation ---------- */
.gbars { display: grid; gap: 10px; }
.gbar { display: flex; gap: 10px; align-items: center; }
.gbar .gi { font-size: 1.15rem; width: 26px; text-align: center; flex: none; }
.gbar.big .xpbar { height: 12px; }
.goalday { padding: 12px; }
.goalday .gbars { margin-top: 8px; gap: 6px; }
.goalday .gbar .small { font-size: .78rem; }
.today-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.today-links .btn { flex: 1 1 auto; }
.tabs.scroll { overflow-x: auto; scrollbar-width: none; }
.tabs.scroll::-webkit-scrollbar { display: none; }
.tabs.scroll button { flex: none; padding: 12px 14px; }
.water-hero { display: flex; gap: 16px; align-items: center; }
.wbig { font: 700 1.05rem 'Orbitron'; color: var(--muted); margin-top: 4px; }
.wbig b { font-size: 1.7rem; color: #fff; text-shadow: var(--glow); }
.glass { --p: 0; position: relative; width: 74px; height: 104px; flex: none; border: 3px solid var(--cyan); border-top: 0; border-radius: 0 0 16px 16px;
  box-shadow: 0 0 16px rgba(0,240,255,.4), inset 0 0 12px rgba(0,240,255,.2); overflow: hidden; display: grid; place-items: center;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%); }
.glass .water { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--p) * 1%); background: linear-gradient(to top, #0055dd, #00c8ff);
  transition: height .8s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 20px rgba(0,200,255,.7); }
.glass .water i { position: absolute; top: -6px; left: -50%; width: 200%; height: 12px; border-radius: 45%; background: #7fe8ff; opacity: .7; animation: wave 2.4s linear infinite; }
@keyframes wave { to { transform: translateX(25%); } }
.glass b { position: relative; font: 900 1rem 'Orbitron'; color: #fff; text-shadow: 0 0 6px #000, 0 0 10px #000; }
.wquick { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 12px 0; }
.wquick .btn { --c: var(--cyan); flex-direction: column; gap: 2px; min-height: 64px; font-size: .7rem; padding: 6px; }
.wquick .btn span { font-size: 1.4rem; }
.wthumb { width: 40px; height: 40px; display: grid; place-items: center; font-size: 1.4rem; flex: none; }
.wthumb img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.today-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tcard { display: flex; gap: 10px; align-items: flex-start; text-decoration: none; color: var(--text); }
.tcard .ti { font-size: 1.6rem; }
@media (max-width: 420px) { .today-grid { grid-template-columns: 1fr; } }
.next-part .np-ic { font-size: 1.9rem; width: 46px; text-align: center; filter: drop-shadow(0 0 8px rgba(0,240,255,.6)); }
.next-part b { font-family: 'Rajdhani'; font-size: 1.1rem; }
.parts-new { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.part-new { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--cyan); background: rgba(0,240,255,.1);
  box-shadow: 0 0 12px rgba(0,240,255,.3); animation: popIn .6s cubic-bezier(.2,1.6,.4,1) both; }
.part-new span { font-size: 1.3rem; }
.part-new.tier { border-color: var(--yellow); background: rgba(255,225,77,.12); box-shadow: 0 0 16px rgba(255,225,77,.5); }
.hangar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hpart { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px 10px;
  border: 1px solid rgba(0,240,255,.15); background: rgba(0,240,255,.03); opacity: .55; }
.hpart .hi { grid-row: span 2; font-size: 1.5rem; text-align: center; }
.hpart .hn { font-weight: 700; font-size: .92rem; line-height: 1.15; }
.hpart .hx { font: 700 .62rem 'Orbitron'; color: var(--muted); letter-spacing: .04em; }
.hpart.ok { opacity: 1; border-color: rgba(0,240,255,.45); }
.hpart.ok .hx { color: var(--green); }
.hpart.tier { border-color: rgba(255,225,77,.5); }
.hpart.tier.ok { background: rgba(255,225,77,.08); }
.hpart.next { opacity: 1; border-color: var(--yellow); box-shadow: 0 0 14px rgba(255,225,77,.35); animation: pulse 1.6s infinite; }
@media (min-width: 560px) { .hangar { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.form-line { margin-top: 4px; font: 700 .72rem 'Orbitron'; letter-spacing: .08em; color: var(--yellow); text-shadow: 0 0 8px rgba(255,225,77,.6); }
.morph { margin-top: 8px; font: 900 clamp(1.05rem, 6.2vw, 1.6rem) 'Orbitron'; overflow-wrap: anywhere; color: #fff; letter-spacing: .06em;
  text-shadow: 0 0 10px var(--yellow), 0 0 30px var(--orange), 0 0 60px var(--yellow); animation: lvlUp 1.6s ease-out both, flicker 1.2s infinite; }
.morph small { display: block; font-size: .85rem; color: var(--yellow); letter-spacing: .2em; margin-top: 4px; }
.hero-wrap.is3d .pad { bottom: 3%; width: 70%; opacity: .75; }
svg.hero .body { animation: breathe 3.6s ease-in-out infinite; transform-origin: 50% 85%; transform-box: fill-box; }
@keyframes breathe { 50% { transform: scale(1.012, 1.018); } }
svg.hero .pulse { animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.hero-wrap.flex svg.hero .body { animation: flex .9s ease-in-out 2; }
@keyframes flex { 40% { transform: scale(1.06, 1.03); } }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.hero-stats .st { text-align: center; padding: 8px 4px; border: 1px solid rgba(0,240,255,.2); background: rgba(0,240,255,.04); }
.hero-stats .st b { display: block; font: 900 1.05rem 'Orbitron'; color: var(--cyan); text-shadow: var(--glow); }
.hero-stats .st span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.rank-line { text-align: center; margin-top: 4px; }
.rank-line .lv { font: 900 1.6rem 'Orbitron'; color: #fff; text-shadow: var(--glow); }
.rank-line .rk { font: 700 .8rem 'Orbitron'; letter-spacing: .14em; color: var(--orange); text-transform: uppercase; }

/* ---------- Cartes de séance ---------- */
.wcard { display: flex; gap: 12px; align-items: center; }
.wcard .wic { width: 54px; height: 54px; flex: none; display: grid; place-items: center; font-size: 1.6rem; border: 1.5px solid var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 50%, transparent), inset 0 0 12px color-mix(in srgb, var(--accent) 30%, transparent);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.wcard h3 { color: var(--text); font-size: 1rem; text-transform: none; }
.exline { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid rgba(0,240,255,.12); }
.exline:first-child { border-top: 0; }
.thumb { width: 58px; height: 58px; flex: none; object-fit: cover; border: 1px solid var(--line); background: rgba(0,240,255,.06) center/cover; display: grid; place-items: center; font-size: 1.5rem; }
.exline .nm { font-weight: 700; font-size: 1.05rem; }
.exline .ac { display: flex; flex-direction: column; gap: 4px; }
.mini { width: 34px; height: 30px; border: 1px solid var(--line); background: rgba(0,240,255,.06); color: var(--cyan); cursor: pointer; font-size: .9rem; }
.mini:disabled { opacity: .3; }

/* ---------- Média dans l'éditeur ---------- */
.media-box { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px dashed rgba(0,240,255,.35); background: rgba(0,240,255,.03); }
.media-box img { width: 84px; height: 84px; object-fit: cover; border: 1px solid var(--line); }
.media-box audio { width: 100%; height: 36px; }
.file-btn input { display: none; }

/* ---------- Mission en cours ---------- */
.run { display: flex; flex-direction: column; gap: 12px; min-height: calc(100vh - 40px); min-height: calc(100dvh - 40px); }
.run-top { display: flex; align-items: center; gap: 10px; padding-top: var(--safe-t); }
.run-top .clock { font: 700 1rem 'Orbitron'; color: var(--muted); }
.run-dots { display: flex; gap: 4px; flex: 1; }
.run-dots i { flex: 1; height: 4px; background: rgba(0,240,255,.15); }
.run-dots i.done { background: var(--green); box-shadow: 0 0 6px var(--green); }
.run-dots i.skip { background: var(--orange); opacity: .6; }
.run-dots i.cur { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); animation: pulse 1.2s infinite; }
.stage { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 18px 14px; overflow: hidden;
  border: 1px solid var(--line); clip-path: var(--cut); background: rgba(3, 10, 22, .7); }
.stage .bgimg { position: absolute; inset: 0; background: center/cover no-repeat; opacity: .32; filter: saturate(1.2); z-index: 0; transition: opacity .6s; }
.stage .bgimg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(2,3,10,.4), rgba(2,3,10,.92) 75%); }
.stage > :not(.bgimg) { position: relative; z-index: 1; }
.stage.phase-rest { border-color: var(--orange); --accent: var(--orange); }
.stage.phase-work { border-color: var(--cyan); }
.phase-tag { align-self: center; font: 900 .78rem 'Orbitron'; letter-spacing: .3em; padding: 4px 14px; border: 1px solid var(--accent); color: var(--accent);
  text-shadow: 0 0 8px var(--accent); text-transform: uppercase; }
.ex-name { text-align: center; font: 900 clamp(1.3rem, 6vw, 1.9rem)/1.1 'Orbitron'; color: #fff; text-shadow: 0 0 14px var(--accent); }
.ex-sub { text-align: center; color: var(--muted); font-size: 1.05rem; }
.ex-img { width: 100%; max-height: 34vh; object-fit: contain; border: 1px solid var(--line); background: rgba(0,0,0,.4); box-shadow: 0 0 20px rgba(0,240,255,.15); cursor: zoom-in; }
.target { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.target .tg { text-align: center; min-width: 84px; padding: 8px 10px; border: 1px solid rgba(0,240,255,.25); background: rgba(0,240,255,.05); }
.target .tg b { display: block; font: 900 1.4rem 'Orbitron'; color: var(--accent); text-shadow: 0 0 10px var(--accent); }
.target .tg span { font-size: .78rem; color: var(--muted); text-transform: uppercase; }
.ring { position: relative; width: min(64vw, 270px); aspect-ratio: 1; margin: 0 auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring .trk { fill: none; stroke: rgba(0,240,255,.12); stroke-width: 8; }
.ring .val { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; filter: drop-shadow(0 0 8px var(--accent)); transition: stroke-dashoffset .25s linear; }
.ring .ticks { fill: none; stroke: rgba(0,240,255,.35); stroke-width: 3; stroke-dasharray: 1 9.47; }
.ring .spin { position: absolute; inset: -6%; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--accent) 50%, transparent); animation: spin 9s linear infinite; }
.ring .time { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .time b { font: 900 clamp(2.4rem, 13vw, 3.6rem)/1 'Orbitron'; color: #fff; text-shadow: 0 0 18px var(--accent); font-variant-numeric: tabular-nums; }
.ring .time small { display: block; font: 700 .72rem 'Orbitron'; letter-spacing: .2em; color: var(--accent); margin-top: 6px; text-transform: uppercase; }
.ring.alert .time b { color: var(--orange); animation: blink .5s steps(2) infinite; }
/* Halo vivant : --e = énergie du son (0..1), --b = basses, --rot = rotation de la comète */
.ring { --e: .3; --b: 0; --rot: 0deg; }
.ring .val { transition: stroke-dashoffset .25s linear, stroke .3s; stroke-width: calc(8px + var(--b) * 3px); }
.ring .time b { transition: color .3s; text-shadow: 0 0 calc(12px + var(--e) * 26px) var(--accent), 0 0 4px #fff; }
.ring .halo { position: absolute; inset: -16%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, transparent 50%, color-mix(in srgb, var(--accent) calc(25% + var(--e) * 60%), transparent) 58%, transparent 71%);
  filter: blur(calc(4px + var(--b) * 12px)); opacity: calc(.45 + var(--e) * .55); transform: scale(calc(1 + var(--b) * .1)); }
.ring .spec { position: absolute; inset: -22%; width: 144%; height: 144%; pointer-events: none; }
.ring .comet { position: absolute; inset: -3%; border-radius: 50%; pointer-events: none; transform: rotate(var(--rot));
  background: conic-gradient(from 0deg, transparent 0 62%, color-mix(in srgb, var(--accent) 60%, transparent) 88%, #fff 99.5%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 63.5%, #000 67%, transparent 68.5%); mask: radial-gradient(circle, transparent 62%, #000 63.5%, #000 67%, transparent 68.5%);
  filter: drop-shadow(0 0 6px var(--accent)) drop-shadow(0 0 14px var(--accent)); }
.ring.beat .time b { animation: beatPop .28s ease-out; }
.ring.beat .halo { animation: beatHalo .35s ease-out; }
@keyframes beatPop { 30% { transform: scale(1.09); } }
@keyframes beatHalo { 0% { filter: blur(2px) brightness(2); } }
.stage { transition: border-color .3s; }
.stage .phase-tag { transition: color .3s, border-color .3s; }
.mic-btn.on { border-color: var(--magenta); background: rgba(255,43,214,.18); box-shadow: 0 0 14px rgba(255,43,214,.6); animation: pulse 1.6s infinite; }
body.running .floor-grid { filter: drop-shadow(0 0 4px rgba(0,240,255,.6)) hue-rotate(var(--fxh, 0deg)); transition: filter .3s; }
@keyframes blink { 50% { opacity: .4; } }
.last-perf { border: 1px solid rgba(255,138,31,.45); background: rgba(255,138,31,.07); padding: 10px 12px; --accent: var(--orange); }
.last-perf h3 { font-size: .72rem; letter-spacing: .14em; margin-bottom: 6px; }
.last-perf .sets { display: flex; gap: 6px; flex-wrap: wrap; }
.last-perf .sets span { padding: 3px 8px; border: 1px solid rgba(255,138,31,.4); font: 700 .85rem 'Orbitron'; color: #ffd1a1; }
.next-box { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid rgba(0,240,255,.3); background: rgba(0,240,255,.05); }
.next-box .lbl { font: 700 .66rem 'Orbitron'; letter-spacing: .16em; color: var(--cyan); text-transform: uppercase; }
.next-box .nm { font-weight: 700; font-size: 1.1rem; }
.log-set { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.log-set .field > span { text-align: center; }
.run-actions { display: grid; gap: 10px; padding-bottom: calc(8px + var(--safe-b)); }
.run-actions .row > .btn { flex: 1; }
.countdown { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none; }
.countdown b { font: 900 30vw 'Orbitron'; color: #fff; text-shadow: 0 0 30px var(--cyan), 0 0 80px var(--cyan); animation: cd 1s ease-out forwards; }
@keyframes cd { from { transform: scale(2.2); opacity: 0; } 30% { opacity: 1; } to { transform: scale(.8); opacity: 0; } }

/* ---------- Récompenses ---------- */
.reward { text-align: center; }
.reward .big-title { font: 900 clamp(1.5rem, 8vw, 2.4rem)/1.1 'Orbitron'; color: #fff; text-transform: uppercase;
  text-shadow: 0 0 12px var(--green), 0 0 40px var(--green); animation: popIn .8s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes popIn { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.gain-list { text-align: left; }
.gain { display: flex; justify-content: space-between; padding: 7px 2px; border-bottom: 1px solid rgba(0,240,255,.12); opacity: 0; transform: translateX(-20px); transition: all .4s; }
.gain.show { opacity: 1; transform: none; }
.gain b { font-family: 'Orbitron'; color: var(--green); text-shadow: 0 0 8px var(--green); }
.gain-total { font: 900 2.6rem 'Orbitron'; color: var(--yellow); text-shadow: 0 0 16px var(--yellow); }
.lvl-up { font: 900 1.7rem 'Orbitron'; color: var(--yellow); text-shadow: 0 0 12px var(--yellow), 0 0 40px var(--orange); animation: lvlUp 1.4s ease-out both; }
@keyframes lvlUp { 0% { transform: scale(.2) rotate(-8deg); opacity: 0; } 40% { transform: scale(1.3) rotate(2deg); opacity: 1; } 100% { transform: none; } }
.flash { position: fixed; inset: 0; z-index: 70; background: radial-gradient(circle, rgba(255,255,255,.9), rgba(0,240,255,.4) 40%, transparent 70%); pointer-events: none; animation: flash .8s ease-out forwards; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.fx { position: fixed; inset: 0; z-index: 65; pointer-events: none; overflow: hidden; }
.fx i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--cyan)); box-shadow: 0 0 10px var(--c, var(--cyan)), 0 0 20px var(--c, var(--cyan)); }

/* ---------- Badges ---------- */
.badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.badge { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 2px; text-align: center; cursor: pointer; background: none; border: 0; }
.badge .bh { width: 74px; height: 82px; display: grid; place-items: center; font-size: 2rem; position: relative;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 55%, #000), #020814 70%); }
.badge .bh::before { content: ''; position: absolute; inset: 3px; clip-path: inherit; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--accent) 35%, #02060f), #02060f 75%); z-index: -1; }
.badge .bh { isolation: isolate; filter: drop-shadow(0 0 8px var(--accent)); }
.badge .bn { font: 700 .62rem 'Orbitron'; letter-spacing: .02em; text-transform: uppercase; line-height: 1.2; color: var(--text); max-width: 100%; overflow-wrap: anywhere; hyphens: auto; }
.reward .hero-wrap { width: min(56vw, 240px); }
.badge.locked .bh { filter: grayscale(1) brightness(.35); }
.badge.locked .bn { color: var(--muted); opacity: .6; }
.badge.new .bh { animation: badgeIn 1s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes badgeIn { from { transform: rotateY(180deg) scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
.badge-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.badge-row .badge { flex: none; width: 92px; }

/* ---------- Journal et graphiques ---------- */
.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs button { flex: 1; padding: 12px 6px; background: none; border: 0; color: var(--muted); font: 700 .74rem 'Orbitron'; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; position: relative; }
.tabs button.on { color: var(--cyan); text-shadow: var(--glow); }
.tabs button.on::after { content: ''; position: absolute; left: 15%; right: 15%; bottom: -1px; height: 2px; background: var(--cyan); box-shadow: var(--glow); }
.sess { cursor: pointer; }
.sess .date { font: 700 .72rem 'Orbitron'; letter-spacing: .1em; color: var(--accent); text-transform: uppercase; }
.sess .nm { font-weight: 700; font-size: 1.15rem; }
.sess .ph { width: 64px; height: 64px; object-fit: cover; border: 1px solid var(--line); flex: none; }
.kv { display: flex; gap: 14px; flex-wrap: wrap; font-size: .92rem; color: var(--muted); }
.kv b { color: var(--text); font-family: 'Orbitron'; font-size: .85rem; }
.chart-box { position: relative; height: 240px; }
.chart-box canvas { width: 100%; height: 100%; display: block; }
.chart-tip { position: absolute; pointer-events: none; padding: 6px 10px; background: rgba(2,8,20,.95); border: 1px solid var(--accent); font-size: .85rem; white-space: nowrap;
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 40%, transparent); transform: translate(-50%, -115%); }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { padding: 10px; border: 1px solid rgba(0,240,255,.22); background: rgba(0,240,255,.04); }
.stat b { display: block; font: 900 1.2rem 'Orbitron'; color: var(--accent); text-shadow: 0 0 8px var(--accent); }
.stat span { font-size: .8rem; color: var(--muted); text-transform: uppercase; }
table.sets { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.sets td, table.sets th { padding: 6px 4px; border-bottom: 1px solid rgba(0,240,255,.1); text-align: left; }
table.sets th { font: 700 .66rem 'Orbitron'; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.rec { color: var(--yellow); text-shadow: 0 0 6px var(--yellow); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal i { aspect-ratio: 1; background: rgba(0,240,255,.07); border: 1px solid rgba(0,240,255,.08); }
.cal i.on { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.cal i.today { border-color: var(--orange); }

/* ---------- Débriefing ---------- */
.feel { display: flex; justify-content: space-between; gap: 6px; }
.feel button { flex: 1; aspect-ratio: 1; max-width: 64px; font-size: 1.7rem; background: rgba(0,240,255,.05); border: 1px solid rgba(0,240,255,.2); cursor: pointer; filter: grayscale(.7); transition: all .2s; }
.feel button.on { filter: none; border-color: var(--yellow); box-shadow: 0 0 14px rgba(255,225,77,.5); transform: scale(1.08); }
.rec-btn { width: 74px; height: 74px; border-radius: 50%; border: 2px solid var(--red); background: rgba(255,59,92,.12); color: var(--red); font-size: 1.8rem; cursor: pointer; flex: none; }
.rec-btn.on { background: var(--red); color: #fff; box-shadow: 0 0 0 0 rgba(255,59,92,.7); animation: recPulse 1.2s infinite; }
@keyframes recPulse { to { box-shadow: 0 0 0 18px rgba(255,59,92,0); } }
.wave { flex: 1; height: 48px; }
.photo-prev { width: 100%; max-height: 300px; object-fit: cover; border: 1px solid var(--line); }

/* ---------- Feuille du bas ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-back { position: absolute; inset: 0; background: rgba(0,2,8,.72); backdrop-filter: blur(3px); animation: fadeIn .25s; }
.sheet-box { position: relative; width: 100%; max-width: 600px; max-height: 92vh; overflow-y: auto; padding: 18px 16px calc(20px + var(--safe-b));
  background: linear-gradient(to bottom, #061428, #030912); border-top: 2px solid var(--cyan); box-shadow: 0 -10px 40px rgba(0,240,255,.25);
  animation: sheetUp .35s cubic-bezier(.2,.9,.2,1); overscroll-behavior: contain; }
.sheet-box h2 { margin-bottom: 14px; }
.sheet.full .sheet-box { max-height: 100vh; height: 100%; }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes fadeIn { from { opacity: 0; } }
.zoom-img { width: 100%; height: auto; display: block; }

.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  padding: 12px 18px; max-width: calc(100% - 32px); background: rgba(2,10,22,.96); border: 1px solid var(--cyan); box-shadow: var(--glow); transition: all .3s; font-weight: 600; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: var(--red); box-shadow: 0 0 14px rgba(255,59,92,.5); }

.banner { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--orange); background: rgba(255,138,31,.1); --accent: var(--orange); }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.empty .em { font-size: 3rem; display: block; margin-bottom: 8px; }
.progress { height: 4px; background: rgba(0,240,255,.15); }
.progress i { display: block; height: 100%; width: 0; background: var(--cyan); box-shadow: var(--glow); transition: width .2s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}
@media (min-width: 700px) { .badges { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* =========================================================
   v12 : comptes, classements, atelier du robot, danses et super-pouvoirs
   ========================================================= */
/* Connexion / inscription */
.login .check, .check { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: .9rem; line-height: 1.35; color: var(--text); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--cyan); }
.check a, .privacy a { color: var(--cyan); }
.login-links { display: grid; gap: 10px; justify-items: center; }
.login-links a.btn { justify-self: stretch; }
.login .field { text-align: left; }
#loginMsg, #regMsg, #fgMsg, #rsMsg { color: var(--orange); min-height: 1.2em; }
.privacy { text-align: left; line-height: 1.5; }
.privacy h3 { margin: 18px 0 6px; color: var(--cyan); font-size: .95rem; }
.privacy ul { padding-left: 20px; margin: 6px 0; }
.privacy li { margin: 4px 0; }
.ok-t { color: var(--green); } .warn-t { color: var(--orange); }

/* QG : boutons à côté du robot */
.hero-zone { display: grid; grid-template-columns: 50px minmax(0, 1fr) 50px; align-items: center; gap: 2px; margin-top: 6px; }
.hero-zone .hero-wrap { width: 100%; max-width: 300px; margin: 0 auto; }
.hero-side { display: flex; flex-direction: column; gap: 12px; align-items: center; position: relative; z-index: 19; }
.side-btn { width: 48px; height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 1.35rem; cursor: pointer;
  color: var(--text); background: rgba(4,14,30,.85); border: 1px solid var(--cyan); clip-path: polygon(0 8px, 8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  box-shadow: inset 0 0 14px rgba(0,240,255,.25); transition: transform .15s, background .2s; }
.side-btn small { font: 700 .5rem 'Orbitron'; letter-spacing: .06em; text-transform: uppercase; color: var(--cyan); }
.side-btn:active { transform: scale(.94); }
.side-btn.open, .side-btn.on { background: rgba(0,240,255,.22); box-shadow: 0 0 16px rgba(0,240,255,.6), inset 0 0 14px rgba(0,240,255,.4); }
.side-btn.on { border-color: var(--magenta); } .side-btn.on small { color: var(--magenta); }
.hmenu { position: fixed; z-index: 45; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; padding: 2px; scrollbar-width: none; max-width: min(64vw, 260px); }
.hmenu.from-right { align-items: flex-end; }
.hmenu.from-left { align-items: flex-start; }
.hpill { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font: 600 .95rem 'Rajdhani', sans-serif; color: var(--text); cursor: pointer; white-space: nowrap;
  background: rgba(4,14,30,.95); border: 1px solid var(--cyan); border-radius: 999px; box-shadow: 0 0 12px rgba(0,240,255,.35);
  animation: pillIn .32s cubic-bezier(.2,.9,.3,1.3) both; }
.hmenu.from-right .hpill { transform-origin: right center; } .hmenu.from-left .hpill { transform-origin: left center; }
.hpill span { font-size: 1.15rem; }
.hpill.on { border-color: var(--magenta); color: #fff; box-shadow: 0 0 14px rgba(255,43,214,.6); }
.hpill.stop { border-color: var(--orange); color: var(--orange); }
.hpill.locked { opacity: .5; border-color: var(--line); box-shadow: none; cursor: default; }
.hpill em { font-style: normal; font-size: .75rem; color: var(--muted); }
@keyframes pillIn { from { opacity: 0; transform: scale(.4) translateY(-14px); } to { opacity: 1; transform: none; } }
.coach-dock.over { z-index: 55; }
.coach-dock.quake .dock-box { animation: heroShake .08s linear 6; }
/* v13 : ATLAS vivant dans sa bulle (portrait de la tête) et focus quand il parle */
.coach-dock.mini .dock-box::before { animation: dockBreath 3.6s ease-in-out infinite; }
/* aura autour de la bulle : invisible au repos, elle pulse quand ATLAS parle */
.coach-dock.mini .dock-box::after { content: ''; position: absolute; left: 50%; top: 50%; width: 200%; aspect-ratio: 1; border-radius: 50%; z-index: -2; pointer-events: none;
  background: radial-gradient(circle, rgba(0,240,255,.75) 0%, rgba(0,240,255,.6) 34%, rgba(0,240,255,.32) 46%, rgba(155,107,255,.2) 58%, transparent 72%);
  transform: translate(-50%, -50%) scaleY(1.15) scale(.7); opacity: 0; transition: opacity .4s, transform .4s; }
.coach-dock.mini.portrait .dock-box canvas { clip-path: ellipse(47% 45% at 50% 50%); }
.coach-dock.mini.talking .dock-box::before { animation: dockTalk .45s ease-in-out infinite alternate; }
.coach-dock.mini.talking .dock-box::after { opacity: 1; animation: dockAura .9s ease-in-out infinite alternate; }
@keyframes dockAura { from { transform: translate(-50%, -50%) scaleY(1.15) scale(.86); filter: hue-rotate(0deg); } to { transform: translate(-50%, -50%) scaleY(1.15) scale(1.06); filter: hue-rotate(40deg); } }
@keyframes dockBreath { 50% { box-shadow: 0 0 70px rgba(0,240,255,.9), inset 0 0 60px rgba(0,240,255,.45); border-color: #7ff8ff; } }
@keyframes dockTalk { from { box-shadow: 0 0 50px rgba(0,240,255,.7), inset 0 0 40px rgba(0,240,255,.35); } to { box-shadow: 0 0 100px rgba(0,240,255,1), inset 0 0 80px rgba(0,240,255,.6); border-color: #fff; } }
@keyframes dockOrbit { from { transform: translate(-50%, -50%) scaleY(1.25) rotate(0deg); } to { transform: translate(-50%, -50%) scaleY(1.25) rotate(360deg); } }
/* En grand : lueur derrière la tête et anneau de scan qui s'élargit pendant qu'il parle */
.coach-dock:not(.mini) .dock-box::before, .coach-dock:not(.mini) .dock-box::after { content: ''; position: absolute; pointer-events: none; opacity: 0; transition: opacity .45s; }
.coach-dock:not(.mini) .dock-box::before { inset: -6%; z-index: -1; background: radial-gradient(circle at 50% 38%, rgba(0,240,255,.26), rgba(155,107,255,.1) 34%, transparent 62%); }
.coach-dock:not(.mini) .dock-box::after { left: 50%; top: 38%; width: 66%; aspect-ratio: 1; border-radius: 50%; z-index: 3;
  border: 2px solid rgba(0,240,255,.7); box-shadow: 0 0 14px rgba(0,240,255,.5), inset 0 0 14px rgba(0,240,255,.3); transform: translate(-50%, -50%); }
.coach-dock.talking:not(.mini) .dock-box::before { opacity: 1; animation: talkGlow 1.1s ease-in-out infinite alternate; }
.coach-dock.talking:not(.mini) .dock-box::after { opacity: 1; animation: talkRing 1.6s ease-out infinite; }
@keyframes talkGlow { from { transform: scale(.94); } to { transform: scale(1.06); } }
@keyframes talkRing { 0% { transform: translate(-50%, -50%) scale(.72); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1.22); opacity: 0; } }

/* Atelier du robot */
.atelier-box { padding-top: 10px; }
.av-head { position: sticky; top: -16px; z-index: 2; display: flex; gap: 12px; align-items: center; padding: 8px 0 6px; background: linear-gradient(var(--bg, #02030a) 80%, transparent); }
.av-head .av-prev { width: 112px; margin: 0; flex: none; aspect-ratio: 260 / 340; }
.av-head .tabs { margin-bottom: 0; }
.av-body { padding-top: 6px; }
.eqgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.eq { display: flex; gap: 8px; align-items: center; text-align: left; padding: 8px; font: 600 .88rem 'Rajdhani', sans-serif; color: var(--text); cursor: pointer;
  background: rgba(0,240,255,.07); border: 1px solid var(--cyan); }
.eq span { font-size: 1.2rem; }
.eq.off { opacity: .45; border-style: dashed; border-color: var(--line); background: none; text-decoration: line-through; }
.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; font: 600 .8rem/1.15 'Rajdhani', sans-serif; color: var(--text); text-align: center;
  background: rgba(4,14,30,.6); border: 1px solid var(--line); cursor: pointer; }
.swatch i { width: 46px; height: 46px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); box-shadow: 0 0 12px rgba(0,240,255,.25); }
.swatch i.rb { animation: hueSpin 3s linear infinite; }
.swatch.special i { box-shadow: 0 0 16px rgba(255,225,77,.5); }
.swatch.special span::before { content: '✨ '; }
.swatch.on { border-color: var(--cyan); background: rgba(0,240,255,.14); box-shadow: 0 0 12px rgba(0,240,255,.4); }
.swatch.locked { opacity: .45; cursor: default; }
.swatch em { font-style: normal; font-size: .72rem; color: var(--muted); }
@keyframes hueSpin { to { filter: hue-rotate(360deg); } }
.logos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.logo { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; font: 600 .74rem/1.1 'Rajdhani', sans-serif; color: var(--text); background: rgba(4,14,30,.6);
  border: 1px solid var(--line); cursor: pointer; text-align: center; }
.logo span { font-size: 1.6rem; }
.logo.on { border-color: var(--accent, var(--cyan)); box-shadow: 0 0 12px color-mix(in srgb, var(--accent, #00f0ff) 50%, transparent); background: rgba(0,240,255,.12); }
.logo.locked { opacity: .35; cursor: default; }

/* Trophées : danses, super-pouvoirs, classements */
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pcard { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; text-align: center; cursor: pointer; color: var(--text);
  background: linear-gradient(160deg, rgba(155,107,255,.16), rgba(4,14,30,.7)); border: 1px solid var(--violet); clip-path: var(--cut); }
.pcard .pi { font-size: 2rem; filter: drop-shadow(0 0 8px rgba(155,107,255,.8)); }
.pcard b { font: 700 .78rem 'Orbitron'; letter-spacing: .04em; }
.pcard em { font-style: normal; font-size: .75rem; color: var(--muted); }
.pcard.on { border-color: var(--magenta); box-shadow: 0 0 18px rgba(255,43,214,.5); }
.pcard.on .pi { animation: danceIcon .5s ease-in-out infinite alternate; }
.pcard.locked { opacity: .45; filter: grayscale(.7); cursor: default; }
@keyframes danceIcon { from { transform: rotate(-12deg) translateY(0); } to { transform: rotate(12deg) translateY(-4px); } }
.rank-me .rk-grid { display: grid; gap: 6px; margin: 10px 0 6px; }
.rank-me .rk-grid > div { display: grid; grid-template-columns: 112px 1fr 44px; gap: 8px; align-items: center; font-size: .85rem; }
.rank-me .rk-grid b { font: 700 .78rem 'Orbitron'; text-align: right; }
.rank-row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; }
.rank-row .rk-pos { width: 34px; text-align: center; font: 900 1rem 'Orbitron'; font-size: 1.3rem; }
.rank-row.me { border-color: var(--yellow); box-shadow: 0 0 14px rgba(255,225,77,.35); }
.rank-row .xpbar { margin-top: 6px; }
.admin-user { padding: 10px 12px; }

/* =========================================================
   v13 : hydratation façon jeu vidéo, graphiques, jeu d'arcade
   ========================================================= */
/* Navigation à 6 onglets : libellés lisibles dès 360 px */
@media (max-width: 420px) { .nav a { font-size: .5rem; letter-spacing: 0; } .nav a .ni { font-size: 1.15rem; } }

/* Eau : goutte, éclaboussure, bulles, textes flottants, combo, bannières */
.droplet { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 0 50% 50% 50%;
  background: radial-gradient(circle at 60% 60%, #ffffff, #7fe8ff 28%, #0088ff 75%); box-shadow: 0 0 14px #00c8ff, 0 0 30px rgba(0,200,255,.6); }
.splash-ring { position: absolute; width: 60px; height: 16px; margin: -8px 0 0 -30px; border-radius: 50%; border: 2px solid #9ff4ff;
  box-shadow: 0 0 12px #00e0ff, inset 0 0 8px rgba(0,224,255,.6); animation: splashRing .6s ease-out forwards; }
@keyframes splashRing { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
.ftxt { position: absolute; transform: translate(-50%, -50%); font: 900 1.25rem 'Orbitron'; color: #fff; white-space: nowrap; pointer-events: none;
  text-shadow: 0 0 8px var(--cyan), 0 0 22px var(--cyan); animation: ftxtUp 1.5s cubic-bezier(.2,.8,.3,1) forwards; }
.ftxt.xp { color: #fff6b0; font-size: 1rem; text-shadow: 0 0 8px var(--yellow), 0 0 20px var(--orange); }
.ftxt.muted { font: 700 .72rem 'Orbitron'; color: var(--muted); text-shadow: 0 0 6px #000; }
@keyframes ftxtUp { 0% { transform: translate(-50%, -30%) scale(.5); opacity: 0; } 15% { transform: translate(-50%, -60%) scale(1.15); opacity: 1; }
  70% { opacity: 1; } 100% { transform: translate(-50%, -190%) scale(1); opacity: 0; } }
.xp-chip { position: absolute; padding: 5px 11px; font: 900 .9rem 'Orbitron'; color: #1a1000; white-space: nowrap; border-radius: 999px;
  background: linear-gradient(135deg, #fff6b0, var(--yellow) 45%, var(--orange)); box-shadow: 0 0 14px rgba(255,225,77,.9), 0 0 30px rgba(255,138,31,.6); }
.fx-banner { position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%); width: max-content; max-width: 92vw; padding: 10px 18px; text-align: center;
  font: 900 clamp(1.05rem, 6vw, 1.8rem)/1.15 'Orbitron'; color: #fff; letter-spacing: .06em; text-transform: uppercase;
  background: linear-gradient(90deg, transparent, rgba(0,40,80,.75) 15%, rgba(0,40,80,.75) 85%, transparent); border-top: 1px solid var(--cyan); border-bottom: 1px solid var(--cyan);
  text-shadow: 0 0 10px var(--cyan), 0 0 30px var(--cyan), 0 0 60px #0077ff; animation: fxBanner 1.9s cubic-bezier(.2,1.3,.4,1) forwards; }
.fx-banner.gold { color: #fff8d0; border-color: var(--yellow); background: linear-gradient(90deg, transparent, rgba(70,40,0,.8) 15%, rgba(70,40,0,.8) 85%, transparent);
  text-shadow: 0 0 10px var(--yellow), 0 0 30px var(--orange), 0 0 60px var(--yellow); animation-duration: 2.8s; }
@keyframes fxBanner { 0% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; filter: blur(6px); } 14% { transform: translate(-50%, -50%) scale(.92); opacity: 1; filter: none; }
  22% { transform: translate(-50%, -50%) scale(1.04); } 30%, 78% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -90%) scale(.9); opacity: 0; } }
.fx-combo { position: absolute; transform: translate(-50%, -50%) rotate(-8deg); font: 900 1.5rem 'Orbitron'; color: var(--magenta); white-space: nowrap;
  text-shadow: 0 0 8px var(--magenta), 0 0 24px var(--magenta), 2px 2px 0 #000; animation: comboIn 1.4s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes comboIn { 0% { transform: translate(-50%, -50%) rotate(-8deg) scale(3); opacity: 0; } 18% { transform: translate(-50%, -50%) rotate(-8deg) scale(1); opacity: 1; }
  75% { opacity: 1; } 100% { transform: translate(-50%, -120%) rotate(-8deg) scale(1.1); opacity: 0; } }
.glass.slosh { animation: glassHit .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes glassHit { 30% { transform: scale(1.07, .95); } 60% { transform: scale(.97, 1.03); } }
.glass.slosh .water { animation: slosh 1.2s ease-out; filter: brightness(1.3); transition: height .9s cubic-bezier(.3,1.4,.5,1), filter 1s; }
@keyframes slosh { 15% { transform: skewY(-7deg); } 40% { transform: skewY(5deg); } 65% { transform: skewY(-2.5deg); } 100% { transform: none; } }
.glass.slosh .water i { animation-duration: .7s; }
.glass .water .bub { position: absolute; bottom: 0; width: var(--s, 6px); height: var(--s, 6px); border-radius: 50%; opacity: 0;
  border: 1px solid rgba(255,255,255,.85); background: rgba(255,255,255,.2); animation: bubUp 1.3s ease-in forwards; }
@keyframes bubUp { 0% { bottom: 0; opacity: 0; } 15% { opacity: .95; } 85% { opacity: .8; } 100% { bottom: 94%; opacity: 0; transform: translateX(5px); } }
.wxp .row b.orb { color: var(--yellow); text-shadow: 0 0 8px rgba(255,225,77,.6); }
/* La barre d'XP du haut s'illumine quand l'XP arrive */
.top.xp-hit .xpbar { animation: topHit .8s ease-out; }
.top.xp-hit .hex { animation: hexPop .6s cubic-bezier(.2,1.6,.4,1); }
.top.xp-hit .top-rank { color: var(--yellow); transition: color .2s; }
@keyframes topHit { 25% { background: rgba(255,225,77,.35); border-color: var(--yellow); filter: brightness(1.7); } }
@keyframes hexPop { 40% { transform: scale(1.28); filter: drop-shadow(0 0 14px var(--yellow)); } }
.td-water { flex: none; }
.game-btn { margin-top: 0; }

/* Graphiques */
.ch-period .chip { padding: 6px 12px; font-weight: 700; }
.ch-mode { margin-top: 8px; }
.ch-mode .chip { padding: 3px 10px; font-size: .8rem; }
.ch-card h3 { line-height: 1.2; }
.ch-stats { margin-top: 10px; }
.ch-stats .stat b { font-size: 1.05rem; }
.ch-stats .stat span { text-transform: none; font-size: .8rem; line-height: 1.2; display: block; }
#jBody.ch-loading { opacity: .5; pointer-events: none; transition: opacity .2s; }
.chart-box.mc { height: auto; margin-top: 10px; }
.chart-empty { padding: 30px 10px; }
.chart-empty .em { font-size: 2rem; }
.mc-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 6px; }
.mc-key { display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; background: none; border: 0; color: var(--text); font: 600 .85rem 'Rajdhani', sans-serif; cursor: pointer; }
.mc-key i { width: 14px; height: 4px; border-radius: 2px; background: var(--k); box-shadow: 0 0 6px var(--k); }
.mc-key.tgt { cursor: default; color: var(--muted); }
.mc-key.tgt i { height: 0; border-top: 2px dashed var(--k); background: none; box-shadow: none; }
.mc-key.off { opacity: .4; text-decoration: line-through; }
.mc-plot { position: relative; }
.mc-plot canvas { touch-action: pan-y; }
.chart-tip.mc-tip { transform: none; line-height: 1.35; z-index: 2; }
.mc-tip .mc-tt { font: 700 .7rem 'Orbitron'; letter-spacing: .04em; color: var(--accent); margin-bottom: 2px; }
.mc-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.wt-list { margin-top: 10px; }

/* Jeu d'arcade : menu */
.glaunch { --accent: var(--sc, var(--cyan)); margin-top: 12px; scroll-margin-top: 76px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--sc, #00f0ff) 20%, transparent), var(--panel) 65%); border-color: color-mix(in srgb, var(--sc, #00f0ff) 60%, transparent); }
.glaunch .gl-ic { font-size: 2.6rem; width: 60px; text-align: center; flex: none; filter: drop-shadow(0 0 12px var(--sc, var(--cyan))); animation: glFloat 3s ease-in-out infinite; }
@keyframes glFloat { 50% { transform: translateY(-5px) rotate(4deg); } }
.glaunch .gl-name { display: block; font: 900 1.05rem/1.2 'Orbitron'; color: #fff; text-shadow: 0 0 10px var(--sc, var(--cyan)); margin: 2px 0; }
.gstars { color: var(--yellow); letter-spacing: .1em; text-shadow: 0 0 8px rgba(255,225,77,.7); }
.gload { font: 700 .8rem 'Orbitron'; color: var(--text); margin-bottom: 10px; text-align: center; }
.gmap { display: grid; gap: 8px; }
.gsector { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; text-align: left; color: var(--text); cursor: pointer; font: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--sc) 14%, transparent), rgba(4,14,30,.75)); border: 1px solid color-mix(in srgb, var(--sc) 50%, transparent); clip-path: var(--cut); }
.gsector .gs-ic { font-size: 1.7rem; width: 40px; text-align: center; flex: none; }
.gsector .grow { display: flex; flex-direction: column; gap: 2px; }
.gsector b { font: 700 .8rem 'Orbitron'; letter-spacing: .03em; }
.gsector .small { line-height: 1.2; }
.gsector .gs-st { display: flex; flex-direction: column; align-items: flex-end; flex: none; font-size: .8rem; }
.gsector .gs-st small { font: 700 .68rem 'Orbitron'; color: var(--muted); }
.gsector.on { border-color: var(--sc); box-shadow: inset 0 0 22px color-mix(in srgb, var(--sc) 35%, transparent); }
.gsector.on .gs-ic { animation: glFloat 2.4s ease-in-out infinite; }
.gsector.locked { opacity: .45; filter: grayscale(.7); cursor: default; }
.gboosts { display: grid; gap: 8px; }
.gboost { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px dashed rgba(127,163,184,.4); background: rgba(4,14,30,.5); }
.gboost .gi { font-size: 1.5rem; width: 34px; text-align: center; flex: none; filter: grayscale(1) brightness(.7); }
.gboost b { font-size: 1rem; }
.gboost .gb-st { font: 900 .6rem 'Orbitron'; letter-spacing: .1em; padding: 3px 7px; border: 1px solid var(--muted); color: var(--muted); flex: none; }
.gboost.on { border: 1px solid var(--green); background: rgba(61,255,139,.08); box-shadow: 0 0 12px rgba(61,255,139,.25); }
.gboost.on .gi { filter: drop-shadow(0 0 8px rgba(61,255,139,.7)); }
.gboost.on .gb-st { color: #021018; background: var(--green); border-color: var(--green); }
.garsenal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.garm { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; text-align: center; clip-path: var(--cut);
  border: 1px solid var(--magenta); background: linear-gradient(160deg, rgba(255,43,214,.14), rgba(4,14,30,.7)); }
.garm .gi { font-size: 1.8rem; filter: drop-shadow(0 0 8px rgba(255,43,214,.7)); }
.garm b { font: 700 .72rem 'Orbitron'; letter-spacing: .03em; overflow-wrap: anywhere; }
.garm em { font-style: normal; font-size: .78rem; color: var(--muted); line-height: 1.2; }
.garm.locked { border-color: var(--line); background: rgba(4,14,30,.5); opacity: .65; }
.garm.locked .gi { filter: grayscale(1); }
.garm.locked em { color: var(--yellow); }
@media (min-width: 560px) { .garsenal { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Jeu d'arcade : plein écran (l'interface de l'appli se cache) */
.game-host { position: fixed; inset: 0; z-index: 95; background: #000; overflow: hidden; touch-action: none; overscroll-behavior: none;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
body.gaming { overflow: hidden; }
body.gaming #top, body.gaming #nav, body.gaming #coachDock, body.gaming .dock-bubble, body.gaming #view, body.gaming .floor { display: none !important; }
/* au-dessus de l'hôte du jeu (z-index posé en ligne par game.js) */
body.gaming .toast { z-index: 2147483001; top: calc(12px + var(--safe-t)); bottom: auto; }

/* ---------- v14 : énergie ⚡ et avis ---------- */
.energy-chip { display: inline-flex; align-items: center; gap: 3px; padding: 4px 9px; border: 1px solid var(--yellow); border-radius: 999px; color: var(--yellow);
  font: 700 .78rem 'Orbitron'; text-decoration: none; background: rgba(255,225,77,.08); box-shadow: 0 0 10px rgba(255,225,77,.25); white-space: nowrap; }
.energy-chip b { font-weight: 700; }
.energy-chip.low { color: var(--orange); border-color: var(--orange); animation: blink 1s steps(2) infinite; }
.energy-chip.pulse { animation: enPulse .6s ease-out; }
@keyframes enPulse { 30% { transform: scale(1.25); box-shadow: 0 0 22px var(--yellow); } }
.energy-hero { display: flex; gap: 16px; align-items: center; }
.en-cell { position: relative; flex: none; width: 54px; height: 86px; border: 2px solid var(--yellow); border-radius: 10px; overflow: hidden; box-shadow: 0 0 16px rgba(255,225,77,.35); }
.en-cell::before { content: ''; position: absolute; top: -8px; left: 18px; width: 14px; height: 6px; background: var(--yellow); border-radius: 3px 3px 0 0; }
.en-fill { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, #ff8a1f, #ffe14d); box-shadow: 0 0 20px #ffe14d; transition: height .8s ease-out; }
.en-cell span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.6rem; filter: drop-shadow(0 0 4px #000); }
.en-big { font: 900 1.7rem 'Orbitron'; color: var(--yellow); text-shadow: 0 0 12px rgba(255,225,77,.6); }
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pack { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px; cursor: pointer; color: var(--text);
  background: rgba(255,225,77,.07); border: 1px solid var(--yellow); clip-path: var(--cut); }
.pack b { font: 900 1rem 'Orbitron'; color: var(--yellow); }
.pack span { font: 700 1.05rem 'Rajdhani', sans-serif; }
.pack em { font-style: normal; font-size: .72rem; color: var(--muted); text-align: center; }
.pack.best { background: rgba(255,225,77,.18); box-shadow: 0 0 16px rgba(255,225,77,.4); }
.pack:disabled { opacity: .5; }
.check.shake { animation: heroShake .09s linear 4; }
.fb-shot { margin-top: 10px; }
.fb-shot img { display: block; margin-top: 6px; max-width: 100%; max-height: 34vh; border: 1px solid var(--line); object-fit: contain; }
@media (max-width: 380px) { .top .icon-btn { width: 36px; height: 36px; } .energy-chip { padding: 3px 7px; font-size: .7rem; } }

/* mentions légales : informations encore manquantes */
mark.todo { background: rgba(255,138,31,.18); color: var(--orange); padding: 0 4px; border-radius: 3px; font-weight: 700; }

/* pack avec énergie offerte */
.pack { position: relative; }
.pack.bonus { border-color: var(--green); background: rgba(61,255,139,.1); box-shadow: 0 0 18px rgba(61,255,139,.35); }
.pack-gift { font-style: normal; font: 700 .62rem 'Orbitron'; color: #021018; background: var(--green); padding: 2px 6px; border-radius: 999px; white-space: nowrap; box-shadow: 0 0 10px rgba(61,255,139,.6); }

/* ---------- QG : bandeau « Installer l'appli » (seulement quand elle n'est pas installée) ---------- */
.install-bar { display: flex; align-items: stretch; gap: 6px; margin: 2px 0 12px; }
.install-go { flex: 1; display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-align: left; cursor: pointer; color: var(--text); font: inherit;
  border: 1.5px solid var(--green); background: linear-gradient(100deg, rgba(61,255,139,.2), rgba(0,240,255,.1)); clip-path: var(--cut);
  box-shadow: 0 0 16px rgba(61,255,139,.4), inset 0 0 16px rgba(61,255,139,.15); animation: installGlow 2.4s ease-in-out infinite; }
.install-go .ic { font-size: 1.7rem; filter: drop-shadow(0 0 8px rgba(61,255,139,.8)); }
.install-go b { display: block; font: 700 .95rem 'Orbitron'; letter-spacing: .06em; text-transform: uppercase; color: var(--green); text-shadow: 0 0 10px rgba(61,255,139,.6); }
.install-go small { display: block; font-size: .85rem; opacity: .85; line-height: 1.2; margin-top: 2px; }
.install-go .go { font: 700 1.5rem 'Orbitron'; color: var(--green); }
.install-go:active { transform: scale(.98); }
.install-x { width: 38px; flex: none; border: 1px solid var(--line); background: rgba(0,240,255,.05); color: var(--muted); cursor: pointer; font-size: .9rem; }
@keyframes installGlow { 50% { box-shadow: 0 0 28px rgba(61,255,139,.7), inset 0 0 22px rgba(61,255,139,.25); } }
.install-steps { padding-left: 22px; line-height: 1.6; }
.install-steps li { margin: 6px 0; }
.kbd { display: inline-block; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; background: rgba(0,240,255,.08); font-weight: 700; }

/* ---------- Écran de connexion : bouton « Découvrir le jeu » bien visible ---------- */
.discover-cta { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; padding: 12px 14px; text-decoration: none; color: var(--text);
  border: 1.5px solid var(--orange); background: linear-gradient(100deg, rgba(255,138,31,.22), rgba(255,43,214,.12)); clip-path: var(--cut);
  box-shadow: 0 0 18px rgba(255,138,31,.45), inset 0 0 18px rgba(255,138,31,.18); animation: ctaGlow 2.2s ease-in-out infinite; }
.discover-cta b { display: block; font: 700 1rem 'Orbitron'; letter-spacing: .06em; text-transform: uppercase; color: var(--orange); text-shadow: 0 0 10px rgba(255,138,31,.7); }
.discover-cta small { display: block; color: var(--text); opacity: .85; font-size: .88rem; line-height: 1.2; margin-top: 2px; }
.discover-cta .dc-ic { font-size: 1.8rem; filter: drop-shadow(0 0 8px rgba(255,138,31,.8)); }
.discover-cta .dc-go { font: 700 1.6rem 'Orbitron'; color: var(--orange); }
.discover-cta:active { transform: scale(.98); }
@keyframes ctaGlow { 50% { box-shadow: 0 0 32px rgba(255,138,31,.75), inset 0 0 24px rgba(255,138,31,.3); } }

/* ---------- Courses : réserve, listes à cocher, fiches aliments ---------- */
.shop-stock .shop-days { margin: 6px 0 10px; font-size: 1.05rem; }
.shop-stock .shop-days b { font-size: 1.6rem; color: var(--cyan); text-shadow: var(--glow); }
.shop-stock.low { border-color: var(--orange); box-shadow: 0 0 18px rgba(255,138,31,.25); }
.shop-stock.low .shop-days b { color: var(--orange); text-shadow: 0 0 10px rgba(255,138,31,.7); }
.tanks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.tank { text-align: center; min-width: 0; }
.tank .tk { position: relative; height: 110px; border: 1.5px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent);
  box-shadow: inset 0 0 14px color-mix(in srgb, var(--accent) 22%, transparent); clip-path: polygon(0 8px, 8px 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); overflow: hidden; }
.tank .tk i { position: absolute; left: 0; right: 0; bottom: 0; height: var(--h); background: linear-gradient(0deg, color-mix(in srgb, var(--accent) 35%, transparent), var(--accent));
  box-shadow: 0 0 16px var(--accent); animation: tankUp 1.1s cubic-bezier(.2,.8,.3,1) both; }
.tank .tk i::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 9px, rgba(2,3,10,.35) 9px 11px); }
.tank .tk b { position: absolute; inset: auto 0 6px 0; font: 700 .8rem 'Orbitron'; color: #fff; text-shadow: 0 0 6px #000, 0 0 2px #000; }
.tank .tl { font: 700 .62rem 'Orbitron'; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-top: 6px; }
.tank .tv { font-size: .78rem; color: var(--muted); line-height: 1.15; }
.tank .tv b { color: var(--text); }
@keyframes tankUp { from { height: 0; } }
.banner.shop-low { margin-top: 10px; border-color: var(--orange); background: rgba(255,138,31,.1); }
.shop-lists { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.shop-lists::-webkit-scrollbar { display: none; }
.shop-lchip { position: relative; flex: none; width: 140px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 10px 12px; text-align: left;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; clip-path: var(--cut); overflow: hidden; }
.shop-lchip .ic { font-size: 1.5rem; line-height: 1; }
.shop-lchip b { font-size: .92rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-lchip small { color: var(--muted); font-size: .76rem; }
.shop-lchip > i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--green); box-shadow: 0 0 8px var(--green); }
.shop-lchip.on { border-color: var(--green); box-shadow: inset 0 0 18px rgba(61,255,139,.18), 0 0 12px rgba(61,255,139,.3); }
.shop-lchip.add { border-style: dashed; color: var(--muted); }
.shop-lic { font-size: 2rem; line-height: 1; filter: drop-shadow(0 0 8px rgba(61,255,139,.6)); }
.shop-list h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
b.paid { color: var(--green); }
.shop-sec { margin-top: 14px; }
.shop-sech { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 4px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 85%); border-left: 3px solid var(--accent); }
.shop-sech b { color: var(--accent); font-family: 'Orbitron'; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.shop-ill { position: relative; flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid var(--accent); background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 30%, transparent), rgba(2,3,10,.9) 70%);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 55%, transparent), inset 0 0 10px color-mix(in srgb, var(--accent) 35%, transparent); }
.shop-ill b { font-size: 1.45rem; color: inherit !important; font-family: inherit !important; filter: drop-shadow(0 0 4px rgba(255,255,255,.4)); }
.shop-ill i { position: absolute; right: -6px; top: -6px; font-style: normal; font-size: .85rem; width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 50%; background: var(--bg2); border: 1px solid var(--accent); }
.shop-ill.sm { width: 36px; height: 36px; }
.shop-ill.sm b { font-size: 1.1rem; }
.shop-it { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px solid rgba(0,240,255,.1); transition: opacity .3s; }
.shop-it:first-of-type { border-top: 0; }
.shop-chk { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--accent); background: transparent; color: #021018;
  font: 900 1.05rem 'Orbitron'; cursor: pointer; box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 40%, transparent); }
.shop-chk:active { transform: scale(.88); }
.shop-it.done .shop-chk { background: var(--green); border-color: var(--green); box-shadow: 0 0 14px var(--green); }
.shop-it.done .nm { text-decoration: line-through; text-decoration-color: rgba(61,255,139,.7); opacity: .75; }
.shop-th { flex: none; width: 46px; height: 46px; padding: 0; display: grid; place-items: center; font-size: 1.6rem; border: 1px solid var(--line);
  background: rgba(0,240,255,.05); border-radius: 8px; overflow: hidden; cursor: pointer; }
.shop-th img { width: 100%; height: 100%; object-fit: cover; }
.shop-txt { min-width: 0; cursor: pointer; }
.shop-txt .nm { font-weight: 700; font-size: 1.02rem; }
.shop-badges { display: flex; gap: 5px; margin-top: 3px; flex-wrap: wrap; }
.shop-badges span { font: 700 .6rem 'Orbitron'; padding: 2px 6px; border-radius: 999px; }
.shop-badges .xpb { background: rgba(255,225,77,.16); color: var(--yellow); }
.shop-badges .miss { background: rgba(127,163,184,.14); color: var(--muted); }
.food-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.food-img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; flex: none; }
.food-emo { width: 92px; height: 92px; flex: none; display: grid; place-items: center; font-size: 3.2rem; border-radius: 50%; border: 1.5px solid var(--green);
  background: radial-gradient(circle at 35% 30%, rgba(61,255,139,.25), rgba(2,3,10,.9) 70%); box-shadow: 0 0 18px rgba(61,255,139,.4); }
.food-img.sm, .food-emo.sm { width: 60px; height: 60px; font-size: 2rem; }
.food-head h2 { margin: 0; }
.food-ben p { margin: 6px 0 0; font-size: 1.05rem; }
.ck-prev { display: block; margin-top: 8px; max-width: 100%; max-height: 30vh; border: 1px solid var(--line); border-radius: 8px; object-fit: contain; }
.sec-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sec-pick button { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); background: rgba(0,240,255,.04); color: var(--text); font: 600 .9rem 'Rajdhani'; cursor: pointer; text-align: left; }
.sec-pick button b { font-size: 1.2rem; }
.sec-pick button.on { border-color: var(--green); background: rgba(61,255,139,.12); box-shadow: 0 0 10px rgba(61,255,139,.3); }
.icon-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-pick button { width: 44px; height: 44px; font-size: 1.4rem; border: 1px solid var(--line); background: rgba(0,240,255,.04); cursor: pointer; border-radius: 8px; }
.icon-pick button.on { border-color: var(--green); background: rgba(61,255,139,.14); box-shadow: 0 0 10px rgba(61,255,139,.4); }
.ms-prev { display: flex; flex-direction: column; gap: 10px; max-height: 42vh; overflow-y: auto; padding: 4px 2px; }
.ms-sec { display: flex; gap: 10px; align-items: flex-start; }
.stock-row .grow { cursor: pointer; }
.stock-delta { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(0,240,255,.25); width: 100%; }
.busy { opacity: .6; }
