EC 1703 then TP 1015 at Madrid
Nice → Madrid → Lisbon
Timetable, Madrid time
20:40EC 1703 from Nice at the gate
14:55TP 1015 to Lisbon leaves the gate
18 h 15 apart on the timetable, overnight
TP 1015 leaves 18 h 15 after EC 1703 arrives on the timetable: more than half a day, so not a connection we count.