Habitat selection (n. ind. 100 m^{−2}) in the field patterns – Interaction term SP×LA×HA (Table S2, Supporting information) |

44°: Algae (Cj > Tp). 41°: Algae (Cj > Tp). 38°: Algae (Tp > Cj), Seagrass (Cj > Tp). 35°: Algae (Tp > Cj), Seagrass (Cj > Tp) |

Seagrass: *Coris julis* (35° = 38° = 41° > 44°). Algae: *Thalassoma pavo* (35° = 38° = 41° > 44°) |

Coris julis: 41° (Al > Se), 44°(Al > Se). *Thalassoma pavo*: 35° (Al > Se), 38° (Al > Se), 41° (Al > Se) |

Habitat selection (n. ind. 25 m^{−2}) in the ‘relative dominance’ experiment – Interaction term TS×DT×HT (Table S3, Supporting information) |

1X: A×N (W > C), S×N (W > C), N×A (C > W), N×S (C > W). 2X: S×A (W > C). 3X: A×S (C > W), S×A (W > C) |

Projected: A×S (1X > 2X = 3X), S×A (3X = 2X > 1X), S×N (1X > 2X = 3X) |

3X: Projected (S×A > A×S = A×N = S×N = N×A = N×S) |

Habitat permanence (% time) in the ‘relative dominance’ experiment – Interaction term TS×DT×HT (Table S3, Supporting information) |

1X: A×S (W > C), A×N (W > C), S×N (C > W), N×A (C > W), N×S (W > C). 2X: S×A (W > C), S×N (W > C). 3X: S×A (W > C) |

Projected: A×S (1X > 2X = 3X), A×N (1X > 2X = 3X), S×A (3X = 2X > 1X), S×N (3X = 2X > 1X), N×A (3X = 2X > 1X), N×S (1X > 2X = 3X) |

1X: Projected (A×N = N×S > A×S = S×A > S×N = N×A). 3X: Projected (S×A > A×S = A×N = S×N = N×A = N×S) |

Searching (% time) in the ‘relative dominance’ experiment – Interaction terms TS×HT and TS×DT (Table S4, Supporting information) |

TS×HT interaction term |

N×A (C > W) |

TS×DT interaction term |

2X: (C > W). 3X: (C > W) |

Resting (% time) in the ‘relative dominance’ experiment – Interaction term TS×DT×HT (Table S4, Supporting information) |

1X: A×N (W > C), N×S (W > C). 2X: S×A (W > C). 3X: A×N (W > C), S×A (W > C), S×N (W > C) |

Present day: A×S (1X > 2X = 3X). Projected: A×N (3X > 1X > 2X), S×A (3X = 2X > 1X), S×N (3X > 2X = 1X), N×S (1X > 2X = 3X) |

1X: Projected (N×S > A×N > S×N = N×A = A×S = S×A). 2X: Projected (S×A > A×S = S×N = N×A = N×S = A×N). 3X: Projected (S×A = S×N = A×N > A×S = N×A = N×S) |

Interacting with *C. julis* (% time) in the ‘relative dominance’ experiment – Interaction term TS×DT×HT (Table S4, Supporting information) |

1X: A×S (C > W), A×N (W > C), S×A (C > W), N×A (C > W). 2X: A×N (W > C), S×N (W > C), N×A (W > C). |

Present day: A×S (1X > 2X = 3X). |

Projected: S×N (2X > 1X = 3X), N×A (2X > 1X = 3X) |

2X: Projected (S×N > A×S = S×A = A×N = N×A = N×S) |

Interacting with *T. pavo (% time)* in the ‘relative dominance’ experiment – Interaction term TS×HT and term DT (Table S4, Supporting information) |

TS×HT interaction term |

N×A (W > C) |

DT term |

3X > 1X = 2X |