Preheat the oven to 200°C.
Rub butter into flour and baking powder, mix with 150ml water to form a dough, then chill.
Arrange onions, garlic, peppers, courgette, and aubergine on a tray and coat with sunflower oil.
Roast vegetables for 30-40 minutes until tender, season, and let cool.
Cover couscous with boiling water and leave for 10 minutes until absorbed.
Blend half the couscous with tomato paste, combine with the rest, and season.
Dry-fry halloumi slices until brown on both sides and set aside.
Divide pastry into 350g, 300g, 150g, and 100g portions for the different pie components.
Roll out the lattice pastry to 3mm thickness.
Cut five 2cm wide strips long enough to line the width and sides of the tin.
Lay the strips evenly along the length of the loaf tin.
Weave four horizontal 2cm strips through the vertical ones to create a lattice basket and seal with milk.
Place the tin in the freezer to set the lattice.
Roll out the 350g pastry portion into a rectangle to line the tin and chill.
Create a rectangular interwoven lattice lid on greaseproof paper and chill.
Shape a handle and two buckles from the remaining pastry and chill.
Line the frozen lattice with the pastry rectangle, brush with milk, and chill for 15 minutes.
Preheat the oven again to 200°C.
Discard the garlic cloves from the roasted vegetables.
Layer half the couscous, then vegetables, halloumi, mozzarella, herbs, and remaining couscous into the pie.
Seal the pie with the lattice lid and brush the top with beaten egg.
Bake the pie for 50 minutes.
Bake the separate pastry handle and buckles for 15 minutes.
Remove the pie from the tin, brush the sides with egg, and bake for 3 more minutes.
Melt sugar with water in a pan without stirring until it forms a light golden caramel.
Stick the handle and buckles to the pie using the hot caramel.