/* GM Consent */
#gmc-root{
	--gmc-accent:#123a5e;
	--gmc-tint:color-mix(in srgb,var(--gmc-accent) 9%,#fff);
	--gmc-ink:#1d232b;
	--gmc-muted:#5d6874;
	--gmc-line:#e3e8ee;
	--gmc-radius:18px;
	font-family:inherit;
	color:var(--gmc-ink);
}
#gmc-root *,#gmc-root *::before,#gmc-root *::after{box-sizing:border-box}
#gmc-root [hidden]{display:none!important}

/* Réinitialisation des styles du thème */
#gmc-root button,#gmc-root input{font:inherit;margin:0;text-transform:none;letter-spacing:normal;box-shadow:none;min-height:0;height:auto;width:auto;line-height:1.2}
#gmc-root h2{margin:0;padding:0;font-family:inherit;text-transform:none;letter-spacing:-.01em;color:var(--gmc-ink)}
#gmc-root p{margin:0;padding:0}

/* ---------- Bandeau ---------- */
#gmc-root .gmc-banner{
	position:fixed;bottom:24px;z-index:2147483000;
	width:min(410px,calc(100vw - 32px));
	background:#fff;border-radius:var(--gmc-radius);
	padding:24px 24px 18px;
	box-shadow:0 1px 2px rgba(16,24,40,.06),0 18px 48px -12px rgba(16,24,40,.28);
	border:1px solid var(--gmc-line);border-top:4px solid var(--gmc-accent);
	animation:gmc-in .45s cubic-bezier(.2,.8,.2,1) both;
}
#gmc-root .gmc-banner.gmc-pos-left{left:24px}
#gmc-root .gmc-banner.gmc-pos-right{right:24px}
#gmc-root .gmc-banner.gmc-pos-center{left:50%;transform:translateX(-50%);width:min(560px,calc(100vw - 32px));animation-name:gmc-in-center}

#gmc-root .gmc-banner-head,#gmc-root .gmc-modal-head{display:flex;align-items:center;gap:12px;margin-bottom:12px}
#gmc-root .gmc-badge{
	flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;
	width:42px;height:42px;border-radius:12px;
	background:var(--gmc-tint);color:var(--gmc-accent);
}
#gmc-root .gmc-title{font-size:18px;font-weight:700;line-height:1.3}
#gmc-root .gmc-text{font-size:14.5px;line-height:1.6;color:var(--gmc-muted)}
#gmc-root .gmc-inline-link{color:var(--gmc-accent);font-weight:600;text-decoration:underline;text-underline-offset:3px}

#gmc-root .gmc-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}

/* ---------- Boutons ---------- */
#gmc-root .gmc-btn{
	display:inline-flex;align-items:center;justify-content:center;
	padding:12px 16px;border-radius:11px;cursor:pointer;
	font-size:14.5px;font-weight:600;line-height:1.2;text-align:center;
	border:1.5px solid var(--gmc-accent);
	transition:background-color .15s ease,color .15s ease,transform .15s ease;
}
#gmc-root .gmc-btn-solid{background:var(--gmc-accent);color:#fff}
#gmc-root .gmc-btn-solid:hover{background:color-mix(in srgb,var(--gmc-accent) 85%,#000)}
#gmc-root .gmc-btn-ghost{background:#fff;color:var(--gmc-accent)}
#gmc-root .gmc-btn-ghost:hover{background:var(--gmc-tint)}
#gmc-root .gmc-btn:active{transform:translateY(1px)}

#gmc-root .gmc-text-btn{
	display:block;margin:12px auto 0;padding:6px 8px;background:none;border:0;cursor:pointer;
	color:var(--gmc-muted);font-size:13.5px;font-weight:600;
	text-decoration:underline;text-underline-offset:3px;
}
#gmc-root .gmc-text-btn:hover{color:var(--gmc-accent)}

#gmc-root button:focus-visible,#gmc-root a:focus-visible,#gmc-root input:focus-visible{
	outline:3px solid color-mix(in srgb,var(--gmc-accent) 45%,transparent);outline-offset:2px;
}

/* ---------- Fenêtre de préférences ---------- */
html.gmc-lock,html.gmc-lock body{overflow:hidden}
#gmc-root .gmc-overlay{
	position:fixed;inset:0;z-index:2147483001;
	background:rgba(15,22,32,.48);
	display:flex;align-items:center;justify-content:center;padding:16px;
	animation:gmc-fade .2s ease both;
}
#gmc-root .gmc-modal{
	width:min(560px,100%);max-height:min(88vh,720px);
	display:flex;flex-direction:column;
	background:#fff;border-radius:var(--gmc-radius);
	box-shadow:0 24px 64px -16px rgba(16,24,40,.4);
	outline:none;overflow:hidden;
	animation:gmc-pop .25s cubic-bezier(.2,.8,.2,1) both;
}
#gmc-root .gmc-modal-head{padding:22px 24px 0;margin-bottom:6px}
#gmc-root .gmc-modal-head .gmc-title{flex:1}
#gmc-root .gmc-close{
	display:inline-flex;align-items:center;justify-content:center;
	width:36px;height:36px;border-radius:10px;border:0;background:transparent;
	color:var(--gmc-muted);cursor:pointer;padding:0;
}
#gmc-root .gmc-close:hover{background:var(--gmc-tint);color:var(--gmc-accent)}
#gmc-root .gmc-modal-body{padding:8px 24px 8px;overflow-y:auto}
#gmc-root .gmc-modal-body > .gmc-text{margin-bottom:16px}

#gmc-root .gmc-cat{border:1px solid var(--gmc-line);border-radius:14px;padding:14px 16px;margin-bottom:10px}
#gmc-root .gmc-cat-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
#gmc-root .gmc-cat-title{font-size:15.5px;font-weight:700;color:var(--gmc-ink);cursor:pointer;margin:0}
#gmc-root .gmc-cat-desc{font-size:13.5px;line-height:1.55;color:var(--gmc-muted);margin-top:6px}
#gmc-root .gmc-always{
	flex:0 0 auto;font-size:12.5px;font-weight:600;color:var(--gmc-accent);
	background:var(--gmc-tint);padding:5px 10px;border-radius:999px;
}

/* Interrupteur */
#gmc-root .gmc-switch{
	-webkit-appearance:none;appearance:none;flex:0 0 auto;
	position:relative;width:46px;height:26px;border-radius:999px;
	background:#cdd5de;border:0;cursor:pointer;transition:background-color .2s ease;
}
#gmc-root .gmc-switch::after{
	content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;
	background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .2s ease;
}
#gmc-root .gmc-switch:checked{background:var(--gmc-accent)}
#gmc-root .gmc-switch:checked::after{transform:translateX(20px)}

#gmc-root .gmc-modal-foot{
	display:grid;grid-template-columns:repeat(3,1fr);gap:10px;
	padding:16px 24px 22px;border-top:1px solid var(--gmc-line);margin-top:8px;
}

/* ---------- Bouton flottant ---------- */
#gmc-root .gmc-fab{
	position:fixed;bottom:20px;z-index:2147482999;
	width:46px;height:46px;border-radius:14px;padding:0;
	display:inline-flex;align-items:center;justify-content:center;
	background:#fff;color:var(--gmc-accent);cursor:pointer;
	border:1px solid var(--gmc-line);
	box-shadow:0 8px 24px -8px rgba(16,24,40,.3);
	transition:transform .15s ease;
}
#gmc-root .gmc-fab:hover{transform:translateY(-2px)}
#gmc-root .gmc-fab.gmc-pos-left{left:20px}
#gmc-root .gmc-fab.gmc-pos-right{right:20px}

/* ---------- Animations ---------- */
@keyframes gmc-in{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@keyframes gmc-in-center{from{opacity:0;transform:translate(-50%,16px)}to{opacity:1;transform:translateX(-50%)}}
@keyframes gmc-fade{from{opacity:0}to{opacity:1}}
@keyframes gmc-pop{from{opacity:0;transform:scale(.97) translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){
	#gmc-root *,#gmc-root .gmc-banner,#gmc-root .gmc-overlay,#gmc-root .gmc-modal{animation:none!important;transition:none!important}
}

/* ---------- Mobile ---------- */
@media (max-width:600px){
	#gmc-root .gmc-banner,#gmc-root .gmc-banner.gmc-pos-center{
		left:12px;right:12px;bottom:12px;width:auto;transform:none;padding:20px 18px 14px;
		animation-name:gmc-in;
	}
	#gmc-root .gmc-modal-foot{grid-template-columns:1fr 1fr}
	#gmc-root .gmc-modal-foot [data-gmc="save"]{grid-column:1 / -1;order:3}
	#gmc-root .gmc-modal-head{padding:18px 18px 0}
	#gmc-root .gmc-modal-body{padding:8px 18px}
	#gmc-root .gmc-modal-foot{padding:14px 18px 18px}
}
