/* ==========================================================================
   Form VAE Éligibilité LP — Q1 embedded + Modal full-screen
   ========================================================================== */

/* ============== Q1 EMBEDDED (visible sur la landing) ============== */
.vae-elig-lp-embedded {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px;
  font-family: inherit;
  color: #1a1a1a;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.vae-elig-lp-embedded *,
.vae-elig-lp-embedded *::before,
.vae-elig-lp-embedded *::after { box-sizing: border-box; }

.vae-elig-lp-embedded__title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 20px;
  line-height: 1.3;
  text-align: center;
}

.vae-elig-lp-embedded__pills {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vae-elig-lp-embedded .vae-elig-lp-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;
}

.vae-elig-lp-embedded .vae-elig-lp-embedded__pill:hover,
.vae-elig-lp-embedded .vae-elig-lp-embedded__pill:active,
.vae-elig-lp-embedded .vae-elig-lp-embedded__pill:focus {
  background: #e8f0fb !important;
  border-color: #4A90D9 !important;
  color: #4A90D9 !important;
  outline: none !important;
}

.vae-elig-lp-embedded .vae-elig-lp-embedded__pill:active {
  transform: scale(0.98);
}

.vae-elig-lp-embedded__emoji {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

/* ============== MODAL FULL-SCREEN ============== */

.vae-elig-lp-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;
}

.vae-elig-lp-modal[hidden] { display: none !important; }
.vae-elig-lp-modal.is-open { opacity: 1; transform: translateY(0); }

.vae-elig-lp-modal *,
.vae-elig-lp-modal *::before,
.vae-elig-lp-modal *::after { box-sizing: border-box; }

.vae-elig-lp-modal button,
.vae-elig-lp-modal .vae-elig-lp-pill,
.vae-elig-lp-modal label { touch-action: manipulation; }

/* Croix fermeture — verrouillée contre les styles thème */
.vae-elig-lp-modal .vae-elig-lp-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;
}

.vae-elig-lp-modal .vae-elig-lp-modal__close:hover,
.vae-elig-lp-modal .vae-elig-lp-modal__close:active,
.vae-elig-lp-modal .vae-elig-lp-modal__close:focus {
  background: #e1e8ef !important;
  color: #1a1a1a !important;
  outline: none !important;
  box-shadow: none !important;
}

.vae-elig-lp-modal .vae-elig-lp-modal__close svg {
  display: block !important;
  width: 24px !important;
  height: 24px !important;
  stroke: currentColor !important;
  fill: none !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.vae-elig-lp-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 */
.vae-elig-lp-progress {
  margin-bottom: 20px;
  flex-shrink: 0;
}
.vae-elig-lp-progress__bar {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}
.vae-elig-lp-progress__fill {
  height: 100%;
  background: #4A90D9;
  border-radius: 3px;
  transition: width 0.4s ease;
}

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

/* Étapes avec slide */
.vae-elig-lp-step {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transform: translateX(40px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.vae-elig-lp-step.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.vae-elig-lp-step.slide-out-left  { transform: translateX(-40px); opacity: 0; }
.vae-elig-lp-step.slide-in-right  { transform: translateX(40px); opacity: 0; }
.vae-elig-lp-step.slide-out-right { transform: translateX(40px); opacity: 0; }
.vae-elig-lp-step.slide-in-left   { transform: translateX(-40px); opacity: 0; }

.vae-elig-lp-step__title {
  font-size: 19px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 8px;
  line-height: 1.3;
}

.vae-elig-lp-step__description {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* Pills (Q2-Q6, Q8) */
.vae-elig-lp-pills {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.vae-elig-lp-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  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;
}

.vae-elig-lp-pill:active,
.vae-elig-lp-pill.is-selected {
  border-color: #4A90D9;
  background: #e8f0fb;
  color: #4A90D9;
}

.vae-elig-lp-pill__emoji {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}

.vae-elig-lp-pills--multi .vae-elig-lp-pill.is-selected::after {
  content: "✓";
  margin-left: auto;
  font-weight: 700;
  font-size: 18px;
  color: #4A90D9;
}

/* Champs texte (Q9) */
.vae-elig-lp-field { margin-bottom: 16px; }

.vae-elig-lp-field__label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.vae-elig-lp-modal .vae-elig-lp-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;
}

.vae-elig-lp-modal .vae-elig-lp-field__input:focus {
  border: 2px solid #4A90D9 !important;
}

.vae-elig-lp-modal .vae-elig-lp-field__input.is-error {
  border: 2px solid #e74c3c !important;
}

.vae-elig-lp-field__error {
  font-size: 13px;
  color: #e74c3c;
  margin-top: 6px;
  display: none;
}

.vae-elig-lp-field__error.is-visible { display: block; }

/* Checkboxes */
.vae-elig-lp-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;
}

.vae-elig-lp-checkbox input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 0;
  flex-shrink: 0;
  accent-color: #4A90D9;
  cursor: pointer;
}

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

/* ============== AUTOCOMPLÉTION CERTIFICATION (Q7) ============== */

.vae-elig-lp-search {
  position: relative;
  margin-top: 12px;
}

.vae-elig-lp-modal .vae-elig-lp-search__input {
  width: 100%;
  padding: 14px 40px 14px 16px;
  font-size: 16px;
  font-family: inherit;
  border: 2px solid #d0dce8 !important;
  border-radius: 10px !important;
  outline: none !important;
  box-shadow: none !important;
  background: #fff;
  color: #1a1a1a;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.vae-elig-lp-modal .vae-elig-lp-search__input:focus {
  border: 2px solid #4A90D9 !important;
}

.vae-elig-lp-search__clear {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 16px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vae-elig-lp-search__clear:hover { background: #f0f4f8; color: #1a1a1a; }

.vae-elig-lp-search__results {
  position: relative;
  margin-top: 6px;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d0dce8;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.vae-elig-lp-search__result {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid #f0f4f8;
  transition: background 0.15s;
}

.vae-elig-lp-search__result:last-child { border-bottom: none; }

.vae-elig-lp-search__result:hover,
.vae-elig-lp-search__result.is-highlighted {
  background: #e8f0fb;
  color: #4A90D9;
}

.vae-elig-lp-search__result-empty {
  padding: 14px;
  font-size: 14px;
  color: #6b7280;
  font-style: italic;
  text-align: center;
}

.vae-elig-lp-search__result-code {
  font-weight: 600;
  color: #4A90D9;
  margin-right: 6px;
}

/* Bouton "Je ne sais pas encore" — option secondaire sous la recherche */
.vae-elig-lp-modal .vae-elig-lp-dontknow {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  background: #f0f4f8 !important;
  background-image: none !important;
  border: 2px dashed #d0dce8 !important;
  border-radius: 10px !important;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #4b5563 !important;
  text-align: center;
  text-shadow: none !important;
  box-shadow: none !important;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
}

.vae-elig-lp-modal .vae-elig-lp-dontknow:hover,
.vae-elig-lp-modal .vae-elig-lp-dontknow:active,
.vae-elig-lp-modal .vae-elig-lp-dontknow:focus {
  border-color: #4A90D9 !important;
  background: #e8f0fb !important;
  color: #4A90D9 !important;
  outline: none !important;
}

.vae-elig-lp-modal .vae-elig-lp-dontknow[hidden] {
  display: none !important;
}

.vae-elig-lp-selected {
  margin-top: 12px;
  padding: 12px 14px;
  background: #e8f0fb;
  border: 2px solid #4A90D9;
  border-radius: 10px;
}

.vae-elig-lp-selected__label {
  font-size: 12px;
  color: #4A90D9;
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vae-elig-lp-selected__value {
  font-size: 14px;
  color: #1a1a1a;
  line-height: 1.4;
}

/* ============== NAVIGATION (bouton bas, toujours visible) ============== */

.vae-elig-lp-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);
}

.vae-elig-lp-modal .vae-elig-lp-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;
}

.vae-elig-lp-modal .vae-elig-lp-btn-prev:hover,
.vae-elig-lp-modal .vae-elig-lp-btn-prev:active {
  color: #4A90D9;
}

.vae-elig-lp-modal .vae-elig-lp-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;
}

.vae-elig-lp-modal .vae-elig-lp-btn-next:hover,
.vae-elig-lp-modal .vae-elig-lp-btn-next:active {
  background: #3a7bc8;
}

.vae-elig-lp-modal .vae-elig-lp-btn-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.vae-elig-lp-btn-next .vae-elig-lp-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: vae-elig-lp-spin 0.6s linear infinite;
}

.vae-elig-lp-btn-next.is-loading .vae-elig-lp-spinner { display: inline-block; }
.vae-elig-lp-btn-next.is-loading .vae-elig-lp-btn-text { display: none; }

@keyframes vae-elig-lp-spin {
  to { transform: rotate(360deg); }
}

/* ============== ÉCRANS TERMINAUX ============== */

.vae-elig-lp-step--terminal { padding-top: 8vh; }

.vae-elig-lp-confirmation {
  text-align: center;
  padding: 20px 0;
}

.vae-elig-lp-confirmation__icon {
  font-size: 64px;
  margin-bottom: 16px;
  line-height: 1;
}

.vae-elig-lp-confirmation__title {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
  line-height: 1.2;
}

.vae-elig-lp-confirmation__subtitle {
  font-size: 20px;
  font-weight: 600;
  color: #4A90D9;
  margin-bottom: 16px;
}

.vae-elig-lp-confirmation__text {
  font-size: 15px;
  color: #4b5563;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
}

.vae-elig-lp-rejected {
  text-align: center;
  padding: 20px 0;
}

.vae-elig-lp-rejected__icon {
  font-size: 56px;
  margin-bottom: 16px;
  line-height: 1;
}

.vae-elig-lp-rejected__title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 12px;
  line-height: 1.3;
}

.vae-elig-lp-rejected__text {
  font-size: 15px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.vae-elig-lp-modal .vae-elig-lp-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;
}

.vae-elig-lp-modal .vae-elig-lp-rejected__cta:hover,
.vae-elig-lp-modal .vae-elig-lp-rejected__cta:active,
.vae-elig-lp-modal .vae-elig-lp-rejected__cta:focus,
.vae-elig-lp-modal .vae-elig-lp-rejected__cta:visited {
  background: #3a7bc8 !important;
  color: #fff !important;
  text-decoration: none !important;
  outline: none !important;
}

/* ============== RESPONSIVE ============== */

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

@media (max-width: 360px) {
  .vae-elig-lp-modal__inner { padding: 56px 12px 0; }
  .vae-elig-lp-step__title { font-size: 17px; }
  .vae-elig-lp-pill { padding: 12px; font-size: 14px; gap: 8px; }
  .vae-elig-lp-pill__emoji { font-size: 18px; }
  .vae-elig-lp-checkbox { font-size: 13px; }
}
