FR 2761 then FR 7284 at Madrid
Bari → Madrid → Torino
Timetable, Madrid time
12:35FR 2761 from Bari at the gate
10:10FR 7284 to Torino leaves the gate
21 h 35 apart on the timetable, overnight
FR 7284 leaves 21 h 35 after FR 2761 arrives on the timetable: more than half a day, so not a connection we count.