/* Base & Reset */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --primary: #1A1A1A; /* Dark */
  --secondary: #C87A5E; /* Terracotta */
  --accent: #D4AF37; /* Gold */
  --bg-color: #F8F5F0; /* Warm Beige */
  --bg-light: #FFFFFF;
  --text-dark: #333333;
  --text-light: #666666;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  font-weight: 600;
  line-height: 1.2;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  transition: var(--transition);
  padding: 10px 0;
}

header.scrolled {
  background: rgba(248, 245, 240, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  padding: 5px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo span { color: var(--secondary); }

header.scrolled .logo, header:not(.hero-header) .logo {
  color: var(--primary);
}

header.hero-header:not(.scrolled) .logo {
  color: var(--bg-light);
}

.nav-links {
  display: flex;
  gap: 35px;
  align-items: center;
}

.nav-links li a {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
  color: var(--primary);
  position: relative;
}

header.hero-header:not(.scrolled) .nav-links li a { color: var(--bg-light); }
header.hero-header.scrolled .nav-links li a { color: var(--primary); }

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-links li a:hover::after, .nav-links li a.active::after { width: 100%; }

.btn {
  display: inline-block;
  padding: 16px 36px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-radius: 2px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: 'Montserrat', sans-serif;
  text-align: center;
}

.btn-primary {
  background: var(--secondary);
  color: var(--bg-light) !important;
  box-shadow: 0 4px 15px rgba(200, 122, 94, 0.3);
}

.btn-primary:hover {
  background: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(26, 26, 26, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--secondary);
  border: 1px solid var(--secondary);
}

.btn-outline:hover {
  background: var(--secondary);
  color: var(--bg-light);
}

.btn-nav {
  padding: 12px 24px;
  font-size: 12px;
}

header.hero-header:not(.scrolled) .btn-nav {
  background: var(--accent);
  color: var(--primary) !important;
  box-shadow: none;
}
header.hero-header:not(.scrolled) .btn-nav:hover {
  background: var(--bg-light);
}

.mobile-menu-btn {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--primary);
}

header.hero-header:not(.scrolled) .mobile-menu-btn {
  color: var(--bg-light);
}

/* Sections */
section { padding: 120px 0; }

.section-title {
  text-align: center;
  margin-bottom: 70px;
}

.section-title h2 {
  font-size: 42px;
  margin-bottom: 20px;
}

.section-title p {
  font-size: 18px;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.accent-line {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 20px auto;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Homepage specific styles */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--bg-light);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
  transform: scale(1.05);
  animation: slowZoom 20s linear infinite alternate;
}

@keyframes slowZoom {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(rgba(26,26,26,0.3), rgba(26,26,26,0.4), rgba(26,26,26,0.8));
  z-index: -1;
}

.hero-content {
  max-width: 900px;
  padding: 0 20px;
  margin-top: 60px;
}

.hero-content h1 {
  font-size: 58px;
  color: var(--bg-light);
  margin-bottom: 25px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.4);
  letter-spacing: 1px;
}

.hero-content p {
  font-size: 22px;
  margin-bottom: 40px;
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Value Props */
.value-props { background-color: var(--bg-light); }
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.prop-card {
  background: var(--bg-color);
  padding: 50px 40px;
  border-radius: 4px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(212, 175, 55, 0.1);
  position: relative;
  overflow: hidden;
}

.prop-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transition: var(--transition);
  transform-origin: left;
}

.prop-card:hover::before { transform: scaleX(1); }

.prop-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
  background: var(--bg-light);
  border-color: transparent;
}

.icon-wrapper {
  width: 80px; height: 80px;
  margin: 0 auto 30px;
  border-radius: 50%;
  background: rgba(200, 122, 94, 0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  color: var(--secondary);
  transition: var(--transition);
}

.prop-card:hover .icon-wrapper {
  background: var(--secondary);
  color: var(--bg-light);
}

.prop-card h3 { font-size: 22px; margin-bottom: 15px; }
.prop-card p { color: var(--text-light); }

/* Split Section (Image + Content) */
.split-section { padding: 120px 0; }
.split-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.split-image {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.split-image img { width: 100%; height: 100%; object-fit: cover; transform: scale(1); transition: var(--transition); }
.split-image.tall { height: 600px; }
.split-image:hover img { transform: scale(1.05); }

.split-content h2 { font-size: 42px; margin-bottom: 30px; }
.split-content p { color: var(--text-light); margin-bottom: 25px; font-size: 18px; }

.features-list { margin-top: 30px; }
.features-list li {
  display: flex; align-items: flex-start; gap: 15px;
  margin-bottom: 20px; font-size: 16px; font-weight: 500;
}
.features-list li i { color: var(--accent); font-size: 20px; margin-top: 3px; }

/* How It Works Matrix */
.how-it-works { background: var(--bg-light); }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  position: relative;
}

.step-item {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-num {
  width: 60px; height: 60px;
  background: var(--secondary); color: var(--bg-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 25px;
  font-family: 'Playfair Display', serif;
  font-size: 24px; font-weight: 700;
  box-shadow: 0 4px 15px rgba(200, 122, 94, 0.4);
}

.step-item h3 { font-size: 20px; margin-bottom: 15px; }
.step-item p { color: var(--text-light); font-size: 15px; }

/* Testimonials */
.testimonials { background: var(--primary); color: var(--bg-light); }
.testimonials .section-title h2 { color: var(--bg-light); }
.testimonials .section-title p { color: #aaaaaa; }

.review-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}
.review-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 40px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.1);
}
.review-card .stars { color: var(--accent); margin-bottom: 20px; font-size: 18px; }
.review-card p { font-style: italic; margin-bottom: 30px; font-size: 16px; line-height: 1.8; color: #dddddd; }
.reviewer { display: flex; align-items: center; gap: 15px; }
.reviewer-info h4 { color: var(--bg-light); font-size: 16px; margin: 0; }
.reviewer-info span { font-size: 14px; color: var(--accent); }

/* CTA Overlay */
.cta-overlay-section {
  padding: 140px 0;
  background: linear-gradient(rgba(26,26,26,0.8), rgba(26,26,26,0.9)), url('assets/hero.png') center/cover fixed;
  text-align: center; color: var(--bg-light);
}
.cta-overlay-section h2 { color: var(--bg-light); font-size: 48px; margin-bottom: 30px; }
.cta-overlay-section p { font-size: 20px; margin-bottom: 40px; max-width: 700px; margin-left: auto; margin-right: auto; }

/* Services Page specific */
.service-block { padding: 80px 0; border-bottom: 1px solid #e0dfd5; }
.service-block:last-child { border-bottom: none; }
.service-block:nth-child(even) .split-image { order: 2; }
.service-block:nth-child(even) .split-content { order: 1; }
.service-detail-list { margin-top: 20px; }
.service-detail-list li { margin-bottom: 15px; padding-left: 30px; position: relative; }
.service-detail-list li::before { content: '\f058'; font-family: 'Font Awesome 5 Free'; font-weight: 900; position: absolute; left: 0; top: 2px; color: var(--secondary); font-size: 18px; }

/* Contact Form Specific */
.contact-container {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px;
  background: var(--bg-light); padding: 50px; border-radius: 8px;
  box-shadow: var(--shadow);
  margin-top: -80px; position: relative; z-index: 10;
}
.contact-info .info-item { display: flex; gap: 20px; margin-bottom: 30px; }
.info-item i { font-size: 24px; color: var(--secondary); background: var(--bg-color); padding: 15px; border-radius: 50%; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.info-text h4 { margin-bottom: 5px; font-size: 18px; }
.info-text p { color: var(--text-light); }

.form-group { margin-bottom: 25px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); }
.form-control { width: 100%; padding: 15px 20px; border: 1px solid #ddd; background: #fdfdfd; font-family: inherit; font-size: 16px; transition: var(--transition); border-radius: 2px; }
.form-control:focus { outline: none; border-color: var(--secondary); background: var(--bg-light); box-shadow: 0 0 0 4px rgba(200, 122, 94, 0.1); }
textarea.form-control { min-height: 150px; resize: vertical; }
.map-container { margin-top: 40px; height: 350px; background: #eee; border-radius: 4px; overflow: hidden; }

/* Page Header (Internal Pages) */
.page-header {
  height: 50vh; min-height: 400px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: var(--bg-light); position: relative;
  background-size: cover; background-position: center;
}
.page-header::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(rgba(26,26,26,0.6), rgba(26,26,26,0.8));
  z-index: 1;
}
.page-header-content { position: relative; z-index: 2; padding: 0 20px; margin-top: 80px; }
.page-header h1 { color: var(--bg-light); font-size: 56px; margin-bottom: 15px; }
.page-header p { font-size: 20px; opacity: 0.9; }

/* Footer */
footer { background: var(--primary); color: var(--bg-light); padding: 80px 0 20px; border-top: 5px solid var(--secondary); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 60px; }
.footer-col h3 { color: var(--bg-light); margin-bottom: 25px; font-size: 20px; }
.footer-logo { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; color: var(--bg-light); margin-bottom: 20px; display: inline-block; }
.footer-logo span { color: var(--secondary); }
.footer-col p { color: #aaaaaa; margin-bottom: 20px; line-height: 1.8; }
.footer-links li { margin-bottom: 15px; }
.footer-links a { color: #aaaaaa; font-size: 15px; }
.footer-links a:hover { color: var(--accent); padding-left: 5px; }
.social-links { display: flex; gap: 15px; }
.social-links a { width: 45px; height: 45px; background: rgba(255,255,255,0.05); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--bg-light); transition: var(--transition); border: 1px solid rgba(255,255,255,0.1); }
.social-links a:hover { background: var(--secondary); border-color: var(--secondary); transform: translateY(-3px); }
.footer-bottom { text-align: center; padding-top: 25px; border-top: 1px solid rgba(255,255,255,0.1); color: #777; font-size: 14px; }

/* Popup formulaire */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.65);
  backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #fff;
  width: 100%;
  max-width: 420px;
  padding: 30px 24px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.22);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 992px) {
  .hero-content h1 { font-size: 44px; }
  .grid-3, .review-grid, .steps-grid, .split-container, .contact-container, .footer-grid { grid-template-columns: 1fr; }
  .split-image { order: -1; }
  .service-block:nth-child(even) .split-image { order: -1; }
  .service-block:nth-child(even) .split-content { order: 2; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; width: 100%;
    background: var(--bg-light); flex-direction: column; padding: 30px 0;
    text-align: center; box-shadow: 0 10px 20px rgba(0,0,0,0.1); gap: 20px;
  }
  .nav-links.active { display: flex; }
  header.hero-header:not(.scrolled) .nav-links { background: var(--primary); }
  .mobile-menu-btn { display: block; }
  .hero-content h1 { font-size: 36px; }
  .hero-content p { font-size: 18px; }
  section { padding: 80px 0; }
  .section-title h2 { font-size: 32px; }
  .page-header h1 { font-size: 40px; }
  .steps-grid { grid-template-columns: 1fr; }

  .modal-overlay {
    align-items: flex-end;
    padding: 12px;
  }

  .modal-box {
    max-width: 100%;
    width: 100%;
    border-radius: 18px 18px 0 0;
    padding: 28px 20px calc(20px + env(safe-area-inset-bottom));
    max-height: 85vh;
  }

  .modal-box h3 {
    font-size: 22px !important;
  }
}