French leftists win most seats in legislative elections, beating back far-right surge