/*
 * Fiche formation du plugin (style catalogue Digiforma).
 * Couleurs : --ndw-accent (principale), --ndw-accent2 (secondaire), réglables dans WooCommerce > Réglages > Digiforma.
 * Habillages : .ndw-fiche--classique (proche du catalogue Digiforma) et .ndw-fiche--moderne (arrondis, ombres douces).
 */

.ndw-fiche {
	--f-a: var(--ndw-accent, #1D3976);
	--f-a2: var(--ndw-accent2, #FC7805);
	--f-hero: #2B3A5C;
	--f-text: #3A3A3A;
	--f-muted: #6B6F76;
	--f-line: #E3E6EC;
	--f-bg: #F4F5F7;
	--f-card: #fff;
	--f-radius: 3px;
	--f-radius-lg: 3px;
	--f-shadow: 0 1px 3px rgba(20, 30, 60, .08);
	--f-gap: 24px;
	background: var(--f-bg);
	color: var(--f-text);
	font-size: 16px;
	line-height: 1.6;
	padding-bottom: 64px;
}

.ndw-fiche *,
.ndw-fiche *::before,
.ndw-fiche *::after {
	box-sizing: border-box;
}

.ndw-fiche__wrap {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
}

/* ---------- Bandeau ---------- */
.ndw-fiche__hero {
	background: var(--f-hero);
	color: #fff;
	padding: 36px 0 44px;
}

.ndw-fiche__crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
	font-size: 14px;
	opacity: .85;
}

.ndw-fiche__crumbs a {
	color: #fff;
	text-decoration: none;
}

.ndw-fiche__crumbs a:hover {
	text-decoration: underline;
}

.ndw-fiche__title {
	margin: 0 0 8px;
	color: #fff;
	font-size: clamp(26px, 3.4vw, 38px);
	line-height: 1.2;
	font-weight: 600;
}

.ndw-fiche__subtitle {
	max-width: 760px;
	margin: 0 0 16px;
	font-size: 17px;
	opacity: .9;
}

.ndw-fiche__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
	font-size: 15px;
}

.ndw-fiche__chip::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-right: 8px;
	border-radius: 50%;
	background: var(--f-a2);
	vertical-align: 2px;
}

.ndw-fiche__cta {
	display: inline-block;
	padding: 10px 22px;
	border: 2px solid #fff;
	border-radius: var(--f-radius);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .15s, color .15s;
}

.ndw-fiche__cta:hover,
.ndw-fiche__cta:focus-visible {
	background: #fff;
	color: var(--f-hero);
}

/* ---------- Grille ---------- */
.ndw-fiche__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 370px;
	gap: var(--f-gap);
	align-items: start;
	margin-top: 32px;
}

.ndw-fiche__main {
	display: grid;
	gap: var(--f-gap);
	min-width: 0;
}

/* ---------- Blocs de contenu ---------- */
.ndw-fiche__block {
	padding: 26px 28px;
	border-radius: var(--f-radius-lg);
	background: var(--f-card);
	box-shadow: var(--f-shadow);
}

.ndw-fiche__h2 {
	margin: 0 0 18px;
	color: var(--f-text);
	font-size: 22px;
	line-height: 1.3;
	font-weight: 700;
}

.ndw-fiche__h2::after {
	content: "";
	display: block;
	width: 64px;
	height: 3px;
	margin-top: 10px;
	background: var(--f-a2);
}

.ndw-fiche__body > :last-child,
.ndw-fiche__body p:last-child {
	margin-bottom: 0;
}

.ndw-fiche__body ul {
	margin: 0;
	padding-left: 1.2em;
}

.ndw-fiche__body li + li {
	margin-top: 6px;
}

.ndw-fiche__body a {
	color: var(--f-a);
}

/* Listes à puces cochées pour objectifs, public, prérequis */
.ndw-fiche__block--objectifs ul,
.ndw-fiche__block--public ul,
.ndw-fiche__block--prerequis ul {
	padding-left: 0;
	list-style: none;
}

.ndw-fiche__block--objectifs li,
.ndw-fiche__block--public li,
.ndw-fiche__block--prerequis li {
	position: relative;
	padding-left: 30px;
}

.ndw-fiche__block--objectifs li::before,
.ndw-fiche__block--public li::before,
.ndw-fiche__block--prerequis li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: .3em;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--f-a) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* Description repliable */
.ndw-fiche__more.is-folded {
	max-height: 220px;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(#000 60%, transparent);
	mask-image: linear-gradient(#000 60%, transparent);
}

.ndw-fiche .ndw-fiche__toggle,
.ndw-fiche .ndw-fiche__toggle:hover,
.ndw-fiche .ndw-fiche__toggle:focus {
	margin-top: 10px;
	box-shadow: none;
	padding: 6px 0;
	border: 0;
	background: none;
	color: var(--f-a);
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

/* Programme en accordéon */
.ndw-fiche__step {
	border-top: 1px solid var(--f-line);
}

.ndw-fiche__step:last-child {
	border-bottom: 1px solid var(--f-line);
}

.ndw-fiche__step summary {
	position: relative;
	padding: 14px 36px 14px 0;
	color: var(--f-a);
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.ndw-fiche__step summary::-webkit-details-marker {
	display: none;
}

.ndw-fiche__step summary::after {
	content: "+";
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
}

.ndw-fiche__step[open] summary::after {
	content: "–";
}

.ndw-fiche__step ul {
	margin: 0 0 16px;
}

/* Formateurs */
.ndw-fiche__people {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 14px;
	padding: 0 !important;
	list-style: none;
}

.ndw-fiche__people li {
	display: flex;
	gap: 12px;
	align-items: center;
	margin: 0 !important;
}

.ndw-fiche__avatar {
	display: grid;
	place-items: center;
	flex: none;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--f-a) 12%, #fff);
	color: var(--f-a);
	font-weight: 700;
}

.ndw-fiche__avatar--img {
	display: block;
	object-fit: cover;
	padding: 0;
	max-width: none;
}

.ndw-fiche__people a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ndw-fiche__people small {
	color: var(--f-muted);
}

/* Satisfaction */
.ndw-fiche__score {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin: 0 0 8px;
}

.ndw-fiche__score strong {
	color: var(--f-a);
	font-size: 40px;
	line-height: 1;
}

.ndw-fiche__score span {
	font-size: 18px;
	font-weight: 600;
}

.ndw-fiche__score small {
	margin-left: 8px;
	color: var(--f-muted);
}

.ndw-fiche__note {
	color: var(--f-muted);
	font-size: 14px;
}

/* Vidéo */
.ndw-fiche .ndw-prog__video iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
}

/* ---------- Encart d'inscription ---------- */
.ndw-fiche__side {
	position: sticky;
	top: 24px;
	scroll-margin-top: 24px;
}

.admin-bar .ndw-fiche__side {
	top: 56px;
}

.ndw-fiche__card {
	overflow: hidden;
	border-radius: var(--f-radius-lg);
	background: var(--f-card);
	box-shadow: 0 4px 18px rgba(20, 30, 60, .10);
}

.ndw-fiche__image img {
	display: block;
	width: 100%;
	height: 190px;
	object-fit: cover;
}

.ndw-fiche__card-body {
	padding: 20px 22px 24px;
}

.ndw-fiche__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 14px;
}

.ndw-fiche__tag {
	padding: 3px 9px;
	border-radius: var(--f-radius);
	background: var(--f-a);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}

.ndw-fiche__tag--alt {
	background: var(--f-a2);
}

/* Le formulaire d'achat est déjà dans la carte : pas de second panneau. */
.ndw-fiche form.variations_form.ndw-panel {
	padding: 0;
	border: 0;
	box-shadow: none;
	background: transparent;
}

.ndw-fiche form.cart {
	margin: 0;
}

/* Spécificité renforcée : le thème et Elementor stylent aussi .button.alt */
.ndw-fiche .ndw-fiche__card .single_add_to_cart_button,
.ndw-fiche .ndw-fiche__card button.single_add_to_cart_button.button.alt {
	width: 100%;
	padding: 13px 18px;
	border: 0;
	border-radius: var(--f-radius);
	background: var(--f-a2);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
}

.ndw-fiche .ndw-fiche__card .single_add_to_cart_button:hover,
.ndw-fiche .ndw-fiche__card .single_add_to_cart_button:focus-visible {
	background: color-mix(in srgb, var(--f-a2) 85%, #000);
	color: #fff;
}

.ndw-fiche .ndw-fiche__card .single_add_to_cart_button.disabled,
.ndw-fiche .ndw-fiche__card .single_add_to_cart_button:disabled {
	background: var(--f-a2);
	color: #fff;
	opacity: .45;
}

.ndw-fiche .quantity {
	display: none;
}

.ndw-fiche .ndw-waitlist {
	margin: 16px 0 0;
	border-radius: var(--f-radius);
}

.ndw-fiche .woocommerce-notices-wrapper:not(:empty) {
	margin-bottom: 0;
}

/* ---------- Habillage moderne ---------- */
.ndw-fiche--moderne {
	--f-radius: 999px;
	--f-radius-lg: 20px;
	--f-bg: #F3F5FA;
	--f-shadow: 0 1px 2px rgba(20, 30, 60, .04), 0 8px 24px rgba(20, 30, 60, .06);
	--f-gap: 22px;
}

.ndw-fiche--moderne .ndw-fiche__hero {
	position: relative;
	overflow: hidden;
	padding: 48px 0 92px;
	background:
		radial-gradient(900px 380px at 85% -10%, color-mix(in srgb, var(--f-a2) 32%, transparent), transparent 60%),
		linear-gradient(135deg, var(--f-hero), var(--f-a));
}

.ndw-fiche--moderne .ndw-fiche__grid {
	margin-top: -56px;
	position: relative;
}

.ndw-fiche--moderne .ndw-fiche__chips {
	gap: 8px;
}

.ndw-fiche--moderne .ndw-fiche__chip {
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .14);
	backdrop-filter: blur(4px);
}

.ndw-fiche--moderne .ndw-fiche__chip::before {
	margin-right: 7px;
}

.ndw-fiche--moderne .ndw-fiche__cta {
	border: 0;
	background: #fff;
	color: var(--f-hero);
	padding: 12px 26px;
}

.ndw-fiche--moderne .ndw-fiche__cta:hover,
.ndw-fiche--moderne .ndw-fiche__cta:focus-visible {
	background: var(--f-a2);
	color: #fff;
}

.ndw-fiche--moderne .ndw-fiche__block {
	padding: 28px 30px;
}

.ndw-fiche--moderne .ndw-fiche__h2 {
	font-size: 21px;
}

.ndw-fiche--moderne .ndw-fiche__h2::after {
	width: 40px;
	height: 4px;
	border-radius: 4px;
}

.ndw-fiche--moderne .ndw-fiche__step {
	margin-bottom: 10px;
	border: 0;
	border-radius: 14px;
	background: #F5F7FB;
}

.ndw-fiche--moderne .ndw-fiche__step:last-child {
	border: 0;
}

.ndw-fiche--moderne .ndw-fiche__step summary {
	padding: 14px 44px 14px 18px;
}

.ndw-fiche--moderne .ndw-fiche__step summary::after {
	right: 16px;
}

.ndw-fiche--moderne .ndw-fiche__step ul {
	padding: 0 18px 16px 36px;
}

.ndw-fiche--moderne .ndw-fiche__card {
	box-shadow: 0 2px 4px rgba(20, 30, 60, .04), 0 18px 40px rgba(20, 30, 60, .12);
}

.ndw-fiche--moderne .ndw-fiche__image img {
	height: 200px;
}

.ndw-fiche--moderne .ndw-fiche__tag {
	padding: 4px 12px;
}

.ndw-fiche--moderne .ndw-facts__row {
	border-bottom-style: dashed;
}

.ndw-fiche--moderne .ndw-style-calendar .ndw-session.ndw-cal {
	width: 74px;
	padding-top: 10px;
	border-width: 1.5px;
	border-top-width: 1.5px;
	border-radius: 14px;
	background: #F5F7FB;
	box-shadow: inset 0 6px 0 var(--f-a);
}

.ndw-fiche--moderne .ndw-style-calendar .ndw-cal::before,
.ndw-fiche--moderne .ndw-style-calendar .ndw-cal::after {
	display: none;
}

.ndw-fiche--moderne .ndw-style-calendar .ndw-cal.is-low {
	box-shadow: inset 0 6px 0 var(--f-a2);
}

.ndw-fiche--moderne .ndw-style-calendar .ndw-cal.is-full {
	box-shadow: inset 0 6px 0 #B5BCC9;
}

.ndw-fiche--moderne .ndw-style-calendar .ndw-cal.is-checked {
	box-shadow: 0 6px 16px color-mix(in srgb, var(--f-a) 35%, transparent);
	transform: translateY(-2px);
}

.ndw-fiche--moderne .ndw-pick {
	border-left: 0;
	border-radius: 12px;
}

.ndw-fiche--moderne .ndw-waitlist {
	border-radius: 16px;
}

/* ---------- Tablette et téléphone ---------- */
@media (max-width: 1000px) {
	.ndw-fiche__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.ndw-fiche__side {
		position: static;
		order: -1;
	}

	.ndw-fiche__image {
		display: none;
	}
}

@media (max-width: 600px) {
	.ndw-fiche__hero {
		padding: 26px 0 30px;
	}

	.ndw-fiche--moderne .ndw-fiche__hero {
		padding: 30px 0 72px;
	}

	.ndw-fiche__block,
	.ndw-fiche--moderne .ndw-fiche__block {
		padding: 20px 18px;
	}

	.ndw-fiche__card-body {
		padding: 18px 16px 20px;
	}

	.ndw-fiche__grid {
		gap: 16px;
		margin-top: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ndw-fiche *,
	.ndw-fiche *::before,
	.ndw-fiche *::after {
		transition: none !important;
		transform: none !important;
	}
}

/* ---------- Corrections de priorité face aux styles du thème ---------- */
.ndw-fiche a.ndw-fiche__cta,
.ndw-fiche a.ndw-fiche__cta:visited {
	color: #fff;
}

.ndw-fiche a.ndw-fiche__cta:hover,
.ndw-fiche a.ndw-fiche__cta:focus-visible {
	color: var(--f-hero);
}

.ndw-fiche--moderne a.ndw-fiche__cta,
.ndw-fiche--moderne a.ndw-fiche__cta:visited {
	color: var(--f-hero);
}

.ndw-fiche--moderne a.ndw-fiche__cta:hover,
.ndw-fiche--moderne a.ndw-fiche__cta:focus-visible {
	color: #fff;
}

.ndw-fiche .ndw-fiche__toggle[hidden] {
	display: none !important;
}

/* Moderne : la date choisie garde le fond plein de la couleur principale */
.ndw-fiche--moderne .ndw-style-calendar .ndw-session.ndw-cal.is-checked {
	background: var(--f-a);
	border-color: var(--f-a);
	color: #fff;
}

.ndw-fiche--moderne .ndw-style-calendar .ndw-session.ndw-cal.is-low.is-checked {
	background: var(--f-a2);
	border-color: var(--f-a2);
}

.ndw-fiche--moderne .ndw-style-calendar .ndw-session.ndw-cal.is-full.is-checked {
	background: #8d95a5;
	border-color: #8d95a5;
}

/* Bouton de la liste d'attente : même style que le bouton d'inscription */
.ndw-fiche .ndw-fiche__card .ndw-waitlist__submit,
.ndw-fiche .ndw-fiche__card button.ndw-waitlist__submit.button.alt {
	width: 100%;
	padding: 12px 16px;
	border: 0;
	border-radius: var(--f-radius);
	background: var(--f-a);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
}

.ndw-fiche .ndw-fiche__card .ndw-waitlist__submit:hover,
.ndw-fiche .ndw-fiche__card .ndw-waitlist__submit:focus-visible {
	background: color-mix(in srgb, var(--f-a) 85%, #000);
	color: #fff;
}

/* Compétences visées : même liste cochée que les objectifs */
.ndw-fiche__block--competences ul {
	padding-left: 0;
	list-style: none;
}

.ndw-fiche__block--competences li {
	position: relative;
	padding-left: 30px;
}

.ndw-fiche__block--competences li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: .3em;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--f-a2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* Rubriques en accordéon (informations pratiques) */
.ndw-fiche__acc-body {
	padding: 0 0 14px;
}

.ndw-fiche__acc-body > :last-child {
	margin-bottom: 0;
}

.ndw-fiche__acc-body p {
	margin: 0 0 8px;
}

.ndw-fiche--moderne .ndw-fiche__acc-body {
	padding: 0 18px 16px;
}

.ndw-fiche--moderne .ndw-fiche__acc-body ul {
	padding: 0 0 0 1.2em;
	margin: 0;
}
