/* RESET ET BASES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
  transition: all 0.5s ease;
}

body.dark-mode {
  background-color: #121212;
  color: #f0f0f0;
}

/* ANIMATIONS */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(106, 13, 173, 0.7); }
  70% { box-shadow: 0 0 15px 7px rgba(106, 13, 173, 0); }
  100% { box-shadow: 0 0 0 0 rgba(106, 13, 173, 0); }
}

@keyframes slideIn {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeInUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* HEADER AMÉLIORÉ */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #4b0082, #6a0dad, #9b59b6);
  color: white;
  padding: 15px 5%;
  width: 100%;
  height: 80px;
  position: fixed;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.logo h2 {
  font-size: 1.8rem;
  background: linear-gradient(to right, #fff, #e0e0e0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 30px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.nav-link.active {
  background: white;
  color: #6a0dad;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* SECTION DE CONNEXION */
.intro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5%;
  margin-top: 100px;
  padding: 5%;
  min-height: calc(100vh - 100px);
}

.image-container {
  flex: 1;
  max-width: 50%;
  position: relative;
  animation: slideIn 1s ease-out;
}

.image-container img {
  width: 100%;
  height: 70vh;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.5s ease;
}

.image-container:hover img {
  transform: scale(1.03);
}

.image-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.5), transparent);
  border-radius: 20px;
}

.form-box {
  flex: 1;
  max-width: 450px;
  background: rgba(255, 255, 255, 0.95);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  animation: fadeInUp 1s ease-out 0.3s forwards;
  opacity: 0;
  transform: translateY(30px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

body.dark-mode .form-box {
  background: rgba(30, 30, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-box h2 {
  text-align: center;
  color: #6a0dad;
  margin-bottom: 2rem;
  font-size: 2rem;
  position: relative;
}

.form-box h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: #ff6b6b;
}

/* CHAMPS DE FORMULAIRE */
.input-group {
  margin-bottom: 1.8rem;
  position: relative;
}

.input-group label {
  position: absolute;
  top: -10px;
  left: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6a0dad;
  background: #fff;
  padding: 0 8px;
  z-index: 1;
  transition: all 0.3s ease;
}

body.dark-mode .input-group label {
  background: #1e1e1e;
}

.input-group input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #f9f9f9;
  font-size: 1rem;
  transition: all 0.3s ease;
}

body.dark-mode .input-group input {
  background: #2e2e2e;
  border-color: #444;
  color: #f0f0f0;
}

.input-group input:focus {
  border-color: #6a0dad;
  box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.2);
  transform: translateY(-3px);
  outline: none;
}

/* BOUTON CONNEXION */
.btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #6a0dad, #4b0082);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(106, 13, 173, 0.3);
}

.btn:hover {
  background: linear-gradient(135deg, #4b0082, #6a0dad);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(106, 13, 173, 0.4);
  animation: pulse 1.5s infinite;
}

.btn::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: 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* LIEN INSCRIPTION */
.form-box p {
  text-align: center;
  margin-top: 1.5rem;
  color: #666;
}

body.dark-mode .form-box p {
  color: #bbb;
}

.form-box a {
  color: #6a0dad;
  text-decoration: none;
  font-weight: 600;
  position: relative;
}

.form-box a:hover {
  color: #ff6b6b;
}

.form-box a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #ff6b6b;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.form-box a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1200px) {
  .intro {
    gap: 3rem;
  }
  
  .form-box {
    padding: 2.5rem;
  }
}

@media (max-width: 992px) {
  .intro {
    flex-direction: column;
    margin-top: 120px;
  }
  
  .image-container {
    max-width: 100%;
    margin-bottom: 3rem;
  }
  
  .image-container img {
    height: 50vh;
  }
  
  .form-box {
    max-width: 100%;
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .form-box {
    padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }
  
  .input-group input {
    padding: 0.9rem;
  }
  
  .btn {
    padding: 0.9rem;
  }
}

@media (max-width: 576px) {
  .form-box {
    padding: 1.5rem;
  }
  
  .form-box h2 {
    font-size: 1.6rem;
  }
  
  .input-group input {
    padding: 0.8rem;
  }
}