Non-perturbative thermodynamics of SU (N) gauge theories