/* ==========================================================
   CONTACT SECTION (Formulaire Corrigé Desktop & Mobile)
   ========================================================== */

.contact-section {
  grid-column: 2 / 3;
  max-width: 1070px;
  width: 100%;
  margin: 20px auto 100px;
  padding: 0 40px;
  text-align: left;
}

.contact-section p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 30px;
  text-align: justify;
}

/* --- FORMULAIRE --- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 800px;
  margin: 0 auto;
}

/* Ligne Email + Nom */
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  align-items: flex-end; 
  width: 100%;
}

/* Wrapper pour l'email */
.email-field {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-width: 0;
}

.form-row > input {
  flex: 1;
  width: 100%;
  min-width: 0;
  margin: 0; 
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 18px;
  border: 1px solid var(--contact-border);
  border-radius: 25px;
  font-size: 14px;
  color: var(--contact-text);
  background-color: var(--contact-bg);
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  line-height: 1.5; 
}

.contact-form textarea {
  border-radius: 12px;
  resize: none;
  margin-bottom: 20px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--contact-button-focus);
  outline: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
}

.form-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}

.contact-form button {
  background-color: var(--contact-button-bg);
  color: var(--contact-button-text);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border: none;
  border-radius: 25px;
  padding: 15px 40px;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.contact-form button:hover {
  background-color: var(--contact-button-bg-hover);
}

.error-message {
  color: #ff4b4b;
  font-size: 12px;
  margin-bottom: 5px;
  min-height: 15px;
  padding-left: 15px;
  line-height: 1;
}

.contact-form input.invalid {
  border-color: #ff4b4b;
}

.back-home {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 40px;
}

.back-home a {
  color: var(--grey);
  font-size: 18px;
  transition: color 0.3s ease, transform 0.3s ease;
  display: flex;
  padding: 10px;
}

.back-home a:hover {
  color: var(--black-01);
  transform: scale(1.1);
}

.confirmation-message {
  text-align: center;
  padding: 40px 20px;
  width: 100%;
}

.confirmation-message h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.confirmation-message.success h3 {
  color: #27ae60; 
}

.confirmation-message.error h3 {
  color: #e74c3c;
}

.confirmation-message p {
  text-align: center;
  color: var(--black-01);
  font-size: 16px;
  margin: 0 auto;
}

/* --- GESTION DES PLACEHOLDERS --- */
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--contact-placeholder);
  opacity: 0.9;
}

/* Dark Mode */
html.dark-theme .confirmation-message p {
  color: var(--white-01);
}

/* Correction spécifique pour le Dark Mode si le vert est trop sombre */
html.dark-theme .confirmation-message.success h3 {
  color: #2ecc71; 
}

html.dark-theme .contact-form input,
html.dark-theme .contact-form textarea {
  border: 1px solid var(--contact-border-dark)!important;
  background-color: var(--contact-bg-dark)!important;
}

html.dark-theme .contact-form input,
html.dark-theme .contact-form textarea {
  color: var(--contact-text-dark)!important;
}

/* --- MOBILE --- */
@media (max-width: 900px) {

  .contact-section {

  padding: 0 30px;

}

  .form-row {
    flex-direction: column;
    gap: 15px;
    align-items: stretch; 
  }
  
  .email-field, 
  .form-row > input {
    width: 100%;
    flex: auto;
  }
  
  .form-footer {
    justify-content: center;
  }
}

