/* ============================================================
   FL HVAC Connect — Design System
   Colors: Blue (#1e40af) + Orange (#f97316)
   DOM order: <main> first, <header> after (position:fixed)
   ============================================================ */

:root {
  --blue-900: #1e3a5f;
  --blue-800: #1e40af;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-400: #fb923c;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --red-600: #dc2626;

  --header-height: 64px;
  --max-width: 1200px;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--white);
  padding-top: calc(var(--header-height) + 36px);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-700); text-decoration: none; }
a:hover { color: var(--blue-900); text-decoration: underline; }

/* ============================================================
   TOP BAR — social proof / trust strip
   ============================================================ */
.topbar-trust {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: var(--blue-900);
  color: #ffffff;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0 1rem;
}
.topbar-trust span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.topbar-trust .stars {
  color: #fbbf24;
  letter-spacing: -1px;
}

@media (max-width: 768px) {
  .topbar-trust {
    gap: 0.5rem;
    font-size: 0.65rem;
    justify-content: center;
    overflow: hidden;
  }
  /* Hide less important items on very small screens */
  .topbar-trust .hide-mobile { display: none; }
}

/* ============================================================
   HEADER — placed AFTER <main> in DOM, fixed at top via CSS
   ============================================================ */
.site-header {
  position: fixed;
  top: 36px;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

.site-header .inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header .logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--blue-800);
  text-decoration: none;
  white-space: nowrap;
}
.site-header .logo span { color: var(--orange-500); }

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-header nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
}
.site-header nav a:hover { color: var(--blue-700); text-decoration: none; }

.header-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--orange-500);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}
.header-phone:hover { background: var(--orange-600); color: var(--white); text-decoration: none; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 2.5rem 0;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero .intro {
  font-size: 1.1rem;
  color: var(--gray-600);
  max-width: 700px;
  margin-bottom: 1.5rem;
}

/* Hero with image — split layout */
.hero-with-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.hero-with-image .hero-content {
  order: 1;
}
.hero-with-image .hero-image {
  order: 2;
}
.hero-with-image .hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  aspect-ratio: 3/2;
}
.hero-with-image .trust-band {
  grid-column: 1 / -1;
  order: 3;
}

/* Section with image */
.section-image {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
  .hero-with-image {
    grid-template-columns: 1fr;
  }
  .hero-with-image .hero-image {
    order: -1;
  }
  .hero-with-image .hero-image img {
    max-height: 250px;
  }
}

/* ============================================================
   PHONE CTA (big, in-page)
   ============================================================ */
.phone-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--orange-500);
  color: var(--white);
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
  box-shadow: var(--shadow-md);
}
.phone-cta:hover {
  background: var(--orange-600);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
}

.phone-cta-huge {
  font-size: 2rem;
  padding: 1.25rem 2.5rem;
}

.phone-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--orange-500);
  color: var(--white);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  font-size: inherit;
  white-space: nowrap;
}
.phone-badge:hover { background: var(--orange-600); color: var(--white); text-decoration: none; }

/* Make ALL inline tel: links visually obvious */
a[href^="tel:"]:not(.phone-cta):not(.phone-cta-huge):not(.phone-badge):not(.header-phone) {
  color: var(--orange-600);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--orange-400);
  padding-bottom: 1px;
  transition: all 0.15s;
}
a[href^="tel:"]:not(.phone-cta):not(.phone-cta-huge):not(.phone-badge):not(.header-phone):hover {
  background: var(--orange-500);
  color: var(--white);
  border-bottom-color: transparent;
  padding: 2px 6px;
  border-radius: 3px;
}
.site-footer a[href^="tel:"] {
  color: var(--orange-400) !important;
  border-bottom: none !important;
}

/* ============================================================
   HERO FORM (devis / estimate)
   ============================================================ */
.hero-form {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  max-width: 500px;
}

.hero-form h2 {
  font-size: 1.25rem;
  color: var(--blue-900);
  margin-bottom: 1rem;
}

.hero-form .form-row {
  margin-bottom: 0.75rem;
}

.hero-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.25rem;
}

.hero-form input,
.hero-form select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--white);
}

.hero-form input:focus,
.hero-form select:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.hero-form button {
  width: 100%;
  padding: 0.75rem;
  background: var(--green-500);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.hero-form button:hover { background: var(--green-600); }

/* ============================================================
   TRUST BAR (numbers strip under hero)
   ============================================================ */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--blue-900);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.trust-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  padding: 0 1rem;
}

.trust-bar-number {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--orange-400);
  line-height: 1.2;
}

.trust-bar-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-300);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
}

.trust-bar-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .trust-bar {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
  }
  .trust-bar-item {
    flex: 0 0 calc(33.33% - 0.5rem);
    padding: 0.25rem 0;
  }
  .trust-bar-number { font-size: 1.1rem; }
  .trust-bar-label { font-size: 0.65rem; }
  .trust-bar-divider { display: none; }
}

/* ============================================================
   MAP SECTION
   ============================================================ */
.map-section {
  margin: 2.5rem 0;
}
.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 1;
}
.map-container iframe,
.map-container .leaflet-container {
  display: block;
  z-index: 1;
}

/* ============================================================
   TRUST BAND
   ============================================================ */
.trust-band {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.25rem 0;
  margin: 1rem 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-700);
}

.trust-item .icon {
  font-size: 1.25rem;
}

/* ============================================================
   SERVICES GRID
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--gray-900);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.service-card:hover {
  border-color: var(--blue-600);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.service-card .icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.service-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; }
.service-card p { font-size: 0.85rem; color: var(--gray-500); }

/* ============================================================
   CITIES GRID / MAILLAGE
   ============================================================ */
.maillage {
  margin: 2.5rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--gray-200);
}

.maillage h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.maillage h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--gray-700);
}

.cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
  list-style: none;
}

.cities-grid li a {
  display: block;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--blue-700);
}
.cities-grid li a:hover { color: var(--blue-900); }

/* ============================================================
   SECTIONS
   ============================================================ */
section { margin: 2rem 0; }
section h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem; }
section h3 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }

.benefits-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.benefits-list li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: var(--gray-700);
}
.benefits-list li::before {
  content: "✓";
  color: var(--green-500);
  font-weight: 700;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq details {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

.faq summary {
  padding: 0.75rem 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::before { content: "▸ "; color: var(--blue-600); }
.faq details[open] summary::before { content: "▾ "; }

.faq details p {
  padding: 0 1rem 0.75rem;
  color: var(--gray-600);
  font-size: 0.95rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 2.5rem 1.5rem 1.5rem;
  margin-top: 3rem;
}

.site-footer .inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-footer a { color: var(--gray-300); }
.site-footer a:hover { color: var(--white); }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h4 {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-grid ul { list-style: none; }
.footer-grid ul li { margin-bottom: 0.35rem; }
.footer-grid ul li a { font-size: 0.85rem; }

.footer-bottom {
  border-top: 1px solid var(--gray-700);
  padding-top: 1rem;
  font-size: 0.8rem;
  text-align: center;
}

/* ============================================================
   STICKY CALL BUTTON (mobile only — floating button, not bar)
   ============================================================ */
.sticky-call-bar {
  display: none;
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: #16a34a;
  border-radius: 50px;
  box-shadow: 0 6px 24px rgba(22, 163, 74, 0.45), 0 3px 10px rgba(0,0,0,0.2);
}

.sticky-call-bar a,
.sticky-call-bar a:link,
.sticky-call-bar a:visited,
.sticky-call-bar a:hover,
.sticky-call-bar a:active,
.sticky-call-bar a:focus {
  color: #ffffff !important;
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 16px 36px !important;
  white-space: nowrap;
  border: none !important;
  border-bottom: none !important;
  background: none !important;
  line-height: 1;
  border-radius: 50px;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  body { padding-bottom: 0; }

  .site-header nav { display: none; }
  .site-header .header-phone { display: none; }

  .hero h1 { font-size: 1.5rem; }
  .hero .intro { font-size: 1rem; }

  .phone-cta { font-size: 1.2rem; padding: 0.75rem 1.5rem; width: 100%; justify-content: center; }
  .phone-cta-huge { font-size: 1.4rem; }

  .services-grid { grid-template-columns: 1fr 1fr; }
  .cities-grid { grid-template-columns: 1fr 1fr; }

  .sticky-call-bar { display: block; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .trust-band { flex-direction: column; gap: 0.75rem; }
}
