/* APA Consent — minimal RGPD/CNIL banner. Navy palette matched to Accueil V2.
   All controls are scoped under #apa-consent / #apa-consent-reopen (id specificity)
   so they override the Hello Elementor theme's default <button> styling (pink
   #CC3366 border + pink hover) without !important. */
#apa-consent.apa-consent {
	--apa-c-navy: #16243D;
	--apa-c-text: #E7EAF0;
	--apa-c-muted: #A9B4C4;
	--apa-c-border: rgba(255, 255, 255, .22);
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	background: var(--apa-c-navy);
	color: var(--apa-c-text);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.45;
	box-shadow: 0 -6px 24px rgba(0, 0, 0, .25);
}
#apa-consent.apa-consent[hidden] { display: none; }

#apa-consent .apa-consent__bar {
	display: flex;
	align-items: center;
	gap: 24px;
	max-width: 1600px;
	margin: 0 auto;
	padding: 18px 32px;
}
#apa-consent .apa-consent__intro {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	flex: 1 1 auto;
	min-width: 0;
}
#apa-consent .apa-consent__shield { flex: 0 0 auto; color: var(--apa-c-muted); margin-top: 2px; }
#apa-consent .apa-consent__text { margin: 0; color: var(--apa-c-text); }
#apa-consent .apa-consent__link {
	color: var(--apa-c-text);
	text-decoration: underline;
	white-space: nowrap;
}
#apa-consent .apa-consent__link:hover { color: #fff; }

#apa-consent .apa-consent__actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex: 0 0 auto;
}

/* "Personnaliser" text button + chevron */
#apa-consent .apa-consent__toggle {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: 0;
	border-radius: 0;
	color: var(--apa-c-text);
	font: inherit;
	cursor: pointer;
	padding: 8px 4px;
	transition: color .15s ease;
}
#apa-consent .apa-consent__toggle:hover,
#apa-consent .apa-consent__toggle:focus { color: #fff; background: none; }
#apa-consent .apa-consent__chevron { transition: transform .2s ease; }
#apa-consent .apa-consent__toggle[aria-expanded="true"] .apa-consent__chevron { transform: rotate(180deg); }

/* Action buttons (Tout refuser / Tout accepter / Valider mes choix) */
#apa-consent .apa-consent__btn {
	-webkit-appearance: none;
	appearance: none;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	border-radius: 8px;
	padding: 11px 22px;
	cursor: pointer;
	white-space: nowrap;
	border: 1px solid transparent;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
#apa-consent .apa-consent__btn--ghost {
	background-color: transparent;
	border-color: var(--apa-c-border);
	color: var(--apa-c-text);
}
#apa-consent .apa-consent__btn--ghost:hover,
#apa-consent .apa-consent__btn--ghost:focus {
	background-color: rgba(255, 255, 255, .1);
	border-color: rgba(255, 255, 255, .45);
	color: #fff;
}
#apa-consent .apa-consent__btn--solid {
	background-color: #fff;
	border-color: #fff;
	color: var(--apa-c-navy);
}
#apa-consent .apa-consent__btn--solid:hover,
#apa-consent .apa-consent__btn--solid:focus {
	background-color: #e6ebf3;
	border-color: #e6ebf3;
	color: var(--apa-c-navy);
}

/* Expandable preferences panel */
#apa-consent .apa-consent__panel {
	border-top: 1px solid var(--apa-c-border);
	max-width: 1600px;
	margin: 0 auto;
	padding: 8px 32px 24px;
}
#apa-consent .apa-consent__panel[hidden] { display: none; }
#apa-consent .apa-consent__row {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 16px 0;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}
#apa-consent .apa-consent__rowtext { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; }
#apa-consent .apa-consent__rowtitle { font-weight: 600; color: #fff; }
#apa-consent .apa-consent__rowdesc { color: var(--apa-c-muted); font-size: 13px; }

/* Toggle switch (these are <button> elements — fully reset, then restyle) */
#apa-consent .apa-consent__switch {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: 46px;
	height: 26px;
	border-radius: 999px;
	border: 0;
	background-color: rgba(255, 255, 255, .25);
	cursor: pointer;
	padding: 0;
	margin: 0;
	transition: background-color .15s ease;
}
#apa-consent .apa-consent__switch:hover { background-color: rgba(255, 255, 255, .32); }
#apa-consent .apa-consent__knob {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background-color: #fff;
	transition: transform .15s ease;
}
#apa-consent .apa-consent__switch[aria-checked="true"] { background-color: #3FA66A; }
#apa-consent .apa-consent__switch[aria-checked="true"]:hover { background-color: #379159; }
#apa-consent .apa-consent__switch[aria-checked="true"] .apa-consent__knob { transform: translateX(20px); }
#apa-consent .apa-consent__switch.is-locked {
	background-color: rgba(255, 255, 255, .3);
	cursor: not-allowed;
}
#apa-consent .apa-consent__switch.is-locked:hover { background-color: rgba(255, 255, 255, .3); }
#apa-consent .apa-consent__switch.is-locked .apa-consent__knob { transform: translateX(20px); background-color: #c7cedb; }

#apa-consent .apa-consent__panelactions {
	display: flex;
	justify-content: flex-end;
	padding-top: 18px;
}

/* Floating reopen button (bottom-left) */
#apa-consent-reopen.apa-consent-reopen {
	-webkit-appearance: none;
	appearance: none;
	position: fixed;
	left: 18px;
	bottom: 18px;
	z-index: 99998;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .15);
	background-color: #16243D;
	color: #E7EAF0;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
	transition: color .15s ease, background-color .15s ease;
}
#apa-consent-reopen.apa-consent-reopen[hidden] { display: none; }
#apa-consent-reopen.apa-consent-reopen:hover,
#apa-consent-reopen.apa-consent-reopen:focus { color: #fff; background-color: #1d3052; }

/* Inline shortcode/link trigger */
.apa-consent-link {
	-webkit-appearance: none;
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

@media (max-width: 900px) {
	#apa-consent .apa-consent__bar {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		padding: 16px 18px;
	}
	#apa-consent .apa-consent__actions { flex-wrap: wrap; justify-content: flex-start; }
	#apa-consent .apa-consent__btn { flex: 1 1 auto; text-align: center; }
	#apa-consent .apa-consent__panel { padding: 8px 18px 20px; }
	#apa-consent .apa-consent__row { gap: 14px; }
}
