Transverse dynamics of hard partons in nuclear media and the QCD dipole