EW 2522 then IB 5960 at Barcelona
Stuttgart → Barcelona → Marrakesh
Timetable, Barcelona time
20:00EW 2522 from Stuttgart at the gate
18:45IB 5960 to Marrakesh leaves the gate
22 h 45 apart on the timetable, overnight
IB 5960 leaves 22 h 45 after EW 2522 arrives on the timetable: more than half a day, so not a connection we count.