FR 3813 then FR 394 at Madrid
Bologna → Madrid → Ibiza
Timetable, Madrid time
21:35FR 3813 from Bologna at the gate
13:20FR 394 to Ibiza leaves the gate
15 h 45 apart on the timetable, overnight
FR 394 leaves 15 h 45 after FR 3813 arrives on the timetable: more than half a day, so not a connection we count.