Interaction between vortices and magnetic domains in a superconductor/ferromagnet bilayer