/* Styles pour la page de devis */

/* Background */
.form-background {
  background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://res.cloudinary.com/dafiqfwsf/image/upload/v1744106280/montain_omlxnj.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  margin-top: 60px; /* Ajout pour passer sous la navbar fixe */
}

/* Form Container */
.form-container {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.form-container h1 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 1.8rem;
}

.form-intro {
  text-align: center;
  margin-bottom: 25px;
}

/* Progress Bar */
.progress-container {
  margin-bottom: 25px;
}

.progress-bar {
  height: 6px;
  border-radius: 3px;
  margin-bottom: 15px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background-color: #0c2e8a;
  width: 33.33%;
  transition: width 0.3s ease;
}

.step-indicators {
  display: flex;
  justify-content: space-between;
}

.step {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all 0.3s ease;
}

.step.active {
  background-color: #0c2e8a;
  color: white;
}

.step.completed {
  background-color: #28a745;
  color: white;
}

/* Form Steps */
.form-step {
  display: none;
  width: 100%;
}

.form-step:first-child {
  display: block;
}

.form-step h2 {
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.form-field {
  margin-bottom: 15px;
  flex: 1;
}

.form-field label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px;
  border-radius: 5px;
  font-size: 16px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #0c2e8a;
}

.form-field textarea {
  resize: vertical;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checkbox-field input {
  width: auto;
  margin-top: 5px;
}

.checkbox-field label {
  font-size: 14px;
}

/* Navigation Buttons */
.form-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.prev-btn, .next-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.prev-btn {
  background-color: #f8f9fa;
  color: #333;
}

.prev-btn:hover {
  background-color: #e9ecef;
}

.next-btn {
  background-color: #0c2e8a;
  color: white;
}

.next-btn:hover {
  background-color: #091d54;
}

/* Submit Button */
.submit-button {
  background-color: #ff6b35;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 15px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
}

.submit-button span {
  position: relative;
  z-index: 2;
}

.submit-button:hover {
  background-color: #e55a2b;
}

/* Captcha Styles */
.captcha-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

#captchaBox {
  height: 50px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 3px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  flex: 1;
  padding: 10px;
  position: relative;
  overflow: hidden;
}

#captchaBox::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
      45deg,
      rgba(0, 0, 0, 0.02),
      rgba(0, 0, 0, 0.02) 10px,
      rgba(0, 0, 0, 0.04) 10px,
      rgba(0, 0, 0, 0.04) 20px
  );
}

#refreshCaptcha {
  background-color: #0c2e8a;
  color: white;
  border: none;
  border-radius: 5px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

#refreshCaptcha:hover {
  background-color: #091d54;
}

/* Form Message */
.form-message {
  margin-top: 15px;
  padding: 10px 15px;
  border-radius: 5px;
  font-weight: 500;
  display: none;
}

.form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

/* Styles pour desktop */
@media (min-width: 769px) {
  .form-container {
    background-color: transparent;
    padding: 0;
  }
  
  .form-container h1,
  .form-container h2,
  .form-intro,
  .form-field label {
    color: white;
  }
  
  .step {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
  }
  
  .progress-bar {
    background-color: rgba(255, 255, 255, 0.3);
  }
  
  .form-field input,
  .form-field select,
  .form-field textarea {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
  }
  
  .checkbox-field label {
    color: white;
  }
  
  /* Rendre le captcha plus lisible sur fond transparent */
  #captchaBox {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
  }
}

/* Styles pour mobile */
@media (max-width: 768px) {
  .form-background {
    padding: 20px;
  }

  .form-container {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  }
  
  .form-container h1 {
    color: #0c2e8a;
  }
  
  .form-intro {
    color: #666;
  }
  
  .form-step h2 {
    color: #0c2e8a;
  }
  
  .form-field label {
    color: #333;
  }
  
  .checkbox-field label {
    color: #555;
  }
  
  .progress-bar {
    background-color: #e9ecef;
  }
  
  .step {
    background-color: #e9ecef;
    color: #666;
  }
  
  .form-field input,
  .form-field select,
  .form-field textarea {
    border: 1px solid #ddd;
  }
  
  #captchaBox {
    background-color: #f1f3f5;
    color: #333;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .step {
    width: 25px;
    height: 25px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .form-container h1 {
    font-size: 1.5rem;
  }

  .form-step h2 {
    font-size: 1.2rem;
  }

  .prev-btn, .next-btn {
    padding: 10px 15px;
    font-size: 14px;
  }

  .submit-button {
    padding: 12px 20px;
    font-size: 1rem;
  }
}