/* === Base === */
body {
  background: radial-gradient(circle at top, #1a1b25 0%, #0f1017 80%);
  color: #e8e9f1;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 16px;
  line-height: 1.6;
}

/* === Titres === */
h1, h2, h3 {
  font-weight: 800;
  text-align: center;
  background: linear-gradient(90deg, #8f5aff, #22d3ee 80%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1.8px;
  margin-bottom: 0.6em;
  text-shadow: 0 2px 20px rgba(143, 90, 255, 0.2);
  transition: transform 0.3s ease;
}

h1:hover, h2:hover {
  transform: scale(1.02);
}

/* === Blocs principaux === */
form, .glass-block {
  background: rgba(25, 26, 34, 0.65);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.15), 0 0 0 1px rgba(143, 90, 255, 0.25);
  border: 1px solid rgba(143, 90, 255, 0.25);
  padding: 40px 32px;
  backdrop-filter: blur(14px) saturate(140%);
  margin: 30px auto;
  width: 100%;
  max-width: 440px;
  animation: fadeIn 0.5s ease forwards;
}


/* === Inputs bien centrés et harmonieux === */
input, textarea, select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: rgba(50, 52, 68, 0.85);
  color: #f9f9ff;
  border-radius: 10px;
  border: 2px solid transparent;
  font-family: inherit;
  font-size: 1.05em;
  padding: 12px 16px;
  margin: 0 auto 18px auto;
  text-align: left;
  transition: all 0.25s ease;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* Focus stylé */
input:focus, textarea:focus, select:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 10px #22d3ee99, 0 0 25px #8f5aff33;
  outline: none;
}

/* Optionnel : alignement parfait du texte dans le champ */
input::placeholder,
textarea::placeholder,
select::placeholder {
  color: #d2d2ddaa;
  text-align: left;
}

/* === Boutons === */
button {
  background: linear-gradient(90deg, #7c3aed 40%, #22d3ee 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.08em;
  border-radius: 10px;
  border: none;
  padding: 14px 0;
  width: 100%;
  margin-top: 10px;
  cursor: pointer;
  box-shadow: 0 4px 25px rgba(124, 58, 237, 0.35);
  transition: all 0.25s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(34, 211, 238, 0.45);
  background: linear-gradient(90deg, #22d3ee 40%, #7c3aed 100%);
}

/* === Liens === */
a {
  color: #22d3ee;
  text-decoration: none;
  position: relative;
  transition: color 0.25s;
}
a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, #8f5aff, #22d3ee);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}
a:hover {
  color: #8f5aff;
}
a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #14141d;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #22d3ee, #7c3aed);
  border-radius: 6px;
}

/* === Messages d’erreur / alertes === */
.error, .alert, div[style*="color:red"] {
  background: rgba(143, 90, 255, 0.12);
  color: #ffe7fd;
  border-left: 4px solid #fb36a3;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 20px;
  box-shadow: 0 3px 16px rgba(124, 58, 237, 0.25);
}

/* === Style geek (titre) === */
.title-geek {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.4em;
  letter-spacing: 3px;
  color: #8f5aff;
  border-bottom: 2px dashed #22d3eeaa;
  padding-bottom: 10px;
  margin-bottom: 20px;
  text-align: center;
}

/* === Effet glass plus propre === */
.glass-effect {
  background: rgba(36, 38, 55, 0.25);
  box-shadow: 0 8px 32px rgba(143, 90, 255, 0.25);
  border-radius: 20px;
  backdrop-filter: blur(16px) saturate(160%);
  border: 1.5px solid rgba(34, 211, 238, 0.4);
  padding: 30px;
  transition: transform 0.3s ease;
}
.glass-effect:hover {
  transform: scale(1.01);
}

/* === Animation === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Responsive === */
@media (max-width: 650px) {
  h1, h2 { font-size: 1.5em; }
  form, .glass-block { padding: 20px; }
  body { padding: 20px 10px; }
}

/* === Messages en ligne horizontale === */
.message-container {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  z-index: 9999;
}

/* Style des messages individuels */
.message {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  line-height: 1.4;
  backdrop-filter: blur(12px) saturate(160%);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  border-left: 4px solid transparent;
  min-width: 250px;
  max-width: 320px;
  animation: slideInToast 0.4s ease forwards;
  transition: all 0.3s ease;
  text-align: center;
}

/* Variantes */
.message.error {
  background: rgba(251, 54, 163, 0.15);
  border-left-color: #fb36a3;
  color: #ffe8f9;
}
.message.success {
  background: rgba(34, 211, 238, 0.15);
  border-left-color: #22d3ee;
  color: #ddfaff;
}
.message.warning {
  background: rgba(255, 200, 50, 0.18);
  border-left-color: #fbbf24;
  color: #fff7d8;
}

/* Bouton de fermeture */
.message .close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  font-size: 1em;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}
.message .close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* Animation d’apparition fluide */
@keyframes slideInToast {
  from { opacity: 0; transform: translateY(-10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.message.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  height: 0;
  margin: 0;
  padding: 0;
  border: none;
  transition: all 0.35s ease;
}