Thermodynamics and phases in quantum gravity