It would surely be poor taste to accuse Nicolas Sarkozy of leading France into combat for purely selfish political reasons – but that won't stop some in the president's inner circle wondering if Operation Odyssey Dawn might just save the skin of a man who, a matter of days ago, seemed destined for electoral humiliation. Ever so discreetly, they will be hoping Libya can do for Sarkozy what the Falklands did for Margaret Thatcher – anoint a successful war leader deserving of re-election.

"The French do like to have their president play world statesman," mused one diplomat in Paris last week, before France's Mirage and Rafale fighter planes had taken to the skies. "A good crisis," he added, might be just what Sarkozy needs.

He certainly needs something. A week ago he was staring at polls so ominous some analysts wondered if he'd even make it into second place in next year's presidential contest. One survey put Sarkozy behind both his most likely Socialist opponent and Marine Le Pen, the new leader of the far-right National Front founded by her father, Jean-Marie. Sunday's cantonal elections were expected to bring more bad news for the president's UMP party.

Two cabinet reshuffles in quick succession produced no bounce, with the president's numbers stuck stubbornly in the doldrums. He's never quite shaken off the depiction by Les Guignols de l'Info, the French Spitting Image, as manic and hyperactive, constantly popping pills either to calm or lift his mood. A poster spotted in the fashionable Marais district of Paris has Sarkozy wearing a dunce's cap, smiling gormlessly.

The chatter among Parisian political types centres on whether the president would even make it to the second round in next year's two-stage contest, with some suspecting he might choose to preserve his dignity and not seek re-election at all – talk instantly dismissed, it has to be said, both by aides and by more neutral observers who swear that Sarkozy is a fighter, not a quitter.

But how did it come to this, that a man who crushed his Socialist rival in 2007 and who was hailed as an instant star on the European stage – complete with supermodel wife – is now fighting for his political life? The answer says much about the state of European politics after the crash of 2008, but rather more about France itself – in particular how a mentality presumed abandoned in the revolution of 1789 lives on.

The immediate explanation is not complicated and it is one familiar to most world leaders. The French economy is stalling, with unemployment stuck at 9.6%. The deficit does not equal Britain's, but its accumulated debt is just as heavy. The mood, says Socialist party spokesman Benoît Hamon, is despondent, especially among the young. "Graduates are doing jobs below their qualifications; young people owning their own property is unimaginable. They believe they will live less well than their parents and that the country is in decline."

Sarkozy's allies hardly disagree. Housing minister Benoist Apparu told me that, according to comparative polling, "the French are the most pessimistic nation in Europe" – that they are, incredibly, more worried about their future than the peoples of Iraq and Afghanistan.

All incumbents will struggle amid this kind of crash-induced gloom, but it has hit Sarkozy especially hard. First, it has entirely derailed the programme on which he was elected. Out went the early, breathless talk of Thatcherising, or Blairising, the still-statist French economy, injecting a dose of neo-liberal Anglo-Saxonism. Whatever appeal that message might once have had vanished in the rubble of Lehman Brothers. Sarkozy, who at first dreamed big, has had to make do with more modest achievements – the signature one being his pension reform, raising the minimum retirement age from 60 to 62 in the face of a howl of protest. He promises tax reform is coming, but those on the right who yearned for red meat on crime or welfare feel disappointed.

Other politicians might be able to survive on such a thin record, but it's harder for Sarkozy, who started with such grand ambition. "He didn't say, 'I have the solution,'" argues Hamon of the Parti Socialiste. "He said, 'I am the solution.' So now people say, 'You are the problem.'"

His troubles are compounded because he has to look over both his shoulders, left and right. Putative Socialist candidate Dominique Strauss-Kahn is polling solidly, but the more immediate challenge comes from the National Front. Marine Le Pen is proving a more sophisticated operator than her father, steadily decontaminating the party brand – dropping the toxic references to the second world war and the downplaying of the Holocaust he favoured. She seems able to reach female voters who have previously eluded the Front.

Determined to tap into the current anxious mood, she has made a direct play for working-class voters – pushing economic populist themes, denouncing the outsourcing of jobs and the perils of globalisation, promising to defend France's traditional social protections. Mixed with an unbending assertion of French laïcité, or secularism – now directed not at its traditional target, the Catholic church, but at Islam – she has crafted a message that threatens to woo back the very blue-collar voters that deserted the Front for Sarkozy in 2007.

No one believes Le Pen could actually win. If she somehow repeated her father's 2002 feat – when he came second in the first round, thereby qualifying for a second-round duel with Jacques Chirac – she would repeat his fate too, with voters of the moderate right, left and centre uniting to defeat her the way they defeated him. Indeed that scenario may be Sarkozy's best hope: no matter how unpopular he is, in a straight fight against Le Pen, he would win. Just to be sure, he will try to blunt her appeal in 2012 by casting himself as the "protector president", safeguarding cherished public entitlements, services and the "French way of life". If he can stir some patriotic pride, casting himself as the French president who led the world on a no-fly zone over Libya, then so much the better.

Yet a series of conversations with analysts, party officials and diplomats left no doubt that, while the current circumstances have hardly helped, much of Sarkozy's woes are of his own making. They come down less to policy than personality. Professor Pascal Perrineau, of the prestigious Sciences Po institute of political studies, notes that the sharp drop in the president's poll numbers came within six months of his taking office, long before the global financial crisis struck. What caused that decline? Perrineau sighs as he explains that Sarkozy misunderstood something crucial about the office of president and its place in the French psyche.

"It's a monarchical system in France," he says. A "republican monarchy", but a monarchy nonetheless. "There is a certain majesty in the job. Sarkozy thought he could be a 'new manager', that he could exercise power without majesty. But he was wrong."

The academic then launches into a litany which I heard repeated in different forms across Paris (and which is repeated again in a new book, "OFF: What Nicolas Sarkozy Should Never Have Said to Us"). Sarkozy's behaviour and temperament is simply unsuited to the grandeur of the office of president of the French Republic. He jogged wearing shorts on the steps of the Élysée Palace. On holiday with Carla Bruni he wore Ray-Ban sunglasses. He was photographed next to King Abdullah of Saudi Arabia, legs apart, poking at his mobile phone. He discussed "intimate" matters during a press conference. This is not how a French president behaves.

One well-placed observer rattles off the list of offences. "The bling-bling, the glitter, the Ray-Bans, the model third wife, the ostentatious wealth, the gold chain. His rudeness, his sarcasm, his put-downs" – the president was caught on camera telling someone, in effect, to "bugger off" – "It's the manner of the man that they object to." (As for palling around with the super-rich during economic hard times, voters tell the Parti Socialiste's focus groups that's "obscene" or "indecent".)

It would be easy to dismiss such criticism as mere snobbery, of the kind that was meted out to a first-term Bill Clinton, condemned as "unpresidential" and as an Arkansas hick by the Washington elite. Sarkozy, as a descendant of Hungarian and Jewish immigrants and a man who did not go through the elite École Nationale d'Administration or ÉNA, certainly gets his share of that. But there is an extra dimension in France. After Chirac, Mitterrand and Giscard, the French electorate expect their president to look a certain way: tall, fatherly, aristocratic, with statue-like features ready to be carved in marble. Sarkozy – smaller, nervy and ever-so-slightly arriviste – just doesn't look the part. One diplomat says UMP officials have told him: "We can sell the policy, but we cannot sell the president."

More deeply, the hauteur of a French president helps him do the job. He can stay distant, above the fray – and therefore less likely to be blamed when things go wrong. Sarko, by all accounts, is a micromanager with even middling decisions now coming out of the Élysée. France initially called the Arab Spring badly wrong, the then foreign minister even offering the now-ousted Tunisian regime the "world-renowned knowhow of France's security forces". But it was Sarkozy, not the minister, who took the rap. He cannot call on presidential mystique because he has dispelled it. In a job that is part prime minister, part sovereign, he has, in the words of Perrineau, "forgotten that he is the Queen".

His own allies hardly dispute this, though they try to suggest part of the problem is structural: post-Chirac, the French president is now elected almost simultaneously with parliament, making him a more workaday figure, closer to a British PM. Still, housing minister Apparu is candid: "We're not going to waste time and political energy trying to change his image. [In 2012] he can say, 'You don't like me, but it doesn't matter. What matters is that France has a good president.'" The danger for Nicolas Sarkozy is that, barring a Libya-induced change of heart, the French electorate will agree – and promptly choose someone else.