FR 2761 then FR 5054 at Madrid
Bari → Madrid → Luxembourg
Timetable, Madrid time
15:15FR 2761 from Bari at the gate
14:45FR 5054 to Luxembourg leaves the gate
23 h 30 apart on the timetable, overnight
FR 5054 leaves 23 h 30 after FR 2761 arrives on the timetable: more than half a day, so not a connection we count.