/* Variables CSS - Design EduPortal moderne */
:root {
  --primary-color: #3b82f6;
  --primary-light: #60a5fa;
  --primary-dark: #2563eb;
  --secondary-color: #06b6d4;
  --accent-color: #8b5cf6;
  --light-color: #ffffff;
  --dark-color: #374151;
  --gray-light: #f9fafb;
  --gray-medium: #e5e7eb;
  --gray-dark: #6b7280;
  --success-color: #3b82f6;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --border-radius: 16px;
  --border-radius-sm: 12px;
  --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --box-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset et styles de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
}

body {
  background: linear-gradient(135deg, #f0f9f4 0%, #ecfdf5 100%);
  color: var(--dark-color);
  line-height: 1.5;
  min-height: 100vh;
  font-weight: 400;
}

/* Container principal */
.login-container {
  display: block;
  min-height: 100vh;
}

/* Section de formulaires */
.form-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--light-color);
  width: 50%;
  min-height: 100vh;
  overflow-y: auto;
}

.form-card {
  width: 100%;
  max-width: 480px;
  background: var(--light-color);
  border-radius: var(--border-radius);
  padding: 40px;
  box-shadow: var(--box-shadow-lg);
  border: 1px solid var(--gray-medium);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

.logo-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #2563eb 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.logo-text {
  font-size: 1.8rem;
  margin-left: 12px;
  font-weight: 600;
  color: var(--dark-color);
}

.form-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 8px;
  text-align: center;
}

.form-subtitle {
  color: var(--gray-dark);
  font-size: 1rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 30px;
}

/* Tabs */
.tabs {
  display: flex;
  background: var(--gray-light);
  border-radius: var(--border-radius-sm);
  padding: 4px;
  margin-bottom: 30px;
}

.tab {
  flex: 1;
  padding: 12px 16px;
  text-align: center;
  cursor: pointer;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  transition: var(--transition);
  color: var(--gray-dark);
}

.tab.active {
  background: var(--light-color);
  color: var(--primary-color);
  box-shadow: var(--box-shadow);
}

/* Form controls */
.form-control {
  border: 1px solid var(--gray-medium);
  border-radius: var(--border-radius-sm);
  padding: 14px 16px;
  font-size: 1rem;
  transition: var(--transition);
  margin-bottom: 20px;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(10, 92, 54, 0.1);
}

.form-label {
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--dark-color);
}

.form-select {
  border: 1px solid var(--gray-medium);
  border-radius: var(--border-radius-sm);
  padding: 14px 16px;
  font-size: 1rem;
  transition: var(--transition);
  margin-bottom: 20px;
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(10, 92, 54, 0.1);
}

/* Type selection cards */
.type-selection {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 25px;
}

.type-card {
  border: 2px solid var(--gray-medium);
  border-radius: var(--border-radius-sm);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--light-color);
}

.type-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.type-card.selected {
  border-color: var(--primary-color);
  background: rgba(10, 92, 54, 0.05);
}

.type-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.type-name {
  font-weight: 600;
  margin-bottom: 5px;
}

.type-desc {
  font-size: 0.8rem;
  color: var(--gray-dark);
}

/* Buttons */
.btn {
  border-radius: var(--border-radius-sm);
  padding: 14px 20px;
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  cursor: pointer;
}

.btn-success {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.btn-success:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-outline-success {
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  background: transparent;
}

.btn-outline-success:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

/* Options supplémentaires */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.link {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
}

.link:hover {
  text-decoration: underline;
}

.divider {
  height: 1px;
  background: var(--gray-medium);
  margin: 30px 0;
  position: relative;
  text-align: center;
}

.divider-text {
  background: var(--light-color);
  padding: 0 15px;
  color: var(--gray-dark);
  font-size: 0.9rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Section illustration */
.illustration-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
  position: fixed;
  top: 0;
  right: 0;
  width: 50%;
  height: 100vh;
  overflow: hidden;
}

.illustration-content {
  max-width: 600px;
  text-align: center;
}

.illustration-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--light-color);
  margin-bottom: 20px;
  line-height: 1.2;
}

.illustration-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
  line-height: 1.6;
}

/* Photos d'étudiants dans les rectangles */
.devices-container {
  position: relative;
  height: 300px;
  margin: 40px 0;
}

.student-photo {
  position: absolute;
  border-radius: 16px;
  box-shadow: var(--box-shadow-lg);
  overflow: hidden;
  transition: var(--transition);
}

.student-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Positions des photos */
.laptop {
  width: 280px;
  height: 180px;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.tablet {
  width: 160px;
  height: 220px;
  top: 60px;
  left: 20%;
  z-index: 2;
}

.phone {
  width: 100px;
  height: 180px;
  top: 80px;
  right: 20%;
  z-index: 2;
}

/* Statistiques */
.stats-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--light-color);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Form steps */
.form-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
}

.form-steps::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gray-medium);
  z-index: 1;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gray-medium);
  color: var(--gray-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 8px;
  transition: var(--transition);
}

.step.active .step-number {
  background: var(--primary-color);
  color: white;
}

.step.completed .step-number {
  background: var(--primary-color);
  color: white;
}

.step.completed .step-number::after {
  content: "✓";
}

.step-label {
  font-size: 0.8rem;
  color: var(--gray-dark);
  text-align: center;
}

.step.active .step-label {
  color: var(--primary-color);
  font-weight: 500;
}

/* Form pages */
.form-page {
  display: none;
}

.form-page.active {
  display: block;
  animation: fadeInUp 0.4s ease-out;
}

/* Form tabs */
.form-tab {
  display: none;
}

.form-tab.active {
  display: block;
  animation: fadeInUp 0.4s ease-out;
}

/* Responsive */
@media (max-width: 1024px) {
  .login-container {
    display: block;
  }

  .form-section {
    width: 100%;
    min-height: auto;
  }

  .illustration-section {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 50vh;
    padding: 60px 40px;
  }
}

@media (max-width: 768px) {
  .form-section,
  .illustration-section {
    padding: 30px 20px;
  }

  .form-card {
    padding: 30px 20px;
  }

  .type-selection {
    grid-template-columns: 1fr;
  }

  .devices-container {
    height: 250px;
  }

  .laptop {
    width: 220px;
    height: 140px;
  }

  .tablet {
    width: 130px;
    height: 180px;
    left: 10%;
  }

  .phone {
    width: 80px;
    height: 140px;
    right: 10%;
  }

  .stats-container {
    flex-direction: column;
    gap: 20px;
  }

  .form-steps {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

  .form-steps::before {
    display: none;
  }

  .step {
    flex-direction: row;
    gap: 10px;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease-out;
}

/* Alertas */
.alert {
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.alert-success {
  background: rgba(10, 92, 54, 0.1);
  border-color: rgba(10, 92, 54, 0.2);
  color: var(--primary-dark);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--danger-color);
}

/* Progress bar */
.progress {
  height: 6px;
  background: var(--gray-medium);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 30px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #a78bfa 100%);
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* ===== HERO IMAGE SECTION ===== */

/* Cacher l'ancien système de photos */
.devices-container,
.student-photo {
  display: none !important;
}

/* Container pour l'image principale */
.hero-image-container {
  position: relative;
  margin: 30px auto;
  max-width: 500px;
}

.hero-image {
  width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  animation: heroFloat 4s ease-in-out infinite;
  background: transparent !important;
}

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

/* Badges flottants */
.floating-badge {
  position: absolute;
  background: white;
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  color: #374151;
  animation: badgeFloat 3s ease-in-out infinite;
  z-index: 10;
}

.floating-badge.badge-1 {
  top: 8%;
  left: -80px;
}

.floating-badge.badge-2 {
  top: 35%;
  right: -90px;
}

.floating-badge.badge-3 {
  bottom: 20%;
  left: -50px;
}

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

.floating-badge i {
  font-size: 1.1rem;
}

.floating-badge.badge-1 i {
  color: #f59e0b;
}
.floating-badge.badge-2 i {
  color: #8b5cf6;
}
.floating-badge.badge-3 i {
  color: #3b82f6;
}

/* Stats améliorées */
.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--light-color);
  margin-bottom: 5px;
}

.stat-item {
  text-align: center;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

/* Responsive hero */
@media (max-width: 1024px) {
  .hero-image-container {
    max-width: 320px;
  }

  .floating-badge {
    display: none;
  }

  .illustration-section {
    position: relative;
    width: 100%;
    height: auto;
  }

  .form-section {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .hero-image-container {
    max-width: 260px;
  }
}

.hero-image-container {
  background: transparent !important;
  box-shadow: none !important;
}
.hero-image {
  background: transparent !important;
  box-shadow: none !important;
}

.stat-item:nth-child(1) {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: white;
}

.stat-item:nth-child(2) {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: white;
}

.stat-item:nth-child(3) {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: white;
}
