/* MYM ELEC BAT
   Layout : en-tête collant, hero typographique sur trame de plan, deux métiers côte à côte,
   bande Dépannage / Rénovation / Neuf, déroulé, contact en deux colonnes.
   Thème unique sombre, choisi pour coller à la carte de visite noir et or.
   Compatibilité visée : Safari / iOS 15+, Chrome, Edge, Firefox, Samsung Internet récents.
   Pas de color-mix() ni de fonctions CSS récentes sans repli. */

/* ---------- Polices (auto-hébergées, licence SIL OFL) ---------- */
@font-face {
  font-family: "Big Shoulders Display";
  src: url("../fonts/big-shoulders-display-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-var.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #12110f;
  --bg-veil: rgba(18, 17, 15, 0.92);
  --surface: #1b1a16;
  --surface-2: #232119;
  --line: #34302a;
  --fg: #f2ede1;
  --muted: #a9a191;
  --placeholder: #7b7466;
  --gold: #e2c064;
  --gold-ring: rgba(226, 192, 100, 0.25);
  --on-gold: #16140f;
  --on-gold-rule: rgba(22, 20, 15, 0.25);
  --ok: #9fcf8f;

  --font-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.25rem, 5vw, 3.25rem);
  --step-4: clamp(3rem, 9vw, 6.5rem);

  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1160px;
  --radius: 6px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1; margin: 0; text-wrap: balance; letter-spacing: 0.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--gold); color: var(--on-gold);
  padding: 0.6em 1em; border-radius: var(--radius); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 16px; }

.wrap { max-width: var(--maxw); margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Logo (couleurs via CSS, pas d'attributs inline) ---------- */
.logo-ring { fill: none; stroke: var(--gold); }
.logo-house { fill: var(--gold); }
.logo-cut { fill: var(--bg); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  font: 600 var(--step-0)/1 var(--font-body);
  padding: 0.95em 1.4em;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; fill: currentColor; }
.btn-gold { background: var(--gold); color: var(--on-gold); }
.btn-gold:hover { background: var(--fg); }
.btn-gold[disabled] { opacity: .6; cursor: progress; }
.btn-line { border-color: var(--line); color: var(--fg); }
.btn-line:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- En-tête ---------- */
.site-header {
  position: -webkit-sticky; position: sticky;
  top: env(safe-area-inset-top, 0px); z-index: 10;
  background: var(--bg-veil);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; min-width: 0; }
.brand svg { width: 42px; height: 42px; flex: none; }
.brand span { font: 800 1.5rem/1 var(--font-display); letter-spacing: 0.04em; color: var(--gold); white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a:not(.btn):hover { color: var(--fg); }
.nav .btn { padding: 0.7em 1.1em; }
@media (max-width: 760px) {
  .nav a:not(.btn) { display: none; }
  .nav .btn .label-long { display: none; }
  .nav .btn { padding: 0.75em; }
}
@media (max-width: 340px) { .brand span { font-size: 1.25rem; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
}
.hero::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 80% at 30% 40%, rgba(18, 17, 15, 0) 0%, var(--bg) 75%);
}
.hero .wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center; gap: clamp(2rem, 5vw, 4rem);
  padding-top: clamp(3.5rem, 9vw, 7rem); padding-bottom: clamp(3.5rem, 9vw, 7rem);
}
.hero h1 { margin-bottom: 1.5rem; }
.hero h1 .big {
  display: block;
  margin-top: 1rem;
  font-size: var(--step-4);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.92;
}
.hero h1 .sep { color: var(--gold); }
.hero .lead { font-size: var(--step-1); color: var(--muted); max-width: 34ch; }
.hero .lead strong { color: var(--fg); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.assurance {
  display: flex; align-items: center; gap: 0.5rem; margin-top: 1.25rem;
  font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.04em; color: var(--muted);
}
.assurance svg { width: 18px; height: 18px; flex: none; fill: var(--gold); }
.hero-mark { justify-self: center; width: 100%; max-width: 340px; }
.hero-mark svg { width: 100%; height: auto; display: block; }
.hero-mark .logo-ring { stroke-width: 2.5; }
@media (prefers-reduced-motion: no-preference) {
  .hero-mark .bolt { animation: flicker 2.4s ease-out 0.3s 1 both; }
  @keyframes flicker {
    0% { opacity: 1; } 8% { opacity: .2; } 12% { opacity: 1; } 18% { opacity: .35; }
    24% { opacity: 1; } 100% { opacity: 1; }
  }
}
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-mark { order: -1; max-width: 120px; justify-self: start; }
}

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; }
.section { padding-top: clamp(4rem, 9vw, 6.5rem); padding-bottom: clamp(4rem, 9vw, 6.5rem); }
.section-head { display: grid; gap: 0.9rem; max-width: 60ch; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-head h2 { font-size: var(--step-3); font-weight: 800; text-transform: uppercase; }
.section-head p { color: var(--muted); font-size: var(--step-1); }
.contact .section-head { margin-bottom: 0; }

/* Métiers */
.trades { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.trade {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: grid; gap: 1.5rem; align-content: start;
  min-width: 0;
}
.trade-top { display: flex; align-items: center; gap: 1rem; }
.trade-icon {
  width: 56px; height: 56px; flex: none;
  display: grid; place-items: center;
  border: 1.5px solid var(--gold); border-radius: 50%;
}
.trade-icon svg { width: 26px; height: 26px; fill: var(--gold); }
.trade h3 { font-size: var(--step-2); font-weight: 800; text-transform: uppercase; }
.trade > p { color: var(--muted); }
.trade ul { list-style: none; margin: 0; padding: 0; display: grid; }
.trade li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: baseline;
  padding-top: 0.85rem; padding-bottom: 0.85rem;
  border-top: 1px solid var(--line);
}
.trade li b { font-weight: 600; }
.trade li span { display: block; color: var(--muted); font-size: var(--step--1); }
.trade li .tag {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em;
  color: var(--gold); white-space: nowrap;
}
@media (max-width: 820px) { .trades { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 380px) {
  .trade li { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .trade li .tag { order: -1; }
}

/* Bande Dépannage / Rénovation / Neuf */
.band { background: var(--gold); color: var(--on-gold); }
.band .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: clamp(2.5rem, 6vw, 4rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.band article { padding-left: clamp(1rem, 3vw, 2rem); padding-right: clamp(1rem, 3vw, 2rem); display: grid; gap: 0.6rem; align-content: start; }
.band article + article { border-left: 1px solid var(--on-gold-rule); }
.band article:first-child { padding-left: 0; }
.band h2 { font-size: var(--step-3); font-weight: 800; text-transform: uppercase; }
.band p { max-width: 32ch; }
@media (max-width: 760px) {
  .band .wrap { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .band article { padding-left: 0; padding-right: 0; }
  .band article + article { border-left: 0; border-top: 1px solid var(--on-gold-rule); padding-top: 1.75rem; }
}

/* Déroulé */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 0.5rem; align-content: start; padding-top: 1.25rem; border-top: 2px solid var(--line); min-width: 0; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font: 500 var(--step--1)/1 var(--font-mono); color: var(--gold);
}
.steps b { font-size: var(--step-1); font-weight: 600; line-height: 1.3; }
.steps p { color: var(--muted); }
@media (max-width: 820px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Contact ---------- */
.contact { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.contact-info { display: grid; gap: 2rem; min-width: 0; }
.contact-lines { display: grid; }
.contact-line {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center;
  padding-top: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line);
}
.contact-line > svg { width: 22px; height: 22px; fill: var(--gold); }
.contact-line small { display: block; color: var(--muted); font-size: var(--step--1); }
.contact-line a {
  font: 600 var(--step-1)/1.3 var(--font-body);
  text-decoration: none; font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.contact-line a:hover { color: var(--gold); }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.copy {
  font: 500 var(--step--1)/1 var(--font-body);
  background: none; color: var(--muted);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.55em 0.9em; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.copy:hover { color: var(--gold); border-color: var(--gold); }

.form { display: grid; gap: 1.1rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2.25rem); min-width: 0; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
@media (max-width: 560px) { .row { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 0.4rem; min-width: 0; }
.form label, .form legend { font-weight: 600; font-size: var(--step--1); }
.form .opt { color: var(--muted); font-weight: 400; }
.form input[type="text"], .form input[type="tel"], .form input[type="email"], .form textarea {
  width: 100%;
  font: 400 1rem/1.4 var(--font-body); /* 16px minimum : évite le zoom auto sur iPhone */
  color: var(--fg);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8em 0.9em;
  -webkit-appearance: none; appearance: none;
}
.form textarea { min-height: 8.5rem; resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-ring); }
.form input::placeholder, .form textarea::placeholder { color: var(--placeholder); opacity: 1; }
.form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 0.5rem; min-width: 0; }
.form legend { padding: 0; margin-bottom: 0.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; font-weight: 500; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.chip span {
  display: inline-block; padding: 0.6em 1em;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: var(--step--1); font-weight: 500; color: var(--muted);
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.chip input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.status { font-size: var(--step--1); color: var(--muted); flex: 1 1 16rem; min-width: 0; }
.status.ok { color: var(--ok); }
.status.err { color: var(--gold); }
.privacy { font-size: 0.8125rem; color: var(--muted); }
.privacy a { color: var(--fg); }

/* ---------- Pied de page ---------- */
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 2rem; padding-bottom: 2rem; color: var(--muted); font-size: var(--step--1); }
.site-footer .brand svg { width: 32px; height: 32px; }
.site-footer .brand span { font-size: 1.15rem; }

/* ---------- Pages texte (mentions légales, 404) ---------- */
.prose { max-width: 70ch; display: grid; gap: 1rem; }
.prose h1 { font-size: var(--step-3); font-weight: 800; text-transform: uppercase; margin-bottom: 1rem; }
.prose h2 { font-size: var(--step-2); font-weight: 800; text-transform: uppercase; margin-top: 1.5rem; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--fg); font-weight: 600; }
.prose ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; }
.prose a { color: var(--gold); }
.todo { color: var(--gold); font-family: var(--font-mono); font-size: 0.9em; }
