  For a many-particle system with long-range interactions and evolving under
stochastic dynamics, we study for the first time the out-of-equilibrium
fluctuations of the work done on the system by a time-dependent external force.
For equilibrium initial conditions, the work distributions for a given protocol
of variation of the force in time and the corresponding time-reversed protocol
exhibit a remarkable scaling and a symmetry when expressed in terms of the
average and the standard deviation of the work. The distributions of the work
per particle predict, by virtue of the Crooks fluctuation theorem, the
equilibrium free-energy density of the system. For a large number $N$ of
particles, the latter is in excellent agreement with the value computed by
considering the Langevin dynamics of a single particle in a self-consistent
mean field generated by its interaction with other particles. The agreement
highlights the effective mean-field nature of the original many-particle
dynamics for large $N$. For initial conditions in non-equilibrium steady states
(NESSs), we study the distribution of a quantity similar to dissipated work
that satisfies the non-equilibrium generalization of the Clausius inequality,
namely, the Hatano-Sasa equality, for transitions between NESSs. Besides
illustrating the validity of the equality, we show that the distribution has
exponential tails that decay differently on the left and on the right.
