  The fundamental gap conjecture proved by Andrews and Clutterbuck in 2011
provides the sharp lower bound for the difference between the first two
Dirichlet Laplacian eigenvalues in terms of the diameter of a convex set in
$\mathbb{R}^N$. The question concerning the rigidity of the inequality, raised
by Yau in 1990, was left open. Going beyond rigidity, our main result
strengthens Andrews-Clutterbuck inequality, by quantifying geometrically the
excess of the gap compared to the diameter in terms of flatness. The proof
relies on a localized, variational interpretation of the fundamental gap,
allowing a dimension reduction via the use of convex partitions \`a la
Payne-Weinberger: the result stems by combining a new sharp result for one
dimensional Schr\"odinger eigenvalues with measure potentials, with a thorough
analysis of the geometry of the partition into convex cells. As a by-product of
our approach, we obtain a quantitative form of Payne-Weinberger inequality for
the first nontrivial Neumann eigenvalue of a convex set in $\mathbb{R}^N$, thus
proving, in a stronger version, a conjecture from 2007 by Hang-Wang.
