First and foremost, it is entirely legal to take a job in Bulgaria and work in France. However, I fear what you are trying to achieve may not be possible. The only advantage I see you believe you will gain is paying taxes in Bulgaria instead of France. Unfortunately, I must disappoint you, as this approach could lead to serious problems.
You are required to pay taxes where you work, and as you mentioned, you will be working from home in front of a screen in France. Therefore, you must pay taxes and other contributions in France.
I apologize for being a showstopper, but these︀ are the hard facts.