Thermal resummation and phase transitions