Nice overcame Marseille 5-4 in a thrilling Mediterranean derby to book their place in the last 16 of the Coupe de France on Tuesday night.