Non-equilibrium thermodynamics : field theory and variational principles