In a medium mixing bowl combine butter, sugar, cocoa, and salt. Beat with an electric mixer on medium speed until combined. Scrape side of bowl; add flour. Beat on medium speed until the mixture looks like clumpy sand. Scrape bowl. Add milk and vanilla; beat on low speed until dough comes together. Gather flour mixture into a ball, kneading gently until it holds together. Wrap pastry in plastic wrap and chill for 30 minutes.
Use your hands to slightly flatten pastry between two pieces of waxed paper. Roll pastry from center to edges into a circle about 12 inches in diameter. Remove waxed paper; wrap pastry circle around the rolling pin. Transfer pastry to a 10-inch tart pan with removable bottom or 9-inch pie plate. Gently press the dough into the pan without stretching it. Trim dough to edge of pan or pie plate. Cover and freeze for 30 minutes before baking.
Preheat oven to 350 degrees F. Remove the tart pan from the freezer and line pastry with a double thickness of heavy foil. Bake for 20 minutes; carefully remove the foil. Bake for 10 to 15 minutes more or until crust is set and dry. Cool completely before filling.
In a medium bowl combine the chocolate, sugar, Chambord (if using), and salt. In a small saucepan heat the cream and butter until the butter has melted and the cream is hot with some bubbles forming around the edges. Do not boil. Pour the cream mixture over the chocolate mixture and let it sit for 1 minute. Gently whisk just until smooth. Pour the filling into the tart pan and chill, covered loosely, at least 6 hours or until firm.
Just before serving, sprinkle with chopped pistachios and 1 to 2 pinches sea salt. Serve with lightly sweetened whipped cream, if desired. Store, covered, in the refrigerator up to 2 days.