FR 5898 then FR 3430 at Madrid
Torino → Madrid → Agadir
Timetable, Madrid time
23:10FR 5898 from Torino at the gate
21:25FR 3430 to Agadir leaves the gate
22 h 15 apart on the timetable, overnight
FR 3430 leaves 22 h 15 after FR 5898 arrives on the timetable: more than half a day, so not a connection we count.