Does anyone know what the fast train is called from Barcelona to Nice France? And what the timeframe is for that trip?
I believe the TGV train runs this route. Spain's train website is https://www.renfe.com/es/en and France is https://www.sncf-connect.com/en-en/. There are no direct trains but there are cheap nonstop flights on Vueling.com, EasyJet and Iberia.
While the TGV runs from Marseille to Nice, it does not run at typical TGV speed.
The journey, with at least one mandatory connection in Avignon TGV or Marseille Saint Charles, and perhaps two connections (Nîmes and Marseille) if the direct Barcelona-Marseille train is not running, should take about 8 hours. It is reasonably scenic but not overwhelmingly so. Flights are worth considering.