
/* hover doux */
.back-button:hover {
  background: white;
  transform: scale(1.1);
  z-index: 3000;
}

/* 👶 preview pleine largeur */
.preview {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

/* bébé dans une "carte" */
.preview .baby {
  /* background: white; */
  padding: 15px;
  border-radius: 30px;
  /* box-shadow: 0 10px 25px rgba(0,0,0,0.08); */
}


/* preview bébé */
.preview {
  flex: 1;
  position: sticky;
  top: 180px; /* reste visible au scroll */
  display: flex;
  justify-content: center;
  align-items: center;
}


/* ---------------------------------- */
/* structure */
.baby {
  position: relative;
  width: 150px;
  height: 260px;
}

/* ====================== */
/* tête */
/* ====================== */
.head {
  width: 110px;
  height: 110px;
  background: #ffe0bd;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;

  box-shadow: inset 0 -5px 10px rgba(0,0,0,0.05);
}

/* ====================== */
/* 🧑‍🦱 cheveux boucle */
/* ====================== */
/* couleurs */
.baby.blond .hair {
  border-top-color: rgb(220, 190, 60);
  border-left-color: rgb(220, 190, 60);
}

.baby.noir .hair {
  border-top-color: rgb(65, 50, 39);
  border-left-color: rgb(65, 50, 39);
}

.baby.chatain .hair {
  border-top-color: rgb(106, 89, 52);
  border-left-color: rgb(106, 89, 52);
}

.baby.roux .hair {
  border-top-color: rgb(228, 157, 3);
  border-left-color: rgb(228, 157, 3);
}

/* base */
.hair {
  position: absolute;
  top: -15px;
  left: 50%;
  width: 25px;
  height: 30px;

  /* l'autre partie du cheveux */
  border: 3px solid transparent;
  border-radius: 80%;

  transform: translateX(-50%) rotate(-20deg);
  opacity: 0;
  transition: all 0.3s;
}

/* cheveux visibles */
.baby.has-hair .hair {
  opacity: 1;
}

/* ====================== */
/* 👂 oreilles */
/* ====================== */
.ear {
  position: absolute;
  top: 35px;
  width: 20px;
  height: 30px;
  background: #feddb4;
  border-radius: 50%;
  z-index: -10;
}

/* gauche */
.ear.left {
  left: -6px;
}

/* droite */
.ear.right {
  right: -6px;
}

/* ====================== */
/* yeux */
/* ====================== */
/* classes couleurs yeux */
.baby.bleu .pupil { border: solid 4px #4a81b7; }
.baby.marron .pupil { border: solid 4px #b06635; }
.baby.vert .pupil { border: solid 4px #4c966e; }
.baby.gris .pupil { border: solid 4px #888; }

.eyes {
  display: flex;
  justify-content: space-around;
  margin-top: 40px;
}

.eye {
  width: 16px;
  height: 8px;
  border-bottom: 2px solid #333;
  border-radius: 50%;
  position: relative;
  border-radius: 10px;
  transition: all 0.3s;
}

/* pupille (cachée par défaut) */
.pupil {
  /* display: none; */
  transition: opacity 0.2s;
}

/* yeux ouverts */
.baby.open-eyes .eye {
  border: none;
  height: 20px;
  width: 20px;
  background: white;
  border-radius: 50%;
}

/* 😴 yeux fermés (arc) */
.baby.closing-eyes .eye,
.baby:not(.open-eyes) .eye {
  width: 20px;
  height: 18px;
  background: transparent;
  border-bottom: 3px solid #333;
  border-radius: 50%;
}

/* cacher pupille quand yeux fermés */
.baby.closing-eyes .pupil,
.baby:not(.open-eyes) .pupil {
  opacity: 0;
}

/* montrer pupille quand ouverts */
.baby.open-eyes .pupil {
  opacity: 1;
}

/* afficher pupille */
.baby.open-eyes .pupil {
  display: block;
  width: 8px;
  height: 8px;
  background: #333;
  border-radius: 50%;
  margin: auto;
}

/* 😭 larmes */
.tear {
  position: absolute;
  width: 6px;
  height: 10px;
  background: #89cff0;
  border-radius: 50%;

  top: 55px;
  opacity: 0;
}

/* gauche */
.tear.left {
  left: 25%;
}

/* droite */
.tear.right {
  right: 15%;
}

/* affichage si bébé pleure */
.baby.angry .tear {
  opacity: 1;
}

.baby.angry .tear {
  animation: drop 1s infinite;
}

@keyframes drop {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(10px); opacity: 0; }
}

/* ====================== */
/* joues */
/* ====================== */
.cheeks {
  display: flex;
  justify-content: space-around;
  margin-top: 0px;
}

.cheek {
  width: 25px;
  height: 15px;
  background: #ffb6c1;
  border-radius: 50%;
  opacity: 0.6;
}


/* ===================== */
/* 👄 BOUCHE */
/* ===================== */

/* container */
.mouth-container {
  position: relative;
  width: 30px;
  height: 30px;
  margin: 8px auto;
}


/* ------------------ */
/* 🍼 TÉTINE  */
/* ------------------- */

.pacifier {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translateX(-50%);

  width: 26px;
  height: 18px;

  background: #c2cff4;
  border-top: 1px solid #ca819f;
  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* 🔵 anneau */
.pacifier::after {
  content: "";
  position: absolute;

  width: 14px;
  height: 14px;

  border: 3px solid #3c5eb5;
  border-radius: 50%;

  bottom: -10px;
}

/* ===================== */
/* 👄 BOUCHE */
/* ===================== */

.mouth {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* 😊 sourire */
.baby.smile .mouth {
  display: block;
  width: 20px;
  height: 10px;
  border-bottom: 3px solid #ff6b6b;
  background: #d16464;
  border-radius: 0 0 20px 20px;
}

/* 😐 blasé */
.baby.meh .mouth {
  display: block;
  width: 25px;
  height: 2px;
  background: #d16464;
  border-radius: 2px;
}

/* 😭 pleure */
.baby.angry .mouth {
  display: block;
  width: 20px;
  height: 10px;
  border-top: 3px solid #ff6b6b;
  background: #d16464;
  border-radius: 20px 20px 0 0;
}

/* cacher tétine si une émotion est choisie */
.baby.smile .pacifier,
.baby.meh .pacifier,
.baby.angry .pacifier {
  display: none;
}


/* ====================== */
/* corps (emmaillotage) */
/* ====================== */
.body {
  width: 100px;
  height: 180px;
  background: linear-gradient(135deg, #ffc0cb, #d77089);
  border-radius: 60px 60px 100px 100px; 
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s;
}


/* responsive (important 👍) */
@media (max-width: 900px) {
  .container {
    flex-direction: column;
  }

  .preview {
    position: static;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
/* 📱 MOBILE */
@media (max-width: 768px) {

  /* 👶 bébé fixé en haut */
  .preview {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 400px;

    display: flex;
    justify-content: center;

    background: linear-gradient(135deg, #fde2e4, #e2f0ff);
    padding: 10px 0;
    z-index: 1000;
  }


  /* classes couleurs yeux */
.baby.bleu .pupil { border: solid 3px #4a81b7; }
.baby.marron .pupil { border: solid 3px #b06635; }
.baby.vert .pupil { border: solid 3px #4c966e; }
.baby.gris .pupil { border: solid 3px #888; }

  /* afficher pupille */
.baby.open-eyes .pupil {
  width: 15px;
  height: 15px;
}
}