Simply put, it's a negotiated process between the company, union representatives, and the government / legal representatives.
In France, layoffs are difficult to do if a company is making money, but can be done to keep a company from losing money or shutting down or moving somewhere else (i.e. another country).
Layoffs in France correspond with the idea of a "licenciement économique" and the details of how that is managed are presented here: https://www.service-public.fr/particuliers/vosdroits/N481 .
Simply put, it's a negotiated process between the company, union representatives, and the government / legal representatives.
In France, layoffs are difficult to do if a company is making money, but can be done to keep a company from losing money or shutting down or moving somewhere else (i.e. another country).