Mean-Field Theory of the Potts Gas