/*
Theme Name: Bizbeecar
Theme URI: https://bizbeecar.fr/
Author: Bizbeecar
Description: Thème bloc du site vitrine Bizbeecar — location d'utilitaires de seconde vie pour les professionnels.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
License: Propriétaire
Text Domain: bizbeecar
*/

/*
 * Les couleurs, tailles de texte et espacements sont définis dans theme.json :
 * ce fichier ne contient que ce que theme.json ne sait pas exprimer
 * (motifs, compteurs, mises en page de sections). Toujours passer par les
 * variables --wp--preset--* plutôt que par des valeurs en dur.
 */

:root {
	--bzb-filet: 4px; /* épaisseur du filet orange qui sépare en-tête, sections et pied de page */
	--bzb-rayon: 10px;
	--bzb-ombre: 0 1px 2px rgb(27 27 25 / 6%), 0 12px 32px -12px rgb(27 27 25 / 18%);
	--bzb-section: clamp(4rem, 9vw, 7.5rem);
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 96px;
}

h1,
h2,
h3 {
	font-stretch: 112%;
	text-wrap: balance;
}

h3 {
	font-stretch: 104%;
}

/*
 * Dans un titre, le gras sert de surlignage de marque : un coup de feutre
 * orange sur fond clair (l'orange en texte y serait illisible), le texte
 * orange sur fond sombre, blanc sur fond orange.
 */
:is(h1, h2) strong {
	font-weight: inherit;
	background: linear-gradient(transparent 60%, rgb(255 156 6 / 80%) 60%, rgb(255 156 6 / 80%) 90%, transparent 90%);
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	padding: 0 0.06em;
}

:is(.is-style-bzb-sombre, .is-style-bzb-orange) :is(h1, h2) strong {
	background: none;
	padding: 0;
}

p {
	text-wrap: pretty;
}

:focus-visible {
	outline: 3px solid var(--wp--preset--color--orange);
	outline-offset: 3px;
}

/* ------------------------------------------------------------------ *
 * Sections : styles de groupe sélectionnables dans l'éditeur
 * ------------------------------------------------------------------ */

.wp-block-group:is(.is-style-bzb-sombre, .is-style-bzb-creme, .is-style-bzb-orange, .is-style-bzb-section) {
	padding-top: var(--bzb-section);
	padding-bottom: var(--bzb-section);
}

.is-style-bzb-sombre {
	background: var(--wp--preset--color--encre);
	color: var(--wp--preset--color--creme);
}

.is-style-bzb-sombre :is(h1, h2, h3, h4) {
	color: var(--wp--preset--color--blanc);
}

.is-style-bzb-sombre :is(h1, h2) strong,
.is-style-bzb-sombre .bzb-surtitre {
	color: var(--wp--preset--color--orange);
}

.is-style-bzb-sombre a:not(.wp-element-button) {
	color: var(--wp--preset--color--orange);
}

.is-style-bzb-creme {
	background: var(--wp--preset--color--creme);
}

.is-style-bzb-orange {
	background: var(--wp--preset--color--orange);
	color: var(--wp--preset--color--encre);
}

.is-style-bzb-orange :is(h1, h2) strong {
	color: var(--wp--preset--color--blanc);
}

.is-style-bzb-orange .wp-block-button:not(.is-style-outline) .wp-element-button {
	background: var(--wp--preset--color--encre);
	color: var(--wp--preset--color--blanc);
}

.is-style-bzb-orange .wp-block-button:not(.is-style-outline) .wp-element-button:hover {
	background: var(--wp--preset--color--anthracite);
}

.is-style-bzb-orange .is-style-outline .wp-element-button {
	border-color: var(--wp--preset--color--encre);
	color: var(--wp--preset--color--encre);
}

.is-style-bzb-orange .is-style-outline .wp-element-button:hover {
	background: var(--wp--preset--color--encre);
	color: var(--wp--preset--color--blanc);
}

.is-style-bzb-sombre .is-style-outline .wp-element-button {
	border-color: var(--wp--preset--color--creme);
	color: var(--wp--preset--color--creme);
}

.is-style-bzb-sombre .is-style-outline .wp-element-button:hover {
	background: var(--wp--preset--color--creme);
	color: var(--wp--preset--color--encre);
}

/* Carte : fond blanc, filet, ombre légère */
.is-style-bzb-carte {
	background: var(--wp--preset--color--blanc);
	color: var(--wp--preset--color--encre);
	border: 1px solid var(--wp--preset--color--filet);
	border-radius: var(--bzb-rayon);
	box-shadow: var(--bzb-ombre);
	padding: clamp(1.5rem, 3vw, 2.25rem);
}

.is-style-bzb-carte :is(h2, h3) {
	color: var(--wp--preset--color--encre);
}

/* Filet orange uni de séparation (en-tête, en-têtes de pages, héros, pied de page) */
.bzb-filet-haut,
.bzb-filet-bas {
	position: relative;
}

.bzb-filet-haut::before,
.bzb-filet-bas::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: var(--bzb-filet);
	background: var(--wp--preset--color--orange);
}

.bzb-filet-haut::before {
	top: 0;
}

.bzb-filet-bas::after {
	bottom: 0;
}

/* ------------------------------------------------------------------ *
 * Éléments de texte
 * ------------------------------------------------------------------ */

.bzb-surtitre {
	display: flex; /* bloc : s’aligne sur la colonne de contenu comme les titres */
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
	color: var(--wp--preset--color--orange-fonce);
	font-size: var(--wp--preset--font-size--petit);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.bzb-surtitre::before {
	content: "";
	flex: none;
	width: 24px;
	height: 3px;
	border-radius: 2px;
	background: var(--wp--preset--color--orange);
}

.bzb-chapo {
	max-width: 62ch;
	font-size: var(--wp--preset--font-size--moyen);
	line-height: 1.55;
}

.is-style-bzb-sombre .bzb-chapo {
	color: rgb(247 244 238 / 82%);
}

.bzb-note {
	color: var(--wp--preset--color--gris);
	font-size: var(--wp--preset--font-size--petit);
}

.is-style-bzb-sombre .bzb-note {
	color: rgb(247 244 238 / 60%);
}

/* Liste à coches */
.wp-block-list.bzb-coches {
	list-style: none;
	padding-left: 0;
}

.wp-block-list.bzb-coches li {
	position: relative;
	padding-left: 1.9rem;
	margin-bottom: 0.55rem;
}

.wp-block-list.bzb-coches li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 1.15rem;
	height: 1.15rem;
	border-radius: 50%;
	background: var(--wp--preset--color--orange)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%231b1b19' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
		center / 80% no-repeat;
}

.wp-block-list.bzb-coches.bzb-en-ligne {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.75rem;
}

.wp-block-list.bzb-coches.bzb-en-ligne li {
	margin-bottom: 0;
	font-weight: 600;
}

/* ------------------------------------------------------------------ *
 * En-tête
 * ------------------------------------------------------------------ */

.bzb-entete {
	position: sticky;
	top: 0;
	z-index: 50;
	padding-top: var(--bzb-filet); /* place pour le filet orange */
	/*
	 * Fond opaque, sans backdrop-filter : un flou (comme un transform) sur cet
	 * ancêtre emprisonnerait le menu mobile plein écran (position: fixed) dans
	 * les 84 px de l'en-tête.
	 */
	background: var(--wp--preset--color--blanc);
	border-bottom: 1px solid var(--wp--preset--color--filet);
}

.admin-bar .bzb-entete {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.bzb-entete__barre {
	min-height: 76px;
	gap: 1.5rem;
}

.bzb-logo {
	margin: 0;
	flex: none;
}

/* Le slogan sous le nom alourdit le bas du logo : on le recentre à l'œil, pas au pixel */
.bzb-entete .bzb-logo {
	transform: translateY(4px);
}

.bzb-logo img {
	display: block;
	width: clamp(150px, 16vw, 188px);
	height: auto;
	aspect-ratio: 3885 / 944;
}

.bzb-nav {
	font-size: 0.97rem;
	font-weight: 600;
}

.bzb-nav .wp-block-navigation-item__content {
	position: relative;
	padding: 0.4rem 0;
	color: var(--wp--preset--color--encre);
	text-decoration: none;
}

.bzb-nav .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: var(--wp--preset--color--orange);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.2s ease;
}

.bzb-nav .wp-block-navigation-item__content:hover::after,
.bzb-nav .current-menu-item > .wp-block-navigation-item__content::after {
	transform: scaleX(1);
}

.bzb-entete__actions {
	gap: 1.25rem;
}

.bzb-lien-discret {
	margin: 0;
	font-size: 0.92rem;
	font-weight: 600;
	white-space: nowrap;
}

.bzb-lien-discret a {
	color: var(--wp--preset--color--gris);
	text-decoration: none;
}

.bzb-lien-discret a:hover {
	color: var(--wp--preset--color--encre);
}

.bzb-entete .wp-block-button .wp-element-button {
	padding: 0.7rem 1.15rem;
	font-size: 0.95rem;
	white-space: nowrap;
}

@media (max-width: 1080px) {
	.bzb-entete .bzb-lien-discret {
		display: none;
	}
}

/* Sur téléphone, le bouton reste : c'est le seul accès à la page de devis depuis l'en-tête */
@media (max-width: 600px) {
	.bzb-entete__barre {
		gap: 0.75rem;
	}

	.bzb-entete__actions {
		gap: 0.85rem;
	}

	.bzb-entete .bzb-logo img {
		width: 124px;
	}

	.bzb-entete .wp-block-button .wp-element-button {
		padding: 0.55rem 0.75rem;
		font-size: 0.85rem;
	}
}

@media (max-width: 360px) {
	.bzb-entete .bzb-logo img {
		width: 104px;
	}

	.bzb-entete .wp-block-button .wp-element-button {
		padding: 0.5rem 0.6rem;
		font-size: 0.8rem;
	}
}

/*
 * Menu mobile plein écran. Sélecteur volontairement plus spécifique que celui
 * de WordPress (.wp-block-navigation:not(.has-background) …), qui impose sinon
 * un fond blanc… sous des liens blancs.
 */
.wp-block-navigation.bzb-nav:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.5rem;
	background: var(--wp--preset--color--encre);
	color: var(--wp--preset--color--blanc);
}

.wp-block-navigation.bzb-nav .is-menu-open .wp-block-navigation-item__content {
	color: var(--wp--preset--color--blanc);
	font-size: 1.6rem;
	font-weight: 700;
	font-stretch: 110%;
}

.wp-block-navigation.bzb-nav .is-menu-open .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--orange);
}

/* ------------------------------------------------------------------ *
 * Accueil : héros (bloc Couverture, photo du fourgon en fond)
 * ------------------------------------------------------------------ */

.wp-block-cover.bzb-heros {
	padding-top: clamp(3rem, 7vw, 5rem);
	padding-bottom: clamp(3.5rem, 7vw, 5.5rem);
	color: var(--wp--preset--color--creme);
}

/* Voile : sombre sous le texte à gauche, clair à droite où roule le fourgon */
.bzb-heros .wp-block-cover__background {
	opacity: 1 !important;
	background: linear-gradient(
		90deg,
		rgb(27 27 25 / 65%) 0%,
		rgb(27 27 25 / 40%) 30%,
		rgb(27 27 25 / 0%) 55%
	) !important;
}

/* Bloc de texte aligné sur la colonne de contenu, limité à gauche du fourgon */
.is-layout-constrained > .bzb-heros__texte {
	max-width: 620px;
	margin-left: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
	margin-right: auto !important;
}

.bzb-heros .wp-block-buttons {
	margin-top: 2rem;
}

/* Voile léger : une ombre portée diffuse garde le texte lisible sur la photo */
.bzb-heros__texte :is(h1, p, li) {
	text-shadow: 0 1px 2px rgb(0 0 0 / 55%), 0 2px 18px rgb(0 0 0 / 45%);
}

.bzb-heros .is-style-outline .wp-element-button {
	border-color: var(--wp--preset--color--creme);
	color: var(--wp--preset--color--creme);
}

.bzb-heros .is-style-outline .wp-element-button:hover {
	background: var(--wp--preset--color--creme);
	color: var(--wp--preset--color--encre);
}

.bzb-heros h1 {
	margin-top: 0;
	color: var(--wp--preset--color--blanc);
}

.bzb-heros h1 strong {
	color: var(--wp--preset--color--orange);
	background: none;
	padding: 0;
}

.bzb-heros .bzb-surtitre {
	color: var(--wp--preset--color--orange);
}

.bzb-heros .bzb-chapo {
	color: rgb(247 244 238 / 88%);
}

.bzb-heros .bzb-coches {
	margin-top: 1.75rem;
	color: var(--wp--preset--color--blanc);
}

.bzb-heros .bzb-coches li::before {
	top: 0.2em;
}

@media (max-width: 781px) {
	.bzb-heros .wp-block-cover__background {
		background: rgb(27 27 25 / 55%) !important;
	}
}

.bzb-heros__colonnes {
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
}

/* ------------------------------------------------------------------ *
 * Pied de page : les 4 véhicules « roulent » sur le bas de chaque page
 * ------------------------------------------------------------------ */

/* Pas de marge : le haut transparent de l'image fait déjà l'espace au-dessus des véhicules */
.bzb-bandeau {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

.bzb-bandeau img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 2667 / 300;
	min-height: 72px;
	object-fit: cover;
	object-position: 82% 100%;
}

/* ------------------------------------------------------------------ *
 * Bande de chiffres clés
 * ------------------------------------------------------------------ */

.bzb-chiffres-section {
	padding-top: clamp(1rem, 2vw, 1.75rem) !important;
	padding-bottom: clamp(1rem, 2vw, 1.75rem) !important;
}

/*
 * Nombre de colonnes fixé par palier (4, 2, puis 1) plutôt que laissé à la
 * grille automatique : les filets séparateurs dépendent de la position de
 * chaque chiffre, qu'il faut donc connaître.
 */
.bzb-chiffres {
	gap: 0 !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

/* Chaque chiffre centré dans sa colonne, entre les filets */
.bzb-chiffres > .wp-block-group {
	padding: 0.5rem clamp(1rem, 2.5vw, 2rem);
	border-left: 2px solid rgb(27 27 25 / 18%);
	text-align: center;
}

.bzb-chiffres > .wp-block-group:first-child {
	border-left: 0;
}

/* 2 × 2 : filet vertical au milieu, filet horizontal entre les deux lignes */
@media (max-width: 960px) {
	.bzb-chiffres {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	.bzb-chiffres > .wp-block-group {
		padding: 0.85rem 1rem;
	}

	.bzb-chiffres > .wp-block-group:nth-child(odd) {
		border-left: 0;
	}

	.bzb-chiffres > .wp-block-group:nth-child(n + 3) {
		border-top: 2px solid rgb(27 27 25 / 18%);
	}
}

/* Une colonne : filet au-dessus de chaque chiffre sauf le premier */
@media (max-width: 480px) {
	.bzb-chiffres {
		grid-template-columns: minmax(0, 1fr) !important;
	}

	.bzb-chiffres > .wp-block-group {
		border-left: 0;
		padding: 0.85rem 0;
	}

	.bzb-chiffres > .wp-block-group + .wp-block-group {
		border-top: 2px solid rgb(27 27 25 / 18%);
	}
}

.bzb-chiffre {
	margin: 0;
	font-size: clamp(1.75rem, 2.5vw, 2.3rem);
	font-weight: 850;
	font-stretch: 104%;
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.bzb-chiffre-legende {
	margin: 0.35rem 0 0;
	font-size: var(--wp--preset--font-size--petit);
	font-weight: 600;
	line-height: 1.4;
}

/* ------------------------------------------------------------------ *
 * Cartes numérotées (avantages, étapes)
 * ------------------------------------------------------------------ */

.bzb-numerote {
	counter-reset: bzb-numero;
}

.bzb-numerote > .wp-block-group {
	counter-increment: bzb-numero;
	position: relative;
}

.bzb-numerote > .wp-block-group::before {
	content: counter(bzb-numero, decimal-leading-zero);
	display: block;
	margin-bottom: 1.25rem;
	color: var(--wp--preset--color--orange);
	font-size: 3.25rem;
	font-weight: 900;
	font-stretch: 125%;
	line-height: 1;
	letter-spacing: -0.03em;
}

.is-style-bzb-creme .bzb-numerote > .wp-block-group::before,
.bzb-numerote > .is-style-bzb-carte::before {
	-webkit-text-stroke: 1.5px var(--wp--preset--color--orange-fonce);
	color: transparent;
}

.bzb-numerote :is(h3, h4) {
	margin-top: 0;
}

.bzb-numerote p:last-child {
	margin-bottom: 0;
}

/* Étapes : reliées par un filet pointillé sur grand écran */
.bzb-etapes > .wp-block-group {
	padding-top: 1.75rem;
	border-top: 2px dashed rgb(247 244 238 / 25%);
}

/* ------------------------------------------------------------------ *
 * Flotte
 * ------------------------------------------------------------------ */

.bzb-vehicule {
	display: flex;
	flex-direction: column;
	container-type: inline-size; /* le nom du modèle se dimensionne sur la carte */
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.bzb-vehicule:hover {
	transform: translateY(-4px);
	border-color: var(--wp--preset--color--orange);
	box-shadow: 0 1px 2px rgb(27 27 25 / 6%), 0 22px 40px -18px rgb(27 27 25 / 30%);
}

.bzb-vehicule .bzb-surtitre {
	margin-bottom: 0.25rem;
}

/* « Renault Kangoo » tient sur une ligne quelle que soit la largeur de la carte */
.bzb-vehicule h3 {
	margin: 0;
	font-size: min(var(--wp--preset--font-size--grand), 10.5cqi);
	font-stretch: 100%;
	white-space: nowrap;
}

.bzb-vehicule .bzb-note {
	margin-top: 0.15rem;
}

.bzb-volume {
	margin: 1.25rem 0 1rem;
	padding: 0.85rem 0;
	border-top: 1px solid var(--wp--preset--color--filet);
	border-bottom: 1px solid var(--wp--preset--color--filet);
	font-size: 2.4rem;
	font-weight: 850;
	font-stretch: 120%;
	line-height: 1;
	letter-spacing: -0.02em;
}

.bzb-volume::after {
	content: "de chargement";
	display: block;
	margin-top: 0.4rem;
	color: var(--wp--preset--color--gris);
	font-size: 0.85rem;
	font-weight: 600;
	font-stretch: 100%;
	letter-spacing: 0;
}

.bzb-vehicule .wp-block-list {
	margin: 0;
	padding-left: 0;
	list-style: none;
}

.bzb-vehicule .wp-block-list li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.4rem 0;
	border-bottom: 1px dashed var(--wp--preset--color--filet);
	font-size: 0.95rem;
}

.bzb-vehicule .wp-block-list li strong {
	text-align: right;
}

.bzb-vehicule .bzb-equipements {
	margin-top: auto;
	padding-top: 1rem;
	color: var(--wp--preset--color--gris);
	font-size: var(--wp--preset--font-size--petit);
}

/* ------------------------------------------------------------------ *
 * Témoignages
 * ------------------------------------------------------------------ */

.bzb-temoignage {
	margin: 0;
	padding: clamp(1.75rem, 3.5vw, 2.75rem);
	border: 0;
	border-radius: var(--bzb-rayon);
	background: var(--wp--preset--color--blanc);
	box-shadow: var(--bzb-ombre);
	position: relative;
}

.bzb-temoignage::before {
	content: "“";
	position: absolute;
	top: -0.15em;
	right: 0.35em;
	color: var(--wp--preset--color--orange);
	font-size: 7rem;
	font-weight: 900;
	line-height: 1;
}

.bzb-temoignage p {
	font-size: var(--wp--preset--font-size--moyen);
	font-weight: 500;
	line-height: 1.55;
}

.bzb-temoignage cite {
	display: block;
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--filet);
	color: var(--wp--preset--color--gris);
	font-size: var(--wp--preset--font-size--petit);
	font-style: normal;
}

.bzb-temoignage cite strong {
	display: block;
	color: var(--wp--preset--color--encre);
	font-size: 1rem;
}

/* ------------------------------------------------------------------ *
 * En-tête de page intérieure
 * ------------------------------------------------------------------ */

.bzb-entete-page {
	padding-top: clamp(3.5rem, 8vw, 6rem) !important;
	padding-bottom: clamp(3.5rem, 8vw, 6rem) !important;
}

.bzb-entete-page h1 {
	margin-top: 0;
	max-width: 20ch;
}

/* ------------------------------------------------------------------ *
 * Tableaux, FAQ, texte long
 * ------------------------------------------------------------------ */

.wp-block-table.bzb-tableau table {
	border-collapse: collapse;
	width: 100%;
	background: var(--wp--preset--color--blanc);
	border-radius: var(--bzb-rayon);
	overflow: hidden;
	box-shadow: var(--bzb-ombre);
}

.wp-block-table.bzb-tableau :is(th, td) {
	padding: 1rem 1.25rem;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--filet);
	text-align: left;
	vertical-align: top;
}

.wp-block-table.bzb-tableau thead th {
	background: var(--wp--preset--color--encre);
	color: var(--wp--preset--color--blanc);
	font-weight: 700;
	border-bottom: 0;
}

.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--filet);
	padding: 0;
}

.wp-block-details summary {
	position: relative;
	padding: 1.35rem 3rem 1.35rem 0;
	font-size: 1.1rem;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "";
	position: absolute;
	right: 0.25rem;
	top: 50%;
	width: 1.6rem;
	height: 1.6rem;
	margin-top: -0.8rem;
	border-radius: 50%;
	background: var(--wp--preset--color--creme)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3.5v9M3.5 8h9' stroke='%231b1b19' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")
		center / 60% no-repeat;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.wp-block-details[open] summary::after {
	transform: rotate(45deg);
	background-color: var(--wp--preset--color--orange);
}

.wp-block-details summary:hover {
	color: var(--wp--preset--color--orange-fonce);
}

.wp-block-details > :not(summary) {
	max-width: 70ch;
	margin-top: 0;
	padding-bottom: 1.25rem;
	color: var(--wp--preset--color--gris);
}

.bzb-texte-long {
	max-width: 760px;
}


/* ------------------------------------------------------------------ *
 * Formulaire de rappel (extension bizbeecar-rappel)
 * ------------------------------------------------------------------ */

.bzb-form {
	display: grid;
	gap: 1rem;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	background: var(--wp--preset--color--blanc);
	color: var(--wp--preset--color--encre);
	border-radius: var(--bzb-rayon);
	box-shadow: 0 30px 60px -25px rgb(0 0 0 / 55%);
	border-top: 6px solid var(--wp--preset--color--orange);
}

.bzb-form__titre {
	margin: 0;
	color: var(--wp--preset--color--encre);
	font-size: var(--wp--preset--font-size--grand);
	font-weight: 800;
	font-stretch: 112%;
	line-height: 1.1;
}

.bzb-form__sous-titre {
	margin: -0.5rem 0 0.25rem;
	color: var(--wp--preset--color--gris);
	font-size: var(--wp--preset--font-size--petit);
}

.bzb-form__grille {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

@media (max-width: 520px) {
	.bzb-form__grille {
		grid-template-columns: 1fr;
	}
}

.bzb-form__champ {
	display: grid;
	gap: 0.35rem;
	margin: 0; /* ce sont des <p> : sans ça, leurs marges s'ajoutent à l'écart de la grille */
}

.bzb-form__champ--large {
	grid-column: 1 / -1;
}

.bzb-form label {
	font-size: 0.85rem;
	font-weight: 700;
}

.bzb-form label abbr {
	color: var(--wp--preset--color--orange-fonce);
	text-decoration: none;
}

.bzb-form :is(input, select, textarea) {
	width: 100%;
	box-sizing: border-box;
	padding: 0.75rem 0.85rem;
	border: 1.5px solid var(--wp--preset--color--filet);
	border-radius: 6px;
	background: var(--wp--preset--color--creme);
	color: var(--wp--preset--color--encre);
	font: inherit;
	font-size: 1rem;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.bzb-form :is(input, select, textarea):hover {
	border-color: #cfc8bb;
}

.bzb-form :is(input, select, textarea):focus {
	outline: none;
	border-color: var(--wp--preset--color--orange);
	background: var(--wp--preset--color--blanc);
	box-shadow: 0 0 0 3px rgb(255 156 6 / 25%);
}

.bzb-form textarea {
	min-height: 5.5rem;
	resize: vertical;
}

.bzb-form__envoyer {
	width: 100%;
	padding: 1rem 1.25rem;
	border: 0;
	border-radius: 6px;
	background: var(--wp--preset--color--orange);
	color: var(--wp--preset--color--encre);
	font: inherit;
	font-size: 1.05rem;
	font-weight: 800;
	font-stretch: 108%;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.bzb-form__envoyer:hover {
	background: var(--wp--preset--color--encre);
	color: var(--wp--preset--color--blanc);
}

.bzb-form__envoyer:active {
	transform: translateY(1px);
}

.bzb-form__mention {
	margin: 0;
	color: var(--wp--preset--color--gris);
	font-size: 0.8rem;
	line-height: 1.45;
}

.bzb-form__mention a {
	color: inherit;
}

.bzb-form__message {
	margin: 0;
	padding: 0.85rem 1rem;
	border-radius: 6px;
	font-weight: 600;
}

.bzb-form__message--ok {
	background: #e7f5ea;
	color: #1d5c2c;
}

.bzb-form__message--erreur {
	background: #fbe9e7;
	color: #8a2116;
}

.bzb-form__message ul {
	margin: 0.4rem 0 0;
	padding-left: 1.2rem;
	font-weight: 500;
}

/* Piège à robots : hors écran, jamais display:none (certains robots l'ignorent) */
.bzb-form__piege {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ------------------------------------------------------------------ *
 * Pied de page
 * ------------------------------------------------------------------ */

.bzb-pied {
	padding-top: clamp(2.5rem, 5vw, 3rem) !important;
	padding-bottom: 0 !important;
	font-size: 0.95rem;
}

.bzb-pied__colonnes {
	gap: clamp(2rem, 4vw, 3.5rem);
}

.bzb-pied .bzb-logo img {
	width: 190px;
	aspect-ratio: 3885 / 944;
}

.bzb-pied__titre {
	margin: 0 0 1rem;
	color: var(--wp--preset--color--orange);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.bzb-pied .wp-block-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bzb-pied .wp-block-list li {
	margin-bottom: 0.55rem;
}

.bzb-pied a:not(.wp-element-button) {
	color: rgb(247 244 238 / 78%);
	text-decoration: none;
	transition: color 0.15s ease;
}

.bzb-pied a:not(.wp-element-button):hover {
	color: var(--wp--preset--color--orange);
}

.bzb-pied :is(p, li) {
	color: rgb(247 244 238 / 78%);
}

/* Ligne légale sous les véhicules : la bande orange prolonge la route du bandeau */
.bzb-pied__legal {
	margin-top: 0 !important;
	padding-top: 0.85rem;
	padding-bottom: 1rem;
	background: var(--wp--preset--color--orange);
	font-size: 0.85rem;
}

.bzb-pied__legal .wp-block-group {
	gap: 0.35rem 1.5rem;
}

.bzb-pied__legal p {
	margin: 0;
	color: var(--wp--preset--color--encre);
}

.bzb-pied .bzb-pied__legal a:not(.wp-element-button) {
	color: var(--wp--preset--color--encre);
}

.bzb-pied .bzb-pied__legal a:not(.wp-element-button):hover {
	color: var(--wp--preset--color--encre);
	text-decoration: underline;
}

/* ------------------------------------------------------------------ *
 * Accessibilité : mouvement réduit
 * ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition: none !important;
	}
}

/* Modèle « Texte long » : respiration sous l'en-tête et avant le pied de page */
.bzb-texte-long-contenu {
	padding-bottom: var(--bzb-section);
}

.bzb-texte-long-contenu > .bzb-entete-page {
	margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.bzb-texte-long-contenu h2 {
	margin-top: 2.75rem;
	font-size: var(--wp--preset--font-size--grand);
}

.bzb-texte-long-contenu h3 {
	margin-top: 2rem;
	font-size: var(--wp--preset--font-size--moyen);
}

.bzb-texte-long-contenu table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--petit);
}

.bzb-texte-long-contenu :is(td, th) {
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--wp--preset--color--filet);
	vertical-align: top;
}

.bzb-texte-long-contenu :is(td, th) :is(h4, p) {
	margin: 0;
	font-size: inherit;
}

/* Les tableaux larges défilent dans leur cadre au lieu d'élargir la page */
.bzb-texte-long-contenu > table {
	display: block;
	overflow-x: auto;
}

/* ------------------------------------------------------------------ *
 * Ajustements de mise en page
 * ------------------------------------------------------------------ */

/* Dans une mise en page contrainte, les blocs à largeur limitée restent alignés à gauche. */
.is-layout-constrained > :is(.bzb-chapo, .bzb-entete-page h1) {
	margin-left: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
	margin-right: auto !important;
}

.bzb-chiffre {
	white-space: nowrap;
}

/* Les sections pleine largeur s'enchaînent sans l'espacement par défaut des blocs. */
.wp-site-blocks > * + *,
.wp-block-post-content > .alignfull + .alignfull,
.wp-block-post-content > .alignfull:first-child {
	margin-block-start: 0;
}

/* Le formulaire est une carte blanche, même posé sur une section sombre. */
.bzb-form .bzb-note {
	color: var(--wp--preset--color--gris);
	font-weight: 500;
}

/* ------------------------------------------------------------------ *
 * Logos clients : en gris, couleur au survol, tailles équilibrées
 * ------------------------------------------------------------------ */

.bzb-logos {
	align-items: center;
	gap: 1.75rem 2rem !important;
	padding: clamp(1.25rem, 3vw, 2rem) 0;
	border-top: 1px solid var(--wp--preset--color--filet);
	border-bottom: 1px solid var(--wp--preset--color--filet);
}

.bzb-logos .wp-block-image {
	margin: 0;
}

/* Hauteur ET largeur plafonnées : un logo très large ne domine pas un logo carré */
.bzb-logos img {
	display: block;
	width: auto;
	height: auto;
	max-height: 56px;
	max-width: 150px;
	filter: grayscale(1);
	opacity: 0.7;
	transition: filter 0.2s ease, opacity 0.2s ease;
}

.bzb-logos .wp-block-image:hover img {
	filter: none;
	opacity: 1;
}

@media (max-width: 600px) {
	.bzb-logos img {
		max-height: 44px;
		max-width: 130px;
	}
}

/* Photo du véhicule en tête de carte, à l'échelle de son gabarit (même ligne de sol) */
.bzb-vehicule__photo {
	margin: calc(-1 * clamp(1.5rem, 3vw, 2.25rem)) calc(-1 * clamp(1.5rem, 3vw, 2.25rem)) 1rem !important;
	border-radius: var(--bzb-rayon) var(--bzb-rayon) 0 0;
	overflow: hidden;
}

.bzb-vehicule__photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 640 / 380;
	transition: transform 0.35s ease;
}

.bzb-vehicule:hover .bzb-vehicule__photo img {
	transform: translateX(4px) scale(1.03);
}

/* ------------------------------------------------------------------ *
 * Animations (assets/js/animations.js). Tout est conditionné à la
 * classe .bzb-anim, absente si le visiteur réduit les animations ou
 * si le script ne se charge pas : le contenu reste alors visible.
 * ------------------------------------------------------------------ */

.bzb-anim .bzb-revele {
	opacity: 0;
	transform: translateY(24px);
	transition:
		opacity 0.6s ease-out var(--bzb-delai, 0ms),
		transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) var(--bzb-delai, 0ms);
}

.bzb-anim .bzb-revele.est-visible {
	opacity: 1;
	transform: none;
}

/* Les chiffres gardent la même largeur pendant qu'ils défilent */
.bzb-chiffre {
	font-variant-numeric: tabular-nums;
}

/*
 * Véhicules du pied de page : l'image glisse depuis la droite sur une
 * « route » peinte en CSS aux mêmes couleurs et hauteurs que celle de
 * l'image (bande sombre de 57 à 69 %, orange ensuite) : seuls les
 * véhicules semblent bouger.
 */
.bzb-anim .bzb-pied .bzb-bandeau {
	overflow: hidden;
	background: linear-gradient(
		to bottom,
		transparent 57%,
		#3d3d3d 57%,
		#3d3d3d 69%,
		#fe9c00 69%
	);
}

.bzb-anim .bzb-pied .bzb-bandeau img {
	transform: translateX(45%);
	transition: transform 1.8s cubic-bezier(0.16, 0.8, 0.3, 1);
}

.bzb-anim .bzb-pied .bzb-bandeau.est-visible img {
	transform: none;
}

/* ------------------------------------------------------------------ *
 * Accueil : héros + bande des chiffres occupent tout l'écran, la bande
 * orange collée en bas. Le héros prend la hauteur qui reste.
 * ------------------------------------------------------------------ */

:root {
	--bzb-hauteur-entete: 81px; /* filet orange 4 px + barre 76 px + bordure 1 px */
}

.bzb-ecran-accueil {
	display: flex;
	flex-direction: column;
	min-height: calc(100svh - var(--bzb-hauteur-entete) - var(--wp-admin--admin-bar--height, 0px));
}

.bzb-ecran-accueil > * {
	margin-block: 0 !important;
}

.bzb-ecran-accueil > .bzb-heros {
	flex: 1 0 auto;
	min-height: 0 !important; /* la hauteur vient de l'écran, pas des 680 px du bloc */
}

/* Sur les écrans peu hauts (portables), marges et titre se resserrent pour que tout tienne */
.bzb-ecran-accueil > .bzb-heros {
	padding-top: clamp(1.5rem, 7svh, 5rem);
	padding-bottom: clamp(1.75rem, 7svh, 5.5rem);
}

@media (min-width: 782px) and (max-height: 860px) {
	.bzb-ecran-accueil .bzb-heros h1 {
		font-size: clamp(2.4rem, 8svh, 4.9rem);
	}

	.bzb-ecran-accueil .bzb-heros .bzb-surtitre {
		margin-bottom: 0.5rem;
	}

	.bzb-ecran-accueil .bzb-heros .bzb-coches {
		margin-top: 1rem;
	}

	.bzb-ecran-accueil .bzb-heros .wp-block-buttons {
		margin-top: 1.25rem;
	}

	.bzb-ecran-accueil .bzb-chiffres-section {
		padding-top: 0.85rem !important;
		padding-bottom: 0.85rem !important;
	}
}

/* En-têtes de pages intérieures : fond beige, alvéoles orange en filigrane à droite */
.wp-block-group.bzb-entete-page {
	position: relative;
	overflow: hidden;
	background: var(--wp--preset--color--beige);
}

.bzb-entete-page::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16zM28 64l28 16v32M28 64L0 80v32' fill='none' stroke='%23ff9c06' stroke-width='1.5'/%3E%3C/svg%3E");
	background-size: 56px 97px;
	opacity: 0.6;
	mask-image: radial-gradient(ellipse 55% 100% at 90% 40%, #000 25%, transparent 75%);
	pointer-events: none;
}

.bzb-entete-page > * {
	position: relative;
}

/*
 * Bande d’appel au devis en fin de page : compacte, en beige comme les
 * en-têtes de pages (la page s’ouvre et se ferme sur le même fond). L’orange
 * est réservé au bouton. Pas de filet en bas : le pied de page a le sien.
 */
.wp-block-group.bzb-appel {
	background: var(--wp--preset--color--beige);
	padding-top: clamp(2.25rem, 4vw, 3rem);
	padding-bottom: clamp(2.25rem, 4vw, 3rem);
}
