IB 784 then FR 9674 at Madrid
Berlin → Madrid → Rome
Timetable, Madrid time
18:25IB 784 from Berlin at the gate
17:55FR 9674 to Rome leaves the gate
23 h 30 apart on the timetable, overnight
FR 9674 leaves 23 h 30 after IB 784 arrives on the timetable: more than half a day, so not a connection we count.