/* Thème jungle : fond vert profond, accents chauds (mangue, terracotta, soleil) */
:root {
  --bg: #0b2416;
  --bg-glow: #1d5534;
  --card: #143823;
  --field: #1f4d32;
  --border: #2f6a46;
  --txt: #fbf1dc;
  --muted: #b3c7a5;
  --mango: #f6a823;
  --terracotta: #e2623a;
  --sun: #ffd36b;
  --ok: #a3d94a;
  --ko: #d9483b;
  --round: "Fredoka", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 1rem;
  font-family: system-ui, sans-serif;
  color: var(--txt);
  background:
    radial-gradient(ellipse at 15% -10%, var(--bg-glow) 0, transparent 55%),
    radial-gradient(ellipse at 110% 110%, rgba(226, 98, 58, .2) 0, transparent 50%),
    var(--bg);
  background-attachment: fixed;
}

main { width: 100%; max-width: 560px; }

h1 {
  font-family: var(--round);
  font-weight: 600;
  font-size: 2.2rem;
  text-align: center;
  margin: 0 0 1.5rem;
}
h1 .grad {
  background: linear-gradient(90deg, var(--sun), var(--mango), var(--terracotta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.center { text-align: center; }
.hidden { display: none; }

/* Contrôles */
button, select {
  font: inherit;
  padding: .8rem;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--field);
  color: var(--txt);
  cursor: pointer;
}
select option { background: var(--card); color: var(--txt); }
button:hover:not(:disabled), select:hover { border-color: var(--mango); }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.primary {
  width: 100%;
  margin-top: 1rem;
  background: linear-gradient(135deg, var(--mango), var(--terracotta));
  color: #2a1405;
  font-family: var(--round);
  font-weight: 600;
  font-size: 1.15rem;
}
.primary:hover:not(:disabled) { border-color: transparent; filter: brightness(1.08); }
.primary:disabled { opacity: .4; }

.row { display: flex; gap: .6rem; align-items: center; margin-bottom: .6rem; }
.row label { min-width: 5.5rem; }
.row select { flex: 1; min-width: 0; }
.row button { padding: .8rem 1rem; }

fieldset {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0 0 1rem;
  padding: .6rem .9rem;
}
legend { color: var(--muted); padding: 0 .4rem; }

label.cb { display: flex; align-items: center; gap: .6rem; padding: .45rem .2rem; font-size: 1.05rem; cursor: pointer; }
label.cb input { width: 1.2rem; height: 1.2rem; accent-color: var(--mango); }
label.cb small { margin-left: auto; color: var(--muted); }

.links { display: flex; gap: 1rem; font-size: .85rem; margin-bottom: .4rem; }
.links.right { justify-content: flex-end; }
.links a { color: var(--sun); cursor: pointer; text-decoration: underline; }

/* Quiz */
.bar { display: flex; justify-content: space-between; font-size: .9rem; color: var(--muted); }
#score { color: var(--mango); font-weight: 600; }
.question { font-family: var(--round); font-weight: 500; font-size: 1.6rem; text-align: center; margin: 1rem 0 1.5rem; }
.options { display: grid; gap: .6rem; }
button.ok { background: var(--ok); color: #142a05; }
button.ko { background: var(--ko); color: #fff; }
.info { min-height: 1.5rem; text-align: center; margin-top: 1rem; color: var(--muted); }
.note { text-align: center; margin-top: .4rem; font-size: .9rem; color: var(--sun); }

/* Résultat */
#final { font-family: var(--round); font-size: 2.6rem; color: var(--sun); margin: .5rem 0; }
#missed { text-align: left; }
#missed li { margin: .2rem 0; }
#missed b { color: var(--sun); }

/* Footer */
footer { margin-top: auto; padding-top: 2rem; font-size: .85rem; color: var(--muted); text-align: center; }
footer a { color: var(--sun); text-decoration: none; }
footer a:hover { text-decoration: underline; }
