/*
 * Fichier : /assets/css/village-pages.css
 * Scènes 3D des pages internes. Elles sont ajoutées par village-scenes.js ;
 * sans html.vl-3d, les pages restent telles quelles.
 */
.vl-progres { position: fixed; top: 0; left: 0; z-index: 2000; width: 100%; height: 4px; background: #FFC86B; transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
.village-vue { display: none; position: relative; }
.vl-3d .village-vue { display: block; }
.village-vue canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* La route, juste sous le haut de page */
.vl-3d .village-vue--route { height: 210px; overflow: hidden; background: linear-gradient(#0C1A2E, #33486B 52%, #C97E5E 88%, #E9A36D) !important; }

/* L'atelier de nuit dans le dernier appel à l'action */
html.vl-3d body .vp-final-cta { background: #0C1A2E !important; border-color: #2E4460 !important; }
html.vl-3d body .vp-final-cta :is(h2, h3, p) { color: #FFF4DF !important; }
html.vl-3d body .vp-final-cta .vp-kicker { color: #FFC86B !important; }
html.vl-3d body .vp-final-cta .vp-container { display: grid !important; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 32px; row-gap: 20px; align-items: center; }
html.vl-3d body .vp-final-cta .vp-container > .vp-button { grid-column: 1; grid-row: 2; justify-self: start; }
.vl-3d .vp-final-cta .village-vue--nuit { grid-column: 2; grid-row: 1 / span 2; height: 320px; }

@media (max-width: 767px) {
  .vl-3d .village-vue--route { display: none; }
}
@media (max-width: 900px) {
  html.vl-3d body .vp-final-cta .vp-container { grid-template-columns: minmax(0, 1fr); }
  .vl-3d .vp-final-cta .village-vue--nuit { grid-column: 1; grid-row: 3; height: 240px; }
}
@media (prefers-reduced-motion: reduce) { .vl-progres { display: none; } }

/* Thèmes clair et sombre : blocs du haut de page, tous en panneau nuit */
html:root:root:root body main :is(.vp-choice-cards, .vp-handoff, .vp-local-preview, .vp-quote-brief) { background: #13263F !important; background-image: none !important; border-color: #2E4460 !important; }
html:root:root:root body main :is(.vp-choice-cards article, .vp-handoff > div, .vp-local-preview__search, .vp-local-preview__card) { background: #0C1A2E !important; background-image: none !important; border: 1px solid #2E4460 !important; }
html:root:root:root body main :is(.vp-choice-cards article.is-highlighted, .vp-handoff > div:last-of-type) { border-color: #FFC86B !important; }
html:root:root:root body main :is(.vp-choice-cards, .vp-handoff, .vp-local-preview, .vp-quote-brief, .vp-price-poster) :is(h2, h3, p, span, strong, small, b, li, div) { color: #FFF4DF !important; }
html:root:root:root body main .vp-local-preview__card span { background: #FFC86B !important; color: #12252F !important; }
html:root:root:root body main .vp-quote-brief div > span { background: #FFC86B !important; color: #12252F !important; }
html:root:root:root body main .vp-handoff > b { color: #FFC86B !important; }

/* Console du plombier : texte foncé sur l'or */
html:root:root:root body main .dispatch-request--urgent :is(span, small, b) { color: #12252F !important; }
html:root:root:root body main .dispatch-request--urgent > span { background: rgba(18, 37, 47, .12) !important; }
html:root:root:root body main .dispatch-request--urgent > strong { background: #12252F !important; color: #FFF4DF !important; }
html:root:root:root body main .dispatch-request:not(.dispatch-request--urgent) > strong { color: #12252F !important; }

/* Étiquettes posées sur des images */
html:root:root:root body main .case-half :is(span, b), html:root:root:root body main .portfolio-feature__visual :is(span, strong) { display: inline-block; width: fit-content; padding: 3px 9px; background: rgba(12, 26, 46, .8) !important; color: #FFF4DF !important; }

/* Cartes des formules */
html:root:root:root body main .vp-model-grid .is-highlighted .vp-text-link { color: #FFC86B !important; }
html:root:root:not([data-theme="dark"]) body main :is(.vp-model-grid article:not(.is-highlighted) > span, .vp-scope-card:not(.vp-scope-card--included) > span, .vp-responsibility-grid article:not(.is-highlighted) > span, .vp-managed-service-grid article > span, .vp-choice-profile-grid article:not(.is-highlighted) > span, .vp-local-benefits article > span, .circuit-spec-grid article > span) { color: #7A5310 !important; }
html:root:root:root body main :is(.vp-scope-card--included, .vp-responsibility-grid .is-highlighted, .vp-choice-profile-grid .is-highlighted) > span { color: #FFC86B !important; }

/* Petits libellés trop pâles */
html:root:root:root body main :is(.pt-chapter__index, .workshop-title span, .pt-story-group__copy > span, .legal-sidebar > p, .legal-update, .vp-faq-support span) { color: var(--vl-doux) !important; }
html body .vp-skip-link, html body .skip-link { background: #FFC86B !important; color: #12252F !important; }

/* Thème sombre : tableau comparatif sur téléphone, visuels et console */
html:root:root[data-theme="dark"] body main :is(table, thead, tbody, tr, th, td) { background: #13263F !important; color: #FFF4DF !important; }
html:root:root[data-theme="dark"] body main .vp-trade-demo-grid__visual { background: #13263F !important; }
html:root:root:root[data-theme="dark"] body main :is(.dispatch-request--urgent small, #_) { color: #12252F !important; }

/* Retire le morceau de ruban décoratif, illisible sur le panneau nuit */
html:root:root:root body main :is(.vp-choice-cards, .vp-handoff, .vp-local-preview, .vp-quote-brief)::before, html:root:root:root body main :is(.vp-choice-cards, .vp-handoff, .vp-local-preview, .vp-quote-brief)::after { content: none !important; }
