/* ==========================================================================
   Form LP Bilan de Compétences — Q1 embedded + Modal full-screen
   Bleu #4A90D9, scopé sous .bdc-* pour éviter les conflits theme.
   ========================================================================== */

/* ============== Q1 EMBEDDED ============== */
.bdc-embedded {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px;
  font-family: inherit;
  color: #1a1a1a;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.bdc-embedded *,
.bdc-embedded *::before,
.bdc-embedded *::after { box-sizing: border-box; }

.bdc-embedded__title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 20px;
  line-height: 1.3;
  text-align: center;
}
.bdc-embedded__pills {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bdc-embedded .bdc-embedded__pill {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 16px 18px;
  background: #f0f4f8 !important;
  background-image: none !important;
  border: 2px solid #d0dce8 !important;
  border-radius: 10px !important;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a !important;
  text-align: left;
  text-shadow: none !important;
  box-shadow: none !important;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  min-height: 56px;
}
.bdc-embedded .bdc-embedded__pill:hover,
.bdc-embedded .bdc-embedded__pill:active,
.bdc-embedded .bdc-embedded__pill:focus {
  background: #e8f0fb !important;
  border-color: #4A90D9 !important;
  color: #4A90D9 !important;
  outline: none !important;
}
.bdc-embedded .bdc-embedded__pill:active {
  transform: scale(0.98);
}
.bdc-embedded__emoji {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

/* ============== MODAL FULL-SCREEN ============== */
.bdc-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: inherit;
  color: #1a1a1a;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.bdc-modal[hidden] { display: none !important; }
.bdc-modal.is-open { opacity: 1; transform: translateY(0); }

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

.bdc-modal button,
.bdc-modal .bdc-pill,
.bdc-modal label { touch-action: manipulation; }

/* Croix fermeture — verrouillée contre le thème */
.bdc-modal .bdc-modal__close {
  position: fixed !important;
  top: 16px !important;
  right: 16px !important;
  z-index: 10 !important;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #f0f4f8 !important;
  background-image: none !important;
  border: none !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #4b5563 !important;
  font-size: 0 !important;
  line-height: 1 !important;
  text-shadow: none !important;
  box-shadow: none !important;
  transition: background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.bdc-modal .bdc-modal__close:hover,
.bdc-modal .bdc-modal__close:active,
.bdc-modal .bdc-modal__close:focus {
  background: #e1e8ef !important;
  color: #1a1a1a !important;
  outline: none !important;
  box-shadow: none !important;
}
.bdc-modal .bdc-modal__close svg {
  display: block !important;
  width: 24px !important;
  height: 24px !important;
  stroke: currentColor !important;
  fill: none !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.bdc-modal__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 64px 16px 0;
  min-height: 0;
}

/* Barre de progression */
.bdc-progress {
  margin-bottom: 20px;
  flex-shrink: 0;
}
.bdc-progress__head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 8px;
}
.bdc-progress__bar {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}
.bdc-progress__fill {
  height: 100%;
  background: #4A90D9;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* Zone scrollable */
.bdc-steps {
  position: relative;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  padding-bottom: 16px;
}

.bdc-step {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* height:0 + overflow:hidden : les étapes inactives (absolues) ne doivent pas
     contribuer à la hauteur de scroll du conteneur — sinon une scrollbar fantôme
     apparaît à cause de l'étape la plus longue (coordonnées) même invisible. */
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(40px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.bdc-step.is-active {
  position: relative;
  height: auto;
  overflow: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
/* Pendant l'animation de sortie, l'étape doit rester mesurable pour glisser */
.bdc-step.slide-out-left,
.bdc-step.slide-out-right {
  height: auto;
}
.bdc-step.slide-out-left  { transform: translateX(-40px); opacity: 0; }
.bdc-step.slide-in-right  { transform: translateX(40px); opacity: 0; }
.bdc-step.slide-out-right { transform: translateX(40px); opacity: 0; }
.bdc-step.slide-in-left   { transform: translateX(-40px); opacity: 0; }

.bdc-step__title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
  line-height: 1.3;
}
.bdc-step__description {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* Écran d'éligibilité (icône + message) */
.bdc-eligibility { margin-bottom: 8px; }
.bdc-eligibility__icon {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 12px;
}
/* Le texte d'accroche RDV doit ressortir plus que la description standard */
.bdc-eligibility .bdc-step__description {
  font-size: 16px;
  color: #374151;
  line-height: 1.6;
}
.bdc-eligibility .bdc-step__description strong {
  color: #1a1a1a;
  font-weight: 700;
}

/* Pills */
.bdc-pills {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.bdc-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #f0f4f8;
  border: 2px solid #d0dce8;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 450;
  color: #3a3a3a;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
}
.bdc-pill:active,
.bdc-pill.is-selected {
  border-color: #4A90D9;
  background: #e8f0fb;
  color: #4A90D9;
}

/* Champs de formulaire */
.bdc-field { margin-bottom: 16px; }
.bdc-field__label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 6px;
}
.bdc-modal .bdc-field__input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  border: 2px solid #d0dce8 !important;
  border-radius: 10px !important;
  outline: none !important;
  box-shadow: none !important;
  color: #1a1a1a;
  background: #fff;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.bdc-modal .bdc-field__input:focus { border: 2px solid #4A90D9 !important; }
.bdc-modal .bdc-field__input.is-error { border: 2px solid #e74c3c !important; }

.bdc-field__error {
  font-size: 13px;
  color: #e74c3c;
  margin-top: 6px;
  display: none;
}
.bdc-field__error.is-visible { display: block; }

/* Checkboxes */
.bdc-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
  cursor: pointer;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.4;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  padding: 6px 0;
}
.bdc-checkbox input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 0;
  flex-shrink: 0;
  accent-color: #4A90D9;
  cursor: pointer;
}

.bdc-mention {
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.5;
  color: #6b7280;
  font-style: italic;
  text-align: center;
}

/* Navigation */
.bdc-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  background: #fff;
  padding: 12px 0 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 16px -8px rgba(0, 0, 0, 0.06);
}
.bdc-modal .bdc-btn-prev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  padding: 12px 4px;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
}
.bdc-modal .bdc-btn-prev:hover,
.bdc-modal .bdc-btn-prev:active { color: #4A90D9; }

.bdc-modal .bdc-btn-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 24px;
  background: #4A90D9;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
  width: 100%;
  max-width: 200px;
  margin-left: auto;
}
.bdc-modal .bdc-btn-next:hover,
.bdc-modal .bdc-btn-next:active { background: #3a7bc8; }
.bdc-modal .bdc-btn-next:disabled { opacity: 0.5; cursor: not-allowed; }

.bdc-modal .bdc-btn-prev.is-hidden,
.bdc-modal .bdc-btn-next.is-hidden { display: none !important; }

.bdc-btn-next .bdc-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bdc-spin 0.6s linear infinite;
}
.bdc-btn-next.is-loading .bdc-spinner { display: inline-block; }
.bdc-btn-next.is-loading .bdc-btn-text { display: none; }
@keyframes bdc-spin { to { transform: rotate(360deg); } }

/* Écrans terminaux */
.bdc-step--terminal { padding-top: 8vh; }

.bdc-confirmation { text-align: center; padding: 20px 0; }
.bdc-confirmation__icon { font-size: 64px; margin-bottom: 16px; line-height: 1; }
.bdc-confirmation__title { font-size: 26px; font-weight: 700; color: #1a1a1a; margin-bottom: 8px; line-height: 1.2; }
.bdc-confirmation__text { font-size: 15px; color: #4b5563; line-height: 1.6; max-width: 480px; margin: 0 auto; }

.bdc-rejected { text-align: center; padding: 20px 0; }
.bdc-rejected__icon { font-size: 56px; margin-bottom: 16px; line-height: 1; }
.bdc-rejected__title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 12px;
  line-height: 1.3;
}
.bdc-rejected__text {
  font-size: 15px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
/* !important pour résister au thème (qui surcharge `a { color }`) */
.bdc-modal .bdc-rejected__cta {
  display: inline-block !important;
  padding: 14px 32px !important;
  background: #4A90D9 !important;
  background-image: none !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  transition: background 0.2s;
}
.bdc-modal .bdc-rejected__cta:hover,
.bdc-modal .bdc-rejected__cta:active,
.bdc-modal .bdc-rejected__cta:focus,
.bdc-modal .bdc-rejected__cta:visited {
  background: #3a7bc8 !important;
  color: #fff !important;
  text-decoration: none !important;
  outline: none !important;
}

/* ============== RESPONSIVE ============== */
@media (min-width: 481px) {
  .bdc-modal__inner { padding: 88px 24px 0; }
  .bdc-modal__close { top: 24px !important; right: 24px !important; width: 48px !important; height: 48px !important; }
  .bdc-step__title { font-size: 24px; margin-bottom: 10px; }
  .bdc-step__description { font-size: 15px; margin-bottom: 20px; }
  .bdc-eligibility .bdc-step__description { font-size: 17px; }
  .bdc-pill { padding: 14px 18px; }
  .bdc-pill:hover { border-color: #4A90D9; background: #f0f5fc; }
  .bdc-modal .bdc-btn-next { width: auto; max-width: none; min-width: 160px; padding: 14px 32px; }
  .bdc-confirmation__icon { font-size: 80px; }
  .bdc-confirmation__title { font-size: 32px; }
}

@media (max-width: 360px) {
  .bdc-modal__inner { padding: 56px 12px 0; }
  .bdc-step__title { font-size: 17px; }
  .bdc-pill { padding: 12px; font-size: 14px; }
  .bdc-checkbox { font-size: 13px; }
}
