/* ============================================================
   ContactFormFarmUp — Styles du formulaire
   ============================================================ */

.cff-wrapper {
  max-width: 760px;
  margin: 0 auto;
}

/* ---- Alertes ---- */
.cff-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 6px;
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.5;
}

.cff-alert[hidden] { display: none; }

.cff-alert--success {
  background: #edf7ed;
  border: 1px solid #a3d9a3;
  color: #2d6a2d;
}

.cff-alert--error {
  background: #fdecea;
  border: 1px solid #f5c6c2;
  color: #b91c1c;
}

.cff-alert svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---- Formulaire ---- */
.cff-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

@media (max-width: 600px) {
  .cff-row { grid-template-columns: 1fr; }
}

/* ---- Champ ---- */
.cff-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cff-field label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.cff-required {
  color: #c0392b;
  margin-left: 2px;
}

.cff-field input,
.cff-field select,
.cff-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d0d0d0;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  color: #333;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.cff-field input:focus,
.cff-field select:focus,
.cff-field textarea:focus {
  outline: none;
  border-color: #2d6a2d;
  box-shadow: 0 0 0 3px rgba(45, 106, 45, 0.12);
}

.cff-field input.cff-field-invalid,
.cff-field textarea.cff-field-invalid {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.10);
}

.cff-field textarea {
  resize: vertical;
  min-height: 140px;
}

.cff-field-error {
  font-size: 13px;
  color: #c0392b;
  min-height: 18px;
}

/* ---- Honeypot ---- */
.cff-hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  pointer-events: none;
  tabindex: -1;
}

/* ---- Bouton ---- */
.cff-submit-row {
  display: flex;
  justify-content: flex-start;
}

.cff-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 32px;
  background: #2d6a2d;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.cff-btn:hover:not(:disabled) {
  background: #245424;
}

.cff-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.cff-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ---- Spinner ---- */
.cff-btn-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cff-spin 0.7s linear infinite;
}

.cff-btn-spinner[hidden] { display: none; }
.cff-btn-text[hidden]    { display: none; }

@keyframes cff-spin {
  to { transform: rotate(360deg); }
}
