:root {
  --primary: #0077B6;
  --secondary: #90E0EF;
  --text-dark: #2b2b2b;
  --text-light: #555555;
  --bg-light: #f9fbfd;
  --white: #ffffff;
  --radius: 8px;
  --transition: 0.3s ease;
  --accent: #ffb703; /* bright CTA color */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  padding-bottom: 80px; /* space for sticky CTA */
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
}

.nav-links .btn {
  padding: 10px 16px;
}

.nav-links a:not(.btn) {
  color: var(--text-dark);
  font-weight: 600;
  transition: var(--transition);
}

.nav-links a:not(.btn):hover {
  color: var(--primary);
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: bold;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover {
  background: #005f92;
  color: var(--white);
}

.btn-accent {
  background: var(--accent);
  color: #000;
}
.btn-accent:hover {
  background: #e5a400;
  color: #000;
}

.btn-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--white);
  color: var(--primary);
  box-shadow: inset 0 0 0 2px var(--primary);
  white-space: nowrap;
}
.btn-phone:hover {
  background: var(--primary);
  color: var(--white);
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.form-phone {
  text-align: center;
  margin: 16px 0;
  font-weight: 600;
}
.form-phone .btn-phone {
  margin-left: 8px;
}

/* Hero Section */
.hero {
  position: relative;
  background: url('https://images.pexels.com/photos/27863809/pexels-photo-27863809.jpeg?auto=compress&cs=tinysrgb&w=1200') center/cover;
  color: var(--white);
  padding: 80px 20px;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 119, 182, 0.85); /* primary color overlay */
}

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

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 32px;
}

/* Hero ville : texte à gauche, formulaire à droite */
.hero-split {
  padding: 60px 0;
  text-align: left;
}
.hero-split::before {
  display: none;
}
.hero-split-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-split .hero-content {
  margin: 0;
}
.hero-split .cta-group {
  justify-content: flex-start;
}
.hero-form {
  background: var(--white);
  color: var(--text-dark);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  scroll-margin-top: 90px;
}
.hero-form-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  text-align: center;
  margin-bottom: 10px;
}
.hero-form iframe {
  width: 100%;
  border: none;
}
.hero-split .hero-form p {
  font-size: 1rem;
  margin: 12px 0 0;
}
@media (max-width: 900px) {
  .hero-split-inner {
    grid-template-columns: 1fr;
  }
}

/* Iframe section */
.iframe-container {
  width: 100%;
  max-width: 1000px;
  margin: 40px auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  background: var(--white);
  padding: 24px;
}

.iframe-container iframe {
  width: 100%;
  border: none;
}

/* Content blocks */
.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--primary);
}

/* Cards & Grids */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.card h3 {
  color: var(--primary);
  margin-bottom: 12px;
}

/* Reviews */
.review {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  margin-bottom: 20px;
}
.review-stars {
  color: var(--accent);
  margin-bottom: 8px;
}
.review-author {
  font-weight: bold;
  margin-top: 12px;
  font-size: 0.9rem;
}

/* Simulator JS */
.simulator {
  background: var(--secondary);
  padding: 40px;
  border-radius: var(--radius);
  text-align: center;
  margin: 40px 0;
  color: #000;
}

.simulator input, .simulator select {
  padding: 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  margin: 10px;
  width: calc(100% - 20px);
  max-width: 300px;
}

.simulator-result {
  margin-top: 20px;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
}

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--primary);
  padding: 12px;
  display: flex;
  gap: 12px;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
  transform: translateY(100%);
  transition: transform var(--transition);
}
.sticky-cta.visible {
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .nav-links a:not(.btn) {
    display: none; /* garde la navbar sur une ligne */
  }
}

@media (max-width: 767px) {
  .nav-links .btn:not(.btn-phone) {
    display: none;
  }
  .logo {
    font-size: 1.05rem;
  }
  .sticky-cta .btn {
    flex: 1;
    padding: 12px 8px;
    font-size: 0.95rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .grid {
    grid-template-columns: 1fr !important; /* grilles inline 1fr 1fr de ville.php */
  }
}

/* Exit Intent Popup */
.exit-popup-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
}

.exit-popup {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  max-width: 500px;
  text-align: center;
  position: relative;
}

.close-popup {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #aaa;
}

.close-popup:hover {
  color: #000;
}

/* Footer */
footer {
  background: #111;
  color: #fff;
  padding: 40px 0;
  text-align: center;
  margin-top: 60px;
}

footer a {
  color: var(--secondary);
}

/* Reveal animation */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}