/**
 * Bannière de consentement — CBD du Midi.
 *
 * Palette : --vert #677427, --orange #f7a600, --beige #f5ecdd, --marron #634d34
 */

/* ------------------------------------------------------------------ */
/*  Bannière principale                                                */
/* ------------------------------------------------------------------ */
.cmt-consent {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 999999;
	background: #fff;
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
	font-family: "puffin-display-soft", sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #333;
}

.cmt-consent__inner {
	max-width: 1140px;
	margin: 0 auto;
	padding: 20px 24px;
}

.cmt-consent__text p {
	margin: 0 0 16px;
	font-size: 14px;
	color: #444;
}

.cmt-consent__link {
	color: #677427;
	text-decoration: underline;
	font-weight: 600;
}

.cmt-consent__link:hover {
	color: #454D18;
}

/* ------------------------------------------------------------------ */
/*  Boutons                                                            */
/* ------------------------------------------------------------------ */
.cmt-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.cmt-consent__btn {
	display: inline-block;
	padding: 10px 24px;
	border-radius: 15px;
	font-size: 14px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	border: 2px solid transparent;
	transition: all 0.3s;
	line-height: 1.4;
}

.cmt-consent__btn--accept {
	background: #677427;
	color: #fff;
	border-color: #677427;
}

.cmt-consent__btn--accept:hover {
	background: #f7a600;
	border-color: #f7a600;
	color: #fff;
}

.cmt-consent__btn--refuse {
	background: transparent;
	color: #677427;
	border-color: #677427;
}

.cmt-consent__btn--refuse:hover {
	background: #677427;
	color: #fff;
}

.cmt-consent__btn--settings {
	background: transparent;
	color: #666;
	border-color: #ccc;
	font-weight: 400;
}

.cmt-consent__btn--settings:hover {
	border-color: #677427;
	color: #677427;
}

/* ------------------------------------------------------------------ */
/*  Vue détaillée (personnaliser)                                      */
/* ------------------------------------------------------------------ */
.cmt-consent__details {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #eee;
}

.cmt-consent__category {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 10px 0;
	border-bottom: 1px solid #f5f5f5;
}

.cmt-consent__category:last-of-type {
	border-bottom: none;
	margin-bottom: 12px;
}

/* ------------------------------------------------------------------ */
/*  Toggles                                                            */
/* ------------------------------------------------------------------ */
.cmt-consent__toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	min-width: 260px;
}

.cmt-consent__toggle input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 44px;
	height: 24px;
	background: #ccc;
	border-radius: 12px;
	position: relative;
	cursor: pointer;
	transition: background 0.3s;
	flex-shrink: 0;
}

.cmt-consent__toggle input[type="checkbox"]::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.3s;
}

.cmt-consent__toggle input[type="checkbox"]:checked {
	background: #677427;
}

.cmt-consent__toggle input[type="checkbox"]:checked::after {
	transform: translateX(20px);
}

.cmt-consent__toggle input[type="checkbox"]:disabled {
	background: #677427;
	opacity: 0.6;
	cursor: not-allowed;
}

.cmt-consent__toggle-label {
	font-weight: 600;
	color: #333;
	font-size: 14px;
}

.cmt-consent__category-desc {
	font-size: 12px;
	color: #888;
	flex: 1;
	min-width: 200px;
}

/* ------------------------------------------------------------------ */
/*  Bouton flottant (rouvrir les paramètres)                           */
/* ------------------------------------------------------------------ */
.cmt-consent-reopen {
	position: fixed;
	bottom: 16px;
	left: 16px;
	z-index: 999998;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #677427;
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
	transition: all 0.3s;
	padding: 0;
}

.cmt-consent-reopen:hover {
	background: #f7a600;
	transform: scale(1.1);
}

/* ------------------------------------------------------------------ */
/*  Responsive                                                         */
/* ------------------------------------------------------------------ */
@media (max-width: 768px) {
	.cmt-consent__inner {
		padding: 16px;
	}

	.cmt-consent__actions {
		flex-direction: column;
	}

	.cmt-consent__btn {
		width: 100%;
		text-align: center;
	}

	.cmt-consent__toggle {
		min-width: auto;
	}

	.cmt-consent__category {
		flex-direction: column;
		align-items: flex-start;
	}
}
