niche (n.)

1610s, "shallow recess in a wall," from French niche "recess (for a dog), kennel" (14c.), perhaps from Italian nicchia "niche, nook," from nicchio "seashell," said by Klein and Barnhart to be probably from Latin mitulus "mussel," but the change of -m- to -n- is not explained. Watkins suggests that the word is from an Old French noun derived from nichier "to nestle, nest, build a nest," via Gallo-Roman *nidicare from Latin nidus "nest" (see nidus), but that has difficulties, too. Figurative sense is first recorded 1725. Biological use dates from 1927.