  The shape of an epidemic wave in simple epidemic models applies to a
homogeneous distribution of infected people in the population. In large
inhomogeneous systems, at country-scale for instance, the wave shape is similar
except for the short time behavior. For such cases, we show that the full wave
shape is tied to an exponential decay. Using out-of-equilibrium thermodynamics,
we build a model in which this decay results from an increase in entropy until
reaching a stable infected population fraction. We find that the elementary
probability of being infected determines this fraction, leading to a
thermodynamic criterion for herd immunity and epidemic outbreaks.
