  We call pattern any non-constant stable solution of a semilinear elliptic
equation with Neumann boundary conditions. A classical theorem of Casten,
Holland [19] and Matano [49] states that stable patterns do not exist in convex
domains. In this article, we show that the assumptions of convexity of the
domain and stability of the pattern in this theorem can be relaxed in several
directions. In particular, we propose a general criterion for the non-existence
of patterns, dealing with possibly non-convex domains and unstable patterns.
Our results unfold the interplay between the geometry of the domain, the
magnitude of the nonlinearity, and the stability of patterns. We propose
several applications, for example, we prove that (under a geometric assumption)
there exist no patterns if the domain is shrunk or if the nonlinearity has a
small magnitude. We also refine the result of Casten Holland and Matano and
show that it is robust under smooth perturbations of the domain and the
nonlinearity. In addition, we establish several gradient estimates for the
patterns of (1). We prove a general nonlinear Cacciopoli inequality (or an
inverse Poincar{\'e} inequality), stating that the L2-norm of the gradient of a
solution is controlled by the L2-norm of f(u), with a constant that only
depends on the domain. This inequality holds for non-homogeneous equations. We
also give several flatness estimates. Our approach relies on the introduction
of what we call the Robin-curvature Laplacian. This operator is intrinsic to
the domain and contains much information on how the geometry of the domain
affects the shape of the solutions. Finally, we extend our results to unbounded
domains. It allows us to improve the results of our previous paper [53] and to
extend some results on De Giorgi's conjecture to a larger class of domains.
