/**
 * Styles pour la page de création de compte
 * Version 2.0 - Design moderne et responsive
 */

/* ========================================
   VARIABLES CSS
   ======================================== */
:root {
  --primary-color: #2ecc40;
  --primary-dark: #27ae60;
  --primary-light: #58d68d;
  --secondary-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #3498db;
  --warning-color: #f39c12;
  --success-color: #28a745;
  --dark-color: #1a472a;
  --light-bg: #f8f9fa;
  --border-color: #e9ecef;
  --text-color: #333;
  --text-muted: #6c757d;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 50px;
}

/* ========================================
   HERO SECTION
   ======================================== */
.signup-hero {
  background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 100%);
  color: white;
  padding: 170px 0 80px;
  position: relative;
  overflow: hidden;
}

.signup-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.signup-hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.signup-hero p {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
}

/* Particles animées */
.signup-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.signup-particle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  animation: particleFloat 8s ease-in-out infinite;
}

.signup-particle:nth-child(1) { top: 15%; left: 10%; animation-delay: 0s; width: 8px; height: 8px; }
.signup-particle:nth-child(2) { top: 55%; left: 15%; animation-delay: 1.5s; width: 12px; height: 12px; }
.signup-particle:nth-child(3) { top: 25%; left: 75%; animation-delay: 0.5s; width: 6px; height: 6px; }
.signup-particle:nth-child(4) { top: 65%; left: 80%; animation-delay: 2s; width: 10px; height: 10px; }
.signup-particle:nth-child(5) { top: 10%; left: 55%; animation-delay: 3s; width: 14px; height: 14px; }
.signup-particle:nth-child(6) { top: 80%; left: 40%; animation-delay: 1s; width: 8px; height: 8px; }

@keyframes particleFloat {
  0%, 100% { 
    transform: translateY(0) rotate(0deg);
    opacity: 0.3;
  }
  50% { 
    transform: translateY(-30px) rotate(180deg);
    opacity: 0.6;
  }
}

/* Breadcrumb */
.signup-breadcrumb .breadcrumb {
  background: transparent;
  justify-content: center;
  margin-bottom: 25px;
}

.signup-breadcrumb .breadcrumb-link {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}

.signup-breadcrumb .breadcrumb-link:hover {
  color: white;
}

/* ========================================
   FORMULAIRE PRINCIPAL
   ======================================== */
.signup-form-container {
  max-width: 720px;
  margin: -50px auto 50px;
  position: relative;
  z-index: 10;
  padding: 0 15px;
}

.signup-form {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 45px 40px;
  position: relative;
  overflow: hidden;
}

.signup-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
  background-size: 200% 100%;
  animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.signup-form-title {
  color: var(--dark-color);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.signup-form-title i {
  color: var(--primary-color);
  font-size: 2rem;
}

/* ========================================
   INDICATEURS D'ÉTAPES
   ======================================== */
.steps-wrapper {
  margin-bottom: 40px;
}

.steps-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 0 10px;
}

.steps-line {
  position: absolute;
  top: 25px;
  left: 30px;
  right: 30px;
  height: 4px;
  background: var(--border-color);
  transform: translateY(-50%);
  z-index: 0;
  border-radius: 2px;
}

.steps-line-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.step-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  transition: var(--transition);
  border: 3px solid transparent;
}

.step-circle i {
  font-size: 1.2rem;
}

.step-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: var(--transition);
}

.step-item.active .step-circle {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  transform: scale(1.15);
  box-shadow: 0 6px 25px rgba(46, 204, 64, 0.5);
  border-color: rgba(255,255,255,0.3);
}

.step-item.active .step-label {
  color: var(--primary-color);
}

.step-item.completed .step-circle {
  background: var(--primary-color);
  color: white;
}

.step-item.completed .step-label {
  color: var(--primary-dark);
}

/* ========================================
   ONGLETS
   ======================================== */
.form-tab {
  display: none;
  animation: fadeInTab 0.4s ease;
}

.form-tab.active {
  display: block;
}

@keyframes fadeInTab {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.tab-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.tab-header-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
}

.tab-header-text h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--dark-color);
}

.tab-header-text p {
  margin: 5px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ========================================
   CHAMPS DE FORMULAIRE
   ======================================== */
.signup-form .form-group {
  margin-bottom: 22px;
}

.signup-form .form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-color);
  font-size: 0.95rem;
}

.signup-form .form-group label i {
  color: var(--primary-color);
}

.signup-form .form-group label .required {
  color: var(--danger-color);
  font-size: 1.1rem;
}

.signup-form .form-group label .optional {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 400;
}

.signup-form .form-control {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: var(--transition);
  background: white;
  height: auto;
}

.signup-form .form-control:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 4px rgba(46, 204, 64, 0.15);
}

.signup-form .form-control.is-invalid {
  border-color: var(--danger-color);
  background: #fff5f5;
}

.signup-form .form-control.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15);
}

.signup-form .form-control.is-valid {
  border-color: var(--success-color);
}

.signup-form textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.signup-form select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 45px;
}

/* Messages d'erreur */
.error-message {
  color: var(--danger-color);
  font-size: 0.85rem;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
}

.error-message:empty {
  display: none;
}

.error-message i {
  font-size: 0.9rem;
}

/* Compteur de caractères */
.char-counter {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.char-counter.warning {
  color: var(--warning-color);
}

.char-counter.danger {
  color: var(--danger-color);
}

/* ========================================
   SECTIONS SPÉCIALES
   ======================================== */
.fieldset-section {
  border: 2px solid var(--secondary-color);
  border-radius: var(--radius-md);
  padding: 25px;
  margin-top: 20px;
  background: rgba(255, 193, 7, 0.03);
  position: relative;
}

.fieldset-section legend {
  color: var(--secondary-color);
  font-weight: 700;
  padding: 5px 15px;
  font-size: 1rem;
  background: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Profil Cards */
.profile-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.profile-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  background: white;
}

.profile-card:hover {
  border-color: var(--primary-light);
  background: rgba(46, 204, 64, 0.03);
}

.profile-card.selected {
  border-color: var(--primary-color);
  background: rgba(46, 204, 64, 0.08);
  box-shadow: 0 4px 15px rgba(46, 204, 64, 0.2);
}

.profile-card-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.profile-card.entreprise .profile-card-icon {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.profile-card.benevole .profile-card-icon {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
}

.profile-card.mecene .profile-card-icon {
  background: linear-gradient(135deg, #f39c12, #d68910);
  color: white;
}

.profile-card-title {
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 5px;
}

.profile-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========================================
   CHAMP MOT DE PASSE
   ======================================== */
.password-wrapper {
  position: relative;
}

.signup-form .password-wrapper .form-control {
  padding-right: 100px;
}

.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.password-toggle:hover {
  color: var(--primary-dark);
}

/* Force du mot de passe */
.password-strength {
  margin-top: 10px;
}

.password-strength-bar {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.password-strength-progress {
  height: 100%;
  width: 0;
  transition: var(--transition);
  border-radius: 3px;
}

.password-strength-progress.weak { width: 25%; background: var(--danger-color); }
.password-strength-progress.fair { width: 50%; background: var(--warning-color); }
.password-strength-progress.good { width: 75%; background: var(--info-color); }
.password-strength-progress.strong { width: 100%; background: var(--success-color); }

.password-strength-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.password-requirements {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
  padding: 15px;
  background: var(--light-bg);
  border-radius: var(--radius-sm);
}

.password-requirement {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.password-requirement i {
  font-size: 0.9rem;
}

.password-requirement.met {
  color: var(--success-color);
}

.password-requirement.met i {
  color: var(--success-color);
}

/* ========================================
   BOUTONS DE NAVIGATION
   ======================================== */
.signup-form .form-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 25px;
  border-top: 2px solid var(--border-color);
}

.signup-form .btn {
  padding: 14px 35px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.signup-form .btn-prev {
  background: var(--border-color);
  color: var(--text-muted);
}

.signup-form .btn-prev:hover {
  background: #dee2e6;
  color: var(--text-color);
}

.signup-form .btn-next {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(46, 204, 64, 0.3);
}

.signup-form .btn-next:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(46, 204, 64, 0.4);
  color: white;
}

.signup-form .btn-next:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.signup-form .btn-submit {
  background: linear-gradient(135deg, var(--success-color), #218838);
  color: white;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.signup-form .btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
  color: white;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .signup-hero {
    padding: 140px 0 60px;
  }
  
  .signup-hero h1 {
    font-size: 1.8rem;
  }
  
  .signup-hero p {
    font-size: 1rem;
  }
  
  .signup-form-container {
    margin-top: -30px;
  }
  
  .signup-form {
    padding: 30px 20px;
  }
  
  .signup-form-title {
    font-size: 1.4rem;
  }
  
  .step-circle {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .step-label {
    font-size: 0.65rem;
    display: none;
  }
  
  .steps-line {
    left: 20px;
    right: 20px;
  }
  
  .tab-header {
    flex-direction: column;
    text-align: center;
  }
  
  .profile-cards {
    grid-template-columns: 1fr;
  }
  
  .password-requirements {
    grid-template-columns: 1fr;
  }
  
  .signup-form .form-navigation {
    flex-direction: column-reverse;
    gap: 15px;
  }
  
  .signup-form .form-navigation .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .signup-form {
    padding: 25px 15px;
    border-radius: var(--radius-md);
  }
  
  .signup-form .form-control {
    padding: 12px 14px;
  }
  
  .fieldset-section {
    padding: 15px;
  }
}

/* ========================================
   ANIMATIONS SUPPLÉMENTAIRES
   ======================================== */
.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Loading Spinner */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
