X-ray resonant magnetic scattering study of the magnetic coupling in Co/Pt nanolines and its evolution under magnetic field