/* ==========================================================================
   Wizio Blog — gabarit article
   Les couleurs et polices sont héritées du Kit Elementor (Couleurs / Typographies
   globales), donc alignées sur la home. Les valeurs après la virgule ne servent
   que si une couleur globale n'existe pas : à ajuster une seule fois ici.
   ========================================================================== */

body {
	--wz-primary:  var(--e-global-color-primary, #1b1f4b);   /* bleu nuit marque */
	--wz-accent:   var(--e-global-color-accent, #5b5bf0);    /* boutons, liens actifs */
	--wz-heading:  var(--e-global-color-secondary, #14172f); /* titres */
	--wz-text:     var(--e-global-color-text, #3a3f55);      /* corps de texte */
	--wz-muted:    #6b7085;
	--wz-line:     #e4e6ef;
	--wz-surface:  #f5f6fb;
	--wz-white:    #ffffff;
	--wz-font-head: var(--e-global-typography-primary-font-family, inherit);
	--wz-font-body: var(--e-global-typography-text-font-family, inherit);
	--wz-radius-lg: 16px;
	--wz-radius-md: 10px;
	--wz-header-offset: 110px; /* hauteur du header sticky Elementor */
}

/* --- Corps de l'article (ajouter la classe wz-prose au widget Contenu) --- */
.wz-prose {
	font-family: var(--wz-font-body);
	color: var(--wz-text);
	font-size: 1.125rem;
	line-height: 1.75;
	max-width: 72ch;
}
.wz-prose p, .wz-prose ul, .wz-prose ol { margin: 0 0 1.25em; }
.wz-prose h2, .wz-prose h3 {
	font-family: var(--wz-font-head);
	color: var(--wz-heading);
	line-height: 1.25;
	scroll-margin-top: calc(var(--wz-header-offset) + 16px);
}
.wz-prose h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); margin: 2.2em 0 .7em; }
.wz-prose h3 { font-size: 1.25rem; margin: 1.8em 0 .5em; }
.wz-prose a { color: var(--wz-accent); text-underline-offset: 3px; }
.wz-prose blockquote {
	margin: 2em 0; padding: .25em 0 .25em 1.25em;
	border-left: 3px solid var(--wz-accent);
	color: var(--wz-heading); font-size: 1.2rem;
}
.wz-prose img { max-width: 100%; height: auto; border-radius: var(--wz-radius-md); }
.wz-prose table { width: 100%; border-collapse: collapse; font-size: 1rem; display: block; overflow-x: auto; }
.wz-prose th, .wz-prose td { padding: .7em .9em; border-bottom: 1px solid var(--wz-line); text-align: left; }
.wz-prose th { color: var(--wz-heading); background: var(--wz-surface); }

/* --- Image à la une --- */
.wz-hero { margin: 0 0 2rem; }
.wz-hero__img {
	display: block; width: 100%; height: auto;
	aspect-ratio: 12 / 5; object-fit: cover;
	border-radius: var(--wz-radius-lg);
	background: var(--wz-surface);
}
.wz-hero figcaption { margin-top: .5rem; font-size: .875rem; color: var(--wz-muted); }

/* --- Méta auteur --- */
.wz-meta { display: flex; align-items: center; gap: .85rem; margin: 0 0 1.75rem; font-family: var(--wz-font-body); }
.wz-meta__avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.wz-meta__text { display: flex; flex-direction: column; gap: .15rem; font-size: .9rem; color: var(--wz-muted); }
.wz-meta__author { color: var(--wz-heading); font-weight: 600; }
.wz-meta__author a { color: inherit; text-decoration: none; }
.wz-meta__author a:hover { text-decoration: underline; }
.wz-sep { display: inline-block; width: 4px; height: 4px; margin: 0 .6em; border-radius: 50%; background: currentColor; vertical-align: middle; opacity: .5; }

/* --- Sommaire flottant --- */
.wz-toc {
	position: sticky;
	top: calc(var(--wz-header-offset) + 16px);
	font-family: var(--wz-font-body);
}
.wz-toc__box { border-left: 2px solid var(--wz-line); padding-left: 1.1rem; }
.wz-toc__title {
	list-style: none; cursor: default;
	font-family: var(--wz-font-head); font-weight: 700; font-size: 1rem;
	color: var(--wz-heading); margin-bottom: .75rem;
}
.wz-toc__title::-webkit-details-marker { display: none; }
.wz-toc__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.wz-toc__list a {
	position: relative; display: block;
	padding: .4rem 0; font-size: .925rem; line-height: 1.4;
	color: var(--wz-muted); text-decoration: none;
	transition: color .15s ease;
}
.wz-toc__list a:hover { color: var(--wz-heading); }
.wz-toc__list a[aria-current="true"] { color: var(--wz-accent); font-weight: 600; }
.wz-toc__list a[aria-current="true"]::before {
	content: ""; position: absolute; left: calc(-1.1rem - 2px); top: .35rem; bottom: .35rem;
	width: 2px; background: var(--wz-accent);
}
.wz-toc__time { margin: 1rem 0 0; font-size: .85rem; color: var(--wz-muted); }

.wz-share { margin-top: 1.75rem; padding-left: calc(1.1rem + 2px); }
.wz-share__label { margin: 0 0 .6rem; font-size: .85rem; font-weight: 600; color: var(--wz-heading); }
.wz-share__list { list-style: none; margin: 0; padding: 0; display: flex; gap: .5rem; }
.wz-share__list a, .wz-share__list button {
	display: grid; place-items: center; width: 40px; height: 40px;
	border: 1px solid var(--wz-line); border-radius: var(--wz-radius-md);
	background: var(--wz-white); color: var(--wz-heading); cursor: pointer;
	transition: border-color .15s ease, color .15s ease;
}
.wz-share__list a:hover, .wz-share__list button:hover { border-color: var(--wz-accent); color: var(--wz-accent); }
.wz-share__status { display: block; min-height: 1.2em; margin-top: .4rem; font-size: .8rem; color: var(--wz-muted); }

/* Mobile/tablette : le sommaire devient un bloc repliable en tête d'article */
@media (max-width: 1024px) {
	.wz-toc { position: static; margin-bottom: 1.5rem; }
	.wz-toc__box {
		border: 1px solid var(--wz-line); border-radius: var(--wz-radius-md);
		padding: .9rem 1.1rem; background: var(--wz-surface);
	}
	.wz-toc__title { cursor: pointer; margin: 0; display: flex; justify-content: space-between; align-items: center; }
	.wz-toc__title::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; }
	.wz-toc__box[open] .wz-toc__title { margin-bottom: .5rem; }
	.wz-toc__box[open] .wz-toc__title::after { transform: rotate(-135deg); }
	.wz-toc__list a[aria-current="true"]::before { display: none; }
	.wz-share { display: none; }
}

/* --- Boutons (repris du style « Planifier une démo » du site) --- */
.wz-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px; padding: .7rem 1.35rem;
	border-radius: var(--wz-radius-md); border: 1px solid transparent;
	font-family: var(--wz-font-body); font-weight: 600; font-size: .95rem; line-height: 1.2;
	text-decoration: none; cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.wz-btn--primary { background: var(--wz-accent); color: var(--wz-white); }
.wz-btn--primary:hover { background: var(--wz-primary); color: var(--wz-white); }
.wz-btn--ghost { background: transparent; color: var(--wz-white); border-color: rgba(255,255,255,.45); }
.wz-btn--ghost:hover { border-color: var(--wz-white); color: var(--wz-white); }
.wz-btn--soft { background: var(--wz-surface); color: var(--wz-heading); }
.wz-btn--soft:hover { background: var(--wz-line); }

/* --- CTA « Découvrez notre plateforme » --- */
.wz-cta { font-family: var(--wz-font-body); }
.wz-cta__title { font-family: var(--wz-font-head); font-weight: 700; margin: 0 0 .4rem; }
.wz-cta__text { margin: 0; }

.wz-cta--inline {
	display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
	margin: 2.5rem 0; padding: 1.4rem 1.6rem;
	border: 1px solid var(--wz-line); border-left: 4px solid var(--wz-accent);
	border-radius: var(--wz-radius-md); background: var(--wz-surface);
	font-size: 1rem; line-height: 1.55;
}
.wz-cta--inline .wz-cta__title { color: var(--wz-heading); font-size: 1.15rem; }
.wz-cta--inline .wz-cta__text { color: var(--wz-text); }
.wz-cta--inline .wz-cta__actions { flex: none; }

.wz-cta--end {
	display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2rem;
	margin: 3.5rem 0; padding: clamp(1.75rem, 4vw, 3rem);
	border-radius: var(--wz-radius-lg);
	background: var(--wz-primary); color: rgba(255,255,255,.85);
}
.wz-cta--end .wz-cta__title { color: var(--wz-white); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.2; }
.wz-cta--end .wz-cta__text { max-width: 58ch; font-size: 1.05rem; line-height: 1.6; }
.wz-cta__proof { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.wz-cta__proof li {
	padding: .35rem .75rem; border-radius: 999px;
	background: rgba(255,255,255,.1); color: var(--wz-white); font-size: .85rem;
}
.wz-cta--end .wz-cta__actions { display: flex; flex-direction: column; gap: .6rem; }

@media (max-width: 767px) {
	.wz-cta--inline { flex-direction: column; align-items: flex-start; }
	.wz-cta--end { grid-template-columns: 1fr; }
	.wz-cta--end .wz-cta__actions .wz-btn { width: 100%; }
}

/* --- Articles connexes --- */
.wz-related { margin: 3.5rem 0 1rem; font-family: var(--wz-font-body); }
.wz-related__title {
	font-family: var(--wz-font-head); color: var(--wz-heading);
	font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); margin: 0 0 1.5rem;
}
.wz-related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
.wz-card { display: flex; flex-direction: column; }
.wz-card__media { display: block; overflow: hidden; border-radius: var(--wz-radius-md); background: var(--wz-surface); aspect-ratio: 16 / 9; }
.wz-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.wz-card:hover .wz-card__media img { transform: scale(1.03); }
.wz-card__placeholder { display: block; width: 100%; height: 100%; background: var(--wz-primary); opacity: .08; }
.wz-card__body { padding-top: 1rem; display: flex; flex-direction: column; flex: 1; }
.wz-card__cat { margin: 0 0 .35rem; font-size: .8rem; font-weight: 600; color: var(--wz-accent); }
.wz-card__title { margin: 0 0 .5rem; font-family: var(--wz-font-head); font-size: 1.1rem; line-height: 1.35; }
.wz-card__title a { color: var(--wz-heading); text-decoration: none; }
.wz-card__title a::after { content: ""; position: absolute; inset: 0; } /* carte entièrement cliquable */
.wz-card { position: relative; }
.wz-card__title a:hover { color: var(--wz-accent); }
.wz-card__excerpt { margin: 0 0 .75rem; font-size: .95rem; line-height: 1.55; color: var(--wz-text); }
.wz-card__date { margin: auto 0 0; font-size: .82rem; color: var(--wz-muted); }

@media (max-width: 1024px) { .wz-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .wz-related__grid { grid-template-columns: 1fr; } }

/* --- Invitation démo (bas droite) --- */
.wz-toast {
	position: fixed; right: 24px; bottom: 24px; z-index: 9990;
	width: min(380px, calc(100vw - 32px));
	padding: 1.4rem 1.4rem 1.25rem;
	border-radius: var(--wz-radius-lg);
	background: var(--wz-white);
	box-shadow: 0 18px 50px -12px rgba(20, 23, 47, .35), 0 0 0 1px rgba(20, 23, 47, .06);
	font-family: var(--wz-font-body);
	opacity: 0; transform: translateY(12px);
	transition: opacity .25s ease, transform .25s ease;
}
.wz-toast[hidden] { display: none; }
.wz-toast.is-visible { opacity: 1; transform: none; }
.wz-toast__close {
	position: absolute; top: 10px; right: 10px;
	display: grid; place-items: center; width: 32px; height: 32px;
	border: 0; border-radius: 8px; background: transparent; color: var(--wz-muted); cursor: pointer;
}
.wz-toast__close:hover { background: var(--wz-surface); color: var(--wz-heading); }
.wz-toast__title { margin: 0 2rem .35rem 0; font-family: var(--wz-font-head); font-weight: 700; font-size: 1.02rem; line-height: 1.4; color: var(--wz-heading); }
.wz-toast__text { margin: 0 0 1rem; font-size: .95rem; line-height: 1.5; color: var(--wz-text); }
.wz-toast__actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: .6rem; }

@media (max-width: 640px) {
	.wz-toast { right: 16px; bottom: 16px; padding: 1.1rem; }
	.wz-toast__actions { grid-template-columns: 1fr; }
}

/* --- Accessibilité --- */
.wz-toc a:focus-visible, .wz-share a:focus-visible, .wz-share button:focus-visible,
.wz-btn:focus-visible, .wz-toast__close:focus-visible, .wz-card a:focus-visible, .wz-toc__title:focus-visible {
	outline: 2px solid var(--wz-accent); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	.wz-toast, .wz-card__media img, .wz-toc__list a { transition: none; }
	html { scroll-behavior: auto !important; }
}

/* --- Impression : on garde l'article, on retire le reste --- */
@media print {
	.wz-toc, .wz-cta, .wz-toast, .wz-related { display: none !important; }
	.wz-prose { max-width: none; font-size: 11pt; }
}
