/* RM Mini Cart — direction : Apple-minimal Retrometroid (Inter, #121212, bordures 0.5px)
   Toutes les règles sont préfixées par #rm-mc pour passer devant les styles
   globaux du thème Hello Elementor / du Kit Elementor (boutons roses #c36, h2, p…). */

/* Le tiroir natif du widget Panier d'Elementor est remplacé par le nôtre. */
.elementor-menu-cart__container,
.elementor-menu-cart__main { display: none !important; }

html.rm-mc-lock, html.rm-mc-lock body { overflow: hidden !important; }

#rm-mc {
	--rm-ink: #121212;
	--rm-muted: #6E6E73;
	--rm-line: rgba(0, 0, 0, .12);
	--rm-line-strong: rgba(0, 0, 0, .2);
	--rm-soft: #F5F5F7;
	--rm-hover: #ECECEF;
	--rm-thumb: #F8F8F8;
	--rm-ok: #1E7A4C;
	--rm-ok-bg: #EEF6F1;
	--rm-ease: cubic-bezier(.32, .72, 0, 1);

	position: fixed;
	inset: 0;
	z-index: 2147483000; /* au-dessus du header sticky, du sélecteur de langue, etc. */
	font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
	font-size: 14px;
	line-height: 1.4;
	color: var(--rm-ink);
	text-align: left;
	-webkit-font-smoothing: antialiased;
}
#rm-mc[hidden] { display: none !important; }

/* ---------- Reset des styles hérités du thème ---------- */
#rm-mc *, #rm-mc *::before, #rm-mc *::after { box-sizing: border-box; }
#rm-mc h2, #rm-mc p, #rm-mc ul, #rm-mc li { margin: 0; padding: 0; font-family: inherit; letter-spacing: normal; text-transform: none; }
#rm-mc ul { list-style: none; }
#rm-mc a { color: inherit; text-decoration: none; font-family: inherit; }
#rm-mc button:hover,
#rm-mc button:focus,
#rm-mc button:active { background: transparent; color: var(--rm-ink); border: 0; box-shadow: none; }
#rm-mc button {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--rm-ink);
	font: inherit;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	min-height: 0;
	width: auto;
	cursor: pointer;
}
#rm-mc svg { display: block; flex: 0 0 auto; }

/* ---------- Overlay + panneau ---------- */
#rm-mc .rm-mc__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .32);
	opacity: 0;
	transition: opacity .28s ease;
}
#rm-mc .rm-mc__panel {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	height: 100dvh;
	width: 420px;
	max-width: 100%;
	background: #fff;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform .32s var(--rm-ease);
	outline: none;
	box-shadow: -24px 0 48px rgba(0, 0, 0, .08);
}
#rm-mc.is-open .rm-mc__overlay { opacity: 1; }
#rm-mc.is-open .rm-mc__panel { transform: translateX(0); }

#rm-mc .rm-mc__inner { display: flex; flex-direction: column; height: 100%; min-height: 0; }

/* ---------- En-tête ---------- */
#rm-mc .rm-mc__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 14px 14px 24px;
	border-bottom: .5px solid var(--rm-line);
}
#rm-mc .rm-mc__title { font-size: 18px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; color: var(--rm-ink); }
#rm-mc .rm-mc__title span { color: var(--rm-muted); font-weight: 500; }

#rm-mc .rm-mc__close {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--rm-ink);
	transition: background .15s ease;
}
#rm-mc .rm-mc__close:hover { background: var(--rm-soft); }

/* ---------- Bandeau réassurance ---------- */
#rm-mc .rm-mc__notice {
	margin: 16px 24px 0;
	padding: 11px 14px;
	border-radius: 12px;
	background: var(--rm-ok-bg);
	color: var(--rm-ok);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	display: flex;
	align-items: center;
	gap: 10px;
}

/* ---------- Liste ---------- */
#rm-mc .rm-mc__list {
	padding: 4px 24px;
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}
#rm-mc .rm-mc__item {
	display: flex;
	gap: 14px;
	padding: 18px 0;
	border-bottom: .5px solid var(--rm-line);
	transition: opacity .2s ease;
}
#rm-mc .rm-mc__item:last-child { border-bottom: 0; }
#rm-mc .rm-mc__item.is-busy { opacity: .45; pointer-events: none; }

#rm-mc .rm-mc__thumb {
	width: 72px;
	height: 72px;
	flex: 0 0 72px;
	border-radius: 12px;
	background: var(--rm-thumb);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}
#rm-mc .rm-mc__thumb img { width: 100%; height: 100%; object-fit: contain; margin: 0; padding: 4px; border: 0; border-radius: 0; max-width: none; }

#rm-mc .rm-mc__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#rm-mc .rm-mc__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
#rm-mc .rm-mc__name { font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--rm-ink); }
#rm-mc .rm-mc__name a:hover { text-decoration: underline; }
#rm-mc .rm-mc__price { font-size: 14px; font-weight: 600; line-height: 1.35; white-space: nowrap; font-variant-numeric: tabular-nums; }
#rm-mc .rm-mc__price .woocommerce-Price-amount,
#rm-mc .rm-mc__total .woocommerce-Price-amount { color: inherit; font-weight: inherit; }
#rm-mc .rm-mc__meta { font-size: 12px; line-height: 1.45; color: var(--rm-muted); font-weight: 400; }

#rm-mc .rm-mc__actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }

#rm-mc .rm-mc__stepper {
	display: inline-flex;
	align-items: center;
	height: 34px;
	border: .5px solid var(--rm-line-strong);
	border-radius: 999px;
	overflow: hidden;
}
#rm-mc .rm-mc__stepper button {
	width: 36px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--rm-ink);
	transition: background .15s ease;
}
#rm-mc .rm-mc__stepper button:hover:not(:disabled) { background: var(--rm-hover); }
#rm-mc .rm-mc__stepper button:disabled { color: #C7C7CC; cursor: not-allowed; }
#rm-mc .rm-mc__qty { min-width: 18px; text-align: center; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
#rm-mc .rm-mc__qty-static { font-size: 13px; color: var(--rm-muted); }

#rm-mc .rm-mc__remove,
#rm-mc .rm-mc__remove:focus {
	padding: 10px 0;
	font-size: 12px;
	color: var(--rm-muted);
}
#rm-mc .rm-mc__remove:hover { color: var(--rm-ink); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Pied ---------- */
#rm-mc .rm-mc__foot {
	padding: 18px 24px calc(20px + env(safe-area-inset-bottom));
	border-top: .5px solid var(--rm-line);
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #fff;
}
#rm-mc .rm-mc__total { display: flex; justify-content: space-between; align-items: baseline; }
#rm-mc .rm-mc__total span { font-size: 15px; font-weight: 600; }
#rm-mc .rm-mc__total strong { font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
#rm-mc .rm-mc__sub { margin-top: -4px; margin-bottom: 4px; font-size: 12px; color: var(--rm-muted); }
#rm-mc .rm-mc__sub .woocommerce-Price-amount { color: inherit; font-weight: 600; }

#rm-mc .rm-mc__btn {
	height: 50px;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-size: 15px;
	font-weight: 600;
	transition: background .2s ease, transform .15s ease;
}
#rm-mc .rm-mc__btn:active { transform: scale(.99); }
#rm-mc .rm-mc__btn--primary { background: var(--rm-ink); color: #fff; }
#rm-mc .rm-mc__btn--primary:hover { background: #000; color: #fff; }

/* ---------- Panier vide ---------- */
#rm-mc .rm-mc__empty { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 24px; text-align: center; }
#rm-mc .rm-mc__empty-title { font-size: 17px; font-weight: 600; }
#rm-mc .rm-mc__empty-text { margin-bottom: 12px; font-size: 14px; color: var(--rm-muted); }

/* ---------- Accessibilité ---------- */
#rm-mc .rm-mc__sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#rm-mc a:focus-visible,
#rm-mc button:focus-visible { outline: 2px solid var(--rm-ink); outline-offset: 2px; }
#rm-mc button:focus:not(:focus-visible) { outline: none; }

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
	#rm-mc .rm-mc__panel { width: 100%; box-shadow: none; }
	#rm-mc .rm-mc__head { padding-left: 20px; }
	#rm-mc .rm-mc__notice { margin: 12px 20px 0; }
	#rm-mc .rm-mc__list { padding: 4px 20px; }
	#rm-mc .rm-mc__foot { padding-left: 20px; padding-right: 20px; }
	#rm-mc .rm-mc__thumb { width: 64px; height: 64px; flex-basis: 64px; }
}

@media (prefers-reduced-motion: reduce) {
	#rm-mc .rm-mc__overlay,
	#rm-mc .rm-mc__panel,
	#rm-mc .rm-mc__item,
	#rm-mc .rm-mc__btn { transition: none !important; }
}
