In less than two weeks’ time, France will go to the polls. The first round of voting to choose François Hollande’s successor is on 23 April, followed by the runoff between the top two candidates on 7 May. The outcome will shape France and the EU, and will have an immense bearing on the matrix of European relationships into which Brexit Britain is now beginning to feel its way. The importance of this contest cannot be overstated – but nor can the uncertainty about its outcome.

The race for the Élysée has become more unpredictable in the course of the campaign, not less. What had seemed in recent weeks to be hardening into a contest between Marine Le Pen of the far-right Front National and the centrist Emmanuel Macron may now be resolving into a four-way first-round contest involving the mainstream right-wing François Fillon and the radical left’s Jean-Luc Mélenchon. A large group of minor candidates, all of whom had their day in the sun in last week’s TV debate, will affect the result. A wider range of runoffs is now possible, including the nightmare scenario for the established parties, a Le Pen-Mélenchon head-to-head. The chances that France may be about to add a new chapter to the disruptions of Brexit and the Trump presidency are very real indeed.

Right now, the rise of Mr Mélenchon is the most dynamic element in the changing mix. Capitalising on the anti-establishment mood and on the weakness of the socialist party’s campaign for Benoît Hamon, he offers a rebellious wishlist of higher taxes and greater public spending, nationalisation and a break with EU treaties, with a peppering of strongly pro-Russian and anti-western stances. He has put on six points in recent weeks, spoke at a huge rally in Marseille at the weekend, and may be pushing past Mr Fillon into third spot in the contest at exactly the right time to threaten the frontrunners.

The result is that three “outsiders” now lead the polls. They may take as much as two-thirds of the vote in the first round between them. This reflects the collapse of France’s post-war parties of right and left, dogged by the decades-long failure to bring a solution to high unemployment (over 10% nationwide, and 24% for 18-25s). Paradoxically, inequality in France remains lower than in Britain, Germany and the US. Its welfare state has partly cushioned the economy from the fallout of the 2009 financial crisis. But popular outrage about Parisian elites and financial scandals has added to a toxic mix.

Ms Le Pen and Mr Macron continue to be favourites. The former stands for a closed-off France, hunkered down behind its borders, with a protectionist, anti-globalisation, anti-immigration and aggressively anti-EU stance. The latter wants to embrace openness and diversity, reform France’s stifled labour market and trim public spending (currently at 56% of GDP), as well as rejuvenate the EU project alongside Germany. Mr Macron is running a resilient and upbeat campaign. But the Le Pen vote will be very strong. Extreme-right ideas have taken root and become more mainstream than before – Ms Le Pen’s latest provocation is to dismiss Vichy France’s role in the deportation of French Jews in 1942. There is talk of a tidal wave of support in many parts of the country. Let us hope not. But she will shape France whether she wins or not. These are perilous days.