This paper addresses the issue of detecting change-points in time series. The proposed model, called the Bernoulli Detector, is presented first in a univariate context. This approach differs from existing counterparts by making only assumptions on the nature of the change-points, and does not depend on hypothesis on the distribution of the data, contrary to the parametric methods. It relies on the combination of a local robust statistical test, based on the computation of ranks and acting on individual time segments, with a global Bayesian framework able to optimize the change-points configurations from multiple local statistics, provided as $p$-values. The control of the detection of a single change-point is proved even for small samples. The interest of such a generalizable nonparametric approach is shown on simulated data by the good performances attained for Gaussian noise as well as in presence of outliers, without adapting the model. The model is extended to the multivariate case by introducing the probabilities that the change-points affect simultaneously several time series. The method presents then the advantage to detect both unique and shared change-points for each signal. We finally illustrate our algorithm with real datasets from energy monitoring and genomic. Segmentations are compared to state-of-the-art approaches like the group lasso and the BARD algorithm.