body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f3f4f6;
  margin: 0;
  padding-top: 120px;
  color: #1f2937;
}

/* === NAVIGATION === */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #1e3a8a;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

#logo img {
  height: 100px;
  width: auto;
}

#title {
  font-size: 28px;
  font-weight: bold;
  flex-grow: 1;
  text-align: center;
}

/* Titre principal */
#titre {
  text-align: center;
  font-size: 1.6em;
  margin: 30px 0 10px;
  color: #34495e;
}

/* Formulaire */
.card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.card-body {
  padding: 30px;
  background-color: #ffffff;
  border-radius: 10px;
}

/* Champs du formulaire */
.form-group label,
.input-mdp label {
  font-weight: 600;
  margin-bottom: 5px;
}

.form-control {
  border-radius: 6px;
  padding: 10px;
  font-size: 1em;
  border: 1px solid #ccc;
  transition: border-color 0.3s;
}

.form-control:focus {
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52,152,219,0.2);
}

/* Bouton */
button.btn-danger {
  margin-top: 15px;
  background-color: #007BFF;
  border: none;
  padding: 10px 20px;
  font-size: 1em;
  border-radius: 6px;
  width: 100%;
  transition: background-color 0.3s;
}

button.btn-danger:hover {
  background-color: #0467d1;
}

/* === STYLES POUR LES MESSAGES D'ERREUR === */
.error-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(255, 107, 107, 0.3);
  color: white;
  text-align: center;
  z-index: 10000;
  min-width: 350px;
  max-width: 90vw;
  animation: errorSlideIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.error-container::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #ff6b6b, #ee5a24, #ff6b6b);
  border-radius: 22px;
  z-index: -1;
  animation: errorGlow 2s ease-in-out infinite alternate;
}

.error-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  animation: errorBounce 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.error-content h3 {
  margin: 0 0 10px 0;
  font-size: 1.4rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.error-content p {
  margin: 0;
  font-size: 1rem;
  opacity: 0.9;
  line-height: 1.4;
}

.error-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  animation: errorPulse 2s ease-out infinite;
  pointer-events: none;
}

.error-shake {
  animation: errorSlideIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55), 
             errorShake 0.5s ease-in-out 0.6s;
}

/* Animations */
@keyframes errorSlideIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes errorShake {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
  25% { transform: translate(-50%, -50%) rotate(-2deg); }
  75% { transform: translate(-50%, -50%) rotate(2deg); }
}

@keyframes errorBounce {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes errorGlow {
  0% { opacity: 0.8; }
  100% { opacity: 1; }
}

@keyframes errorPulse {
  0% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

/* Overlay sombre derrière l'erreur */
.error-container + * {
  position: relative;
}

.error-container + *::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  animation: fadeIn 0.3s ease-out;
  pointer-events: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes errorSlideOut {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.8);
  }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Responsive */
@media (max-width: 576px) {
  #nav {
    flex-direction: column;
    align-items: flex-start;
  }

  #logo img {
    height: 60px;
  }

  #title {
    font-size: 1.5em;
    margin-top: 10px;
  }

  .card-body {
    padding: 20px;
  }

  #titre {
    font-size: 1.4em;
    margin-top: 20px;
  }

  .error-container {
    min-width: 300px;
    padding: 25px;
  }

  .error-icon {
    font-size: 2.5rem;
  }

  .error-content h3 {
    font-size: 1.2rem;
  }

  .error-content p {
    font-size: 0.9rem;
  }
}