AZ 58 then FR 3876 at Madrid
Rome → Madrid → Tangier
Timetable, Madrid time
10:50AZ 58 from Rome at the gate
06:15FR 3876 to Tangier leaves the gate
19 h 25 apart on the timetable, overnight
FR 3876 leaves 19 h 25 after AZ 58 arrives on the timetable: more than half a day, so not a connection we count.