/* ============================================
   VDX TATTOO — FORMULAIRE CF7
   ============================================ */

/* === HONEYPOT === */
.vdx-honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

/* === GROUPES DE CHAMPS === */
.vdx-field-group {
  margin-bottom: 20px;
}

.vdx-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #555;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

/* === SEGMENTS (PILLS) === */
.vdx-segments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.vdx-segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  border: 1.5px solid #ddd;
  border-radius: 50px;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.4;
}

.vdx-segment:hover {
  border-color: #999;
}

.vdx-segment:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.vdx-segment svg {
  flex-shrink: 0;
}

.vdx-segment--active {
  background: #111;
  color: #fff;
  border-color: #111;
}

.vdx-segment--active:hover {
  background: #222;
  border-color: #222;
}

/* === CHAMPS INPUT === */
.vdx-form-card .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

.vdx-form-card input[type="text"],
.vdx-form-card input[type="email"],
.vdx-form-card input[type="tel"],
.vdx-form-card textarea,
.vdx-form-card select {
  width: 100%;
  padding: 12px 0;
  font-size: 0.95rem;
  font-family: inherit;
  color: #111;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid #ddd;
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}

.vdx-form-card input[type="text"]:focus,
.vdx-form-card input[type="email"]:focus,
.vdx-form-card input[type="tel"]:focus,
.vdx-form-card textarea:focus,
.vdx-form-card select:focus {
  border-bottom-color: #111;
}

.vdx-form-card input::placeholder,
.vdx-form-card textarea::placeholder {
  color: #bbb;
  font-weight: 400;
}

/* === SELECT CHEVRON === */
.vdx-form-card select {
  cursor: pointer;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 18px;
}

/* === TEXTAREA === */
.vdx-form-card textarea {
  resize: vertical;
  min-height: 90px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 4px;
}

.vdx-form-card textarea:focus {
  border-color: #111;
}

/* === ZONE UPLOAD === */
.vdx-upload-zone {
  position: relative;
  border: 1.5px dashed #ddd;
  border-radius: 12px;
  background: #fafafa;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.vdx-upload-zone:hover {
  border-color: #999;
  background: #f5f5f5;
}

.vdx-upload-zone.vdx-upload--dragover {
  border-color: #111;
  background: #f0f0f0;
}

.vdx-upload-zone.vdx-upload--has-file {
  border-color: #111;
  border-style: solid;
}

.vdx-upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.vdx-upload-text {
  font-size: 0.9rem;
  color: #555;
  font-weight: 500;
}

.vdx-upload-hint {
  font-size: 0.75rem;
  color: #aaa;
}

.vdx-upload-filename {
  font-size: 0.8rem;
  color: #111;
  font-weight: 500;
  margin-top: 4px;
}

.vdx-upload-zone .wpcf7-form-control-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.vdx-upload-zone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

/* === BOUTONS CTA === */
.vdx-cta-wrapper {
  margin-top: 8px;
}

.vdx-form-card input[type="submit"].wpcf7-form-control.vdx-btn-submit,
.vdx-btn-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: #111;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  letter-spacing: 0.01em;
}

.vdx-form-card input[type="submit"].wpcf7-form-control.vdx-btn-submit:hover,
.vdx-btn-phone:hover {
  background: #222;
}

.vdx-form-card input[type="submit"].wpcf7-form-control.vdx-btn-submit:active,
.vdx-btn-phone:active {
  transform: scale(0.98);
}

.vdx-form-card input[type="submit"].wpcf7-form-control.vdx-btn-submit:focus-visible,
.vdx-btn-phone:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
}

.vdx-btn-phone svg {
  flex-shrink: 0;
}

/* === AFFICHAGE CONDITIONNEL === */
.vdx-conditional[data-show-project],
.vdx-conditional[data-show-contact] {
  display: none;
}

.vdx-conditional.vdx-visible {
  display: block;
}

/* === VALIDATION CF7 === */
.vdx-form-card .wpcf7-not-valid-tip {
  font-size: 0.78rem;
  color: #d32f2f;
  margin-top: 4px;
  display: block;
}

.vdx-form-card .wpcf7-response-output {
  margin: 16px 0 0;
  padding: 12px 16px;
  font-size: 0.85rem;
  border-radius: 8px;
  border: none;
}

.vdx-form-card .wpcf7-mail-sent-ok {
  background: #e8f5e9;
  color: #2e7d32;
}

.vdx-form-card .wpcf7-validation-errors,
.vdx-form-card .wpcf7-acceptance-missing {
  background: #fbe9e7;
  color: #c62828;
}

.vdx-form-card .wpcf7-not-valid {
  border-bottom-color: #d32f2f;
}

.vdx-form-card .wpcf7-spinner {
  display: none;
}

/* === CF7 RESET === */
.vdx-form-card .wpcf7-form p {
  margin: 0;
  padding: 0;
}

.vdx-form-card .wpcf7 br {
  display: none;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .vdx-segments {
    gap: 6px;
  }

  .vdx-segment {
    padding: 9px 12px;
    font-size: 0.8rem;
  }

  .vdx-form-card input[type="text"],
  .vdx-form-card input[type="email"],
  .vdx-form-card input[type="tel"],
  .vdx-form-card select {
    font-size: 16px;
  }
/* Fix largeur segments */
.vdx-form-card .wpcf7-form .vdx-field-group {
  width: 100%;
}

.vdx-form-card .wpcf7-form .vdx-segments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}
	
/* === FIX LARGEUR FORMULAIRE === */
.vdx-form-card .wpcf7,
.vdx-form-card .wpcf7-form {
  width: 100%;
  max-width: 100%;
}

/* === FIX ICONE BOUTON EMAIL === */
.vdx-form-card input[type="submit"].vdx-btn-submit {
  text-indent: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(50% - 70px) center;
  background-size: 16px;
}	
	
	/* === FIX CF7 AUTO-WRAPPING === */
.vdx-form-card .wpcf7-form > p {
  display: contents;
}

.vdx-form-card .wpcf7,
.vdx-form-card .wpcf7-form {
  width: 100%;
  max-width: 100%;
  display: block;
}

.vdx-form-card .vdx-segments {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  width: 100% !important;
}

.vdx-form-card .vdx-segment {
  width: 100%;
  min-width: 0;
}
	
/* === FIX CF7 <p> WRAPPING SEGMENTS === */
.vdx-segments > p {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
}

.vdx-segments > p > br {
  display: none;
}	
}
