The leftist Jean-Luc Mélenchon, who had dominated headlines in recent weeks with rousing open-air rallies against capitalism, took about 11% and failed in his ultimate aim of beating Le Pen and wiping out the extreme right.