FR 3188 then FR 4587 at Barcelona
Fes → Barcelona → Porto
Timetable, Barcelona time
09:55FR 3188 from Fes at the gate
09:50FR 4587 to Porto leaves the gate
23 h 55 apart on the timetable, overnight
FR 4587 leaves 23 h 55 after FR 3188 arrives on the timetable: more than half a day, so not a connection we count.