This is usually done best at counters
In this case there is NO sleeper train all the way. So it remains guessing at what you want: there are a few direct TGV-taking some 6 hrs-daytime, small quota for passes and as this seems to be route any newbee wants to use-full, completo, etc
The reinstated night train starts fro Austerlitz gare in Paris and ends (well, part of it-it splits up in portions) Cerbere/Port Bou (last stop FR-1st in ES), from there local UNres RENFE rodalies trenes.
JUst like often in down yundah full of marmite there is different gauge here
Best way is likely then to call SNCF and tell you want x RES for passes and 1 full ticket. Note the train has NO real sleeper, but its couchette=a basic lie-down bunk, either 4 or 6 in a space-shared sex. The old-time idea was in fact you sleep clothed. OR you can book (name etc has to be supplied)1 normal ticket and then hope+pray and ask there are still also spare space in that comprtmt.