More than 320,000 people demonstrated across France against the rising cost of living and poor public services, with clashes between some protesters and police.