:root {
  --bg: #0B1E3F;
  --ink: #E8F6FF;
  --muted: #7FD4F5;
  --dim: #3F6EA5;
  --line: rgba(168, 230, 255, 0.18);
  --accent: #3FA9F5;
  --accent-ink: #042C53;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
.app {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px 20px;
  gap: 16px;
}
.loader { font-size: 40px; text-align: center; color: var(--muted); opacity: 0.55; }
.eyebrow { font-size: 11px; letter-spacing: 0.6px; color: var(--muted); text-align: center; }
.title { font-size: 26px; font-weight: 500; text-align: center; margin: 0; }
.lede { font-size: 14px; color: var(--muted); text-align: center; line-height: 1.55; margin: 0; }
.crystal { display: flex; justify-content: center; margin: 4px 0; }
.spark { font-size: 46px; text-align: center; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); }
.input {
  background: rgba(168, 230, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  color: var(--ink);
  font-size: 17px;
  outline: none;
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: var(--dim); }
.btn {
  display: block;
  width: 100%;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 12px;
  padding: 15px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}
.btn:active { transform: scale(0.99); }
.btn[disabled] { opacity: 0.6; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.card {
  background: rgba(168, 230, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
}
.card.center { text-align: center; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pill { font-size: 12px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); }
.name { font-size: 28px; font-weight: 500; line-height: 1.05; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.gauge-track { height: 10px; background: rgba(168, 230, 255, 0.12); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.gauge-fill { height: 100%; background: #7FD4F5; border-radius: 999px; transition: width 0.6s ease; }
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 30, 63, 0.93);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px;
  text-align: center;
}
.wheel-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.wheel { position: relative; width: 300px; max-width: 84vw; }
.wheel svg { width: 100%; height: auto; display: block; }
.wheel-pointer {
  position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 13px solid transparent; border-right: 13px solid transparent;
  border-top: 22px solid #EF9F27; z-index: 2;
}
.wheel-result { font-size: 20px; font-weight: 500; text-align: center; min-height: 26px; }
textarea.input { font-family: inherit; line-height: 1.5; width: 100%; }

/* --- marque + animations « app vivante » --- */
.logo { display: block; width: 58%; max-width: 230px; height: auto; margin: 0 auto 2px; }
.fi { vertical-align: -2px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
@keyframes shimmer { 0%, 100% { opacity: 0.82; } 50% { opacity: 1; filter: drop-shadow(0 0 7px rgba(168, 230, 255, 0.45)); } }
@keyframes gaugeGlow { 0%, 100% { box-shadow: 0 0 0 rgba(127, 212, 245, 0); } 50% { box-shadow: 0 0 10px rgba(127, 212, 245, 0.5); } }
.app { animation: fadeIn 0.35s ease both; }
.card { animation: riseIn 0.45s ease both; }
.card:nth-child(2) { animation-delay: 0.04s; }
.card:nth-child(3) { animation-delay: 0.08s; }
.card:nth-child(4) { animation-delay: 0.12s; }
.card:nth-child(5) { animation-delay: 0.16s; }
.title { animation: riseIn 0.4s ease both; }
.crystal svg { animation: shimmer 3.6s ease-in-out infinite; }
.spark { animation: pop 0.5s ease both; }
.gauge-fill { animation: gaugeGlow 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .app, .card, .title, .crystal svg, .spark, .gauge-fill { animation: none !important; }
}
