Quark mass and flavour dependence of the QCD phase transition