body {
  background-color: black;



}

*{
    transform-style: preserve-3d;
}

section {
    height: 100vh;
    width: 100vw;
    position: relative;
    perspective: 500px;
    transform: rotatex(60deg);
}

.soleil {
    width: 60px;
    height: 60px;
    background-color: yellow;
    perspective: 500px;
    transform: rotatex(-60deg) translate(-50%, -50%);
    transform-origin: center;
    
}

section > div {
    position: absolute;
    height: var(--orbit);
    width: var(--orbit);
    border-radius: 50%;
    border: white solid 1px;
    left: 50%;
    top:50%;
    transform: translate(-50%, -50%);
    animation: rotate var(--temps)infinite linear;
    
    
}


section > div > div {
    background-color: var(--color);
    border-radius: 50%;
    width: var(--taille);
    height: var(--taille);
    position: absolute;
    top: 0;
    left: 50%;
    perspective: 500px;
    transform: rotatex(-60deg) translate(-50%, -50%);
    transform-origin: center;



}

@keyframes rotate {
    0% {

        transform: translate(-50%, -50%);

    }
    100% {
       

        transform: translate(-50%, -50%) rotate(360deg);
    }
}



.lunecadre {
    position: absolute;
    height: var(--orbit);
    width: var(--orbit);
    border-radius: 50%;
    border: white solid 1px;
    left: 50%;
    top:50%;
    transform: translate(-50%, -50%);
    animation: rotate var(--temps)infinite linear;
}

.lune {
    background-color: rgb(35, 231, 77);
    border-radius: 50%;
    width: var(--taille);
    height: var(--taille);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center;
}





.ex2 {
    height: 100vh;
    width: 100vw;
    background-color: beige;
    display: flex;
    justify-content: center;
    text-align: center;
    align-items: center;
    
}

.ex2 > a {

    width: 200px;
    height: 100px;
    background-color: blueviolet;
    text-decoration: none;
    color: white;
    font-size: 20px;
    display: flex;
    justify-content: center;
    text-align: center;
    align-items: center;
    position: relative;
    perspective: 300px;

}

.ex2 > a > span {
    position: absolute;
    background-color: aqua;
    top: 0;
    left: 0;
    width: 200px;
    height: 100px;

    transform-origin: bottom center;
    transform-style: preserve-3d;

    transition: 0.3s;

    display: flex;
    justify-content: center;
    text-align: center;
    align-items: center;
}


a:hover span {
    transform: rotateX(-100deg);

}


.ex2 > a > span::before {
    background-color: brown;
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    width: 200px;
    height: 100px;
    transform: translateZ(-10px);

}

.ex2 > a > span::after {
    background-color: rgb(42, 165, 61);
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    transform: rotateX(-90deg);
    transform-origin: 50% 0;
}