01 - Preheat oven to 375°F (190°C).
02 - In a large skillet, heat olive oil and butter over medium-low heat. Add sliced onions with a pinch of salt, stirring frequently, until deeply caramelized and golden brown, about 25 minutes.
03 - Add minced garlic and thyme to the caramelized onions, cooking for 1 minute until fragrant.
04 - Deglaze the pan with white wine (if using), scraping up any browned bits from the bottom. Let simmer for 2–3 minutes to reduce slightly.
05 - Stir in the rinsed rice, coating each grain with the onion mixture, and cook for 2 minutes to lightly toast.
06 - Transfer the onion-rice mixture to a greased 2-quart casserole dish. Pour in the broth, season with salt and pepper, and mix gently to combine.
07 - Cover tightly with aluminum foil and bake for 30 minutes until rice is tender and liquid is absorbed.
08 - Remove foil, fluff rice with a fork, then sprinkle shredded Gruyère and grated Parmesan evenly over the top. Scatter toasted croutons across the surface and bake uncovered for an additional 10–12 minutes until cheese is melted and bubbling.
09 - Let stand for 5 minutes before serving to allow flavors to settle.