/* ==========================================================================
   HOUNDJROXI : panier, commande (carte du lieu de livraison), paiement QR
   S'appuie sur les jetons de style.css.
   ========================================================================== */

/* Champ pays : fixé au Sénégal, jamais affiché */
.hx-champ-masque {
	display: none !important;
}

/* Mise en page : une colonne sur téléphone, deux sur ordinateur */
.woocommerce-checkout .col2-set {
	display: block;
	width: 100%;
}

.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
	float: none;
	width: 100%;
}

@media (min-width: 900px) {
	form.checkout.woocommerce-checkout {
		display: grid;
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
		gap: 40px;
		align-items: start;
	}

	form.checkout #customer_details {
		grid-column: 1;
		grid-row: 1 / span 2;
	}

	form.checkout #order_review_heading,
	form.checkout #order_review {
		grid-column: 2;
	}
}

.woocommerce-checkout h3,
#order_review_heading {
	margin: 0 0 14px;
	color: var(--hx-violet);
	font-family: var(--hx-pochoir);
	font-size: var(--hx-t-chiffre);
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
}

.woocommerce form .form-row {
	margin: 0 0 14px;
	padding: 0;
}

.woocommerce form .form-row-first,
.woocommerce form .form-row-last {
	width: 100%;
	float: none;
}

@media (min-width: 560px) {
	.woocommerce form .form-row-first,
	.woocommerce form .form-row-last {
		width: 48.5%;
		float: left;
	}

	.woocommerce form .form-row-last {
		float: right;
	}
}

.woocommerce form .form-row .required {
	color: var(--hx-rouge);
	text-decoration: none;
}

/* Lieu de livraison sur la carte */
.hx-lieu {
	clear: both;
	margin: 8px 0 24px;
	padding: 0;
	border: 0;
}

.hx-lieu__titre {
	margin-bottom: 4px;
	color: var(--hx-violet);
	font-size: var(--hx-t-etiquette);
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.hx-lieu__titre abbr {
	color: var(--hx-rouge);
	text-decoration: none;
}

.hx-lieu__aide {
	margin: 0 0 10px;
	color: var(--hx-encre-douce);
	font-size: var(--hx-t-petit);
}

.hx-lieu__outils {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}

.hx-lieu__recherche {
	position: relative;
	display: flex;
	flex: 1 1 260px;
	gap: 8px;
}

/* Suggestions de lieux sous le champ de recherche */
.hx-lieu__suggestions {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 1100; /* au-dessus des boutons de zoom de Leaflet (1000) */
	max-height: 320px;
	margin: 4px 0 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
	background: var(--hx-papier);
	border: 2px solid var(--hx-violet);
	border-radius: 3px;
	box-shadow: 0 18px 36px -18px rgba(21, 19, 26, 0.45), 0 1px 3px rgba(21, 19, 26, 0.2);
}

.hx-lieu__suggestion {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-height: 48px;
	padding: 8px 12px;
	border-bottom: 1.5px solid var(--hx-violet-pale);
	cursor: pointer;
}

.hx-lieu__suggestion:last-child {
	border-bottom: 0;
}

.hx-lieu__suggestion span {
	color: var(--hx-encre-douce);
	font-size: var(--hx-t-petit);
}

.hx-lieu__suggestion.est-active,
.hx-lieu__suggestion[role=option]:hover {
	background: var(--hx-violet-pale);
}

.hx-lieu__suggestion--info {
	color: var(--hx-encre-douce);
	font-size: var(--hx-t-petit);
	cursor: default;
}

.hx-lieu__recherche input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 48px;
	padding: 8px 12px;
	border: 0;
	border-bottom: 2px solid var(--hx-violet);
	background: var(--hx-violet-pale);
	font-size: var(--hx-t-corps);
}

.hx-lieu .button,
.hx-aide .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 8px 14px;
	border: 0;
	border-radius: 4px;
	background: var(--hx-violet);
	color: var(--hx-papier);
	font-family: var(--hx-pochoir);
	font-size: var(--hx-t-corps);
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	box-shadow: none;
	cursor: pointer;
}

.hx-lieu .button:hover,
.hx-aide .button:hover {
	background: var(--hx-violet-fonce);
	color: var(--hx-papier);
}

.hx-lieu .hx-lieu__position {
	background: var(--hx-jaune);
	color: var(--hx-encre);
}

.hx-lieu__carte {
	height: 320px;
	border: 2px solid var(--hx-violet);
	border-radius: 3px;
	background: var(--hx-violet-pale);
}

.hx-lieu__etat {
	margin: 8px 0 0;
	color: var(--hx-violet);
	font-weight: 700;
}

/* Récapitulatif de la commande */
#order_review {
	padding: 18px;
	background: var(--hx-papier);
	border-radius: 3px;
	box-shadow: 0 18px 36px -18px rgba(21, 19, 26, 0.45), 0 1px 3px rgba(21, 19, 26, 0.2);
}

.woocommerce table.shop_table {
	width: 100%;
	margin: 0 0 18px;
	border: 0;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: 10px 0;
	border: 0;
	border-bottom: 1.5px solid var(--hx-violet-pale);
	text-align: left;
	vertical-align: top;
}

.woocommerce table.shop_table td:last-child {
	text-align: right;
}

.woocommerce table.shop_table thead th {
	color: var(--hx-violet);
	font-size: var(--hx-t-etiquette);
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.woocommerce table.shop_table .order-total th,
.woocommerce table.shop_table .order-total td {
	border-top: 4px solid var(--hx-violet);
	border-bottom: 0;
}

.woocommerce table.shop_table .order-total .amount {
	color: var(--hx-violet);
	font-family: var(--hx-pochoir);
	font-size: var(--hx-t-chiffre);
	font-weight: 800;
}

.woocommerce ul#shipping_method {
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce ul#shipping_method li label {
	font-size: var(--hx-t-petit);
}

/* Moyens de paiement */
.woocommerce-checkout #payment {
	background: transparent;
}

.woocommerce-checkout #payment ul.payment_methods {
	margin: 0 0 16px;
	padding: 0;
	border: 0;
	list-style: none;
}

.woocommerce-checkout #payment ul.payment_methods li {
	margin: 0 0 8px;
	padding: 12px 14px;
	border: 2px solid var(--hx-violet-pale);
	border-radius: 3px;
}

.woocommerce-checkout #payment ul.payment_methods li:has(input:checked) {
	border-color: var(--hx-violet);
	background: var(--hx-violet-pale);
}

.woocommerce-checkout #payment ul.payment_methods li label {
	font-weight: 700;
	cursor: pointer;
}

.woocommerce-checkout #payment div.payment_box {
	margin: 8px 0 0;
	padding: 0;
	background: transparent;
	color: var(--hx-encre-douce);
	font-size: var(--hx-t-petit);
}

.woocommerce-checkout #payment div.payment_box::before {
	display: none;
}

/* Moyen de paiement à venir (Wave) : même cadre qu'une option, grisé, non sélectionnable. */
.woocommerce-checkout #payment .hx-moyen-bientot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	/* Le bloc « place-order » de WooCommerce a 16 px de marge intérieure : on s'aligne sur les options au-dessus. */
	margin: -32px -16px 16px;
	padding: 12px 14px;
	border: 2px dashed var(--hx-violet-pale);
	border-radius: 3px;
	color: var(--hx-encre-douce);
	cursor: not-allowed;
}

.woocommerce-checkout #payment .hx-moyen-bientot__nom {
	font-weight: 700;
}

.woocommerce-checkout #payment .hx-moyen-bientot__etat {
	padding: 2px 8px;
	border-radius: 3px;
	background: var(--hx-violet-pale);
	color: var(--hx-violet);
	font-size: var(--hx-t-petit);
	font-weight: 700;
}

.woocommerce #payment #place_order {
	width: 100%;
	min-height: 56px;
	background: var(--hx-jaune);
	color: var(--hx-encre);
	font-size: var(--hx-t-titre);
}

.woocommerce #payment #place_order:hover {
	background: var(--hx-jaune-fonce);
}

/* Page « Commande reçue » : le paiement par QR */
.hx-paiement {
	margin: 24px 0 32px;
	padding: 22px;
	background: var(--hx-jaune);
	border-radius: 3px;
	box-shadow: 0 18px 36px -18px rgba(21, 19, 26, 0.45), 0 1px 3px rgba(21, 19, 26, 0.2);
}

.hx-paiement__titre {
	margin: 0 0 16px;
	color: var(--hx-encre);
	font-family: var(--hx-pochoir);
	font-size: var(--hx-t-section);
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
}

.hx-paiement__corps {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: flex-start;
}

.hx-paiement__qr {
	flex: 0 0 auto;
	width: 240px;
	height: 240px;
	background: var(--hx-papier);
	padding: 10px;
}

.hx-paiement__qr--manquant {
	display: grid;
	place-items: center;
	border: 3px dashed var(--hx-violet);
	color: var(--hx-violet);
	font-weight: 800;
	text-align: center;
}

.hx-paiement__etapes {
	flex: 1 1 240px;
	margin: 0;
	padding-left: 1.2em;
}

.hx-paiement__etapes li {
	margin-bottom: 8px;
}

.hx-paiement__actions {
	flex: 1 1 240px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

.hx-paiement__actions p {
	margin: 0;
}

.hx-paiement__aide {
	font-size: var(--hx-t-petit);
}

.hx-paiement__etat {
	margin: 16px 0 0;
	font-weight: 700;
}

.hx-paiement.est-paye {
	background: var(--hx-violet);
	color: var(--hx-papier);
}

.hx-paiement.est-paye .hx-paiement__titre {
	color: var(--hx-jaune);
}

div.hx-paiement__qr svg,
.hx-paiement__qr img {
	display: block;
	width: 100%;
	height: 100%;
}

/* Livreur : encaisser à la porte */
.hx-encaisser {
	margin-top: 12px;
	padding: 16px;
	background: var(--hx-jaune);
	border-radius: 3px;
}

.hx-encaisser p {
	margin: 0 0 10px;
}

.hx-encaisser__titre {
	font-family: var(--hx-pochoir);
	font-size: var(--hx-t-chiffre);
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
}

.hx-encaisser__choix {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.hx-encaisser__qr {
	width: min(280px, 100%);
	aspect-ratio: 1;
	margin-bottom: 10px;
	padding: 10px;
	background: var(--hx-papier);
}

.hx-encaisser__qr svg,
.hx-encaisser__qr img {
	display: block;
	width: 100%;
	height: 100%;
}

.hx-encaisser__etat {
	font-weight: 700;
}

/* Secours sans API : QR marchand fixe Orange Money */
.hx-encaisser__secours-lien {
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--hx-encre);
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.hx-encaisser__secours {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 2px dashed var(--hx-encre);
}

.hx-encaisser__vu {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 0 0 12px;
	font-weight: 600;
}

.hx-encaisser__vu input {
	flex: none;
	width: 24px;
	height: 24px;
	margin: 0;
}

.hx-encaisser.est-paye {
	background: var(--hx-violet);
	color: var(--hx-papier);
}

/* Quand livrer ? */
.hx-quand {
	clear: both;
	margin: 8px 0 20px;
	padding: 0;
	border: 0;
}

.hx-quand__option {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 10px;
	align-items: center;
	min-height: 48px;
	margin-bottom: 8px;
	padding: 8px 12px;
	border: 2px solid var(--hx-violet-pale);
	border-radius: 3px;
	cursor: pointer;
}

.hx-quand__option:has(input:checked) {
	border-color: var(--hx-violet);
	background: var(--hx-violet-pale);
}

.hx-quand__option input {
	width: 20px;
	height: 20px;
	accent-color: var(--hx-violet);
}

.hx-quand__option select {
	min-height: 40px;
	padding: 4px 8px;
	border: 0;
	border-bottom: 2px solid var(--hx-violet);
	background: var(--hx-papier);
	font-size: var(--hx-t-corps);
}

.hx-quand__option:not(:has(input:checked)) select {
	display: none;
}

/* Offres : lancement, fidélité, heure prévue */
.hx-offre {
	margin: 0 0 14px;
	padding: 10px 14px;
	background: var(--hx-jaune);
	font-weight: 700;
}

/* Épingle de la carte (SVG dans la page, sans image externe) */
.hx-epingle {
	background: none;
	border: 0;
	cursor: grab;
}
.hx-epingle svg {
	display: block;
	overflow: visible;
}
