Let's take a look at each leg separately:
Paris to Nice: here you can catch one of the multiple direct high-speed trains, discounted tickets for the whole route start from only 20 euro per passenger (although obviously it's non-refundable & non-exchangeable type of tickets, so you should take into consideration the conditions of sale for such tickets). High-speed TGV trains go via fastest route (Lyon-Avignon-Marseille), exact stops on the way depend on departure.
Main thing to remember is to use only official
French Railways website (for both schedule & ticket purchase), that way you can be sure that you are not overpaying some reseller or agency
French Riviera: unless you plan to travel long way (like <100km at a time) your best, and pretty much the only, option is standard tickets for regional trains, can purchase them any time via ticket machines at the station. Also sometimes at Côte d'Azur local buses are good and cheap travel option
Nice to Barcelona: at the moment there is no direct rail connection (either daytime or overnight), so you'll have to make changes in case you want to travel by train. There is early morning direct TGV from Marseille to Barcelona + couple from Paris to Barcelona (can be caught for instance in Montpellier). As of now discounted tickets for direct TGV Marseille-Barcelona seems to start from 49 euro (again in case you purchase via French Railways website), with Nice to Montpellier + Montpellier to Barcelona it will probably be more expensive (depends on particular connection on particular date + situation during high-season (summer) might change).
In case you want to make additional stops on your way, then obviously it will make you itinerary more expensive. Again here a lot will depend on exact places you want to visit, dates of your journeys and whether you up to purchasing your tickets in advance. Regarding passes, it is an option, however in France all the long-distance and high-speed trains require seat reservation, so just having a pass is no enough, plus on some trains there is quota of pass holders seats, meaning that at certain peak departures you might not be able to take a train you want just because all the quota set got sold out.