/* ===========================
   Vitalisite Contact Form
   =========================== */

.vitalisite-contact-section.has-background {
  padding: var(--wp--preset--spacing--70) var(--wp--preset--spacing--60);
  border-radius: var(--wp--custom--image-radius);
}

.vitalisite-contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--30);
  max-width: 640px;
}

/* Field wrapper */
.vitalisite-contact-form__field {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--30);
}

.vitalisite-contact-form__field label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--wp--preset--color--main-text);
}

.vitalisite-contact-form__field label .required {
  color: var(--wp--preset--color--error);
  margin-left: 2px;
}

/* Inputs */
.vitalisite-contact-form__field input,
.vitalisite-contact-form__field textarea,
.vitalisite-contact-form__field select {
  width: 100%;
  padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
  border: 1.5px solid var(--wp--preset--color--border, #e2e8f0);
  border-radius: min(var(--wp--custom--border-radius--cta, 6px), 12px);
  font-family: inherit;
  font-size: 1rem;
  color: var(--wp--preset--color--main-text);
  background-color: var(--wp--preset--color--bg, #fff);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  box-sizing: border-box;
}

.vitalisite-contact-form__field input:focus,
.vitalisite-contact-form__field textarea:focus,
.vitalisite-contact-form__field select:focus {
  outline: none;
  border-color: var(--wp--preset--color--primary);
  box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.12);
}

.vitalisite-contact-form__field textarea {
  min-height: 150px;
  resize: vertical;
}

/* Two-column row */
.vitalisite-contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--wp--preset--spacing--30);
}

@media (max-width: 600px) {
  .vitalisite-contact-form__row {
    grid-template-columns: 1fr;
  }
}

/* Error state */
.vitalisite-contact-form__field--error input,
.vitalisite-contact-form__field--error textarea {
  border-color: #dc2626;
}

.vitalisite-contact-form__error {
  font-size: 0.8rem;
  color: #dc2626;
  min-height: 0;
}

/* Honeypot — visually hidden */
.vitalisite-contact-form__hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Submit button */
.vitalisite-contact-form__submit {
  align-self: flex-start;
}

.vitalisite-contact-form__submit button {
  display: inline-flex;
  align-items: center;
  gap: var(--wp--preset--spacing--30);
  padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
  border: none;
  border-radius: var(--wp--custom--border-radius--cta, 6px);
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--on-primary, #fff);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.vitalisite-contact-form__submit button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.vitalisite-contact-form__submit button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Feedback messages */
.vitalisite-contact-form__feedback {
  padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
  border-radius: var(--wp--custom--border-radius--cta, 6px);
  font-size: 0.9rem;
  font-weight: 500;
}

.vitalisite-contact-form__feedback--success {
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.vitalisite-contact-form__feedback--error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ==========================================================================
   Contact V2 — Style Vitalisite (info panel + form)
   ========================================================================== */

.vitalisite-contact-v2__columns {
  gap: 0 !important;
  align-items: stretch !important;
}

.vitalisite-contact-v2__info {
  background-color: var(--wp--preset--color--primary);
  padding: var(--wp--preset--spacing--70) var(--wp--preset--spacing--60);
  border-radius: var(--wp--custom--image-radius);
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--40);
}

.vitalisite-contact-v2__form.has-background {
  border-radius: var(--wp--custom--image-radius);
  margin-top: 15px;
}
@media screen and (min-width: 782px) {
  .vitalisite-contact-v2__form.has-background {
    margin-left: 10px;
    margin-top: 0;
  }
}

.vitalisite-contact-v2__info h2,
.vitalisite-contact-v2__info p {
  color: var(--wp--preset--color--on-primary);
}

.vitalisite-contact-v2__lead {
  opacity: 0.85;
  font-size: 1.05rem;
  line-height: 1.6;
}

.vitalisite-contact-v2__details {
  margin-top: var(--wp--preset--spacing--50);
  gap: var(--wp--preset--spacing--40) !important;
}

.vitalisite-contact-v2__detail-item {
  gap: 12px !important;
  align-items: flex-start !important;
}

.vitalisite-contact-v2__detail-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.vitalisite-contact-v2__detail-item.icon-map-pin::before,
.vitalisite-contact-v2__detail-item.icon-phone::before,
.vitalisite-contact-v2__detail-item.icon-clock::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background-color: var(--wp--preset--color--on-primary, #fff);
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.vitalisite-contact-v2__detail-item.icon-map-pin::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 15 4 10a8 8 0 0 1 16 0'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 15 4 10a8 8 0 0 1 16 0'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

.vitalisite-contact-v2__detail-item.icon-phone::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}

.vitalisite-contact-v2__detail-item.icon-clock::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
}

.vitalisite-contact-v2__form {
  padding: var(--wp--preset--spacing--70) var(--wp--preset--spacing--60);
  background-color: var(--wp--preset--color--bg);
}

.vitalisite-contact-v2__form .vitalisite-contact-form {
  max-width: 100%;
  margin-top: 0;
}

@media (max-width: 768px) {
  .vitalisite-contact-v2__info,
  .vitalisite-contact-v2__form {
    padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
  }
}

/* ==========================================================================
   Contact V3 — Image gauche + formulaire droite
   ========================================================================== */

.vitalisite-contact-v3__columns {
  gap: var(--wp--preset--spacing--70) !important;
}

.vitalisite-contact-v3__image {
  position: relative;
}

.vitalisite-contact-v3__img {
  margin: 0;
  height: 100%;
}

.vitalisite-contact-v3__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--wp--custom--image-radius);
  display: block;
}

.vitalisite-contact-v3__content {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--40);
}

.vitalisite-contact-v3__content .vitalisite-contact-form {
  margin-top: 0;
}

@media (max-width: 768px) {
  .vitalisite-contact-v3__image {
    display: none;
  }
}
