/* ============================================================
   Rénovation Lavaltrie – Custom CSS
   (Complète Tailwind CDN)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --primary: #1F3A5F;
  --primary-dark: #162B47;
  --accent: #F97316;
  --accent-hover: #EA580C;
  --gray-pale: #F5F5F5;
  --gray-light: #E5E7EB;
  --text: #1F2937;
  --text-light: #6B7280;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', system-ui, sans-serif;
}

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

.header a { text-decoration: none; }

.nav-link {
  color: rgba(255,255,255,0.85);
  transition: color 0.2s;
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-link:hover { color: #fff; }

.hamburger { display: none; cursor: pointer; }
.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 1rem 2rem 2rem;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
  .nav-links.open { display: flex; }
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 5rem 1rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto 2rem;
}

/* ---- Buttons ---- */
.btn-accent {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-block;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s;
}
.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

/* ---- Sections ---- */
.section { padding: 4rem 1rem; }
.section-alt { background: var(--gray-pale); }

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Service Cards ---- */
.service-card {
  background: #fff;
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  padding: 1.75rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.service-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}
.service-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.service-card h3 { font-size: 1.1rem; color: var(--primary); margin-bottom: 0.5rem; }
.service-card p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 1rem; }
.service-budget {
  background: rgba(249,115,22,0.08);
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0.75rem;
  border-radius: 0 6px 6px 0;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}
.service-budget small {
  display: block;
  font-weight: 400;
  color: var(--text-light);
  font-size: 0.8rem;
}

/* ---- Grid layout ---- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---- Budget Table ---- */
.budget-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.budget-table thead { background: var(--primary); color: #fff; }
.budget-table th { padding: 0.85rem 1rem; text-align: left; font-weight: 600; font-size: 0.9rem; }
.budget-table td { padding: 0.75rem 1rem; font-size: 0.9rem; border-bottom: 1px solid var(--gray-light); }
.budget-table tbody tr:hover { background: rgba(249,115,22,0.04); }
.budget-table tbody tr:last-child td { border-bottom: none; }

/* ---- FAQ Accordion ---- */
.faq-item { border-bottom: 1px solid var(--gray-light); }
.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-question:hover { color: var(--accent); }
.faq-arrow { transition: transform 0.3s; font-size: 1.2rem; flex-shrink: 0; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}
.faq-item.open .faq-answer {
  max-height: 500px;
  padding-bottom: 1.25rem;
}

/* ---- CTA Banner ---- */
.cta-banner {
  background: linear-gradient(135deg, var(--accent) 0%, #EA580C 100%);
  color: #fff;
  text-align: center;
  padding: 3rem 1rem;
}
.cta-banner h2 { margin-bottom: 0.75rem; font-size: 1.5rem; }
.cta-banner p { margin-bottom: 1.5rem; opacity: 0.95; }
.cta-banner .btn-white {
  background: #fff;
  color: var(--accent);
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.2s;
}
.cta-banner .btn-white:hover { background: #f1f1f1; }

/* ---- Footer ---- */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 3rem 1rem 1.5rem;
}
.footer a { color: rgba(255,255,255,0.85); text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* ---- Conseils cards ---- */
.conseil-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  border-left: 4px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.conseil-number {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  text-align: center;
  line-height: 32px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

/* ============================================================
   FORM / ESTIMATION PAGE
   ============================================================ */

.form-step { display: none; }
.form-step.active { display: block; }

.step-indicator {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.step-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid var(--gray-light);
  color: var(--text-light);
  background: #fff;
  transition: 0.3s;
}
.step-dot.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.step-dot.completed {
  background: #22C55E;
  color: #fff;
  border-color: #22C55E;
}
.step-connector {
  width: 40px;
  height: 2px;
  background: var(--gray-light);
  align-self: center;
}
.step-connector.active { background: var(--primary); }

/* ---- Form fields ---- */
.form-group { margin-bottom: 1.5rem; }
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 0.95rem;
}
.form-label .required { color: var(--accent); }

.form-select, .form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-light);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s;
  appearance: none;
}
.form-select:focus, .form-input:focus {
  outline: none;
  border-color: var(--primary);
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.radio-group { display: flex; flex-direction: column; gap: 0.5rem; }
.radio-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-light);
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}
.radio-option:hover { border-color: var(--primary); background: rgba(31,58,95,0.03); }
.radio-option input[type="radio"] { accent-color: var(--primary); width: 18px; height: 18px; cursor: pointer; }
.radio-option.selected { border-color: var(--primary); background: rgba(31,58,95,0.06); }

/* ---- Service selection cards ---- */
.service-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.service-select-card {
  border: 2px solid var(--gray-light);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
}
.service-select-card:hover { border-color: var(--primary); background: rgba(31,58,95,0.03); }
.service-select-card.selected {
  border-color: var(--accent);
  background: rgba(249,115,22,0.06);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}
.service-select-card .icon { font-size: 2rem; margin-bottom: 0.5rem; }
.service-select-card .name { font-weight: 600; font-size: 0.9rem; color: var(--primary); }

/* ---- Result display ---- */
.result-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
}
.result-price {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 800;
  margin: 1rem 0;
  font-family: 'Montserrat', sans-serif;
}
.result-disclaimer {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 1rem;
}

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.breakdown-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--gray-light);
  font-size: 0.9rem;
}
.breakdown-table tr:last-child td {
  border-bottom: none;
  font-weight: 700;
  background: rgba(31,58,95,0.04);
}

.factor-tag {
  display: inline-block;
  background: rgba(249,115,22,0.1);
  color: var(--accent-hover);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  margin: 0.2rem;
}

/* ---- Progress bar for form ---- */
.progress-bar-container {
  height: 4px;
  background: var(--gray-light);
  border-radius: 2px;
  margin-bottom: 2rem;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
  border-radius: 2px;
}

/* ---- Container ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 1rem; }

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none !important; }
