/* Astreos Consent 1.0.0 */
#astreos-consent {
	--ac-radius: 10px;
	--ac-shadow: 0 10px 40px rgba(0, 0, 0, .18);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ac-text);
}
#astreos-consent *,
#astreos-consent *::before,
#astreos-consent *::after { box-sizing: border-box; }
#astreos-consent [hidden] { display: none !important; }

/* ---- Bandeau ---- */
#astreos-consent .ac-banner {
	position: fixed;
	z-index: 2147483000;
	background: var(--ac-bg);
	color: var(--ac-text);
	box-shadow: var(--ac-shadow);
	display: flex;
	gap: 16px 28px;
	padding: 20px 24px;
}
#astreos-consent.ac-pos-bar .ac-banner {
	left: 0; right: 0; bottom: 0;
	align-items: center;
	justify-content: center;
	border-top: 1px solid rgba(0, 0, 0, .08);
}
#astreos-consent.ac-pos-bar .ac-body { max-width: 760px; }
#astreos-consent.ac-pos-box .ac-banner {
	left: 20px; bottom: 20px;
	width: min(420px, calc(100vw - 40px));
	flex-direction: column;
	border-radius: var(--ac-radius);
}
#astreos-consent.ac-pos-center .ac-banner {
	left: 50%; top: 50%;
	transform: translate(-50%, -50%);
	width: min(560px, calc(100vw - 32px));
	flex-direction: column;
	border-radius: var(--ac-radius);
}
#astreos-consent .ac-title {
	margin: 0 0 4px;
	font-weight: 700;
	font-size: 17px;
	color: var(--ac-text);
}
#astreos-consent .ac-text { margin: 0; color: var(--ac-text); font-size: 14px; }
#astreos-consent .ac-inline-link,
#astreos-consent .ac-link {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	cursor: pointer;
}
#astreos-consent .ac-actions,
.astreos-consent-placeholder {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}
#astreos-consent.ac-pos-bar .ac-actions { flex-shrink: 0; }

/* Boutons : « Tout refuser » et « Tout accepter » ont exactement le même poids visuel. */
#astreos-consent .ac-btn,
.astreos-consent-placeholder .ac-btn {
	appearance: none;
	margin: 0;
	min-height: 44px;
	padding: 10px 18px;
	border-radius: 6px;
	border: 2px solid var(--ac-primary, #1f2937);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-transform: none;
	letter-spacing: normal;
	transition: filter .15s ease;
}
#astreos-consent .ac-btn-main,
.astreos-consent-placeholder .ac-btn-main {
	background: var(--ac-primary, #1f2937);
	color: #fff;
}
#astreos-consent .ac-btn-ghost {
	background: transparent;
	color: var(--ac-primary);
}
#astreos-consent .ac-btn:hover { filter: brightness(1.12); }
#astreos-consent button:focus-visible,
#astreos-consent a:focus-visible,
#astreos-consent summary:focus-visible,
#astreos-consent input:focus-visible + .ac-slider,
.astreos-consent-placeholder button:focus-visible {
	outline: 3px solid var(--ac-accent, #2563eb);
	outline-offset: 2px;
}

/* ---- Panneau ---- */
#astreos-consent .ac-overlay {
	position: fixed; inset: 0;
	z-index: 2147483001;
	background: rgba(0, 0, 0, .45);
}
#astreos-consent .ac-panel {
	position: fixed;
	z-index: 2147483002;
	left: 50%; top: 50%;
	transform: translate(-50%, -50%);
	width: min(640px, calc(100vw - 24px));
	max-height: calc(100vh - 24px);
	display: flex;
	flex-direction: column;
	background: var(--ac-bg);
	color: var(--ac-text);
	border-radius: var(--ac-radius);
	box-shadow: var(--ac-shadow);
	outline: none;
}
#astreos-consent .ac-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 22px 10px;
}
#astreos-consent .ac-panel-title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ac-text);
}
#astreos-consent .ac-close {
	width: 40px; height: 40px;
	border: 0; border-radius: 50%;
	background: transparent;
	color: var(--ac-text);
	font-size: 26px; line-height: 1;
	cursor: pointer;
}
#astreos-consent .ac-close:hover { background: rgba(0, 0, 0, .06); }
#astreos-consent .ac-panel-body {
	overflow-y: auto;
	padding: 0 22px 12px;
	-webkit-overflow-scrolling: touch;
}
#astreos-consent .ac-panel > .ac-actions {
	padding: 14px 22px 18px;
	border-top: 1px solid rgba(0, 0, 0, .08);
	justify-content: flex-end;
}
#astreos-consent .ac-cat {
	border: 1px solid rgba(0, 0, 0, .1);
	border-radius: 8px;
	padding: 12px 14px;
	margin-top: 12px;
}
#astreos-consent .ac-cat-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
#astreos-consent .ac-cat-label { font-weight: 700; cursor: pointer; }
#astreos-consent .ac-always { font-size: 13px; font-weight: 600; color: var(--ac-text); opacity: .75; }
#astreos-consent .ac-cat-desc { margin: 6px 0 0; font-size: 14px; opacity: .85; }
#astreos-consent .ac-details { margin-top: 8px; font-size: 13px; }
#astreos-consent .ac-details summary { cursor: pointer; color: var(--ac-text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
#astreos-consent .ac-table-wrap { overflow-x: auto; margin-top: 8px; }
#astreos-consent .ac-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
#astreos-consent .ac-table th,
#astreos-consent .ac-table td {
	text-align: left;
	vertical-align: top;
	padding: 6px 8px;
	border-bottom: 1px solid rgba(0, 0, 0, .08);
	color: var(--ac-text);
	background: transparent;
}
#astreos-consent .ac-table td:first-child { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
#astreos-consent .ac-id { margin: 14px 0 0; font-size: 12px; opacity: .7; word-break: break-all; }

/* Interrupteur */
#astreos-consent .ac-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
#astreos-consent .ac-switch input {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	margin: 0; opacity: 0; cursor: pointer; z-index: 1;
}
#astreos-consent .ac-slider {
	position: absolute; inset: 0;
	background: #9ca3af;
	border-radius: 26px;
	transition: background .2s ease;
}
#astreos-consent .ac-slider::before {
	content: "";
	position: absolute;
	width: 20px; height: 20px;
	left: 3px; top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform .2s ease;
}
#astreos-consent .ac-switch input:checked + .ac-slider { background: var(--ac-accent); }
#astreos-consent .ac-switch input:checked + .ac-slider::before { transform: translateX(20px); }

/* Bouton flottant */
#astreos-consent .ac-float {
	position: fixed;
	z-index: 2147482999;
	left: 16px; bottom: 16px;
	width: 44px; height: 44px;
	display: flex; align-items: center; justify-content: center;
	border: 0; border-radius: 50%;
	background: var(--ac-primary);
	color: #fff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
	cursor: pointer;
	padding: 0;
}

html.ac-lock { overflow: hidden; }

/* Contenu bloqué (cartes, vidéos) */
.astreos-consent-placeholder {
	flex-direction: column;
	justify-content: center;
	text-align: center;
	padding: 24px;
	background: #f3f4f6;
	border: 1px dashed #9ca3af;
	border-radius: 8px;
	color: #1f2937;
	font-size: 14px;
}
.astreos-consent-placeholder p { margin: 0; max-width: 520px; }
.astreos-consent-placeholder .ac-link { color: inherit; text-decoration: underline; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }

/* Tableau [astreos_cookies] */
.astreos-cookie-table-wrap { overflow-x: auto; }
.astreos-cookie-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.astreos-cookie-table th,
.astreos-cookie-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid rgba(0, 0, 0, .1); }

@media (max-width: 760px) {
	#astreos-consent.ac-pos-bar .ac-banner { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
	#astreos-consent .ac-title { font-size: 16px; }
	#astreos-consent .ac-text { font-size: 13.5px; }
	/* Refuser et Accepter côte à côte (même poids), Personnaliser en dessous. */
	#astreos-consent .ac-actions .ac-btn { flex: 1 1 calc(50% - 5px); padding: 10px 12px; }
	#astreos-consent .ac-actions .ac-btn-ghost { flex-basis: 100%; order: 3; }
	#astreos-consent .ac-panel > .ac-actions { justify-content: stretch; }
	#astreos-consent.ac-pos-box .ac-banner { left: 10px; bottom: 10px; width: calc(100vw - 20px); }
}
@media (prefers-reduced-motion: reduce) {
	#astreos-consent *, #astreos-consent *::before { transition: none !important; }
}
