I won't get into details here but 40k€ before taxes ("brut") for a developer between junior and senior is not considered that good in Paris anymore. It would have been decent 8 years ago but wages went up with the increase in demand. Of course it depends on skills, position, stack, etc...
That being said, you will almost always make more money working as a freelancer, and you will definitely make more working remotely for a California-based startup (which may be difficult because of French employment laws but is still definitely possible).