Optical, chemical, depth and magnetic characterization of Mg/Co-based nanometric periodic multilayers