/* =========================================================
   Erbi Elec — Shared stylesheet
   Three palette/typo variants switchable via [data-theme]
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Bricolage+Grotesque:wght@400;500;600;700;800&family=Instrument+Serif:ital@0;1&display=swap');

/* ---------- Theme: PRO (default) — corporate navy + warm CTA ---------- */
:root,
[data-theme="pro"] {
  --font-display: 'Manrope', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --bg: oklch(99% 0.004 240);
  --bg-soft: oklch(97% 0.008 240);
  --bg-elevated: #ffffff;
  --ink: oklch(20% 0.02 250);
  --ink-soft: oklch(38% 0.02 250);
  --ink-muted: oklch(55% 0.015 250);
  --line: oklch(90% 0.01 250);
  --line-soft: oklch(94% 0.008 250);

  --primary: oklch(42% 0.16 252);
  --primary-ink: #ffffff;
  --primary-soft: oklch(95% 0.03 252);
  --accent: oklch(70% 0.17 55);
  --accent-ink: oklch(18% 0.03 55);

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgb(15 25 50 / 0.06), 0 1px 1px rgb(15 25 50 / 0.04);
  --shadow: 0 8px 24px -8px rgb(15 25 50 / 0.12), 0 2px 4px rgb(15 25 50 / 0.06);
  --shadow-lg: 0 24px 60px -20px rgb(15 25 50 / 0.25);

  --tracking-tight: -0.02em;
  --tracking-display: -0.03em;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: var(--tracking-display); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--ink);
  color: oklch(95% 0.005 240);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 24px; max-width: 1200px; margin: 0 auto; gap: 16px;
}
.topbar a { display: inline-flex; align-items: center; gap: 6px; opacity: .9; }
.topbar a:hover { opacity: 1; }
.topbar-left, .topbar-right { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar .dot { width: 6px; height: 6px; border-radius: 999px; background: oklch(80% 0.18 145); display: inline-block; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .5; transform: scale(.8);} }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 16px 24px; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--primary); color: var(--primary-ink);
  font-weight: 800; font-size: 1rem;
  box-shadow: 0 1px 0 rgb(255 255 255 / .25) inset;
}
.brand-mark svg { width: 18px; height: 18px; }
.brand .brand-meta { font-size: 0.72rem; font-weight: 500; color: var(--ink-muted); letter-spacing: 0.06em; text-transform: uppercase; line-height: 1; margin-top: 3px; }
.brand-name-wrap { display: flex; flex-direction: column; }

.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  padding: 9px 14px; border-radius: var(--radius-pill);
  font-weight: 500; font-size: 0.94rem; color: var(--ink-soft);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-soft); }
.nav-links a.active { color: var(--ink); background: var(--bg-soft); }

.nav-cta { display: flex; gap: 10px; align-items: center; }

.nav-burger { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; color: var(--ink); }

@media (max-width: 900px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 16px; border-radius: var(--radius-sm); }
  .nav-burger { display: inline-flex; }
  .nav-cta .btn:not(.nav-cta-primary) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 0.94rem; letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s, color .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--ink-muted); }
.btn-lg { padding: 16px 26px; font-size: 1rem; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Hero (video banner) ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 80px 0 60px;
}
.hero-video {
  min-height: 92vh;
  padding: 120px 0 80px;
  display: flex; align-items: center;
  color: #fff;
}
.hero-video .hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-video-el,
.hero-video-fallback {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.hero-video-fallback { z-index: 0; }
.hero-scrim {
  position: absolute; inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg,
      color-mix(in oklab, var(--ink) 55%, transparent) 0%,
      color-mix(in oklab, var(--ink) 65%, transparent) 40%,
      color-mix(in oklab, var(--ink) 88%, transparent) 100%),
    radial-gradient(120% 80% at 20% 30%,
      color-mix(in oklab, var(--primary) 30%, transparent) 0%,
      transparent 60%);
}
.hero-grid-deco {
  position: absolute; inset: 0;
  z-index: 3;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  pointer-events: none;
}
.hero-video .hero-content {
  position: relative; z-index: 4;
  max-width: 920px;
}
.hero-video .hero-eyebrow {
  background: color-mix(in oklab, #000 30%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
}
.hero-video .hero-eyebrow .dot { background: var(--accent, #f7c948); box-shadow: 0 0 0 4px rgba(247,201,72,.25); }
/* Desktop: line break after "(95)" (active by default; mobile rule above overrides) */
.hero-video .hero-eyebrow { display: inline-block; text-align: center; line-height: 1.5; }
.hero-video .hero-eyebrow .ey-br { display: inline; }
.hero-video .hero-eyebrow .ey-sep { display: none; }
.hero-video h1 {
  color: #fff;
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  text-shadow: 0 2px 20px rgba(0,0,0,.35);
  max-width: 16ch;
}
.hero-video h1 .hl { color: var(--accent, #f7c948); }
.hero-video .hero-sub {
  color: rgba(255,255,255,.92);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  max-width: 620px;
  margin-bottom: 36px;
  text-shadow: 0 1px 10px rgba(0,0,0,.3);
}
.hero-video .hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-video .btn-on-dark {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.4);
  color: #fff;
  backdrop-filter: blur(8px);
}
.hero-video .btn-on-dark:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.7); }
.hero-meta-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255,255,255,.18);
  padding-top: 24px;
  max-width: 760px;
}
.hero-meta-row .hero-stat { padding-right: 16px; }
.hero-meta-row .hero-stat + .hero-stat { padding-left: 16px; border-left: 1px solid rgba(255,255,255,.12); }
.hero-meta-row .hero-stat-n {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  font-weight: 700; letter-spacing: -0.02em;
  color: #fff;
}
.hero-meta-row .hero-stat-l { font-size: 0.78rem; color: rgba(255,255,255,.7); margin-top: 4px; }
.hero-meta-row .hero-stat-badge .hero-stat-n { color: var(--accent, #f7c948); }

.hero-scroll {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,.8);
  font-size: 0.82rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  z-index: 5;
}
.hero-scroll svg { width: 16px; height: 16px; animation: heroBob 1.8s ease-in-out infinite; }
@keyframes heroBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.hero-scroll:hover { color: #fff; }

/* legacy hero (kept for other pages if any) */
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: 60px; align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.hero:not(.hero-video) .hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 500; color: var(--ink-soft);
  padding: 6px 12px; border-radius: var(--radius-pill);
  background: var(--bg-soft); border: 1px solid var(--line);
  margin-bottom: 22px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 500;
  padding: 6px 12px; border-radius: var(--radius-pill);
  margin-bottom: 22px;
}
.hero h1 { margin-bottom: 18px; }
.hero h1 .hl { color: var(--primary); }
.hero:not(.hero-video) .hero-sub { font-size: clamp(1rem, 1.5vw, 1.18rem); color: var(--ink-soft); max-width: 560px; margin-bottom: 32px; }
.hero:not(.hero-video) .hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); padding-top: 24px; }
.hero-stat { padding-right: 16px; }
.hero:not(.hero-video) .hero-stat-n { font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.hero:not(.hero-video) .hero-stat-l { font-size: 0.82rem; color: var(--ink-muted); margin-top: 4px; }
.hero-stat-n { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
.hero-stat-l { margin-top: 4px; }

.hero-visual {
  position: relative; aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-soft), var(--bg-soft));
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; bottom: 20px; left: 20px; right: 20px;
  background: color-mix(in oklab, var(--bg-elevated) 92%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow);
}
.hero-badge-ic { width: 42px; height: 42px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex-shrink: 0; }
.hero-badge-t { font-weight: 700; font-size: 0.96rem; }
.hero-badge-s { font-size: 0.82rem; color: var(--ink-soft); }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-muted); margin-bottom: 16px;
}
.section-eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--ink-muted); display: inline-block; }
.section-title { margin-bottom: 14px; max-width: 720px; }
.section-lede { font-size: 1.05rem; color: var(--ink-soft); max-width: 640px; margin-bottom: 48px; }

/* ---------- Service cards (grid) ---------- */
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }
.service-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  display: flex; flex-direction: column; gap: 14px; min-height: 220px;
}
.service-card:hover { transform: translateY(-3px); border-color: var(--ink-muted); box-shadow: var(--shadow); }
.service-card .ic {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center;
}
.service-card .ic svg { width: 22px; height: 22px; }
.service-card h3 { font-size: 1.12rem; }
.service-card p { color: var(--ink-soft); font-size: 0.95rem; }
.service-card .more { color: var(--primary); font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 4px; margin-top: auto; }
.service-card .more svg { width: 14px; height: 14px; transition: transform .2s; }
.service-card:hover .more svg { transform: translateX(3px); }

/* ---------- Realisations gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-soft);
  aspect-ratio: 4/3;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgb(0 0 0 / 0.55));
  opacity: 0; transition: opacity .25s;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-cap {
  position: absolute; bottom: 14px; left: 16px; right: 16px; z-index: 1;
  color: #fff; transform: translateY(8px); opacity: 0; transition: .25s;
  font-weight: 600; font-size: 0.95rem;
}
.gallery-cap small { font-weight: 400; opacity: .75; display: block; font-size: 0.78rem; margin-top: 2px; }
.gallery-item:hover .gallery-cap { transform: none; opacity: 1; }

/* Bento layout — 10 items, varied sizes */
.gallery-item.s-feature { grid-column: span 7; aspect-ratio: 16/10; }
.gallery-item.s-tall { grid-column: span 5; aspect-ratio: 5/6; grid-row: span 2; }
.gallery-item.s-md { grid-column: span 4; aspect-ratio: 4/3; }
.gallery-item.s-wide { grid-column: span 8; aspect-ratio: 16/8; }
.gallery-item.s-sq { grid-column: span 4; aspect-ratio: 1/1; }
.gallery-item.s-half { grid-column: span 6; aspect-ratio: 3/2; }
.gallery-cat {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: 0.72rem; padding: 5px 10px;
  background: rgb(255 255 255 / 0.92);
  color: var(--ink);
  border-radius: var(--radius-pill);
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}
.gallery-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 28px;
}
.gallery-filter {
  background: var(--bg-elevated); border: 1px solid var(--line);
  color: var(--ink-soft); font-weight: 500; font-size: 0.88rem;
  padding: 8px 14px; border-radius: var(--radius-pill);
  cursor: pointer; transition: border-color .2s, background .2s, color .2s;
}
.gallery-filter:hover { border-color: var(--ink-muted); color: var(--ink); }
.gallery-filter.active { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.gallery-item.hidden { display: none !important; }
@media (max-width: 900px) {
  .gallery-item, .gallery-item[class*="s-"] { grid-column: span 6; grid-row: auto; aspect-ratio: 4/3; }
}
@media (max-width: 600px) {
  .gallery-item, .gallery-item[class*="s-"] { grid-column: span 12; }
  .gallery-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .gallery-filter { white-space: nowrap; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgb(0 0 0 / 0.86);
  display: none;
  place-items: center;
  padding: 24px;
}
.lightbox.open { display: grid; animation: fadein .2s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.lightbox-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  width: min(820px, 92vw);
  max-height: 86vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.5);
  animation: cardin .25s ease;
}
@keyframes cardin { from { opacity: 0; transform: translateY(12px) scale(0.98);} to { opacity: 1; transform: none; } }
.lightbox-visual {
  position: relative; width: 100%;
  flex-shrink: 0;
  background: #0b0b0e;
  display: grid; place-items: center;
  min-height: 320px;
  max-height: 70vh;
}
.lightbox-visual .illu-photo {
  position: static;
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
}
.lightbox-visual .illu-icon { position: absolute; opacity: 0.15; }
.lightbox-visual .illu-side { display: none; }
.lightbox-meta {
  padding: 24px 28px;
  color: var(--ink);
  background: var(--bg-elevated);
}
.lightbox-cat-pill {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.74rem;
  color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 8px;
}
.lightbox-title {
  font-family: var(--font-display); font-size: clamp(1.2rem, 2.3vw, 1.5rem);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.2;
  margin-bottom: 8px; color: var(--ink);
}
.lightbox-sub {
  color: var(--ink-soft); font-size: 0.98rem; line-height: 1.5;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; z-index: 110;
  background: rgb(255 255 255 / .15); color: #fff;
  border: 1px solid rgb(255 255 255 / .25); width: 52px; height: 52px;
  border-radius: 999px; display: grid; place-items: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .2s, transform .15s;
  cursor: pointer;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgb(255 255 255 / .28); }
.lightbox-close:active, .lightbox-prev:active, .lightbox-next:active { transform: scale(0.94); }
.lightbox-close { top: 20px; right: 20px; width: auto; padding: 0 18px 0 14px; gap: 8px; font-weight: 600; font-size: 0.92rem; }
.lightbox-close .lbl { font-family: var(--font-body); }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-prev:active, .lightbox-next:active { transform: translateY(-50%) scale(0.94); }
@media (max-width: 600px) {
  .lightbox-close { top: 16px; right: 16px; padding: 0 14px 0 12px; font-size: 0.86rem; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 24px; transform: none; width: 48px; height: 48px; }
  .lightbox-prev:active, .lightbox-next:active { transform: scale(0.94); }
  .lightbox-prev { left: 24px; }
  .lightbox-next { right: 24px; }
}

/* ---------- Trust band ---------- */
.trust {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
@media (max-width: 700px) { .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
.trust-item { display: flex; flex-direction: column; gap: 6px; }
.trust-n { font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.trust-l { color: var(--ink-soft); font-size: 0.92rem; }
.trust-l strong { color: var(--ink); font-weight: 600; }

/* ---------- Clients / References ---------- */
.clients { padding-top: 0; }
.clients-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 28px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
  gap: 12px;
  margin-top: 28px;
}
.client-logo {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px;
  padding: 32px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  min-height: 140px;
  transition: border-color .2s, transform .15s;
  filter: grayscale(1);
  opacity: 0.78;
}
.client-logo:hover { border-color: var(--border-strong, var(--line)); transform: translateY(-2px); filter: none; opacity: 1; }
.client-logo img { max-height: 64px; max-width: 180px; width: auto; height: auto; object-fit: contain; }
.client-logo svg { height: 36px; width: auto; max-width: 130px; }
.client-name {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}
.lego-mark {
  display: inline-block;
  background: #d62027;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  border-radius: 8px;
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / .25), 0 2px 4px rgb(0 0 0 / .12);
  line-height: 1;
}
.client-logo-lego { filter: none; opacity: 1; }
.client-logo-placeholder { background: transparent; border-style: dashed; }
.client-logo-placeholder svg { height: 32px; }
.clients-note {
  margin-top: 22px;
  font-size: 0.88rem;
  color: var(--ink-muted);
  display: flex; align-items: center; gap: 8px;
  justify-content: center;
}
@media (max-width: 720px) {
  .clients-strip { grid-template-columns: 1fr; }
}

/* ---------- Localités desservies (SEO local) ---------- */
.localites { padding-top: 0; }
.localites-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 28px;
}
.localites-col {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.localites-col h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.localites-col ul {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.localites-col li { padding-left: 14px; position: relative; }
.localites-col li::before {
  content: "";
  position: absolute; left: 0; top: 8px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--primary);
  opacity: 0.6;
}
.localites-note {
  margin-top: 22px;
  font-size: 0.86rem;
  color: var(--ink-muted);
  font-style: italic;
  text-align: center;
}
@media (max-width: 860px) {
  .localites-grid { grid-template-columns: 1fr; }
}
.testi-card.testi-cta {
  display: flex; flex-direction: column; justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, var(--primary), color-mix(in oklch, var(--primary), #000 25%));
  color: #fff;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.testi-card.testi-cta:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgb(0 0 0 / .18); }
.testi-card.testi-cta .testi-cta-title { color: #fff; }
.testi-cta-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  margin: 0 auto 14px;
}
.testi-cta-icon svg { width: 28px; height: 28px; }
.testi-cta-title {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.testi-cta-desc { color: rgb(255 255 255 / .85); font-size: 0.94rem; line-height: 1.55; margin-bottom: 18px; }
.testi-cta-link { font-weight: 600; font-size: 0.94rem; }
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .testi-grid { grid-template-columns: 1fr; } }
.testi-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.testi-stars { display: flex; gap: 2px; color: oklch(78% 0.18 80); }
.testi-stars svg { width: 16px; height: 16px; }
.testi-quote { font-size: 1rem; color: var(--ink); line-height: 1.6; }
.testi-author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.testi-avatar { width: 40px; height: 40px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; }
.testi-name { font-weight: 600; font-size: 0.94rem; }
.testi-meta { font-size: 0.8rem; color: var(--ink-muted); }
.testi-google { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--ink-muted); padding-top: 12px; border-top: 1px solid var(--line-soft); }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-q {
  width: 100%; text-align: left; background: none; border: none;
  padding: 18px 22px; display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; font-size: 1.02rem; color: var(--ink); gap: 16px;
}
.faq-q .chev { width: 22px; height: 22px; border-radius: 999px; background: var(--bg-soft); display: grid; place-items: center; transition: transform .25s, background .25s; flex-shrink: 0; }
.faq-q .chev svg { width: 12px; height: 12px; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); background: var(--primary); color: var(--primary-ink); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height .35s ease;
  color: var(--ink-soft); font-size: 0.96rem;
}
.faq-a-inner { padding: 0 22px 22px; }
.faq-item.open .faq-a { max-height: 320px; }

/* ---------- CTA strip ---------- */
.cta-strip {
  background: var(--ink);
  color: oklch(96% 0.005 240);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: center;
}
@media (max-width: 800px) { .cta-strip { grid-template-columns: 1fr; padding: 32px; } }
.cta-strip h2 { color: inherit; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.cta-strip p { color: oklch(82% 0.005 240); margin-top: 10px; }
.cta-strip-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 800px) { .cta-strip-actions { justify-content: flex-start; } }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 60px 0 24px;
  font-size: 0.92rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgb(255 255 255 / .06);
  border: 1px solid rgb(255 255 255 / .1);
  color: var(--ink-soft);
  transition: background .2s, color .2s, transform .15s, border-color .2s;
}
.socials a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}
.socials a svg { width: 18px; height: 18px; }
.founder-card {
  margin-top: 36px;
  display: flex; align-items: center; gap: 18px;
  padding: 20px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.founder-card .avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark, var(--accent)));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 1.15rem; letter-spacing: 0.02em;
  flex-shrink: 0;
}
.founder-card .who { flex: 1; }
.founder-card .who-name { font-weight: 600; color: var(--ink); font-size: 1.02rem; }
.founder-card .who-role { color: var(--ink-muted); font-size: 0.88rem; margin-top: 2px; }
.founder-card .socials { margin-top: 0; }
.founder-card .socials a {
  background: var(--bg-elevated);
  border-color: var(--line);
  color: var(--ink-soft);
}
.founder-card .socials a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
@media (max-width: 540px) {
  .founder-card { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 { font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-muted); margin-bottom: 14px; font-weight: 600; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer ul a { color: var(--ink-soft); }
.footer ul a:hover { color: var(--ink); }
.footer-blurb { color: var(--ink-soft); margin: 14px 0 18px; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 20px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--ink-muted); font-size: 0.84rem;
}

/* ---------- Page header (subpages) ---------- */

/* ---------- Bannière cookies / consentement ---------- */
.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: var(--ink, #14181f);
  border-top: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 -8px 30px rgba(0,0,0,.25);
  transform: translateY(110%); opacity: 0;
  transition: transform .35s cubic-bezier(.16,1,.3,1), opacity .35s;
}
.consent.show { transform: translateY(0); opacity: 1; }
.consent-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.consent-text { flex: 1 1 420px; min-width: 0; color: #fff; }
.consent-text strong { display: block; font-size: 0.95rem; margin-bottom: 4px; color: #fff; }
.consent-text p { margin: 0; font-size: 0.84rem; line-height: 1.5; color: rgba(255,255,255,.72); }
.consent-text a { color: var(--accent, #f7c948); text-decoration: underline; text-underline-offset: 3px; }
.consent-actions { display: flex; gap: 10px; flex-shrink: 0; }
.consent-actions .consent-refuse {
  background: transparent; color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.28);
}
.consent-actions .consent-refuse:hover { background: rgba(255,255,255,.08); color: #fff; }
@media (max-width: 640px) {
  .consent-inner { gap: 14px; }
  .consent-actions { width: 100%; }
  .consent-actions .btn { flex: 1; justify-content: center; }
}

/* ---------- Page header (subpages) ---------- */
.page-header { padding: 70px 0 50px; border-bottom: 1px solid var(--line); }
.page-header .crumb { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-muted); margin-bottom: 14px; letter-spacing: 0.06em; }
.page-header h1 { margin-bottom: 14px; }
.page-header p { max-width: 640px; color: var(--ink-soft); font-size: 1.08rem; }

/* ---------- Service detail (prestations) ---------- */
.service-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: center; padding: 60px 0;
  border-bottom: 1px solid var(--line-soft);
}
.service-detail:nth-child(even) .service-detail-visual { order: 2; }
.service-detail-visual {
  aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-soft);
  position: relative;
}
.service-detail-visual img { width: 100%; height: 100%; object-fit: cover; }
.service-detail h2 { margin-bottom: 14px; }
.service-detail .ic-large {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; margin-bottom: 16px;
}
.service-detail .ic-large svg { width: 26px; height: 26px; }
.service-detail .desc { color: var(--ink-soft); margin-bottom: 18px; font-size: 1.04rem; }
.service-detail ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; }
.service-detail ul li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.97rem; }
.service-detail ul li::before {
  content: ""; flex-shrink: 0; margin-top: 8px;
  width: 6px; height: 6px; border-radius: 999px; background: var(--primary);
}
.service-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-soft); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.service-pills { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 800px) {
  .service-detail { grid-template-columns: 1fr; gap: 24px; }
  .service-detail:nth-child(even) .service-detail-visual { order: 0; }
}

/* ---------- About ---------- */
.about-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: center;
}
@media (max-width: 900px) { .about-hero { grid-template-columns: 1fr; gap: 32px; } }
.about-hero img { aspect-ratio: 4/5; border-radius: var(--radius-lg); object-fit: cover; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 800px) { .values { grid-template-columns: 1fr; } }
.value-card {
  padding: 28px; background: var(--bg-elevated);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.value-card .num {
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--ink-muted); letter-spacing: 0.1em;
}
.value-card h3 { margin: 10px 0 8px; }
.value-card p { color: var(--ink-soft); font-size: 0.96rem; }

.zone-map {
  background: var(--bg-soft); border-radius: var(--radius-lg);
  padding: 40px; border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.zone-map-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; }
@media (max-width: 800px) { .zone-map-grid { grid-template-columns: 1fr; } }
.zone-map-svg { background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; aspect-ratio: 5/4; }
.zone-map-svg svg { width: 100%; height: 100%; }
.zone-cities { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.zone-cities span {
  font-size: 0.85rem; padding: 5px 10px;
  background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-pill);
  color: var(--ink-soft);
}

.certifs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 800px) { .certifs { grid-template-columns: repeat(2, 1fr); } }
.certif-card {
  padding: 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-elevated); text-align: center;
}
.certif-card .badge {
  width: 56px; height: 56px; margin: 0 auto 12px;
  border-radius: 12px; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-family: var(--font-mono); font-weight: 600;
  font-size: 0.86rem;
}
.certif-card h4 { font-family: var(--font-display); font-size: 0.96rem; font-weight: 700; margin: 0 0 4px; }
.certif-card p { font-size: 0.82rem; color: var(--ink-muted); }

/* ---------- Contact ---------- */
.contact-main {
  max-width: 880px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 22px;
}

.contact-info-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 600px) { .contact-info-grid { grid-template-columns: 1fr; } }
.contact-info-grid .contact-info-item {
  padding: 22px 24px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.contact-info-grid .contact-info-item:nth-child(2n) { border-right: none; }
.contact-info-grid .contact-info-item:nth-last-child(-n+2) { border-bottom: none; }
@media (max-width: 600px) {
  .contact-info-grid .contact-info-item { border-right: none; border-bottom: 1px solid var(--line-soft); }
  .contact-info-grid .contact-info-item:last-child { border-bottom: none; }
}

.form-toggle-wrap { display: flex; justify-content: center; margin: 8px 0; }
.form-toggle {
  background: transparent;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  font-weight: 500;
}
.form-toggle:hover { color: var(--ink); border-color: var(--ink-muted); border-style: solid; background: var(--bg-soft); }
.form-toggle .chev { display: inline-flex; transition: transform .25s; margin-left: 4px; opacity: .6; }
.form-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.form-toggle[aria-expanded="true"] .form-toggle-label::before { content: "Masquer le formulaire"; }
.form-toggle[aria-expanded="true"] .form-toggle-label { font-size: 0; }
.form-toggle[aria-expanded="true"] .form-toggle-label::before { font-size: 1rem; }

.form-collapsible { display: none; }
.form-collapsible.open { display: block; animation: slidein .25s ease; }
@keyframes slidein-form { from { opacity: 0; transform: translateY(-6px);} to { opacity: 1; transform: none; } }

.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }

.contact-card {
  background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 32px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row.full { grid-column: 1 / -1; }
.form-row label { font-size: 0.86rem; font-weight: 600; color: var(--ink); }
.form-row label .req { color: oklch(60% 0.2 25); }
.form-row input, .form-row select, .form-row textarea {
  font: inherit; padding: 12px 14px;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 20%, transparent);
}
.form-row input.invalid, .form-row select.invalid, .form-row textarea.invalid {
  border-color: oklch(60% 0.2 25);
}
.form-err { font-size: 0.82rem; color: oklch(55% 0.2 25); display: none; }
.form-row.invalid .form-err { display: block; }

.toggle {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--bg); cursor: pointer; font-weight: 500;
  transition: border-color .2s, background .2s;
}
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle .switch { width: 36px; height: 20px; background: var(--line); border-radius: 999px; position: relative; transition: background .2s; }
.toggle .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 999px; transition: transform .2s; }
.toggle input:checked + .switch { background: var(--primary); }
.toggle input:checked + .switch::after { transform: translateX(16px); }

.contact-info {
  background: var(--bg-soft); border-radius: var(--radius-lg); padding: 28px;
  display: flex; flex-direction: column; gap: 22px;
}
.contact-info-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-info-item .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--bg-elevated); border: 1px solid var(--line); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.contact-info-item .ic svg { width: 18px; height: 18px; }
.contact-info-item h4 { font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); font-weight: 600; margin: 0 0 4px; font-family: var(--font-body); }
.contact-info-item p { font-size: 0.98rem; }
.contact-info-item p a { font-weight: 600; }
.contact-info-item p a:hover { color: var(--primary); }

.urgence-banner {
  background: oklch(55% 0.21 25);
  color: white;
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex; gap: 14px; align-items: center;
}
.urgence-banner .ic {
  width: 40px; height: 40px; border-radius: 999px;
  background: rgb(255 255 255 / .2); display: grid; place-items: center; flex-shrink: 0;
}
.urgence-banner h4 { font-family: var(--font-display); margin: 0 0 2px; font-size: 1rem; font-weight: 700; }
.urgence-banner p { margin: 0; font-size: 0.88rem; opacity: 0.9; }
.urgence-banner a { font-weight: 700; text-decoration: underline; }

.form-success {
  display: none;
  background: oklch(94% 0.05 145);
  color: oklch(30% 0.1 145);
  border: 1px solid oklch(80% 0.1 145);
  padding: 16px 18px; border-radius: var(--radius);
  font-size: 0.94rem;
  margin-bottom: 20px;
}
.form-success.show { display: flex; gap: 12px; align-items: center; }
.form-success.show svg { flex-shrink: 0; }
/* ---------- Departments grid (zone) ---------- */
.zone-departments-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
@media (max-width: 600px) { .zone-departments-grid { grid-template-columns: repeat(2, 1fr); } }
.dept-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  text-align: left;
  transition: border-color .2s;
}
.dept-card:hover { border-color: var(--ink-muted); }
.dept-card .dept-num {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-muted);
  line-height: 1;
}
.dept-card .dept-label {
  font-weight: 600; font-size: 0.84rem;
  color: var(--ink); margin-top: 4px;
}
.dept-card .dept-meta {
  font-family: var(--font-mono); font-size: 0.66rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-muted); margin-top: 4px;
}
.dept-card.primary {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: var(--primary);
}
.dept-card.primary .dept-num,
.dept-card.primary .dept-label,
.dept-card.primary .dept-meta { color: var(--primary-ink); }
.dept-card.primary .dept-num { opacity: 0.7; }
.dept-card.accent {
  background: var(--bg-soft);
  border-color: var(--primary);
}
.dept-card.accent .dept-num { color: var(--primary); opacity: 0.8; }

/* ---------- Image placeholder fallback ---------- */
.imgholder {
  background: linear-gradient(135deg, var(--bg-soft), var(--primary-soft));
  position: relative;
}
.imgholder::after {
  content: attr(data-label);
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.76rem;
  color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.1em;
}

/* ---------- Illustrated placeholders (when no real photo) ---------- */
.illu {
  position: absolute; inset: 0; overflow: hidden;
  display: grid; place-items: center;
  color: #fff;
}
.illu::before {
  /* grain + radial highlight */
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 25% 15%, rgb(255 255 255 / 0.22), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgb(0 0 0 / 0.18), transparent 60%);
  pointer-events: none;
}
.illu::after {
  /* subtle diagonal lines pattern */
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgb(255 255 255 / 0.045) 0 2px, transparent 2px 14px);
  pointer-events: none;
}
.illu-icon {
  position: relative; z-index: 1;
  width: 42%; max-width: 200px; height: auto;
  color: rgb(255 255 255 / 0.82);
  filter: drop-shadow(0 6px 20px rgb(0 0 0 / 0.18));
}
.illu-side {
  position: absolute; bottom: 14px; left: 16px; right: 16px;
  font-family: var(--font-mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: rgb(255 255 255 / 0.7);
  display: flex; align-items: center; gap: 8px;
  z-index: 1;
}
.illu-side::before {
  content: ""; flex-shrink: 0; width: 18px; height: 1px;
  background: rgb(255 255 255 / 0.5);
}
.illu-corner {
  position: absolute; top: 14px; right: 16px; z-index: 1;
  font-family: var(--font-mono); font-size: 0.7rem;
  color: rgb(255 255 255 / 0.6);
  letter-spacing: 0.08em;
}

/* Per-category gradients */
.illu-tableau      { background: linear-gradient(135deg, oklch(38% 0.16 252), oklch(55% 0.18 252)); }
.illu-renovation   { background: linear-gradient(135deg, oklch(48% 0.16 38),  oklch(64% 0.16 50)); }
.illu-depannage    { background: linear-gradient(135deg, oklch(45% 0.20 25),  oklch(60% 0.21 35)); }
.illu-borne        { background: linear-gradient(135deg, oklch(40% 0.14 200), oklch(58% 0.14 200)); }
.illu-photovoltaique { background: linear-gradient(135deg, oklch(50% 0.14 80), oklch(70% 0.18 90)); }
.illu-eclairage    { background: linear-gradient(135deg, oklch(48% 0.13 60),  oklch(68% 0.15 70)); }
.illu-domotique    { background: linear-gradient(135deg, oklch(42% 0.14 290), oklch(60% 0.16 295)); }
.illu-securite     { background: linear-gradient(135deg, oklch(30% 0.06 250), oklch(45% 0.08 250)); }
.illu-alarme       { background: linear-gradient(135deg, oklch(40% 0.16 25),  oklch(55% 0.18 25)); }
.illu-portail      { background: linear-gradient(135deg, oklch(35% 0.10 145), oklch(50% 0.12 155)); }
.illu-installation { background: linear-gradient(135deg, oklch(35% 0.10 240), oklch(50% 0.13 252)); }
.illu-brand        { background: linear-gradient(135deg, oklch(28% 0.04 250), oklch(42% 0.16 252)); }
.illu-portrait     { background: linear-gradient(135deg, oklch(40% 0.10 250), oklch(58% 0.14 252)); }

/* Decorative SVG scene elements for wide tiles */
.illu-scene {
  position: absolute; inset: 0; z-index: 0;
  opacity: 0.18; mix-blend-mode: screen;
}

/* Real photo overlaid on the illu (covers icon when loaded) */
.illu-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 2;
  display: block;
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Misc ---------- */
.kbd-phone { font-family: var(--font-mono); font-size: 0.98rem; letter-spacing: 0.02em; }

/* ============================================================
   MOBILE — comprehensive polish for ≤ 720px and ≤ 480px
   ============================================================ */

@media (max-width: 720px) {
  /* Container padding tighter */
  .container, .container-narrow { padding-left: 18px; padding-right: 18px; }

  /* Top bar: condense + prevent phone wraps */
  .topbar-inner { padding: 6px 14px; gap: 8px; font-size: 0.74rem; }
  .topbar-left { display: none; }
  .topbar-right { gap: 12px; flex-wrap: nowrap; width: 100%; justify-content: space-between; }
  .topbar a { white-space: nowrap; }

  /* Nav: compact brand */
  .nav-inner { padding: 12px 14px; gap: 8px; }
  .brand .brand-meta { display: none; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-mark svg { width: 16px; height: 16px; }
  .brand > .brand-name-wrap > span:first-child { font-size: 1rem; }
  .nav-cta { gap: 6px; }
  .nav-cta-primary { padding: 8px 14px; font-size: 0.88rem; }
  .nav-burger { padding: 6px; }

  /* Hero: lighter padding, smaller stats, full-width CTAs */
  .hero { padding-top: 28px; padding-bottom: 36px; }
  .hero h1 { font-size: clamp(1.95rem, 8vw, 2.6rem); line-height: 1.12; }
  .hero-sub { font-size: 1rem; margin-bottom: 24px; }
  .hero-ctas { gap: 10px; margin-bottom: 28px; flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 10px; padding-top: 18px; }
  .hero-stat-n { font-size: 1.1rem; }
  .hero-stat-l { font-size: 0.74rem; }
  .hero-eyebrow { font-size: 0.74rem; padding: 6px 12px; }
  .hero-video .hero-eyebrow .ey-br { display: none; }
  .hero-video .hero-eyebrow .ey-sep { display: inline; }
  .hero-visual .illu { aspect-ratio: 4/3; }
  .hero-badge { padding: 12px 14px; gap: 10px; }
  .hero-badge-t { font-size: 0.88rem; }
  .hero-badge-s { font-size: 0.74rem; }

  /* Video hero mobile */
  .hero-video {
    min-height: 78vh;
    padding: 88px 0 64px;
  }
  .hero-video h1 { font-size: clamp(2rem, 9vw, 2.8rem); max-width: 100%; }
  .hero-meta-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }
  .hero-meta-row .hero-stat {
    padding: 12px 12px 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .hero-meta-row .hero-stat + .hero-stat { padding-left: 12px; }
  .hero-meta-row .hero-stat:nth-child(2),
  .hero-meta-row .hero-stat:nth-child(4) { border-left: 1px solid rgba(255,255,255,.12); }
  .hero-scroll { display: none; }

  /* Section spacing tighter */
  section { padding: 56px 0; }
  .section-title { font-size: clamp(1.5rem, 5.5vw, 2rem); }
  .section-lede { font-size: 1rem; }
  .section-eyebrow { font-size: 0.72rem; }

  /* Trust band */
  .trust { padding: 36px 0; }
  .trust-grid { gap: 18px; }
  .trust-n { font-size: 1.6rem; }
  .trust-l { font-size: 0.85rem; }

  /* Clients */
  .client-logo { min-height: 110px; padding: 22px 16px; }
  .client-logo img { max-height: 48px; max-width: 140px; }
  .client-logo svg { height: 28px; }
  .lego-mark { font-size: 1.3rem; padding: 6px 11px; }

  /* Testimonials */
  .testi-card { padding: 22px; }
  .testi-quote { font-size: 0.94rem; }

  /* Localités */
  .localites-col { padding: 18px 18px; }
  .localites-col ul { font-size: 0.86rem; }

  /* CTA strip */
  .cta-strip { padding: 26px 22px; gap: 18px; }
  .cta-strip h2 { font-size: 1.3rem; }
  .cta-strip-actions { width: 100%; flex-direction: column; }
  .cta-strip-actions .btn { width: 100%; justify-content: center; }

  /* Page header */
  .page-header { padding: 50px 0 36px; }
  .page-header p { font-size: 1rem; }

  /* Service detail (prestations.html) */
  .service-detail { gap: 22px; padding: 32px 0; }
  .service-pills .pill { font-size: 0.78rem; padding: 5px 10px; }

  /* About hero */
  .about-hero { gap: 28px; }
  .values { gap: 12px; }
  .value-card { padding: 22px; }

  /* Zone map */
  .zone-map-grid { gap: 24px; }
  .zone-map-svg { padding: 12px; }

  /* Certifs */
  .certifs { gap: 10px; }
  .certif-card { padding: 18px 14px; }

  /* Founder card stacks */
  .founder-card { padding: 16px 18px; gap: 14px; }
  .founder-card .avatar { width: 48px; height: 48px; font-size: 1rem; }

  /* Contact callout banner stacks */
  .urgence-banner { flex-direction: column; align-items: flex-start; padding: 22px !important; gap: 14px; }
  .urgence-banner .btn { width: 100%; justify-content: center; }

  /* Contact info grid borders */
  .contact-info-grid { border: 1px solid var(--line); }

  /* Form toggle / email CTA full-width */
  .form-toggle-wrap { display: flex; }
  .form-toggle { width: 100%; justify-content: center; text-align: center; }

  /* Footer: 2 cols then 1 */
  .footer { padding: 50px 0 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-blurb { font-size: 0.88rem; }
  .footer-bottom { flex-direction: column; gap: 8px; align-items: flex-start; font-size: 0.78rem; padding-top: 22px; }

  /* Lightbox card: stack and breathe */
  .lightbox { padding: 12px; align-items: flex-start; }
  .lightbox-card { max-height: 92vh; overflow: auto; }
  .lightbox-text { padding: 18px 20px 22px; }
  .lightbox-title { font-size: 1.15rem; }

  /* FAQ */
  .faq-q { padding: 16px 18px; font-size: 0.96rem; gap: 10px; }
  .faq-a-inner { padding: 0 18px 18px; font-size: 0.92rem; }

  /* Gallery filters: scrollable */
  .gallery-filters { -webkit-overflow-scrolling: touch; gap: 6px; }
  .gallery-filter { font-size: 0.84rem; padding: 7px 12px; }
}

@media (max-width: 480px) {
  /* Stack footer fully */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

  /* Hero stats: 2-col instead of 3 */
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats > .hero-stat:last-child { grid-column: 1 / -1; }

  /* Trust band: 1 col */
  .trust-grid { grid-template-columns: 1fr 1fr; }

  /* Certifs: 1 col */
  .certifs { grid-template-columns: 1fr 1fr; }
}
