QR 3743 then FR 8631 at Barcelona
Milan → Barcelona → Tangier
Timetable, Barcelona time
14:55QR 3743 from Milan at the gate
09:45FR 8631 to Tangier leaves the gate
18 h 50 apart on the timetable, overnight
FR 8631 leaves 18 h 50 after QR 3743 arrives on the timetable: more than half a day, so not a connection we count.