You're not counting the energy outflows from France to neighboring countries.
Also, France gets 70% of its energy from nuclear, not 40%.