EW 2522 then AT 961 at Barcelona
Stuttgart → Barcelona → Casablanca
Timetable, Barcelona time
20:00EW 2522 from Stuttgart at the gate
19:10AT 961 to Casablanca leaves the gate
23 h 10 apart on the timetable, overnight
AT 961 leaves 23 h 10 after EW 2522 arrives on the timetable: more than half a day, so not a connection we count.