An employee can be laid off if he agrees to it but that's not like firing because it needs an agreement. I am not sure if the OP is talking about that.
It's possible to fire people without justification and the company will be brought to court. There is a new law from Macron that caps the damages the employee can get to pretty much nothing when he only has a few years of tenure or less. You could provision for a few months of salary.