FR 8385 then FR 3146 at Barcelona
Budapest → Barcelona → Oujda
Timetable, Barcelona time
18:00FR 8385 from Budapest at the gate
16:05FR 3146 to Oujda leaves the gate
22 h 05 apart on the timetable, overnight
FR 3146 leaves 22 h 05 after FR 8385 arrives on the timetable: more than half a day, so not a connection we count.