  We introduce a rigorous approach to the study of the symmetry breaking and
pattern formation phenomenon for isotropic functionals with local/nonlocal
interactions in competition.
  We consider a general class of nonlocal variational problems in dimension
$d\geq 2$, in which an isotropic surface term favouring pure phases competes
with an isotropic nonlocal term with power law kernel favouring alternation
between different phases.
  Close to the critical regime in which the two terms are of the same order, we
give a rigorous proof of the conjectured structure of global minimizers, in the
shape of domains with flat boundary (e.g., stripes or lamellae).
  The natural framework in which our approach is set and developed is the one
of calculus of variations and geometric measure theory.
  Among others, we detect a nonlocal curvature-type quantity which is
controlled by the energy functional and whose finiteness implies flatness for
sufficiently regular boundaries.
  The power of decay of the considered kernels at infinity is $p\geq d+3$ and
it is related to pattern formation in synthetic antiferromagnets. The decay
$p=d+3$ is optimal to get the flatness of regular boundaries of finite energy
in the critical regime.
