Damian Penaud crossed twice, Jonathan Danty, Uini Atonio and Gael Fickou scored a try each and Thomas Ramos kicked the other points, meaning Les Bleus will win the championship if Ireland lose to England without a bonus point later on Saturday.
Wales, who looked to be heading for a much bigger loss early in the second half, fought back and finished with four tries by George North, Bradley Roberts, Tomos Williams and Rio Dyer, the other points coming from the boots of Dan Biggar and Leigh Halfpenny.
France lead the standings on 20 points, one ahead of Ireland, with Wales in fifth place. "I thought we showed some real character.
We started well, just we gave them a couple of soft tries. The game could have gone away from us significantly but the impact of the bench was excellent," said Wales coach Warren Gatland. "There was a lot of improvement in today's performance but we're not quite there, there's a lot to do (ahead of the World Cup)." Wales made a perfect start, holding the ball as they worked through the phases and their domination was rewarded with North's early try between the posts.