Sharp Poincaré inequalities in a class of non-convex sets