/* Elite Seminaire V2 — overrides for legacy (V1) page content + Astra theme.
   Loaded after main.css. Goal: kill the dark/legacy block bleed-through and
   restore a coherent light editorial design without reflowing all V1 pages. */

/* ---- Astra global colors override (was producing dark navy backgrounds) ---- */
:root,
:root body {
	--ast-global-color-0: #6366F1;  /* primary */
	--ast-global-color-1: #4F46E5;  /* primary-dark */
	--ast-global-color-2: #0F172A;  /* ink */
	--ast-global-color-3: #FFFFFF;  /* surface */
	--ast-global-color-4: #F8FAFC;  /* surface-soft */
	--ast-global-color-5: #FFFFFF;  /* secondary surface (was dark!) */
	--ast-global-color-6: #E2E8F0;  /* border */
	--ast-global-color-7: #0EA5E9;  /* accent */
	--ast-global-color-8: #94A3B8;  /* muted */
}

/* Force readable defaults on body and main blocks. */
html, body {
	background: #FFFFFF !important;
	color: #0F172A !important;
}
body, .ast-container, .site-content, main { color: #0F172A; }

/* Headings inside legacy (V1) page content always readable. */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.wp-block-uagb-advanced-heading h1,
.wp-block-uagb-advanced-heading h2,
.wp-block-uagb-advanced-heading h3,
.wp-block-uagb-advanced-heading h4,
.wp-block-uagb-advanced-heading h5,
.wp-block-uagb-advanced-heading .uagb-heading-text {
	color: #0F172A !important;
	letter-spacing: -0.01em;
}

/* Paragraphs in legacy content. */
.entry-content p,
.entry-content li,
.uagb-container-inner-blocks-wrap p,
.uagb-container-inner-blocks-wrap li {
	color: #1F2937;
}

/* Spectra (UAGB) container backgrounds: drop dark blocks back to white/soft.
   The legacy page uses inline style with background-color:var(--ast-global-color-5)
   which we already mapped to white above; but sometimes blocks set inline color. */
.wp-block-uagb-container[style*="background-color"][style*="rgb(11"],
.wp-block-uagb-container[style*="background-color"][style*="#0"],
.wp-block-uagb-container[style*="background-color"][style*="#1"],
.wp-block-uagb-container[style*="background-color"][style*="#2"] {
	background-color: #F8FAFC !important;
}

/* If a UAGB container has a dark inline bg, ensure text inside stays readable. */
.has-background[style*="background-color: rgb(11"] *,
.has-background[style*="background-color:#0"] * {
	color: #0F172A !important;
}

/* Force ALL UAGB advanced-heading text to readable ink, regardless of inline. */
.wp-block-uagb-advanced-heading * {
	color: #0F172A !important;
}
.wp-block-uagb-advanced-heading .uagb-separator {
	background-color: #6366F1 !important;
}

/* Buttons */
.wp-block-button__link,
.wp-block-uagb-buttons-child .wp-block-button__link,
button.button {
	background: #6366F1 !important;
	color: #FFFFFF !important;
	border-radius: 10px !important;
	padding: 12px 22px !important;
	font-weight: 600 !important;
	border: none !important;
	box-shadow: 0 1px 2px rgb(0 0 0 / 5%) !important;
	transition: background .15s ease, transform .15s ease;
}
.wp-block-button__link:hover {
	background: #4F46E5 !important;
}

/* Links readable. */
a { color: #4F46E5; text-decoration: none; }
a:hover { color: #6366F1; text-decoration: underline; }

/* Header bar polish. */
.site-header,
header.site-header,
header.entry-header,
#masthead {
	background: #FFFFFF !important;
	border-bottom: 1px solid #E2E8F0 !important;
	box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
}
.main-header-menu .menu-item > a {
	color: #0F172A !important;
	font-weight: 500;
}
.main-header-menu .current-menu-item > a,
.main-header-menu .menu-item > a:hover {
	color: #6366F1 !important;
}

/* Footer */
.site-footer, footer.site-footer {
	background: #0F172A !important;
	color: #E2E8F0 !important;
}
.site-footer * { color: #E2E8F0 !important; }
.site-footer a:hover { color: #FFFFFF !important; }

/* Generic V1 page sections that became unreadable: kill dark-on-dark. */
section.has-background.has-text-color { color: #0F172A !important; }

/* "Voyagez maintenant"-style hero buttons: use V2 primary. */
.wp-block-uagb-buttons-child .wp-block-button__link {
	letter-spacing: 0.04em;
}

/* Ensure form-style content (Boutique grid, etc.) doesn't inherit dark-mode
   from prefers-color-scheme inadvertently. */
.esc-respect-os.esc-dark { /* opt-in only */ }

/* Spectra columns: light card surface with shadow. */
.wp-block-uagb-info-box,
.wp-block-uagb-container.uagb-is-root-container > .uagb-container-inner-blocks-wrap > .wp-block-uagb-container {
	background: #FFFFFF;
	border-radius: 16px;
	box-shadow: 0 1px 2px rgb(15 23 42 / 5%);
}

/* Block separator (the small horizontal line under headings) */
hr.wp-block-separator { border-color: #E2E8F0 !important; }

/* Quiz / table styles in legacy pages — bring closer to V2 system. */
table.purchase-table,
table.quiz-table,
table.pdf-table {
	border-collapse: separate !important;
	border-spacing: 0 !important;
	border: 1px solid #E2E8F0 !important;
	border-radius: 12px !important;
	overflow: hidden !important;
	background: #FFFFFF;
}
.purchase-table th, .purchase-table td,
.quiz-table th, .quiz-table td,
.pdf-table th, .pdf-table td {
	border: none !important;
	border-bottom: 1px solid #F1F5F9 !important;
	padding: 14px !important;
	color: #0F172A !important;
}
.purchase-table th, .quiz-table th, .pdf-table th {
	background: #F8FAFC !important;
	font-size: 12px !important;
	letter-spacing: 0.08em !important;
	text-transform: uppercase !important;
	color: #64748B !important;
}
.purchase-button, .start-quiz-button, .download-button {
	background: #6366F1 !important;
	color: #FFFFFF !important;
	border-radius: 10px !important;
	font-weight: 600 !important;
}

/* Login / unauthorized pages: lighten. */
.login-card { background: #FFFFFF; border-radius: 16px; padding: 48px; box-shadow: 0 12px 32px rgb(15 23 42 / 8%); }

/* Force any inline `color:#fff` paragraph back to ink when the parent isn't dark. */
.uagb-container-inner-blocks-wrap p[style*="color: #fff"],
.uagb-container-inner-blocks-wrap p[style*="color:#fff"] {
	color: #1F2937 !important;
}

/* The legacy "unauthorized" page sometimes shows white text on white. */
body.page-id-1499 * { color: #0F172A !important; }
