Zaslat SMS: Intrinsic alignments of galaxies in the Horizon-AGN cosmological hydrodynamical simulation