/* CSS moderne pour les pages de connexion et inscription */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
}

main {
  padding: 40px 20px;
  max-width: 900px;
  margin: auto;
  min-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

h1 {
  color: #fff;
  margin-bottom: 40px;
  text-align: center;
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Formulaire de connexion moderne - même style que contact */
.login-form {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 40px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

.login-form:hover {
  transform: translateY(-5px);
  box-shadow: 0 35px 70px rgba(138, 43, 226, 0.4);
}

.login-form label {
  display: block;
  font-size: 16px;
  color: #fff;
  margin-bottom: 8px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.login-form input {
  width: 100%;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  font-size: 16px;
  color: #fff;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.login-form input:focus {
  outline: none;
  border-color: rgba(138, 43, 226, 0.8);
  box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
  transform: translateY(-2px);
}

.login-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.login-form button {
  width: 100%;
  background: linear-gradient(135deg, #8a2be2, #4b0082);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(138, 43, 226, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  margin: 20px 0;
}

.login-form button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.login-form button:hover::before {
  left: 100%;
}

.login-form button:hover {
  background: linear-gradient(135deg, #9932cc, #6a0dad);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 20px 40px rgba(138, 43, 226, 0.6);
}

/* Lien pour créer un compte */
.create-account {
  text-align: center;
  margin-top: 25px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
}

.create-account a {
  color: #ff6b6b;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.create-account a:hover {
  color: #4ecdc4;
  text-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}

/* Modal moderne */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: rgba(75, 20, 140, 0.95);
  backdrop-filter: blur(15px);
  margin: 10% auto;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-content h2 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 2rem;
  text-align: center;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-content p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  text-align: center;
  font-size: 16px;
}

.modal-content a {
  color: #ff6b6b;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.modal-content a:hover {
  color: #4ecdc4;
  text-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}

.close {
  color: rgba(255, 255, 255, 0.8);
  float: right;
  font-size: 32px;
  font-weight: bold;
  position: absolute;
  right: 20px;
  top: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close:hover,
.close:focus {
  color: #ff6b6b;
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

/* Responsive design */
@media (max-width: 768px) {
  main {
    padding: 20px 15px;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  .login-form {
    padding: 30px 25px;
  }
  
  .modal-content {
    margin: 20% auto;
    padding: 30px 20px;
  }
}

/* Classes d'animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Effets de particules flottantes */
.floating-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.1;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.3;
  }
}

/* Popup d'erreur moderne */
.error-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.error-modal:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.error-modal.hidden {
  opacity: 0;
  visibility: hidden;
}

.error-modal-content {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 40px;
  text-align: center;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  animation: modalSlideIn 0.4s ease-out;
  position: relative;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.error-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.error-modal-content h3 {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.error-modal-content p {
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 15px;
  opacity: 0.9;
}

.signup-link {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 15px;
  margin: 20px 0;
}

.signup-btn {
  color: #4ecdc4;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.signup-btn:hover {
  color: #ff6b6b;
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.close-btn {
  background: linear-gradient(135deg, #8a2be2, #4b0082);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.close-btn:hover {
  background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(138, 43, 226, 0.4);
}

/* Responsive pour la popup */
@media (max-width: 768px) {
  .error-modal-content {
    padding: 30px 20px;
    margin: 20px;
  }
  
  .error-modal-content h3 {
    font-size: 1.5rem;
  }
  
  .error-modal-content p {
    font-size: 1rem;
  }
}