The move leaves President Emmanuel Macron scrambling to find a successor and plunges the country into a new political crisis.