Preheat your oven to 350°F (180°C) and line two baking sheets with parchment paper.
Blend the powdered sugar, almond flour, and cocoa powder in a food processor, then sift the mixture into a bowl and toss any big lumps.
In a separate bowl, beat the egg whites with a pinch of salt until foamy, then gradually add the granulated sugar and keep beating until stiff, glossy peaks form.
Gently fold the dry mixture into the meringue in two parts using a spatula, stopping when the batter flows like thick lava and settles after 20 seconds.
Spoon the batter into a piping bag fitted with a 1/2-inch round tip and pipe 1-inch circles onto the lined baking sheets, leaving a little space between each one.
Bang the baking sheets firmly on the counter to release air bubbles, then let the shells sit at room temp for 20 to 30 minutes until they form a dry, touchable skin.
Bake the shells for 10 to 15 minutes, then let them cool completely on the tray before removing.
While they cool, heat the cream in a small saucepan until it just starts to simmer, then pour it over the chopped chocolate and let it sit for a minute.
Stir the chocolate until smooth, add the butter if using, and let the ganache cool to a thick, spreadable texture.
Match up your macaron shells by size, spread a little ganache on one, then gently sandwich them together without pressing too hard.