FR 9601 then FR 2066 at Madrid
Rome → Madrid → Ibiza
Timetable, Madrid time
21:20FR 9601 from Rome at the gate
20:55FR 2066 to Ibiza leaves the gate
23 h 35 apart on the timetable, overnight
FR 2066 leaves 23 h 35 after FR 9601 arrives on the timetable: more than half a day, so not a connection we count.