Dry-toast the almonds, then set aside to cool. Once cold, roughly chop and mix with the caster sugar.
Put the egg yolks for the custard in a saucepan with the sugars and beat to dissolve. Incorporate the flour, then pour in the boiling milk, beating vigorously over a low heat until the custard thickens. Allow to cool.
Beat the egg whites with 50 g (2 oz) of the caster sugar until stiff. Cook spoonfuls of the meringue mixture in boiling water and set aside.
Fold the filo pastry sheets in four, fan fashion, and fry them in the sunflower oil, a few at a time, then drain on kitchen paper. Place four of the pastry fans on a round plate to form a circle, then add a second layer. Spread with half the cold custard and sprinkle over a third of the almonds. Repeat to make another layer, then top with the remaining four fans.
Decorate with the meringue and sprinkle with the remaining almonds. Quickly prepare a caramel with the remaining caster sugar and the tablespoon of water. Drizzle over the pastilla and serve immediately.