/*
 Theme Name:   Mon LMNP — Premium
 Theme URI:    https://mon-lmnp.com
 Description:  Child theme premium de GeneratePress pour mon-lmnp.com. Ajoute une couche éditoriale (Fraunces + Inter, header refiné, footer travaillé, article single, cards, sidebar, TOC, reading progress bar) et des composants Gutenberg (callouts, CTA box, hero, lettrine, pull-quote). Ne touche pas aux couleurs du parent. Ne casse pas les CTA Indy existants.
 Author:       Florian Helissey
 Author URI:   https://mon-lmnp.com
 Template:     generatepress
 Version:      1.0.0
 Requires at least: 6.5
 Tested up to: 6.9
 Requires PHP: 7.4
 License:      GPL-2.0-or-later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  mon-lmnp-premium
 Tags:         child-theme, generatepress, premium, editorial, lmnp

 Mon LMNP — Premium (frontend stylesheet)
 v1.0.0

 Architecture
 *  1.  Tokens (CSS variables, fallback sur GeneratePress)
 *  2.  Base — body, antialiasing, scroll
 *  3.  Typography — Fraunces (titres) + Inter (corps)
 *  4.  Liens
 *  5.  Boutons (CTA-safe : améliorations visuelles uniquement)
 *  6.  Header & navigation
 *  7.  Footer
 *  8.  Article single (lecture, blockquote, tableaux, listes)
 *  9.  Cards / archives / blog index
 *  10. Sidebar & TOC
 *  11. Block styles Gutenberg (callouts, CTA, hero, drop-cap…)
 *  12. Reading progress bar
 *  13. Utilities & responsive
 *
 * Compatibilité
 *  - Toutes les couleurs s'appuient sur les variables CSS de GeneratePress
 *    (--accent, --contrast, --base, --base-2, --base-3) avec fallback neutre.
 *  - Aucune surcharge de couleur sur les CTA existants : améliorations
 *    purement visuelles (ombre, hover, transition).
 *  - Préfixe .mlp-* pour toutes les classes ajoutées par ce plugin.
 *  - Toutes les règles peuvent être désactivées en désactivant le plugin.
 */

/* ============================================================
   1. TOKENS
   ============================================================ */
:root {
	--mlp-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
	--mlp-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

	/* Espacements (échelle modulaire). */
	--mlp-space-2xs: 0.25rem;
	--mlp-space-xs: 0.5rem;
	--mlp-space-sm: 0.75rem;
	--mlp-space-md: 1rem;
	--mlp-space-lg: 1.5rem;
	--mlp-space-xl: 2.5rem;
	--mlp-space-2xl: 4rem;
	--mlp-space-3xl: 6rem;

	/* Border-radius. */
	--mlp-radius-sm: 6px;
	--mlp-radius-md: 10px;
	--mlp-radius-lg: 16px;
	--mlp-radius-xl: 24px;

	/* Shadows. Neutres (rgba noir) — fonctionnent fond clair ou foncé. */
	--mlp-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
	--mlp-shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
	--mlp-shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
	--mlp-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.04);

	/* Lignes/bordures neutres (transparent → suit le fond). */
	--mlp-line: rgba(15, 23, 42, 0.08);
	--mlp-line-strong: rgba(15, 23, 42, 0.14);
	--mlp-surface-soft: rgba(15, 23, 42, 0.025);
	--mlp-surface-softer: rgba(15, 23, 42, 0.015);

	/* Couleurs sémantiques pour les callouts (autonomes du thème). */
	--mlp-callout-success: 34, 197, 94;
	--mlp-callout-warning: 234, 88, 12;
	--mlp-callout-info: 59, 130, 246;

	/* Variations typographiques Fraunces. */
	--mlp-display-opsz-large: "opsz" 144, "SOFT" 50, "wght" 600;
	--mlp-display-opsz-mid: "opsz" 110, "SOFT" 50, "wght" 600;
	--mlp-display-opsz-quote: "opsz" 144, "SOFT" 100, "wght" 500;
}

/* Smooth scroll pour les ancres TOC, sauf prefers-reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* ============================================================
   2. BASE
   ============================================================ */
body.mlp-active {
	font-family: var(--mlp-font-body);
	font-feature-settings: "ss01", "cv11";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

body.mlp-active .entry-content,
body.mlp-active .site-content {
	font-variant-numeric: lining-nums proportional-nums;
}

/* Sélection plus jolie — opacité contrôlée. */
body.mlp-active ::selection {
	background: rgba(var(--mlp-callout-info), 0.18);
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
body.mlp-active h1,
body.mlp-active h2,
body.mlp-active h3,
body.mlp-active h4,
body.mlp-active h5,
body.mlp-active h6,
body.mlp-active .entry-title,
body.mlp-active .site-title,
body.mlp-active .widget-title {
	font-family: var(--mlp-font-display);
	font-feature-settings: "ss01", "ss02", "ss04";
	font-variation-settings: var(--mlp-display-opsz-mid);
	letter-spacing: -0.018em;
	line-height: 1.18;
	font-weight: 600;
}

body.mlp-active h1,
body.mlp-active .entry-title {
	font-size: clamp(2rem, 4.5vw + 0.5rem, 3.25rem);
	letter-spacing: -0.025em;
	line-height: 1.08;
	font-variation-settings: var(--mlp-display-opsz-large);
	margin-bottom: 0.45em;
}

body.mlp-active h2 {
	font-size: clamp(1.6rem, 2vw + 0.75rem, 2.15rem);
	margin-top: 2.25em;
	margin-bottom: 0.55em;
	letter-spacing: -0.022em;
}

body.mlp-active h3 {
	font-size: clamp(1.25rem, 1vw + 0.85rem, 1.5rem);
	margin-top: 1.75em;
	margin-bottom: 0.5em;
	letter-spacing: -0.018em;
}

body.mlp-active h4 {
	font-size: clamp(1.1rem, 0.5vw + 0.95rem, 1.25rem);
	margin-top: 1.5em;
	margin-bottom: 0.45em;
	letter-spacing: -0.012em;
}

/* Corps : taille confortable + line-height généreux. */
body.mlp-active .entry-content {
	font-size: clamp(1rem, 0.4vw + 0.95rem, 1.08rem);
	line-height: 1.72;
}

body.mlp-active .entry-content p {
	margin-block: 1.1em;
}

/* Premier paragraphe d'article — sans drop-cap auto, juste un peu plus gros. */
body.mlp-active.single .entry-content > p:first-of-type {
	font-size: 1.08em;
	line-height: 1.65;
	color: inherit;
	opacity: 0.92;
}

/* ============================================================
   4. LIENS
   ============================================================ */
body.mlp-active .entry-content a:not(.wp-block-button__link):not(.button) {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
	text-decoration-skip-ink: auto;
	transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

body.mlp-active .entry-content a:not(.wp-block-button__link):not(.button):hover {
	text-decoration-thickness: 2px;
}

/* ============================================================
   5. BOUTONS — CTA-SAFE
   Améliorations visuelles UNIQUEMENT, jamais de couleur ni de structure.
   Les couleurs viennent du thème / du Customizer / du bloc lui-même.
   ============================================================ */
body.mlp-active .wp-block-button .wp-block-button__link,
body.mlp-active .wp-block-buttons .wp-block-button__link,
body.mlp-active .button,
body.mlp-active button[type="submit"],
body.mlp-active input[type="submit"] {
	font-family: var(--mlp-font-body);
	font-weight: 600;
	letter-spacing: -0.005em;
	border-radius: var(--mlp-radius-md);
	padding: 0.85em 1.6em;
	box-shadow: var(--mlp-shadow-sm);
	transition: transform 0.18s ease, box-shadow 0.22s ease, filter 0.18s ease;
	will-change: transform;
}

body.mlp-active .wp-block-button .wp-block-button__link:hover,
body.mlp-active .wp-block-buttons .wp-block-button__link:hover,
body.mlp-active .button:hover,
body.mlp-active button[type="submit"]:hover,
body.mlp-active input[type="submit"]:hover {
	transform: translateY(-1px);
	box-shadow: var(--mlp-shadow-md);
	filter: brightness(1.05);
}

body.mlp-active .wp-block-button .wp-block-button__link:active,
body.mlp-active .button:active {
	transform: translateY(0);
	box-shadow: var(--mlp-shadow-xs);
}

/* Outline buttons — on garde leur look, on ajoute juste le lift. */
body.mlp-active .wp-block-button.is-style-outline .wp-block-button__link {
	box-shadow: none;
}

body.mlp-active .wp-block-button.is-style-outline .wp-block-button__link:hover {
	box-shadow: var(--mlp-shadow-sm);
	background: rgba(15, 23, 42, 0.025);
}

/* Bouton fantôme premium (block-style mlp-ghost). */
body.mlp-active .wp-block-button.is-style-mlp-ghost .wp-block-button__link {
	background: transparent;
	color: var(--accent, currentColor);
	border: 1px solid var(--mlp-line-strong);
	box-shadow: none;
}

body.mlp-active .wp-block-button.is-style-mlp-ghost .wp-block-button__link:hover {
	background: var(--mlp-surface-soft);
	border-color: var(--accent, currentColor);
}

/* Bouton avec flèche (block-style mlp-arrow) — animation discrète à droite. */
body.mlp-active .wp-block-button.is-style-mlp-arrow .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
}

body.mlp-active .wp-block-button.is-style-mlp-arrow .wp-block-button__link::after {
	content: '\2192';
	display: inline-block;
	transition: transform 0.22s ease;
}

body.mlp-active .wp-block-button.is-style-mlp-arrow .wp-block-button__link:hover::after {
	transform: translateX(4px);
}

/* ============================================================
   6. HEADER & NAVIGATION
   ============================================================ */
body.mlp-active .site-header {
	border-bottom: 1px solid var(--mlp-line);
	transition: box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

body.mlp-active.mlp-scrolled .site-header {
	box-shadow: var(--mlp-shadow-sm);
}

/* Logo / site title : letter-spacing serré pour un feel premium. */
body.mlp-active .site-title,
body.mlp-active .site-title a {
	letter-spacing: -0.025em;
	font-weight: 600;
}

/* Navigation principale : feel éditorial avec underline animé. */
body.mlp-active .main-navigation .main-nav ul li a {
	font-family: var(--mlp-font-body);
	font-weight: 500;
	letter-spacing: -0.005em;
	font-size: 0.96rem;
	position: relative;
	transition: color 0.18s ease;
}

/* Underline animé : uniquement sur les liens de premier niveau (pas dans dropdown). */
body.mlp-active .main-navigation .main-nav > ul > li > a::after {
	content: '';
	position: absolute;
	left: 1em;
	right: 1em;
	bottom: 0.6em;
	height: 2px;
	background: currentColor;
	transform-origin: right center;
	transform: scaleX(0);
	transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
	opacity: 0.85;
}

body.mlp-active .main-navigation .main-nav > ul > li:hover > a::after,
body.mlp-active .main-navigation .main-nav > ul > li.current-menu-item > a::after,
body.mlp-active .main-navigation .main-nav > ul > li.current-menu-ancestor > a::after {
	transform: scaleX(1);
	transform-origin: left center;
}

/* Menus déroulants : ombre + radius + spacing. */
body.mlp-active .main-navigation .main-nav ul ul {
	box-shadow: var(--mlp-shadow-lg);
	border: 1px solid var(--mlp-line);
	border-radius: var(--mlp-radius-md);
	padding: 0.5em 0;
	overflow: hidden;
}

body.mlp-active .main-navigation .main-nav ul ul li a {
	padding: 0.65em 1.4em;
}

/* ============================================================
   7. FOOTER
   ============================================================ */
body.mlp-active .site-footer {
	font-family: var(--mlp-font-body);
}

body.mlp-active .site-footer .widget-title,
body.mlp-active .footer-widgets .widget-title {
	font-family: var(--mlp-font-display);
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: -0.012em;
	margin-bottom: 1.1em;
	padding-bottom: 0.6em;
	border-bottom: 1px solid var(--mlp-line);
}

body.mlp-active .site-footer ul,
body.mlp-active .footer-widgets ul {
	list-style: none;
	padding-left: 0;
	margin: 0;
}

body.mlp-active .site-footer ul li,
body.mlp-active .footer-widgets ul li {
	margin-block: 0.45em;
	font-size: 0.94rem;
}

body.mlp-active .site-footer a {
	text-decoration: none;
	transition: opacity 0.18s ease;
}

body.mlp-active .site-footer a:hover {
	opacity: 0.7;
	text-decoration: underline;
	text-underline-offset: 0.22em;
}

body.mlp-active .site-info {
	font-size: 0.85rem;
	letter-spacing: 0.01em;
	opacity: 0.7;
}

/* ============================================================
   8. ARTICLE SINGLE — Lecture, blockquote, listes, tableaux
   ============================================================ */

/* Largeur de lecture confortable sur desktop si pas de sidebar custom. */
body.mlp-active.single-post .entry-content > p,
body.mlp-active.single-post .entry-content > h2,
body.mlp-active.single-post .entry-content > h3,
body.mlp-active.single-post .entry-content > h4,
body.mlp-active.single-post .entry-content > ul,
body.mlp-active.single-post .entry-content > ol,
body.mlp-active.single-post .entry-content > blockquote,
body.mlp-active.single-post .entry-content > .wp-block-quote {
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
}

/* Headings d'article : barre d'accent décorative. */
body.mlp-active.single-post .entry-content h2 {
	scroll-margin-top: 100px;
	margin-top: 2.5em;
	padding-top: 0.4em;
	position: relative;
}

body.mlp-active.single-post .entry-content h2::before {
	content: '';
	display: block;
	width: 36px;
	height: 3px;
	background: var(--accent, currentColor);
	border-radius: 2px;
	margin-bottom: 0.7em;
	opacity: 0.85;
}

body.mlp-active.single-post .entry-content h3 {
	scroll-margin-top: 100px;
}

/* Drop cap manuel (block-style mlp-drop-cap). */
body.mlp-active .is-style-mlp-drop-cap::first-letter {
	font-family: var(--mlp-font-display);
	font-size: 4.2em;
	line-height: 0.85;
	font-weight: 600;
	font-variation-settings: var(--mlp-display-opsz-large);
	float: left;
	margin: 0.06em 0.12em -0.05em 0;
	color: var(--accent, currentColor);
}

/* Lead paragraph (block-style mlp-lead). */
body.mlp-active .is-style-mlp-lead {
	font-size: 1.2em;
	line-height: 1.55;
	font-weight: 400;
	color: inherit;
	opacity: 0.85;
	font-family: var(--mlp-font-body);
	letter-spacing: -0.005em;
	margin-block: 1.5em !important;
}

/* Eyebrow heading (block-style mlp-eyebrow). */
body.mlp-active .is-style-mlp-eyebrow {
	font-family: var(--mlp-font-body) !important;
	font-size: 0.78rem !important;
	font-weight: 600 !important;
	letter-spacing: 0.14em !important;
	text-transform: uppercase !important;
	opacity: 0.6;
	margin-bottom: 0.4em;
	font-variation-settings: normal;
}

/* Blockquote standard. */
body.mlp-active .entry-content blockquote,
body.mlp-active .wp-block-quote {
	border-left: 3px solid var(--accent, currentColor);
	padding: 0.4em 0 0.4em 1.5em;
	margin-block: 2em;
	font-family: var(--mlp-font-display);
	font-size: 1.15em;
	font-style: italic;
	font-variation-settings: var(--mlp-display-opsz-quote);
	line-height: 1.5;
	letter-spacing: -0.005em;
}

body.mlp-active .entry-content blockquote cite,
body.mlp-active .wp-block-quote cite,
body.mlp-active .wp-block-quote .wp-block-quote__citation {
	display: block;
	font-family: var(--mlp-font-body);
	font-size: 0.8em;
	font-style: normal;
	font-weight: 500;
	margin-top: 0.7em;
	opacity: 0.65;
	letter-spacing: 0.01em;
	text-transform: none;
}

/* Pull-quote pleine largeur (block-style mlp-pull-quote). */
body.mlp-active .wp-block-quote.is-style-mlp-pull-quote {
	border-left: none;
	padding: 1.5em 0;
	margin-block: 3em;
	text-align: center;
	font-size: 1.55em;
	max-width: 36ch;
	margin-left: auto;
	margin-right: auto;
	position: relative;
}

body.mlp-active .wp-block-quote.is-style-mlp-pull-quote::before {
	content: '\201C';
	display: block;
	font-family: var(--mlp-font-display);
	font-size: 4em;
	line-height: 0.5;
	color: var(--accent, currentColor);
	opacity: 0.22;
	margin-bottom: 0.15em;
}

/* Tableaux. Tabular-nums obligatoires (chiffres alignés). */
body.mlp-active .entry-content table,
body.mlp-active .wp-block-table {
	border-collapse: collapse;
	width: 100%;
	margin-block: 2em;
	font-size: 0.96em;
	font-variant-numeric: tabular-nums lining-nums;
	border-radius: var(--mlp-radius-sm);
	overflow: hidden;
}

body.mlp-active .entry-content table th,
body.mlp-active .wp-block-table th {
	background: var(--mlp-surface-soft);
	font-family: var(--mlp-font-body);
	font-weight: 600;
	text-align: left;
	padding: 0.85em 1em;
	border-bottom: 2px solid var(--mlp-line-strong);
	letter-spacing: -0.005em;
	font-size: 0.94em;
}

body.mlp-active .entry-content table td,
body.mlp-active .wp-block-table td {
	padding: 0.85em 1em;
	border-bottom: 1px solid var(--mlp-line);
}

body.mlp-active .entry-content table tbody tr:last-child td,
body.mlp-active .wp-block-table tbody tr:last-child td {
	border-bottom: none;
}

body.mlp-active .entry-content table tbody tr:hover td,
body.mlp-active .wp-block-table tbody tr:hover td {
	background: var(--mlp-surface-softer);
}

/* Listes. Améliorations légères : line-height + spacing.
   On NE TOUCHE PAS aux puces ni à la structure (CTA-safe). */
body.mlp-active .entry-content ul:not(.wp-block-buttons):not(.menu),
body.mlp-active .entry-content ol {
	margin-block: 1.2em;
	padding-left: 1.4em;
}

body.mlp-active .entry-content ul:not(.wp-block-buttons):not(.menu) li,
body.mlp-active .entry-content ol li {
	margin-block: 0.45em;
	line-height: 1.65;
	padding-left: 0.25em;
}

/* Code inline et blocs de code (utile dans articles techniques). */
body.mlp-active .entry-content code:not(.wp-block-code) {
	background: var(--mlp-surface-soft);
	padding: 0.15em 0.4em;
	border-radius: 4px;
	font-size: 0.92em;
	font-feature-settings: normal;
}

body.mlp-active .wp-block-code {
	background: var(--mlp-surface-soft);
	border: 1px solid var(--mlp-line);
	border-radius: var(--mlp-radius-md);
	padding: 1.25em 1.5em;
	font-size: 0.9em;
	line-height: 1.55;
}

/* Image avec figcaption — typo soignée. */
body.mlp-active .wp-block-image figcaption,
body.mlp-active .entry-content figcaption {
	font-family: var(--mlp-font-body);
	font-size: 0.85em;
	color: inherit;
	opacity: 0.65;
	letter-spacing: -0.005em;
	margin-top: 0.7em;
	font-style: normal;
}

/* Meta de l'article (auteur, date) : feel éditorial. */
body.mlp-active .single .entry-meta,
body.mlp-active .single-post .entry-meta {
	font-family: var(--mlp-font-body);
	font-size: 0.82rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 500;
	opacity: 0.6;
	margin-bottom: 1.5em;
}

/* ============================================================
   9. CARDS / ARCHIVES / BLOG INDEX
   ============================================================ */
body.mlp-active.archive .site-main > article,
body.mlp-active.search .site-main > article,
body.mlp-active.blog .site-main > article,
body.mlp-active.home:not(.page) .site-main > article {
	border: 1px solid var(--mlp-line);
	border-radius: var(--mlp-radius-lg);
	padding: clamp(1.25rem, 2.5vw, 2rem);
	margin-bottom: 1.75em;
	background: var(--base, transparent);
	transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
	overflow: hidden;
	position: relative;
}

body.mlp-active.archive .site-main > article:hover,
body.mlp-active.search .site-main > article:hover,
body.mlp-active.blog .site-main > article:hover,
body.mlp-active.home:not(.page) .site-main > article:hover {
	border-color: transparent;
	box-shadow: var(--mlp-shadow-md);
	transform: translateY(-2px);
}

body.mlp-active.archive .site-main > article .entry-title,
body.mlp-active.search .site-main > article .entry-title,
body.mlp-active.blog .site-main > article .entry-title {
	font-size: clamp(1.4rem, 1.5vw + 1rem, 1.75rem);
	margin-block: 0.4em 0.6em;
	letter-spacing: -0.02em;
}

body.mlp-active.archive .site-main > article .entry-meta,
body.mlp-active.search .site-main > article .entry-meta,
body.mlp-active.blog .site-main > article .entry-meta {
	font-family: var(--mlp-font-body);
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-weight: 500;
	opacity: 0.55;
}

body.mlp-active.archive .site-main > article .entry-summary,
body.mlp-active.archive .site-main > article p,
body.mlp-active.blog .site-main > article p {
	line-height: 1.65;
	color: inherit;
	opacity: 0.85;
}

/* Pagination de l'archive. */
body.mlp-active .nav-links {
	display: flex;
	gap: 0.5em;
	flex-wrap: wrap;
	margin-block: 2em;
}

body.mlp-active .nav-links a,
body.mlp-active .nav-links .current {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5em;
	padding: 0.5em 1em;
	border-radius: var(--mlp-radius-sm);
	font-family: var(--mlp-font-body);
	font-weight: 500;
	font-size: 0.94rem;
	transition: background 0.18s ease, color 0.18s ease;
	text-decoration: none;
}

body.mlp-active .nav-links a:hover {
	background: var(--mlp-surface-soft);
}

body.mlp-active .nav-links .current {
	background: var(--accent, currentColor);
	color: #fff;
}

/* ============================================================
   10. SIDEBAR & TOC
   ============================================================ */
body.mlp-active .sidebar .widget {
	margin-bottom: 2em;
	padding: 1.5em;
	border: 1px solid var(--mlp-line);
	border-radius: var(--mlp-radius-md);
	background: var(--base-2, var(--mlp-surface-softer));
}

body.mlp-active .sidebar .widget-title {
	font-family: var(--mlp-font-display);
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: -0.012em;
	margin-bottom: 1em;
	padding-bottom: 0.7em;
	border-bottom: 1px solid var(--mlp-line);
}

body.mlp-active .sidebar .widget ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

body.mlp-active .sidebar .widget li {
	margin-block: 0.5em;
	line-height: 1.5;
	font-size: 0.95rem;
}

body.mlp-active .sidebar .widget a {
	text-decoration: none;
}

body.mlp-active .sidebar .widget a:hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* Sidebar sticky sur desktop. */
@media (min-width: 1024px) {
	body.mlp-active .inside-right-sidebar,
	body.mlp-active .inside-left-sidebar {
		position: sticky;
		top: 90px;
	}
}

/* TOC générique (Easy Table of Contents, LuckyWP, GP TOC, custom). */
body.mlp-active .ez-toc-container,
body.mlp-active .ez-toc-v2_0_72,
body.mlp-active #toc_container,
body.mlp-active .lwptoc,
body.mlp-active .toc-container,
body.mlp-active .gp-toc,
body.mlp-active nav.toc {
	font-family: var(--mlp-font-body);
	border-radius: var(--mlp-radius-md);
	padding: 1.25em 1.5em;
	background: var(--mlp-surface-soft);
	border: 1px solid var(--mlp-line);
	margin-block: 2em;
}

body.mlp-active .ez-toc-container .ez-toc-title,
body.mlp-active #toc_container .toc_title,
body.mlp-active .lwptoc_header,
body.mlp-active .toc-container .toc-title {
	font-family: var(--mlp-font-display);
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: -0.012em;
	margin-bottom: 0.8em;
}

body.mlp-active .ez-toc-list a,
body.mlp-active #toc_container a,
body.mlp-active .lwptoc a,
body.mlp-active .toc-container a,
body.mlp-active nav.toc a {
	display: block;
	padding: 0.4em 0 0.4em 0.85em;
	text-decoration: none;
	font-size: 0.93em;
	line-height: 1.4;
	border-left: 2px solid transparent;
	transition: border-color 0.18s ease, color 0.18s ease, padding-left 0.2s ease;
}

body.mlp-active .ez-toc-list a:hover,
body.mlp-active #toc_container a:hover,
body.mlp-active .lwptoc a:hover,
body.mlp-active .toc-container a:hover,
body.mlp-active nav.toc a:hover,
body.mlp-active .ez-toc-list a.mlp-toc-active,
body.mlp-active #toc_container a.mlp-toc-active,
body.mlp-active .lwptoc a.mlp-toc-active,
body.mlp-active nav.toc a.mlp-toc-active {
	border-left-color: var(--accent, currentColor);
	padding-left: 1.1em;
}

body.mlp-active .mlp-toc-active {
	font-weight: 600;
}

/* ============================================================
   11. BLOCK STYLES GUTENBERG
   ============================================================ */

/* --- Encadrés éditoriaux --- */
body.mlp-active .wp-block-group.is-style-mlp-callout {
	background: linear-gradient(135deg, rgba(var(--mlp-callout-success), 0.06), rgba(var(--mlp-callout-success), 0.02));
	border-left: 3px solid rgb(var(--mlp-callout-success));
	border-radius: var(--mlp-radius-md);
	padding: 1.4em 1.6em;
	margin-block: 2em;
	position: relative;
}

body.mlp-active .wp-block-group.is-style-mlp-callout::before {
	content: '\2713  À retenir';
	display: block;
	font-family: var(--mlp-font-body);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgb(22, 163, 74);
	margin-bottom: 0.7em;
}

body.mlp-active .wp-block-group.is-style-mlp-warning {
	background: linear-gradient(135deg, rgba(var(--mlp-callout-warning), 0.06), rgba(var(--mlp-callout-warning), 0.02));
	border-left: 3px solid rgb(var(--mlp-callout-warning));
	border-radius: var(--mlp-radius-md);
	padding: 1.4em 1.6em;
	margin-block: 2em;
	position: relative;
}

body.mlp-active .wp-block-group.is-style-mlp-warning::before {
	content: '\26A0  Attention';
	display: block;
	font-family: var(--mlp-font-body);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgb(194, 65, 12);
	margin-bottom: 0.7em;
}

body.mlp-active .wp-block-group.is-style-mlp-info {
	background: linear-gradient(135deg, rgba(var(--mlp-callout-info), 0.06), rgba(var(--mlp-callout-info), 0.02));
	border-left: 3px solid rgb(var(--mlp-callout-info));
	border-radius: var(--mlp-radius-md);
	padding: 1.4em 1.6em;
	margin-block: 2em;
	position: relative;
}

body.mlp-active .wp-block-group.is-style-mlp-info::before {
	content: '\1F4A1  Le saviez-vous';
	display: block;
	font-family: var(--mlp-font-body);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgb(37, 99, 235);
	margin-bottom: 0.7em;
}

/* --- CTA premium box --- */
body.mlp-active .wp-block-group.is-style-mlp-cta {
	background:
		linear-gradient(135deg, var(--mlp-surface-soft), transparent),
		var(--base, #fff);
	border: 1px solid var(--mlp-line-strong);
	border-radius: var(--mlp-radius-lg);
	padding: clamp(1.5rem, 3vw, 2.4rem);
	margin-block: 2.5em;
	box-shadow: var(--mlp-shadow-sm);
	position: relative;
	overflow: hidden;
}

body.mlp-active .wp-block-group.is-style-mlp-cta::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--accent, currentColor), transparent 70%);
}

body.mlp-active .wp-block-group.is-style-mlp-cta > h3,
body.mlp-active .wp-block-group.is-style-mlp-cta > h4,
body.mlp-active .wp-block-group.is-style-mlp-cta > h5 {
	margin-top: 0;
	font-size: 1.3em;
	letter-spacing: -0.018em;
	margin-bottom: 0.5em;
}

body.mlp-active .wp-block-group.is-style-mlp-cta > p:last-child,
body.mlp-active .wp-block-group.is-style-mlp-cta > .wp-block-buttons:last-child {
	margin-bottom: 0;
}

/* --- Donnée clé (key fact) : grand chiffre + label --- */
body.mlp-active .wp-block-group.is-style-mlp-key-fact {
	border-left: 3px solid var(--accent, currentColor);
	padding: 0.5em 0 0.5em 1.5em;
	margin-block: 2em;
}

body.mlp-active .wp-block-group.is-style-mlp-key-fact > h2,
body.mlp-active .wp-block-group.is-style-mlp-key-fact > h3,
body.mlp-active .wp-block-group.is-style-mlp-key-fact > .wp-block-heading {
	font-size: clamp(2rem, 4vw, 3rem);
	margin: 0 0 0.2em 0;
	letter-spacing: -0.03em;
	font-variation-settings: var(--mlp-display-opsz-large);
	line-height: 1;
	color: var(--accent, currentColor);
}

body.mlp-active .wp-block-group.is-style-mlp-key-fact > p {
	margin: 0;
	font-size: 0.92rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-weight: 500;
	opacity: 0.65;
}

/* --- Hero (à appliquer sur un Group block) --- */
body.mlp-active .wp-block-group.is-style-mlp-hero {
	padding-block: clamp(3rem, 8vw, 6rem);
	padding-inline: clamp(1rem, 4vw, 3rem);
	margin-block: 0;
	position: relative;
}

body.mlp-active .wp-block-group.is-style-mlp-hero h1,
body.mlp-active .wp-block-group.is-style-mlp-hero h2 {
	font-size: clamp(2.4rem, 5vw + 0.5rem, 4.25rem);
	letter-spacing: -0.035em;
	line-height: 1.05;
	font-variation-settings: var(--mlp-display-opsz-large);
	margin: 0 0 0.5em 0;
	max-width: 18ch;
}

body.mlp-active .wp-block-group.is-style-mlp-hero p {
	font-size: clamp(1.1rem, 0.5vw + 1rem, 1.35rem);
	line-height: 1.5;
	max-width: 42ch;
	opacity: 0.78;
	margin-block: 1em;
}

body.mlp-active .wp-block-group.is-style-mlp-hero .wp-block-buttons {
	margin-top: 1.5em;
}

/* ============================================================
   12. READING PROGRESS BAR
   Affichée uniquement sur les articles single, via JS.
   ============================================================ */
.mlp-reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	width: 100%;
	background: var(--accent, #2563eb);
	transform-origin: left center;
	transform: scaleX(0);
	z-index: 99999;
	transition: transform 0.06s linear, opacity 0.25s ease;
	pointer-events: none;
	opacity: 0;
}

.mlp-reading-progress.mlp-visible {
	opacity: 1;
}

/* ============================================================
   13. UTILITIES & RESPONSIVE
   ============================================================ */

/* Container plus généreux sur grands écrans (optionnel). */
@media (min-width: 1280px) {
	body.mlp-active .grid-container,
	body.mlp-active .inside-article {
		--gp-container-comfortable: clamp(720px, 65vw, 1200px);
	}
}

/* Mobile : padding article réduit. */
@media (max-width: 600px) {
	body.mlp-active .wp-block-group.is-style-mlp-callout,
	body.mlp-active .wp-block-group.is-style-mlp-warning,
	body.mlp-active .wp-block-group.is-style-mlp-info {
		padding: 1.1em 1.25em;
	}

	body.mlp-active .wp-block-group.is-style-mlp-cta {
		padding: 1.5rem 1.25rem;
	}

	body.mlp-active.single-post .entry-content h2::before {
		width: 28px;
		height: 2px;
	}
}

/* Print : garder la lisibilité, retirer les fioritures. */
@media print {
	body.mlp-active .mlp-reading-progress,
	body.mlp-active .site-header,
	body.mlp-active .site-footer,
	body.mlp-active .sidebar {
		display: none !important;
	}

	body.mlp-active .entry-content {
		max-width: none;
		font-size: 11pt;
	}

	body.mlp-active h1, body.mlp-active h2, body.mlp-active h3 {
		page-break-after: avoid;
	}

	body.mlp-active blockquote,
	body.mlp-active .wp-block-quote,
	body.mlp-active .wp-block-table {
		page-break-inside: avoid;
	}
}

/* Reduced motion : neutralise les transitions/transformations. */
@media (prefers-reduced-motion: reduce) {
	body.mlp-active *,
	body.mlp-active *::before,
	body.mlp-active *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
