/* Audacieuse – Décor saisonnier */
.ag-sd-svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
	stroke-width: var(--agsd-stroke, 1.4);
}
/* Trait de même finesse quelle que soit la taille du motif ; protégé des styles du thème */
.ag-sd-svg, .ag-sd-svg * { fill: none !important; stroke: currentColor !important; vector-effect: non-scaling-stroke; }
.ag-sd-in { color: inherit !important; padding: 0 !important; margin: 0 !important; border: 0 !important; background: none !important; }

.ag-sd,
.ag-sd-garland {
	pointer-events: none;
	user-select: none;
	line-height: 0;
	filter: drop-shadow(0 1px 1.2px rgba(40, 30, 10, .12));
}
.ag-sd { animation: agsd-in .9s cubic-bezier(.2, .7, .2, 1) both; }
.ag-sd-in { display: block; width: 100%; height: 100%; transform-origin: 50% 15%; }

/* Coins */
.ag-sd-corner {
	position: absolute;
	z-index: 6;
	width: var(--s);
	height: var(--s);
	transform: translate(var(--dx, 0), var(--dy, 0)) rotate(var(--r, 0deg));
}
.ag-sd-tl { top: calc(var(--s) * -.42); left: calc(var(--s) * -.42); }
.ag-sd-tr { top: calc(var(--s) * -.42); right: calc(var(--s) * -.42); }
.ag-sd-bl { bottom: calc(var(--s) * -.42); left: calc(var(--s) * -.42); }
.ag-sd-br { bottom: calc(var(--s) * -.42); right: calc(var(--s) * -.42); }

/* En ligne, avant / après un texte */
.ag-sd-inline {
	position: relative;
	display: inline-block;
	width: var(--s, 1em);
	height: var(--s, 1em);
	vertical-align: middle;
	margin: -.2em .45em 0;
	transform: translate(var(--dx, 0), var(--dy, 0)) rotate(var(--r, 0deg));
}

/* Guirlande suspendue */
.ag-sd-garland {
	position: absolute;
	z-index: 6;
	top: var(--dy, 0);
	left: 0;
	right: 0;
	height: 0;
	overflow: visible;
}
.ag-sd-hang {
	position: absolute;
	top: 0;
	width: var(--s);
	margin-left: calc(var(--s) / -2);
	transform-origin: 50% 0;
	animation: agsd-drop 1.1s cubic-bezier(.2, .7, .2, 1) both;
}
.ag-sd-thread {
	display: block;
	width: 1px;
	height: var(--len, 30px);
	margin: 0 auto -1px;
	background: currentColor !important;
	padding: 0 !important;
	border: 0 !important;
	opacity: .45;
}
.ag-sd-hang .ag-sd-in { height: var(--s); transform: rotate(var(--r, 0deg)); transform-origin: 50% 0; }

/* Mouvement très doux */
.agsd-motion .ag-sd-corner .ag-sd-in,
.agsd-motion .ag-sd-inline .ag-sd-in { animation: agsd-sway 6.5s ease-in-out infinite alternate; }
.agsd-motion .ag-sd-hang { animation: agsd-drop 1.1s cubic-bezier(.2, .7, .2, 1) both, agsd-swing 5.5s ease-in-out var(--delay, 0s) infinite alternate; }

@keyframes agsd-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes agsd-drop { from { opacity: 0; translate: 0 -12px; } to { opacity: 1; translate: 0 0; } }
@keyframes agsd-sway { from { rotate: -5deg; translate: 0 0; } to { rotate: 5deg; translate: 0 -2px; } }
@keyframes agsd-swing { from { rotate: -3.5deg; } to { rotate: 3.5deg; } }

/* Animation de fond */
.ag-sd-canvas {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 99990;
}

/* Phrase d’accroche [ag_decor_message] */
.ag-sd-message {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .8em;
	padding: .55em 1em;
	font-size: .8125rem;
	letter-spacing: .06em;
	text-align: center;
	color: var(--agsd-color, #a8864f);
}
.ag-sd-message a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .3s; }
.ag-sd-message a:hover { border-bottom-color: currentColor; }
.ag-sd-msg-icon { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ag-sd-msg-icon .ag-sd-svg { stroke-width: 1.3; }

@media (prefers-reduced-motion: reduce) {
	.ag-sd, .ag-sd-hang, .ag-sd-in { animation: none !important; }
}
@media print {
	.ag-sd, .ag-sd-garland, .ag-sd-canvas { display: none !important; }
}

/* ---------- Mode placement (administrateurs uniquement) ---------- */
.ag-sd-preview { outline: 1px dashed rgba(168, 134, 79, .7); outline-offset: 2px; }
.agsd-pick-ui { font: 13px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #222; }
.agsd-pick-bar {
	position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 2147483000;
	display: flex; gap: 16px; align-items: center;
	background: #1d1d1d; color: #f3ead9; padding: 10px 18px; border-radius: 999px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.agsd-pick-bar b { color: #d9bd86; }
.agsd-pick-bar a { color: #d9bd86 !important; text-decoration: underline; }
.agsd-pick-box {
	position: fixed; z-index: 2147482999; pointer-events: none; display: none;
	border: 1.5px solid #a8864f; background: rgba(168, 134, 79, .08); border-radius: 2px;
	transition: all .08s ease-out;
}
.agsd-pick-panel {
	position: fixed; right: 18px; top: 80px; z-index: 2147483000; width: 320px; max-height: calc(100vh - 160px); overflow: auto;
	background: #fff; border: 1px solid #e6dccb; border-radius: 10px; padding: 16px 18px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
}
.agsd-pick-panel[hidden] { display: none; }
.agsd-pick-panel h4 { margin: 0 0 10px; font-size: 15px; font-weight: 600; color: #8a6d3b; }
.agsd-pick-panel label { display: block; margin: 0 0 9px; font-size: 12px; color: #555; }
.agsd-pick-panel input:not([type=checkbox]):not([type=range]), .agsd-pick-panel select {
	display: block; width: 100%; box-sizing: border-box; margin-top: 3px; padding: 5px 7px;
	border: 1px solid #d8d0c2; border-radius: 4px; font-size: 13px; background: #fff; color: #222; height: auto;
}
.agsd-pick-panel input[type=range] { width: 100%; }
.agsd-pick-panel .code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.agsd-pick-row { display: flex; gap: 8px; }
.agsd-pick-row > label { flex: 1; min-width: 0; }
.agsd-pick-cb { display: flex !important; gap: 6px; align-items: center; }
.agsd-pick-actions { display: flex; gap: 8px; margin-top: 12px; }
.agsd-pick-actions button { flex: 1; padding: 8px; border-radius: 5px; border: 1px solid #d8d0c2; background: #faf7f2; cursor: pointer; font-size: 13px; color: #333; }
.agsd-pick-actions .agsd-btn-primary { background: #a8864f; border-color: #a8864f; color: #fff; }
.agsd-pick-msg { margin: 10px 0 0; min-height: 1em; font-size: 12px; color: #6d5a33; }
