Deterministic reversible model of non–equilibrium phase transitions and stochastic counterpart