/* === FOND AVEC GIF FLOU === */
body {
  margin: 0;
  font-family: 'IBM Plex Mono', monospace;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  position: relative;
}

/* Overlay pour flouter le fond */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://media.giphy.com/media/v1.Y2lkPWVjZjA1ZTQ3cWhvcHB4aDJoajJkMXhjcnJhcWU4OXg3cDExdTFzbnZmcjVoMzR0ZyZlcD12MV9naWZzX3JlbGF0ZWQmY3Q9Zw/cKi4Kyoi9fGM2eHz9C/giphy.gif');
  background-size: cover;
  opacity: 30%;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  filter: blur(5px);
  z-index: -1;
}

/* === CONTAINER GLASSMORPHISM === */
.container {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(25px);
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
  padding: 3rem;
  border-radius: 30px;
  text-align: center;
  max-width: 600px;
  width: 90%;
}

/* === TITRE === */
h1 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 2rem;
  color: #ffffff;
  line-height: 1.5em;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* === TEXTAREA NEOMORPHIC === */
textarea {
  width: 100%;
  height: 120px;
  border: none;
  outline: none;
  resize: none;
  padding: 1rem;
  border-radius: 15px;
  font-size: 1rem;
  font-family: 'IBM Plex Mono', monospace;
  background: #e0e5ec;
  color: #5a6c7d;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

textarea::placeholder {
  color: #a3b1c6;
  font-family: 'IBM Plex Mono', monospace;
}

textarea:focus {
  box-shadow: inset 6px 6px 10px #828d9e,
              inset -6px -6px 10px #d8d8d8;
}

/* === BOUTONS NEOMORPHIC === */
.buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

button {
  border: none;
  outline: none;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-family: 'IBM Plex Mono', monospace;
  color: #5a6c7d;
  border-radius: 15px;
  background: #e0e5ec;
  cursor: pointer;
  transition: all 0.2s ease;

}

button:hover {

  transform: translateY(-2px);
}

button:active {
  box-shadow: inset 4px 4px 8px #a3b1c6,
              inset -4px -4px 8px #ffffff;
  transform: translateY(0);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;

}

button:disabled:hover {
  transform: none;

}

/* === ZONE DE SORTIE NEOMORPHIC === */
.output {
  padding: 1.5rem;
  min-height: 80px;
  border-radius: 15px;
  background: #e0e5ec;
  color: #5a6c7d;
  font-size: 1.2rem;
  font-family: 'IBM Plex Mono', monospace;
  white-space: pre-wrap;
  word-wrap: break-word;
  transition: all 0.3s ease;
  line-height: 1.4;
  box-shadow: inset 6px 6px 10px #a3b1c6,
              inset -6px -6px 10px #ffffff;
}

/* === TEXTE D'AIDE === */
.help-text {
  margin-top: 15px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  font-style: italic;
  font-family: 'IBM Plex Mono', monospace;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* === ANIMATION FADE-IN === */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .container {
    padding: 2rem;
    width: 95%;
  }
  
  h1 {
    font-size: 1.4rem;
  }
  
  .buttons {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  button {
    width: 100%;
  }
}

/* === SUPPRESSION DE L'ANCIENNE BULLE === */
.bubble {
  display: none;
}


/* === VIDÉO D'ANIMATION === */
.typing-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -140%); /* Cachée en bas du container */
  width: min(400px, 80vw); /* Responsive width */
  height: auto;
  z-index: 5; /* Derrière le container */
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
  filter: brightness(1.3) contrast(1)

}

.typing-video.show {
  transform: translate(-50%, -193%); /* Se révèle au-dessus du container */
  opacity: 1;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
  .typing-video {
    width: min(300px, 70vw);
  }
  
  .typing-video.show {
    transform: translate(-50%, -255%);
  }
}

/* === FOND AVEC GIF FLOU === */

textarea {
  display: block;              /* pour éviter l'effet inline centré */
  margin: 0 auto 1.5rem auto;  /* centrage horizontal + espace bas */
  box-sizing: border-box;      /* évite dépassements */
}