The train schedule from Sarlat to Nice indicates a 12 hour trip. Could that be correct? Does anyone have a better suggestion?
The German rail site shows a direct night train from Bordeaux to Nice. However, it doesn't run every day of the week--and in some of the upcoming months it hardly runs at all. So check the timetables carefully.
Alternatively, you could take the train to Bordeaux and then fly Air France (Bordeaux-Paris Orly and Orly-Nice.)