I posted this already on another thread, but it's relevant. Look at the document that the French authorities ask people to voluntarily fill out when they leave their homes.

One justifiable reason to leave one's home is "short trips, close to home, related to the individual physical activity of the people, excluding any collective sporting practice, and the needs of pets." (En francais: "déplacements brefs, à proximité du domicile, liés à l’activité physique individuelle des personnes, à l’exclusion de toute pratique sportive collective, et aux besoins des animaux de compagnie.") That justifiable reason can be used to visit a beach close to one's home. I think such trips are legal.