/* ===== VOIREBAT : styles partagés (widgets Elementor V3 dans les boucles, animations) ===== */

/* --- Bande défilante (marquee) --- */
@keyframes vb-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.vb-marquee .vb-marquee-track { gap: 0; animation: vb-marquee 45s linear infinite; }
.vb-marquee .vb-marquee-group { padding-right: 64px; }
.vb-marquee:hover .vb-marquee-track { animation-play-state: paused; }
.vb-marquee-text-outline { color: transparent; -webkit-text-stroke: 1px #ACBCDC; }
@media (prefers-reduced-motion: reduce) { .vb-marquee .vb-marquee-track { animation: none; } }

/* --- Cartes réalisations --- */
.vb-real-card .elementor-widget-theme-post-featured-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; line-height: 0; }
.vb-real-card .elementor-widget-theme-post-featured-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.vb-real-card:hover .elementor-widget-theme-post-featured-image img { transform: scale(1.04); }
.vb-real-chip .elementor-widget-theme-post-excerpt { font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 700; line-height: 18.15px; letter-spacing: 1.54px; text-transform: uppercase; color: #11162D; }
.vb-real-info > .elementor-widget-theme-post-excerpt { font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: 700; line-height: 26.4px; letter-spacing: -0.48px; color: #FFFFFF; }
.vb-real-meta .elementor-widget-theme-post-excerpt { font-family: 'Public Sans', sans-serif; font-size: 15px; font-weight: 400; line-height: 24.75px; color: #CDD8EC; }
.vb-real-mosaic > :nth-child(1) { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.vb-real-mosaic > :nth-child(2) { grid-column: 3; grid-row: 1; }
.vb-real-mosaic > :nth-child(3) { grid-column: 4; grid-row: 1; }
.vb-real-mosaic > :nth-child(4) { grid-column: 3 / span 2; grid-row: 2; }
.vb-real-mosaic > :nth-child(1) .vb-real-info > .elementor-widget-theme-post-excerpt { font-size: 32px; line-height: 35.2px; letter-spacing: -0.64px; }
.vb-real-mosaic.is-filtered { grid-template-columns: repeat(3, 1fr); grid-template-rows: auto; }
.vb-real-mosaic.is-filtered > * { grid-column: auto !important; grid-row: auto !important; }
@media (max-width: 1024px) {
	.vb-real-mosaic > * { grid-column: auto !important; grid-row: auto !important; }
	.vb-real-mosaic > :nth-child(1) { grid-column: 1 / -1 !important; }
	.vb-real-mosaic.is-filtered { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
	.vb-real-mosaic > :nth-child(1) { grid-column: auto !important; }
	.vb-real-mosaic.is-filtered { grid-template-columns: 1fr; }
	.vb-real-info { padding: 24px; }
}

/* --- Filtre des réalisations --- */
.vb-filter-btn.is-active { background-color: #344074; border-color: #344074; }
.vb-filter-btn.is-active .vb-filter-btn-text { color: #FFFFFF; }

/* --- Cartes actualités --- */
.vb-news-card .elementor-widget-theme-post-featured-image { width: 100%; line-height: 0; }
.vb-news-card .elementor-widget-theme-post-featured-image img { display: block; width: 100%; height: 280px; object-fit: cover; }
.vb-news-meta > .elementor-widget-theme-post-excerpt:first-child { font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 700; line-height: 21.45px; letter-spacing: 1.56px; text-transform: uppercase; color: #475FA5; }
.vb-news-meta > .elementor-widget-theme-post-excerpt:last-child { font-family: 'Public Sans', sans-serif; font-size: 13px; font-weight: 400; line-height: 21.45px; color: #545A6C; text-transform: capitalize; }
.vb-news-body > .elementor-widget-theme-post-excerpt:nth-child(2) { font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: 700; line-height: 30px; letter-spacing: -0.48px; color: #11162D; }
.vb-news-body > .elementor-widget-theme-post-excerpt:nth-child(3) { font-family: 'Public Sans', sans-serif; font-size: 15px; font-weight: 400; line-height: 24.75px; color: #545A6C; }
.vb-news-body > a { margin-top: auto; }
@media (max-width: 767px) { .vb-news-card .elementor-widget-theme-post-featured-image img { height: 220px; } .vb-news-body { padding: 24px; } }

/* --- Pages réalisation / actualité : la fiche masque les champs vides --- */
.vb-fiche-item:has(.elementor-widget-theme-post-excerpt:empty) { display: none; }

/* =====================================================================
   RESPONSIVE (tablette ≤1024px, mobile ≤767px) — ajouté lors de l'audit UX mobile
   Les sélecteurs .elementor-element-XXXX ciblent des éléments fixes de l'entête
   (hors boucles) : 609ef94a = bouton devis, 1f3e7c3b = bloc « Appelez-nous »,
   55df2cc2 = groupe d'actions, 3875591a = barre supérieure.
   ===================================================================== */

/* Garde-fou : jamais de défilement horizontal de la page */
html, body { overflow-x: clip; }

/* Accessibilité : anneau de focus visible sur les éléments interactifs du thème */
.vb-burger:focus-visible, .vb-mm-link:focus-visible, .vb-mm-cta:focus-visible, .vb-mm-phone:focus-visible,
.vb-filter-btn:focus-visible, .vb-real-card:focus-visible { outline: 2px solid #344074; outline-offset: 2px; }

/* --- Entête : le bloc « Appelez-nous » disparaît sous 1280px pour éviter tout débordement --- */
@media (max-width: 1279px) { .elementor-element-1f3e7c3b { display: none; } }

/* --- Menu burger (≤1024px) : remplace le menu natif et le bouton devis de la barre --- */
.vb-burger { display: none; }
.vb-mobile-menu { display: none; }
@media (max-width: 1024px) {
	header .elementor-widget-nav-menu { display: none !important; }
	header .elementor-element-55df2cc2 { display: none !important; }
	.vb-burger {
		display: inline-flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0;
		width: 48px; height: 48px; padding: 0; margin: 0; cursor: pointer;
		background: #FFFFFF; border: 1px solid #D6DBE4; border-radius: 2px;
		transition: background-color .2s ease, border-color .2s ease;
	}
	.vb-burger:hover, .vb-burger[aria-expanded="true"] { background: #E6EBF6; border-color: #344074; }
	.vb-burger-lines { position: relative; display: block; width: 22px; height: 16px; }
	.vb-burger-lines i { position: absolute; left: 0; width: 22px; height: 2px; background: #344074; border-radius: 2px; transition: transform .25s ease, opacity .2s ease, top .25s ease; }
	.vb-burger-lines i:nth-child(1) { top: 0; }
	.vb-burger-lines i:nth-child(2) { top: 7px; }
	.vb-burger-lines i:nth-child(3) { top: 14px; }
	.vb-burger[aria-expanded="true"] .vb-burger-lines i:nth-child(1) { top: 7px; transform: rotate(45deg); }
	.vb-burger[aria-expanded="true"] .vb-burger-lines i:nth-child(2) { opacity: 0; }
	.vb-burger[aria-expanded="true"] .vb-burger-lines i:nth-child(3) { top: 7px; transform: rotate(-45deg); }

	.vb-mobile-menu {
		display: block; position: absolute; top: 100%; left: 0; right: 0; z-index: 9999;
		max-height: calc(100vh - 150px); overflow-y: auto; overscroll-behavior: contain;
		padding: 8px 24px 28px; background: #FFFFFF; border-top: 1px solid #D6DBE4;
		box-shadow: 0 28px 48px rgba(17, 22, 45, .18);
		animation: vb-mm-in .22s ease-out;
	}
	.vb-mobile-menu[hidden] { display: none !important; }
	.vb-mm-list { list-style: none; margin: 0; padding: 0; }
	.vb-mm-list li { margin: 0; padding: 0; }
	.vb-mm-link {
		position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 4px;
		font-family: 'Montserrat', sans-serif; font-size: 17px; font-weight: 600; color: #171C2D; text-decoration: none;
		border-bottom: 1px solid #EEF0F6;
	}
	.vb-mm-link::after { content: ""; width: 8px; height: 8px; border-top: 2px solid #ACBCDC; border-right: 2px solid #ACBCDC; transform: rotate(45deg); margin-right: 4px; }
	.vb-mm-link[aria-current="page"] { color: #344074; padding-left: 16px; }
	.vb-mm-link[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; background: #344074; }
	.vb-mm-cta {
		display: flex; align-items: center; justify-content: center; gap: 12px; height: 56px; margin-top: 24px;
		background: #344074; color: #FFFFFF; border-radius: 2px; text-decoration: none;
		font-family: 'Montserrat', sans-serif; font-size: 15px; font-weight: 700; letter-spacing: .6px;
	}
	.vb-mm-cta:hover { background: #11162D; color: #FFFFFF; }
	.vb-mm-cta svg { width: 16px; height: 16px; fill: currentColor; }
	.vb-mm-phone {
		display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; margin-top: 12px;
		font-family: 'Montserrat', sans-serif; font-size: 16px; font-weight: 700; color: #11162D; text-decoration: none;
		border: 1px solid #D6DBE4; border-radius: 2px;
	}
	.vb-mm-phone svg { width: 16px; height: 16px; fill: #344074; }
}
@keyframes vb-mm-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* --- Mobile (≤767px) --- */
@media (max-width: 767px) {
	/* Slider : flèches en bas de l'image pour ne plus recouvrir le texte */
	.elementor-element-644c953b, .elementor-element-36e1f49a { align-self: end !important; margin-bottom: 20px !important; }

	/* Chiffres clés : grille 2 × 2 compacte au lieu de 4 blocs empilés */
	.vb-stats-card { grid-template-columns: repeat(2, 1fr) !important; min-height: 0 !important; box-shadow: 0 18px 24px rgba(17, 22, 45, .18); }
	.vb-stats-card .vb-stat-item { padding: 28px 20px !important; border-right: 1px solid #D6DBE4 !important; border-bottom: 1px solid #D6DBE4 !important; }
	.vb-stats-card > :nth-child(2n) .vb-stat-item, .vb-stats-card > :nth-child(2n).vb-stat-item { border-right: 0 !important; }
	.vb-stats-card > :nth-child(n+3).vb-stat-item { border-bottom: 0 !important; }
	.vb-stats-card .vb-stat-bar { left: 20px !important; }
	.vb-stats-card .vb-stat-number { font-size: 36px !important; line-height: 40px !important; letter-spacing: -1px !important; }
	.vb-stats-card .vb-stat-label { font-size: 14px !important; line-height: 1.45 !important; padding-top: 8px !important; }

	/* Filtre des réalisations : une seule ligne défilante au doigt */
	.vb-services-head-col { min-width: 0; }
	.vb-filter-bar { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.vb-filter-bar::-webkit-scrollbar { display: none; }
	.vb-filter-btn { flex-shrink: 0; }

	/* Cartes réalisations plus compactes, titre de la grande carte ramené à la même taille */
	.vb-real-card { min-height: 300px; }
	.vb-real-mosaic > :nth-child(1) .vb-real-info > .elementor-widget-theme-post-excerpt { font-size: 24px; line-height: 26.4px; letter-spacing: -.48px; }

	/* Bande « Un projet ? » : téléphone qui ne déborde plus, boutons pleine largeur */
	.vb-cta-phone { font-size: 24px !important; line-height: 1.3 !important; white-space: normal !important; }
	.vb-cta-actions { flex-direction: column; align-items: stretch; }
	.vb-cta-btn, .vb-cta-btn-outline, .vb-hero-button { width: 100% !important; }
	.vb-cta-right { padding-top: 8px; }

	/* Respiration générale */
	.vb-about-list { gap: 20px; }
	.vb-news-body { padding: 24px; }
}

/* --- Cartes (métiers, réalisations, actualités) : alignées sur les titres de section ---
   Cause du décalage : chaque niveau d'une boucle Elementor (conteneur de la boucle, grille, élément)
   reçoit 10 px de marge intérieure par défaut. On les remet à zéro : les cartes occupent toute la
   largeur du contenu, sur la même ligne que les titres, et l'écart réel entre cartes est celui prévu. */
.elementor .e-collection-loop-base,
.elementor .e-collection-loop-layout-base,
.elementor .e-collection-loop-layout-base > .e-con { padding: 0 !important; }
@media (min-width: 768px) { .vb-services-grid { gap: 24px; } }
@media (max-width: 767px) {
	.vb-services-grid, .vb-real-grid, .vb-news-grid { gap: 16px; }
	.vb-service-card-body { padding: 24px 20px 28px !important; }
	.vb-service-card-badge { right: 20px !important; }
	.vb-service-card-title-wrap { padding-right: 56px !important; }
	.vb-news-body { padding: 24px 20px 28px !important; }
	.vb-real-info { padding: 24px 20px !important; }
}
