If you are posted to work in another EU country, you'll remain covered by the laws of the country where you usually work for up to 2 years.
Before leaving, your employer should apply for an A1 document for you, to certify that you're covered by the French system.
This solution is designed to avoid frequent changes in your social security situation when you work abroad for short periods.
YES — if you want to work in another EU country for a few months, the best option is to "post" yourself abroad. By doing this, you can work abroad but remain in the system of the country where you usually work — for a maximum of 2 years.
Before leaving you should apply for an A1 document, to certify that you're covered by your home system.
You may even be able to remain in your home system for longer than 2 years, if you request an exemption to cover the specific period of your posting.
YES — for up to 2 years (regardless of whether you're posted by your employer or, being self-employed, you "post" yourself).
To get medical treatment locally, you'll need 2 documents:
From Germany — because you were on a posting in France rather than moving there on a long term basis, and so you remained resident in Germany. As a result, the country from which you were posted is the one responsible for your social security coverage.
You'll receive medical treatment in that country — but for this, you have to ask your home-country healthcare authority for a DA1 document, giving details of the accident or the disease.
You must then present the DA1 to the equivalent authority in the country where you are posted.
Income replacement for any time off is paid by your home-country healthcare authority.