/* Fiche commande : actions rachat (taille compacte, pas de boutons géants) */
.woocommerce-account .order-again.mc-order-actions,
.mc-order-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 12px;
	align-items: center;
	margin: 1em 0;
}

.woocommerce-account .order-again.mc-order-actions .button,
.mc-order-actions .button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: auto !important;
	max-width: 100%;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 8px 16px !important;
	border-radius: 20px;
	font-size: 13px !important;
	font-weight: 700;
	line-height: 1.3 !important;
	letter-spacing: 0;
	text-transform: none !important;
	white-space: normal;
	text-align: center;
	flex: 0 1 auto;
}

.mc-order-action--buy-again {
	background: #227403 !important;
	border-color: #227403 !important;
	color: #fff !important;
}

.mc-order-action--buy-again:hover,
.mc-order-action--buy-again:focus {
	background: #1a5c02 !important;
	border-color: #1a5c02 !important;
	color: #fff !important;
}

.mc-order-action--add-products {
	background: #fa8400 !important;
	border-color: #fa8400 !important;
	color: #fff !important;
}

.mc-order-action--add-products:hover,
.mc-order-action--add-products:focus {
	background: #e07500 !important;
	border-color: #e07500 !important;
	color: #fff !important;
}

.mc-order-action--show-products {
	background: #fff !important;
	border: 1px solid rgba(34, 116, 3, 0.45) !important;
	color: #227403 !important;
	cursor: pointer;
	max-width: 320px;
}

.mc-order-action--show-products:hover,
.mc-order-action--show-products:focus {
	background: #f4f9ee !important;
	color: #1a5c02 !important;
}

/* Tableau détail commande : liens Actions (Racheter + Facture) */
.woocommerce-account .woocommerce-table.order_details tfoot td {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 12px;
	align-items: center;
}

.woocommerce-account .woocommerce-table.order_details tfoot td a.button,
.woocommerce-account .woocommerce-table.order_details tfoot td a.order-again,
.woocommerce-account .woocommerce-table.order_details tfoot td a.invoice {
	display: inline-block;
	margin: 0 !important;
	padding: 8px 14px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
	text-transform: none !important;
}

.woocommerce-account .woocommerce-table.order_details tfoot td a.order-again {
	background: rgba(250, 132, 0, 0.12);
	border: 1px solid rgba(250, 132, 0, 0.45);
	color: #c96a00 !important;
}

.woocommerce-account .woocommerce-table.order_details tfoot td a.order-again:hover {
	background: #fa8400;
	border-color: #fa8400;
	color: #fff !important;
}

.woocommerce-account .woocommerce-table.order_details tfoot td a.invoice {
	background: #f4f9ee;
	border: 1px solid rgba(34, 116, 3, 0.35);
	color: #227403 !important;
}

.woocommerce-account .woocommerce-table.order_details tfoot td a.invoice:hover {
	background: #227403;
	border-color: #227403;
	color: #fff !important;
}

/* Panneau liste produits */
.mc-order-products-panel {
	margin: 0 0 2em;
	padding: 1.25rem 1.5rem;
	background: #f8fbf5;
	border: 1px solid rgba(34, 116, 3, 0.2);
	border-radius: 12px;
}

.mc-order-products-panel.is-open {
	display: block;
}

.mc-order-products-panel__title {
	margin: 0 0 1rem;
	font-size: 1.15rem;
	font-weight: 700;
	color: #227403;
	text-transform: none;
}

.mc-order-products-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.mc-order-products-list__item {
	display: grid;
	grid-template-columns: 72px 1fr auto;
	gap: 14px 16px;
	align-items: center;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #e8efe3;
	border-radius: 10px;
}

.mc-order-products-list__media img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.mc-order-products-list__name {
	font-weight: 700;
	color: #222;
	text-decoration: none;
	font-size: 15px;
	line-height: 1.35;
	display: block;
	margin-bottom: 4px;
}

.mc-order-products-list__name:hover {
	color: #227403;
}

.mc-order-products-list__meta {
	margin: 0;
	font-size: 13px;
	color: #666;
	line-height: 1.4;
}

.mc-order-products-list__btn {
	background: #227403 !important;
	border-color: #227403 !important;
	color: #fff !important;
	margin: 0 !important;
	padding: 0.6em 1em !important;
	border-radius: 8px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	white-space: nowrap;
	text-transform: none !important;
}

.mc-order-products-list__btn:hover {
	background: #1a5c02 !important;
	border-color: #1a5c02 !important;
	color: #fff !important;
}

.mc-order-products-list__unavailable {
	font-size: 13px;
	color: #888;
	font-style: italic;
}

@media (max-width: 767px) {
	.mc-order-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.mc-order-actions .button {
		width: 100% !important;
		max-width: none;
	}

	.mc-order-products-panel {
		padding: 1rem;
	}

	.mc-order-products-list__item {
		grid-template-columns: 64px 1fr;
		grid-template-areas:
			'media body'
			'action action';
	}

	.mc-order-products-list__media {
		grid-area: media;
	}

	.mc-order-products-list__media img {
		width: 64px;
		height: 64px;
	}

	.mc-order-products-list__body {
		grid-area: body;
	}

	.mc-order-products-list__action {
		grid-area: action;
	}

	.mc-order-products-list__btn {
		display: block;
		width: 100%;
		text-align: center;
	}
}

@media (max-width: 480px) {
	.woocommerce-account .woocommerce-table.order_details tfoot td {
		flex-direction: column;
		align-items: stretch;
	}

	.woocommerce-account .woocommerce-table.order_details tfoot td a.button {
		width: 100%;
		text-align: center;
	}
}
