/*
 * Styles des blocs éditoriaux LEPTIDIGITAL (front + éditeur).
 * Tokens depuis theme.json : --wp--preset--color--*. Dégradent proprement si autre thème.
 */

.ld-callout {
	margin: 1.75rem 0;
	padding: 1rem 1.25rem;
	border-radius: 14px;
	border-left: 4px solid var(--wp--preset--color--turquoise, #5ce0d8);
	background: rgba(92, 224, 216, 0.06);
}
.ld-callout[data-callout="alert"] { border-left-color: var(--wp--preset--color--alert, #ef4444); background: rgba(239, 68, 68, 0.07); }
.ld-callout[data-callout="key"] { border-left-color: var(--wp--preset--color--violet, #8b5cf6); background: rgba(139, 92, 246, 0.07); }
.ld-callout-title { margin: 0 0 .35rem; font-weight: 800; }
.ld-callout-body > :last-child { margin-bottom: 0; }

.ld-faq-item {
	margin: .75rem 0;
	border: 1px solid var(--wp--preset--color--border, #1b2438);
	border-radius: 12px;
	padding: .85rem 1.1rem;
}
.ld-faq-q { display: flex; align-items: baseline; gap: .65rem; cursor: pointer; font-weight: 700; list-style: none; }
.ld-faq-q::-webkit-details-marker { display: none; }
.ld-faq-q::marker { content: ""; }
.ld-faq-q::before { content: "➜"; flex: none; color: var(--wp--preset--color--turquoise, #5ce0d8); }
.ld-faq-a { margin-top: .6rem; color: var(--wp--preset--color--foreground-muted, #98a2b3); }

.ld-pull-quote {
	margin: 2rem 0;
	padding-left: 1.75rem;
	/* Pas de border-left : la barre arrondie en gradient vient de .ld-prose blockquote::before. */
	font-family: var(--wp--preset--font-family--serif, Georgia, serif);
	font-size: 1.4rem;
	line-height: 1.5;
}
.ld-pull-source { display: block; margin-top: .6rem; font-size: .9rem; font-style: normal; color: var(--wp--preset--color--foreground-muted, #98a2b3); }

.ld-chart { margin: 2rem 0; }
.ld-chart-head { display: flex; flex-direction: column; gap: .15rem; margin-bottom: .6rem; }
.ld-chart-title { font-weight: 800; font-size: 1.05rem; }
.ld-chart-subtitle { color: var(--wp--preset--color--foreground-muted, #98a2b3); font-size: .9rem; }
.ld-chart-canvas { width: 100%; }
.ld-chart-svg { width: 100%; height: auto; display: block; }
.ld-chart-svg .ld-chart-lab { fill: var(--wp--preset--color--foreground-muted, #98a2b3); font-size: 13px; }
.ld-chart-svg .ld-chart-val { fill: var(--wp--preset--color--foreground, #f3f5f8); font-size: 13px; font-weight: 700; }
.ld-chart-svg .ld-chart-pct { fill: #061622; font-size: 14px; font-weight: 900; paint-order: stroke; stroke: rgba(255,255,255,.4); stroke-width: 2px; }
.ld-chart-svg .ld-chart-donut-total { fill: var(--wp--preset--color--foreground, #f3f5f8); font-size: 23px; font-weight: 900; }
.ld-chart-svg .ld-chart-grid { stroke: rgba(152,162,179,.16); stroke-width: 1; }
.ld-chart-svg .ld-chart-radar-grid { fill: rgba(255,255,255,.018); stroke: rgba(152,162,179,.22); stroke-width: 1; }
.ld-chart-svg .ld-chart-radar-axis { stroke: rgba(152,162,179,.2); stroke-width: 1; }
.ld-viz-source { margin-top: .5rem; font-size: .8rem; color: var(--wp--preset--color--foreground-subtle, #7c8694); }
@media (max-width: 600px) {
	.ld-chart-svg .ld-chart-lab { font-size: 26px; }
	.ld-chart-svg .ld-chart-val { font-size: 25px; }
	.ld-chart-svg .ld-chart-pct { font-size: 26px; stroke-width: 3px; }
	.ld-chart-svg .ld-chart-donut-total { font-size: 32px; }
}

.ld-stat-grid { margin: 2rem 0; }
.ld-stat-grid-list { display: grid; gap: 1rem; margin: 0; }
.ld-stat-grid[data-cols="2col"] .ld-stat-grid-list { grid-template-columns: repeat(2, 1fr); }
.ld-stat-grid[data-cols="3col"] .ld-stat-grid-list { grid-template-columns: repeat(3, 1fr); }
.ld-stat-grid[data-cols="4col"] .ld-stat-grid-list { grid-template-columns: repeat(4, 1fr); }
.ld-stat-card {
	border: 1px solid var(--wp--preset--color--border, #1b2438);
	border-radius: 14px;
	padding: 1.1rem 1.25rem;
	background: rgba(255, 255, 255, 0.025);
}
.ld-stat-value { margin: 0; font-size: 2rem; font-weight: 800; line-height: 1.1; background: linear-gradient(120deg, #5ce0d8 0%, #8b5cf6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ld-stat-label { margin: .35rem 0 0; font-size: .9rem; color: var(--wp--preset--color--foreground-muted, #98a2b3); }
.ld-stat-change { display: inline-block; margin-top: .4rem; font-size: .8rem; font-weight: 700; }
.ld-stat-change[data-dir="up"] { color: var(--wp--preset--color--mint, #84ebad); }
.ld-stat-change[data-dir="down"] { color: var(--wp--preset--color--magenta, #ec4899); }
.ld-stat-change[data-dir="neutral"] { color: var(--wp--preset--color--foreground-subtle, #7c8694); }
@media (max-width: 600px) {
	.ld-stat-grid .ld-stat-grid-list { grid-template-columns: 1fr !important; }
}

.ld-cta {
	margin: 2rem 0;
	padding: 1.5rem 1.75rem;
	border-radius: 18px;
	border: 1px solid var(--wp--preset--color--border, #1b2438);
	background: linear-gradient(135deg, rgba(92, 224, 216, 0.10), rgba(132, 235, 173, 0.06));
}
.ld-cta[data-cta="lead_magnet"], .ld-cta[data-cta="quiz"] { background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(236, 72, 153, 0.07)); }
.ld-cta-title { margin: 0 0 .35rem; font-size: 1.3rem; font-weight: 800; }
.ld-cta-desc { margin: 0 0 1rem; color: var(--wp--preset--color--foreground-muted, #98a2b3); }
.ld-cta-btn {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.25rem;
	border-radius: 999px; font-weight: 700; text-decoration: none;
	background: linear-gradient(135deg, #5ce0d8, #84ebad); color: #060914;
}

.ld-figure { margin: 1.75rem 0; }
.ld-figure[data-width="narrow"] { max-width: 460px; margin-inline: auto; }
.ld-figure-img { width: 100%; height: auto; border-radius: 14px; display: block; }
.ld-figure-cap { margin-top: .5rem; font-size: .875rem; font-style: italic; color: var(--wp--preset--color--foreground-muted, #98a2b3); }
.ld-figure-credit { font-style: normal; }

.ld-gallery { margin: 1.75rem 0; }
.ld-gallery-grid { display: grid; gap: .75rem; }
.ld-gallery[data-cols="2"] .ld-gallery-grid { grid-template-columns: repeat(2, 1fr); }
.ld-gallery[data-cols="3"] .ld-gallery-grid { grid-template-columns: repeat(3, 1fr); }
.ld-gallery[data-cols="4"] .ld-gallery-grid { grid-template-columns: repeat(4, 1fr); }
.ld-gallery[data-layout="carousel"] .ld-gallery-grid { grid-auto-flow: column; grid-auto-columns: 70%; overflow-x: auto; }
.ld-gallery-img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; }

/* En résumé (TL;DR) */
.ld-summary { margin: 1.75rem 0; padding: 1.3rem 1.5rem; border-radius: 18px; border: 1px solid rgba(92, 224, 216, 0.25); background: linear-gradient(135deg, rgba(92, 224, 216, 0.08), rgba(139, 92, 246, 0.06)); }
.ld-summary-title { margin: 0 0 .85rem; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; background: linear-gradient(135deg, #5ce0d8, #84ebad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ld-summary-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.ld-summary-list li { position: relative; padding-left: 1.7em; font-size: .98rem; line-height: 1.5; color: var(--wp--preset--color--foreground, #f3f5f8); }
.ld-summary-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 11px; height: 11px; border-radius: 50%; background: linear-gradient(135deg, #5ce0d8, #84ebad); box-shadow: 0 0 8px rgba(92, 224, 216, 0.4); }

/* Outils comparés — carte entière = lien vers la fiche */
.ld-cmp { margin: 2rem 0; }
.ld-cmp-title { margin: 0 0 1rem; font-size: 1.1rem; font-weight: 800; color: var(--wp--preset--color--foreground, #f3f5f8); }
.ld-cmp-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .ld-cmp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ld-cmp-card { display: flex; flex-direction: column; align-items: center; gap: .8rem; min-width: 0; min-height: 290px; padding: 1.6rem 1.15rem; border-radius: 22px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(19, 27, 48, .78); box-shadow: 0 16px 36px rgba(92, 224, 216, .09), 0 8px 30px rgba(139, 92, 246, .08); text-align: center; text-decoration: none; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.ld-cmp-card:hover { transform: translateY(-4px); border-color: rgba(92, 224, 216, .42); box-shadow: 0 20px 44px rgba(92, 224, 216, .16), 0 12px 34px rgba(139, 92, 246, .14); }
.ld-cmp-card:focus-visible { outline: 3px solid #5ce0d8; outline-offset: 4px; }
.ld-cmp-logo { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; flex: none; border-radius: 16px; overflow: hidden; font-size: 24px; font-weight: 800; color: #061622; }
.ld-cmp-logo.is-letter { background: linear-gradient(135deg, #5ce0d8, #84ebad); }
.ld-cmp-logo-img { width: 72px; height: 72px; object-fit: contain; }
.ld-cmp-body { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: .55rem; }
.ld-cmp-name { display: block; font-size: 1.05rem; font-weight: 800; color: var(--wp--preset--color--foreground, #f3f5f8); }
.ld-cmp-rating { display: inline-flex; align-items: center; justify-content: center; gap: 1px; }
.ld-cmp-rating .dashicons { width: 18px; height: 18px; font-size: 18px; line-height: 1; background: linear-gradient(135deg, #5ce0d8 0%, #84ebad 48%, #8b5cf6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ld-cmp-rating .dashicons-star-empty { opacity: .34; }
.ld-cmp-tag { display: block; font-size: .9rem; line-height: 1.5; color: var(--wp--preset--color--foreground-muted, #98a2b3); }
.ld-cmp-cta { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 44px; margin-top: auto; padding: 0 1.2rem; border-radius: 999px; font-size: .88rem; font-weight: 800; background: linear-gradient(90deg, #5ce0d8, #84ebad 52%, #8b5cf6); box-shadow: 0 7px 20px rgba(92, 224, 216, .22); color: #061622; transition: gap .2s ease, box-shadow .2s ease; }
.ld-cmp-card:hover .ld-cmp-cta { gap: .6rem; box-shadow: 0 10px 26px rgba(92, 224, 216, .32); }
.ld-cmp-caption { margin: .85rem 0 0; font-size: .85rem; font-style: italic; color: var(--wp--preset--color--foreground-subtle, #7c8694); }
.ld-gallery-cap { margin-top: .5rem; font-size: .875rem; font-style: italic; color: var(--wp--preset--color--foreground-muted, #98a2b3); }
@media (max-width: 600px) {
	.ld-gallery-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Sommaire (TOC) */
.ld-toc {
	margin: 1.5rem 0;
	border: 1px solid var(--wp--preset--color--border, #1b2438);
	border-radius: 14px;
	padding: .5rem 1.1rem;
	background: rgba(255, 255, 255, 0.02);
}
.ld-toc-title { display: flex; align-items: center; justify-content: space-between; gap: .5rem; cursor: pointer; font-weight: 800; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--wp--preset--color--foreground-subtle, #7c8694); padding: .5rem 0; user-select: none; list-style: none; }
.ld-toc-title::-webkit-details-marker { display: none; } /* masque le triangle natif de <summary> (WebKit) */
.ld-toc-title::marker { content: ""; }                   /* idem (Firefox/Chrome) */
.ld-toc-title:focus-visible { outline: 2px solid var(--wp--preset--color--primary, #5ce0d8); outline-offset: 2px; border-radius: 4px; }
.ld-toc-chevron { width: 16px; height: 16px; flex: none; transition: transform .2s ease; }
.ld-toc-details[open] .ld-toc-chevron { transform: rotate(180deg); }
.ld-toc-list { margin: .25rem 0 .5rem; padding-left: 1.1rem; } /* affiché/masqué nativement par <details> */
.ld-toc-list li { margin: .15rem 0; }
.ld-toc-list .ld-toc-l3 { margin-left: 1rem; font-size: .95em; }
.ld-toc-list a { color: var(--wp--preset--color--foreground-muted, #98a2b3); text-decoration: none; }
.ld-toc-list a:hover { color: var(--wp--preset--color--foreground, #f3f5f8); }

/* Partage */
.ld-share { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.ld-share-label { font-weight: 700; font-size: .85rem; color: var(--wp--preset--color--foreground-muted, #98a2b3); }
.ld-share-list { display: flex; gap: .5rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.ld-share-btn {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 .95rem;
	border: 1px solid var(--wp--preset--color--border, #1b2438); border-radius: 999px;
	font-size: .8rem; font-weight: 600; text-decoration: none;
	color: var(--wp--preset--color--foreground-muted, #98a2b3);
}
.ld-share-btn:hover { color: #061622; border-color: transparent; background: linear-gradient(to right,#5ce0d8,#84ebad); }

/* Bulles de tags — chaque famille éditoriale conserve son gradient. */
.ld-tag-bubbles { margin: 0; text-align: center; }
.ld-tag-bubbles-list {
	display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem;
	margin: 0; padding: 0; list-style: none;
}
.ld-tag-bubble {
	--ld-tag-gradient: linear-gradient(135deg,#5ce0d8,#84ebad);
	--ld-tag-gradient-hover: linear-gradient(315deg,#5ce0d8,#84ebad);
	display: inline-flex; align-items: center; justify-content: center; min-height: 40px;
	box-sizing: border-box; padding: .55rem 1rem; border: 0; border-radius: 999px;
	background: var(--ld-tag-gradient); color: #061622; box-shadow: 0 6px 18px rgba(0,0,0,.24);
	font-size: .8rem; font-weight: 750; line-height: 1.2; text-decoration: none;
	transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.ld-tag-bubble:hover { background: var(--ld-tag-gradient-hover); color: #061622; transform: translateY(-2px); box-shadow: 0 9px 24px rgba(0,0,0,.32); filter: saturate(1.08); }
.ld-tag-bubble:focus-visible { outline: 2px solid #f3f5f8; outline-offset: 3px; }
.ld-tag-bubble--ia { --ld-tag-gradient: linear-gradient(135deg,#a78bfa,#f472b6); --ld-tag-gradient-hover: linear-gradient(315deg,#a78bfa,#f472b6); }
.ld-tag-bubble--seo { --ld-tag-gradient: linear-gradient(135deg,#5ce0d8,#60a5fa); --ld-tag-gradient-hover: linear-gradient(315deg,#5ce0d8,#60a5fa); }
.ld-tag-bubble--saas { --ld-tag-gradient: linear-gradient(135deg,#84ebad,#2dd4bf); --ld-tag-gradient-hover: linear-gradient(315deg,#84ebad,#2dd4bf); }
.ld-tag-bubble--marketing { --ld-tag-gradient: linear-gradient(135deg,#fbbf24,#fb7185); --ld-tag-gradient-hover: linear-gradient(315deg,#fbbf24,#fb7185); }
.ld-tag-bubble--social { --ld-tag-gradient: linear-gradient(135deg,#818cf8,#38bdf8); --ld-tag-gradient-hover: linear-gradient(315deg,#818cf8,#38bdf8); }
.ld-tag-bubble--ecommerce { --ld-tag-gradient: linear-gradient(135deg,#fcd34d,#fb923c); --ld-tag-gradient-hover: linear-gradient(315deg,#fcd34d,#fb923c); }
.ld-tag-bubble--g1 { --ld-tag-gradient: linear-gradient(135deg,#a78bfa,#f472b6); --ld-tag-gradient-hover: linear-gradient(315deg,#a78bfa,#f472b6); }
.ld-tag-bubble--g2 { --ld-tag-gradient: linear-gradient(135deg,#5ce0d8,#60a5fa); --ld-tag-gradient-hover: linear-gradient(315deg,#5ce0d8,#60a5fa); }
.ld-tag-bubble--g3 { --ld-tag-gradient: linear-gradient(135deg,#84ebad,#22c55e); --ld-tag-gradient-hover: linear-gradient(315deg,#84ebad,#22c55e); }
.ld-tag-bubble--g4 { --ld-tag-gradient: linear-gradient(135deg,#fcd34d,#f59e0b); --ld-tag-gradient-hover: linear-gradient(315deg,#fcd34d,#f59e0b); }
.ld-tag-bubble--g5 { --ld-tag-gradient: linear-gradient(135deg,#fb923c,#f87171); --ld-tag-gradient-hover: linear-gradient(315deg,#fb923c,#f87171); }
.ld-tag-bubble--g6 { --ld-tag-gradient: linear-gradient(135deg,#818cf8,#38bdf8); --ld-tag-gradient-hover: linear-gradient(315deg,#818cf8,#38bdf8); }
@media (max-width: 600px) { .ld-tag-bubbles-list { gap: .5rem; } .ld-tag-bubble { min-height: 44px; } }

/* Bloc auteur */
.ld-author-box {
	box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0;
	display: flex; gap: 1.1rem; margin: 3rem 0 1rem; padding: 1.4rem;
	border: 1px solid var(--wp--preset--color--border, #1b2438); border-radius: 18px;
	background: rgba(12, 18, 36, 0.5);
}
.ld-author-media { flex: none; }
.ld-author-avatar { border-radius: 999px; }
.ld-author-body { min-width: 0; }
.ld-author-eyebrow { margin: 0; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--wp--preset--color--foreground-subtle, #7c8694); }
.ld-author-name { margin: .15rem 0 .4rem; font-size: 1.1rem; }
.ld-author-bio { margin: 0; font-size: .9rem; color: var(--wp--preset--color--foreground-muted, #98a2b3); overflow-wrap: anywhere; }
.ld-author-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.ld-author-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--wp--preset--color--border, #1b2438); color: var(--wp--preset--color--foreground-muted, #98a2b3); background: rgba(255, 255, 255, 0.03); transition: color .2s ease, border-color .2s ease, transform .2s ease; }
.ld-author-link:hover { color: #061622; border-color: transparent; background: linear-gradient(to right,#5ce0d8,#84ebad); transform: translateY(-1px); }
.ld-author-link svg { width: 17px; height: 17px; }

/* Articles liés */
.ld-related { margin: 3rem 0 1rem; }
.ld-related-title { font-size: 1.2rem; margin-bottom: 1rem; }
.ld-related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.ld-related-card { border: 1px solid var(--wp--preset--color--border, #1b2438); border-radius: 14px; overflow: hidden; }
.ld-related-thumb img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.ld-related-link { display: block; padding: .75rem .9rem; font-weight: 700; text-decoration: none; color: var(--wp--preset--color--foreground, #f3f5f8); }
.ld-related-link:hover { background: linear-gradient(135deg,#5ce0d8,#84ebad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 600px) {
	.ld-related-grid { grid-template-columns: 1fr; }
	.ld-author-box { flex-direction: column; padding: 1.15rem; }
}

/* Placeholder éditeur (blocs contextuels) */
.ld-block-placeholder {
	border: 1px dashed var(--wp--preset--color--border-strong, #2a3650);
	border-radius: 12px; padding: 1rem; text-align: center;
	color: var(--wp--preset--color--foreground-subtle, #7c8694); font-size: .85rem;
}

/* A11y — contrastes forcés : rendre visible le texte en dégradé (clip:text + transparent),
   sinon invisible quand forced-colors retire le fond. Inerte hors forced-colors. */
@media (forced-colors: active) {
	.ld-stat-value,
	.ld-summary-title,
	.ld-cmp-name,
	.ld-cmp-cta,
	.ld-related-link:hover {
		-webkit-text-fill-color: CanvasText;
		color: CanvasText;
		background: none;
	}
}

/* ── Sources primaires ── */
.ld-sources {
	margin-top: 2.2rem;
	padding-top: 1.2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.10);
}
.ld-sources-title {
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	opacity: 0.8;
	margin: 0 0 0.6rem;
}
.ld-sources-list {
	margin: 0;
	padding-left: 1.1rem;
	font-size: 0.92em;
}
.ld-sources-list li { margin: 0.3rem 0; }
