France beat Switzerland 5-2 to make all but sure of a place in the Round of 16, with some wonderful goals decorating an absolute thriller in Salvador.