body {
  font-family: "Inter", system-ui, sans-serif;

  background: radial-gradient(circle at top left, #1e3a8a 0%, #0f172a 60%);
  color: #e5e7eb;

  margin: 0;
  padding: 20px;

  min-height: 100vh;
  position: relative;
}

/* fond décoratif */
body::before {
  content: "";
  position: fixed;
  inset: 0;

  background-image: url("../images/maths-mde.svg");
  background-size: 55%;
  background-repeat: no-repeat;
  background-position: right bottom;

  opacity: 0.10;
  pointer-events: none;
  z-index: 0;
}

/* CENTRAGE STABLE (IMPORTANT) */
.card {
  position: relative;
  z-index: 1;

  max-width: 520px;
  width: 100%;

  margin: 60px auto;

  background: rgba(17, 24, 39, 0.88);
  padding: 20px;
  border-radius: 16px;

  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
}

/* TITRES */
h1, h2, h3 {
  margin-top: 0;
}

/* FORMULAIRES */
label, select, input {
  display: block;
  margin: 8px 0;
  width: 100%;
}

input, select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #374151;
  background: #111827;
  color: #e5e7eb;
}

/* BOUTONS */
button,
.btn,
.btn-secondary {
  display: block;
  width: 100%;
  text-align: center;

  padding: 10px;
  margin: 8px 0;

  border-radius: 10px;
  border: none;

  cursor: pointer;
  font-size: 15px;
  text-decoration: none;

  transition: 0.2s ease;
}

button,
.btn {
  background: #1e3a8a;
  color: white;
}

button:hover,
.btn:hover {
  background: #3b82f6;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #4b5563;
  color: white;
}

/* QUIZ */
#propositions button {
  text-align: left;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

/* RÉPONSES */
.correct { background: #22c55e !important; }
.wrong { background: #ef4444 !important; }

/* EXPLOSION */
.math-explosion {
  position: fixed;
  top: 50%;
  left: 50%;
  font-size: 28px;
  color: #38bdf8;

  transform: translate(-50%, -50%);
  animation: explodeFormula 0.9s ease-out forwards;

  pointer-events: none;
  z-index: 9999;
}

@keyframes explodeFormula {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.6);
  }
  70% {
    opacity: 1;
    transform: translate(var(--dx), var(--dy)) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.8);
  }
}