  We present an analytically solvable theory of BCS-type superconductivity in
good metals which are confined along one of the three spatial directions, such
as thin films. Closed-form expressions for the dependence of the
superconducting critical temperature $T_c$ as a function of the confinement
size $L$ are obtained, in quantitative agreement with experimental data with no
adjustable parameters. Upon increasing the confinement, a crossover from a
spherical Fermi surface, which contains two growing hollow spheres
corresponding to states forbidden by confinement, to a strongly deformed Fermi
surface, is predicted. This crossover represents a new topological transition,
driven by confinement, between two Fermi surfaces belonging to two different
homotopy classes. This topological transition provides a mechanistic
explanation of the commonly observed non-monotonic dependence of $T_c$ upon
film thickness with a maximum which, according to our theory, coincides with
the topological transition.
