/**
 * Le bandeau de consentement.
 *
 * Posé en bas à gauche sur grand écran, il laisse le site respirer ; sur
 * téléphone il devient une feuille qui monte du bas, à portée de pouce. Les
 * deux réponses — accepter, refuser — ont exactement le même poids visuel :
 * c'est une exigence du RGPD autant qu'une question d'honnêteté.
 */

.lpwa-cc {
	--cc-ink: #1A1714;
	--cc-soft: #6F675E;
	--cc-line: #EFE7DA;
	--cc-gold: #C9A227;
	--cc-gold-deep: #8A6D12;

	position: fixed;
	z-index: 99999;
	left: 20px;
	bottom: 20px;
	width: min(420px, calc(100vw - 40px));
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .26s ease, transform .26s ease;
	pointer-events: none;
}

.lpwa-cc.is-open {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.lpwa-cc__carte {
	background: #FFFFFF;
	border: 1px solid var(--cc-line);
	border-radius: 22px;
	padding: 24px;
	box-shadow: 0 1px 2px rgba(17, 17, 17, .05), 0 30px 64px -30px rgba(17, 17, 17, .38);
	max-height: calc(100vh - 40px);
	overflow-y: auto;
}

/* Un filet doré en haut de la carte, comme sur le reste du site. */
.lpwa-cc__carte::before {
	content: "";
	display: block;
	width: 38px;
	height: 2px;
	margin-bottom: 16px;
	background: linear-gradient(90deg, var(--cc-gold), rgba(201, 162, 39, 0));
	border-radius: 2px;
}

.lpwa-cc__titre {
	margin: 0 0 10px;
	font-size: 19px;
	line-height: 1.25;
	color: var(--cc-ink);
	font-family: var(--lv2-serif, Georgia, "Times New Roman", serif);
	font-weight: 500;
}

.lpwa-cc__texte {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--cc-soft);
}

/* --- Boutons ---------------------------------------------------------- */

.lpwa-cc__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.lpwa-cc__btn {
	appearance: none;
	border: 1px solid var(--cc-line);
	background: #FFFFFF;
	color: var(--cc-ink);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	padding: 12px 14px;
	border-radius: 999px;
	cursor: pointer;
	transition: background .18s ease, border-color .18s ease, transform .12s ease;
	min-height: 44px;
}

.lpwa-cc__btn:hover { background: #FBF7F2; border-color: var(--cc-gold); }
.lpwa-cc__btn:active { transform: translateY(1px); }

/* Les deux réponses principales partagent le même habit : ni l'une ni
   l'autre ne doit sembler être le bon choix. */
.lpwa-cc__btn--fort {
	background: linear-gradient(170deg, #FFFDF7, #FDF4E2);
	border-color: rgba(201, 162, 39, .55);
	color: var(--cc-gold-deep);
}

.lpwa-cc__btn--fort:hover {
	background: linear-gradient(170deg, #FFFDF7, #FBEDD0);
	border-color: var(--cc-gold);
}

.lpwa-cc__liens {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin-top: 14px;
}

.lpwa-cc__lien {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 13px;
	color: var(--cc-soft);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.lpwa-cc__lien:hover { color: var(--cc-gold-deep); }

/* --- Le détail -------------------------------------------------------- */

.lpwa-cc__ligne {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 14px 0;
	border-top: 1px solid var(--cc-line);
	cursor: pointer;
}

.lpwa-cc__ligne.is-fixe { cursor: default; }

.lpwa-cc__ligneTexte { flex: 1; min-width: 0; }

.lpwa-cc__ligneTexte strong {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--cc-ink);
	margin-bottom: 3px;
}

.lpwa-cc__ligneTexte span {
	display: block;
	font-size: 13px;
	line-height: 1.5;
	color: var(--cc-soft);
}

.lpwa-cc__case {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin-top: 2px;
	accent-color: var(--cc-gold);
	cursor: pointer;
}

.lpwa-cc__toujours {
	flex: 0 0 auto;
	font-size: 12px;
	color: var(--cc-gold-deep);
	white-space: nowrap;
	margin-top: 3px;
}

.lpwa-cc__detail .lpwa-cc__actions { margin-top: 18px; }

/* --- L'encart d'avis laissé vide -------------------------------------- */

/* On masque le widget non mis en page plutôt que de laisser un trou. */
.lpwa-cc-vide > *:not(.lpwa-cc__remplacant) { display: none !important; }


.lpwa-cc__remplacant {
	text-align: center;
	max-width: 560px;
	margin: 8px auto 24px;
	padding: 26px 20px;
	border: 1px dashed var(--cc-line, #EFE7DA);
	border-radius: 18px;
	background: #FBF7F2;
}

.lpwa-cc__remplacant p {
	margin: 0 0 14px;
	font-size: 14px;
	color: #6F675E;
}

.lpwa-cc__remplacant .lpwa-cc__btn {
	--cc-line: #EFE7DA;
	--cc-gold: #C9A227;
	--cc-gold-deep: #8A6D12;
	--cc-ink: #1A1714;
	display: inline-block;
	width: auto;
}

/* --- Téléphone -------------------------------------------------------- */

@media (max-width: 640px) {
	.lpwa-cc {
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
	}

	.lpwa-cc__carte {
		border-radius: 22px 22px 0 0;
		border-left: 0;
		border-right: 0;
		border-bottom: 0;
		padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
		max-height: 86vh;
	}

	.lpwa-cc__actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.lpwa-cc { transition: none; }
}
