  An analytical and nonperturbative approach to SU(2) and SU(3) Yang-Mills
thermodynamics is developed and applied. Each theory comes in three phases: A
deconfining, a preconfining, and a confining one. We show how macroscopic and
inert scalar fields form in each phase and how they determine the ground-state
physics and the properties of the excitations. While the excitations in the
deconfining and preconfining phase are massless or massive gauge modes the
excitations in the confining phase are massless or massive spin-1/2 fermions.
The nature of the two phase transitions is investigated for each theory. We
compute the temperature evolution of thermodynamical quantities in the
deconfining and preconfining phase and estimate the density of states in the
confining phase. Some implications for particle physics and cosmology are
discussed.
