/**
 * BLACK SHIELD SÉCURITÉ — Tunnel de devis multi-étapes (Stepper)
 * Alignement strict sur la charte graphique du site racine (Or/Ambre #EAA50C, Dark #1a1a1a, Green #00875a)
 */

/* ——— Polices Typographiques "Metric" ——— */
@font-face {
  font-family: 'Metric Light';
  src: local('Metric Light'), local('Metric-Light'), local('MetricLight'), local('Metric');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Metric Bold';
  src: local('Metric Bold'), local('Metric-Bold'), local('MetricBold'), local('Metric');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Metric';
  src: local('Metric Light'), local('Metric-Light'), local('MetricLight');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Metric';
  src: local('Metric Bold'), local('Metric-Bold'), local('MetricBold');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #EAA50C;
  --brand-dark: #c88907;
  --brand-light: #fffdf5;
  --dark: #1a1a1a;
  --dark-gray: #2b2b2b;
  --gray-bg: #f8f9fa;
  --gray-border: #e2e8f0;
  --gray-text: #4b5563;
  --gray-muted: #6b7280;
  --green: #00875a;
  --green-light: #e6f4ea;
  --font-content: 'Metric Light', 'Metric-Light', 'Metric', 'Inter', system-ui, -apple-system, sans-serif;
  --font-title: 'Metric Bold', 'Metric-Bold', 'Metric', 'Inter', system-ui, -apple-system, sans-serif;
  --font-sans: var(--font-content);
}

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

body.devis-body {
  margin: 0;
  padding: 0;
  font-family: var(--font-content);
  font-weight: 300;
  color: var(--dark);
  background-color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

p, span, label, input, button, select, textarea, small {
  font-family: var(--font-content);
}

h1, h2, h3, h4, h5, h6,
.devis-step__title,
.devis-header__phone strong,
.devis-choice-btn strong {
  font-family: var(--font-title) !important;
  font-weight: 700 !important;
}

/* --------------------------------------------------------------------------
   Header minimaliste anti-distraction
   -------------------------------------------------------------------------- */
.devis-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.devis-header__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.devis-header__logo img {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
}

.devis-header__right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.devis-header__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--brand-dark);
  text-decoration: none;
  transition: color 0.15s;
}

.devis-header__phone:hover {
  color: var(--brand);
}

.devis-header__phone-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.devis-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background-color: var(--brand);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(234, 165, 12, 0.25);
  border: none;
  cursor: pointer;
}

.devis-header__cta:hover {
  background-color: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 165, 12, 0.35);
}

/* --------------------------------------------------------------------------
   Zone Principale du Stepper
   -------------------------------------------------------------------------- */
.devis-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 60px 20px 220px 20px;
  min-height: calc(100vh + 250px);
}

.devis-stepper-wrapper {
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

/* Barre de progression verte au-dessus du titre */
.devis-progress-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.devis-progress-track {
  width: 140px;
  height: 4px;
  background-color: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  margin-bottom: 8px;
}

.devis-progress-fill {
  height: 100%;
  width: 16.66%;
  background-color: var(--green);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.devis-step-counter {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-muted);
  letter-spacing: 0.02em;
}

/* Barre de navigation : bouton Retour */
.devis-step-meta {
  display: flex;
  align-items: center;
  min-height: 36px;
  margin-bottom: 12px;
}

.devis-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--gray-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s;
}

.devis-btn-back:hover {
  color: var(--dark);
  background-color: #f3f4f6;
}

.devis-btn-back svg {
  width: 16px;
  height: 16px;
}

/* Animation douce entre les étapes (pure opacité, aucun décalage vertical) */
.devis-step {
  display: none;
  animation: fadeInStep 0.2s ease forwards;
}

.devis-step.is-active {
  display: block;
}

@keyframes fadeInStep {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Titre H2 de l'étape */
.devis-step__title {
  font-size: 26px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--dark);
  text-align: center;
  margin: 0 0 28px 0;
}

/* --------------------------------------------------------------------------
   Boutons de Choix (Miroir de .home-protect__choice)
   -------------------------------------------------------------------------- */
.devis-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.devis-choice-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 14px 20px;
  background-color: #ffffff;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #222222;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  text-align: center;
  font-family: inherit;
}

.devis-choice-btn:hover {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(234, 165, 12, 0.25);
}

.devis-choice-btn.is-selected {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Champs de saisie & Boutons de validation
   -------------------------------------------------------------------------- */
.devis-input-group {
  width: 100%;
  margin: 0 auto;
}

.devis-input {
  width: 100%;
  height: 52px;
  padding: 12px 18px;
  font-size: 16px;
  font-family: inherit;
  color: var(--dark);
  background-color: #ffffff;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: center;
}

.devis-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(234, 165, 12, 0.2);
}

.devis-input--postal {
  font-size: 22px;
  letter-spacing: 2px;
  font-weight: 700;
}

.devis-input-error-msg {
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
  text-align: center;
  display: none;
}

.devis-btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 16px auto 0 auto;
  min-height: 52px;
  padding: 14px 24px;
  background-color: var(--brand);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px rgba(234, 165, 12, 0.25);
  font-family: inherit;
}

.devis-btn-submit:hover {
  background-color: var(--brand-dark);
  box-shadow: 0 5px 15px rgba(234, 165, 12, 0.35);
}

.devis-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Formulaire Coordonnées Final */
.devis-form-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.devis-form-fields .devis-input {
  text-align: left;
}

.devis-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.devis-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-text);
  margin-bottom: 5px;
}

.devis-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--gray-text);
  line-height: 1.45;
  cursor: pointer;
}

.devis-checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
  cursor: pointer;
}

/* Phrase de réassurance sous chaque question */
.devis-reassurance {
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--gray-muted);
  margin-top: 28px;
  width: 100%;
}

/* Badge Trustpilot & Avis */
.devis-trustpilot-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
}

.devis-trustpilot-stars {
  display: inline-flex;
  gap: 3px;
}

.devis-trustpilot-star {
  width: 18px;
  height: 18px;
  background-color: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  border-radius: 2px;
}

.devis-legal-link {
  text-align: center;
  font-size: 12px;
  color: var(--gray-muted);
  margin-top: 14px;
}

.devis-legal-link a {
  color: var(--gray-muted);
  text-decoration: underline;
}

.devis-legal-link a:hover {
  color: var(--dark);
}

/* Confirmation de succès */
.devis-success-card {
  text-align: center;
  padding: 40px 24px;
  background: #ffffff;
  border: 1px solid var(--gray-border);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  width: 100%;
}

.devis-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  font-size: 28px;
}

.devis-success-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 12px 0;
}

.devis-success-ref {
  display: inline-block;
  padding: 6px 14px;
  background: #f3f4f6;
  border-radius: 6px;
  font-weight: 700;
  color: var(--brand-dark);
  font-size: 14px;
  margin-bottom: 16px;
}

.devis-success-desc {
  font-size: 15px;
  color: var(--gray-text);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* --------------------------------------------------------------------------
   Footer Sombre Minimaliste (#1a1a1a)
   -------------------------------------------------------------------------- */
.devis-footer {
  background-color: var(--dark);
  color: #9ca3af;
  padding: 36px 20px;
  margin-top: auto;
}

.devis-footer__container {
  max-width: 1140px;
  margin: 0 auto;
  text-align: center;
}

.devis-footer__logo img {
  height: 40px;
  width: auto;
  margin: 0 auto 16px auto;
  display: block;
}

.devis-footer__text {
  font-size: 12px;
  line-height: 1.6;
  max-width: 820px;
  margin: 0 auto 16px auto;
  color: #888888;
}

.devis-footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12px;
  margin-bottom: 14px;
}

.devis-footer__links a {
  color: #aaaaaa;
  text-decoration: none;
  transition: color 0.15s;
}

.devis-footer__links a:hover {
  color: var(--brand);
}

.devis-footer__copy {
  font-size: 12px;
  color: #666666;
}

/* Honeypot */
.hp-field {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Responsive Mobile */
@media (max-width: 640px) {
  .devis-header__container {
    padding: 12px 16px;
  }

  .devis-header__logo img {
    height: 36px;
  }

  .devis-header__phone {
    font-size: 13px;
  }

  .devis-header__cta {
    padding: 8px 16px;
    font-size: 12px;
  }

  .devis-main {
    padding: 36px 16px 180px 16px;
    min-height: calc(100vh + 150px);
  }

  .devis-step__title {
    font-size: 21px;
    margin-bottom: 22px;
  }

  .devis-choice-btn {
    min-height: 50px;
    font-size: 15px;
    padding: 12px 16px;
  }

  .devis-row-2col {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
