/* Calendanse Live — sonomètre (overlay canonique) */

.cdl-sound-overlay[hidden] {
	display: none !important;
}

.cdl-sound-overlay:not([hidden]) {
	display: block;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 99992;
}

.cdl-sound-overlay__backdrop {
	position: absolute;
	inset: 0;
	border: 0;
	padding: 0;
	margin: 0;
	background: rgba(7, 6, 20, 0.45);
	cursor: pointer;
}

.cdl-sound-overlay__sheet {
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	width: min(100%, 420px);
	max-width: 100vw;
	max-height: min(92dvh, calc(100% - 8px));
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	box-sizing: border-box;
	padding: 1.15rem 1.15rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
	border-radius: 20px 20px 0 0;
	background: #fffaf6;
	color: #1a1a1a;
	box-shadow: 0 -8px 32px rgba(7, 6, 20, 0.18);
}

@media (min-width: 783px) {
	.cdl-sound-overlay__sheet {
		top: 50%;
		bottom: auto;
		transform: translate(-50%, -50%);
		max-height: min(88vh, 720px);
		border-radius: 18px;
	}
}

.cdl-sound-overlay__close {
	position: absolute;
	top: 0.65rem;
	right: 0.65rem;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 999px;
	background: #f4ebe1;
	color: #1a1a1a;
	font-size: 1.55rem;
	line-height: 1;
	cursor: pointer;
}

.cdl-sound-overlay__close:focus-visible {
	outline: 2px solid #e84c9a;
	outline-offset: 2px;
}

.cdl-sound-overlay__kicker {
	margin: 0 2.5rem 0.15rem 0;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #8e0000;
}

.cdl-sound-overlay__title {
	margin: 0 2.5rem 0.35rem 0;
	font-size: 1.35rem;
	line-height: 1.2;
}

.cdl-sound-overlay__event {
	margin: 0;
	font-weight: 700;
	font-size: 1rem;
}

.cdl-sound-overlay__meta {
	margin: 0.15rem 0 0;
	font-size: 0.92rem;
	color: #5c5c5c;
}

.cdl-sound-overlay__lead {
	margin: 1rem 0 0.85rem;
	font-size: 1.05rem;
	line-height: 1.45;
}

.cdl-sound-overlay__privacy,
.cdl-sound-overlay__help,
.cdl-sound-overlay__contrib {
	margin: 0.75rem 0 0;
	font-size: 0.85rem;
	line-height: 1.45;
	color: #5c5c5c;
}

.cdl-sound-overlay .cdl-global-live__hub-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	margin-top: 0.35rem;
	padding: 0.65rem 1rem;
	border: none;
	border-radius: 10px;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	cursor: pointer;
	box-sizing: border-box;
}

.cdl-sound-overlay .cdl-global-live__hub-cta--primary {
	background: linear-gradient(135deg, #c62828, #8e0000);
	color: #fff;
}

.cdl-sound-overlay .cdl-global-live__hub-cta--secondary {
	background: #fff;
	color: #8e0000;
	border: 1px solid #c62828;
}

.cdl-sound-overlay .cdl-global-live__hub-cta:focus-visible {
	outline: 2px solid #1a1a1a;
	outline-offset: 2px;
}

.cdl-sound-overlay .cdl-sound-meter__status {
	margin: 0.5rem 0 0;
	font-size: 0.92rem;
}

.cdl-sound-overlay .cdl-sound-meter__status--err {
	color: #8e0000;
	font-weight: 600;
}

.cdl-sound-gauge {
	position: relative;
	margin: 0.35rem auto 0;
	width: min(100%, 280px);
}

.cdl-sound-gauge__svg {
	display: block;
	width: 100%;
	height: auto;
}

.cdl-sound-gauge__track {
	stroke: #ead6c8;
}

.cdl-sound-gauge__arc {
	stroke: #c4a35a;
	transition: stroke 0.2s ease, stroke-dashoffset 0.12s linear;
}

.cdl-sound-overlay[data-cdl-sound-mood='calme'] .cdl-sound-gauge__arc {
	stroke: #7d8a9a;
}
.cdl-sound-overlay[data-cdl-sound-mood='modere'] .cdl-sound-gauge__arc {
	stroke: #c4a35a;
}
.cdl-sound-overlay[data-cdl-sound-mood='anime'] .cdl-sound-gauge__arc {
	stroke: #c45a8c;
}
.cdl-sound-overlay[data-cdl-sound-mood='soutenu'] .cdl-sound-gauge__arc {
	stroke: #e84c9a;
}
.cdl-sound-overlay[data-cdl-sound-mood='tres_fort'] .cdl-sound-gauge__arc {
	stroke: #c62828;
}

.cdl-sound-gauge__reading {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0.15rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	pointer-events: none;
}

.cdl-sound-gauge__value {
	font-size: clamp(2.6rem, 12vw, 3.6rem);
	font-weight: 800;
	line-height: 0.9;
	letter-spacing: -0.03em;
	color: #1a1a1a;
}

.cdl-sound-gauge__unit {
	margin-top: 0.15rem;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: none;
	color: #5c5c5c;
}

.cdl-sound-overlay__estimated {
	margin: 0.15rem 0 0;
	text-align: center;
	font-size: 0.88rem;
	font-weight: 600;
	color: #5c5c5c;
}

.cdl-sound-overlay__mood {
	margin: 0.35rem 0 0.55rem;
	text-align: center;
	font-size: 1.15rem;
	font-weight: 700;
}

.cdl-sound-curve {
	margin: 0 0 0.65rem;
}

.cdl-sound-curve__label {
	margin: 0 0 0.2rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #5c5c5c;
	text-align: center;
}

.cdl-sound-curve__svg {
	display: block;
	width: 100%;
	height: auto;
	max-height: 56px;
	background: #fff;
	border: 1px solid #ead6c8;
	border-radius: 12px;
}

.cdl-sound-curve__path {
	stroke: #c45a8c;
}

.cdl-sound-express-bar {
	margin: 0 0 0.65rem;
}

.cdl-sound-express-bar__track {
	height: 8px;
	border-radius: 999px;
	background: #ead6c8;
	overflow: hidden;
}

.cdl-sound-express-bar__fill {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, #c62828, #8e0000);
}

.cdl-sound-express-bar p {
	margin: 0.35rem 0 0;
	text-align: center;
	font-size: 0.88rem;
	font-weight: 600;
}

.cdl-sound-alert {
	margin: 0 0 0.65rem;
	padding: 0.65rem 0.75rem;
	border-radius: 12px;
	background: #fff3e8;
	border: 1px solid #e0b080;
}

.cdl-sound-alert__title {
	margin: 0;
	font-weight: 700;
	font-size: 0.95rem;
}

.cdl-sound-alert__body {
	margin: 0.25rem 0 0;
	font-size: 0.88rem;
	color: #5c5c5c;
}

.cdl-sound-request-banner {
	margin: 0.5rem 0 0;
	padding: 0.65rem 0.75rem;
	border-radius: 12px;
	background: #f6eef8;
	border: 1px solid #5b2c8a;
}

.cdl-sound-request-banner p {
	margin: 0;
	font-weight: 700;
	font-size: 0.95rem;
	color: #5b2c8a;
}

.cdl-sound-overlay__linkbtn {
	display: block;
	width: 100%;
	margin-top: 0.45rem;
	padding: 0.55rem 0.35rem;
	min-height: 44px;
	border: 0;
	background: transparent;
	color: #8e0000;
	font-size: 0.95rem;
	font-weight: 600;
	text-align: center;
	text-decoration: underline;
	cursor: pointer;
	box-sizing: border-box;
}

.cdl-sound-overlay__linkbtn:focus-visible {
	outline: 2px solid #1a1a1a;
	outline-offset: 2px;
}

.cdl-sound-history__item {
	padding: 0.65rem 0;
	border-bottom: 1px solid #ead6c8;
}

.cdl-sound-history__meta {
	font-size: 0.95rem;
}

.cdl-sound-history__vals {
	margin-top: 0.2rem;
	font-size: 0.88rem;
	color: #5c5c5c;
}

.cdl-sound-calib-label {
	display: block;
	margin: 0.75rem 0;
	font-weight: 600;
	font-size: 0.95rem;
}

.cdl-sound-calib-label input {
	display: block;
	width: 100%;
	margin-top: 0.35rem;
	min-height: 44px;
	padding: 0.5rem 0.65rem;
	border: 1px solid #ead6c8;
	border-radius: 10px;
	box-sizing: border-box;
	font-size: 1rem;
}

.cdl-sound-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.5rem;
	margin: 0 0 0.85rem;
}

.cdl-sound-stats > div {
	background: #fff;
	border: 1px solid #ead6c8;
	border-radius: 12px;
	padding: 0.55rem 0.35rem;
	text-align: center;
}

.cdl-sound-stats dt {
	margin: 0;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #5c5c5c;
}

.cdl-sound-stats dd {
	margin: 0.2rem 0 0;
	font-size: 0.98rem;
	font-weight: 800;
}

.cdl-sound-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.cdl-sound-community-block {
	margin: 0.75rem 0;
}

.cdl-sound-consent {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
	margin: 0.5rem 0;
	font-size: 0.92rem;
	line-height: 1.35;
}

.cdl-sound-consent input {
	margin-top: 0.2rem;
	min-width: 18px;
	min-height: 18px;
}

.cdl-sound-zone-label {
	display: block;
	margin: 0.5rem 0;
	font-weight: 600;
	font-size: 0.95rem;
}

.cdl-sound-zone-label select {
	display: block;
	width: 100%;
	margin-top: 0.35rem;
	min-height: 44px;
	padding: 0.45rem 0.65rem;
	border: 1px solid #ead6c8;
	border-radius: 10px;
	box-sizing: border-box;
}

.cdl-sound-pm-panel {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid #ead6c8;
}

.cdl-sound-pm-panel input[type='search'] {
	width: 100%;
	min-height: 44px;
	padding: 0.5rem 0.65rem;
	border: 1px solid #ead6c8;
	border-radius: 10px;
	box-sizing: border-box;
	font-size: 1rem;
}

.cdl-sound-pm-results {
	margin-top: 0.5rem;
	display: grid;
	gap: 0.35rem;
}

.cdl-sound-community-live {
	margin: 0.75rem 0;
	padding: 0.75rem;
	border-radius: 12px;
	background: #fff;
	border: 1px solid #ead6c8;
}

.cdl-sound-zone-row {
	margin-top: 0.25rem;
	font-size: 0.92rem;
}

.cdl-sound-entry .cdl-btn,
.cdl-js-sound-open {
	min-height: 44px;
}

.cdl-global-live__hub-cta--sound {
	background: #fff;
	color: #5b2c8a;
	border: 1px solid #5b2c8a;
	font-weight: 700;
}

.cdl-global-live__hub-cta--sound:hover,
.cdl-global-live__hub-cta--sound:focus-visible {
	background: #f6eef8;
	outline: 2px solid #5b2c8a;
	outline-offset: 2px;
}

@media (max-width: 360px) {
	.cdl-sound-overlay__sheet {
		padding-left: 0.9rem;
		padding-right: 0.9rem;
	}
	.cdl-sound-stats {
		gap: 0.35rem;
	}
	.cdl-sound-stats dd {
		font-size: 0.88rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cdl-sound-gauge__arc {
		transition: none;
	}
	.cdl-sound-express-bar__fill {
		transition: none;
	}
}
