Sideways adiabaticity : beyond ray optics for slowly varying metasurfaces