/* Contact Section - Style Aglaé Crée */
.contact-section {
  padding: 4rem 0;
  width: 100%;
}

.contact-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: center;
}

.contact-content {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-header {
  margin-bottom: 3rem;
  width: 100%;
}

.contact-title {
  font-family: 'Capitolium', serif;
  font-size: 2.5rem;
  color: var(--color-police);
  margin-bottom: 1rem;
  font-weight: normal;
}

.contact-subtitle {
  font-size: 1.1rem;
  color: #8a7a6b;
  margin: 0 auto;
  max-width: 600px;
  line-height: 1.6;
}

/* Formulaire Style Aglaé - Centré et Sans Débordement */
.cf7-form {
  width: 100%;
  max-width: 700px;
  background: white;
  border-radius: 1rem;
  padding: 3rem 2.5rem;
  box-shadow: 0 8px 32px rgba(107, 91, 77, 0.1);
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  box-sizing: border-box;
}

.cf7-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4a90e2, #6b5b4d);
}

.cf7-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.cf7-row--submit {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cf7-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
  min-width: 0;
  /* Empêche le débordement */
}

.cf7-field--full {
  flex: 1 1 100%;
  width: 100%;
}

.cf7-form label {
  font-family: 'Capitolium', serif;
  font-size: 1rem;
  color: var(--color-police);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.input-field {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  border: 2px solid #e8e3dd;
  background: #fafaf9;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-police);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.input-field::placeholder {
  color: #a8998a;
  opacity: 0.8;
}

.input-field:focus {
  border-color: #4a90e2;
  background: white;
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
  transform: translateY(-1px);
}

/* Textarea specific styling */
textarea.input-field {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

/* Privacy checkbox */
.cf7-privacy {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #666;
  justify-content: center;
}

.privacy-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--bg-btn);
}

/* Submit Button - Style Aglaé - CENTRÉ */
.wpcf7-row--submit {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.btn-contact,
.wpcf7-submit {
  background: linear-gradient(135deg, #4a90e2, #357abd) !important;
  color: white !important;
  padding: 1rem 3rem !important;
  border: none !important;
  border-radius: 0.375rem !important;
  font-family: inherit !important;
  font-size: 1.1rem !important;
  font-weight: 500 !important;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(74, 144, 226, 0.3);
  position: relative;
  overflow: hidden;
  text-transform: none !important;
  display: inline-block !important;
  margin: 0 auto !important;
}

.btn-contact::before,
.wpcf7-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-contact:hover::before,
.wpcf7-submit:hover::before {
  left: 100%;
}

.btn-contact:hover,
.wpcf7-submit:hover {
  background: linear-gradient(135deg, #357abd, #2a5f8f) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

/* Force le centrage avec des règles spécifiques pour CF7 */
.wpcf7-form .wpcf7-row--submit {
  text-align: center !important;
}

.wpcf7-form .wpcf7-row--submit input[type="submit"] {
  margin: 0 auto !important;
  display: inline-block !important;
}

.wpcf7-spinner {
  display: none !important;
  /* Cacher le spinner de CF7 */
}

/* Mobile - Bouton centré */
@media (max-width: 768px) {

  .btn-contact,
  .wpcf7-submit {
    width: auto !important;
    padding: 1.25rem 2.5rem !important;
    margin: 0 auto !important;
    display: block !important;
  }

  .wpcf7-row--submit {
    text-align: center !important;
  }
}

/* Form validation messages */
.wpcf7-not-valid-tip {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.wpcf7-validation-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: #dc2626;
  text-align: center;
}

.wpcf7-mail-sent-ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: #166534;
  text-align: center;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .contact-section {
    padding: 3rem 0;
  }

  .contact-container {
    padding: 0 1rem;
  }

  .contact-title {
    font-size: 2rem;
  }

  .cf7-form {
    padding: 2rem 1.5rem;
    margin: 0;
  }

  .cf7-row {
    flex-direction: column;
    gap: 1rem;
  }

  .btn-contact,
  .wpcf7-submit {
    width: 100% !important;
    padding: 1.25rem 2rem !important;
  }
}

@media (max-width: 480px) {
  .contact-container {
    padding: 0 0.5rem;
  }

  .cf7-form {
    padding: 1.5rem 1rem;
  }
}

/* Remove default CF7 styles */
.cf7-form p {
  margin: 0;
}

.cf7-form br {
  display: none;
}

/* Ensure proper box-sizing for all elements */
.cf7-form *,
.cf7-form *::before,
.cf7-form *::after {
  box-sizing: border-box;
}