body {
    margin: 0;
    padding: 0;
    background-color: #ecf0f1;
    height: 100vh;
    display: flex;
    align-items: center;    /* hauteur obligatoire*/
}
nav {
    display: flex;
    flex-direction: column;
}
nav a {
    text-decoration: none;
    width: 150px;
    padding: 15px;
    margin: 10px 0;
    border-radius: 0 10px 10px 0;
    font-size: 22px;
    color: white;
    margin-left: -120px;
    transition: 0.5s;
}
nav a:hover {
    margin-left: 0;
}
nav a:nth-child(1) {
    background-color: #3498db;
}
nav a:nth-child(2) {
    background-color: #9b59b6;
}
nav a:nth-child(3) {
    background-color: #1abc9c;
}