/* ======== CSS pour les pages d'authentification ======== */

/* Variables communes héritées */
:root {
  --primary-color: #0038ff;
  --primary-dark: #001c99;
  --secondary-color: #00d4ff;
  --accent-color: #ff0080;
  --bg-dark: #0a0a0f;
  --bg-darker: #070709;
  --bg-card: #141419;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #666666;
  --gradient-primary: linear-gradient(135deg, #0038ff, #00d4ff);
  --gradient-secondary: linear-gradient(135deg, #ff0080, #ff4081);
  --shadow-primary: 0 10px 40px rgba(0, 56, 255, 0.3);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --border-radius: 12px;
  --border-radius-lg: 20px;
  --success-color: #00ff88;
  --warning-color: #ffaa00;
  --error-color: #ff4757;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Header identique aux autres pages */
header {
  background: rgba(7, 7, 9, 0.95);
  backdrop-filter: blur(20px);
  padding: 15px 0;
  border-bottom: 1px solid rgba(0, 56, 255, 0.2);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo-link:hover {
  transform: scale(1.05);
}

.logo {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 20px rgba(0, 56, 255, 0.4);
}

.logo-text {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: rgba(0, 56, 255, 0.1);
  transform: translateY(-2px);
}

/* Main content */
.auth-main {
  padding-top: 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: 
    radial-gradient(circle at 20% 80%, rgba(0, 56, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
}

.auth-container {
  width: 100%;
  max-width: 500px;
  padding: 20px;
}

.auth-card {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0, 56, 255, 0.2);
  backdrop-filter: blur(20px);
}

.auth-header {
  text-align: center;
  margin-bottom: 40px;
}

.auth-logo {
  margin-bottom: 20px;
}

.auth-logo img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 20px rgba(0, 56, 255, 0.4);
}

.auth-header h1 {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  margin-bottom: 10px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Formulaires */
.auth-form {
  margin-bottom: 30px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input {
  width: 100%;
  padding: 15px;
  background: var(--bg-darker);
  border: 2px solid rgba(0, 56, 255, 0.3);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(0, 56, 255, 0.3);
  transform: translateY(-2px);
}

.form-group input:valid {
  border-color: var(--success-color);
}

.form-group input:invalid:not(:placeholder-shown) {
  border-color: var(--error-color);
}

.input-help {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 5px;
  font-style: italic;
}

/* Champs mot de passe avec toggle */
.password-input {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: var(--text-primary);
}

/* Indicateur de force du mot de passe */
.password-strength {
  margin-top: 10px;
}

.strength-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-darker);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 5px;
}

.strength-fill {
  height: 100%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.strength-fill.weak {
  background: var(--error-color);
}

.strength-fill.medium {
  background: var(--warning-color);
}

.strength-fill.strong {
  background: var(--success-color);
}

.strength-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Options de formulaire */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

/* Checkbox personnalisé */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
}

.checkbox-wrapper input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  background: var(--bg-darker);
  border: 2px solid rgba(0, 56, 255, 0.3);
  border-radius: 4px;
  margin-right: 10px;
  position: relative;
  transition: all 0.3s ease;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.forgot-password, .terms-link {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.forgot-password:hover, .terms-link:hover {
  color: var(--primary-color);
}

/* Boutons d'authentification */
.btn-auth {
  width: 100%;
  padding: 15px;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--border-radius);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-auth:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

.btn-auth:active {
  transform: translateY(0);
}

.btn-auth:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Footer du formulaire */
.auth-footer {
  text-align: center;
  margin-bottom: 30px;
}

.auth-footer p {
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.auth-switch {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.auth-switch:hover {
  color: var(--primary-color);
}

/* Divider */
.divider {
  text-align: center;
  margin: 30px 0;
  position: relative;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0, 56, 255, 0.3);
}

.divider span {
  background: var(--bg-card);
  padding: 0 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Authentification sociale */
.social-auth {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.btn-social {
  width: 100%;
  padding: 15px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  background: transparent;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-google:hover {
  border-color: #db4437;
  background: rgba(219, 68, 55, 0.1);
  transform: translateY(-2px);
}

.btn-discord:hover {
  border-color: #7289da;
  background: rgba(114, 137, 218, 0.1);
  transform: translateY(-2px);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  max-width: 400px;
  width: 90%;
  border: 1px solid rgba(0, 56, 255, 0.2);
  box-shadow: var(--shadow-card);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.modal-body p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Notifications */
.notification {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 3000;
  background: var(--bg-card);
  border-left: 4px solid var(--primary-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  padding: 15px 20px;
  min-width: 300px;
  max-width: 400px;
  animation: slideInRight 0.3s ease;
}

.notification-success {
  border-left-color: var(--success-color);
}

.notification-error {
  border-left-color: var(--error-color);
}

.notification-warning {
  border-left-color: var(--warning-color);
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}

.notification-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.notification-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .auth-card {
    padding: 30px 20px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .form-options {
    flex-direction: column;
    align-items: flex-start;
  }
  
  nav ul {
    gap: 15px;
  }
  
  .nav-link {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
  
  .notification {
    right: 10px;
    left: 10px;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .container {
    width: 95%;
  }
  
  .auth-header h1 {
    font-size: 1.6rem;
  }
  
  .nav-link span {
    display: none;
  }
}