/* Consentement cookies / RGPD — YachtME Riviera
   Palette : navy #0a2342 / #0b2545, or #c9a24b / #d8b567 */

:root {
	--ymr-cc-navy: #0a2342;
	--ymr-cc-navy-2: #0b2545;
	--ymr-cc-gold: #c9a24b;
	--ymr-cc-gold-2: #d8b567;
	--ymr-cc-ink: #eaf0f7;
	--ymr-cc-muted: #b7c2d2;
}

.ymr-cc-banner,
.ymr-cc-modal * {
	box-sizing: border-box;
}

/* L'attribut hidden doit l'emporter sur les display definis plus bas */
.ymr-cc-banner[hidden],
.ymr-cc-modal[hidden] {
	display: none !important;
}

/* Bandeau bas de page */
.ymr-cc-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	background: var(--ymr-cc-navy);
	color: var(--ymr-cc-ink);
	border-top: 2px solid var(--ymr-cc-gold);
	box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.35);
	animation: ymr-cc-up 0.35s ease both;
}

@keyframes ymr-cc-up {
	from { transform: translateY(100%); opacity: 0; }
	to   { transform: translateY(0); opacity: 1; }
}

.ymr-cc-banner__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 18px 24px;
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}

.ymr-cc-banner__text {
	flex: 1 1 420px;
}

.ymr-cc-banner__title {
	display: block;
	font-size: 1.05rem;
	letter-spacing: 0.02em;
	color: var(--ymr-cc-gold-2);
	margin-bottom: 4px;
}

.ymr-cc-banner__text p {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--ymr-cc-muted);
}

.ymr-cc-banner__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

/* Boutons — refuser aussi visible qu'accepter (CNIL) */
.ymr-cc-btn {
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 11px 20px;
	border-radius: 6px;
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: filter 0.15s ease, background 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

.ymr-cc-btn--gold {
	background: linear-gradient(135deg, var(--ymr-cc-gold) 0%, var(--ymr-cc-gold-2) 100%);
	color: #10233c;
}

.ymr-cc-btn--gold:hover {
	filter: brightness(1.06);
}

.ymr-cc-btn--outline {
	background: transparent;
	color: var(--ymr-cc-ink);
	border-color: var(--ymr-cc-ink);
}

.ymr-cc-btn--outline:hover {
	background: rgba(255, 255, 255, 0.1);
}

.ymr-cc-btn--ghost {
	background: transparent;
	color: var(--ymr-cc-muted);
	border-color: transparent;
	text-decoration: underline;
	padding-left: 8px;
	padding-right: 8px;
}

.ymr-cc-btn--ghost:hover {
	color: var(--ymr-cc-ink);
}

/* Fenetre de preferences */
.ymr-cc-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.ymr-cc-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(4, 12, 24, 0.6);
	backdrop-filter: blur(2px);
}

.ymr-cc-modal__panel {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: 88vh;
	overflow-y: auto;
	background: var(--ymr-cc-navy-2);
	color: var(--ymr-cc-ink);
	border: 1px solid rgba(201, 162, 75, 0.35);
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
	padding: 26px 28px;
	animation: ymr-cc-pop 0.25s ease both;
}

@keyframes ymr-cc-pop {
	from { transform: translateY(12px) scale(0.98); opacity: 0; }
	to   { transform: translateY(0) scale(1); opacity: 1; }
}

.ymr-cc-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
}

.ymr-cc-modal__head h2 {
	margin: 0;
	font-size: 1.25rem;
	color: var(--ymr-cc-gold-2);
	letter-spacing: 0.02em;
}

.ymr-cc-modal__x {
	background: none;
	border: none;
	color: var(--ymr-cc-muted);
	font-size: 1.8rem;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

.ymr-cc-modal__x:hover {
	color: var(--ymr-cc-ink);
}

.ymr-cc-cat {
	padding: 16px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ymr-cc-cat__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.ymr-cc-cat__name {
	font-weight: 600;
	font-size: 1rem;
}

.ymr-cc-cat__state {
	font-size: 0.78rem;
	color: var(--ymr-cc-gold-2);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.ymr-cc-cat__desc {
	margin: 8px 0 0;
	font-size: 0.86rem;
	line-height: 1.5;
	color: var(--ymr-cc-muted);
}

/* Interrupteur */
.ymr-cc-switch {
	position: relative;
	display: inline-block;
	width: 46px;
	height: 26px;
	flex: 0 0 auto;
}

.ymr-cc-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.ymr-cc-switch__slider {
	position: absolute;
	inset: 0;
	background: #33415a;
	border-radius: 26px;
	transition: background 0.2s ease;
}

.ymr-cc-switch__slider::before {
	content: "";
	position: absolute;
	height: 20px;
	width: 20px;
	left: 3px;
	top: 3px;
	background: #eaf0f7;
	border-radius: 50%;
	transition: transform 0.2s ease;
}

.ymr-cc-switch input:checked + .ymr-cc-switch__slider {
	background: var(--ymr-cc-gold);
}

.ymr-cc-switch input:checked + .ymr-cc-switch__slider::before {
	transform: translateX(20px);
}

.ymr-cc-modal__actions {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	margin-top: 22px;
	flex-wrap: wrap;
}

/* Mobile */
@media (max-width: 640px) {
	.ymr-cc-banner__inner {
		padding: 16px;
	}
	.ymr-cc-banner__actions {
		width: 100%;
	}
	.ymr-cc-banner__actions .ymr-cc-btn {
		flex: 1 1 auto;
		text-align: center;
	}
	.ymr-cc-btn--ghost {
		flex-basis: 100%;
	}
}
