/* ==========================================================
   Ampéra Électricité — feuille de style principale
   Changez les couleurs ici : tout le site suit.
   ========================================================== */
:root {
  --ink: #0E1621;        /* bleu nuit : fonds sombres, texte */
  --ink-2: #16212D;      /* bleu nuit clair : cartes sur fond sombre */
  --ink-line: #2B3846;   /* bordures sur fond sombre */
  --paper: #F3F4F0;      /* fond clair principal */
  --white: #FFFFFF;
  --line: #E0E3DC;       /* bordures sur fond clair */
  --muted: #3A4654;      /* texte secondaire sur clair */
  --muted-dark: #C5CCD4; /* texte secondaire sur sombre */
  --volt: #F5B800;       /* accent jaune électrique */
  --volt-dark: #D9A300;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Helvetica, sans-serif;

  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; display: block; }
a { color: var(--ink); }
a:hover { color: var(--muted); }

:focus-visible {
  outline: 3px solid var(--volt);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--volt); color: var(--ink); padding: 12px 20px; font-weight: 700; z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---------- Titres ---------- */
h1, h2, .display {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: -0.3px;
  margin: 0;
}
h1 { font-size: clamp(52px, 8vw, 92px); }
h2 { font-size: clamp(38px, 5vw, 60px); }
h3 { font-size: 21px; line-height: 1.3; margin: 0; }
p { margin: 0; }
.lead { font-size: 19px; color: var(--muted); max-width: 60ch; }
.on-dark .lead, .on-dark p { color: var(--muted-dark); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn svg { width: 18px; height: 18px; }
.btn-volt { background: var(--volt); color: var(--ink); }
.btn-volt:hover { background: var(--volt-dark); color: var(--ink); }
.btn-ghost { border-color: #4A5664; color: var(--paper); }
.btn-ghost:hover { border-color: var(--volt); color: var(--volt); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--ink-2); color: var(--volt); }

/* ---------- Bandeau urgence ---------- */
.topbar { background: var(--volt); color: var(--ink); font-size: 14px; font-weight: 600; }
.topbar .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 6px 24px; padding-top: 9px; padding-bottom: 9px;
}
.topbar a { color: var(--ink); }
.topbar span { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- En-tête ---------- */
.site-header { background: var(--ink); color: var(--paper); position: sticky; top: 0; z-index: 50; }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 16px; padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--paper); text-decoration: none; }
.brand:hover { color: var(--paper); }
.brand-mark {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--volt); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 28px; text-transform: uppercase; line-height: 1; }
.brand-name span { font-weight: 600; opacity: .7; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--paper); text-decoration: none; font-weight: 500; font-size: 15px; padding: 10px 0; position: relative; }
.nav a:hover { color: var(--volt); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 3px; background: var(--volt); border-radius: 2px;
}
.nav .btn { padding: 0 22px; min-height: 46px; color: var(--ink); }
.nav .btn:hover { color: var(--ink); }
.nav .btn::after { display: none; }

.menu-toggle {
  display: none; width: 48px; height: 48px; border-radius: var(--radius-sm);
  border: 1px solid #3A4654; background: transparent; color: var(--paper); cursor: pointer;
  align-items: center; justify-content: center;
}

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); padding: 8px 24px 24px; border-top: 1px solid var(--ink-line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--ink-line); font-size: 17px; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav a[aria-current="page"] { color: var(--volt); }
  .nav .btn { margin-top: 16px; border-bottom: 0; }
}

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section-sm { padding: 72px 0; }
.on-dark { background: var(--ink); color: var(--paper); }
.on-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px;
  margin-bottom: 48px;
}
.section-head h2 { max-width: 16ch; }
.section-head p { max-width: 42ch; color: var(--muted); }

/* ---------- Hero accueil ---------- */
.hero { background: var(--ink); color: var(--paper); overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
  padding-top: 72px; padding-bottom: 96px;
}
.hero-text { display: flex; flex-direction: column; gap: 28px; }
.hero-kicker { color: var(--volt); font-weight: 600; font-size: 15px; }
.hero h1 .volt { color: var(--volt); display: block; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.trust {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  padding-top: 20px; border-top: 1px solid #26323F; font-size: 15px; color: var(--muted-dark);
  list-style: none; margin: 0; padding-left: 0;
}
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { color: var(--volt); flex: none; }

.hero-media { position: relative; }
.hero-media .photo { height: 540px; border-radius: var(--radius-lg); }
.hero-badge {
  position: absolute; right: 20px; top: 20px;
  background: var(--volt); color: var(--ink); border-radius: 999px; padding: 8px 18px;
  font-family: var(--font-display); font-weight: 700; font-size: 19px; text-transform: uppercase;
}
.hero-card {
  position: absolute; left: -28px; bottom: 40px;
  background: var(--paper); color: var(--ink); border-radius: 18px; padding: 18px 22px;
  display: flex; align-items: center; gap: 14px; box-shadow: 0 24px 48px rgba(0,0,0,.35);
}
.hero-card .icon { background: var(--ink); color: var(--volt); }
.hero-card strong { display: block; }
.hero-card span { font-size: 14px; color: var(--muted); }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 64px; gap: 40px; }
  .hero-media .photo { height: 320px; }
  .hero-card { left: 12px; bottom: -24px; }
}

/* ---------- En-tête de page intérieure ---------- */
.page-hero { background: var(--ink); color: var(--paper); }
.page-hero .wrap { padding-top: 64px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 20px; }
.page-hero p { color: var(--muted-dark); font-size: 19px; max-width: 60ch; }
.crumbs { font-size: 14px; color: var(--muted-dark); }
.crumbs a { color: var(--muted-dark); }

/* ---------- Photos ---------- */
.photo { position: relative; overflow: hidden; background: var(--ink-2); border-radius: var(--radius); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
/* Si une image ne se charge pas, un fond hachuré prend le relais */
.photo.is-missing {
  background: repeating-linear-gradient(135deg, #1A2633 0 14px, #16212D 14px 28px);
  display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center;
  color: #8693A1; font-size: 14px;
}
.photo.is-missing img { display: none; }

/* ---------- Icônes ---------- */
.icon {
  width: 52px; height: 52px; border-radius: 14px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--volt);
}
.icon svg { width: 26px; height: 26px; }

/* ---------- Grille services ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 980px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.service {
  background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 32px;
  display: flex; flex-direction: column; gap: 14px;
}
.service p { color: var(--muted); }
.service .more { margin-top: auto; font-weight: 600; font-size: 15px; padding-top: 6px; }
.service.is-urgent { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.service.is-urgent p { color: var(--muted-dark); }
.service.is-urgent .icon { background: var(--volt); color: var(--ink); }
.service.is-urgent .more { color: var(--volt); }

/* ---------- Étapes ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; list-style: none; margin: 0; padding: 0; }
.steps li { border-top: 3px solid var(--ink); padding-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.steps li:last-child { border-top-color: var(--volt); }
.steps .num { font-family: var(--font-display); font-weight: 800; font-size: 56px; line-height: 1; }
.steps p { color: var(--muted); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Réalisations ---------- */
.work { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.work .photo { height: 320px; }
.work figcaption strong { display: block; font-size: 18px; }
.work figcaption span { color: var(--muted); font-size: 14px; }
.work[hidden] { display: none; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter {
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--white); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; color: var(--ink);
}
.filter:hover { border-color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- Bloc partagé texte + image ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split .photo { height: 480px; border-radius: var(--radius-lg); }
.split-text { display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split .photo { height: 320px; }
}

.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks svg { color: var(--volt); flex: none; margin-top: 3px; }
.on-white .checks svg, .section:not(.on-dark) .checks svg { color: var(--volt-dark); }

.quote {
  margin: 0; padding: 28px; border-radius: 20px; background: var(--ink-2); border: 1px solid var(--ink-line);
  display: flex; flex-direction: column; gap: 14px;
}
.quote p { font-size: 19px; color: var(--paper) !important; }
.quote footer { font-size: 14px; color: var(--muted-dark); }

/* ---------- Valeurs (à propos) ---------- */
.value { padding: 28px; border-radius: 20px; background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.value p { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 24px; }
.faq summary {
  cursor: pointer; font-weight: 700; font-size: 18px; padding: 20px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 26px; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 20px; color: var(--muted); }

/* ---------- Bandeau appel à l'action ---------- */
.cta-band { background: var(--volt); color: var(--ink); }
.cta-band .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; padding-top: 56px; padding-bottom: 56px; }
.cta-band h2 { font-size: clamp(34px, 4vw, 48px); max-width: 20ch; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; }

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

.info-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.info-row { display: flex; gap: 14px; align-items: center; }
.info-row .icon { width: 46px; height: 46px; border-radius: 12px; }
.info-row .icon svg { width: 20px; height: 20px; }
.info-row small { display: block; font-size: 13px; color: var(--muted); }
.info-row a, .info-row strong { font-weight: 700; text-decoration: none; }

.form {
  background: var(--ink); color: var(--paper); border-radius: var(--radius-lg); padding: 40px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px;
}
.form .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; padding: 28px; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea {
  min-height: 52px; padding: 12px 16px; border-radius: 12px;
  border: 1.5px solid #3A4654; background: var(--ink-2); color: var(--paper);
  font: inherit; font-size: 16px;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input::placeholder, .field textarea::placeholder { color: #8693A1; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--volt); outline: none; }
.field .error { font-size: 13px; color: #FFB4A8; min-height: 0; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #FF8A7A; }
.form .btn { width: 100%; }
.form-note { font-size: 13px; color: var(--muted-dark); }
.form-success {
  grid-column: 1 / -1; background: var(--volt); color: var(--ink);
  padding: 16px 20px; border-radius: 12px; font-weight: 600;
}
.form-success[hidden] { display: none; }

.map-box { margin-top: 20px; height: 260px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.map-box iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Pied de page ---------- */
.site-footer { background: #0A1119; color: var(--muted-dark); font-size: 15px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
  padding-top: 64px; padding-bottom: 48px;
}
.footer-grid h3 { color: var(--paper); font-size: 15px; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { color: var(--muted-dark); text-decoration: none; }
.footer-grid a:hover { color: var(--volt); }
.footer-grid .brand { margin-bottom: 14px; }
.footer-bottom { border-top: 1px solid #1E2A37; }
.footer-bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 24px; font-size: 13px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Barre d'appel mobile ---------- */
.call-bar { display: none; }
@media (max-width: 640px) {
  .call-bar {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--paper); border-top: 1px solid var(--line);
  }
  .call-bar .btn { flex: 1; min-height: 50px; padding: 0 12px; }
  body { padding-bottom: 76px; }
}
