FR 5898 then EC 1704 at Madrid
Torino → Madrid → Nice
Timetable, Madrid time
17:35FR 5898 from Torino at the gate
13:10EC 1704 to Nice leaves the gate
19 h 35 apart on the timetable, overnight
EC 1704 leaves 19 h 35 after FR 5898 arrives on the timetable: more than half a day, so not a connection we count.