/* ==========================================================================
   Guide Monte-Escalier - Design System & Stylesheet Responsive Mobile-First
   Optimisé pour l'accessibilité senior (contrastes WCAG AA, gros boutons tactiles)
   ========================================================================== */

:root {
  --primary: #16656e;
  --primary-dark: #0f454b;
  --primary-light: #238b97;
  --primary-subtle: #e7f5f4;
  --accent: #2e7d32;
  --accent-light: #e8f5e9;
  --surface: #ffffff;
  --surface-alt: #f4f8f7;
  --surface-card: #ffffff;
  --border: #d0e1df;
  --border-light: #e5eceb;
  --text-main: #1f2d2d;
  --text-muted: #495e5d;
  --text-light: #6b8280;
  --shadow-sm: 0 2px 6px rgba(22, 101, 110, 0.06);
  --shadow-md: 0 4px 16px rgba(22, 101, 110, 0.08);
  --shadow-lg: 0 8px 28px rgba(22, 101, 110, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --font-base: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --header-height: 64px;
}

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

/* Typographie fluide & sécurisation totale overflow */
html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  color: var(--text-main);
  background-color: var(--surface-alt);
  font-family: var(--font-base);
  -webkit-font-smoothing: antialiased;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

@media (min-width: 640px) {
  html {
    font-size: 17px;
  }
}

@media (min-width: 1024px) {
  html {
    font-size: 18px;
  }
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

main {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body.nav-drawer-open {
  overflow: hidden;
}

/* Typographie & Titres fluides */
h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.65rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

h1 {
  font-size: clamp(1.4rem, 4.8vw, 2.25rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.2rem, 3.8vw, 1.7rem);
  margin-top: 2rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--primary-subtle);
}

h3 {
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  margin-top: 1.25rem;
}

p {
  margin-bottom: 1.1rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

strong {
  color: var(--primary-dark);
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
  text-decoration-thickness: 2.5px;
}

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

/* Responsive Image Styles */
.responsive-web-img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: block;
  object-fit: cover;
}

.top-banner-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin: 1.5rem 0 2rem;
  box-shadow: var(--shadow-sm);
  display: block;
}

.section-img-wrap {
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.section-img-wrap img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.vignettes-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (min-width: 600px) {
  .vignettes-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.vignette-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.vignette-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.vignette-card .vignette-caption {
  padding: 0.75rem 0.65rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-dark);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Header & Navigation Responsive Mobile-First */
.site-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 100%;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: var(--header-height);
  padding: 0.5rem 0;
  width: 100%;
  max-width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1rem, 3.8vw, 1.15rem);
  color: var(--primary-dark);
  min-width: 0;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background-color: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-width: 0;
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background-color: var(--primary-subtle);
  color: var(--primary);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
}

/* Hamburger Toggle Button */
.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  cursor: pointer;
  z-index: 1010;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.mobile-menu-btn:hover {
  background: var(--surface-alt);
}

.hamburger-bar {
  width: 100%;
  height: 2.5px;
  background: var(--primary-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-btn.is-active .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.is-active .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.is-active .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Menu Navigation Mobile (Tiroir) vs Desktop (Barre) */
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  padding: 1rem 1.25rem 1.5rem;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.25s ease-out;
  box-sizing: border-box;
}

.site-nav.is-open {
  display: flex;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-link {
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  border-left: 3px solid transparent;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background-color: var(--primary-subtle);
  border-left-color: var(--primary);
  text-decoration: none;
}

.nav-link-highlight {
  color: var(--primary);
  font-weight: 700;
  background: var(--primary-subtle);
}

.nav-cta {
  margin-top: 0.5rem;
  width: 100%;
}

@media (min-width: 900px) {
  .mobile-menu-btn {
    display: none;
  }

  .site-nav {
    display: flex;
    position: static;
    background: transparent;
    border-bottom: none;
    padding: 0;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    box-shadow: none;
    animation: none;
  }

  .nav-link {
    font-size: 0.95rem;
    padding: 0.45rem 0.7rem;
    border-left: none;
  }

  .nav-cta {
    margin-top: 0;
    width: auto;
    min-height: 42px;
    padding: 0.45rem 1.1rem;
    font-size: 0.92rem;
  }
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  min-height: 48px;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff !important;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--primary-dark);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary-subtle);
  text-decoration: none;
}

/* Breadcrumbs */
.breadcrumb-bar {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border-light);
  padding: 0.55rem 0;
  font-size: 0.88rem;
  width: 100%;
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  margin-right: 0.4rem;
  color: var(--text-light);
  font-weight: bold;
}

.breadcrumb-item a {
  text-decoration: none;
  color: var(--text-muted);
}

.breadcrumb-item.current {
  color: var(--text-main);
  font-weight: 600;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #f0f7f6 0%, #e2efe9 100%);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  width: 100%;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero {
    padding: 2.5rem 0 3rem;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  align-items: center;
  width: 100%;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: 2.5rem;
  }
}

.hero-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.hero-surtitle {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: var(--primary-subtle);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: clamp(1.4rem, 4.8vw, 2.25rem);
  color: var(--primary-dark);
  line-height: 1.25;
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2.7vw, 1.15rem);
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  margin-top: 1.25rem;
}

@media (min-width: 580px) {
  .hero-cta-group {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .hero-cta-group .btn {
    width: auto;
  }
}

.hero-cta-group .btn {
  width: 100%;
  box-sizing: border-box;
  white-space: normal;
  line-height: 1.35;
}

/* Quick Department Selector */
.hero-quick-dept {
  margin-top: 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
}

.hero-dept-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.hero-dept-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

@media (min-width: 480px) {
  .hero-dept-controls {
    flex-direction: row;
  }
}

.hero-dept-select {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-main);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.hero-dept-btn {
  padding: 0.65rem 1.15rem;
  font-size: 0.92rem;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 42px;
}

/* 2) HERO ACCUEIL : max-height 380px desktop / 220px mobile, object-fit cover */
.hero-image-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 3px solid #ffffff;
  width: 100%;
  max-width: 100%;
}

.hero-image-wrap img {
  width: 100%;
  height: 220px;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
}

@media (min-width: 900px) {
  .hero-image-wrap img {
    height: 380px;
    max-height: 380px;
  }
}

.hero-badge-overlay {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Banner d'appel Simulateur */
.sim-dept-banner {
  background: linear-gradient(135deg, rgba(22,101,110,0.08) 0%, rgba(22,101,110,0.02) 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin: 1.5rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .sim-dept-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
  }
  .sim-dept-banner .btn {
    width: auto;
  }
}

.sim-dept-banner .btn {
  width: 100%;
  white-space: normal;
}

/* Quick Response Box */
.quick-summary-box {
  background: var(--surface);
  border: 2px solid var(--primary-light);
  border-left: 6px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 640px) {
  .quick-summary-box {
    padding: 1.5rem;
    border-left-width: 8px;
  }
}

.quick-summary-box h2, .quick-summary-box .summary-title {
  font-size: clamp(1.15rem, 3.5vw, 1.35rem);
  margin-top: 0;
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-dark);
}

.quick-data-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (min-width: 580px) {
  .quick-data-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
  }
}

.quick-data-item {
  background: var(--surface-alt);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  min-width: 0;
}

.quick-data-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.quick-data-val {
  font-size: clamp(1.1rem, 3.5vw, 1.25rem);
  font-weight: 800;
  color: var(--primary);
  margin-top: 0.2rem;
}

/* Local Stats Grid Mobile-First */
.local-stats-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 640px) {
  .local-stats-card {
    padding: 1.75rem;
    border-radius: var(--radius-lg);
  }
}

.stats-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1.25rem 0;
}

@media (min-width: 800px) {
  .stats-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}

.stat-box {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.65rem;
  text-align: center;
  min-width: 0;
}

.stat-number {
  font-size: clamp(1.25rem, 4.5vw, 1.75rem);
  font-weight: 800;
  color: var(--primary-dark);
  font-family: var(--font-heading);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  line-height: 1.3;
}

.stat-comparison {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.35rem;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-pill);
}

.stat-high {
  background: #e8f5e9;
  color: #2e7d32;
}

.stat-neutral {
  background: #f0f4f8;
  color: #334e68;
}

/* Conditional insight blocks */
.conditional-callout {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin: 1.25rem 0;
  border-left: 5px solid var(--primary-light);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 640px) {
  .conditional-callout {
    padding: 1.5rem;
  }
}

.conditional-callout.warning {
  border-left-color: #d97706;
  background: #fffdfa;
}

.conditional-callout.highlight {
  border-left-color: #16656e;
  background: #f4fbfb;
}

.callout-title {
  font-weight: 700;
  font-size: clamp(1.05rem, 3.2vw, 1.15rem);
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Price & Comparison Tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  width: 100%;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
  min-width: 480px;
}

table.data-table th {
  background-color: var(--primary-subtle);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 0.75rem 0.9rem;
  border-bottom: 2px solid var(--border);
}

table.data-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
  width: 100%;
}

@media (min-width: 640px) {
  .cards-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 860px) {
  .cards-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

@media (min-width: 640px) {
  .card {
    padding: 1.5rem;
  }
}

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

.card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.15rem;
  color: var(--primary-dark);
  margin-bottom: 0.4rem;
}

/* Steps Process */
.process-steps {
  list-style: none;
  margin: 1.5rem 0;
  counter-reset: step-counter;
}

.process-step {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.5rem;
}

.process-step::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  background-color: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 2px 6px rgba(22, 101, 110, 0.25);
}

.process-step h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

/* Formulaire Vite un devis */
.vud-wrapper {
  margin: 2rem 0;
  width: 100%;
}

.vud-card {
  background: #ffffff;
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: var(--shadow-md);
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .vud-card {
    border-width: 3px;
    border-radius: var(--radius-lg);
    padding: 2rem;
  }
}

.vud-badge {
  display: inline-block;
  background-color: #e8f5e9;
  color: #2e7d32;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.4rem;
  max-width: 100%;
  white-space: normal;
  line-height: 1.35;
  word-break: break-word;
}

.vud-title {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  color: var(--primary-dark);
  margin-bottom: 0.4rem;
  margin-top: 0.2rem;
}

.vud-disclaimer {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  border-left: 3px solid var(--primary-light);
  padding-left: 0.65rem;
}

.vud-container {
  min-height: 260px;
  background: #fbfdfc;
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  border: 1px dashed var(--border);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* 1) Masquer le lien "Retour à la liste des métiers" dans le widget ViteUnDevis en CSS */
.vud-container a[href*="liste-metiers"],
.vud-container a[href*="metiers"],
.vud-container .retour-metiers,
.vud-container .vud-retour {
  display: none !important;
  visibility: hidden !important;
}

/* Masquage générique si le widget génère un lien avec intitulé "Retour à la liste" */
#vud-container-box a:contains("Retour à la liste") {
  display: none !important;
}

/* FAQ Accordion */
.faq-section {
  margin: 2rem 0;
  width: 100%;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-item details {
  padding: 1rem;
}

@media (min-width: 640px) {
  .faq-item details {
    padding: 1.25rem;
  }
}

.faq-item summary {
  font-weight: 700;
  font-size: clamp(1.05rem, 3.2vw, 1.2rem);
  color: var(--primary-dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: bold;
  flex-shrink: 0;
}

.faq-item details[open] summary::after {
  content: "−";
}

.faq-content {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* Voisines & Internal Links Block */
.voisines-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin: 1.75rem 0;
}

@media (min-width: 640px) {
  .voisines-box {
    padding: 1.5rem;
  }
}

.voisines-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.voisine-tag {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary-dark);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.voisine-tag:hover {
  background: var(--primary-subtle);
  border-color: var(--primary);
  text-decoration: none;
}

.voisine-tag-nolink {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--text-muted);
  cursor: default;
}

.voisine-tag-nolink:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.12);
}

/* Sources & Datation Box */
.sources-box {
  background: #f1f6f5;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2rem;
  border-left: 3px solid var(--text-light);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.sources-box p {
  margin-bottom: 0.25rem;
}

/* SIMULATEUR MAPRIMEADAPT' MOBILE OPTIMISÉ */
.sim-hero-header {
  text-align: center;
  padding: 1rem 0;
}

.sim-hero-header h1 {
  margin-top: 0.4rem;
  margin-bottom: 0.5rem;
}

.sim-app-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin: 1.25rem 0;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .sim-app-container {
    border-width: 2px;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
  }
}

.sim-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  gap: 0.25rem;
  width: 100%;
}

.sim-step-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.sim-step-item.active {
  opacity: 1;
}

.sim-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .sim-step-circle {
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
  }
}

.sim-step-item.active .sim-step-circle {
  background: var(--primary);
  color: #ffffff;
}

.sim-step-label {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--primary-dark);
  display: none;
}

@media (min-width: 640px) {
  .sim-step-label {
    display: block;
    font-size: 0.95rem;
  }
}

.sim-step-line {
  flex-grow: 1;
  height: 2px;
  background: var(--border-light);
  margin: 0 0.4rem;
  min-width: 10px;
}

.sim-question-title {
  font-size: clamp(1.2rem, 3.8vw, 1.45rem);
  color: var(--primary-dark);
  margin-top: 0;
  border-bottom: none;
}

.sim-question-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.sim-options-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .sim-options-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

.sim-option-card {
  position: relative;
  display: block;
  cursor: pointer;
  width: 100%;
}

.sim-option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.card-radio-body {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  background: var(--surface);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: all 0.2s ease;
  min-height: 80px;
  box-sizing: border-box;
}

.card-radio-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.card-radio-content strong {
  display: block;
  font-size: 1.05rem;
  color: var(--primary-dark);
  margin-bottom: 0.2rem;
}

.card-radio-content span {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: block;
}

.sim-option-card input[type="radio"]:checked + .card-radio-body {
  border-color: var(--primary);
  background-color: var(--primary-subtle);
  box-shadow: 0 0 0 2px var(--primary);
}

.sim-options-grid-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

@media (min-width: 640px) {
  .sim-options-grid-row {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.sim-pill-option {
  position: relative;
  display: block;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.sim-pill-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sim-pill-option .pill-text {
  display: block;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  text-align: center;
  transition: all 0.2s ease;
  word-break: break-word;
}

.sim-pill-option input[type="radio"]:checked + .pill-text {
  border-color: var(--primary);
  background-color: var(--primary-subtle);
  color: var(--primary-dark);
  box-shadow: 0 0 0 2px var(--primary);
}

.sim-field-group {
  margin-bottom: 1.25rem;
}

.sim-field-group .sim-label {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.sim-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.35;
}

.sim-select, .sim-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-main);
  min-height: 48px;
}

.sim-select:focus, .sim-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 101, 110, 0.2);
}

.sim-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Résultats visuels du simulateur */
.sim-result-card {
  background: #fbfdfd;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .sim-result-card {
    padding: 2rem;
    border-radius: var(--radius-lg);
  }
}

.sim-result-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.95rem;
}

.sim-result-badge.color-bleu {
  background: #e1f5fe;
  color: #0277bd;
  border: 1px solid #b3e5fc;
}

.sim-result-badge.color-jaune {
  background: #fff8e1;
  color: #f57f17;
  border: 1px solid #ffe082;
}

.sim-result-badge.color-credit {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.sim-result-badge.color-hlm {
  background: #ede7f6;
  color: #512da8;
  border: 1px solid #d1c4e9;
}

.sim-kpi-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0;
}

@media (min-width: 640px) {
  .sim-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

.sim-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  min-width: 0;
}

.sim-kpi-card.kpi-highlight {
  background: #f1f8e9;
  border-color: #aed581;
}

.sim-kpi-card.kpi-primary {
  background: var(--primary-subtle);
  border-color: var(--primary-light);
}

.sim-kpi-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.sim-kpi-valeur {
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  font-weight: 800;
  font-family: var(--font-heading);
  line-height: 1.1;
  margin-bottom: 0.3rem;
}

.sim-kpi-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Jauge de répartition */
.sim-gauge-wrap {
  margin: 1.25rem 0;
}

.sim-gauge-bar {
  display: flex;
  height: 32px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 32px;
}

.sim-gauge-segment.segment-aide {
  background: #2e7d32;
  transition: width 0.6s ease;
}

.sim-gauge-segment.segment-reste {
  background: var(--primary);
  transition: width 0.6s ease;
}

.sim-summary-details {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  border: 1px solid var(--border-light);
  margin-top: 1.25rem;
}

.sim-summary-details h4 {
  margin-top: 0;
  font-size: 1.05rem;
}

.sim-summary-details ul {
  list-style: none;
}

.sim-summary-details li {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-main);
}

.sim-cta-box {
  background: linear-gradient(135deg, #f4fbfb 0%, #e2efe9 100%);
  border: 2px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .sim-cta-box {
    padding: 2rem;
    border-radius: var(--radius-lg);
  }
}

.sim-cta-header h3 {
  margin-top: 0;
  font-size: clamp(1.15rem, 3.5vw, 1.4rem);
}

.sim-cta-header p {
  color: var(--text-muted);
  max-width: 700px;
  margin: 0.4rem auto 1.25rem;
  font-size: 0.95rem;
}

/* STICKY ACTION BAR MOBILE */
.mobile-sticky-cta {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  padding: 0.55rem 0.85rem;
  padding-bottom: max(0.55rem, env(safe-area-inset-bottom, 0.55rem));
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.12);
  z-index: 999;
  border-top: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  box-sizing: border-box;
}

.btn-sticky-sim {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: #ffffff;
  color: var(--primary-dark);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.4rem;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  min-height: 44px;
}

.btn-sticky-quote {
  flex: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: var(--primary);
  color: #ffffff !important;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.6rem;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  min-height: 44px;
  box-shadow: 0 2px 6px rgba(22, 101, 110, 0.3);
}

@media (max-width: 899px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 900px) {
  .mobile-sticky-cta {
    display: none;
  }
}

/* Footer */
.site-footer {
  background-color: var(--primary-dark);
  color: #e5eceb;
  margin-top: auto;
  padding: 2.5rem 0 1.25rem;
  font-size: 0.92rem;
  width: 100%;
}

@media (min-width: 768px) {
  .site-footer {
    padding: 3.5rem 0 1.5rem;
  }
}

.site-footer a {
  color: #b8e2dc;
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
  }
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 0.85rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.55rem;
}

.footer-bottom {
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  color: #9cb8b5;
}

/* Scroll Animation System */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}