Fluctuations and pattern formation in fluids under confinement