[en] A functional wavelet-based semi-distance is defined for comparing curves with misaligned sharp local patterns. It is data-driven and highly adaptive to the curves. A main originality is that each curve is expanded in its own wavelet basis, which hierarchically encodes the patterns of the curve. The key to success is that variations of the patterns along the abscissa and ordinate axes are taken into account in a unified framework. Associated statistical tools are proposed for detecting and localizing differences between groups of curves. This methodology is applied to 1H-NMR spectrometric curves and solar irradiance time series.