/*
Theme Name: VS Access
Theme URI: https://www.vs-access.fr
Author: Versus
Description: Thème sur mesure pour Versus – VS Access (travaux en hauteur, cordistes, maintenance et contrôle en zone d'accès difficile). Polices hébergées dans le thème (aucune requête vers Google), responsive, formulaire de contact protégé contre le spam.
Version: 2.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: vs-access
*/

/* ---------- Polices hébergées dans le thème (licence SIL OFL, voir assets/fonts) ---------- */
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }

/* ---------- Palette : orange du logo + acier ---------- */
:root {
	--vs-orange: #fd7d26;        /* orange du logo : fonds, barres, boutons */
	--vs-orange-hover: #e96a12;  /* survol des boutons */
	--vs-orange-text: #b34d08;   /* orange foncé pour le texte et les liens (lisible sur blanc) */
	--vs-orange-text-hover: #8a3a05;
	--vs-steel: #262a2e;         /* surfaces sombres */
	--vs-ink: #22262a;           /* texte */
	--vs-slate: #5b6770;         /* texte secondaire */
	--vs-mist: #eef1f3;          /* fonds clairs */
	--vs-line: #d3d9de;
	--vs-white: #fff;
	--vs-max: 1200px;
	--vs-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
	--vs-font: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 400 1.0625rem/1.65 var(--vs-font); color: var(--vs-ink); background: var(--vs-white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--vs-orange-text); text-underline-offset: 3px; }
a:hover { color: var(--vs-orange-text-hover); }
:focus-visible { outline: 3px solid var(--vs-orange-text); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--vs-display); font-weight: 700; color: var(--vs-steel); margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); line-height: 1; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.06; }
h3 { font-size: 1.55rem; line-height: 1.15; font-weight: 600; }
p { margin: 0 0 1.1em; }
.vs-wrap { width: min(100% - 2.5rem, var(--vs-max)); margin-inline: auto; }
.screen-reader-text { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 99; background: #fff; padding: .5rem 1rem; }

/* ---------- Boutons ---------- */
.btn, .vs-form button { display: inline-block; background: var(--vs-orange); color: var(--vs-ink); padding: .85rem 1.6rem; border: 2px solid var(--vs-orange); border-radius: 2px; font: 600 1rem var(--vs-font); text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s; }
.btn:hover, .vs-form button:hover { background: var(--vs-orange-hover); border-color: var(--vs-orange-hover); color: var(--vs-ink); }
.btn.ghost { background: transparent; border-color: #fff; color: #fff; }
.btn.ghost:hover { background: #fff; color: var(--vs-ink); }
.btn.dark { background: var(--vs-steel); border-color: var(--vs-steel); color: #fff; }
.btn.dark:hover { background: #000; border-color: #000; color: #fff; }

/* ---------- En-tête ---------- */
.vs-topbar { background: var(--vs-steel); color: #c9d0d6; font-size: .9rem; }
.vs-topbar .vs-wrap { display: flex; flex-wrap: wrap; gap: .25rem 1.8rem; justify-content: flex-end; padding: .45rem 0; }
.vs-topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.vs-topbar a:hover { color: var(--vs-orange); }
.vs-header { background: var(--vs-white); border-bottom: 1px solid var(--vs-line); position: sticky; top: 0; z-index: 50; }
.vs-header .vs-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 84px; }
.vs-logo img { width: 200px; height: auto; }
.vs-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; flex-wrap: wrap; }
.vs-nav a { display: block; padding: .7rem .85rem; color: var(--vs-ink); font-weight: 600; font-size: .98rem; text-decoration: none; box-shadow: inset 0 -3px 0 transparent; transition: box-shadow .2s; }
.vs-nav a:hover, .vs-nav .current-menu-item > a, .vs-nav .current_page_item > a { box-shadow: inset 0 -3px 0 var(--vs-orange); color: var(--vs-ink); }
.vs-burger { display: none; background: none; border: 2px solid var(--vs-steel); border-radius: 2px; padding: .45rem .8rem; font: 600 1rem var(--vs-font); cursor: pointer; }

/* ---------- Bandeau d'accueil (diaporama) ---------- */
.vs-hero { position: relative; background: var(--vs-steel); overflow: hidden; }
.vs-slide { display: none; align-items: center; min-height: clamp(440px, 54vw, 640px); }
.vs-slide.is-active { display: flex; animation: vsFade .6s ease both; }
.vs-slide .vs-wrap { color: #fff; padding: 3.5rem 0 5rem; }
.vs-slide-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.vs-slide-grid > div:first-child { position: relative; padding-left: clamp(1.5rem, 3vw, 2.4rem); }
/* le fil de corde : il se déroule quand la diapositive s'affiche */
.vs-slide-grid > div:first-child::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 0; width: 3px; background: var(--vs-orange); transform-origin: top; }
.vs-slide.is-active .vs-slide-grid > div:first-child::before { animation: vsRope 1s .1s ease-out both; }
.vs-slide-grid > div:first-child::after { content: ""; position: absolute; left: -7px; top: 0; width: 17px; height: 17px; border: 3px solid var(--vs-orange); border-radius: 50%; background: var(--vs-steel); }
.vs-slide h2 { color: #fff; font-size: clamp(2.5rem, 5.6vw, 4.5rem); line-height: .98; margin-bottom: .45em; }
.vs-slide p { max-width: 54ch; font-size: 1.15rem; color: #d3d9de; }
.vs-slide .btn { margin: .4rem .6rem .4rem 0; }
.vs-slide-photo { width: 100%; max-width: 560px; justify-self: end; aspect-ratio: 4 / 3; object-fit: cover; }
.vs-dots { position: absolute; left: 0; right: 0; bottom: 1.6rem; width: min(100% - 2.5rem, var(--vs-max)); margin-inline: auto; display: flex; gap: .5rem; }
.vs-dots button { width: 36px; height: 5px; border: 0; background: rgba(255, 255, 255, .35); padding: 0; cursor: pointer; }
.vs-dots button[aria-current="true"] { background: var(--vs-orange); }
@keyframes vsFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vsRope { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------- Sections ---------- */
.vs-section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.vs-section.alt { background: var(--vs-mist); }
.vs-section.dark { background: var(--vs-steel); color: #d3d9de; }
.vs-section.dark h2, .vs-section.dark h3 { color: #fff; }
.vs-title { margin-bottom: 1.2rem; }
.vs-intro-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 5rem); align-items: end; }
.vs-intro-grid h1 { margin: 0; }
.vs-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.vs-split.rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.vs-split.rev > :first-child { order: 2; }
.vs-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.vs-links { list-style: none; padding: 0; margin: 1rem 0; border-top: 1px solid var(--vs-line); }
.vs-links li { padding: .6rem 0; border-bottom: 1px solid var(--vs-line); }
.vs-links a { font-weight: 600; }

/* Domaines d'intervention : mosaïque de photos */
.vs-mosaic { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: repeat(3, minmax(190px, 1fr)); gap: 6px; margin-top: 2rem; }
.vs-tile { position: relative; display: block; overflow: hidden; background: #000; color: #fff; text-decoration: none; min-height: 190px; }
.vs-tile.tall { grid-row: 1 / span 3; min-height: 600px; }
.vs-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.vs-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 22, 24, .88) 0%, rgba(20, 22, 24, 0) 62%); }
.vs-tile:hover img { transform: scale(1.04); }
.vs-tile:hover { color: #fff; }
.vs-tile:focus-visible { outline-offset: -6px; outline-color: var(--vs-orange); }
.vs-tile-label { position: absolute; z-index: 1; left: 1.4rem; right: 1.4rem; bottom: 1.2rem; }
.vs-tile-label strong { display: block; font: 700 clamp(1.8rem, 3vw, 2.5rem)/1 var(--vs-display); }
.vs-tile-label span { display: block; margin-top: .3rem; font-size: .95rem; color: #dfe4e8; max-width: 44ch; }

/* Protections : trois colonnes séparées par un filet */
.vs-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem 3rem; margin-top: 1.6rem; }
.vs-card { border-top: 4px solid var(--vs-orange); padding-top: 1rem; }
.vs-card h3 { margin-bottom: .35rem; }
.vs-card p { margin: 0; color: #3e474e; }

/* Logos clients */
.vs-logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; list-style: none; padding: 1px; margin: 1.8rem 0 0; background: var(--vs-line); border: 1px solid var(--vs-line); }
.vs-logos li { background: #fff; display: flex; align-items: center; justify-content: center; padding: 1rem; min-height: 96px; }
.vs-logos img { max-height: 58px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .25s, opacity .25s; }
.vs-logos li:hover img { filter: none; opacity: 1; }

/* Appel à l'action */
.vs-cta { background: var(--vs-orange); color: var(--vs-steel); padding: clamp(3rem, 7vw, 5rem) 0; }
.vs-cta h2 { color: var(--vs-steel); margin-bottom: .3em; }
.vs-cta .vs-phone { display: block; font: 700 clamp(2.8rem, 9vw, 6.5rem)/1 var(--vs-display); color: var(--vs-steel); text-decoration: none; letter-spacing: -.01em; margin: .1em 0 .35em; }
.vs-cta .vs-phone:hover { color: #000; }
.vs-cta p { max-width: 52ch; font-size: 1.1rem; }

/* ---------- Pages ---------- */
.vs-pagehead { background: var(--vs-steel); color: #fff; padding: clamp(2.6rem, 6vw, 4.4rem) 0; border-bottom: 6px solid var(--vs-orange); }
.vs-pagehead h1 { color: #fff; margin: 0; max-width: 20ch; }
.vs-pagebanner { background: var(--vs-mist); padding: 2rem 0; }
.vs-banner-img { display: block; margin: 0 auto; width: auto; max-width: 100%; height: auto; max-height: 420px; }
.vs-banner-img.is-s { width: 400px; max-height: none; }
.vs-banner-img.is-m { width: 700px; max-height: none; }
.vs-banner-img.is-l { width: 1000px; max-height: none; }
.vs-banner-img.is-px { max-height: none; }
.vs-banner-img.is-full { width: 100%; max-height: 520px; object-fit: cover; }
.vs-entry { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.vs-entry p, .vs-entry li { max-width: 72ch; }
.vs-entry h2 { margin-top: 1.4em; }
.vs-entry .alignright { float: right; margin: 0 0 1rem 2rem; max-width: min(45%, 420px); }
.vs-entry .alignleft { float: left; margin: 0 2rem 1rem 0; max-width: min(45%, 420px); }
.vs-entry::after, .vs-clear { content: ""; display: block; clear: both; }
.vs-entry ul { padding-left: 1.3rem; }
.vs-entry li { margin-bottom: .4rem; }
.vs-entry li::marker { color: var(--vs-orange); }
.vs-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; margin: 2rem 0; clear: both; }
.vs-thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.vs-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2.5rem; clear: both; }
.vs-box { background: var(--vs-mist); border-left: 5px solid var(--vs-orange); padding: 1.4rem 1.8rem; margin: 1.5rem 0; clear: both; }
.vs-box ul { columns: 2 220px; column-gap: 2.5rem; }
.vs-box h2 { margin-top: 0; }
.vs-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.6rem; clear: both; }
.vs-doc { background: var(--vs-mist); padding: 1.5rem; text-align: left; }
.vs-doc h2 { font-size: 1.5rem; margin-top: 0; }
.vs-doc img { max-height: 240px; width: auto; margin: 0 0 1.2rem; }


/* ---------- Pages Bâtiment, Industrie, Travaux spéciaux ---------- */
.vs-lead { font-size: 1.3rem; line-height: 1.5; color: var(--vs-steel); max-width: 60ch; }
.vs-page-text > :last-child { margin-bottom: 0; }
.vs-page-text ul { padding-left: 1.3rem; }
.vs-page-text li { margin-bottom: .4rem; }
.vs-page-text li::marker { color: var(--vs-orange); }
.vs-page-text p, .vs-page-text li { max-width: 62ch; }
.vs-split.wide { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.vs-photo.portrait { aspect-ratio: 3 / 4; max-width: 440px; justify-self: end; }
.vs-photo.landscape { aspect-ratio: 4 / 3; }
.vs-stack { display: grid; gap: 6px; }
.vs-stack .vs-photo { aspect-ratio: 4 / 3; }
.vs-services { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); column-gap: 2rem; border-top: 4px solid var(--vs-orange); }
.vs-services li { padding: .75rem 0; border-bottom: 1px solid var(--vs-line); font-weight: 600; }
.vs-gallery.masonry { display: block; columns: 3 240px; column-gap: 6px; margin-bottom: 0; }
.vs-gallery.masonry li { break-inside: avoid; margin-bottom: 6px; }
.vs-gallery.masonry img { height: auto; }
.vs-row { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; padding: 2.4rem 0; border-top: 1px solid var(--vs-line); }
.vs-row:first-of-type { border-top: 0; }
.vs-row.rev { grid-template-columns: minmax(0, 1fr) minmax(180px, 280px); }
.vs-row.rev .vs-row-photos { order: 2; }
.vs-row-photos { display: grid; gap: 6px; }
.vs-row-photos img { width: auto; max-width: 100%; }
.vs-row h2 { margin-top: 0; }
.vs-cta.slim { padding: clamp(2.2rem, 5vw, 3.4rem) 0; }
.vs-cta.slim h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.vs-cta.slim .vs-phone { font-size: clamp(2.2rem, 6vw, 3.8rem); }
.vs-partner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; }
.vs-partner img { max-height: 90px; width: auto; background: #fff; padding: .6rem 1rem; }
.vs-footer h2 + ul small { color: #8f9aa3; }

/* ---------- Galerie des réalisations ---------- */
.vs-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; list-style: none; padding: 0; margin: 0 0 3rem; }
.vs-gallery a { display: block; position: relative; overflow: hidden; background: #000; }
.vs-gallery img { width: 100%; height: 230px; object-fit: cover; transition: transform .4s; }
.vs-gallery a:hover img { transform: scale(1.04); }
.vs-gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem .8rem .6rem; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); color: #fff; font-size: .88rem; line-height: 1.35; }
dialog.vs-lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
dialog.vs-lightbox::backdrop { background: rgba(0, 0, 0, .88); }
dialog.vs-lightbox img { max-width: 96vw; max-height: 82vh; margin: 0 auto; }
dialog.vs-lightbox p { color: #fff; text-align: center; margin: .6rem 0 0; }
dialog.vs-lightbox button { position: fixed; top: 1rem; right: 1rem; }

/* ---------- Formulaire de contact ---------- */
.vs-form { display: grid; gap: 1.1rem; max-width: 640px; }
.vs-form label { font-weight: 600; display: block; margin-bottom: .3rem; }
.vs-form input, .vs-form textarea { width: 100%; padding: .75rem .85rem; border: 1px solid #aab3ba; border-radius: 2px; font: inherit; background: #fff; }
.vs-form input:focus, .vs-form textarea:focus { border-color: var(--vs-orange-text); }
.vs-form .hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.vs-notice { padding: 1rem 1.2rem; margin-bottom: 1.2rem; }
.vs-notice.ok { background: #e8f5e9; border-left: 5px solid #2e7d32; }
.vs-notice.err { background: #fdecea; border-left: 5px solid #c62828; }

/* ---------- Pied de page ---------- */
.vs-footer { background: var(--vs-steel); color: #bcc4cb; padding: 3.5rem 0 1.6rem; }
.vs-footer a { color: #fff; }
.vs-footer a:hover { color: var(--vs-orange); }
.vs-footer h2 { color: #fff; font-size: 1.5rem; margin-bottom: .6rem; }
.vs-foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2.5rem; }
.vs-footer ul { list-style: none; padding: 0; margin: 0; }
.vs-footer li { padding: .2rem 0; }
.vs-copy { border-top: 1px solid #3d444a; margin-top: 2.5rem; padding-top: 1.1rem; font-size: .88rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
	.vs-burger { display: block; }
	.vs-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--vs-line); box-shadow: 0 12px 24px rgba(0, 0, 0, .12); }
	.vs-nav.open { display: block; }
	.vs-nav ul { flex-direction: column; gap: 0; }
	.vs-nav a { padding: .95rem 1.25rem; border-bottom: 1px solid var(--vs-line); box-shadow: none; }
	.vs-nav a:hover, .vs-nav .current-menu-item > a, .vs-nav .current_page_item > a { box-shadow: inset 5px 0 0 var(--vs-orange); }
	.vs-intro-grid, .vs-split, .vs-split.rev { grid-template-columns: 1fr; }
	.vs-split.rev > :first-child { order: 0; }
	.vs-slide-grid { grid-template-columns: 1fr; }
	.vs-slide-photo { justify-self: start; max-width: 100%; }
	.vs-mosaic { grid-template-columns: 1fr; grid-template-rows: none; }
	.vs-tile.tall { grid-row: auto; min-height: 340px; }
	.vs-split.wide { grid-template-columns: 1fr; }
	.vs-photo.portrait { justify-self: start; max-width: 100%; }
	.vs-row, .vs-row.rev { grid-template-columns: 1fr; }
	.vs-row.rev .vs-row-photos { order: 0; }
	.vs-partner { grid-template-columns: 1fr; }
	.vs-entry .alignright, .vs-entry .alignleft { float: none; max-width: 100%; margin: 0 0 1rem; }
	.vs-topbar .vs-wrap { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print { .vs-topbar, .vs-header, .vs-hero, .vs-footer, .vs-cta { display: none; } }
