AV 182 then FR 3876 at Madrid
Bogota → Madrid → Tangier
Timetable, Madrid time
08:10AV 182 from Bogota at the gate
06:15FR 3876 to Tangier leaves the gate
22 h 05 apart on the timetable, overnight
FR 3876 leaves 22 h 05 after AV 182 arrives on the timetable: more than half a day, so not a connection we count.