/* ═══════════════════════════════════════════════════════════════════════════
   ESTIMATION IMMOBILIÈRE — Infinity Design #2
   Violet profond + Corail • DM Sans • Modern Real Estate
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Palette - Violet & Coral */
  --violet-900: #2d1b4e;
  --violet-800: #3d2663;
  --violet-700: #4c3575;
  --violet-600: #5e4489;
  --violet-500: #7c5cac;
  --violet-100: #ede9f5;
  --violet-50: #f7f5fa;
  
  --coral-600: #e85d4c;
  --coral-500: #ff6b5b;
  --coral-400: #ff8577;
  --coral-100: #ffe5e2;
  
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-100: #ccfbf1;
  
  --gray-900: #1a1a2e;
  --gray-800: #2d2d44;
  --gray-700: #404058;
  --gray-600: #5c5c72;
  --gray-500: #7a7a8c;
  --gray-400: #a0a0b0;
  --gray-300: #c4c4d0;
  --gray-200: #e2e2ea;
  --gray-100: #f4f4f7;
  --gray-50: #fafafc;
  
  --white: #ffffff;
  
  /* Semantic */
  --primary: var(--violet-700);
  --primary-dark: var(--violet-900);
  --primary-light: var(--violet-100);
  --accent: var(--coral-500);
  --accent-dark: var(--coral-600);
  --success: var(--teal-500);
  
  /* Typography */
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'DM Sans', var(--font-sans);
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Borders */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(45, 27, 78, 0.08);
  --shadow-md: 0 4px 12px rgba(45, 27, 78, 0.12);
  --shadow-lg: 0 8px 24px rgba(45, 27, 78, 0.16);
  --shadow-xl: 0 16px 48px rgba(45, 27, 78, 0.2);
  
  --transition: 200ms ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--gray-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

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

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

.lead { font-size: 1.25rem; color: var(--gray-600); }

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section { padding: var(--space-20) 0; }
.section--violet { background: var(--violet-50); }
.section--dark { background: var(--violet-900); color: var(--white); }
.section--dark h2, .section--dark h3 { color: var(--white); }

.grid { display: grid; gap: var(--space-6); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-dark);
}

.logo__icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--violet-600) 0%, var(--violet-900) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.nav { display: flex; align-items: center; gap: var(--space-6); }
.nav__links { display: flex; gap: var(--space-5); list-style: none; }
.nav__link { font-size: 0.9375rem; font-weight: 500; color: var(--gray-700); }
.nav__link:hover { color: var(--primary); }

.nav__cta {
  background: var(--accent);
  color: var(--white);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all var(--transition);
}

.nav__cta:hover {
  background: var(--accent-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 91, 0.4);
}

.nav__toggle { display: none; }

@media (max-width: 800px) {
  .nav__toggle { display: flex; flex-direction: column; gap: 5px; padding: 8px; }
  .nav__toggle span { width: 22px; height: 2px; background: var(--gray-700); }
  .nav__links { display: none; }
}

/* Hero - Image First Style */
.hero {
  padding: calc(72px + var(--space-12)) 0 var(--space-16);
  background: linear-gradient(180deg, var(--violet-50) 0%, var(--white) 100%);
  position: relative;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-12);
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--coral-100);
  color: var(--coral-600);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.hero__title { margin-bottom: var(--space-5); }
.hero__title span { color: var(--accent); }

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: var(--space-8);
}

/* Estimator Card in Hero */
.estimator-card {
  background: var(--white);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
}

.estimator-card__title {
  font-size: 1.25rem;
  margin-bottom: var(--space-6);
  text-align: center;
}

.estimator-card__form { display: grid; gap: var(--space-4); }

.form__group { display: flex; flex-direction: column; gap: var(--space-2); }
.form__label { font-weight: 500; font-size: 0.9375rem; color: var(--gray-700); }

.form__input, .form__select {
  padding: var(--space-4);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all var(--transition);
}

.form__input:focus, .form__select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }

@media (max-width: 800px) {
  .hero__inner { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(76, 53, 117, 0.35);
}

.btn--primary:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 53, 117, 0.45);
}

.btn--accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(255, 107, 91, 0.35);
}

.btn--accent:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 91, 0.45);
}

.btn--lg { padding: var(--space-5) var(--space-10); font-size: 1.0625rem; }
.btn--block { width: 100%; }

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  border: 1px solid var(--gray-100);
}

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

.card__icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--violet-100) 0%, var(--coral-100) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
}

.card__title { font-size: 1.25rem; margin-bottom: var(--space-3); }
.card__text { color: var(--gray-600); }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  text-align: center;
}

.stat__value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat__label {
  color: var(--gray-500);
  font-size: 0.9375rem;
}

@media (max-width: 800px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* Price Table */
.price-table {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.price-table__header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: var(--space-5);
  text-align: center;
}

.price-table__body { padding: var(--space-6); }

.price-table__row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--gray-200);
}

.price-table__row:last-child { border-bottom: none; }
.price-table__label { color: var(--gray-700); }
.price-table__value { font-weight: 600; color: var(--gray-900); }

/* Commune Cards */
.commune-card {
  display: block;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}

.commune-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.commune-card__name {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: var(--space-1);
}

.commune-card__price {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
}

.commune-card__region {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

/* Section Headers */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-12);
}

.section-header__label {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-4);
}

.section-header__title { margin-bottom: var(--space-3); }
.section-header__subtitle { color: var(--gray-600); font-size: 1.125rem; }

/* Testimonial */
.testimonial {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.testimonial__text {
  font-size: 1.125rem;
  color: var(--gray-700);
  font-style: italic;
  margin-bottom: var(--space-6);
}

.testimonial__author { font-weight: 600; color: var(--gray-900); }
.testimonial__location { font-size: 0.875rem; color: var(--gray-500); }
.testimonial__stars { color: #facc15; font-size: 1.25rem; margin-top: var(--space-2); }

/* FAQ */
.faq { max-width: 800px; margin: 0 auto; }
.faq__item { border-bottom: 1px solid var(--gray-200); }

.faq__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: var(--space-5) 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--gray-900);
  text-align: left;
  cursor: pointer;
}

.faq__icon {
  width: 28px;
  height: 28px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: transform var(--transition);
}

.faq__item.open .faq__icon { transform: rotate(45deg); }

.faq__answer {
  display: none;
  padding-bottom: var(--space-5);
  color: var(--gray-600);
}

.faq__item.open .faq__answer { display: block; }

/* Footer */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: var(--space-16) 0 var(--space-8);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-10);
}

.footer__brand { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.footer__brand-icon { width: 44px; height: 44px; background: linear-gradient(135deg, var(--violet-600) 0%, var(--violet-900) 100%); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.footer__brand-name { font-size: 1.125rem; font-weight: 700; color: var(--white); }
.footer__desc { line-height: 1.7; }
.footer__heading { font-size: 0.875rem; font-weight: 600; color: var(--white); margin-bottom: var(--space-4); text-transform: uppercase; letter-spacing: 0.1em; }
.footer__links { display: flex; flex-direction: column; gap: var(--space-3); }
.footer__link { color: var(--gray-400); font-size: 0.9375rem; }
.footer__link:hover { color: var(--white); }

.footer__bottom {
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--gray-800);
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

@media (max-width: 800px) {
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__bottom { flex-direction: column; gap: var(--space-4); text-align: center; }
}

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-6 { margin-bottom: var(--space-6); }

/* Animations */
.animate { opacity: 0; transform: translateY(20px); transition: all 0.5s ease; }
.animate.visible { opacity: 1; transform: translateY(0); }

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 100;
}

.sticky-cta__btn {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 91, 0.5); }
  50% { box-shadow: 0 0 0 12px rgba(255, 107, 91, 0); }
}
