/* === Fond général === */
body {
  font-family: Arial, sans-serif;
  background: radial-gradient(circle at center, #002244 0%, #000c1f 100%);
  margin: 0;
  padding: 40px 0;
  text-align: center;
  color: white;
  min-height: 100vh;
  box-sizing: border-box;
}

/* Apparition de la fiche : 0.3s pause, 0.7s fade+translate */
.page-enter {
  opacity: 0;
  transform: translateY(8px);
  will-change: opacity, transform;
}

/* Réduire les animations pour les utilisateurs préférant reduced motion */
@media (prefers-reduced-motion: reduce) {
  .page-enter {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Appliquer l'animation après le délai (0.3s delay, 0.7s duration) */
.page-enter.show {
  animation-name: pageFadeIn;
  animation-duration: 1.5s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-fill-mode: forwards;
  animation-delay: 0.3s;
}

/* === Titres === */
h1 {
  margin-bottom: 20px;
}
/* === Conteneur de formulaire === */
.form-container {
  background: #f2f2f2;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(0,0,0,0.8);
  max-width: 400px;
  margin: 0 auto 40px;
  color: #333;
}

/* === Champs de formulaire === */
label {
  display: block;
  margin-top: 15px;
  font-weight: bold;
  text-align: left;
}

input {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

/* === Bouton principal === */
button[type="submit"] {
  margin-top: 20px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  background-color: #2a5298;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
  background-color: #1e3c72;
}

/* === Bouton de bascule stylisé === */
.toggle-wrapper {
  margin-top: 20px;
  text-align: center;
}

.chevron-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background-color: #0057cc;
  color: white;
  border: none;
  border-radius: 40px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  min-width: 180px;
}

.chevron-button:hover {
  background-color: #003f99;
}

.label {
  flex-grow: 1;
  text-align: left;
  padding-left: 10px;
}

.chevron-circle {
  background-color: white;
  border-radius: 50%;
  padding: 6px 10px;
  margin-left: 10px;
}

.chevron {
  color: #0057cc;
  font-size: 18px;
  font-weight: bold;
}

/* === Visage cartoon === */

.face {
  position: relative;
  margin: 20px auto;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle at center, #ffe0bd 0%, #e0b98a 100%), 
              url('../web_images/image.png') center center no-repeat;
  background-size: contain;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow:
    inset 0 4px 8px rgba(0, 0, 0, 0.2),
    0 8px 20px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.3s ease;
}
.face::after {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  width: 40px;
  height: 40px;
  background-image: url('../web_images/image.png'); /* remplace par ton chemin */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}


/* Ombre portée quand les mains couvrent */
.face.shadowed {
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.5);
}

/* === Mains cartoon stylisées === */
.hand {
  position: absolute;
  top: 55px;
  left: 37%; /* au lieu de 50% */
  width: 45px;
  height: 70px;
  background: #ffe0bd;
  border: 2px solid #333;
  border-radius: 30% 30% 50% 50%;
  opacity: 0;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.2);
  z-index: 10;
  transform: translateX(0) scale(1) rotate(0deg);
}

/* Position initiale */
.left-hand {
  transform: translateX(-100px) scale(1) rotate(0deg);
}

.right-hand {
  transform: translateX(100px) scale(1) rotate(0deg);
}

/* Animation synchronisée */
.left-hand.cover {
  animation: moveLeftHand 0.6s ease forwards;
}

.right-hand.cover {
  animation: moveRightHand 0.6s ease forwards;
}

/* Keyframes animées par transform */
@keyframes moveLeftHand {
  0% {
    opacity: 0;
    transform: translateX(-100px) scale(0.8) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: translateX(-35px) scale(1.1) rotate(30deg);
  }
}

@keyframes moveRightHand {
  0% {
    opacity: 0;
    transform: translateX(100px) scale(0.8) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: translateX(35px) scale(1.1) rotate(-30deg);
  }
}

/* === Doigts main gauche === */
.left-hand::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 0px;
  width: 8px;
  height: 35px;
  background: #ffe0bd;
  border-radius: 3px;
  box-shadow:
    12px 0 0 #ffe0bd,
    12px 0 0 1px #333,
    24px 0 0 #ffe0bd,
    24px 0 0 1px #333,
    36px 0 0 #ffe0bd,
    36px 0 0 1px #333,
    0px 0 0 #ffe0bd,
    0px 0 0 1px #333;
}
/* === Pouce main gauche === */
.left-hand::after {
  content: '';
  position: absolute;
  bottom: 25px;
  left: -10px;
  width: 10px;
  height: 28px;
  background: #ffe0bd;
  border: 1px solid #333;
  border-radius: 50% 50% 30% 30%;
  transform: rotate(-20deg);
}

/* === Doigts main droite === */
.right-hand::before {
  content: '';
  position: absolute;
  top: -1px;
  right: 0px;
  width: 8px;
  height: 35px;
  background: #ffe0bd;
  border-radius: 3px;
  box-shadow:
    -12px 0 0 #ffe0bd,
    -12px 0 0 1px #333,
    -24px 0 0 #ffe0bd,
    -24px 0 0 1px #333,
    -36px 0 0 #ffe0bd,
    -36px 0 0 1px #333,
    0px 0 0 #ffe0bd,
    0px 0 0 1px #333;
}
/* === Pouce main droite (inversé) === */
.right-hand::after {
  content: '';
  position: absolute;
  bottom: 25px;
  right: -10px;
  width: 10px;
  height: 28px;
  background: #ffe0bd;
  border: 1px solid #333;
  border-radius: 50% 50% 30% 30%;
  transform: rotate(20deg);
}
/* Animation de retrait main gauche */
@keyframes retractLeftHand {
  0% {
    opacity: 1;
    transform: translateX(-35px) scale(1.1) rotate(30deg);
  }
  100% {
    opacity: 0;
    transform: translateX(-100px) scale(0.8) rotate(0deg);
  }
}
/* Animation de retrait main droite */
@keyframes retractRightHand {
  0% {
    opacity: 1;
    transform: translateX(35px) scale(1.1) rotate(-30deg);
  }
  100% {
    opacity: 0;
    transform: translateX(100px) scale(0.8) rotate(0deg);
  }
}
/* Classe temporaire pour animation de sortie */
.left-hand.uncover {
  animation: retractLeftHand 0.6s ease forwards;
}
.right-hand.uncover {
  animation: retractRightHand 0.6s ease forwards;
}


/* Yeux */
.eye {
  position: absolute;
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  border: 2px solid #333;
}

.left-eye {
  top: 60px;
  left: 30px;
}

.right-eye {
  top: 60px;
  right: 30px;
}

/* Pupilles */
.pupil {
  position: absolute;
  width: 14px;
  height: 14px;
  background: black;
  border-radius: 50%;
  top: 18px;
  left: 18px;
  transition: top 0.1s, left 0.1s;
}

.pupil.closed {
  width: 14px;
  height: 2px;
  background: black;
  border-radius: 1px;
  top: 24px;
}


/* Sourcils */
.eyebrow {
  position: absolute;
  width: 35px;
  height: 6px;
  background: #000;
  border-radius: 3px;
  top: 45px;
}

.left-brow {
  left: 30px;
  transform: rotate(-8deg);
}

.right-brow {
  right: 30px;
  transform: rotate(8deg);
}

/* Nez */
.nose {
  position: absolute;
  top: 105px;
  left: 90px;
  width: 25px;
  height: 25px;
  background: #d18b47;
  border-radius: 50%;
}

/* Bouche souriante par défaut — croissant fin terminé en pointe */
.mouth {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 50px;
  background: transparent;
  border-bottom: 3px solid black;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-radius: 0 0 100px 100px;
  transition: all 0.3s ease;
}


/* Bouche ouverte quand identifiant est sélectionné */
.mouth.open {
  width: 120px;
  height: 55px;
  border-bottom: 3px solid black;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-radius: 0 0 125px 125px;
}

/* === Effet de rotation 3D entre les formulaires === */
.flip-card {
  perspective: 1000px;
  width: 100%;
  max-width: 400px;
  margin: auto;
}

.flip-inner {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
}

.front, .back {
  position: absolute;
  width: 100%;
  backface-visibility: hidden;
  border-radius: 16px;
}

.back {
  transform: rotateY(180deg);
}

.flip-inner.flipped {
  transform: rotateY(180deg);
}
