@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500&display=swap");

:root {
  --background-color: #efe8e6;
  --text-color: black;
  --color-img: url("assets/lala-color.png");
  --border-img-color: #1f142e;
  --boxShadow1: #efe8e6;
  --boxShadow2: #1f142e;
}

body {
  margin: 5% 20%;
  font-family: "Roboto", sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  justify-content: center;
  align-items: center;
}

.loaderContainer {
  position: fixed;
  inset: 0;
  background-color: var(--background-color);
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: apparition 2s 2.5s linear forwards
}

.loaderContainer h2 {
  animation: apparition 2s 2.5s linear forwards
}

@keyframes apparition {
  0% {
    opacity: 100%;
  }

  100% {
    opacity: 0%;
    visibility: hidden;
  }
}

.ring {
  width: 200px;
  height: 200px;
  border: 0px solid black;
  border-radius: 50%;
  position: absolute;
}

.ring:nth-child(1) {
  border-bottom-width: 10px;
  border-color: teal;
  animation: spinAnim1 2s linear forwards
}

.ring:nth-child(2) {
  border-right-width: 10px;
  border-color: purple;
  animation: spinAnim2 2s linear forwards
}

.ring:nth-child(3) {
  border-top-width: 10px;
  border-color: darkorange;
  animation: spinAnim3 2s linear forwards
}

.ring:nth-child(4) {
  border-top-width: 10px;
  border-color: darkslateblue;
  animation: spinAnim4 2s linear forwards
}

@keyframes spinAnim1 {
  0% {
    transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg);
    opacity: 100%;
  }

  100% {
    transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg);
    opacity: 0%;
    visibility: hidden;
  }
}

@keyframes spinAnim2 {
  0% {
    transform: rotateX(45deg) rotateY(10deg) rotateZ(0deg);
    opacity: 100%;
  }

  100% {
    transform: rotateX(45deg) rotateY(10deg) rotateZ(360deg);
    opacity: 0%;
    visibility: hidden;
  }
}

@keyframes spinAnim3 {
  0% {
    transform: rotateX(15deg) rotateY(55deg) rotateZ(0deg);
    opacity: 100%;
  }

  100% {
    transform: rotateX(15deg) rotateY(55deg) rotateZ(360deg);
    opacity: 0%;
    visibility: hidden;
  }
}

@keyframes spinAnim4 {
  0% {
    transform: rotateX(65deg) rotateY(-40deg) rotateZ(0deg);
    opacity: 100%;
  }

  100% {
    transform: rotateX(65deg) rotateY(-40deg) rotateZ(360deg);
    opacity: 0%;
    visibility: hidden;
  }
}

p {
  line-height: 25px;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: auto;
  position: sticky;
  top: 0;
  background-color: var(--background-color);
  box-shadow:
    15px 0 10px var(--background-color),
    -15px 0 10px var(--background-color),
    0 15px 10px var(--background-color),
    15px -10px 10px var(--background-color),
    15px 10px 10px var(--background-color),
    -15px 10px 10px var(--background-color),
    -15px -10px 10px var(--background-color);
  z-index: 10;
}

nav ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style-type: none;
  font-weight: 500;
}

nav li {
  position: relative;
  margin-left: 40px;
  font-size: 15px;
  cursor: pointer;
}

.nav-link {
  text-decoration: none;
  color: var(--text-color);
}

header {
  margin-top: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
}

header .header-left img {
  width: 85%;
  border-radius: 50%;
  transform: translateY(0);
  animation: floatImg 3s ease-in-out 4 forwards;
}

@keyframes floatImg {
  0% {
    box-shadow: 0 4px 10px 0px var(--border-img-color);
    transform: translateY(0);
  }

  50% {
    box-shadow: 0 22px 10px 0px var(--border-img-color);
    transform: translateY(-10%);
  }

  100% {
    box-shadow: 0 4px 10px 0px var(--border-img-color);
    transform: translateY(0);
  }
}

header .header-right h1 {
  font-size: 45px;
  font-weight: 400;
  margin-top: 15px;
}

.location {
  text-decoration: none;
  color: inherit;
}

.diagonalAbout {
  margin-top: 75px;
  margin-bottom: 75px;
  border-radius: 20px;
  padding: 20px;
}

.diagonalAbout p {
  font-size: 20px;
  line-height: 30px;
}

.projects {
  margin-top: 60px;
}

.card-container {
  transform: translateX(250px);
  opacity: 0;
  transition: 1s;
}

.card-container.show {
  transform: translateX(0) translateY(0);
  opacity: 1;
}

.projects .card-container {
  display: flex;
  align-items: center;
  margin-bottom: 60px;
}

.projects .card-container .left-container {
  margin-right: 40px;
}

.projects .card-container .left-container img {
  max-height: 200px;
  max-width: 300px;
  border: dashed var(--border-img-color);
}

.left-container {
  transition: transform 0.5s ease-in-out;
}

.left-container:hover {
  transform: scale(1.2);
}

.text-drawing {
  text-align: center;
}

/*section links*/

.links {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 100px;
  gap: 40px;
}

.links a {
  text-decoration: none;
  color: inherit;
  position: relative;
  font-weight: bold;
}

/*section footer*/

footer {
  margin-top: 100px;
}

footer p {
  font-size: 15px;
  text-align: center;
}

h2,
h3,
h4 {
  text-align: center;
}

/* pour mobiles */
@media screen and (max-width: 809px) {
  .projects .card-container {
    flex-wrap: wrap;
  }

  .projects .card-container .left-container {
    margin-right: 0;
  }

  .diagonalAbout p {
    font-size: 14px;
    line-height: 15px;
  }

  .drawing-animation {
    flex-direction: column;
  }

  header .header-right h1 {
    font-size: 26px;
  }

  .links {
    margin-top: 25px;
    gap: 10px;
    flex-direction: column;
  }

  footer {
    margin-top: 25px;
  }
}

@media screen and (min-width: 810px) and (max-width: 1080px) {
  header {
    flex-direction: column;
  }
}

/* pour tablettes */
@media screen and (max-width: 820px) {

  body {
    margin: 5%;
  }

  p {
    text-align: center;
  }

  nav {
    position: unset;
    background-color: unset;
  }

  nav ul {
    display: initial;
    padding-left: 0px;
  }

  nav li {
    margin-left: 0px;
    margin-bottom: 15px;
  }

  header {
    margin-top: 15px;
  }

  header,
  nav {
    flex-direction: column
  }

  header .links {
    display: flex;
    flex-direction: column;
  }

  header .header-links {
    margin-bottom: 15px;
  }

  header .header-right {
    margin-right: 0;
  }

  header .header-right .links {
    margin-top: 50px;
  }

  header .header-left {
    margin-bottom: 40px;
  }

  header .header-left img {
    width: 250px;
  }

  .diagonalAbout {
    margin-top: 50px;

  }

  .card-container {
    transform: translateY(-100px);
    flex-direction: column;
  }

  .projects .card-container .left-container {
    margin-right: 0;
  }

  .projects .card-container .left-container img {
    width: 100%;
  }

  .drawing-animation {
    flex-direction: column;
  }
}

/* switch pour le changement de theme */

.toggleModeContainer {
  width: 60px;
  height: 30px;
  margin-right: 15px;
}

.toggleModeContainer #status {
  display: none;
}

.toggleModeContainer #status+label {
  height: 100%;
  width: 100%;
}

.toggleModeContainer #status+label>.status-switch {
  cursor: pointer;
  width: 100%;
  height: 100%;
  position: relative;
  background-color: #1f142e;
  transition: all 0.5s ease;
  padding: 3px;
  border-radius: 50px;
}

.toggleModeContainer #status+label>.status-switch:before,
.toggleModeContainer #status+label>.status-switch:after {
  border-radius: 50px;
  height: 30px;
  width: 30px;
  display: flex;
  align-items: center;
  position: absolute;
  justify-content: center;
  transition: all 0.3s ease;
}

.toggleModeContainer #status+label>.status-switch:before {
  border-radius: 50px;
  background-color: lightslategray;
  left: 3px;
  z-index: 10;
  content: attr(data-jour);
}

.toggleModeContainer #status+label>.status-switch:after {
  right: 0;
  content: attr(data-nuit);
}

.toggleModeContainer #status:checked+label>.status-switch {
  background-color: #efe8e6;
}

.toggleModeContainer #status:checked+label>.status-switch:after {
  left: 0;
  content: attr(data-jour);
}

.toggleModeContainer #status:checked+label>.status-switch:before {
  left: 50%;
  content: attr(data-nuit);
}

/* animation dessin */

.drawing-animation {
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawing-animation img {
  max-width: 100%;
  display: block;
}

button {
  padding: 0.5rem 1rem;
  margin-bottom: 3rem;
}

.mask-container {
  position: relative;
}

.color-image {
  position: absolute;
  inset: 0;
  background-image: var(--color-img);
  background-size: cover;
  -webkit-mask-image: url("assets/inkmask.png");
  -webkit-mask-size: cover;
  -webkit-mask-position: 0% 0%;
  mask-image: url("assets/inkmask.png");
  mask-size: cover;
  mask-position: 0% 0%;
}

.mask-animation {
  animation:
    addColor 3000ms steps(32) forwards;
}

@keyframes addColor {
  0% {
    -webkit-mask-position: 0% 0%;
    mask-position: 0% 0%;
  }

  100% {
    -webkit-mask-position: 100% 0%;
    mask-position: 100% 0%;
  }
}

.contact-link {
  text-decoration: none;
  color: var(--text-color);
}

/* Sections skills avec les logos des langages */

.logoskills {
  margin-top: 35px;
  display: flex;
  flex-direction: row;
  gap: 50px;
  justify-content: center;
}

.logo img {
  width: 100px;
}

@media screen and (max-width: 510px) {
  .logoskills {
    margin-top: 15px;
    gap: 6px;
  }

  .logo img {
    width: 50px;
  }
}

@media screen and (min-width: 511px) and (max-width: 809px) {
  .logoskills {
    gap: 15px;
  }

  .logo img {
    width: 70px;
  }
}

@media screen and (min-width: 810px) and (max-width: 1080px) {
  .logoskills {
    gap: 15px;
  }

  .logo img {
    width: 90px;
  }
}

/* Section About diagonal background gradient */

.wrapper {
  max-width: 50rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

.diagonalAbout {
  position: relative;
  isolation: isolate;

}

.diagonalAbout::after {
  content: '';
  background-image:
    linear-gradient(45deg,
      hsl(180, 100%, 20%),
      hsl(300, 100%, 20%),
      hsl(33, 100%, 45%));
  position: absolute;
  z-index: -1;
  inset: 0;
  transform: skewY(-5deg);
  opacity: 0.8;
}