FR 5930 then FR 9430 at Madrid
Fes → Madrid → Marrakesh
Timetable, Madrid time
18:20FR 5930 from Fes at the gate
13:10FR 9430 to Marrakesh leaves the gate
18 h 50 apart on the timetable, overnight
FR 9430 leaves 18 h 50 after FR 5930 arrives on the timetable: more than half a day, so not a connection we count.