A unified thermodynamic framework for the modelling of diffusive and displacive phase transitions