/**
 * MLM Digital Products — Stylesheet
 *
 * Core design tokens bridged to the DeepDigital parent theme CSS variables.
 *
 * Styles for:
 * - Single product page (hero, sections, CTA)
 * - Page templates (ressources, lead magnet, formulaire audit, formation)
 * - My Account enhancements
 * - Shared components (cards, badges, buttons, steps)
 *
 * @package DeepDigital_Child
 */

/* ==========================================================================
   CSS Custom Properties — bridged from DeepDigital theme vars
   ========================================================================== */

:root {
	--mlm-primary: var(--colorMain, #F2BC00);
	--mlm-primary-hover: var(--colorMainLighter10, #ffcf26);
	--mlm-primary-light: var(--colorMainLighter30, #ffe58c);
	--mlm-secondary: var(--colorMain3, #00bea3);
	--mlm-success: var(--colorMain2, #77AE39);
	--mlm-warning: var(--colorMain4, #ff497c);
	--mlm-danger: var(--colorMain4, #ff497c);
	--mlm-light: var(--greyColor, #f4f4f5);
	--mlm-dark: var(--darkgreyColor, #1f2732);
	--mlm-darker: var(--darkColor, #191f28);
	--mlm-grey: var(--fontColor, #7f7f7f);
	--mlm-grey-light: var(--fontColorLight, #a4a9b9);
	--mlm-border: #dedfe1;
	--mlm-radius: 0px;
	--mlm-radius-pill: 50px;
	--mlm-shadow: 4px 0 30px 0 rgba(0, 7, 46, 0.06);
	--mlm-shadow-lg: 0 8px 30px rgba(0, 7, 46, 0.1);
	--mlm-transition: 0.4s linear;
}

/* ==========================================================================
   Full-Width Template Override
   --------------------------------------------------------------------------
   The DeepDigital theme wraps custom templates (not in page-templates/) in:
     section.page_content > .container > .row
   adding 150px padding and a max-width container. We override this so our
   sections can span the full viewport width.
   ========================================================================== */

body[class*="page-template-templatespage-"] .page_content {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	margin: 0;
	overflow: visible;
}

body[class*="page-template-templatespage-"] .page_content > .container {
	max-width: 100%;
	width: 100%;
	padding: 0 !important;
	overflow: visible;
}

body[class*="page-template-templatespage-"] .page_content > .container > .row {
	margin-left: 0;
	margin-right: 0;
	overflow: visible;
}

/* columns_padding_30 is on the section itself — reset it */
body[class*="page-template-templatespage-"] .page_content.columns_padding_30 {
	padding: 0 !important;
}

/* Reset .ls (light section) background — our sections carry their own bg */
body[class*="page-template-templatespage-"] .page_content.ls {
	background-color: transparent;
}

/*
 * Override .ls heading color.
 * The theme sets ".ls h1,.ls h2…{ color: var(--darkgreyColor) }" (0,1,1).
 * We reset to "inherit" so headings pick up the color from their parent
 * section: white in dark sections, dark in light sections.
 */
body[class*="page-template-templatespage-"] .ls h1,
body[class*="page-template-templatespage-"] .ls h2,
body[class*="page-template-templatespage-"] .ls h3,
body[class*="page-template-templatespage-"] .ls h4,
body[class*="page-template-templatespage-"] .ls h5,
body[class*="page-template-templatespage-"] .ls h6 {
	color: inherit;
}

/*
 * Override .ls link color for our buttons.
 * The theme sets ".ls a { color: var(--colorMain) }" (gold text),
 * which makes button text invisible on gold backgrounds.
 */
body[class*="page-template-templatespage-"] .ls a.mlm-btn,
body[class*="page-template-templatespage-"] .ls a.mlm-btn:hover,
.ls a.mlm-btn,
.ls a.mlm-btn:hover {
	color: var(--mlm-dark, #1f2732);
}

.ls a.mlm-btn-primary {
	color: var(--mlm-dark, #1f2732) !important;
}

.ls a.mlm-btn-primary:hover,
.ls a.mlm-btn-primary:focus {
	color: var(--mlm-primary, #F2BC00) !important;
}

.ls a.mlm-btn-outline {
	color: var(--mlm-primary, #F2BC00) !important;
}

.ls a.mlm-btn-outline:hover,
.ls a.mlm-btn-outline:focus {
	color: var(--mlm-dark, #1f2732) !important;
}

/* ==========================================================================
   Buttons — DeepDigital pill style
   ========================================================================== */

.mlm-btn {
	display: inline-block;
	padding: 20px 30px;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none !important;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	border-radius: var(--mlm-radius-pill);
	transition: all var(--mlm-transition);
	cursor: pointer;
	border: 4px solid transparent;
	line-height: 1;
}

.mlm-btn-primary {
	background-color: var(--mlm-primary);
	color: var(--mlm-dark);
	border-color: var(--mlm-primary);
}

.mlm-btn-primary:hover,
.mlm-btn-primary:focus {
	background-color: transparent;
	border-color: var(--mlm-primary);
	color: var(--mlm-primary);
	text-decoration: none;
}

.mlm-btn-outline {
	background: transparent;
	color: var(--mlm-primary);
	border-color: var(--mlm-primary);
}

.mlm-btn-outline:hover,
.mlm-btn-outline:focus {
	background-color: var(--mlm-primary);
	color: var(--mlm-dark);
	text-decoration: none;
}

.mlm-btn-preview {
	background-color: var(--mlm-secondary);
	color: #fff;
	border-color: var(--mlm-secondary);
}

.mlm-btn-preview:hover {
	background: transparent;
	color: var(--mlm-secondary);
	text-decoration: none;
}

.mlm-btn-block {
	display: block;
	width: 100%;
}

/* Small buttons */
.mlm-btn-sm {
	padding: 10px 20px;
	font-size: 11px;
}

/* ==========================================================================
   Badges — keep pill shape for labels
   ========================================================================== */

.mlm-badge {
	display: inline-block;
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	border-radius: var(--mlm-radius-pill);
}

.mlm-badge-sale {
	background: var(--mlm-danger);
	color: #fff;
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
}

.mlm-badge-type {
	margin-top: 10px;
}

.mlm-badge-audit {
	background: #e3f2fd;
	color: #1565c0;
}

.mlm-badge-template {
	background: #e8f5e9;
	color: #2e7d32;
}

.mlm-badge-formation {
	background: rgba(var(--colorMainRGB, 242, 188, 0), 0.15);
	color: #b8860b;
}

.mlm-badge-funnel {
	background: #f3e5f5;
	color: #7b1fa2;
}

.mlm-badge-pack {
	background: rgba(var(--colorMain3RGB, 0, 190, 163), 0.15);
	color: #00695c;
}

/* ==========================================================================
   Cards — square corners, theme shadow
   ========================================================================== */

.mlm-card {
	background: #fff;
	border-radius: var(--mlm-radius);
	box-shadow: var(--mlm-shadow);
	overflow: hidden;
	transition: box-shadow var(--mlm-transition), transform var(--mlm-transition);
}

.mlm-card:hover {
	box-shadow: var(--mlm-shadow-lg);
	transform: translateY(-2px);
}

.mlm-card-body {
	padding: 25px;
}

.mlm-card-media {
	position: relative;
	overflow: hidden;
}

.mlm-card-media img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform var(--mlm-transition);
}

.mlm-card:hover .mlm-card-media img {
	transform: scale(1.03);
}

.mlm-card-title {
	font-size: 18px;
	font-weight: 500;
	margin-bottom: 10px;
}

.mlm-card-title a {
	color: var(--mlm-dark);
	text-decoration: none;
}

.mlm-card-title a:hover {
	color: var(--mlm-primary);
}

.mlm-card-excerpt {
	color: var(--mlm-grey);
	font-size: 14px;
	line-height: 1.6;
	margin-bottom: 15px;
}

/* ==========================================================================
   Single Product — Hero
   ========================================================================== */

.mlm-single-product {
	padding-bottom: 0;
}

.mlm-product-hero {
	padding: 80px 0 60px;
}

.mlm-hero-media {
	position: relative;
}

.mlm-product-image {
	position: relative;
	border-radius: var(--mlm-radius);
	overflow: hidden;
}

.mlm-hero-img {
	width: 100%;
	height: auto;
	display: block;
}

.mlm-product-title {
	font-size: 42px;
	font-weight: 500;
	line-height: 1;
	margin-bottom: 10px;
}

.mlm-template-meta {
	display: flex;
	gap: 20px;
	margin: 12px 0;
	flex-wrap: wrap;
}

.mlm-meta-item {
	font-size: 14px;
	color: var(--mlm-grey);
}

.mlm-meta-item strong {
	color: var(--mlm-dark);
}

.mlm-product-excerpt {
	font-size: 16px;
	line-height: 30px;
	color: var(--mlm-grey);
	margin: 15px 0;
	font-weight: 300;
}

.mlm-product-price {
	font-size: 36px;
	font-weight: 500;
	color: var(--mlm-dark);
	margin: 20px 0;
}

.mlm-product-price del {
	color: var(--mlm-grey);
	font-size: 22px;
	font-weight: 300;
}

.mlm-product-price ins {
	text-decoration: none;
}

/* Add-to-cart button — inherit theme styling */
.mlm-product-cta .single_add_to_cart_button {
	border-radius: var(--mlm-radius-pill);
	text-transform: uppercase;
	letter-spacing: 0.2em;
	font-weight: 700;
	font-size: 12px;
	padding: 20px 35px;
	transition: all var(--mlm-transition);
}

/* Delivery Info */
.mlm-delivery-info {
	margin-top: 15px;
}

.mlm-delivery-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: var(--mlm-radius-pill);
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.mlm-delivery-badge.mlm-instant {
	background: rgba(var(--colorMain2RGB, 119, 174, 57), 0.15);
	color: #4a7c10;
}

.mlm-delivery-badge.mlm-instant::before {
	content: "\26A1";
}

.mlm-delivery-badge.mlm-delayed {
	background: rgba(var(--colorMainRGB, 242, 188, 0), 0.15);
	color: #b8860b;
}

.mlm-delivery-badge.mlm-delayed::before {
	content: "\231B";
}

/* ==========================================================================
   Single Product — Sections
   ========================================================================== */

.mlm-product-sections {
	padding: 60px 0 100px;
}

.mlm-section {
	margin-bottom: 60px;
}

.mlm-section h2 {
	font-size: 30px;
	font-weight: 500;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--mlm-border);
}

.mlm-content-body {
	font-size: 16px;
	line-height: 30px;
	color: var(--mlm-grey);
	font-weight: 300;
}

.mlm-content-body ul {
	padding-left: 20px;
}

.mlm-content-body li {
	margin-bottom: 8px;
}

/* Steps (Audit / Funnel) */
.mlm-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 25px;
	margin-top: 30px;
}

.mlm-step {
	text-align: center;
	padding: 30px 20px;
	background: var(--mlm-light);
	border-radius: var(--mlm-radius);
	transition: box-shadow var(--mlm-transition);
}

.mlm-step:hover {
	box-shadow: var(--mlm-shadow);
}

.mlm-step-number {
	width: 48px;
	height: 48px;
	line-height: 48px;
	border-radius: 50%;
	background: var(--mlm-primary);
	color: var(--mlm-dark);
	font-size: 20px;
	font-weight: 700;
	margin: 0 auto 15px;
}

.mlm-step h3 {
	font-size: 16px;
	font-weight: 500;
	margin-bottom: 8px;
}

.mlm-step p {
	font-size: 14px;
	color: var(--mlm-grey);
	line-height: 1.5;
	margin: 0;
	font-weight: 300;
}

/* Preview link */
.mlm-preview-link {
	text-align: center;
	padding: 30px;
	background: var(--mlm-light);
	border-radius: var(--mlm-radius);
}

/* ==========================================================================
   Sticky CTA (Mobile)
   ========================================================================== */

.mlm-sticky-cta {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: #fff;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
	z-index: 999;
	padding: 12px 0;
	display: none;
}

.mlm-sticky-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
}

.mlm-sticky-price {
	font-size: 20px;
	font-weight: 500;
}

.mlm-sticky-btn {
	padding: 10px 24px;
	font-size: 11px;
	white-space: nowrap;
}

@media (max-width: 767px) {
	.mlm-sticky-cta {
		display: block;
	}
}

/* ==========================================================================
   Page Templates — Ressources Grid
   ========================================================================== */

.mlm-page-header {
	margin-bottom: 50px;
}

.mlm-page-title {
	font-size: 48px;
	font-weight: 500;
	line-height: 1;
}

.mlm-page-subtitle {
	font-size: 18px;
	color: var(--mlm-grey);
	max-width: 600px;
	margin: 15px auto 0;
	font-weight: 300;
}

.mlm-filter-bar {
	margin-bottom: 30px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.mlm-filter-btn {
	padding: 10px 20px;
	border: 2px solid var(--mlm-border);
	background: #fff;
	border-radius: var(--mlm-radius-pill);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: all var(--mlm-transition);
	color: var(--mlm-grey);
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.mlm-filter-btn:hover,
.mlm-filter-btn.active {
	background: var(--mlm-primary);
	border-color: var(--mlm-primary);
	color: var(--mlm-dark);
}

.mlm-ressource-item {
	margin-bottom: 30px;
}

.mlm-pagination {
	margin-top: 30px;
}

.mlm-pagination .page-numbers {
	display: inline-block;
	padding: 8px 14px;
	margin: 0 3px;
	border: 2px solid var(--mlm-border);
	border-radius: var(--mlm-radius-pill);
	color: var(--mlm-dark);
	text-decoration: none;
	font-size: 12px;
	font-weight: 600;
	transition: all var(--mlm-transition);
}

.mlm-pagination .page-numbers.current,
.mlm-pagination .page-numbers:hover {
	background: var(--mlm-primary);
	border-color: var(--mlm-primary);
	color: var(--mlm-dark);
}

.mlm-no-results {
	padding: 60px 20px;
	color: var(--mlm-grey);
}

/* ==========================================================================
   Page Templates — Lead Magnet
   ========================================================================== */

.mlm-lead-magnet-content {
	padding-right: 30px;
}

.mlm-lm-title {
	font-size: 36px;
	font-weight: 500;
	line-height: 1.1;
	margin-bottom: 20px;
}

.mlm-lm-image {
	margin-bottom: 20px;
	overflow: hidden;
}

.mlm-lm-image img {
	width: 100%;
	height: auto;
}

.mlm-lm-body {
	font-size: 16px;
	line-height: 30px;
	font-weight: 300;
}

.mlm-lead-magnet-form {
	position: sticky;
	top: 100px;
}

.mlm-form-title {
	font-size: 24px;
	font-weight: 500;
	margin-bottom: 8px;
}

.mlm-form-subtitle {
	color: var(--mlm-grey);
	font-size: 14px;
	margin-bottom: 20px;
	font-weight: 300;
}

.mlm-rgpd-notice {
	margin-top: 15px;
	color: var(--mlm-grey);
	font-weight: 300;
}

.mlm-rgpd-notice a {
	color: var(--mlm-primary);
}

/* ==========================================================================
   Page Templates — Formulaire Audit
   ========================================================================== */

.mlm-form-page-title {
	font-size: 36px;
	font-weight: 500;
	margin-bottom: 10px;
}

.mlm-form-page-subtitle {
	color: var(--mlm-grey);
	font-size: 16px;
	margin-bottom: 30px;
	font-weight: 300;
}

.mlm-audit-form-container {
	background: var(--mlm-light);
	padding: 30px;
	margin-bottom: 20px;
}

/* Confirmation */
.mlm-audit-confirmation {
	padding: 60px 20px;
}

.mlm-confirmation-icon {
	font-size: 60px;
	color: var(--mlm-success);
	margin-bottom: 20px;
}

.mlm-confirmation-text {
	font-size: 16px;
	color: var(--mlm-grey);
	max-width: 500px;
	margin: 0 auto 25px;
	line-height: 30px;
	font-weight: 300;
}

/* Error */
.mlm-audit-error {
	padding: 60px 20px;
}

.mlm-error-text {
	font-size: 16px;
	color: var(--mlm-grey);
	margin-bottom: 25px;
}

.mlm-error-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

/* ==========================================================================
   Page Templates — Formation
   ========================================================================== */

.mlm-formation-hero {
	margin-bottom: 50px;
}

.mlm-formation-title {
	font-size: 48px;
	font-weight: 500;
	line-height: 1;
}

.mlm-formation-subtitle {
	font-size: 18px;
	color: var(--mlm-grey);
	max-width: 600px;
	margin: 15px auto 0;
	font-weight: 300;
}

.mlm-formation-image {
	margin-top: 30px;
	overflow: hidden;
}

.mlm-formation-image img {
	width: 100%;
	height: auto;
}

.mlm-formation-content {
	font-size: 16px;
	line-height: 30px;
	font-weight: 300;
}

.mlm-formation-sidebar {
	position: sticky;
	top: 100px;
}

.mlm-formation-price {
	font-size: 36px;
	font-weight: 500;
	margin: 15px 0;
}

.mlm-duree-text {
	font-size: 18px;
	font-weight: 500;
	color: var(--mlm-primary);
}

/* ==========================================================================
   My Account — Digital Products Actions
   ========================================================================== */

.mlm-account-actions {
	margin-bottom: 30px;
}

.mlm-account-actions h3 {
	font-size: 24px;
	font-weight: 500;
	margin-bottom: 20px;
}

.mlm-actions-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 20px;
}

.mlm-action-card {
	background: #fff;
	border: 1px solid var(--mlm-border);
	padding: 20px;
	text-align: center;
}

.mlm-action-card h4 {
	font-size: 16px;
	font-weight: 500;
	margin-bottom: 8px;
}

.mlm-action-card p {
	font-size: 13px;
	color: var(--mlm-grey);
	margin-bottom: 12px;
	font-weight: 300;
}

.mlm-action-card .button {
	display: inline-block;
	padding: 10px 20px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	border-radius: var(--mlm-radius-pill);
}

.mlm-action-audit {
	border-left: 3px solid #1565c0;
}

.mlm-action-template {
	border-left: 3px solid var(--mlm-success);
}

.mlm-action-formation {
	border-left: 3px solid var(--mlm-primary);
}

.mlm-action-funnel {
	border-left: 3px solid #7b1fa2;
}

.mlm-action-pack {
	border-left: 3px solid var(--mlm-secondary);
}

.mlm-action-card.mlm-completed {
	opacity: 0.7;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
	.mlm-product-title {
		font-size: 36px;
	}

	.mlm-page-title,
	.mlm-formation-title {
		font-size: 40px;
	}
}

@media (max-width: 991px) {
	.mlm-steps {
		grid-template-columns: repeat(2, 1fr);
	}

	.mlm-lead-magnet-content {
		padding-right: 0;
		margin-bottom: 30px;
	}
}

@media (max-width: 767px) {
	.mlm-product-hero {
		padding: 40px 0 20px;
	}

	.mlm-hero-media {
		margin-bottom: 20px;
	}

	.mlm-product-title {
		font-size: 30px;
	}

	.mlm-product-price {
		font-size: 28px;
	}

	.mlm-steps {
		grid-template-columns: 1fr;
	}

	.mlm-page-title,
	.mlm-formation-title {
		font-size: 30px;
	}

	.mlm-formation-sidebar {
		position: static;
		margin-top: 30px;
	}

	.mlm-lead-magnet-form {
		position: static;
	}

	.mlm-section h2 {
		font-size: 24px;
	}
}

@media (max-width: 479px) {
	.mlm-product-title {
		font-size: 26px;
	}

	.mlm-page-title,
	.mlm-formation-title {
		font-size: 26px;
	}
}
