/**
 * Calendanse — UX commune des notices produit (Gutenberg).
 * Classes scopées .cd-nx* ; compatible core/group, columns, details, buttons.
 *
 * @package Calendanse_Child
 */

.cd-notice-product .entry-content,
.cd-notice-product #primary .entry-content {
	max-width: 46rem;
	margin-left: auto;
	margin-right: auto;
}

.cd-notice-product .entry-content > .cd-nx,
.cd-notice-product .entry-content .cd-nx {
	--cd-nx-navy: #0b1f4d;
	--cd-nx-navy-mid: #1e3a5f;
	--cd-nx-accent: #c05820;
	--cd-nx-soft: #f4f7fb;
	--cd-nx-border: rgba(11, 31, 77, 0.14);
	--cd-nx-muted: #4a5568;
	--cd-nx-radius: 14px;
	color: var(--cd-nx-navy);
}

/*
 * Hero — texte clair sur navy.
 * Cause bug v1.0.0 : `.cd-nx p { color:#1a2333 }` (même spécificité, après)
 * écrasait `.cd-nx-hero p`. + Astra `#page .entry-content :where(h1)`.
 * Fix : exclure le hero des p sombres ; sélecteurs avec #page (pas de !important).
 */
body.cd-notice-product #page .entry-content .cd-nx-hero {
	padding: clamp(1.35rem, 3vw, 2rem) clamp(1.15rem, 2.5vw, 1.75rem);
	margin: 0 0 1.75rem;
	border-radius: var(--cd-nx-radius);
	background:
		radial-gradient(ellipse at 12% 0%, rgba(192, 88, 32, 0.22), transparent 45%),
		linear-gradient(145deg, var(--cd-nx-navy) 0%, var(--cd-nx-navy-mid) 55%, #243b5a 100%);
	color: #fff;
	box-shadow: 0 12px 36px rgba(11, 31, 77, 0.22);
}

body.cd-notice-product #page .entry-content .cd-nx-hero,
body.cd-notice-product #page .entry-content .cd-nx-hero :where(p, li, span, strong, em, a, small, h1, h2, h3) {
	color: #fff;
}

body.cd-notice-product #page .entry-content .cd-nx-hero h1,
body.cd-notice-product #page .entry-content .cd-nx-hero .wp-block-heading {
	color: #fff;
	margin: 0 0 0.65rem;
	font-size: clamp(1.45rem, 3.4vw, 2rem);
	line-height: 1.2;
	font-weight: 800;
}

body.cd-notice-product #page .entry-content .cd-nx-hero > p {
	margin: 0 0 0.55rem;
	max-width: 40rem;
	font-size: clamp(1.02rem, 2vw, 1.12rem);
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.96);
}

body.cd-notice-product #page .entry-content .cd-nx-hero > p:last-of-type {
	margin-bottom: 0.15rem;
	opacity: 0.95;
	font-size: 0.98rem;
}

body.cd-notice-product #page .entry-content .cd-nx-hero p strong,
body.cd-notice-product #page .entry-content .cd-nx-hero strong {
	color: #fff;
	font-weight: 700;
}

body.cd-notice-product #page .entry-content .cd-nx-hero a {
	color: #ffe8d6;
	text-decoration: underline;
	text-underline-offset: 0.12em;
}

body.cd-notice-product #page .entry-content .cd-nx-hero a:hover,
body.cd-notice-product #page .entry-content .cd-nx-hero a:focus {
	color: #fff;
}

/* Badges hero (tarif ≠ statut déploiement) */
body.cd-notice-product #page .entry-content .cd-nx-hero .cd-nx-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0 0 0.85rem;
	opacity: 1;
	font-size: 0.78rem;
	line-height: 1.2;
}

body.cd-notice-product #page .entry-content .cd-nx-hero .cd-nx-badge {
	display: inline-block;
	padding: 0.28rem 0.65rem;
	border-radius: 999px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.28);
}

body.cd-notice-product #page .entry-content .cd-nx-hero .cd-nx-badge--premium {
	background: rgba(192, 88, 32, 0.55);
	border-color: rgba(255, 232, 214, 0.45);
}

body.cd-notice-product #page .entry-content .cd-nx-hero .cd-nx-badge--status {
	background: transparent;
	border-style: dashed;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
}

/* CTA dans le hero */
body.cd-notice-product #page .entry-content .cd-nx-hero .wp-block-buttons {
	margin: 0.95rem 0 0;
	gap: 0.55rem;
}

body.cd-notice-product #page .entry-content .cd-nx-hero .wp-block-button__link {
	background: #fff;
	color: var(--cd-nx-navy, #0b1f4d);
	border-radius: 10px;
	font-weight: 700;
	text-decoration: none;
	padding: 0.55rem 1.05rem;
}

body.cd-notice-product #page .entry-content .cd-nx-hero .is-style-outline .wp-block-button__link,
body.cd-notice-product #page .entry-content .cd-nx-hero .wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: #fff;
	border: 1.5px solid rgba(255, 255, 255, 0.75);
}

body.cd-notice-product #page .entry-content .cd-nx-hero .wp-block-button__link:hover,
body.cd-notice-product #page .entry-content .cd-nx-hero .wp-block-button__link:focus {
	color: var(--cd-nx-navy, #0b1f4d);
	background: #ffe8d6;
	border-color: #ffe8d6;
}

body.cd-notice-product #page .entry-content .cd-nx-hero .is-style-outline .wp-block-button__link:hover,
body.cd-notice-product #page .entry-content .cd-nx-hero .wp-block-button.is-style-outline .wp-block-button__link:hover {
	color: var(--cd-nx-navy, #0b1f4d);
}

/* Sections */
.cd-notice-product .entry-content h2.wp-block-heading {
	font-size: clamp(1.2rem, 2.4vw, 1.4rem);
	font-weight: 800;
	color: var(--cd-nx-navy, #0b1f4d);
	margin: 2rem 0 0.65rem;
	padding-bottom: 0.35rem;
	border-bottom: 3px solid var(--cd-nx-accent, #c05820);
}

.cd-notice-product .entry-content h3.wp-block-heading {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 1.1rem 0 0.4rem;
	color: var(--cd-nx-navy, #0b1f4d);
}

.cd-notice-product .entry-content > p,
.cd-notice-product .entry-content .cd-nx > p,
.cd-notice-product .entry-content .cd-nx .wp-block-group:not(.cd-nx-hero) p {
	line-height: 1.6;
	color: #1a2333;
}

/* Glance cards */
.cd-notice-product .entry-content .cd-nx-glance {
	gap: 1rem;
	margin: 1rem 0 1.5rem;
}

.cd-notice-product .entry-content .cd-nx-glance .wp-block-column {
	padding: 1.1rem 1.2rem;
	border: 1px solid var(--cd-nx-border, rgba(11, 31, 77, 0.14));
	border-radius: 12px;
	background: linear-gradient(180deg, #f8fafc 0%, #fff 72%);
}

/* Actions list */
.cd-notice-product .entry-content .cd-nx-actions ul,
.cd-notice-product .entry-content .cd-nx-howto ol {
	padding-left: 1.2rem;
}

.cd-notice-product .entry-content .cd-nx-actions li,
.cd-notice-product .entry-content .cd-nx-howto li {
	margin: 0.35rem 0;
	line-height: 1.5;
}

/* Bon à savoir */
.cd-notice-product .entry-content .cd-nx-note {
	margin: 1.5rem 0;
	padding: 1rem 1.15rem;
	border-left: 4px solid var(--cd-nx-accent, #c05820);
	border-radius: 0 12px 12px 0;
	background: var(--cd-nx-soft, #f4f7fb);
}

.cd-notice-product .entry-content .cd-nx-note > *:first-child {
	margin-top: 0;
}

.cd-notice-product .entry-content .cd-nx-note > *:last-child {
	margin-bottom: 0;
}

/* FAQ */
.cd-notice-product .entry-content .cd-nx-faq .wp-block-details,
.cd-notice-product .entry-content .wp-block-details {
	margin: 0.55rem 0;
	padding: 0.75rem 1rem;
	border: 1px solid var(--cd-nx-border, rgba(11, 31, 77, 0.12));
	border-radius: 10px;
	background: #fff;
}

.cd-notice-product .entry-content .wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--cd-nx-navy, #0b1f4d);
}

/* CTA final */
.cd-notice-product .entry-content .cd-nx-cta {
	margin: 2rem 0 1rem;
	padding: 1.25rem 1.35rem;
	border-radius: var(--cd-nx-radius, 14px);
	background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
	border: 1px solid var(--cd-nx-border, rgba(11, 31, 77, 0.14));
}

.cd-notice-product .entry-content .cd-nx-cta .wp-block-buttons {
	margin-top: 0.75rem;
}

/* Separators */
.cd-notice-product .entry-content .wp-block-separator {
	opacity: 0.35;
	margin: 1.75rem auto;
}

/* Legacy HTML notices: keep product CSS, tame taglines that looked technical */
.cd-notice-product .cd-notice-hero__tagline {
	font-size: 0.95rem;
	opacity: 0.9;
}

@media (max-width: 781px) {
	.cd-notice-product .entry-content {
		max-width: 100%;
		padding-left: 0;
		padding-right: 0;
	}

	.cd-notice-product .entry-content .cd-nx-glance {
		flex-wrap: wrap !important;
	}

	.cd-notice-product .entry-content .cd-nx-glance .wp-block-column {
		flex-basis: 100% !important;
	}

	.cd-notice-product .entry-content .cd-nx-cta .wp-block-button,
	.cd-notice-product .entry-content .cd-nx-cta .wp-block-button__link {
		width: 100%;
	}

	body.cd-notice-product #page .entry-content .cd-nx-hero .wp-block-button,
	body.cd-notice-product #page .entry-content .cd-nx-hero .wp-block-button__link {
		width: 100%;
	}
}

@media (max-width: 360px) {
	.cd-notice-product .entry-content .cd-nx-hero {
		padding: 1.1rem;
	}
}

/* CTA tactiles — notices Gutenberg */
body.cd-notice-product #page .entry-content .wp-block-button__link {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}

/*
 * Notice page « Utiliser OndeDanse » — même rythme que Alertes :
 * fond gris clair, colonne blanche ~760–900 px, hero navy, titres ivoire.
 * Les pages Astra sont souvent `.ast-plain-container` (les notices article
 * sont `.ast-separate-container`) : couvrir les deux.
 */
body.cd-notice-ondedanse,
body.cd-notice-ondedanse.ast-plain-container,
body.cd-notice-ondedanse.ast-separate-container,
body.cd-notice-ondedanse.ast-plain-container .site-content,
body.cd-notice-ondedanse.ast-separate-container .site-content {
	background: #eef2f6;
}

body.cd-notice-ondedanse.ast-plain-container .site-content .ast-container,
body.cd-notice-ondedanse.ast-separate-container .site-content .ast-container {
	max-width: 54rem;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
}

body.cd-notice-ondedanse.ast-plain-container #primary,
body.cd-notice-ondedanse.ast-separate-container #primary,
body.cd-notice-ondedanse.ast-separate-container .ast-article-single {
	max-width: 54rem;
	margin-left: auto;
	margin-right: auto;
}

body.cd-notice-ondedanse.ast-plain-container.ast-no-sidebar #primary,
body.cd-notice-ondedanse.ast-plain-container #primary {
	margin-top: 1.15rem;
	margin-bottom: 2rem;
	background: #fff;
	padding: 1.15rem 1.35rem 2rem;
	box-shadow: 0 8px 28px rgba(11, 31, 77, 0.06);
	border-radius: 4px;
}

@media (min-width: 1200px) {
	body.cd-notice-ondedanse.ast-plain-container.ast-no-sidebar #primary {
		margin-top: 1.25rem;
		margin-bottom: 2rem;
	}
}

body.cd-notice-ondedanse.ast-separate-container .ast-article-single {
	background: #fff;
	padding: 1.15rem 1.35rem 2rem;
	box-shadow: 0 1px 0 rgba(11, 31, 77, 0.04);
}

body.cd-notice-ondedanse .entry-content > .wp-block-group.cd-nx,
body.cd-notice-ondedanse .entry-content > .cd-nx {
	padding: 0;
	max-width: none;
}

body.cd-notice-ondedanse .entry-header,
body.cd-notice-ondedanse .ast-single-post .entry-header,
body.cd-notice-ondedanse.page .entry-header {
	display: none;
}

body.cd-notice-ondedanse #page .entry-content .cd-nx-hero {
	background:
		radial-gradient(ellipse at 88% 6%, rgba(168, 85, 247, 0.26), transparent 46%),
		radial-gradient(ellipse at 12% 0%, rgba(192, 88, 32, 0.22), transparent 45%),
		linear-gradient(145deg, var(--cd-nx-navy) 0%, var(--cd-nx-navy-mid) 55%, #243b5a 100%);
}

body.cd-notice-ondedanse #page .entry-content .cd-nx-hero h1,
body.cd-notice-ondedanse #page .entry-content .cd-nx-hero h1.wp-block-heading,
body.cd-notice-ondedanse #page .entry-content .cd-nx-hero .wp-block-heading {
	color: #f8f4ee;
}

body.cd-notice-ondedanse #page .entry-content .cd-nx-hero > p:first-of-type {
	font-weight: 600;
	font-size: clamp(1.05rem, 2vw, 1.18rem);
	color: rgba(248, 244, 238, 0.98);
}

body.cd-notice-ondedanse .cd-nx-glance h3.wp-block-heading {
	font-size: 0.82rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin: 0 0 0.45rem;
}

body.cd-notice-ondedanse .cd-nx-flow-step {
	margin: 0.45rem 0;
	padding: 0.85rem 1rem;
	border: 1px solid var(--cd-nx-border, rgba(11, 31, 77, 0.14));
	border-radius: 12px;
	background: linear-gradient(180deg, #f8fafc 0%, #fff 72%);
	text-align: center;
}

body.cd-notice-ondedanse .cd-nx-flow-step p {
	margin: 0;
	font-size: 0.88rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--cd-nx-navy, #0b1f4d);
}

body.cd-notice-ondedanse .cd-nx-flow-arrow {
	margin: 0.15rem 0;
	text-align: center;
	color: var(--cd-nx-accent, #c05820);
	font-weight: 700;
	line-height: 1;
}

body.cd-notice-ondedanse .cd-nx-tabs .wp-block-column,
body.cd-notice-ondedanse .cd-nx-share .wp-block-column {
	padding: 1rem 1.1rem;
	border: 1px solid var(--cd-nx-border, rgba(11, 31, 77, 0.14));
	border-radius: 12px;
	background: linear-gradient(180deg, #f8fafc 0%, #fff 72%);
}

body.cd-notice-ondedanse .cd-nx-share h3.wp-block-heading {
	margin: 0 0 0.35rem;
	font-size: 1.02rem;
}

@media (max-width: 781px) {
	body.cd-notice-ondedanse.ast-separate-container .ast-article-single,
	body.cd-notice-ondedanse.ast-plain-container #primary {
		padding: 0.85rem 0.9rem 1.5rem;
	}

	body.cd-notice-ondedanse .cd-nx-tabs,
	body.cd-notice-ondedanse .cd-nx-share {
		flex-wrap: wrap !important;
	}

	body.cd-notice-ondedanse .cd-nx-tabs .wp-block-column,
	body.cd-notice-ondedanse .cd-nx-share .wp-block-column {
		flex-basis: 100% !important;
	}

	body.cd-notice-ondedanse #page .entry-content .cd-nx-hero .wp-block-buttons {
		flex-direction: column;
		align-items: stretch;
	}
}
