It is forbidden to camp on beaches in France. Well I've done it, on beaches no one gives a fuck about, but around those cities you're going to, you're very likely to be caught.
It is also forbidden to camp on private property, in natural reserves, near and on roads, 200m around a source of drinkable water, 500m around a historical monument, and in various designated areas that have panels saying you can't.
Now you'll hardly find a place near the Mediterranean coast that isn't a private property, and if it isn't, then it's likely to be a natural reserve. But still, most people won't really bother you if you camp on some private property; a large plain-sized property of course, not next to their house. We could say a minimum distance to camp from homes to be respectful would be 300m. If you see a house in the vincinity, just go ask them, and if there's nothing around, then you'll be gone before they know it, especially innawoods. And even if they did find you, chances are they'd just come to greet you. But that's only "most" people.
But that will hardly happen near Saint Tropez, because too many people have done this, and they got sick of it. The whole area is also expensive as shit, and rich people aren't known to be nice. You'll probably have to camping area, and that's the next point.
Privately owned camping areas are were most people go camping. In this area, it would cost about 5-7€/adult, and may reach 10€ near Saint Tropez. Most of those aren't exactly "camping" though, you've got washing machines, proper toilets and showers, restaurants even sometimes... and you also have to get a reservation. Yes, lawful camping in France pretty much sucks.
Also keep in mind you can't light a fire unless in a designated camping area. And even then, you need an authorization from the owner.
.
Regular camping is possible in France, there are plenty places where you can do that... but not along the Mediterranean coast.