Pulse flour and salt, cut in cold butter until crumbly, add ice water until dough holds together. Chill 30 minutes.
Roll out and fit into a 9-inch tart pan. Chill 15 minutes.
Blind bake at 375°F: 15 minutes with pie weights, then 8 to 10 minutes without, until dry and lightly golden.
Cook leeks in oil for 8 to 10 minutes until softened and dry. Stir in ras el hanout for 1 minute, then remove from heat and stir in chicken.
Whisk eggs, cream, milk, salt, and pepper together.
Reduce oven to 350°F. Spread chicken and leek mixture in the crust, top with Gruyère, and pour in the egg mixture.
Bake 30 to 35 minutes until edges are set and center jiggles slightly.
Rest at least 15 minutes before slicing.