/* Bannière de consentement aux témoins (cookies) — Garage Méca-Pro */
.mp-consent, .mp-consent *{ box-sizing: border-box; }

.mp-consent{
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 99999;
	display: none;
	justify-content: center;
	padding: 12px;
	padding-bottom: calc(12px + env(safe-area-inset-bottom));
	font-family: Arial, Helvetica, sans-serif;
	pointer-events: none;
}
.mp-consent.is-open{ display: flex; }

.mp-consent__carte{
	pointer-events: auto;
	width: 100%;
	max-width: 960px;
	background: #1f1f1f;
	color: #f2f2f2;
	border-top: 4px solid #6eac2c;
	border-radius: 6px;
	box-shadow: 0 10px 40px rgba(0,0,0,.45);
	padding: 20px 22px;
	animation: mp-monte .3s ease-out;
}
@keyframes mp-monte{ from{ transform: translateY(20px); opacity: 0; } to{ transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce){ .mp-consent__carte{ animation: none; } }

.mp-consent__haut{
	display: flex;
	gap: 20px;
	align-items: center;
}
.mp-consent__texte{ flex: 1 1 auto; }
.mp-consent__titre{
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: bold;
	color: #fff;
}
.mp-consent__texte p{
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: #d6d6d6;
}
.mp-consent a{ color: #9fd864; text-decoration: underline; }
.mp-consent a:hover{ color: #fff; }

.mp-consent__boutons{
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex: 0 0 auto;
}
.mp-btn{
	appearance: none;
	font: bold 14px Arial, Helvetica, sans-serif;
	min-height: 44px;
	padding: 0 18px;
	border-radius: 4px;
	cursor: pointer;
	border: 2px solid transparent;
	white-space: nowrap;
	transition: background .15s, border-color .15s, color .15s;
}
.mp-btn:focus-visible{ outline: 3px solid #ffcc00; outline-offset: 2px; }
.mp-btn--accepter{ background: #6eac2c; color: #fff; }
.mp-btn--accepter:hover{ background: #5e9624; }
.mp-btn--refuser{ background: transparent; color: #fff; border-color: #8a8a8a; }
.mp-btn--refuser:hover{ border-color: #fff; }
.mp-btn--lien{
	background: transparent; color: #d6d6d6; border-color: transparent;
	text-decoration: underline; padding: 0 10px;
}
.mp-btn--lien:hover{ color: #fff; }

/* Panneau de préférences */
.mp-consent__prefs{
	display: none;
	margin-top: 18px;
	border-top: 1px solid #3a3a3a;
	padding-top: 14px;
}
.mp-consent.is-prefs .mp-consent__prefs{ display: block; }
.mp-consent.is-prefs .mp-btn--perso{ display: none; }

.mp-cat{
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 12px 0;
	border-bottom: 1px solid #333;
}
.mp-cat:last-of-type{ border-bottom: 0; }
.mp-cat strong{ display: block; color: #fff; font-size: 15px; margin-bottom: 3px; }
.mp-cat span{ display: block; color: #bdbdbd; font-size: 13px; line-height: 1.45; }
.mp-cat__etat{ color: #9fd864 !important; font-size: 13px; font-weight: bold; white-space: nowrap; }

/* Interrupteur */
.mp-switch{ position: relative; flex: 0 0 auto; width: 50px; height: 28px; }
.mp-switch input{ position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.mp-switch i{
	position: absolute; inset: 0;
	background: #555; border-radius: 28px;
	transition: background .2s;
}
.mp-switch i::after{
	content: ""; position: absolute; top: 3px; left: 3px;
	width: 22px; height: 22px; border-radius: 50%;
	background: #fff; transition: transform .2s;
}
.mp-switch input:checked + i{ background: #6eac2c; }
.mp-switch input:checked + i::after{ transform: translateX(22px); }
.mp-switch input:focus-visible + i{ outline: 3px solid #ffcc00; outline-offset: 2px; }

.mp-consent__prefs-actions{ display: flex; justify-content: flex-end; margin-top: 12px; }

/* Lien « Gérer mes témoins » dans le pied de page */
.mp-footer-liens{ margin-top: 10px; text-transform: none; font-weight: normal; }
.mp-footer-liens a, .mp-footer-liens button{
	color: #cfcfcf; font: 13px Arial, Helvetica, sans-serif;
	background: none; border: 0; padding: 4px 6px; cursor: pointer;
	text-decoration: underline;
}
.mp-footer-liens a:hover, .mp-footer-liens button:hover{ color: #fff; }

/* Tablette et téléphone */
@media (max-width: 760px){
	.mp-consent{ padding: 0; padding-bottom: 0; }
	.mp-consent__carte{
		border-radius: 10px 10px 0 0;
		padding: 18px 16px;
		padding-bottom: calc(16px + env(safe-area-inset-bottom));
		max-height: 85vh;
		overflow-y: auto;
	}
	.mp-consent__haut{ flex-direction: column; align-items: stretch; gap: 14px; }
	.mp-consent__boutons{ display: grid; grid-template-columns: 1fr 1fr; }
	.mp-btn--perso{ grid-column: 1 / -1; order: 3; }
	.mp-btn{ width: 100%; }
	.mp-consent__prefs-actions .mp-btn{ width: 100%; }
}
