/* =========================================================
   BATIPROCONNECT — POLISH (impeccable principles applied)
   Charge ce fichier APRÈS design-system.css et après les CSS de page.
   ========================================================= */

/* ---------- 1. Tokens raffinés (OKLCH-tinted neutrals) ----------
   On garde les hex pour compat WP/Carbon Fields, mais on documente
   les versions OKLCH dans les commentaires. */

.batipro-page {
	/* Tabular numbers partout sur les chiffres — évite la danse de largeur */
	font-feature-settings: "ss01", "tnum" 0;
}
.batipro-page .bp-stat-num,
.batipro-page .bp-stats-band-num,
.batipro-page .bp-pricing-num,
.batipro-page .bp-cc-num,
.batipro-page .bp-score-without,
.batipro-page .bp-score-with,
.batipro-page .bp-rating-num,
.batipro-page .bp-hv-stat-num {
	font-variant-numeric: tabular-nums lining-nums;
	font-feature-settings: "tnum" 1, "lnum" 1;
}

/* ---------- 2. Motion : ease-out-expo pour les transitions principales ---------- */
.batipro-page {
	/* On surcharge les easing pour matcher impeccable :
	   ease-out-expo = cubic-bezier(.19,1,.22,1)
	   ease-out-quart = cubic-bezier(.25,1,.5,1) */
	--t-fast: 160ms cubic-bezier(.25,1,.5,1);
	--t:      280ms cubic-bezier(.19,1,.22,1);
	--t-slow: 600ms cubic-bezier(.19,1,.22,1);
}

/* ---------- 3. Suppression des side-stripe borders (impeccable absolute ban) ---------- */
/* Avant : border-left: 3px solid var(--c-ocre) sur les blockquotes */
.batipro-page .bp-prose blockquote {
	border-left: 0;
	background: var(--c-cream);
	padding: 22px 28px;
	border-radius: var(--radius);
	margin: 28px 0;
	position: relative;
}
.batipro-page .bp-prose blockquote::before {
	content: "\201C";
	position: absolute;
	top: -8px; left: 18px;
	font-family: var(--ff-serif);
	font-size: 56px;
	color: var(--c-ocre);
	line-height: 1;
}
.batipro-page .bp-prose blockquote p:first-of-type {
	padding-left: 36px;
	margin-top: 8px;
}

/* Idem sur la pitch quote — remplacer le border-left par un guillemet typographique */
.batipro-page .bp-pitch-quote {
	border-left: 0;
	padding: 22px 28px;
	background: linear-gradient(180deg, rgba(245,239,228,.7), rgba(245,239,228,.3));
	border-radius: var(--radius);
	position: relative;
	margin: 28px 0;
}
.batipro-page .bp-pitch-quote::before {
	content: "\201C";
	position: absolute;
	top: -2px; left: 18px;
	font-family: var(--ff-serif);
	font-size: 56px;
	color: var(--c-ocre);
	line-height: 1;
}

/* ---------- 4. Line-length cap (impeccable) ---------- */
.batipro-page .bp-prose,
.batipro-page .bp-prose p {
	max-width: 68ch;
}
.batipro-page .bp-pitch-prose p {
	max-width: 60ch;
}
.batipro-page .bp-page-hero-lead,
.batipro-page .bp-hero-sub {
	max-width: 60ch;
}

/* ---------- 5. Hierarchy contrast (impeccable : ≥1.25 ratio entre steps) ---------- */
.batipro-page h1 { font-weight: 900; }
.batipro-page h2 { font-weight: 800; }
.batipro-page h3 { font-weight: 700; }
.batipro-page h4 { font-weight: 700; }

/* ---------- 6. Focus-visible polish (accessibilité non-négociable) ---------- */
.batipro-page a:focus-visible,
.batipro-page button:focus-visible,
.batipro-page summary:focus-visible {
	outline: 3px solid rgba(217, 119, 6, .55);
	outline-offset: 3px;
	border-radius: 4px;
}
.batipro-page input:focus-visible,
.batipro-page textarea:focus-visible,
.batipro-page select:focus-visible {
	outline: 3px solid rgba(217, 119, 6, .35);
	outline-offset: 0;
}

/* ---------- 7. Selection (touch détaillé) ---------- */
.batipro-page ::selection {
	background: rgba(245, 158, 11, .28);
	color: var(--c-ink);
}

/* ---------- 8. Scrollbar style (Webkit + Firefox) ---------- */
.batipro-page * {
	scrollbar-width: thin;
	scrollbar-color: var(--c-ocre) var(--c-cream);
}
.batipro-page *::-webkit-scrollbar { width: 10px; height: 10px; }
.batipro-page *::-webkit-scrollbar-track { background: var(--c-cream); }
.batipro-page *::-webkit-scrollbar-thumb {
	background: var(--c-line);
	border-radius: 999px;
	border: 2px solid var(--c-cream);
}
.batipro-page *::-webkit-scrollbar-thumb:hover { background: var(--c-ocre); }

/* ---------- 9. Visited links (état rarement géré) ---------- */
.batipro-page .bp-prose a:visited,
.batipro-page .bp-blog-card-readlink:visited { color: var(--c-blue); }

/* ---------- 10. Print styles (souvent oublié) ---------- */
@media print {
	.batipro-page .bp-navbar,
	.batipro-page .bp-cookie-banner,
	.batipro-page .bp-marquee,
	.batipro-page .bp-showreel-section,
	.batipro-page .bp-page-cta,
	.batipro-page .bp-cta-final,
	.batipro-page .bp-bonus-banner,
	.batipro-page .bp-pro-teaser { display: none; }
	.batipro-page { background: #fff; color: #000; }
	.batipro-page a { color: #000; text-decoration: underline; }
	.batipro-page .bp-prose { max-width: 100%; }
	.batipro-page h1, .batipro-page h2, .batipro-page h3 { page-break-after: avoid; }
	.batipro-page p, .batipro-page li { orphans: 3; widows: 3; }
}

/* ---------- 11. Réduction des animations en cas de connexion lente / save-data ---------- */
@media (prefers-reduced-data: reduce) {
	.batipro-page .bp-marquee-track,
	.batipro-page .bp-showreel-track,
	.batipro-page .bp-hv-search-phone,
	.batipro-page .bp-hv-stat,
	.batipro-page .bp-hv-notif,
	.batipro-page .bp-hv-notif-dot { animation: none; }
}

/* ---------- 12. Nav links underline progressif (sub-pixel polish) ---------- */
.bp-nav-links a:not(.btn) {
	transition: color 200ms cubic-bezier(.25,1,.5,1);
}
.bp-nav-links a:not(.btn)::after {
	transition: right 280ms cubic-bezier(.19,1,.22,1);
}

/* ---------- 13. Improved CTA active feedback (haptic-like) ---------- */
.batipro-page .btn-cta:active {
	transform: translateY(1px) scale(.985);
	box-shadow:
		0 1px 0 rgba(255,255,255,.18) inset,
		0 2px 6px rgba(217,119,6,.20);
	transition-duration: 80ms;
}

/* ---------- 14. Form inputs : meilleur contraste sur erreur (souvent oublié) ---------- */
.batipro-page input:invalid:not(:placeholder-shown),
.batipro-page textarea:invalid:not(:placeholder-shown) {
	border-color: var(--c-error);
	box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}
.batipro-page input:valid:not(:placeholder-shown),
.batipro-page textarea:valid:not(:placeholder-shown) {
	border-color: var(--c-success);
}

/* ---------- 15. Skeleton loader pour les transitions de page (utile en WP avec barba ou turbo) ---------- */
.bp-skeleton {
	background: linear-gradient(90deg,
		rgba(0,0,0,0.04) 0%,
		rgba(0,0,0,0.08) 50%,
		rgba(0,0,0,0.04) 100%);
	background-size: 200% 100%;
	animation: bpSkel 1.6s ease-in-out infinite;
	border-radius: 6px;
}
@keyframes bpSkel { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
	.bp-skeleton { animation: none; background: rgba(0,0,0,0.06); }
}

/* ---------- 16. Anti aliasing quality (fonts spéciales serif) ---------- */
.batipro-page em,
.batipro-page .italic-serif,
.batipro-page blockquote,
.batipro-page .bp-pitch-quote {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

/* ---------- Testimonial avatar with photo ---------- */
.batipro-page .bp-testi-avatar--photo {
	overflow: hidden;
	background: var(--c-cream);
	box-shadow: 0 2px 8px rgba(11,29,58,.12);
}
.batipro-page .bp-testi-avatar--photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
}

/* ---------- 17. Dark mode preference (fallback minimal) ----------
   On ne propose pas un vrai dark mode (DESIGN.md le déconseille),
   mais on respecte un peu la préférence pour les ombres / contrastes. */
@media (prefers-color-scheme: dark) {
	/* Ombres plus subtiles en dark préférée pour ne pas blinder */
	.batipro-page {
		--shadow-sm: 0 1px 2px rgba(11,29,58,.10), 0 1px 3px rgba(11,29,58,.12);
		--shadow:    0 4px 12px rgba(11,29,58,.14), 0 2px 6px rgba(11,29,58,.10);
		--shadow-lg: 0 18px 50px rgba(11,29,58,.30), 0 4px 14px rgba(11,29,58,.14);
	}
}
