/* CF ELEC : feuille de style commune à toutes les pages */

:root {
  --bg: #F6F4F0;
  --surface: #FFFFFF;
  --sunk: #EEEBE5;
  --ink: #181818;
  --ink-2: #4D4A45;
  --ink-3: #6F6B64;
  --line: rgba(24, 24, 24, .09);
  --line-2: rgba(24, 24, 24, .16);

  --ochre: #DA9848;
  --ochre-hover: #CB893A;
  --ochre-ink: #94591A;

  --night: #181818;
  --on-night: #F6F4F0;
  --on-night-2: rgba(246, 244, 240, .70);
  --on-night-3: rgba(246, 244, 240, .52);
  --night-line: rgba(246, 244, 240, .12);

  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --fast: 150ms;
  --slow: 320ms;

  --gutter: 32px;
  --header: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 16px); background: var(--night); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus, var(--ochre-ink)); outline-offset: 2px; border-radius: 4px; }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nowrap { white-space: nowrap; }
.wrap { width: 100%; max-width: 1344px; margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: 16px; top: -48px; z-index: 50; padding: 8px 12px; background: var(--ink); color: var(--on-night); border-radius: 8px; }
.skip:focus { top: 12px; }

/* Repère de tableau : la signature */
.tag {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 22px; padding: 0 6px;
  font: 500 12px/1 var(--mono);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  flex: none;
}

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px;
  border-radius: 10px;
  font: 500 17px/1 var(--sans);
  white-space: nowrap;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-call { background: var(--ochre); color: var(--ink); }
.btn-call:hover { background: var(--ochre-hover); }
.btn-ghost { border: 1px solid var(--line-2); }
.btn-ghost:hover { background: rgba(24, 24, 24, .04); border-color: rgba(24, 24, 24, .28); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 15px; border-radius: 8px; }

/* En-tête */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--night); color: var(--on-night);
  border-bottom: 1px solid var(--night-line);
}
.site-header .wrap { height: var(--header); display: flex; align-items: center; gap: 48px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; gap: 32px; font-size: 15px; color: var(--on-night-2); }
.nav a { transition: color var(--fast) var(--ease); }
.nav a:hover, .nav a[aria-current] { color: var(--on-night); }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.header-note { font-size: 15px; color: var(--on-night-3); }
.menu-btn { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 8px; color: var(--on-night); }
.menu-btn:hover { background: rgba(246, 244, 240, .08); }
.mobile-nav { display: none; }

/* Zones sombres : en-tête, hauts de page, contact */
.night { --focus: var(--ochre); }
.night .btn-ghost { border-color: rgba(246, 244, 240, .22); color: var(--on-night); }
.night .btn-ghost:hover { background: rgba(246, 244, 240, .06); border-color: rgba(246, 244, 240, .36); }

/* Haut de page de l'accueil */
.hero { padding: 48px 0 64px; background: var(--night); color: var(--on-night); }
.hero .wrap {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px; align-items: center;
  min-height: min(calc(100svh - var(--header) - 112px), 800px);
}
.hero-text { grid-column: 1 / span 6; max-width: 600px; }
.hero-place { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--on-night-3); margin-bottom: 24px; }
.hero h1 { font-weight: 500; font-size: 64px; line-height: 1.04; letter-spacing: -.02em; text-wrap: balance; }
.hero-lead { margin-top: 24px; font-size: 20px; line-height: 1.5; color: var(--on-night-2); max-width: 520px; }
.hero-actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-photo { grid-column: 7 / span 6; position: relative; margin: 0; }
.hero-photo img {
  width: 100%; height: clamp(440px, calc(100svh - var(--header) - 112px), 760px);
  object-fit: cover; object-position: 50% 55%;
  border-radius: 16px;
  background: #242424;
}
.photo-label {
  position: absolute; left: 16px; bottom: 16px;
  display: flex; align-items: center; gap: 12px;
  width: fit-content; max-width: calc(100% - 32px);
  padding: 8px 12px 8px 8px;
  background: var(--surface);
  border-radius: 4px;
  font-size: 15px; line-height: 1.3; color: var(--ink);
}

.reveal { animation: rise var(--slow) var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; } }

/* Sections */
.section { padding: 112px 0; }
.section.flush { padding-top: 0; }
.section-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px; margin-bottom: 48px; align-items: end; }
.section-head h2 { grid-column: 1 / span 6; }
.section-head p { grid-column: 8 / span 5; color: var(--ink-2); }
h2 { font-weight: 500; font-size: 44px; line-height: 1.08; letter-spacing: -.015em; }

/* Services : la nomenclature du tableau */
.board { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.circuit {
  display: grid; grid-template-columns: 48px minmax(200px, 1fr) minmax(0, 2fr) 24px;
  gap: 24px; align-items: baseline;
  padding: 24px 32px;
  transition: background-color var(--fast) var(--ease);
}
.circuit + .circuit { border-top: 1px solid var(--line); }
a.circuit:hover { background: rgba(24, 24, 24, .025); }
.circuit .tag { transform: translateY(-2px); }
.circuit h3 { font-weight: 500; font-size: 22px; line-height: 1.25; }
.circuit p { color: var(--ink-2); }
.circuit-go { justify-self: end; align-self: center; color: var(--ink-3); transition: transform var(--fast) var(--ease), color var(--fast) var(--ease); }
a.circuit:hover .circuit-go { transform: translateX(2px); color: var(--ochre-ink); }

/* Liste simple dans un tableau (sous-pages) */
.item { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr); gap: 24px; align-items: baseline; padding: 24px 32px; }
.item + .item { border-top: 1px solid var(--line); }
.item h3 { font-weight: 500; font-size: 22px; line-height: 1.25; }
.item p { color: var(--ink-2); }
.item p a { color: var(--ochre-ink); font-weight: 500; transition: color var(--fast) var(--ease); }
.item p a:hover { color: var(--ink); }

/* Réalisations */
.works { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 48px; }
.work { grid-column: span var(--span, 4); min-width: 0; }
.work-media {
  display: block; width: 100%; position: relative; overflow: hidden;
  border-radius: 12px; background: var(--sunk); cursor: zoom-in;
}
.work-media img { width: 100%; height: var(--h, 440px); object-fit: cover; }
.work-media::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: rgba(24, 24, 24, 0); transition: background-color var(--fast) var(--ease);
}
.work-media:hover::after { background: rgba(24, 24, 24, .08); }
.work-caption { display: flex; gap: 12px; align-items: baseline; margin-top: 16px; }
.work-caption .tag { transform: translateY(-2px); }
.work-caption h3 { font-weight: 500; font-size: 20px; line-height: 1.3; transition: color var(--fast) var(--ease); }
.work:hover h3 { color: var(--ochre-ink); }
.work-caption p { margin-top: 2px; font-size: 15px; color: var(--ink-3); }

/* Avant / après */
.compares { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 24px; row-gap: 48px; }
.compares > :only-child { grid-column: 1 / -1; max-width: 880px; }
.compare-frame {
  --pos: 50%;
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 12px; background: var(--sunk);
}
.compare-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; }
.compare-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-label { position: absolute; top: 12px; pointer-events: none; }
.compare-label.before { left: 12px; }
.compare-label.after { right: 12px; }
.compare-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; touch-action: pan-y;
}
.compare-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--surface); pointer-events: none; }
.compare-knob {
  position: absolute; top: 50%; left: var(--pos); width: 40px; height: 40px; margin: -20px 0 0 -20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--surface); color: var(--ink);
  box-shadow: 0 1px 4px rgba(24, 24, 24, .24);
  pointer-events: none;
}
.compare-range:focus-visible ~ .compare-knob { outline: 2px solid var(--ochre); outline-offset: 2px; }

/* Zone */
.zone .wrap { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px; }
.zone-text { grid-column: 1 / span 5; }
.zone-text p { margin-top: 24px; color: var(--ink-2); max-width: 440px; }
.depts { grid-column: 7 / span 6; border-top: 1px solid var(--line-2); }
.dept { display: grid; grid-template-columns: 88px 1fr auto; align-items: baseline; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.dept-num { font: 500 32px/1 var(--mono); color: var(--ink); }
.dept-name { font-size: 22px; font-weight: 500; }
.dept-note { font-size: 15px; color: var(--ink-3); }
.dept.home .dept-num { color: var(--ochre-ink); }

/* Haut de page d'un service */
.svc-hero { padding: 32px 0 64px; background: var(--night); color: var(--on-night); }
.svc-hero .wrap { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px; align-items: center; }
.svc-text { grid-column: 1 / span 6; max-width: 600px; padding: 32px 0; }
.svc-hero .wrap:has(.svc-photo[hidden]) .svc-text { grid-column: 1 / span 8; max-width: 760px; }
.crumbs { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--on-night-3); margin-bottom: 24px; }
.crumbs a { transition: color var(--fast) var(--ease); }
.crumbs a:hover { color: var(--on-night); }
.svc-hero h1 { font-weight: 500; font-size: 56px; line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
.svc-photo { grid-column: 7 / span 6; position: relative; margin: 0; }
.svc-photo img { width: 100%; height: 560px; object-fit: cover; border-radius: 16px; background: #242424; }

/* Corps d'une page de service : les sections masquées ne laissent pas de trou */
.svc-body { display: flex; flex-direction: column; gap: 96px; padding: 96px 0 112px; }

/* Carte d'appel de la page dépannage */
.call-card {
  grid-column: 7 / span 6;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  min-height: 440px; padding: 48px;
  background: var(--ochre); color: var(--ink);
  border-radius: 16px;
  --focus: var(--ink);
}
.call-card-number {
  margin-top: 16px;
  font-weight: 500; font-size: clamp(40px, 5.2vw, 76px); line-height: 1; letter-spacing: -.02em; white-space: nowrap;
}
.call-card p { margin-top: 16px; color: rgba(24, 24, 24, .8); max-width: 400px; }
.call-card .contact-kicker { margin-top: 0; color: var(--ink); }
.call-card .btn { margin-top: 32px; }
.btn-ink { background: var(--ink); color: var(--on-night); }
.btn-ink:hover { background: #2E2D2B; }

/* Autres services */
.others { display: flex; flex-wrap: wrap; gap: 12px; }
.other {
  flex: 1 1 calc(25% - 12px); min-width: 248px;
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  font-size: 17px; font-weight: 500;
  transition: border-color var(--fast) var(--ease);
}
.other:hover { border-color: rgba(24, 24, 24, .28); }
.other .icon { margin-left: auto; color: var(--ink-3); transition: transform var(--fast) var(--ease), color var(--fast) var(--ease); }
.other:hover .icon { transform: translateX(2px); color: var(--ochre-ink); }

/* Contact */
.contact { background: var(--night); color: var(--on-night); padding: 112px 0 96px; }
.contact .wrap { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px; align-items: end; }
.contact-main { grid-column: 1 / span 8; }
.contact-kicker { font-size: 17px; line-height: 1.3; letter-spacing: 0; font-weight: 500; color: var(--ochre); }
.contact-number {
  display: inline-block; margin-top: 16px;
  font-weight: 500; font-size: clamp(48px, 8.4vw, 120px); line-height: 1; letter-spacing: -.02em;
  white-space: nowrap;
  transition: color var(--fast) var(--ease);
}
.contact-number:hover { color: var(--ochre); }
.contact-main > p { margin-top: 24px; max-width: 520px; color: var(--on-night-2); }
.contact-actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }
.contact-details { grid-column: 9 / span 4; border-top: 1px solid var(--night-line); }
.contact-details div { padding: 16px 0; border-bottom: 1px solid var(--night-line); }
.contact-details dt { font-size: 14px; color: var(--on-night-3); }
.contact-details dd { margin-top: 4px; font-size: 17px; }
.contact-details a { transition: color var(--fast) var(--ease); }
.contact-details a:hover { color: var(--ochre); }

/* Pied de page */
.site-footer { background: var(--night); color: var(--on-night-3); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; padding-top: 32px; padding-bottom: 40px; border-top: 1px solid var(--night-line); }
.site-footer img { height: 24px; width: auto; }
.legal { flex: 1 1 320px; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-footer .copy { margin-left: auto; }

/* Visionneuse */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #0F0F0F; color: var(--on-night);
}
.lightbox::backdrop { background: #0F0F0F; }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; animation: fade var(--slow) var(--ease); }
@keyframes fade { from { opacity: 0; } }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 24px 80px 0; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lb-nav, .lb-close {
  position: absolute; width: 48px; height: 48px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--on-night); background: rgba(246, 244, 240, .08);
  transition: background-color var(--fast) var(--ease);
}
.lb-nav:hover, .lb-close:hover { background: rgba(246, 244, 240, .16); }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 16px; top: 16px; z-index: 1; }
.lb-bar { display: flex; align-items: baseline; gap: 12px; padding: 20px 80px 24px; }
.lb-bar .tag { transform: translateY(-2px); }
.lb-title { font-size: 17px; font-weight: 500; }
.lb-caption { font-size: 15px; color: var(--on-night-2); margin-top: 2px; }
.lb-count { margin-left: auto; font: 500 13px/1 var(--mono); color: var(--on-night-3); white-space: nowrap; }

/* Tablette */
@media (max-width: 1080px) {
  .header-note { display: none; }
  .hero h1 { font-size: 52px; }
  .svc-hero h1 { font-size: 48px; }
  .circuit { grid-template-columns: 48px 1fr 24px; row-gap: 4px; }
  .circuit p { grid-column: 2; }
  .circuit-go { grid-column: 3; grid-row: 1; }
  .call-card { padding: 32px; }
}
@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .mobile-nav[data-open] {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--night); border-bottom: 1px solid var(--night-line);
    padding: 8px var(--gutter) 16px;
  }
  .mobile-nav a { display: flex; align-items: center; height: 48px; font-size: 20px; font-weight: 500; border-bottom: 1px solid var(--night-line); }
  .mobile-nav a:last-child { border-bottom: 0; }

  .hero { padding: 32px 0 64px; }
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; gap: 40px; }
  .hero-text, .hero-photo { grid-column: 1; }
  .hero-photo img { height: 520px; }

  .svc-hero { padding: 16px 0 48px; }
  .svc-hero .wrap { grid-template-columns: 1fr; gap: 16px; }
  .svc-text, .svc-photo, .call-card,
  .svc-hero .wrap:has(.svc-photo[hidden]) .svc-text { grid-column: 1; }
  .svc-photo img { height: 440px; }
  .call-card { min-height: 0; }
  .call-card-number { font-size: clamp(40px, 10vw, 76px); }
  .svc-body { gap: 64px; padding: 64px 0 80px; }

  .section { padding: 80px 0; }
  .section.flush { padding-top: 0; }
  .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
  .section-head h2, .section-head p { grid-column: 1; }

  .works { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .work { grid-column: span 1; --h: 360px !important; }
  .work:first-child { grid-column: span 2; }
  .compares { grid-template-columns: 1fr; row-gap: 40px; }
  .item { grid-template-columns: 1fr; gap: 4px; }

  .zone .wrap, .contact .wrap { grid-template-columns: 1fr; gap: 48px; }
  .zone-text, .depts, .contact-main, .contact-details { grid-column: 1; }
  .contact { padding: 80px 0 64px; }
}
/* Téléphone */
@media (max-width: 640px) {
  :root { --gutter: 20px; --header: 64px; }
  body { font-size: 16px; }
  .brand img { height: 36px; }
  .header-end { gap: 4px; }
  .call-label-long { display: none; }
  .hero h1, .svc-hero h1 { font-size: 40px; line-height: 1.08; }
  .hero-place { margin-bottom: 16px; }
  .hero-lead { font-size: 18px; margin-top: 16px; }
  .hero-actions { margin-top: 32px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-photo img { height: 420px; }
  .svc-photo img { height: 360px; }
  .svc-text { padding: 16px 0; }
  .call-card { padding: 24px; }
  .call-card .btn { align-self: stretch; }
  h2 { font-size: 32px; }
  .section { padding: 64px 0; }
  .section.flush { padding-top: 0; }
  .circuit { padding: 20px; column-gap: 16px; grid-template-columns: 40px 1fr 20px; }
  .circuit h3, .item h3 { font-size: 20px; }
  .item { padding: 20px; }
  .works { grid-template-columns: 1fr; }
  .work, .work:first-child { grid-column: 1; --h: 300px !important; }
  .other { flex-basis: 100%; }
  .dept { grid-template-columns: 64px 1fr; }
  .dept-num { font-size: 26px; }
  .dept-name { font-size: 20px; }
  .dept-note { grid-column: 2; margin-top: -8px; }
  .contact-actions .btn { flex: 1 1 100%; }
  .site-footer .copy { margin-left: 0; }
  .lb-stage { padding: 72px 16px 0; }
  .lb-nav { display: none; }
  .lb-bar { padding: 16px 20px 24px; flex-wrap: wrap; }
}
@media (min-width: 641px) { .call-label-short { display: none; } }
