/**
 * WooCommerce My Account Customizer — overhaul visuel du front.
 * Aucun template n'est surchargé : uniquement les classes natives WooCommerce.
 *
 * Les variables --macc-* sont injectées en inline depuis les réglages ;
 * les valeurs ci-dessous servent de secours.
 */

body.macc {
	--macc-primary: #c8102e;
	--macc-accent: #1b1b1b;
	--macc-bg: #f7f6f4;
	--macc-card: #ffffff;
	--macc-text: #1b1b1b;
	--macc-on-primary: #ffffff;
	--macc-radius: 10px;
	--macc-nav-width: 280px;

	/* Dérivés */
	--macc-muted: color-mix(in srgb, var(--macc-text) 55%, transparent);
	--macc-line: color-mix(in srgb, var(--macc-text) 10%, transparent);
	--macc-soft: color-mix(in srgb, var(--macc-text) 4%, transparent);
	--macc-primary-soft: color-mix(in srgb, var(--macc-primary) 9%, transparent);
	--macc-shadow: 0 1px 2px rgba(27, 27, 27, 0.04);
	--macc-radius-sm: max(4px, calc(var(--macc-radius) - 4px));

	background-color: var(--macc-bg);
}

/* =========================================================
   Layout général (nav + contenu)
   ========================================================= */

body.macc-has-nav .woocommerce:has(> .woocommerce-MyAccount-navigation) {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	align-items: flex-start;
}

body.macc-has-nav.macc-nav-right .woocommerce:has(> .woocommerce-MyAccount-navigation) {
	flex-direction: row-reverse;
}

body.macc-has-nav.macc-nav-top .woocommerce:has(> .woocommerce-MyAccount-navigation) {
	flex-direction: column;
	gap: 24px;
}

/* Les notices imprimées dans le même wrapper occupent toute la largeur. */
body.macc .woocommerce > .woocommerce-notices-wrapper,
body.macc .woocommerce > .woocommerce-message,
body.macc .woocommerce > .woocommerce-info,
body.macc .woocommerce > .woocommerce-error {
	flex: 1 1 100%;
	width: 100%;
}

body.macc .woocommerce > .woocommerce-notices-wrapper:empty {
	display: none;
}

body.macc .woocommerce-MyAccount-navigation {
	flex: 0 0 var(--macc-nav-width);
	max-width: var(--macc-nav-width);
	position: sticky;
	top: 32px;
}

body.macc.macc-nav-top .woocommerce-MyAccount-navigation {
	flex: 1 1 100%;
	max-width: none;
	position: static;
}

body.macc .woocommerce-MyAccount-content {
	flex: 1;
	min-width: 0;
}

/* =========================================================
   Navigation — base commune
   ========================================================= */

body.macc .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

body.macc.macc-nav-top .woocommerce-MyAccount-navigation ul {
	flex-direction: row;
	flex-wrap: wrap;
}

body.macc .woocommerce-MyAccount-navigation-link {
	margin: 0;
}

body.macc .woocommerce-MyAccount-navigation-link a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-radius: var(--macc-radius-sm);
	color: color-mix(in srgb, var(--macc-text) 78%, transparent);
	text-decoration: none;
	font-weight: 500;
	font-size: 15px;
	line-height: 1.3;
	transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

body.macc .woocommerce-MyAccount-navigation-link a:hover {
	background: var(--macc-primary-soft);
	color: var(--macc-primary);
}

body.macc .woocommerce-MyAccount-navigation-link a:focus-visible {
	outline: 2px solid var(--macc-primary);
	outline-offset: 2px;
}

body.macc .woocommerce-MyAccount-navigation-link.is-active a {
	background: var(--macc-primary-soft);
	color: var(--macc-primary);
	font-weight: 600;
}

/* Point indicateur discret à droite du lien actif (style carte) */
body.macc.macc-style-card .woocommerce-MyAccount-navigation-link.is-active a::after {
	content: '';
	flex: none;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--macc-primary);
	margin-left: auto;
}

/* ---------- Icônes par endpoint (mask SVG) ---------- */

body.macc .woocommerce-MyAccount-navigation-link a::before {
	content: '';
	flex: none;
	width: 19px;
	height: 19px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9 12h6'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9 12h6'/%3E%3C/svg%3E") no-repeat center / contain;
}

body.macc .woocommerce-MyAccount-navigation-link--dashboard a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12l9-9 9 9'/%3E%3Cpath d='M5 10v10h14V10'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12l9-9 9 9'/%3E%3Cpath d='M5 10v10h14V10'/%3E%3C/svg%3E");
}

body.macc .woocommerce-MyAccount-navigation-link--orders a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 7h12l1 14H5L6 7z'/%3E%3Cpath d='M9 7a3 3 0 0 1 6 0'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 7h12l1 14H5L6 7z'/%3E%3Cpath d='M9 7a3 3 0 0 1 6 0'/%3E%3C/svg%3E");
}

body.macc .woocommerce-MyAccount-navigation-link--downloads a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E");
}

body.macc .woocommerce-MyAccount-navigation-link--edit-address a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13S3 17 3 10a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13S3 17 3 10a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

body.macc .woocommerce-MyAccount-navigation-link--payment-methods a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='4' width='22' height='16' rx='2'/%3E%3Cpath d='M1 10h22'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='4' width='22' height='16' rx='2'/%3E%3Cpath d='M1 10h22'/%3E%3C/svg%3E");
}

body.macc .woocommerce-MyAccount-navigation-link--edit-account a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

body.macc .woocommerce-MyAccount-navigation-link--customer-logout a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E");
}

/* ---------- Déconnexion : séparée et discrète ---------- */

body.macc:not(.macc-nav-top) .woocommerce-MyAccount-navigation-link--customer-logout {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--macc-line);
}

body.macc .woocommerce-MyAccount-navigation-link--customer-logout a {
	color: var(--macc-muted);
}

body.macc .woocommerce-MyAccount-navigation-link--customer-logout a:hover {
	background: color-mix(in srgb, #b32d2e 9%, transparent);
	color: #b32d2e;
}

/* =========================================================
   Navigation — variantes de style
   ========================================================= */

/* --- Carte (défaut) --- */

body.macc.macc-style-card .woocommerce-MyAccount-navigation ul {
	background: var(--macc-card);
	border: 1px solid var(--macc-line);
	border-radius: var(--macc-radius);
	box-shadow: var(--macc-shadow);
	padding: 8px;
}

/* --- Pills --- */

body.macc.macc-style-pills .woocommerce-MyAccount-navigation ul {
	gap: 6px;
}

body.macc.macc-style-pills .woocommerce-MyAccount-navigation-link a {
	background: var(--macc-card);
	border: 1px solid var(--macc-line);
	border-radius: 999px;
	padding: 11px 18px;
}

body.macc.macc-style-pills .woocommerce-MyAccount-navigation-link a:hover {
	background: var(--macc-primary-soft);
	border-color: color-mix(in srgb, var(--macc-primary) 30%, transparent);
}

body.macc.macc-style-pills .woocommerce-MyAccount-navigation-link.is-active a {
	background: var(--macc-primary);
	border-color: var(--macc-primary);
	color: var(--macc-on-primary);
}

body.macc.macc-style-pills:not(.macc-nav-top) .woocommerce-MyAccount-navigation-link--customer-logout {
	border-top: 0;
}

/* --- Minimal --- */

body.macc.macc-style-minimal .woocommerce-MyAccount-navigation-link a {
	background: transparent;
	border-radius: 0;
	border-left: 3px solid transparent;
	padding: 11px 14px;
}

body.macc.macc-style-minimal .woocommerce-MyAccount-navigation-link a:hover {
	background: transparent;
	border-left-color: color-mix(in srgb, var(--macc-primary) 40%, transparent);
	color: var(--macc-primary);
}

body.macc.macc-style-minimal .woocommerce-MyAccount-navigation-link.is-active a {
	background: transparent;
	border-left-color: var(--macc-primary);
	color: var(--macc-primary);
	font-weight: 700;
	box-shadow: none;
}

body.macc.macc-style-minimal.macc-nav-top .woocommerce-MyAccount-navigation-link a {
	border-left: 0;
	border-bottom: 3px solid transparent;
}

body.macc.macc-style-minimal.macc-nav-top .woocommerce-MyAccount-navigation-link a:hover,
body.macc.macc-style-minimal.macc-nav-top .woocommerce-MyAccount-navigation-link.is-active a {
	border-bottom-color: var(--macc-primary);
}

/* Nav horizontale : la déconnexion est poussée à droite */

body.macc.macc-nav-top .woocommerce-MyAccount-navigation-link--customer-logout {
	margin-left: auto;
}

/* =========================================================
   Contenu : carte principale
   ========================================================= */

body.macc-has-nav .woocommerce-MyAccount-content {
	background: var(--macc-card);
	border: 1px solid var(--macc-line);
	border-radius: var(--macc-radius);
	box-shadow: var(--macc-shadow);
	padding: clamp(24px, 4vw, 40px);
	color: var(--macc-text);
	font-size: 15px;
	line-height: 1.65;
}

body.macc .woocommerce-MyAccount-content > p:first-child {
	margin-top: 0;
}

/* ---------- Navigation AJAX : chargement + apparition ---------- */

body.macc .woocommerce-MyAccount-content {
	position: relative;
	width: 100%;
}

body.macc .woocommerce-MyAccount-content.macc-loading {
	pointer-events: none;
	user-select: none;
}

body.macc .woocommerce-MyAccount-content.macc-loading::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 5;
	border-radius: inherit;
	background: color-mix(in srgb, var(--macc-card) 60%, transparent);
	animation: macc-veil-in 0.18s ease;
}

body.macc .woocommerce-MyAccount-content.macc-loading::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 6;
	width: 36px;
	height: 36px;
	margin: -18px 0 0 -18px;
	border: 3px solid var(--macc-primary-soft);
	border-top-color: var(--macc-primary);
	border-radius: 50%;
	animation: macc-spin 0.7s linear infinite;
}

body.macc .woocommerce-MyAccount-content.macc-swapped {
	animation: macc-content-in 0.28s ease;
}

@keyframes macc-spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes macc-veil-in {
	from {
		opacity: 0;
	}
}

@keyframes macc-content-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

body.macc .woocommerce-MyAccount-content a:not(.button) {
	color: var(--macc-primary);
	text-decoration: none;
	font-weight: 600;
	transition: color 0.15s ease;
}

body.macc .woocommerce-MyAccount-content a:not(.button):hover {
	color: color-mix(in srgb, var(--macc-primary) 75%, var(--macc-accent));
	text-decoration: underline;
}

/* Titres du contenu (adresses, détails de commande...) */

body.macc .woocommerce-MyAccount-content h2,
body.macc .woocommerce-MyAccount-content h3 {
	color: var(--macc-accent);
	font-weight: 700;
	line-height: 1.3;
	margin: 1.6em 0 0.7em;
	position: relative;
	padding-bottom: 10px;
}

body.macc .woocommerce-MyAccount-content h2::after,
body.macc .woocommerce-MyAccount-content h3::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 36px;
	height: 3px;
	border-radius: 2px;
	background: var(--macc-primary);
}

body.macc .woocommerce-MyAccount-content h2:first-child,
body.macc .woocommerce-MyAccount-content h3:first-child {
	margin-top: 0;
}

/* =========================================================
   Boutons
   ========================================================= */

body.macc .woocommerce a.button,
body.macc .woocommerce button.button,
body.macc .woocommerce input.button,
body.macc .woocommerce button[type='submit'] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--macc-primary);
	color: var(--macc-on-primary);
	border: 0;
	border-radius: var(--macc-radius-sm);
	padding: 12px 24px;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.16s ease;
}

body.macc .woocommerce a.button:hover,
body.macc .woocommerce button.button:hover,
body.macc .woocommerce input.button:hover,
body.macc .woocommerce button[type='submit']:hover {
	background: color-mix(in srgb, var(--macc-primary) 86%, #000);
	color: var(--macc-on-primary);
}

body.macc .woocommerce a.button:focus-visible,
body.macc .woocommerce button.button:focus-visible,
body.macc .woocommerce button[type='submit']:focus-visible {
	outline: 2px solid var(--macc-accent);
	outline-offset: 2px;
}

body.macc .woocommerce button.button:disabled,
body.macc .woocommerce button.button:disabled[disabled] {
	background: var(--macc-soft);
	color: var(--macc-muted);
	box-shadow: none;
	cursor: not-allowed;
}

/* Boutons secondaires dans les tableaux (voir, annuler, télécharger...) */

body.macc .woocommerce table.shop_table a.button {
	padding: 8px 16px;
	font-size: 13px;
	box-shadow: none;
}

body.macc .woocommerce table.shop_table a.button.cancel,
body.macc .woocommerce table.shop_table a.button:not(.view):not(.pay) {
	background: transparent;
	color: var(--macc-text);
	border: 1px solid var(--macc-line);
}

body.macc .woocommerce table.shop_table a.button.cancel:hover,
body.macc .woocommerce table.shop_table a.button:not(.view):not(.pay):hover {
	background: var(--macc-soft);
	color: var(--macc-primary);
	border-color: color-mix(in srgb, var(--macc-primary) 35%, transparent);
}

body.macc .woocommerce table.shop_table a.button.view,
body.macc .woocommerce table.shop_table a.button.pay {
	background: var(--macc-primary);
	color: var(--macc-on-primary);
}

/* =========================================================
   Tableaux (commandes, téléchargements, détails)
   ========================================================= */

body.macc .woocommerce table.shop_table {
	width: 100%;
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
	margin: 0 0 1.5em;
	font-size: 14px;
	border-radius: var(--macc-radius-sm);
	overflow: hidden;
	border: 1px solid var(--macc-line);
}

body.macc .woocommerce table.shop_table thead th {
	background: var(--macc-soft);
	color: var(--macc-muted);
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 13px 16px;
	border: 0;
	text-align: left;
}

body.macc .woocommerce table.shop_table tbody td,
body.macc .woocommerce table.shop_table tbody th,
body.macc .woocommerce table.shop_table tfoot td,
body.macc .woocommerce table.shop_table tfoot th {
	padding: 14px 16px;
	border: 0;
	border-top: 1px solid var(--macc-line);
	vertical-align: middle;
	text-align: left;
}

body.macc .woocommerce table.shop_table tbody tr {
	transition: background-color 0.12s ease;
}

body.macc .woocommerce table.shop_table tbody tr:hover {
	background: var(--macc-soft);
}

body.macc .woocommerce table.shop_table tfoot th,
body.macc .woocommerce table.shop_table tfoot td {
	font-weight: 600;
	background: var(--macc-soft);
}

/* ---------- Statuts de commande : pastille colorée ---------- */

body.macc .woocommerce-orders-table td.woocommerce-orders-table__cell-order-status {
	font-weight: 700;
	white-space: nowrap;
}

/* Point coloré devant le statut (desktop uniquement : sur mobile le ::before
   affiche le label data-title du tableau responsive). */
@media (min-width: 769px) {
	body.macc .woocommerce-orders-table td.woocommerce-orders-table__cell-order-status::before {
		content: '';
		display: inline-block;
		width: 8px;
		height: 8px;
		border-radius: 50%;
		margin-right: 8px;
		vertical-align: middle;
		background: currentColor;
	}
}

body.macc .woocommerce-orders-table__row--status-completed td.woocommerce-orders-table__cell-order-status {
	color: #1f7a3d;
}

body.macc .woocommerce-orders-table__row--status-processing td.woocommerce-orders-table__cell-order-status {
	color: #1d6fb8;
}

body.macc .woocommerce-orders-table__row--status-on-hold td.woocommerce-orders-table__cell-order-status {
	color: #9a6700;
}

body.macc .woocommerce-orders-table__row--status-pending td.woocommerce-orders-table__cell-order-status {
	color: #b07d12;
}

body.macc .woocommerce-orders-table__row--status-cancelled td.woocommerce-orders-table__cell-order-status {
	color: #6b6b6b;
}

body.macc .woocommerce-orders-table__row--status-refunded td.woocommerce-orders-table__cell-order-status {
	color: #6b4ba3;
}

body.macc .woocommerce-orders-table__row--status-failed td.woocommerce-orders-table__cell-order-status {
	color: #b32d2e;
}

/* Numéro de commande mis en avant */

body.macc .woocommerce-orders-table__cell-order-number a {
	font-weight: 700;
}

/* ---------- Pagination des commandes ---------- */

body.macc .woocommerce-pagination--without-numbers {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

body.macc .woocommerce-pagination a.button {
	background: transparent;
	color: var(--macc-text);
	border: 1px solid var(--macc-line);
	box-shadow: none;
}

body.macc .woocommerce-pagination a.button:hover {
	background: var(--macc-primary-soft);
	color: var(--macc-primary);
	border-color: color-mix(in srgb, var(--macc-primary) 35%, transparent);
}

/* =========================================================
   Formulaires (compte, adresses, connexion)
   ========================================================= */

body.macc .woocommerce form .form-row label {
	font-weight: 600;
	font-size: 13.5px;
	color: var(--macc-accent);
	margin-bottom: 5px;
}

body.macc .woocommerce form .form-row input.input-text,
body.macc .woocommerce form .form-row textarea,
body.macc .woocommerce form .form-row select,
body.macc .woocommerce form .form-row .select2-selection {
	background: var(--macc-card);
	color: var(--macc-text);
	border: 1.5px solid color-mix(in srgb, var(--macc-text) 16%, transparent);
	border-radius: var(--macc-radius-sm);
	padding: 11px 14px;
	font-size: 14.5px;
	line-height: 1.4;
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.macc .woocommerce form .form-row input.input-text:focus,
body.macc .woocommerce form .form-row textarea:focus,
body.macc .woocommerce form .form-row select:focus {
	outline: none;
	border-color: var(--macc-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--macc-primary) 18%, transparent);
}

body.macc .woocommerce form .form-row.woocommerce-invalid input.input-text {
	border-color: #b32d2e;
}

body.macc .woocommerce form .form-row .required {
	color: var(--macc-primary);
	text-decoration: none;
}

/* Fieldset (changement de mot de passe) */

body.macc .woocommerce form fieldset {
	border: 1px solid var(--macc-line);
	border-radius: var(--macc-radius-sm);
	padding: 20px 22px;
	margin: 1.5em 0;
	background: var(--macc-soft);
}

body.macc .woocommerce form fieldset legend {
	font-weight: 700;
	color: var(--macc-accent);
	padding: 0 8px;
	background: transparent;
}

/* Œil afficher / masquer mot de passe */

body.macc .woocommerce form .show-password-input::after {
	color: var(--macc-muted);
}

/* =========================================================
   Adresses
   ========================================================= */


.u-columns.woocommerce-Addresses.col2-set.addresses::before,
.u-columns.woocommerce-Addresses.col2-set.addresses::after{
	display: none;
}

body.macc .woocommerce-Address-title::before,
body.macc .woocommerce-Address-title::after{
	display: none !important;
}
   

body.macc .woocommerce-Addresses {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

body.macc .woocommerce-Addresses .woocommerce-Address {
	flex: 1 1 280px;
	max-width: none;
	width: auto;
	float: none;
	display: flex;
	flex-direction: column;
	background: var(--macc-card);
	border: 1px solid var(--macc-line);
	border-radius: var(--macc-radius-sm);
	padding: 0;
	overflow: hidden;
	transition: border-color 0.15s ease;
}

body.macc .woocommerce-Addresses .woocommerce-Address:hover {
	border-color: color-mix(in srgb, var(--macc-primary) 30%, transparent);
}

/* En-tête de carte : icône + titre + bouton modifier */

body.macc .woocommerce-Address-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 13px 18px;
	background: var(--macc-soft);
	border-bottom: 1px solid var(--macc-line);
}

body.macc .woocommerce-MyAccount-content .woocommerce-Address-title h2,
body.macc .woocommerce-MyAccount-content .woocommerce-Address-title h3 {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 !important;
	padding: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--macc-accent);
}

body.macc .woocommerce-MyAccount-content .woocommerce-Address-title h2::after,
body.macc .woocommerce-MyAccount-content .woocommerce-Address-title h3::after {
	display: none;
}

body.macc .woocommerce-MyAccount-content .woocommerce-Address-title h2::before,
body.macc .woocommerce-MyAccount-content .woocommerce-Address-title h3::before {
	content: '';
	position: static;
	flex: none;
	width: 18px;
	height: 18px;
	border-radius: 0;
	background: var(--macc-primary);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13S3 17 3 10a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13S3 17 3 10a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Facturation : icône carte bancaire */
body.macc .woocommerce-MyAccount-content .u-column1.woocommerce-Address .woocommerce-Address-title h2::before,
body.macc .woocommerce-MyAccount-content .u-column1.woocommerce-Address .woocommerce-Address-title h3::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='4' width='22' height='16' rx='2'/%3E%3Cpath d='M1 10h22'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='4' width='22' height='16' rx='2'/%3E%3Cpath d='M1 10h22'/%3E%3C/svg%3E");
}

/* Livraison : icône camion */
body.macc .woocommerce-MyAccount-content .u-column2.woocommerce-Address .woocommerce-Address-title h2::before,
body.macc .woocommerce-MyAccount-content .u-column2.woocommerce-Address .woocommerce-Address-title h3::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='5' width='14' height='11' rx='1'/%3E%3Cpath d='M15 8h4l4 4v4h-8'/%3E%3Ccircle cx='6' cy='19' r='1.8'/%3E%3Ccircle cx='18' cy='19' r='1.8'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='5' width='14' height='11' rx='1'/%3E%3Cpath d='M15 8h4l4 4v4h-8'/%3E%3Ccircle cx='6' cy='19' r='1.8'/%3E%3Ccircle cx='18' cy='19' r='1.8'/%3E%3C/svg%3E");
}

body.macc .woocommerce-Address-title p {
	margin: 0 0 0 auto;
	flex: none;
}

body.macc .woocommerce-MyAccount-content .woocommerce-Address-title a.edit {
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	border: 1px solid color-mix(in srgb, var(--macc-primary) 35%, transparent);
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--macc-primary);
	white-space: nowrap;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

body.macc .woocommerce-MyAccount-content .woocommerce-Address-title a.edit:hover {
	background: var(--macc-primary);
	border-color: var(--macc-primary);
	color: var(--macc-on-primary);
	text-decoration: none;
}

/* Corps de carte */

body.macc .woocommerce-Address address,
body.macc .woocommerce-customer-details address {
	font-style: normal;
	line-height: 1.8;
	color: var(--macc-muted);
	border: 0;
	padding: 0;
}

body.macc .woocommerce-Addresses .woocommerce-Address address {
	padding: 16px 18px 18px;
	flex: 1;
	font-size: 14px;
}

/* =========================================================
   Détails de commande / client
   ========================================================= */

body.macc .woocommerce-customer-details address {
	background: var(--macc-soft);
	border: 1px solid var(--macc-line) !important;
	border-radius: var(--macc-radius-sm);
	padding: 20px 22px !important;
}

body.macc .woocommerce-customer-details .woocommerce-customer-details--phone,
body.macc .woocommerce-customer-details .woocommerce-customer-details--email {
	margin: 6px 0 0;
}

body.macc .woocommerce-order-details__title,
body.macc .woocommerce-column__title {
	font-size: 19px;
}

body.macc .woocommerce-table--order-details .product-name a {
	font-weight: 600;
}

body.macc .woocommerce-table--order-details .product-quantity {
	color: var(--macc-muted);
	font-weight: 500;
}

/* mark (statut / date dans « commande n°X ») */

body.macc .woocommerce-MyAccount-content mark {
	background: var(--macc-primary-soft);
	color: var(--macc-primary);
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 6px;
}

/* =========================================================
   Moyens de paiement
   ========================================================= */

body.macc .woocommerce-MyAccount-paymentMethods .payment-method-actions .button {
	margin-right: 6px;
}

/* =========================================================
   Notices WooCommerce
   ========================================================= */

body.macc .woocommerce .woocommerce-message,
body.macc .woocommerce .woocommerce-info,
body.macc .woocommerce .woocommerce-error {
	border-radius: var(--macc-radius-sm);
	border: 1px solid;
	border-top-width: 1px;
	padding: 16px 20px 16px 52px;
	margin-bottom: 24px;
	background: var(--macc-card);
	box-shadow: var(--macc-shadow);
	font-size: 14.5px;
	line-height: 1.5;
}

body.macc .woocommerce .woocommerce-message::before,
body.macc .woocommerce .woocommerce-info::before,
body.macc .woocommerce .woocommerce-error::before {
	top: 16px;
	left: 20px;
}

body.macc .woocommerce .woocommerce-message {
	border-color: #bfe3c8;
	background: #eef8f0;
	color: #1f5c33;
}

body.macc .woocommerce .woocommerce-message::before {
	color: #1f7a3d;
}

body.macc .woocommerce .woocommerce-info {
	border-color: color-mix(in srgb, var(--macc-primary) 25%, transparent);
	background: var(--macc-primary-soft);
	color: var(--macc-accent);
}

body.macc .woocommerce .woocommerce-info::before {
	color: var(--macc-primary);
}

body.macc .woocommerce .woocommerce-error {
	border-color: #e7b3b4;
	background: #fdf0f0;
	color: #7a1f20;
}

body.macc .woocommerce .woocommerce-error::before {
	color: #b32d2e;
}

body.macc .woocommerce .woocommerce-message .button,
body.macc .woocommerce .woocommerce-info .button,
body.macc .woocommerce .woocommerce-error .button {
	padding: 7px 14px;
	font-size: 13px;
	box-shadow: none;
}

/* =========================================================
   Connexion / inscription / mot de passe perdu
   ========================================================= */

body.macc .woocommerce form.login,
body.macc .woocommerce form.register,
body.macc .woocommerce form.lost_reset_password {
	background: var(--macc-card);
	border: 1px solid var(--macc-line);
	border-radius: var(--macc-radius);
	box-shadow: var(--macc-shadow);
	padding: clamp(24px, 4vw, 36px);
	margin: 0;
}

body.macc .woocommerce #customer_login h2,
body.macc .woocommerce-lost-password .woocommerce h2 {
	color: var(--macc-accent);
	font-weight: 700;
	position: relative;
	padding-bottom: 10px;
	margin-bottom: 18px;
}

body.macc .woocommerce #customer_login h2::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 36px;
	height: 3px;
	border-radius: 2px;
	background: var(--macc-primary);
}

body.macc .woocommerce form.login .lost_password a,
body.macc .woocommerce form .woocommerce-LostPassword a {
	color: var(--macc-primary);
	font-weight: 600;
	text-decoration: none;
}

body.macc .woocommerce form.login .lost_password a:hover {
	text-decoration: underline;
}

body.macc .woocommerce form .woocommerce-form-login__rememberme {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

body.macc .woocommerce form input[type='checkbox'] {
	accent-color: var(--macc-primary);
	width: 16px;
	height: 16px;
}

/* La note de confidentialité sous le formulaire d'inscription */

body.macc .woocommerce form.register .woocommerce-privacy-policy-text p {
	font-size: 12.5px;
	color: var(--macc-muted);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
	body.macc-has-nav .woocommerce:has(> .woocommerce-MyAccount-navigation),
	body.macc-has-nav.macc-nav-right .woocommerce:has(> .woocommerce-MyAccount-navigation) {
		flex-direction: column;
		gap: 20px;
	}

	body.macc .woocommerce-MyAccount-navigation {
		position: static;
		flex: 1 1 100%;
		max-width: none;
		width: 100%;
	}

	/* Nav horizontale scrollable en pills */
	body.macc .woocommerce-MyAccount-navigation ul {
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		overflow-x: auto;
		gap: 8px;
		padding: 4px 2px 10px;
		background: transparent !important;
		border: 0 !important;
		box-shadow: none !important;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	body.macc .woocommerce-MyAccount-navigation ul::-webkit-scrollbar {
		display: none;
	}

	body.macc .woocommerce-MyAccount-navigation-link a {
		white-space: nowrap;
		background: var(--macc-card);
		border: 1px solid var(--macc-line);
		border-radius: 999px;
		padding: 10px 16px;
		font-size: 14px;
	}

	body.macc .woocommerce-MyAccount-navigation-link.is-active a {
		background: var(--macc-primary);
		border-color: var(--macc-primary);
		color: var(--macc-on-primary);
	}

	body.macc:not(.macc-nav-top) .woocommerce-MyAccount-navigation-link--customer-logout {
		margin-top: 0;
		padding-top: 0;
		border-top: 0;
	}

	body.macc.macc-nav-top .woocommerce-MyAccount-navigation-link--customer-logout {
		margin-left: 0;
	}

	body.macc-has-nav .woocommerce-MyAccount-content {
		padding: 20px;
	}
}

/* Tableaux responsives WooCommerce : lignes en cartes */

@media (max-width: 768px) {
	body.macc .woocommerce table.shop_table_responsive {
		border: 0;
		overflow: visible;
	}

	body.macc .woocommerce table.shop_table_responsive thead {
		display: none;
	}

	body.macc .woocommerce table.shop_table_responsive tbody tr {
		display: block;
		background: var(--macc-card) !important;
		border: 1px solid var(--macc-line);
		border-radius: var(--macc-radius-sm);
		margin-bottom: 14px;
		padding: 6px 16px;
		box-shadow: 0 1px 3px rgba(27, 27, 27, 0.05);
	}

	body.macc .woocommerce table.shop_table_responsive tbody tr td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		text-align: right !important;
		padding: 11px 0;
		border: 0;
		border-bottom: 1px solid var(--macc-line);
		background: transparent !important;
	}

	body.macc .woocommerce table.shop_table_responsive tbody tr td:last-child {
		border-bottom: 0;
	}

	body.macc .woocommerce table.shop_table_responsive tbody tr td::before {
		content: attr(data-title);
		font-weight: 600;
		color: var(--macc-muted);
		font-size: 12.5px;
		text-transform: uppercase;
		letter-spacing: 0.04em;
		float: none;
	}

	body.macc .woocommerce table.shop_table_responsive tbody tr td.woocommerce-orders-table__cell-order-actions::before {
		content: '';
	}

	body.macc .woocommerce-Addresses {
		flex-direction: column;
	}
}

/* =========================================================
   Correctifs wpautop (le shortcode passe dans un widget
   texte Elementor : <br> et <p> vides parasites)
   ========================================================= */

body.macc .woocommerce-MyAccount-navigation a br,
body.macc .woocommerce form .form-row br,
body.macc .woocommerce-form-row br,
body.macc .woocommerce-Address-title br,
body.macc .macc-profile br,
body.macc .macc-dash br {
	display: none;
}

body.macc .woocommerce-MyAccount-content p:empty,
body.macc .woocommerce-Addresses > p:empty,
body.macc .woocommerce-Address > p:empty {
	display: none;
	margin: 0;
}

body.macc .woocommerce-Address-title p {
	margin: 0;
}

/* =========================================================
   Carte profil (déplacée dans la nav par front.js)
   ========================================================= */

.macc-profile {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--macc-card);
	border: 1px solid var(--macc-line);
	border-radius: var(--macc-radius);
	box-shadow: var(--macc-shadow);
	padding: 16px 18px;
	min-width: 0;
}

/* Fallback sans JS : la carte reste un enfant direct du wrapper flex */
body.macc .woocommerce > .macc-profile {
	flex: 0 0 var(--macc-nav-width);
	max-width: var(--macc-nav-width);
}

body.macc .woocommerce-MyAccount-navigation .macc-profile {
	margin-bottom: 14px;
}

.macc-profile__avatar {
	flex: none;
	display: block;
}

.macc-profile__avatar img {
	display: block;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
}

.macc-profile__meta {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}

.macc-profile__name {
	font-size: 15px;
	font-weight: 700;
	color: var(--macc-accent);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.macc-profile__email {
	font-size: 12.5px;
	color: var(--macc-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.macc-profile__since {
	margin-top: 4px;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--macc-primary);
}

/* =========================================================
   Tableau de bord enrichi
   ========================================================= */

/* Les deux paragraphes natifs du dashboard sont remplacés par le hero */
body.macc.macc-endpoint-dashboard .woocommerce-MyAccount-content > p {
	display: none;
}

.macc-dash {
	display: block;
}

/* ---------- Hero ---------- */

.macc-dash-hero {
	display: block;
	margin-bottom: 24px;
}

.macc-dash-hero__title {
	display: block;
	font-size: clamp(22px, 3vw, 27px);
	font-weight: 700;
	line-height: 1.2;
	color: var(--macc-accent);
	margin-bottom: 6px;
}

.macc-dash-hero__sub {
	display: block;
	color: var(--macc-muted);
	font-size: 14.5px;
	max-width: 56ch;
}

/* ---------- Tuiles de stats ---------- */

.macc-dash-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 14px;
	margin: 0 0 30px;
}

.macc-stat {
	background: var(--macc-soft);
	border: 1px solid var(--macc-line);
	border-radius: var(--macc-radius-sm);
	padding: 16px 18px;
	min-width: 0;
}

.macc-stat__label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--macc-muted);
	margin-bottom: 7px;
}

.macc-stat__value {
	display: block;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--macc-accent);
	font-variant-numeric: tabular-nums;
}

.macc-stat__value--text {
	font-size: 16px;
}

.macc-stat__value .woocommerce-Price-amount {
	color: inherit;
}

/* ---------- Titres de sections ---------- */

.macc-dash-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	margin: 26px 0 12px;
}

.macc-dash-head__title {
	font-size: 15px;
	font-weight: 700;
	color: var(--macc-accent);
}

body.macc .woocommerce-MyAccount-content a.macc-dash-head__more {
	font-size: 13px;
}

/* ---------- Dernières commandes ---------- */

.macc-dash-orders {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--macc-line);
	border-radius: var(--macc-radius-sm);
	overflow: hidden;
	margin-bottom: 6px;
}

body.macc .woocommerce-MyAccount-content a.macc-dash-order {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 13px 16px;
	color: var(--macc-text);
	font-weight: 500;
	border-top: 1px solid var(--macc-line);
	transition: background-color 0.12s ease;
}

body.macc .woocommerce-MyAccount-content a.macc-dash-order:first-child {
	border-top: 0;
}

body.macc .woocommerce-MyAccount-content a.macc-dash-order:hover {
	background: var(--macc-soft);
	color: var(--macc-text);
	text-decoration: none;
}

.macc-dash-order__num {
	font-weight: 700;
	color: var(--macc-accent);
	font-variant-numeric: tabular-nums;
}

.macc-dash-order__date {
	color: var(--macc-muted);
	font-size: 13px;
}

.macc-dash-order__total {
	margin-left: auto;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* ---------- Pastilles de statut ---------- */

.macc-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	padding: 5px 10px;
	border-radius: 999px;
	background: var(--macc-soft);
	color: var(--macc-muted);
	white-space: nowrap;
}

.macc-pill::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
}

.macc-pill--completed {
	background: #eaf6ee;
	color: #1f7a3d;
}

.macc-pill--processing {
	background: #e9f2fb;
	color: #1d6fb8;
}

.macc-pill--on-hold {
	background: #fdf3e0;
	color: #9a6700;
}

.macc-pill--pending {
	background: #fdf3e0;
	color: #b07d12;
}

.macc-pill--cancelled {
	background: #efefef;
	color: #6b6b6b;
}

.macc-pill--refunded {
	background: #f0eafa;
	color: #6b4ba3;
}

.macc-pill--failed {
	background: #fdf0f0;
	color: #b32d2e;
}

/* =========================================================
   Autocomplétion d'adresse
   ========================================================= */

/* Dropdown maison (Mapbox) */

body.macc .macc-ac-anchor {
	position: relative;
}

body.macc .macc-ac-list {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 40;
	margin: 4px 0 0;
	padding: 6px;
	list-style: none;
	background: var(--macc-card);
	border: 1px solid var(--macc-line);
	border-radius: var(--macc-radius-sm);
	box-shadow: 0 10px 28px rgba(27, 27, 27, 0.12);
	max-height: 280px;
	overflow-y: auto;
}

body.macc .macc-ac-list[hidden] {
	display: none;
}

body.macc .macc-ac-item {
	display: flex;
	flex-direction: column;
	gap: 1px;
	margin: 0;
	padding: 9px 12px;
	border-radius: 7px;
	cursor: pointer;
}

body.macc .macc-ac-item strong {
	font-size: 14px;
	font-weight: 600;
	color: var(--macc-accent);
}

body.macc .macc-ac-item span {
	font-size: 12.5px;
	color: var(--macc-muted);
}

body.macc .macc-ac-item.is-active {
	background: var(--macc-primary-soft);
}

body.macc .macc-ac-item.is-active strong {
	color: var(--macc-primary);
}

/* =========================================================
   Select2 / selectWoo (pays, région)
   ========================================================= */

/* Champ fermé : aligné sur le style des inputs */

body.macc .select2-container--default .select2-selection--single {
	height: auto;
	background: var(--macc-card);
	border: 1.5px solid color-mix(in srgb, var(--macc-text) 16%, transparent);
	border-radius: var(--macc-radius-sm);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.macc .select2-container--default .select2-selection--single .select2-selection__rendered {
	color: var(--macc-text);
	font-size: 14.5px;
	line-height: 1.4;
	padding: 11px 38px 11px 14px;
}

body.macc .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 100%;
	top: 0;
	right: 12px;
	width: 16px;
}

body.macc .select2-container--default .select2-selection--single .select2-selection__arrow b {
	border-color: var(--macc-muted) transparent transparent transparent;
	border-width: 5px 4px 0 4px;
	margin-top: -2px;
}

body.macc .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
	border-color: transparent transparent var(--macc-primary) transparent;
	border-width: 0 4px 5px 4px;
}

body.macc .select2-container--default.select2-container--focus .select2-selection--single,
body.macc .select2-container--default.select2-container--open .select2-selection--single {
	border-color: var(--macc-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--macc-primary) 18%, transparent);
}

/* Dropdown (ajouté au body) */

body.macc .select2-dropdown {
	background: var(--macc-card);
	border: 1px solid var(--macc-line);
	border-radius: var(--macc-radius-sm);
	box-shadow: 0 10px 28px rgba(27, 27, 27, 0.12);
	overflow: hidden;
}

/* Champ de recherche interne */

body.macc .select2-search--dropdown {
	padding: 8px 8px 4px;
}

body.macc .select2-search--dropdown .select2-search__field {
	border: 1.5px solid color-mix(in srgb, var(--macc-text) 16%, transparent);
	border-radius: 7px;
	padding: 9px 12px;
	font-size: 14px;
	color: var(--macc-text);
	background: var(--macc-card);
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.macc .select2-search--dropdown .select2-search__field:focus {
	border-color: var(--macc-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--macc-primary) 15%, transparent);
}

/* Liste des options */

body.macc .select2-results__options {
	padding: 6px;
	max-height: 280px;
}

body.macc .select2-results__option {
	padding: 9px 12px;
	border-radius: 7px;
	font-size: 14px;
	color: var(--macc-text);
	transition: background-color 0.1s ease, color 0.1s ease;
}

/* Option survolée / surlignée (select2 utilise aria-selected, selectWoo data-selected) */

body.macc .select2-container--default .select2-results__option--highlighted[aria-selected],
body.macc .select2-container--default .select2-results__option--highlighted[data-selected] {
	background: var(--macc-primary-soft);
	color: var(--macc-primary);
}

/* Option actuellement sélectionnée */

body.macc .select2-container--default .select2-results__option[aria-selected='true'],
body.macc .select2-container--default .select2-results__option[data-selected='true'] {
	background: var(--macc-soft);
	color: var(--macc-accent);
	font-weight: 600;
}

body.macc .select2-results__option--no-results {
	color: var(--macc-muted);
	font-style: italic;
}

/* Dropdown Google Places (.pac-container est ajouté au body) */

body.macc .pac-container {
	margin-top: 4px;
	padding: 6px;
	border: 1px solid var(--macc-line);
	border-radius: var(--macc-radius-sm);
	box-shadow: 0 10px 28px rgba(27, 27, 27, 0.12);
	font-family: inherit;
	background: var(--macc-card);
}

body.macc .pac-container::after {
	margin: 4px 6px 2px;
}

body.macc .pac-item {
	padding: 8px 10px;
	border: 0;
	border-radius: 7px;
	cursor: pointer;
	font-size: 12.5px;
	color: var(--macc-muted);
	line-height: 1.5;
}

body.macc .pac-item:hover,
body.macc .pac-item-selected {
	background: var(--macc-primary-soft);
}

body.macc .pac-item-query {
	font-size: 14px;
	color: var(--macc-accent);
}

/* ---------- Responsive dashboard / profil ---------- */

@media (max-width: 900px) {
	body.macc .woocommerce-MyAccount-navigation .macc-profile {
		margin-bottom: 10px;
		padding: 13px 15px;
	}

	body.macc .woocommerce-MyAccount-navigation .macc-profile .macc-profile__avatar img {
		width: 40px;
		height: 40px;
	}

	body.macc .macc-profile {
		display: none;
	}
	body.macc.macc-style-card .woocommerce-MyAccount-navigation-link.is-active a::after {
		display: none;
	  }
}

@media (max-width: 600px) {
	body.macc .woocommerce-MyAccount-content a.macc-dash-order {
		flex-wrap: wrap;
		row-gap: 6px;
	}

	.macc-dash-order__total {
		margin-left: 0;
		flex-basis: 100%;
	}
}
