Potato gratin with caramelised onion