/* ==========================================================================
   Consentement cookies — rendu type Axeptio :
   carte compacte en bas à gauche + pastille flottante « Gérer les cookies »
   ========================================================================== */

.cav-consent {
	position: fixed;
	left: 16px;
	/* Décollée au-dessus de la pastille : un double-clic sur la pastille ne
	   doit jamais tomber sur un bouton de la carte */
	bottom: 76px;
	z-index: 9000; /* au-dessus de la sidebar panier (101), sous les notifications (9999) */
	width: min(360px, calc(100vw - 32px));
	background: var(--cav-bg-alt);
	border-radius: 20px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
	font-family: var(--cav-font-primary);
	animation: cav-consent-in 0.35s ease;
}

@keyframes cav-consent-in {
	from {
		opacity: 0;
		transform: translateY(16px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.cav-consent[hidden] {
	display: none;
}

.cav-consent__inner {
	padding: 22px 22px 18px;
}

.cav-consent__title {
	margin: 0 0 8px;
	font-family: var(--cav-font-heading);
	font-size: 17px;
	font-weight: 700;
	color: var(--cav-text);
}

.cav-consent__text {
	margin: 0 0 16px;
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--cav-text-light);
}

.cav-consent__text a {
	color: var(--cav-primary);
	text-decoration: underline;
}

.cav-consent__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Accepter et refuser : même taille, même accessibilité (exigence CNIL) */
.cav-consent__btn {
	width: 100%;
	padding: 12px 20px;
	border-radius: 999px;
	font-family: var(--cav-font-primary);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.cav-consent__btn--accept {
	background: var(--cav-primary);
	border: 2px solid var(--cav-primary);
	color: var(--cav-text-inverse);
}

.cav-consent__btn--accept:hover {
	background: var(--cav-primary-dark);
	border-color: var(--cav-primary-dark);
}

.cav-consent__btn--refuse {
	background: transparent;
	border: 2px solid var(--cav-border);
	color: var(--cav-text-light);
}

.cav-consent__btn--refuse:hover {
	background: var(--cav-bg);
	border-color: var(--cav-border-dark);
}

/* ── Pastille flottante « Gérer les cookies » ─────────────────────────────
   Toujours accessible (retrait du consentement à tout moment, CNIL).
   Masquée quand la bannière est ouverte. */
.cav-cookies-fab {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 8999;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--cav-bg-alt);
	border: 1px solid var(--cav-border);
	border-radius: 50%;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
	font-size: 22px;
	color: var(--cav-text-light);
	cursor: pointer;
	opacity: 0.75;
	transition: opacity 0.15s ease, color 0.15s ease;
}

.cav-cookies-fab:hover {
	opacity: 1;
	color: var(--cav-primary);
}

@media (max-width: 600px) {

	.cav-cookies-fab {
		left: 8px;
		/* Au-dessus de la bottom-nav mobile */
		bottom: 76px;
		width: 40px;
		height: 40px;
		font-size: 20px;
	}

	.cav-consent {
		left: 8px;
		bottom: 128px;
	}
}
