Study by X-ray photoelectron spectroscopy and X-ray diffraction of the growth of TiN thin films obtained by nitridation of Ti layers