New insight on carbonisation and graphitisation mechanisms as obtained from a bottom-up analytical approach of X-ray diffraction patterns