This is the two-tailed pasha (Charaxes jasius), the only Charaxes butterfly we have in Europe.

Like many butterflies it can sleep attached to a twig or leaf or whatever it can find.