/* =====================================================
   Guepex — Formulaire Checkout Personnalisé
   ===================================================== */

/* Wrap principal */
.guepex-cf-wrap { max-width: 1000px; margin: 0 auto; font-family: inherit; }
.guepex-cf-title { font-size: 24px; font-weight: 700; margin-bottom: 24px; color: #1a1a2e; }

/* Layout 2 colonnes */
.guepex-cf-layout {
	display: grid;
	grid-template-columns: 1fr 1.4fr;
	gap: 24px;
	margin-bottom: 24px;
}

/* Carte */
.guepex-cf-card {
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.guepex-cf-card-title {
	font-size: 16px;
	font-weight: 700;
	margin: 0 0 18px;
	padding-bottom: 12px;
	border-bottom: 2px solid #f0f0f1;
	color: #1a1a2e;
}

/* Items panier */
.guepex-cf-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.guepex-cf-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid #f5f5f5;
}
.guepex-cf-item:last-child { border-bottom: none; }
.guepex-cf-item-img img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid #eee; }
.guepex-cf-item-info { flex: 1; }
.guepex-cf-item-name { font-weight: 600; font-size: 14px; color: #333; }
.guepex-cf-item-qty { font-size: 12px; color: #888; margin-top: 2px; }
.guepex-cf-item-price { font-weight: 700; font-size: 14px; color: #0073aa; white-space: nowrap; }

/* Totaux */
.guepex-cf-totals { border-top: 2px solid #f0f0f1; padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.guepex-cf-total-row { display: flex; justify-content: space-between; font-size: 14px; color: #555; }
.guepex-cf-total-final {
	font-size: 18px;
	font-weight: 800;
	color: #1a1a2e;
	padding-top: 10px;
	border-top: 2px solid #e8e8e8;
	margin-top: 4px;
}

/* Champs formulaire */
.guepex-cf-fields { display: flex; flex-direction: column; gap: 14px; }
.guepex-cf-row { display: flex; flex-direction: column; gap: 14px; }
.guepex-cf-row-2 { flex-direction: row; gap: 12px; }
.guepex-cf-row-2 .guepex-cf-field { flex: 1; }

.guepex-cf-field { display: flex; flex-direction: column; gap: 5px; }
.guepex-cf-field label {
	font-size: 13px;
	font-weight: 600;
	color: #444;
}
.guepex-required { color: #e53935; }

.guepex-cf-field input[type="text"],
.guepex-cf-field input[type="tel"],
.guepex-cf-field input[type="email"],
.guepex-cf-field select,
.guepex-cf-field textarea {
	width: 100%;
	padding: 11px 14px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 14px;
	color: #333;
	background: #fafafa;
	transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
	box-sizing: border-box;
	outline: none;
}
.guepex-cf-field input:focus,
.guepex-cf-field select:focus,
.guepex-cf-field textarea:focus {
	border-color: #0073aa;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(0,115,170,0.12);
}
.guepex-cf-field input.guepex-cf-field-error,
.guepex-cf-field select.guepex-cf-field-error {
	border-color: #e53935;
	background: #fff5f5;
}

/* Téléphone */
.guepex-phone-wrap { display: flex; align-items: center; border: 2px solid #e0e0e0; border-radius: 8px; overflow: hidden; background: #fafafa; transition: border-color 0.2s; }
.guepex-phone-wrap:focus-within { border-color: #0073aa; background: #fff; box-shadow: 0 0 0 3px rgba(0,115,170,0.12); }
.guepex-phone-prefix { padding: 11px 12px; font-size: 13px; font-weight: 600; color: #555; background: #f0f0f1; border-right: 1px solid #e0e0e0; white-space: nowrap; }
.guepex-phone-wrap input { border: none !important; box-shadow: none !important; background: transparent !important; padding-left: 10px !important; flex: 1; }
.guepex-phone-wrap input:focus { box-shadow: none !important; }

/* Toggle mode livraison */
.guepex-cf-delivery-toggle {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
.guepex-cf-delivery-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 14px 10px;
	border: 2px solid #e0e0e0;
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.2s;
	text-align: center;
	font-size: 13px;
	font-weight: 500;
	color: #555;
}
.guepex-cf-delivery-option input { display: none; }
.guepex-cf-delivery-icon { font-size: 26px; }
.guepex-cf-delivery-option:hover { border-color: #0073aa; background: #f0f7ff; }
.guepex-cf-delivery-option.active {
	border-color: #0073aa;
	background: #e8f4fb;
	color: #0073aa;
	font-weight: 700;
}

/* Bouton commander */
.guepex-cf-submit-wrap { text-align: center; margin-top: 8px; }
.guepex-cf-btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	max-width: 420px;
	padding: 16px 32px;
	background: linear-gradient(135deg, #0073aa 0%, #00a0d2 100%);
	color: #fff;
	border: none;
	border-radius: 10px;
	font-size: 17px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s;
	box-shadow: 0 4px 14px rgba(0,115,170,0.35);
	letter-spacing: 0.3px;
}
.guepex-cf-btn-primary:hover {
	background: linear-gradient(135deg, #005c8a 0%, #0085b3 100%);
	box-shadow: 0 6px 20px rgba(0,115,170,0.45);
	transform: translateY(-1px);
}
.guepex-cf-btn-primary:disabled { background: #999; box-shadow: none; transform: none; cursor: not-allowed; }

.guepex-cf-btn-secondary {
	display: inline-block;
	padding: 10px 20px;
	border: 2px solid #0073aa;
	border-radius: 8px;
	color: #0073aa;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.2s;
}
.guepex-cf-btn-secondary:hover { background: #0073aa; color: #fff; }

.guepex-cf-secure { color: #888; font-size: 12px; margin-top: 10px; }

/* Erreur */
.guepex-cf-error {
	background: #fff3f3;
	border: 1px solid #f5c6c6;
	border-radius: 8px;
	padding: 12px 16px;
	color: #c0392b;
	font-size: 14px;
	margin-top: 12px;
}

/* Panier vide */
.guepex-cf-empty {
	text-align: center;
	padding: 40px 20px;
	background: #fff;
	border-radius: 12px;
	border: 1px solid #e8e8e8;
}
.guepex-cf-empty span { font-size: 48px; display: block; margin-bottom: 12px; }
.guepex-cf-empty p { color: #666; margin-bottom: 16px; }

/* ─── Bouton Acheter maintenant ─── */
.guepex-buynow-wrap { margin-top: 12px; }
.guepex-buynow-trigger {
	width: 100%;
	padding: 14px 24px;
	background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
	color: #fff;
	border: none;
	border-radius: 10px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s;
	box-shadow: 0 4px 14px rgba(249,115,22,0.35);
}
.guepex-buynow-trigger:hover { background: linear-gradient(135deg, #ea6f00 0%, #f87422 100%); transform: translateY(-1px); }

.guepex-buynow-form { margin-top: 16px; }
.guepex-buynow-form-visible { display: block !important; }

.guepex-buynow-product {
	display: flex;
	align-items: center;
	gap: 14px;
	padding-bottom: 16px;
	border-bottom: 2px solid #f0f0f1;
	margin-bottom: 16px;
}
.guepex-buynow-product-img img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid #eee; }
.guepex-buynow-product-name { font-weight: 700; font-size: 15px; color: #1a1a2e; margin-bottom: 4px; }
.guepex-buynow-product-price { font-size: 18px; font-weight: 800; color: #0073aa; }

.guepex-buynow-totals { margin: 16px 0; }

/* Responsive */
@media (max-width: 768px) {
	.guepex-cf-layout { grid-template-columns: 1fr; }
	.guepex-cf-row-2 { flex-direction: column; }
	.guepex-cf-title { font-size: 20px; }
}
