QCD phase transition in a strong magnetic background