/**
 * PrintCraft — Boutons "Demander un devis" + "Commander et payer".
 * Injecté après le bouton natif WC ; ce dernier est masqué mais reste
 * dans le DOM (le bouton "Commander et payer" le déclenche en JS).
 */

/* Masque le bouton natif WooCommerce mais le laisse dans le form */
.woocommerce div.product form.cart .single_add_to_cart_button {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Bloc des 2 boutons */
.pc-devis-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  max-width: 480px;
}

/* Quand injecté dans le panneau récap sticky des fiches GF/PF/brochure/etc.,
   on suit la largeur du panneau et on retire la marge du haut. */
.pc-devis-actions--in-summary {
  margin-top: 16px;
  max-width: none;
  width: 100%;
}
.pc-devis-actions--in-summary .pc-devis-btn,
.pc-devis-actions--in-summary .pc-order-btn { width: 100%; }

/* Bouton "Demander un devis" — outline bleu */
.pc-devis-btn {
  padding: 12px 20px;
  background: #ffffff;
  color: #2271b1;
  border: 2px solid #2271b1;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
  text-align: center;
}
.pc-devis-btn:hover:not(:disabled) {
  background: #2271b1;
  color: #ffffff;
}
.pc-devis-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Bouton "Commander et payer" — plein orange */
.pc-order-btn {
  padding: 14px 22px;
  background: #F29400;
  color: #ffffff;
  border: 0;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
  text-align: center;
}
.pc-order-btn:hover:not(:disabled) { background: #d78200; }
.pc-order-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #b7bccc;
}

/* Mini-formulaire inline (révélé au clic devis) */
.pc-devis-form {
  padding: 14px 16px;
  background: #f6f8fb;
  border: 1px solid #d0d6e8;
  border-radius: 6px;
}
.pc-devis-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #13235B;
  margin-bottom: 6px;
}
.pc-devis-form input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d6e8;
  border-radius: 5px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  background: #ffffff;
}
.pc-devis-form input[type="email"]:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}
.pc-devis-form__actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: flex-end;
}
.pc-devis-send {
  padding: 8px 16px;
  background: #2271b1;
  color: #ffffff;
  border: 0;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.pc-devis-send:hover:not(:disabled) { background: #185a91; }
.pc-devis-send:disabled { opacity: 0.55; cursor: wait; }
.pc-devis-cancel {
  padding: 8px 14px;
  background: transparent;
  color: #707173;
  border: 1px solid #d0d6e8;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.pc-devis-cancel:hover { background: #ffffff; color: #13235B; }

.pc-devis-note {
  margin: 10px 0 0;
  font-size: 11px;
  color: #707173;
  line-height: 1.4;
}
.pc-devis-note a { color: #2271b1; text-decoration: underline; }

.pc-devis-msg {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1.45;
}
.pc-devis-msg--info  { background: #eef2ff; color: #3948a6; border: 1px solid #c9d1f5; }
.pc-devis-msg--ok    { background: #e8f5e9; color: #256029; border: 1px solid #a5d6a9; }
.pc-devis-msg--warn  { background: #fff4e5; color: #6b4200; border: 1px solid #F29400; }
.pc-devis-msg--error { background: #fce8e8; color: #7a1e1e; border: 1px solid #e0a0a0; }
