01 - In a large heavy-bottomed pot, melt unsalted butter over medium-low heat. Add sliced onions and a pinch of salt. Cook, stirring frequently, until the onions are deeply caramelized and golden brown, approximately 25 to 30 minutes.
02 - Add minced garlic and finely chopped celery to the pot; sauté for 2 minutes until fragrant.
03 - Stir in sliced mushrooms and cook until softened and lightly browned, about 8 minutes.
04 - Pour in dry white wine if using, deglazing the pot and scraping up any browned bits. Allow the wine to reduce by half, about 2 minutes.
05 - Add vegetable broth, thyme leaves, and bay leaf. Bring to a gentle simmer and cook uncovered for 10 minutes to blend flavors.
06 - Remove the bay leaf. Lower the heat and stir in heavy cream. Simmer for 2 to 3 minutes, taking care not to boil. Taste and adjust seasoning with salt and black pepper.
07 - For a traditional gratinée finish, ladle soup into oven-safe bowls, top each with a toasted baguette slice, sprinkle with grated Gruyère, and broil until cheese is bubbly and golden.
08 - Garnish the soup with chopped fresh parsley before serving.