Emmanuel Macron hailed the vote as a "major step" to protect French children and teenagers in a post on X.