/* Préparation de la variable CSS animée */
@property --rotate {
  syntax: "<angle>";
  initial-value: 43deg;
  inherits: false;
}

/* Style général du body */
#persoCardSection {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  background: #ffc854;
  margin: 0;
}

/* Boîte principale */
.box {
  position: relative;
  width: 100%;
  max-width: 300px;
  height: 420px;
  /*padding: 1.5rem;*/
  border-radius: 0.75rem;
  background: #191c29;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 1.5em;
  font-family: cursive;
  color: rgb(88 199 250 / 0%);
  cursor: pointer;
  z-index: 1;
  /*overflow: hidden;*/
  margin: auto;
}

/* Texte visible au survol */
.box:hover {
  color: rgb(88 199 250 / 100%);
  transition: color 1s;
}

/* Image de fond animée au survol */
.box::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  border-radius: 0.75rem;
  background-image: var(--bg-url);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: width 0.5s ease, height 0.5s ease;
  z-index: 0;
}

.box:hover::before {
  width: 100%;
  height: 100%;
}

/* Contour animé (effet de bordure externe) */
.box::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  border-radius: 0.75rem;
  z-index: -1;
  background-image: none;
  animation: none;
}

.box:hover::after {
  background-image: linear-gradient(var(--rotate), #EEFF40, #008B6E 43%, #0A2832);
  animation: spin 2.5s linear infinite;
}

/* Animation de rotation */
@keyframes spin {
  0% {
    --rotate: 0deg;
  }
  100% {
    --rotate: 360deg;
  }
}

.box img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.75rem;
}