In this talk, we will demonstrate how the celebrated connection between Ricci curvature, optimal transport, and geometric inequalities such as the Brunn-Minkowski inequality, extends to the setting of general Lagrangians on weighted manifolds. As examples, we will consider classical (mechanical and electromagnetic) Lagrangians on Riemannian manifolds. In particular, we will state a generalization of the horocyclic Brunn-Minkowski inequality to complex hyperbolic space of arbitrary dimension, and a new Brunn-Minkowski inequality for contact magnetic geodesics on odd-dimensional spheres.