it is a democratic country, so the government needs to take into account the protests
What are you basing this on? This government was elected, democratically. It made no secrets of its wish to reform the pension system in its campaign.
Before the first round of the election, the outgoing president (Macron) had announced that he wanted to raise the legal retirement age, now set at 62, gradually to 65, by raising the age by four months from generation.
Laws changing from pension age from 62 to 64 years will have to be voted on, democratically, by the representatives elected, democratically, to the Assemblee Nationale. That, or, has been commented on - mea maxima culpa - the possible future use of Article 49.3 of the Constitution, which... is not that exceptional.
In any case, article 1, doing away with some of the special perks of public servants, was voted on directly, passing 181 to 163.
If the public thinks this is truly a terrible idea, they can "vote out the bums" at the next elections. That's what democracy is about, not burning cars during protests
To flip this around so I don't get attacked for being a Rightist tool: an equivalently large minority of Americans opposed, and still oppose, Obamacare. Do they get to hijack the American legislative process because they feel strongly opposed? Despite not having the electoral power to get their way by the rules?
Of course, the Macron government could be forced to reverse course, by the protests. That is a strong possibility. So is not getting enough votes at the Assemblee Nationale.
But that is an entirely different thing than claiming that a democratic government has to listen to the mob, in order to be democratic. And even if the protests are entirely peaceful, that still remains the case: there are procedures to pass laws in democracies, those have to be followed to be democratic. Those procedures and laws do not include having to formally do anything with regards to said protests.
I am also glad the subject of traditions wrt to the "partenaires sociaux", i.e. unions was brought up in a comment. Yes, traditionally unions do get consulted about such large scale labor-facing arrangements.
However, in terms of democracy, one wonders why exactly so much importance is given to unions, given the really very low rates of union participation which is less than 8% in the private sector.
According to a study just published by the Ministry of Labor, the overall unionization rate, public and private combined, fell from 11% to 10.3% between 2013 and 2019. It fell below 8% in the private sector.
What, democratically speaking, gives such a small percentage of workers the right to speak on behalf of the non-unionized majority? (a subject that certainly was an irritant to me when I lived in France and one occasion triggered not-insignificant wage losses for me).
p.s. As an aside, to explain how many French people view the relationship between the government and the governed, you need to understand the appeal of Mai 68, where large scale protests basically told De Gaulle to go fly a kite. Having once tasted blood, a fairly common French viewpoint is that strong enough protests, including possibly involving property destruction, are themselves a new rule onto themselves and should always force governments to back down. That's the appeal of the Gilets Jaunes.
Why bother? Because actuarial projections indicate that in the future, the ratio of current workers to retirees will be quite low which is "not great" for a Pay As You Go system.
In 2000, there were 2.1 workers paying into the system for every one retiree; in 2020 that ratio had fallen to 1.7, and in 2070 it is expected to drop to 1.2, according to official projections.
Do the math...
* to be fair, the protests so far don't seem all that violent and destructive by French standards. Searching for "voitures brulees" got me repeat pictures of the same car in Paris.