/* ==========================================================================
   Bandeau + preferences cookies (RGPD / CNIL) — Safir / Saphyr
   Couleurs de marque uniquement : rose #cb5aab, bleu #2C73C3, neutres.
   Aucun degrade. Tout est scope sous .sphr-cc pour ne pas toucher au theme.
   ========================================================================== */

.sphr-cc,
.sphr-cc * {
	box-sizing: border-box;
}

/* ---------- Bandeau ---------- */

.sphr-cc__banner {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 99999;
	display: none;
	max-width: 1180px;
	margin: 0 auto;
	padding: 20px 24px;
	background: #ffffff;
	color: #23303a;
	border: 1px solid #d9e2ea;
	border-top: 4px solid #2C73C3;
	border-radius: 14px;
	box-shadow: 0 14px 36px rgba(0, 0, 0, .28);
	font-family: 'Open Sans', Arial, sans-serif;
	font-size: 14px;
	line-height: 1.55;
}

.sphr-cc__banner.is-visible {
	display: block;
}

.sphr-cc__title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 700;
	color: #1f4a70;
}

.sphr-cc__text {
	margin: 0 0 16px;
}

.sphr-cc__text a {
	color: #2C73C3;
	text-decoration: underline;
}

/* ---------- Boutons ----------
   "Tout accepter" et "Tout refuser" partagent EXACTEMENT la meme classe de
   base (taille, graisse, padding, largeur mini) : refuser doit etre aussi
   simple qu'accepter. Seule la couleur de marque differe. */

.sphr-cc__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.sphr-cc__btn {
	display: inline-block;
	min-width: 190px;
	padding: 12px 22px;
	border: 2px solid transparent;
	border-radius: 10px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	cursor: pointer;
}

.sphr-cc__btn--accept,
.sphr-cc__btn--accept:hover,
.sphr-cc__btn--accept:focus {
	background: #cb5aab !important;
	border-color: #cb5aab !important;
	color: #ffffff !important;
}

.sphr-cc__btn--refuse,
.sphr-cc__btn--refuse:hover,
.sphr-cc__btn--refuse:focus {
	background: #2C73C3 !important;
	border-color: #2C73C3 !important;
	color: #ffffff !important;
}

.sphr-cc__btn--settings,
.sphr-cc__btn--settings:hover,
.sphr-cc__btn--settings:focus {
	background: #ffffff !important;
	border-color: #2C73C3 !important;
	color: #2C73C3 !important;
}

.sphr-cc__btn:focus-visible {
	outline: 3px solid #23303a;
	outline-offset: 2px;
}

/* ---------- Fenetre de preferences ---------- */

.sphr-cc__overlay {
	position: fixed;
	inset: 0;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 100000;
	display: none;
	padding: 20px;
	background: rgba(15, 26, 34, .62);
	overflow-y: auto;
}

.sphr-cc__overlay.is-visible {
	display: block;
}

.sphr-cc__modal {
	max-width: 720px;
	margin: 40px auto;
	background: #ffffff;
	color: #23303a;
	border-radius: 14px;
	border-top: 4px solid #cb5aab;
	box-shadow: 0 18px 48px rgba(0, 0, 0, .35);
	font-family: 'Open Sans', Arial, sans-serif;
	font-size: 14px;
	line-height: 1.55;
	overflow: hidden;
}

.sphr-cc__modal-head,
.sphr-cc__modal-foot {
	padding: 20px 24px;
}

.sphr-cc__modal-head {
	border-bottom: 1px solid #e4ebf1;
}

.sphr-cc__modal-foot {
	border-top: 1px solid #e4ebf1;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.sphr-cc__modal-body {
	padding: 8px 24px 4px;
}

.sphr-cc__group {
	padding: 16px 0;
	border-bottom: 1px solid #eef2f6;
}

.sphr-cc__group:last-child {
	border-bottom: 0;
}

.sphr-cc__group-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}

.sphr-cc__group-name {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #1f4a70;
}

.sphr-cc__group-desc {
	margin: 6px 0 0;
	color: #4a5b68;
}

.sphr-cc__cookies {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
	color: #63737f;
}

.sphr-cc__cookies li {
	padding: 2px 0;
}

.sphr-cc__cookies code {
	background: #f2f6f9;
	border-radius: 4px;
	padding: 1px 6px;
	color: #1f4a70;
	font-size: 12px;
}

/* ---------- Interrupteur ---------- */

.sphr-cc__switch {
	position: relative;
	flex: 0 0 auto;
	width: 52px;
	height: 28px;
}

.sphr-cc__switch input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}

.sphr-cc__slider {
	position: absolute;
	inset: 0;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: #b6c3cd;
	border-radius: 28px;
	pointer-events: none;
}

.sphr-cc__slider::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	background: #ffffff;
	border-radius: 50%;
}

.sphr-cc__switch input:checked + .sphr-cc__slider {
	background: #2C73C3;
}

.sphr-cc__switch input:checked + .sphr-cc__slider::before {
	left: 27px;
}

.sphr-cc__switch input:disabled + .sphr-cc__slider {
	background: #cb5aab;
	opacity: .55;
}

.sphr-cc__switch input:focus-visible + .sphr-cc__slider {
	outline: 3px solid #23303a;
	outline-offset: 2px;
}

.sphr-cc__locked {
	font-size: 12px;
	color: #7b8892;
	white-space: nowrap;
}

/* ---------- Lien permanent ---------- */

.sphr-cc-link {
	cursor: pointer;
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
	.sphr-cc__banner {
		left: 10px;
		right: 10px;
		bottom: 10px;
		padding: 16px;
	}

	.sphr-cc__actions {
		display: block;
	}

	.sphr-cc__btn {
		display: block;
		width: 100%;
		min-width: 0;
		margin-bottom: 8px;
	}

	.sphr-cc__modal-foot .sphr-cc__btn {
		margin-bottom: 8px;
	}
}
