FR 3877 then FR 5323 at Madrid
Tangier → Madrid → Milan Bergamo
Timetable, Madrid time
09:30FR 3877 from Tangier at the gate
06:15FR 5323 to Milan Bergamo leaves the gate
20 h 45 apart on the timetable, overnight
FR 5323 leaves 20 h 45 after FR 3877 arrives on the timetable: more than half a day, so not a connection we count.