AT 970 then FR 2066 at Madrid
Casablanca → Madrid → Ibiza
Timetable, Madrid time
18:05AT 970 from Casablanca at the gate
14:40FR 2066 to Ibiza leaves the gate
20 h 35 apart on the timetable, overnight
FR 2066 leaves 20 h 35 after AT 970 arrives on the timetable: more than half a day, so not a connection we count.