FR 9471 then FR 394 at Madrid
Pisa → Madrid → Ibiza
Timetable, Madrid time
18:20FR 9471 from Pisa at the gate
18:10FR 394 to Ibiza leaves the gate
23 h 50 apart on the timetable, overnight
FR 394 leaves 23 h 50 after FR 9471 arrives on the timetable: more than half a day, so not a connection we count.