A question for Badger if you are still looking at this post: is it difficult to make the arrangements for the train along the route you suggested? It sounds interesting and we could plan for the time.
Not Badger, but I looked into this route quite a bit last summer and while it is scenic, you should be very aware it is the slow and relaxed way:
- From Barcelona to La Tor de Querol (which is the Catalan name and will be the one you see on timetables in Spain) you take Rodalies de Catalunya's R3 line. This is a commuter / regional line so tickets are always the same cost (and there are no assigned seats, etc.) There are typically 4 departures per day and this is about a 3h30m journey.
- From Latour-de-Carol (which is the French name) to Toulouse is on TER Occitanie regional trains, which also don't require advance purchase (and also do not have assigned seating). This is about a 2h45m journey.
- From Toulouse to Bayonne, the fastest trains are Intercité trains, which do have assigned seating, do vary in price, and can therefore also sell out. This is about a 3h30m journey.
Note that in particular between the Spanish and French rail systems there is no joint coordination of timetables or ticketing, so you have to look up and purchase each leg individually and manually check that the timetables work for you. Logistically speaking I doubt you can (or would want to) do all three legs in one day -- you'd probably have to overnight in Toulouse.
Note that if this ends up sounding slightly too slow for you, there are high-speed trains from Barcelona to Toulouse, typically from 4h30m-5h, which all involve changing trains in Narbonne (a much bigger place than Latour-de-Carol).