/* Déclaration de la police de caractères pour starwarsfont */
@font-face {
  font-family: "starwarsfont";
  src: url("../fonts/stjelogo/Strjmono.ttf");
  font-weight: normal;
  font-style: normal;
}

/* Variables globales */
:root {
  --white-rbg-color: 255, 255, 255; /* Couleur blanche en RGB */
  --circle-rbg-color: 255, 0, 0; /* Couleur rouge en RGB pour le cercle */
}

/* Réinitialisation des styles par défaut */
* {
  margin: 0;
  padding: 0;
}

/* Styles du curseur */
.cursor {
  pointer-events: none;
  width: 20px;
  height: 20px;
  border: 10px solid rgba(var(--white-rbg-color), 0.8);
  border-radius: 50%;
  position: absolute;
  transition-duration: 200ms;
  transition-timing-function: ease-out;
  animation: cursor-animate 550ms infinite alternate;
  z-index: 9999;
}

.cursor.animate-clickable {
  pointer-events: auto;
}

.cursor::after {
  width: 40px;
  height: 40px;
  border: 15px solid rgba(var(--white-rbg-color), 0.2);
  border-radius: 50%;
  position: absolute;
  top: -25px;
  left: -25px;
  animation: cursor-animate-2 550ms infinite alternate;
}

/* Modificateur de curseur */
.cursor--expand {
  animation: cursor-animate-3 550ms forwards;
  border: 10px solid rgb(var(--circle-rbg-color));
}

.cursor--expand::after {
  border: 15px solid rgba(var(--circle-rbg-color), 0.3);
}

/* Keyframes pour l'animation du curseur */
@keyframes cursor-animate {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.5);
  }
}

@keyframes cursor-animate-2 {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(0.3);
  }
}

@keyframes cursor-animate-3 {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(3);
  }

  100% {
    transform: scale(1);
    opacity: 0;
  }
}

/* Styles de la barre de navigation supérieure */
.topnav {
  background-color: #333;
  overflow: hidden;
  list-style-type: none;
  margin: 0;
  padding: 0;
  position: fixed;
  width: 100%;
  font-size: x-large;
  z-index: 2;
  top: 0;
}

.topnav a {
  float: left;
  display: block;
  color: #f2f2f2;
  text-align: center;
  padding: 20px 40px;
  text-decoration: none;
  font-size: 17px;
  font-family: "starwarsfont";
}

.topnav a:hover {
  background-color: #ddd;
  color: black;
}

.topnav a.active {
  background-color: #333;
  color: white;
}

.topnav .icon {
  display: none;
}

/* Styles responsives pour les petits écrans */
@media screen and (max-width: 600px) {
  /* Masquer tous les liens du menu, sauf le premier (icône) */
  .topnav a:not(:first-child) {
    display: none;
  }

  /* Afficher l'icône du menu */
  .topnav a.icon {
    float: right;
    display: block;
  }

  /* Réarranger la position de l'icône sur les petits écrans */
  .topnav.responsive a.icon {
    position: absolute;
    right: 0;
    top: 0;
  }

  /* Afficher les liens du menu lorsqu'ils sont en mode "responsive" */
  .topnav.responsive a {
    float: none;
    display: block;
    text-align: left;
  }

  /* Résoudre le problème de débordement après le dernier élément */
  .topnav:after {
    content: "";
    display: table;
    clear: both;
  }

  /* Appliquer box-sizing à tous les éléments */
  * {
    box-sizing: border-box;
  }

  /* Ajuster le padding des liens du menu */
  .topnav a {
    padding: 20px;
    font-size: x-large;
    font-family: "starwarsfont";
  }
}
