/* Allô Paulette — champs du formulaire WooCommerce (la carte rose reste dans Bricks). */
.ap-order-form,
.ap-order-form form.cart {
  width: 100%;
  min-width: 0;
}

.woocommerce div.product .ap-order-form form.cart,
.ap-order-form form.cart {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  margin: 0;
}

.ap-order-form .quantity {
  display: none;
}

.ap-order-form .ap-personalization {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  min-width: 0;
}

.ap-order-form .ap-personalization fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

.ap-order-form .ap-personalization legend,
.ap-order-form .ap-field > label {
  display: block;
  width: auto;
  padding: 0;
  margin: 0 0 .5em;
  color: var(--brand);
  font-size: var(--text-s);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
}

.ap-order-form .ap-choices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
}

.ap-order-form .ap-choices label {
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  gap: .5em;
  width: auto;
  min-height: 44px;
  padding: .45em .7em;
  margin: 0;
  border: 1px solid var(--brand-600);
  border-radius: 0;
  background: var(--neutral-50);
  color: var(--brand);
  font-size: var(--text-s);
  font-weight: var(--font-weight-regular);
  line-height: 1.2;
  cursor: pointer;
}

.ap-order-form .ap-choices input[type="radio"] {
  appearance: auto;
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
  padding: 0;
  margin: 0;
  accent-color: var(--brand);
  box-shadow: none;
}

.ap-order-form .ap-field {
  display: flex;
  flex-direction: column;
  gap: .4em;
  min-width: 0;
}

.ap-order-form .ap-field > label {
  margin: 0;
}

.ap-order-form .ap-field small {
  color: var(--brand);
  font-size: var(--text-xs);
  line-height: var(--line-height-snug);
}

.ap-order-form .ap-field input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: .6em .75em;
  margin: 0;
  border: 1px solid var(--brand-600);
  border-radius: 0;
  box-shadow: none;
  background: var(--neutral-50);
  color: var(--brand);
  font-family: inherit;
  font-size: var(--text-s);
  line-height: 1.3;
}

.ap-order-form .ap-field input:focus-visible,
.ap-order-form .ap-choices input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Le bouton conserve hq-button + hq-button--primary : seulement son placement WooCommerce. */
.woocommerce div.product .ap-order-form form.cart .single_add_to_cart_button,
.ap-order-form .single_add_to_cart_button {
  display: inline-flex;
  float: none;
  clear: both;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin: 0;
  white-space: normal;
  text-align: center;
}

/* Certaines règles WooCommerce ciblent les boutons plus spécifiquement que les classes HQ. */
.woocommerce div.product .ap-order-form form.cart .single_add_to_cart_button.hq-button--primary {
  background-color: var(--accent);
  color: var(--neutral-50);
  border: 3px solid var(--brand);
  border-radius: var(--radius-s);
  box-shadow: 0 var(--radius-s) 0 var(--brand);
}

.woocommerce div.product .ap-order-form form.cart .single_add_to_cart_button.hq-button--primary:hover {
  background-color: var(--accent);
  transform: translateY(var(--radius-xs));
  box-shadow: 0 var(--radius-xs) 0 var(--brand);
}

.woocommerce div.product .ap-order-form form.cart .single_add_to_cart_button.hq-button--primary:active {
  transform: translateY(var(--radius-s));
  box-shadow: none;
}

@media (max-width: 767px) {
  .ap-order-form .ap-choices { gap: .5em; }
}

@media (prefers-reduced-motion: reduce) {
  .woocommerce div.product .ap-order-form form.cart .single_add_to_cart_button.hq-button--primary:hover,
  .woocommerce div.product .ap-order-form form.cart .single_add_to_cart_button.hq-button--primary:active {
    transform: none;
    box-shadow: 0 var(--radius-s) 0 var(--brand);
  }
}

.ap-order-form .ap-personalization fieldset > legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}