/**
 * FinitionMaster - Stylesheet du Simulateur de Devis Interactif
 * 
 * @package FinitionMaster
 */

:root {
  --fm-navy: #0b132b;
  --fm-navy-light: #162447;
  --fm-navy-dark: #070c1d;
  --fm-blue: #00236f;
  --fm-royalblue: #1a44a3;
  --fm-royalblue-hover: #143580;
  --fm-gold: #e6a100;
  --fm-gold-hover: #cf9000;
  --fm-gold-light: #fff8e7;
  --fm-gray-50: #f8fafc;
  --fm-gray-100: #f1f5f9;
  --fm-gray-200: #e2e8f0;
  --fm-gray-300: #cbd5e1;
  --fm-gray-600: #475569;
  --fm-gray-700: #334155;
  --fm-gray-900: #0f172a;
  --fm-shadow-sm: 0 1px 3px rgba(11, 19, 43, 0.05);
  --fm-shadow-md: 0 4px 16px -2px rgba(11, 19, 43, 0.08), 0 2px 6px -1px rgba(11, 19, 43, 0.04);
  --fm-shadow-lg: 0 12px 32px -4px rgba(11, 19, 43, 0.12), 0 4px 12px -2px rgba(11, 19, 43, 0.06);
  --fm-radius: 14px;
}

/* Base Page */
.fm-devis-page {
  background-color: #f8fafc;
  color: var(--fm-gray-900);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

/* ==========================================================================
   1. HERO HEADER DU SIMULATEUR
   ========================================================================== */
.fm-devis-hero {
  background: linear-gradient(135deg, var(--fm-navy) 0%, var(--fm-blue) 100%);
  color: #ffffff;
  padding: 60px 0 50px;
  text-align: center;
  position: relative;
}

.fm-devis-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(230, 161, 0, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.6;
  pointer-events: none;
}

.fm-devis-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--fm-gold);
  margin-bottom: 16px;
}

.fm-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fm-gold);
  box-shadow: 0 0 8px var(--fm-gold);
  animation: fmPulse 2s infinite;
}

@keyframes fmPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.fm-devis-hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 16px;
  color: #ffffff !important;
}


.fm-devis-hero-title strong {
  color: var(--fm-gold);
}

.fm-devis-hero-subtitle {
  font-size: clamp(15px, 1.8vw, 17px);
  color: #cbd5e1;
  max-width: 680px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.fm-devis-trust-tags {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.fm-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}

.fm-trust-icon {
  color: var(--fm-gold);
  font-weight: 800;
}

/* ==========================================================================
   2. SECTION WIZARD & STRUCTURE
   ========================================================================== */
.fm-devis-section {
  padding: 40px 0 80px;
}

.fm-wizard-wrapper {
  max-width: 1180px;
  margin: 0 auto;
}

/* Barre de progression */
.fm-wizard-progress-card {
  background: #ffffff;
  border: 1px solid var(--fm-gray-200);
  border-radius: var(--fm-radius);
  padding: 24px 32px 20px;
  box-shadow: var(--fm-shadow-sm);
  margin-bottom: 28px;
}

.fm-progress-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.fm-step-node {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fm-gray-600);
  font-weight: 600;
  font-size: 14px;
}

.fm-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fm-gray-100);
  border: 2px solid var(--fm-gray-300);
  color: var(--fm-gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  transition: all 0.3s ease;
}

.fm-step-node.active .fm-step-num {
  background: var(--fm-royalblue);
  border-color: var(--fm-royalblue);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(26, 68, 163, 0.15);
}

.fm-step-node.completed .fm-step-num {
  background: var(--fm-gold);
  border-color: var(--fm-gold);
  color: #ffffff;
}

.fm-step-node.active .fm-step-text {
  color: var(--fm-royalblue);
  font-weight: 800;
}

.fm-step-line {
  flex: 1;
  height: 2px;
  background: var(--fm-gray-200);
  margin: 0 12px;
}

.fm-progress-bar-track {
  width: 100%;
  height: 6px;
  background: var(--fm-gray-100);
  border-radius: 10px;
  overflow: hidden;
}

.fm-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fm-royalblue) 0%, var(--fm-gold) 100%);
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Layout 2 colonnes (Main + Sidebar) */
.fm-wizard-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.fm-wizard-main {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  position: relative;
}

/* ==========================================================================
   SYSTÈME ACCORDÉON POUR LES ÉTAPES DU DEVIS
   ========================================================================== */
.fm-accordion-step {
  background: #ffffff;
  border: 1.5px solid var(--fm-gray-200);
  border-radius: var(--fm-radius);
  margin-bottom: 16px;
  box-shadow: var(--fm-shadow-sm);
  transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  scroll-margin-top: 110px;
}

.fm-accordion-step.active {
  border-color: var(--fm-royalblue);
  box-shadow: 0 6px 20px rgba(26, 68, 163, 0.1);
}

.fm-accordion-step.completed {
  border-color: #cbd5e1;
}

.fm-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  cursor: pointer;
  user-select: none;
  background: #ffffff;
  transition: background 0.2s ease;
  gap: 16px;
}

.fm-accordion-step.completed .fm-accordion-header {
  background: #fafcff;
}

.fm-accordion-header:hover {
  background: #f8fafc;
}

.fm-acc-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.fm-acc-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fm-gray-100);
  border: 2px solid var(--fm-gray-300);
  color: var(--fm-gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.fm-accordion-step.active .fm-acc-badge {
  background: var(--fm-royalblue);
  border-color: var(--fm-royalblue);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(26, 68, 163, 0.15);
}

.fm-accordion-step.completed .fm-acc-badge {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
  font-size: 15px;
}

.fm-acc-titles {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.fm-acc-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--fm-navy);
}

.fm-acc-summary {
  font-size: 12px;
  color: var(--fm-royalblue);
  font-weight: 600;
  background: rgba(26, 68, 163, 0.08);
  border: 1px solid rgba(26, 68, 163, 0.18);
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  line-height: 1.3;
  transition: opacity 0.25s ease;
}

/* Tant que l'étape est active, le résumé est masqué */
.fm-accordion-step.active .fm-acc-summary {
  display: none !important;
}

/* Si l'étape n'est pas encore complétée et inactive, le résumé est masqué */
.fm-accordion-step:not(.completed) .fm-acc-summary {
  display: none !important;
}

.fm-acc-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.fm-acc-edit-btn {
  display: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--fm-royalblue);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.fm-accordion-step.completed:not(.active) .fm-acc-edit-btn {
  display: inline-block;
}

.fm-accordion-header:hover .fm-acc-edit-btn {
  background: var(--fm-royalblue);
  color: #ffffff;
  border-color: var(--fm-royalblue);
}

.fm-acc-chevron {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--fm-gray-100);
  color: var(--fm-gray-600);
  font-size: 13px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease, color 0.2s ease;
}

.fm-accordion-step.active .fm-acc-chevron {
  transform: rotate(180deg);
  background: rgba(26, 68, 163, 0.1);
  color: var(--fm-royalblue);
}

/* Transition d'ouverture/fermeture fluide avec grid-template-rows */
.fm-accordion-body-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.fm-accordion-step.active .fm-accordion-body-wrapper {
  grid-template-rows: 1fr;
}

.fm-accordion-body {
  overflow: hidden;
  min-height: 0;
}

.fm-accordion-content {
  padding: 24px 28px 28px;
  border-top: 1px solid var(--fm-gray-200);
}

.fm-step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--fm-gray-200);
}

.fm-step-header {
  margin-bottom: 24px;
}

.fm-step-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--fm-royalblue);
  background: rgba(26, 68, 163, 0.08);
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.fm-step-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--fm-navy);
  margin: 0 0 6px;
}

.fm-step-header p {
  color: var(--fm-gray-600);
  font-size: 14px;
  margin: 0;
}

/* ==========================================================================
   3. CARTES PRESTATIONS (ÉTAPE 1) - DESIGN OPTIMISÉ & COMPACT
   ========================================================================== */
.fm-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

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

@media (max-width: 540px) {
  .fm-services-grid {
    grid-template-columns: 1fr;
  }
}

.fm-service-card {
  position: relative;
  background: #ffffff;
  border: 1.5px solid var(--fm-gray-200);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  user-select: none;
  min-height: 105px;
}

.fm-service-card.fm-service-card-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
}

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

.fm-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.fm-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--fm-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  margin: 0;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.fm-card-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--fm-gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: transparent;
  background: transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.fm-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.fm-card-content h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--fm-navy);
  margin: 0 0 3px;
  line-height: 1.25;
}

.fm-card-content p {
  font-size: 11.5px;
  color: var(--fm-gray-600);
  line-height: 1.35;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fm-card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--fm-royalblue);
  background: #edf2fe;
  padding: 2px 7px;
  border-radius: 4px;
  width: fit-content;
  margin-top: auto;
}

.fm-service-card-wide .fm-card-top {
  margin-bottom: 0;
}

.fm-service-card-wide .fm-card-content p {
  margin-bottom: 0;
}

.fm-service-card:hover {
  border-color: var(--fm-royalblue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 68, 163, 0.08);
}

.fm-service-card.selected {
  border-color: var(--fm-royalblue);
  background: #f8faff;
  box-shadow: 0 0 0 2px var(--fm-royalblue);
}

.fm-service-card.selected .fm-card-icon {
  background: rgba(26, 68, 163, 0.12);
}

.fm-service-card.selected .fm-card-check {
  background: var(--fm-royalblue);
  border-color: var(--fm-royalblue);
  color: #ffffff;
}

/* ==========================================================================
   4. FORMULAIRES & CHAMPS (ÉTAPES 2, 3, 4) - ALIGNEMENT PARFAIT
   ========================================================================== */
.fm-field-group {
  margin-bottom: 20px;
}

.fm-devis-page .fm-label,
.fm-wizard-wrapper .fm-label {
  display: block !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  color: var(--fm-navy) !important;
  margin-bottom: 8px !important;
  line-height: 1.35 !important;
}

.fm-field-sub {
  font-size: 12px;
  color: var(--fm-gray-600);
  margin: -4px 0 10px;
}

.fm-input, .fm-select, .fm-textarea {
  width: 100%;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  border: 1.5px solid var(--fm-gray-300);
  border-radius: 8px;
  background: #ffffff;
  color: var(--fm-gray-900);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.fm-input:focus, .fm-select:focus, .fm-textarea:focus {
  border-color: var(--fm-royalblue);
  box-shadow: 0 0 0 3px rgba(26, 68, 163, 0.12);
}

.fm-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: end;
  margin-bottom: 20px;
}

.fm-row-2col .fm-field-group {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-bottom: 0;
  height: 100%;
}

.fm-row-2col .fm-field-group .fm-label {
  margin-bottom: 8px !important;
}

.fm-row-2col .fm-select,
.fm-row-2col .fm-input,
.fm-row-2col .fm-phone-input-wrap {
  width: 100%;
  margin-top: auto;
}

.fm-divider {
  border: 0;
  height: 1px;
  background: var(--fm-gray-200);
  margin: 24px 0;
}

/* Checkbox & Radio Pills */
.fm-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.fm-pill-check, .fm-pill-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--fm-gray-50);
  border: 1.5px solid var(--fm-gray-300);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--fm-gray-700);
  transition: all 0.2s ease;
  user-select: none;
}

.fm-pill-check input, .fm-pill-radio input {
  margin: 0;
  accent-color: var(--fm-royalblue);
  cursor: pointer;
}

.fm-pill-check:hover, .fm-pill-radio:hover {
  background: #ffffff;
  border-color: var(--fm-royalblue);
}

.fm-pill-check.checked, .fm-pill-radio.checked {
  background: #f0f4ff;
  border-color: var(--fm-royalblue);
  color: var(--fm-royalblue);
}

.fm-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Stepper (+ / -) Moderne & Custom */
.fm-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--fm-gold, #d4a017);
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(11, 19, 43, 0.06);
  height: 44px;
}

.fm-stepper-btn,
.fm-step-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: #f8fafc;
  font-size: 20px;
  font-weight: 700;
  color: var(--fm-navy, #0b132b);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  user-select: none;
  outline: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}

.fm-stepper-btn:hover,
.fm-step-btn:hover {
  background: var(--fm-gold, #d4a017);
  color: #ffffff;
}

.fm-stepper-btn:active,
.fm-step-btn:active {
  background: #b4830c;
  color: #ffffff;
}

.fm-stepper-input,
.fm-stepper input {
  width: 52px;
  height: 44px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--fm-navy, #0b132b);
  outline: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.fm-stepper-input::-webkit-outer-spin-button,
.fm-stepper-input::-webkit-inner-spin-button,
.fm-stepper input::-webkit-outer-spin-button,
.fm-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

/* Sélecteur de Villes (Étape 3) */
.fm-city-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.fm-city-card {
  position: relative;
  background: #ffffff;
  border: 2px solid var(--fm-gray-200);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  user-select: none;
}

.fm-city-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fm-city-icon {
  font-size: 18px;
  margin-bottom: 6px;
}

.fm-city-name {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--fm-navy);
}

.fm-city-sub {
  font-size: 11px;
  color: var(--fm-gray-600);
  margin-bottom: 8px;
}

.fm-city-fee {
  font-size: 12px;
  font-weight: 700;
  color: var(--fm-gold);
}

.fm-city-card:hover {
  border-color: var(--fm-royalblue);
  transform: translateY(-2px);
}

.fm-city-card.selected {
  border-color: var(--fm-royalblue);
  background: #f8faff;
  box-shadow: 0 0 0 2px var(--fm-royalblue);
}

/* Téléphone avec Prefix */
.fm-phone-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--fm-gray-300);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.fm-phone-prefix {
  padding: 0 12px;
  background: var(--fm-gray-100);
  color: var(--fm-gray-700);
  font-weight: 700;
  font-size: 13px;
  border-right: 1.5px solid var(--fm-gray-300);
  height: 44px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.fm-input-phone {
  border: none !important;
  box-shadow: none !important;
}

/* Dropzone Photos */
.fm-dropzone {
  border: 2px dashed var(--fm-gray-300);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  background: var(--fm-gray-50);
  cursor: pointer;
  transition: all 0.2s ease;
}

.fm-dropzone.dragover {
  border-color: var(--fm-royalblue);
  background: #f0f4ff;
}

.fm-dropzone-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

.fm-browse-btn {
  color: var(--fm-royalblue);
  font-weight: 700;
  text-decoration: underline;
}

.fm-dropzone-formats {
  display: block;
  font-size: 12px;
  color: var(--fm-gray-600);
  margin-top: 6px;
}

.fm-photo-previews {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  justify-content: center;
}

.fm-photo-item {
  position: relative;
  width: 70px;
  height: 70px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--fm-gray-300);
}

.fm-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fm-photo-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}

/* Consentement RGPD */
.fm-consent-box {
  margin: 16px 0 24px;
}

.fm-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--fm-gray-600);
  line-height: 1.5;
  cursor: pointer;
}

.fm-consent-label input {
  margin-top: 2px;
}

/* ==========================================================================
   5. NAVIGATION & BOUTONS
   ========================================================================== */
.fm-wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--fm-gray-200);
}

.fm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  font-family: inherit;
}

.fm-btn-back {
  background: var(--fm-gray-100);
  color: var(--fm-gray-700);
}

.fm-btn-back:hover {
  background: var(--fm-gray-200);
  color: var(--fm-navy);
}

.fm-btn-next, .fm-btn-submit {
  background: linear-gradient(135deg, var(--fm-royalblue) 0%, var(--fm-blue) 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(26, 68, 163, 0.25);
  margin-left: auto;
}

.fm-btn-next:hover, .fm-btn-submit:hover {
  background: linear-gradient(135deg, var(--fm-royalblue-hover) 0%, var(--fm-navy) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(26, 68, 163, 0.35);
}

.fm-btn-submit {
  background: linear-gradient(135deg, var(--fm-gold) 0%, #b45309 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(230, 161, 0, 0.3) !important;
}

.fm-btn-submit:hover {
  background: linear-gradient(135deg, var(--fm-gold-hover) 0%, #92400e 100%) !important;
}

.fm-form-error {
  background: #fef2f2;
  border: 1px solid #f87171;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 16px;
}

/* ==========================================================================
   6. SIDEBAR DU CALCULATEUR (STICKY)
   ========================================================================== */
.fm-wizard-sidebar {
  position: sticky;
  top: 100px;
}

.fm-price-card {
  background: #ffffff;
  border: 1px solid var(--fm-gray-200);
  border-radius: var(--fm-radius);
  padding: 28px;
  box-shadow: var(--fm-shadow-md);
  position: relative;
  overflow: hidden;
}

.fm-price-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--fm-royalblue) 0%, var(--fm-gold) 100%);
}

.fm-price-header {
  text-align: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--fm-gray-200);
}

.fm-price-badge {
  display: inline-block;
  background: var(--fm-gold-light);
  color: var(--fm-gold-hover);
  border: 1px solid rgba(230, 161, 0, 0.3);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.fm-price-amount {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--fm-navy);
  line-height: 1.2;
  margin-top: 4px;
}

.fm-price-amount .fm-price-sep {
  color: var(--fm-gold);
  font-weight: 700;
  margin: 0 2px;
}

.fm-price-amount .fm-price-currency {
  font-size: 14px;
  font-weight: 700;
  color: var(--fm-gray-600);
  margin-left: 2px;
}

.fm-price-unit-note,
.fm-price-unit {
  font-size: 13px;
  color: var(--fm-gray-600);
  font-weight: 600;
  margin-top: 4px;
  text-align: center;
}

/* Note d'information indicative dans le calculateur */
.fm-price-disclaimer-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid var(--fm-gold);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 14px 0 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
}

.fm-disclaimer-icon {
  font-size: 16px;
  line-height: 1.2;
  flex-shrink: 0;
}

.fm-price-disclaimer-box p {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--fm-gray-700);
  margin: 0;
}

.fm-price-disclaimer-box strong {
  color: var(--fm-navy);
}

/* Alerte indicative Étape 4 */
.fm-step4-indicatif-alert {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid var(--fm-gold);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 18px 0 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.fm-indicatif-badge-icon {
  font-size: 16px;
  line-height: 1.2;
  flex-shrink: 0;
}

.fm-step4-indicatif-alert p {
  font-size: 12.5px;
  line-height: 1.5;
  color: #92400e;
  margin: 0;
}

.fm-step4-indicatif-alert strong {
  color: #78350f;
}

/* Note indicative récapitulatif succès */
.fm-success-disclaimer-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--fm-gray-300);
}

.fm-success-disclaimer-note p {
  font-size: 12px;
  color: var(--fm-gray-600);
  line-height: 1.45;
  margin: 0;
}


.fm-price-breakdown {
  padding: 16px 0 6px;
  border-bottom: none;
}

.fm-breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
}

.fm-b-label {
  color: var(--fm-gray-600);
  font-weight: 500;
}

.fm-b-val {
  font-weight: 700;
  color: var(--fm-navy);
}

.fm-price-inclusions {
  padding: 16px 0;
  border-bottom: 1px solid var(--fm-gray-200);
}

.fm-price-inclusions h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--fm-navy);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fm-price-inclusions ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fm-price-inclusions li {
  font-size: 12px;
  color: var(--fm-gray-700);
  line-height: 1.5;
  margin-bottom: 6px;
}

.fm-price-direct-call {
  padding-top: 16px;
  text-align: center;
}

.fm-price-direct-call span {
  display: block;
  font-size: 12px;
  color: var(--fm-gray-600);
  margin-bottom: 6px;
}

.fm-direct-phone-link {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--fm-royalblue);
  text-decoration: none;
  transition: color 0.2s;
}

.fm-direct-phone-link:hover {
  color: var(--fm-navy);
}

/* ==========================================================================
   7. ÉCRAN DE SUCCÈS
   ========================================================================== */
.fm-wizard-layout.has-success {
  display: flex !important;
  justify-content: center !important;
}

.fm-wizard-success {
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--fm-gray-200);
  border-radius: 20px;
  padding: 42px 32px;
  max-width: 660px;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 16px 36px -10px rgba(11, 19, 43, 0.08);
  animation: fmFadeInUp 0.4s ease-out;
}

@keyframes fmFadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fm-success-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border: 3px solid #86efac;
  color: #15803d;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 10px 25px -5px rgba(22, 163, 74, 0.25);
}

.fm-wizard-success h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--fm-navy);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.fm-success-sub {
  font-size: 15px;
  color: var(--fm-gray-600);
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.fm-success-recap-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px 26px;
  margin: 0 auto 32px;
  text-align: left;
}

.fm-success-recap-box h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--fm-navy);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
}

.fm-recap-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 14px;
}

.fm-recap-row:last-of-type {
  border-bottom: none;
}

.fm-recap-label {
  color: #64748b;
  font-weight: 500;
}

.fm-recap-row strong {
  color: var(--fm-navy);
  font-weight: 700;
}

.fm-recap-price {
  color: var(--fm-gold, #c5a059) !important;
  font-size: 16px;
  font-weight: 800 !important;
}

.fm-success-disclaimer-note {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: #1e40af;
  margin-top: 14px;
  line-height: 1.45;
}

.fm-success-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.fm-btn-success-call {
  background: var(--fm-navy, #0b132b);
  color: #ffffff !important;
  padding: 14px 26px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 8px 20px -4px rgba(11, 19, 43, 0.22);
}

.fm-btn-success-call:hover {
  background: #1c2b54;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(11, 19, 43, 0.3);
}

.fm-btn-success-home {
  background: #f1f5f9;
  color: #334155 !important;
  padding: 14px 22px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.fm-btn-success-home:hover {
  background: #e2e8f0;
  color: #0f172a !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   8. RESPONSIVE MOBILE & TABLET
   ========================================================================== */
@media (max-width: 991px) {
  .fm-wizard-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .fm-wizard-sidebar {
    position: static;
    order: 2;
    margin-top: 8px;
  }
  .fm-wizard-main {
    padding: 0 !important;
  }
}

@media (max-width: 767px) {
  .fm-devis-section {
    padding: 20px 0 50px;
  }
  .fm-wizard-layout {
    gap: 18px;
  }
  .fm-accordion-step {
    margin-bottom: 12px;
    border-radius: 12px;
  }
  .fm-accordion-header {
    padding: 12px 14px;
    gap: 8px;
  }
  .fm-acc-header-left {
    gap: 10px;
    min-width: 0;
  }
  .fm-acc-badge {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
  .fm-acc-title {
    font-size: 14.5px;
  }
  .fm-acc-summary {
    font-size: 11px;
    padding: 2px 8px;
    line-height: 1.25;
  }
  .fm-acc-header-right {
    gap: 6px;
  }
  .fm-acc-edit-btn {
    font-size: 11px;
    padding: 3px 8px;
  }
  .fm-acc-chevron {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }
  .fm-accordion-content {
    padding: 16px 14px 20px;
  }
  .fm-step-header {
    margin-bottom: 16px;
  }
  .fm-step-header h2 {
    font-size: 18px;
    line-height: 1.3;
  }
  .fm-step-header p {
    font-size: 12.5px;
  }
  .fm-row-2col {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .fm-services-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .fm-service-card.fm-service-card-wide {
    grid-template-columns: auto 1fr;
    padding: 12px 14px;
  }
  .fm-service-card.fm-service-card-wide .fm-card-tag {
    grid-column: 2;
    justify-self: start;
  }
  .fm-city-selector-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .fm-city-card {
    padding: 10px 8px !important;
    min-width: 0;
  }
  .fm-city-name {
    font-size: 13px !important;
  }
  .fm-city-sub {
    font-size: 10px !important;
    margin-bottom: 4px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .fm-city-fee {
    font-size: 11px !important;
  }
  .fm-recap-grid {
    grid-template-columns: 1fr;
  }
  .fm-step-actions {
    flex-direction: column-reverse;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
  }
  .fm-step-actions .fm-btn {
    width: 100%;
    justify-content: center;
  }
  .fm-pill-check,
  .fm-pill-radio {
    font-size: 12px;
    padding: 9px 12px;
  }
  .fm-stepper {
    max-width: 180px;
  }
}

/* Désactiver le bouton retour en haut sur la page devis pour éviter tout masquage de champs */
body.page-template-page-devis #fmBackToTop,
.fm-devis-page #fmBackToTop,
.fm-devis-wrapper-container #fmBackToTop {
  display: none !important;
}

/* Bloc Date d'intervention souhaitée */
.fm-intervention-date-box {
  background: #fdfdfd;
  border: 1.5px solid var(--fm-gold, #d4a017);
  border-radius: 12px;
  padding: 18px 20px;
  margin-top: 18px;
  box-shadow: 0 4px 16px rgba(212, 160, 23, 0.12);
  animation: fmFadeSlideDown 0.3s ease-out;
}

.fm-intervention-date-header {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--fm-navy, #0b132b);
}

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