Most species live in heterogeneous habitats and face different environmental conditions. The interaction between local selection, genetic drift and gene flow will shape the corresponding adaptive landscape. Depth gradient in the Mediterranean Sea allow a comparative study of connectivity and adaptation for benthic species. We present here a synthesis of the results obtained for the red coral Corallium rubrum. This species has been impacted by mortality events linked with thermal anomalies. Genetic and experimental data have been used to explore this question and to study the impact of ecology on the shaping of genetic structure. Phenotypic differences in thermotolerance levels have been evidenced between shallow and deeper populations which are correlated with differences in levels of gene expression. We now use RAD-sequencing data to test for genetic x environment associations which could point to the possibility of local adaptation. The development of transcriptomic and genomic approaches renew the scope of molecular ecology for non- model species.