/* ============================================
   POMPE À CHALEUR VOSGES - MAIN STYLESHEET
   ============================================ */

/* CSS Variables */
:root {
  /* Couleurs principales */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #10b981;
  --secondary-dark: #059669;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --danger: #ef4444;

  /* Textes */
  --text: #1f2937;
  --text-light: #6b7280;
  --text-lighter: #9ca3af;
  --text-white: #ffffff;

  /* Fonds */
  --bg: #ffffff;
  --bg-alt: #f3f4f6;
  --bg-dark: #111827;
  --bg-darker: #0f172a;

  /* Bordures */
  --border: #e5e7eb;
  --border-light: #f3f4f6;

  /* Ombres */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Typographie */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Poppins', var(--font-primary);

  /* Espacements */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Rayons */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition: 300ms ease;
  --transition-slow: 500ms ease;

  /* Container */
  --container-max: 1200px;
  --container-padding: 1rem;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
  background: var(--bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  max-width: var(--container-max);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo img {
  height: 50px;
  width: auto;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-weight: 500;
  color: var(--text);
  padding: 0.5rem 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  width: 100%;
}

.header-logo {
  height: 45px;
  width: auto;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--text-white);
  border-color: var(--secondary);
}

.btn-secondary:hover {
  background: var(--secondary-dark);
  border-color: var(--secondary-dark);
  color: var(--text-white);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: var(--text-white);
  border-color: var(--accent);
}

.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--text-white);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--text-white);
}

/* Btn outline dans sections sombres */
.hero .btn-outline,
.section-dark .btn-outline,
.urgence-banner .btn-outline {
  color: var(--text-white);
  border-color: var(--text-white);
}

.hero .btn-outline:hover,
.section-dark .btn-outline:hover,
.urgence-banner .btn-outline:hover {
  background: var(--text-white);
  color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: var(--text-white);
  border-color: var(--danger);
}

.btn-icon {
  padding: 0.75rem;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--text-white);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.75rem;
  color: var(--text-white);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 2rem;
  font-weight: 700;
  display: block;
}

.hero-stat-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-white);
}

.section-dark h2,
.section-dark h3 {
  color: var(--text-white);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.section-dark .section-header p {
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   CARDS
   ============================================ */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.card-icon svg {
  width: 30px;
  height: 30px;
  color: var(--text-white);
}

.card h3 {
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.card-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

/* Service Card */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
}

.service-card .price {
  display: inline-block;
  background: var(--bg-alt);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  color: var(--primary);
  margin-top: 1rem;
}

/* ============================================
   AVANTAGES
   ============================================ */

.avantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.avantage-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.avantage-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--text-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.avantage-content h4 {
  margin-bottom: 0.5rem;
}

.avantage-content p {
  color: var(--text-light);
  margin: 0;
}

/* ============================================
   ZONES / CANTONS
   ============================================ */

.zones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.zone-card {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.zone-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.zone-card h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.zone-card .communes-count {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.communes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.communes-list a {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--bg-alt);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: var(--text);
  transition: all var(--transition-fast);
}

.communes-list a:hover {
  background: var(--primary);
  color: var(--text-white);
}

/* ============================================
   FORMULAIRES
   ============================================ */

.form-container {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  overflow: visible;
}

.form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.form-header h3 {
  margin-bottom: 0.5rem;
}

.form-header p {
  color: var(--text-light);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  overflow: visible;
}

.form-group {
  margin-bottom: 1rem;
  overflow: visible;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-lighter);
}

/* Autocomplete */
.autocomplete-wrapper {
  position: relative;
}

.autocomplete-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border: 2px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  max-height: 250px;
  overflow-y: auto;
  z-index: 9999;
  display: none;
}

.autocomplete-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: var(--bg-alt);
}

.autocomplete-item strong {
  color: var(--text);
}

.autocomplete-item .canton-info {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-left: 0.5rem;
}

.autocomplete-item.no-result {
  color: var(--text-light);
  font-style: italic;
  cursor: default;
}

/* Consent / RGPD */
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  margin-top: 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.5;
}

.form-consent input[type="checkbox"] {
  margin-top: 0.15rem;
  min-width: 18px;
  min-height: 18px;
  flex-shrink: 0;
}

.form-consent a {
  color: var(--primary);
  text-decoration: underline;
}

/* ============================================
   FAQ
   ============================================ */

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-primary);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  position: relative;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--text);
  transition: transform var(--transition);
}

.faq-icon::before {
  width: 14px;
  height: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-icon::after {
  width: 2px;
  height: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-item.active .faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
}

.faq-answer-content {
  padding-bottom: 1.25rem;
  color: var(--text-light);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb {
  padding: 1rem 0;
  background: var(--bg-alt);
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-item a {
  color: var(--text-light);
}

.breadcrumb-item a:hover {
  color: var(--primary);
}

.breadcrumb-item.active {
  color: var(--text);
  font-weight: 500;
}

.breadcrumb-separator {
  color: var(--text-lighter);
}

/* ============================================
   URGENCE BANNER
   ============================================ */

.urgence-banner {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color: var(--text-white);
  padding: 2rem 0;
  text-align: center;
}

.urgence-banner h3 {
  color: var(--text-white);
  margin-bottom: 0.5rem;
}

.urgence-banner p {
  opacity: 0.9;
  margin-bottom: 1rem;
}

.urgence-banner .btn {
  background: var(--text-white);
  color: var(--danger);
  border-color: var(--text-white);
}

.urgence-banner .btn:hover {
  background: transparent;
  color: var(--text-white);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 4rem 0 0;
}

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

.footer-col h4 {
  color: var(--text-white);
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--text-white);
}

.footer-logo {
  margin-bottom: 1rem;
}

.footer-logo img {
  height: 40px;
}

.footer-description {
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.footer-contact p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.875rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a:hover {
  color: var(--text-white);
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-light); }

.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-alt { background-color: var(--bg-alt); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }

.hidden { display: none !important; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
  .hero h1 {
    font-size: 2.25rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-md);
  }

  .nav-menu.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding: 3rem 0;
  }

  .hero h1 {
    font-size: 1.875rem;
  }

  .hero-stats {
    gap: 1rem;
  }

  .hero-stat-value {
    font-size: 1.5rem;
  }

  .section {
    padding: 3rem 0;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .avantages-grid {
    grid-template-columns: 1fr;
  }

  .zones-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-col {
    margin-bottom: 1.5rem;
  }

  .faq-question {
    padding: 1rem 0;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}
