  We study the relation between the set of oriented $\mathbb{Z}/d$-homology
$3$-spheres and the level-$d$ mapping class groups, the kernels of the
canonical maps from the mapping class group of an oriented surface to the
symplectic group with coefficients in $\mathbb{Z}/d\mathbb{Z}$. We formulate a
criterion to decide whenever a $\mathbb{Z}/d$-homology $3$-sphere can be
constructed from a Heegaard splitting with gluing map an element of the
level-$d$ mapping class group. Then we give a tool to construct invariants of
$\mathbb{Z}/d$-homology $3$-spheres from families of trivial $2$-cocycles on
the level-$d$ mapping class groups. We apply this tool to find all the
invariants of $\mathbb{Z}/p$-homology $3$-spheres constructed from families of
$2$-cocycles on the abelianization of the level-$p$ mapping class group with
$p$ prime and to disprove the conjectured extension of the Casson invariant
modulo a prime $p$ to rational homology $3$-spheres due B. Perron.
