France is to introduce on-the-spot fines for sexual harassment in public places and lengthen the time-limit for filing rape complaints as part of new legislation against sexual violence.

The French president, Emmanuel Macron, has said the aim is to ensure “women are not afraid to be outside”.

The legislation, which will be presented at a cabinet meeting on Wednesday and go to parliament in the coming months, was prepared before the sexual harassment allegations against the Hollywood film producer Harvey Weinstein and the #MeToo movement, but it has gained prominence since.

The law will also set a new legal age of consent – 15 – at which a minor is considered able to agree to a sexual relationship with an adult aged over 18. This move follows outrage over a case in which a rape charge was dropped when a court decided an 11-year-old girl had consented to sex with a man more than twice her age.

The crackdown on sexual harassment would mean fines for “degrading or humiliating comments” or hostile and offensive “sexual or sexist” behaviour towards a person in a public place. The minister for gender equality, Marlène Schiappa, has explained this could include situations such as men aggressively asking a woman for her phone number dozens of times when she is clear she is not interested, as well as sexual intimidation and harassment on public transport.

The legislation, which would be enforced by police officers issuing on-the-spot fines, is backed by 90% of the French public, according to an Ifop poll published on Wednesday.

A 2016 study by a national association of transport users in France found that 83% of women using public transport said they had been subjected to catcalling or intimidating comments about their appearance.

Schiappa said this week that the fines would range from €90 to €750. They could be far higher for repeat offenders or in the case of aggravating circumstances. “The idea is that it is high enough to be a deterrent but also that we could be sure the harasser can pay it immediately, so that the law can be efficient,” she said.

Questioned over whether punishing harassment in public places was difficult to enforce, Schiappa told Le Monde this month: “It’s important that French laws state that it is forbidden to threaten, intimidate or follow women in the street.” She said it was part of a “cultural fight” by the government.

At the UN in New York this month, Schiappa said: “We have to say: ‘Young men, you don’t have the right, you’re not allowed to follow women on the streets, to intimidate them.’”

The new law will also give people who have been raped as children more time to file a complaint. They will be able to do so until they are 48, an extension of 10 years.

This follows recent cases in which former child victims insisted time limits must be extended. In 2016, Flavie Flament, a French radio producer, accused the photographer David Hamilton of raping her when she was 13, but said the time limit had passed for her to press charges. Hamilton, 83, killed himself in 2016 after Flament went public with her allegations and others also surfaced.

The bill also aims to increase sanctions against cyberstalking and online sexual harassment, particularly when committed by a group of several people targeting one person.