:root {
  --bg: #02040a;
  --panel: rgba(9, 14, 26, .78);
  --line: rgba(255,255,255,.12);
  --text: #f6f8ff;
  --muted: #8b96aa;
  --solar-center-y: 43%;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #000; color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { min-height: 100dvh; overflow-x: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { width: min(100%, 980px); margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 14px max(22px, env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 3px 4px 14px; }
.eyebrow { color: #7b879b; font-size: 10px; line-height: 1; letter-spacing: .18em; font-weight: 800; }
h1, h2, p { margin: 0; }
h1 { margin-top: 6px; font-size: clamp(24px, 6vw, 36px); letter-spacing: -.04em; }
h2 { margin-top: 5px; font-size: 22px; letter-spacing: -.035em; }
.icon-btn, .control-btn { border: 1px solid var(--line); background: rgba(13,18,31,.7); backdrop-filter: blur(12px); border-radius: 14px; min-width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.back-btn { font-size: 22px; }
.back-btn[hidden] { display: none !important; }
.space-card {
  position: relative;
  height: min(64dvh, 650px);
  min-height: 480px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: transparent;
  box-shadow: 0 24px 80px rgba(0,0,0,.38);
  touch-action: manipulation;
}
.space-card::before { display: none; }
.scene { position: absolute; inset: 0; }
.orbit { position: absolute; left: 50%; top: var(--solar-center-y); border: 1px solid rgba(177,199,232,.14); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.body { position: absolute; left: 50%; top: var(--solar-center-y); transform: translate(-50%, -50%); border-radius: 50%; cursor: pointer; user-select: none; -webkit-user-select: none; filter: drop-shadow(0 5px 14px rgba(0,0,0,.5)); }
.body img { width: 100%; height: 100%; border-radius: 50%; object-fit: contain; display: block; pointer-events: none; background: transparent; }
.body::after { content: attr(data-name); position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); color: rgba(230,237,250,.76); font-size: 9px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; opacity: .9; text-shadow: 0 1px 8px #000; }
.sun { position: absolute; left: 50%; top: var(--solar-center-y); width: clamp(58px, 14vw, 94px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle at 36% 34%, #fff3a8 0 5%, #ffd24c 18%, #ff9d19 52%, #b83b05 78%, #431000 100%); box-shadow: 0 0 28px rgba(255,177,42,.75), 0 0 80px rgba(255,115,0,.25); }
.sun::after { content: "Soleil"; position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); font-size: 10px; font-weight: 800; color: rgba(255,232,181,.85); }
.body.ringed { border-radius: 0; }
.body.ringed img { border-radius: 0; object-fit: contain; background: transparent; transform: scale(1.28); }
.body.ringed::before { display: none; }
.hint { position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(5,8,15,.62); color: #aeb8ca; font-size: 11px; white-space: nowrap; backdrop-filter: blur(10px); transition: opacity .3s ease; }
.controls { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 9px; align-items: center; }
.control-btn { flex: 0 0 44px; }
.speed-wrap { min-width: 0; height: 44px; flex: 1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(13,18,31,.7); backdrop-filter: blur(12px); color: var(--muted); font-size: 11px; }
.speed-wrap strong { color: var(--text); min-width: 24px; text-align: right; }
input[type="range"] { width: 100%; accent-color: #9ce8ff; }
.info-card { margin-top: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); backdrop-filter: blur(18px); }
.info-heading { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.live-pill { border: 1px solid rgba(119, 232, 174, .18); border-radius: 999px; padding: 7px 9px; color: #8de6b6; background: rgba(23,86,55,.12); font-size: 9px; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.live-pill i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #70e4a5; box-shadow: 0 0 10px rgba(112,228,165,.7); }
.info-card p { margin-top: 11px; color: #9ea9ba; font-size: 13px; line-height: 1.58; }
.stats { margin-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats > div { min-width: 0; padding: 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(255,255,255,.025); }
.stats span { display: block; font-size: 9px; color: #778398; margin-bottom: 5px; }
.stats strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 14px 5px 0; color: #5f6a7b; font-size: 10px; }
footer a { color: #8ea0bc; text-decoration: none; }
.focus-mode .hint { opacity: 0; pointer-events: none; }
.focus-planet { position: absolute; left: 50%; top: 47%; transform: translate(-50%,-50%); width: clamp(128px, 37vw, 220px); aspect-ratio: 1; border-radius: 50%; filter: drop-shadow(0 14px 35px rgba(0,0,0,.65)); }
.focus-planet img { width: 100%; height: 100%; border-radius: 50%; object-fit: contain; background: transparent; }
.focus-planet.ringed { width: clamp(190px, 56vw, 320px); border-radius: 0; }
.focus-planet.ringed img { border-radius: 0; background: transparent; object-fit: contain; }
.moon-orbit { position: absolute; left: 50%; top: 47%; transform: translate(-50%,-50%); border: 1px solid rgba(207,222,246,.14); border-radius: 50%; }
.moon { position: absolute; left: 50%; top: 47%; border-radius: 50%; transform: translate(-50%,-50%); filter: drop-shadow(0 4px 10px rgba(0,0,0,.55)); }
.moon img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; background: transparent; }
.moon::after { content: attr(data-name); position: absolute; left: 50%; top: calc(100% + 5px); transform: translateX(-50%); font-size: 9px; color: rgba(220,229,244,.75); white-space: nowrap; }
@media (max-width: 420px) {
  :root { --solar-center-y: 41%; }
  .space-card { min-height: 500px; height: min(66dvh, 590px); }
  .body::after { font-size: 8px; }
}
@media (min-width: 700px) {
  :root { --solar-center-y: 45%; }
  .app-shell { padding-left: 24px; padding-right: 24px; }
  .space-card { min-height: 560px; }
  .info-card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* v4 — échelle des diamètres et suppression des disques noirs */
html, body, .space-card { background: #000; }
:root { --bg: #000; }
.body {
  width: 44px !important;
  height: 44px !important;
  display: grid;
  place-items: center;
  border-radius: 50%;
  filter: none;
}
.body-visual {
  display: block;
  position: relative;
  flex: none;
  pointer-events: none;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.65));
}
.body-visual img,
.focus-planet img,
.moon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: transparent !important;
  mix-blend-mode: screen;
}
.body-visual img { border-radius: 50%; }
.body.ringed .body-visual img { border-radius: 0; transform: none; }
.body.ringed .body-visual { overflow: visible; }
.body::after { top: calc(50% + 14px); }
.body.ringed::after { top: calc(50% + 17px); }
.dwarf-body::after { color: rgba(210,220,235,.64); }
.dwarf-orbit { border-style: dashed; border-color: rgba(177,199,232,.18); }
.focus-planet img, .moon img { background-color: transparent !important; }
.focus-planet.dwarf-focus { width: clamp(118px, 34vw, 185px); }
.moon.irregular { border-radius: 0; overflow: hidden; }
.moon.irregular img { border-radius: 0; object-fit: cover; mix-blend-mode: screen; transform: scale(2.2); }
