FR 3813 then EC 7646 at Madrid
Bologna → Madrid → Lisbon
Timetable, Madrid time
21:35FR 3813 from Bologna at the gate
18:00EC 7646 to Lisbon leaves the gate
20 h 25 apart on the timetable, overnight
EC 7646 leaves 20 h 25 after FR 3813 arrives on the timetable: more than half a day, so not a connection we count.