/* =====================================================
   DOT-APP - Styles CSS Ultra-Épurés et Futuristes
   Design minimaliste avec particules et couleurs subtiles
   ===================================================== */

/* Variables CSS pour la cohérence des couleurs */
:root {
  /* Couleurs principales - Palette subtile */
  --primary-color: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;

  /* Couleurs secondaires */
  --secondary-color: #6366f1;
  --accent-color: #0891b2;

  /* Couleurs de fond - Palette légèrement assombrie */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.95);
  --bg-overlay: rgba(0, 0, 0, 0.03);

  /* Couleurs de texte - Palette plus contrastée */
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  /* Couleurs de statut */
  --success-color: #047857;
  --error-color: #b91c1c;
  --warning-color: #b45309;

  /* Ombres et effets - Plus prononcées */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);

  /* Bordures */
  --border-radius: 20px;
  --border-radius-lg: 32px;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.04);

  /* Transitions */
  --transition-fast: 0.2s ease-in-out;
  --transition-normal: 0.4s ease-in-out;
  --transition-slow: 0.6s ease-in-out;
}

/* Reset et base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  font-weight: 400;
}

/* Animation de fond avec particules */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

/* Particules flottantes - Version futuriste */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.8;
  animation: float-futuristic 15s linear infinite;
  filter: blur(0.5px);
}

/* Particules de différentes tailles et couleurs */
.particle:nth-child(1) {
  width: 2px;
  height: 2px;
  background: linear-gradient(45deg, #1e40af, #3b82f6);
  left: 10%;
  animation-delay: 0s;
  animation-duration: 20s;
  box-shadow: 0 0 6px rgba(30, 64, 175, 0.6);
}
.particle:nth-child(2) {
  width: 3px;
  height: 3px;
  background: linear-gradient(45deg, #6366f1, #8b5cf6);
  left: 20%;
  animation-delay: 2s;
  animation-duration: 25s;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}
.particle:nth-child(3) {
  width: 1px;
  height: 1px;
  background: linear-gradient(45deg, #0891b2, #06b6d4);
  left: 30%;
  animation-delay: 4s;
  animation-duration: 18s;
  box-shadow: 0 0 4px rgba(8, 145, 178, 0.7);
}
.particle:nth-child(4) {
  width: 4px;
  height: 4px;
  background: linear-gradient(45deg, #1e40af, #6366f1);
  left: 40%;
  animation-delay: 6s;
  animation-duration: 22s;
  box-shadow: 0 0 10px rgba(30, 64, 175, 0.4);
}
.particle:nth-child(5) {
  width: 2px;
  height: 2px;
  background: linear-gradient(45deg, #8b5cf6, #a855f7);
  left: 50%;
  animation-delay: 8s;
  animation-duration: 19s;
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.6);
}
.particle:nth-child(6) {
  width: 3px;
  height: 3px;
  background: linear-gradient(45deg, #06b6d4, #0891b2);
  left: 60%;
  animation-delay: 10s;
  animation-duration: 21s;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}
.particle:nth-child(7) {
  width: 1px;
  height: 1px;
  background: linear-gradient(45deg, #3b82f6, #1e40af);
  left: 70%;
  animation-delay: 12s;
  animation-duration: 23s;
  box-shadow: 0 0 4px rgba(59, 130, 246, 0.7);
}
.particle:nth-child(8) {
  width: 2px;
  height: 2px;
  background: linear-gradient(45deg, #a855f7, #8b5cf6);
  left: 80%;
  animation-delay: 14s;
  animation-duration: 20s;
  box-shadow: 0 0 6px rgba(168, 85, 247, 0.6);
}
.particle:nth-child(9) {
  width: 4px;
  height: 4px;
  background: linear-gradient(45deg, #6366f1, #3b82f6);
  left: 90%;
  animation-delay: 16s;
  animation-duration: 24s;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}
.particle:nth-child(10) {
  width: 1px;
  height: 1px;
  background: linear-gradient(45deg, #0891b2, #06b6d4);
  left: 15%;
  animation-delay: 18s;
  animation-duration: 17s;
  box-shadow: 0 0 4px rgba(8, 145, 178, 0.7);
}
.particle:nth-child(11) {
  width: 3px;
  height: 3px;
  background: linear-gradient(45deg, #1e40af, #6366f1);
  left: 25%;
  animation-delay: 20s;
  animation-duration: 26s;
  box-shadow: 0 0 8px rgba(30, 64, 175, 0.5);
}
.particle:nth-child(12) {
  width: 2px;
  height: 2px;
  background: linear-gradient(45deg, #8b5cf6, #a855f7);
  left: 35%;
  animation-delay: 22s;
  animation-duration: 19s;
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.6);
}
.particle:nth-child(13) {
  width: 1px;
  height: 1px;
  background: linear-gradient(45deg, #06b6d4, #0891b2);
  left: 45%;
  animation-delay: 24s;
  animation-duration: 22s;
  box-shadow: 0 0 4px rgba(6, 182, 212, 0.7);
}
.particle:nth-child(14) {
  width: 4px;
  height: 4px;
  background: linear-gradient(45deg, #3b82f6, #1e40af);
  left: 55%;
  animation-delay: 26s;
  animation-duration: 18s;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}
.particle:nth-child(15) {
  width: 2px;
  height: 2px;
  background: linear-gradient(45deg, #6366f1, #8b5cf6);
  left: 65%;
  animation-delay: 28s;
  animation-duration: 21s;
  box-shadow: 0 0 6px rgba(99, 102, 241, 0.6);
}
.particle:nth-child(16) {
  width: 3px;
  height: 3px;
  background: linear-gradient(45deg, #a855f7, #8b5cf6);
  left: 75%;
  animation-delay: 30s;
  animation-duration: 23s;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}
.particle:nth-child(17) {
  width: 1px;
  height: 1px;
  background: linear-gradient(45deg, #0891b2, #06b6d4);
  left: 85%;
  animation-delay: 32s;
  animation-duration: 20s;
  box-shadow: 0 0 4px rgba(8, 145, 178, 0.7);
}
.particle:nth-child(18) {
  width: 2px;
  height: 2px;
  background: linear-gradient(45deg, #1e40af, #3b82f6);
  left: 95%;
  animation-delay: 34s;
  animation-duration: 24s;
  box-shadow: 0 0 6px rgba(30, 64, 175, 0.6);
}
.particle:nth-child(19) {
  width: 4px;
  height: 4px;
  background: linear-gradient(45deg, #8b5cf6, #a855f7);
  left: 5%;
  animation-delay: 36s;
  animation-duration: 17s;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}
.particle:nth-child(20) {
  width: 3px;
  height: 3px;
  background: linear-gradient(45deg, #06b6d4, #0891b2);
  left: 85%;
  animation-delay: 38s;
  animation-duration: 25s;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

@keyframes float-futuristic {
  0% {
    transform: translateY(100vh) translateX(0px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  25% {
    transform: translateY(75vh) translateX(10px) rotate(90deg);
  }
  50% {
    transform: translateY(50vh) translateX(-5px) rotate(180deg);
  }
  75% {
    transform: translateY(25vh) translateX(15px) rotate(270deg);
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-20px) translateX(0px) rotate(360deg);
    opacity: 0;
  }
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.12;
  animation: float 40s ease-in-out infinite;
}

.orb-1 {
  width: 800px;
  height: 800px;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color)
  );
  top: -300px;
  left: -300px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: linear-gradient(45deg, var(--accent-color), var(--primary-light));
  top: 70%;
  right: -150px;
  animation-delay: -15s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: linear-gradient(
    45deg,
    var(--secondary-color),
    var(--accent-color)
  );
  bottom: -150px;
  left: 70%;
  animation-delay: -30s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg) scale(1);
    opacity: 0.12;
  }
  33% {
    transform: translateY(-60px) rotate(120deg) scale(1.08);
    opacity: 0.18;
  }
  66% {
    transform: translateY(30px) rotate(240deg) scale(0.92);
    opacity: 0.08;
  }
}

/* Container principal */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 4rem;
  padding: 2rem 0;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.logo-icon {
  font-size: 4rem;
  animation: pulse 4s ease-in-out infinite;
  filter: drop-shadow(0 6px 12px rgba(30, 64, 175, 0.2));
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 6px 12px rgba(30, 64, 175, 0.2));
  }
  50% {
    transform: scale(1.08);
    filter: drop-shadow(0 12px 24px rgba(30, 64, 175, 0.3));
  }
}

.logo-text {
  font-size: 4rem;
  font-weight: 900;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.tagline {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* Contenu principal */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  min-height: calc(100vh - 300px);
}

/* Carte de connexion */
.login-card {
  background: var(--bg-glass);
  backdrop-filter: blur(60px);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  padding: 4rem;
  text-align: center;
  box-shadow: var(--shadow-2xl);
  transition: var(--transition-slow);
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-color),
    transparent
  );
  opacity: 0;
  transition: var(--transition-slow);
}

.login-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 40px 80px -12px rgba(0, 0, 0, 0.12);
}

.login-card:hover::before {
  opacity: 1;
}

.card-header {
  margin-bottom: 3rem;
}

.card-title {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  background: linear-gradient(
    135deg,
    var(--text-primary),
    var(--primary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.card-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 450px;
  margin: 0 auto;
  font-weight: 300;
  line-height: 1.6;
}

/* Alertes */
.alert {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-radius: var(--border-radius);
  margin-bottom: 3rem;
  font-weight: 500;
  backdrop-filter: blur(30px);
}

.alert-error {
  background: rgba(185, 28, 28, 0.1);
  border: 1px solid rgba(185, 28, 28, 0.2);
  color: var(--error-color);
}

.alert-success {
  background: rgba(4, 120, 87, 0.1);
  border: 1px solid rgba(4, 120, 87, 0.2);
  color: var(--success-color);
}

.alert-icon {
  font-size: 1.3rem;
}

/* Formulaire de connexion */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.label-icon {
  font-size: 1.2rem;
  opacity: 0.7;
}

.form-input {
  padding: 1.5rem 2rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: var(--transition-normal);
  backdrop-filter: blur(30px);
  font-weight: 400;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 6px rgba(30, 64, 175, 0.1);
  background: var(--bg-glass);
  transform: translateY(-2px);
}

.form-input::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

/* Groupe de mot de passe */
.password-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.password-toggle {
  position: absolute;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.password-toggle:hover {
  background: var(--bg-overlay);
  color: var(--text-primary);
  transform: scale(1.15);
}

.toggle-icon {
  font-size: 1.2rem;
}

/* Options du formulaire */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.checkbox-input {
  display: none;
}

.checkbox-custom {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  position: relative;
  transition: var(--transition-fast);
  background: var(--bg-card);
}

.checkbox-input:checked + .checkbox-custom {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: scale(1.15);
}

.checkbox-input:checked + .checkbox-custom::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.9rem;
  font-weight: bold;
}

.checkbox-text {
  user-select: none;
}

/* Bouton de connexion */
.btn-login {
  margin-top: 2rem;
  width: 100%;
  justify-content: center;
  padding: 1.75rem 2.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
}

.btn-login::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: var(--transition-normal);
}

.btn-login:hover::before {
  left: 100%;
}

/* Informations de connexion */
.login-info {
  margin-bottom: 3rem;
}

.info-card {
  background: var(--bg-overlay);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: left;
  backdrop-filter: blur(30px);
}

.info-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.info-content {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  font-weight: 400;
}

.info-content p {
  margin-bottom: 0.75rem;
}

.info-content strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Grille de statuts */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--bg-overlay);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-light);
  transition: var(--transition-normal);
  backdrop-filter: blur(30px);
}

.status-item:hover {
  background: var(--bg-glass);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.status-icon {
  font-size: 1.8rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border-radius: 50%;
  border: 1px solid var(--border-light);
}

.status-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.status-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.status-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.status-success {
  color: var(--success-color);
}

.status-error {
  color: var(--error-color);
}

/* Boutons */
.btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 2.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition-normal);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: var(--transition-normal);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: white;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  justify-content: center;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 25px 35px -5px rgba(30, 64, 175, 0.25);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  min-width: 200px;
  justify-content: center;
}

.btn-secondary:hover {
  background: var(--bg-card);
  transform: translateY(-3px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.btn-group {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-icon {
  font-size: 1.3rem;
}

.btn-arrow {
  font-size: 1.3rem;
  transition: var(--transition-fast);
}

.btn:hover .btn-arrow {
  transform: translateX(8px);
}

/* Footer */
.footer {
  margin-top: 3rem;
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--border-light);
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 400;
}

.footer-separator {
  margin: 0 0.75rem;
  color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 2rem 1rem;
  }

  .logo-text {
    font-size: 3rem;
  }

  .card-title {
    font-size: 2.5rem;
  }

  .login-card {
    padding: 3rem 2rem;
    margin: 0 1rem;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .btn-group {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .logo {
    flex-direction: column;
    gap: 1rem;
  }

  .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  .btn-primary {
    min-width: 240px;
  }

  .btn-secondary {
    min-width: 180px;
  }

  .login-card {
    padding: 2.5rem 1.5rem;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

/* Animations d'entrée */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card {
  animation: fadeInUp 0.8s ease-out;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}
