/* JM Electric 2026 — Global CSS (chargé sur toutes les pages) */

/* =========================================================================
   JM Electric — Stylesheet
   Pure CSS, no framework. Mobile-first.
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  --navy: #1f306b;
  --navy-light: #1863dc;
  --yellow: #ffd233;
  --yellow-soft: #fffbeb;
  --bg: #f8fafc;
  --white: #ffffff;
  --ink-65: rgba(31,48,107,.65);
  --ink-55: rgba(31,48,107,.55);
  --ink-45: rgba(31,48,107,.45);
  --ink-25: rgba(31,48,107,.25);
  --ink-10: rgba(31,48,107,.10);
  --ink-06: rgba(31,48,107,.06);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  --shadow-sm: 0 4px 20px -6px rgba(31,48,107,.06);
  --shadow-md: 0 8px 30px -6px rgba(31,48,107,.07);
  --shadow-lg: 0 20px 60px -12px rgba(31,48,107,.18);
  --shadow-hero: 0 24px 70px -14px rgba(31,48,107,.28);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Barlow Condensed', sans-serif;

  --container: 1600px;
  --container-md: 1280px;
  --container-sm: 960px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 15px;
  line-height: 1.5;
  overflow-x: clip; /* permet aux sections "full-bleed" (breakout 100vw) de sortir du .main sans scrollbar horizontale */
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
p { text-wrap: pretty; margin: 0; }
h1, h2, h3, h4, h5 { margin: 0; }
input, select, textarea { font-family: inherit; font-size: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Accessibilité : focus clavier + skip-link ---------- */
/* Outline visible au clavier uniquement (pas à la souris). currentColor s'adapte
   au contexte (texte sombre sur clair / clair sur sombre). */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
/* Sections à fond foncé : focus en jaune pour rester lisible. */
.pre-footer :focus-visible,
.avis-ent :focus-visible,
.audit-cta :focus-visible,
.arch-hero :focus-visible,
.hero-ent-text :focus-visible,
.rea-lightbox :focus-visible,
.site-footer .footer-cta-row :focus-visible { outline-color: var(--yellow); }

/* Lien d'évitement : caché jusqu'au focus clavier. */
.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 100;
  background: var(--navy);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 0 0 10px 10px;
  font-size: 13px;
  font-weight: 800;
  transition: top .2s;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

/* ---------- Utility ---------- */
.font-display { font-family: var(--font-display); }
.italic { font-style: italic; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.container-md { max-width: var(--container-md); margin: 0 auto; padding: 0 16px; }
.container-sm { max-width: var(--container-sm); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container, .container-md, .container-sm { padding: 0 24px; } }

/* Eyebrow — composant universel avec trait jaune décoratif (V2) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .3em;
  color: rgba(31,48,107,.7); /* contraste AA sur fond clair (avant: --ink-45 trop clair) */
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--yellow);
  flex-shrink: 0;
}
/* Variante "centrée" : trait des deux côtés */
.eyebrow.center {
  justify-content: center;
}
.eyebrow.center::after {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--yellow);
  flex-shrink: 0;
}
/* Variantes couleur */
.eyebrow.eyebrow-blue { color: var(--navy-light); }
.eyebrow.eyebrow-yellow,
.eyebrow.eyebrow-on-navy { color: var(--yellow); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.4vw, 3rem);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--navy);
  line-height: .92;
  letter-spacing: -0.01em;
}
.title-highlight {
  position: relative;
  display: inline-block;
}
.title-highlight::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 12px;
  background: var(--yellow);
  opacity: .55;
  border-radius: 2px;
  z-index: -1;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  transition: background .2s, color .2s, transform .2s;
  white-space: nowrap;
}
.btn .icon { width: 14px; height: 14px; }
.btn-yellow { background: var(--yellow); color: var(--navy); }
.btn-yellow:hover { background: var(--white); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-light); }
.btn-white { background: var(--white); color: var(--navy); border: 1px solid var(--ink-10); }
.btn-white:hover { border-color: var(--ink-25); }
.btn-ghost-light { background: rgba(255,255,255,.08); color: var(--white); border: 1px solid rgba(255,255,255,.20); }
.btn-ghost-light:hover { background: rgba(255,255,255,.15); color: var(--white); }
.btn-sm { padding: 10px 18px; font-size: 10px; }

/* ---------- CF7 : loader dans le bouton submit pendant l'envoi ----------
   État piloté par assets/js/components/cf7-loader.js (classe .jme-submitting).
   Le spinner hérite de la couleur du texte du bouton (currentColor). */
.jme-submitting {
  pointer-events: none;
  cursor: wait;
}
.jme-btn-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: jme-btn-spin .6s linear infinite;
  vertical-align: middle;
}
@keyframes jme-btn-spin { to { transform: rotate(360deg); } }

/* ---------- Urgency bar ---------- */
.urgency-bar {
  background: var(--yellow);
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  text-align: center;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  z-index: 60;
}
.urgency-bar svg { width: 14px; height: 14px; }
.urgency-bar a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}
.urgency-bar a:hover { text-decoration-thickness: 3px; }
.urgency-bar .muted { opacity: .7; }
@media (max-width: 639px) { .urgency-bar .muted { display: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229,231,235,.8);
  transition: padding .2s, box-shadow .2s, background .2s;
}
.site-header.scrolled {
  background: rgba(255,255,255,.98);
  box-shadow: 0 1px 20px rgba(31,48,107,.08);
}
.header-inner {
  max-width: var(--container); /* 1600px — alignement visuel avec .main (qui contient le hero) */
  margin: 0 auto;
  padding: 16px 24px; /* padding latéral 24px = identique au .main, alignement parfait gauche/droite */
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: padding .2s;
}
.site-header.scrolled .header-inner { padding-top: 10px; padding-bottom: 10px; }
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  background: var(--navy);
  color: var(--white);
  padding: 6px 12px;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.04em;
  border-radius: 8px;
  transition: background .2s;
}
.logo:hover .logo-mark { background: var(--navy-light); }
.logo-text {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
/* Logo image (uploadé via Réglages JM Electric > Branding) — SVG ou PNG */
.logo-img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 240px;
}
.site-header.scrolled .logo-img { height: 34px; }
.main-nav {
  display: none;
  gap: 32px;
  align-items: center;
}
@media (min-width: 1024px) { .main-nav { display: flex; } }

/* Reset des <li.menu-item> générés par wp_nav_menu() — s'assure que les items
   restent inline propres dans les flexbox des 3 menus (primary, mobile, footer). */
.main-nav .menu-item,
.mobile-menu nav .menu-item,
.footer-list .menu-item {
  list-style: none;
  margin: 0;
  padding: 0;
  line-height: 1;
}

.nav-link {
  position: relative;
  padding-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--ink-65);
  transition: color .2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--yellow);
  border-radius: 1px;
  transition: width .3s;
}
/* État actif : .active (JS interactif) ou classes WP injectées sur le <li> parent. */
.nav-link:hover,
.nav-link.active,
.current-menu-item > .nav-link,
.current-menu-parent > .nav-link,
.current-menu-ancestor > .nav-link { color: var(--navy); }
.nav-link.active::after,
.nav-link:hover::after,
.current-menu-item > .nav-link::after,
.current-menu-parent > .nav-link::after,
.current-menu-ancestor > .nav-link::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.geo-badge {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--ink-06);
  border: 1px solid var(--ink-10);
}
@media (min-width: 768px) { .geo-badge { display: inline-flex; } }
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #16a34a;
  animation: pulseDot 1.8s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .55; transform: scale(.85); }
}
.geo-badge-text {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: rgba(31,48,107,.75);
}
.menu-toggle {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--navy);
  transition: background .2s;
}
.menu-toggle:hover { background: var(--ink-06); }
@media (min-width: 1024px) { .menu-toggle { display: none; } }
.menu-toggle svg { width: 22px; height: 22px; }
.btn-call-mobile { padding: 12px 20px; font-size: 10px; }
@media (max-width: 639px) { .btn-call-mobile .full { display: none; } }
@media (min-width: 640px) { .btn-call-mobile .short { display: none; } }

/* Mobile menu */
.mobile-menu {
  display: block;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  border-top: 1px solid transparent;
  background: var(--white);
  transition: max-height .35s cubic-bezier(.4,0,.2,1), opacity .25s ease, border-color .35s ease;
}
.mobile-menu.open {
  max-height: 600px;
  opacity: 1;
  border-top-color: #f3f4f6;
}
.mobile-menu nav > * {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .3s ease, transform .3s ease;
}
.mobile-menu.open nav > * {
  opacity: 1;
  transform: translateY(0);
}
.mobile-menu.open nav > *:nth-child(1) { transition-delay: .08s; }
.mobile-menu.open nav > *:nth-child(2) { transition-delay: .14s; }
.mobile-menu.open nav > *:nth-child(3) { transition-delay: .20s; }
.mobile-menu.open nav > *:nth-child(4) { transition-delay: .26s; }
.mobile-menu.open nav > *:nth-child(5) { transition-delay: .32s; }
.mobile-menu.open nav > *:nth-child(6) { transition-delay: .38s; }
/* Hamburger icon morph */
#menu-toggle .icon { transition: transform .3s cubic-bezier(.4,0,.2,1); }
#menu-toggle[aria-expanded="true"] .icon { transform: rotate(90deg); }
.mobile-menu nav {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
}
.mobile-menu-link {
  padding: 14px 0;
  border-bottom: 1px solid #f8fafc;
  font-size: 15.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-65);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-menu-link:last-of-type { border-bottom: none; }
.mobile-menu-link.active,
.current-menu-item > .mobile-menu-link,
.current-menu-parent > .mobile-menu-link,
.current-menu-ancestor > .mobile-menu-link { color: var(--navy); }
.mobile-menu-link svg { width: 14px; height: 14px; color: var(--yellow); }
.mobile-menu-cta {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: 14px;
  border-radius: var(--radius-pill);
}
/* Sans width/height explicite, le <svg use> prend ~300×150 par défaut → bouton géant. */
.mobile-menu-cta svg { width: 14px; height: 14px; flex-shrink: 0; }
@media (min-width: 1024px) { .mobile-menu { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  .mobile-menu, .mobile-menu nav > *, #menu-toggle .icon { transition: none !important; }
}

/* ---------- Main layout ---------- */
.main {
  padding: 24px 16px;
  max-width: var(--container);
  margin: 0 auto;
}
@media (min-width: 768px) { .main { padding: 32px 24px; } }


/* ---------- Section base ---------- */
.section {
  padding: 64px 0;
}
.section-tight {
  padding: 32px 0;
  max-width: 1280px;
  margin: 0 auto;
}
.section-card {
  padding: 64px 32px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(229,231,235,.8);
  max-width: var(--container-md);
  margin: 0 auto;
}
@media (min-width: 1024px) { .section-card { padding: 64px 48px; } }
.section-head { margin-bottom: 48px; }
.section-head.center { text-align: center; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2, .section-head h3 { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; color: var(--navy); line-height: .92; letter-spacing: -0.01em; font-size: clamp(2.2rem, 4.4vw, 3rem); }
.section-head .accent-yellow { color: var(--yellow); }
.section-head p { margin-top: 20px; font-size: 14px; color: var(--ink-65); max-width: 600px; line-height: 1.65; }
.section-head.center p { margin-left: auto; margin-right: auto; }


/* ---------- Footer ---------- */
.site-footer {
  background: var(--white);
  border-top: 4px solid var(--yellow);
}
.footer-cta-row {
  border-bottom: 1px solid #f3f4f6;
}
.footer-cta-inner {
  max-width: var(--container-md);
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
@media (min-width: 640px) { .footer-cta-inner { flex-direction: row; } }
.footer-phone {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer-phone-icon {
  background: var(--yellow);
  color: var(--navy);
  padding: 10px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.footer-phone-icon svg { width: 20px; height: 20px; }
.footer-phone-label {
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .1em; /* tracking-widest dans la maquette V2 */
  color: rgba(31,48,107,.40);
  margin-bottom: 2px;
}
.footer-phone-number {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--navy);
  transition: color .2s;
}
.footer-phone-number:hover { color: var(--navy-light); }

.footer-grid {
  max-width: var(--container-md);
  margin: 0 auto;
  padding: 56px 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 64px; } }
.footer-brand {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.footer-brand .yellow { color: var(--yellow); }
/* Logo image (Réglages JM Electric > Branding) — repris du header */
.footer-brand-img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 240px;
}
.footer-desc {
  font-size: 15.5px;
  color: #6b7280;
  line-height: 1.65;
  margin-bottom: 24px;
}
.footer-zones {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(31,48,107,.35);
}
.footer-zones .sep { color: rgba(31,48,107,.20); }
.footer-col h5 {
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .28em;
  color: rgba(31,48,107,.35);
  margin-bottom: 20px;
}
.footer-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-list a, .footer-list span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 600;
  color: rgba(31,48,107,.65);
  transition: color .2s;
}
.footer-list a:hover { color: var(--navy); }
.footer-list svg { width: 14px; height: 14px; flex-shrink: 0; }
.footer-list .yellow { color: var(--yellow); }
.footer-list .blue { color: var(--navy-light); }

/* Colonne "Services" en pills (texte seul) — style repris de .aller-card-villes */
.footer-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.footer-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  color: rgba(31,48,107,.75);
  background: #fafaf7;
  border: 1px solid rgba(31,48,107,.10);
}

.footer-bottom {
  border-top: 1px solid #f3f4f6;
  background: var(--bg);
}
.footer-bottom-inner {
  max-width: var(--container-md);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
@media (min-width: 640px) { .footer-bottom-inner { flex-direction: row; } }
.footer-bottom-inner p {
  font-size: 10px;
  font-weight: 700;
  color: rgba(31,48,107,0.75);
  text-transform: uppercase;
  letter-spacing: .2em;
}

/* ---------- Mobile call bar ---------- */
.mobile-call-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: 16px;
  box-shadow: 0 -8px 30px -4px rgba(31,48,107,.25);
  transform: translateY(100%);
  opacity: 0;
  transition: transform .3s, opacity .3s;
}
.mobile-call-bar.show {
  transform: translateY(0);
  opacity: 1;
}
.mobile-call-bar:active { transform: scale(.98) translateY(0); }
.mobile-call-bar svg { width: 18px; height: 18px; }
@media (min-width: 1024px) { .mobile-call-bar { display: none !important; } }

body.has-call-bar { padding-bottom: 80px; }
@media (min-width: 1024px) { body.has-call-bar { padding-bottom: 0; } }

.page-id-333 h2.wp-block-heading {
    margin-top: 30px;
    margin-bottom: 5px;
}
