FR 3877 then FR 5121 at Madrid
Tangier → Madrid → Milan Bergamo
Timetable, Madrid time
17:25FR 3877 from Tangier at the gate
16:40FR 5121 to Milan Bergamo leaves the gate
23 h 15 apart on the timetable, overnight
FR 5121 leaves 23 h 15 after FR 3877 arrives on the timetable: more than half a day, so not a connection we count.