/* Z'Cookies - bandeau, préférences et encarts de contenus bloqués. */

.zc {
	--zc-accent: #1d4ed8;
	--zc-accent-fonce: #1e3a8a;
	--zc-fond: #ffffff;
	--zc-texte: #1d1d1f;
	--zc-doux: #5f6368;
	--zc-bord: rgba(0, 0, 0, .12);
	--zc-piste: #d0d3d8;
	--zc-btn-texte: #ffffff;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var(--zc-texte);
}
.zc--sombre {
	--zc-fond: #18181b;
	--zc-texte: #f4f2ee;
	--zc-doux: #b3b1ad;
	--zc-bord: rgba(255, 255, 255, .14);
	--zc-piste: #3f3f46;
}
.zc *, .zc *::before, .zc *::after { box-sizing: border-box; }
.zc [hidden] { display: none !important; }

/* ---- Bandeau ---- */
.zc-bandeau {
	position: fixed;
	z-index: 2147483000;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	width: min(720px, calc(100% - 32px));
	max-height: calc(100vh - 32px);
	overflow: auto;
	padding: 22px 24px;
	background: var(--zc-fond);
	color: var(--zc-texte);
	border: 1px solid var(--zc-bord);
	border-radius: 20px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
	animation: zc-entree .35s ease-out;
}
.zc--gauche .zc-bandeau {
	left: 16px;
	transform: none;
	width: min(440px, calc(100% - 32px));
}
@keyframes zc-entree { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .zc-bandeau { animation: none; } }

.zc-titre { margin: 0 0 6px; font-weight: 700; font-size: 1.05em; color: var(--zc-texte); }
.zc-texte { margin: 0 0 16px; color: var(--zc-doux); font-size: .95em; }
.zc-texte a, .zc-petit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.zc-petit { margin: 14px 0 0; font-size: .85em; color: var(--zc-doux); }

.zc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* « Tout accepter » et « Tout refuser » ont exactement le même poids visuel (exigence de l'APD). */
.zc-btn {
	flex: 1 1 auto;
	min-height: 44px;
	padding: 10px 20px;
	border-radius: 999px;
	font: inherit;
	font-weight: 700;
	font-size: .95em;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s;
}
.zc .zc-btn--plein, .zc-bloc .zc-btn--plein {
	background: var(--zc-accent);
	color: var(--zc-btn-texte, #fff);
	border: 2px solid var(--zc-accent);
}
.zc .zc-btn--plein:hover, .zc .zc-btn--plein:focus-visible, .zc-bloc .zc-btn--plein:hover {
	background: var(--zc-accent-fonce);
	border-color: var(--zc-accent-fonce);
}
.zc .zc-btn--contour {
	background: transparent;
	color: var(--zc-texte);
	border: 2px solid var(--zc-bord);
}
.zc .zc-btn--contour:hover, .zc .zc-btn--contour:focus-visible { border-color: var(--zc-texte); }
.zc button:focus-visible, .zc a:focus-visible, .zc input:focus-visible + .zc-glissiere {
	outline: 3px solid var(--zc-accent);
	outline-offset: 2px;
}

/* ---- Préférences ---- */
.zc-dialogue {
	width: min(560px, calc(100% - 32px));
	max-height: calc(100vh - 32px);
	padding: 0;
	border: 1px solid var(--zc-bord);
	border-radius: 20px;
	background: var(--zc-fond);
	color: var(--zc-texte);
	box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.zc-dialogue::backdrop { background: rgba(0, 0, 0, .55); }
.zc-dialogue[open]:not(:modal) {
	position: fixed;
	inset: 0;
	margin: auto;
	z-index: 2147483001;
}
.zc-pref { padding: 24px; }
.zc-pref-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.zc-fermer {
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--zc-texte);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
.zc-fermer:hover { background: var(--zc-bord); }
.zc-cats { list-style: none; margin: 0 0 18px; padding: 0; }
.zc-cat { padding: 14px 0; border-top: 1px solid var(--zc-bord); }
.zc-cat:last-child { border-bottom: 1px solid var(--zc-bord); }
.zc-interrupteur { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.zc-cat-nom { font-weight: 700; }
.zc-interrupteur input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.zc-glissiere {
	position: relative;
	flex: 0 0 auto;
	width: 46px;
	height: 26px;
	border-radius: 999px;
	background: var(--zc-piste);
	transition: background-color .2s;
}
.zc-glissiere::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
	transition: transform .2s;
}
.zc-interrupteur input:checked + .zc-glissiere { background: var(--zc-accent); }
.zc-interrupteur input:checked + .zc-glissiere::after { transform: translateX(20px); }
.zc-interrupteur input:disabled + .zc-glissiere { opacity: .55; cursor: not-allowed; }
.zc-cat-desc { margin: 6px 0 0; color: var(--zc-doux); font-size: .9em; }
.zc-cat-services { font-style: italic; }

/* ---- Bouton pour rouvrir les choix ---- */
.zc-flottant {
	position: fixed;
	z-index: 2147482999;
	left: 16px;
	bottom: 16px;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border: 1px solid var(--zc-bord);
	border-radius: 50%;
	background: var(--zc-fond);
	color: var(--zc-texte);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
	cursor: pointer;
	opacity: .85;
	transition: opacity .2s, transform .2s;
}
.zc-flottant:hover, .zc-flottant:focus-visible { opacity: 1; transform: scale(1.06); }

/* ---- Contenu bloqué (carte, vidéo…) ---- */
.zc-bloc {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 260px;
	padding: 24px;
	border-radius: inherit;
	background:
		repeating-linear-gradient(135deg, rgba(127, 127, 127, .08) 0 12px, rgba(127, 127, 127, .14) 12px 24px),
		#2a2a2e;
	color: #f4f2ee;
	text-align: center;
	font-size: 15px;
	line-height: 1.5;
}
.zc-bloc-msg { max-width: 420px; }
.zc-bloc p { margin: 0 0 10px; color: inherit; }
.zc-bloc-titre { font-weight: 700; font-size: 1.1em; }
.zc-bloc-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 14px !important; }
.zc-bloc .zc-btn { flex: 0 0 auto; }
.zc-bloc .zc-lien, .zc-bloc .zc-lien:hover, .zc-bloc .zc-lien:focus {
	padding: 4px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: inherit !important;
	font: inherit;
	font-size: .88em;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
	opacity: .85;
}
.zc-bloc .zc-lien:hover { opacity: 1; }

/* Les thèmes stylent souvent tous les boutons (majuscules, ombres, couleurs au survol) : on neutralise. */
.zc button, .zc-bloc button {
	text-transform: none !important;
	letter-spacing: normal !important;
	box-shadow: none;
	text-shadow: none;
}
.zc .zc-fermer, .zc .zc-fermer:hover, .zc .zc-fermer:focus {
	flex: 0 0 40px;
	width: 40px !important;
	height: 40px !important;
	min-height: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: var(--zc-texte) !important;
	font-size: 26px !important;
	line-height: 1 !important;
}
.zc .zc-fermer:hover { background: var(--zc-bord) !important; }

@media (max-width: 600px) {
	.zc-bandeau, .zc--gauche .zc-bandeau {
		left: 8px;
		right: 8px;
		bottom: 8px;
		width: auto;
		transform: none;
		padding: 18px;
		border-radius: 18px;
	}
	.zc-actions { flex-direction: column; }
	.zc-btn { width: 100%; }
	.zc-flottant { left: 10px; bottom: 10px; }
}

/* ---- Code court [zcookies_liste] ---- */
.zc-liste-titre { margin: 1.2em 0 .3em !important; font-size: 1.05em; }
.zc-liste ul { margin: .4em 0 1em; }

@media print { .zc { display: none !important; } }
