/* LOT_BERCY_PUBLIC_PARTICIPATION_UI_V3
   Presentation shell only. Wizard/business CSS and JS stay untouched.
   V3: wizard at 10px, 30% backdrop, real Montserrat 400/500/600/700,
   lighter hierarchy, legal modals aligned to the new black/gold charter. */

:root {
  --bercy-shell-bg: #050301;
  --bercy-shell-gold: #f5bd2c;
  --bercy-shell-gold-soft: #ffe77e;
  --bercy-shell-line: rgba(245, 189, 44, .20);
}

body.participation-page,
body:has(.hero--participation-shell) {
  background:
    radial-gradient(circle at 50% 0%, rgba(126, 71, 12, .055), transparent 30rem),
    var(--bercy-shell-bg);
  font-family: "Montserrat", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
}

.hero--participation-shell {
  display: block;
  min-height: auto;
  padding: 0 clamp(10px, 2.4vw, 28px) 18px;
  overflow: hidden;
  background: transparent;
}

.hero--participation-shell::before,
.hero--participation-shell .hero__bg-orb,
.hero--participation-shell .hero__poster-wash {
  display: none !important;
}

/* Exact V26 raster retained. It is now atmosphere only (30% alpha).
   The embedded CTA remains below the visible crop/fade zone. */
.participation-shell__backdrop {
  position: absolute;
  z-index: -2;
  top: 0;
  left: 50%;
  width: min(1024px, 100vw);
  height: clamp(190px, 39vw, 400px);
  transform: translateX(-50%);
  overflow: hidden;
  pointer-events: none;
  opacity: .30;
  background:
    linear-gradient(180deg,
      rgba(5, 3, 1, .02) 0%,
      rgba(5, 3, 1, .10) 36%,
      rgba(5, 3, 1, .42) 63%,
      rgba(5, 3, 1, .84) 84%,
      #050301 100%),
    url('../img/bercy-participation-backdrop-v1.png') top center / 100% auto no-repeat;
  filter: saturate(.86) contrast(.92);
}

.participation-shell__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,
      rgba(5, 3, 1, .28),
      transparent 21%,
      transparent 79%,
      rgba(5, 3, 1, .28));
}

.participation-shell__sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* User-validated V3 position: the wizard starts 10px from the viewport top. */
.hero--participation-shell .hero__grid--participation-only {
  position: relative;
  z-index: 3;
  display: block;
  width: min(680px, 100%);
  max-width: 680px;
  margin: 10px auto 0;
}

.hero--participation-shell .participation-card {
  width: 100%;
  padding: 15px 16px 16px;
  border-color: rgba(245, 189, 44, .20);
  background:
    linear-gradient(145deg, rgba(255, 221, 151, .025), rgba(134, 72, 22, .018)),
    rgba(14, 9, 6, .86);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, .42),
    0 0 0 1px rgba(255, 255, 255, .012) inset;
  backdrop-filter: blur(17px);
  -webkit-backdrop-filter: blur(17px);
}

/* ---------------------------------------------------------------
   Typographic hierarchy — deliberately restrained.
   The page now loads real Montserrat weights 400/500/600/700.
   --------------------------------------------------------------- */
.hero--participation-shell .participation-card__header {
  margin-bottom: 10px;
}

.hero--participation-shell .participation-card__header h2 {
  font-family: "Montserrat", Inter, sans-serif;
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: -.03em;
}

.hero--participation-shell .participation-card .eyebrow {
  color: var(--bercy-shell-gold-soft);
  font-weight: 600;
  letter-spacing: .12em;
}

.hero--participation-shell .demo-badge {
  color: var(--bercy-shell-gold-soft);
  font-weight: 500;
}

.hero--participation-shell .progress {
  height: 6px;
}

.hero--participation-shell .stepper {
  margin: 11px 0 16px;
}

.hero--participation-shell .stepper__item {
  font-weight: 400;
}

.hero--participation-shell .stepper__item span {
  font-weight: 600;
}

.hero--participation-shell .stepper__item small {
  font-weight: 500;
}

.hero--participation-shell .form-step h3 {
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -.025em;
}

.hero--participation-shell .step-help,
.hero--participation-shell .field-help,
.hero--participation-shell .choice-card small,
.hero--participation-shell .check-row,
.hero--participation-shell .form-alert,
.hero--participation-shell .summary-line {
  font-weight: 400;
}

.hero--participation-shell .step-help {
  margin: 6px 0 15px;
}

.hero--participation-shell .choice-card strong,
.hero--participation-shell .field-label {
  font-weight: 600;
}

.hero--participation-shell .choice-card__country-code,
.hero--participation-shell .input-prefix {
  font-weight: 600;
}

.hero--participation-shell .input-shell input,
.hero--participation-shell .input-shell--intl .iti input,
.hero--participation-shell .select-shell select,
.hero--participation-shell .schengen-country-picker__button,
.hero--participation-shell .iti__selected-dial-code,
.hero--participation-shell .iti__country-name,
.hero--participation-shell .iti__dial-code {
  font-weight: 400;
}

.hero--participation-shell .schengen-country-picker__option.is-selected {
  font-weight: 600;
}

.hero--participation-shell .inline-action {
  font-weight: 500;
}

.hero--participation-shell .jbc-contact-rule-notice {
  font-weight: 400;
}

.hero--participation-shell .jbc-contact-rule-notice strong {
  font-weight: 500;
}

.hero--participation-shell .summary-line strong,
.hero--participation-shell .modal__content strong {
  font-weight: 500;
}

.hero--participation-shell .btn {
  font-weight: 600;
}

.hero--participation-shell .btn--primary {
  background: linear-gradient(180deg, #ffe477 0%, #f5bd2c 58%, #d99108 100%);
  color: #171006;
  box-shadow: 0 9px 22px rgba(245, 189, 44, .15);
}

.hero--participation-shell .progress__bar {
  background: linear-gradient(90deg, #f5bd2c, #ffe77e);
}

/* ---------------------------------------------------------------
   Legal modals — page-local restyling only. Content, IDs and JS stay intact.
   --------------------------------------------------------------- */
.participation-page .legal-modal {
  width: min(940px, calc(100vw - 48px));
  max-height: calc(100dvh - 24px);
  border-radius: 24px;
  color: rgba(255, 255, 255, .86);
}

.participation-page .legal-modal::backdrop {
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.participation-page .legal-modal__panel {
  max-height: calc(100dvh - 24px);
  padding: 22px 24px 24px;
  border: 1px solid rgba(245, 189, 44, .20);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 0%, rgba(245, 189, 44, .055), transparent 22rem),
    rgba(10, 7, 5, .975);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .60);
}

.participation-page .legal-modal .eyebrow {
  max-width: calc(100% - 54px);
  margin-bottom: 8px;
  color: rgba(255, 231, 126, .82);
  font-size: .70rem;
  font-weight: 500;
  letter-spacing: .12em;
}

.participation-page .legal-modal h2 {
  max-width: calc(100% - 54px);
  color: rgba(255, 255, 255, .94);
  font-family: "Montserrat", Inter, sans-serif;
  font-size: clamp(1.28rem, 2.4vw, 1.62rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.participation-page .legal-modal .modal__close {
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-color: rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .045);
  color: rgba(255, 255, 255, .70);
  font-weight: 400;
}

.participation-page .legal-modal .modal__close:hover,
.participation-page .legal-modal .modal__close:focus-visible {
  border-color: rgba(245, 189, 44, .28);
  background: rgba(245, 189, 44, .07);
  color: #fff;
  outline: none;
}

.participation-page .legal-modal .modal__content {
  margin-top: 13px;
  padding-right: 10px;
  color: rgba(255, 255, 255, .74);
  font-size: .92rem;
  font-weight: 400;
  line-height: 1.68;
}

.participation-page .legal-document {
  font-weight: 400;
  line-height: 1.68;
}

.participation-page .legal-document h3 {
  margin: 1.12rem 0 .42rem;
  color: #eebc56;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.participation-page .legal-document h4 {
  margin: .9rem 0 .38rem;
  color: #e7c58d;
  font-size: .94rem;
  font-weight: 500;
  line-height: 1.35;
}

.participation-page .legal-document p,
.participation-page .legal-document li {
  font-weight: 400;
}

.participation-page .legal-document strong {
  color: rgba(255, 255, 255, .90);
  font-weight: 500;
}

.participation-page .legal-modal .modal__content {
  scrollbar-color: rgba(245, 189, 44, .32) rgba(255, 255, 255, .04);
}

.public-legal-footer--minimal {
  padding-top: 3px;
  background: linear-gradient(180deg, rgba(5, 3, 1, 0), #050301 68%);
}

.public-legal-footer--minimal .public-legal-footer__inner {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: min(680px, 100%);
  padding: 8px 12px 11px;
  border-color: rgba(245, 189, 44, .08);
  background: rgba(5, 3, 1, .24);
}

.public-legal-footer--minimal .public-legal-footer__links {
  justify-content: center;
}

.public-legal-footer--minimal .public-legal-footer__links button {
  border-color: transparent;
  background: transparent;
  color: rgba(255, 255, 255, .62);
  font-weight: 400;
}

.public-legal-footer--minimal .public-legal-footer__links button:hover,
.public-legal-footer--minimal .public-legal-footer__links button:focus-visible {
  border-color: rgba(245, 189, 44, .20);
  background: rgba(245, 189, 44, .045);
}

.participation-shell__return--footer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .42);
  font-size: .68rem;
  font-weight: 400;
  line-height: 1.2;
}

.participation-shell__return--footer:hover,
.participation-shell__return--footer:focus-visible {
  color: rgba(255, 255, 255, .78);
  outline: none;
}

@media (max-width: 700px) {
  .hero--participation-shell {
    padding-inline: clamp(8px, 2.8vw, 12px);
    padding-bottom: 14px;
  }

  .participation-shell__backdrop {
    height: clamp(165px, 58vw, 250px);
    opacity: .30;
  }

  .hero--participation-shell .hero__grid--participation-only {
    width: 100%;
    margin-top: 10px;
  }

  .hero--participation-shell .participation-card {
    padding: 13px;
    border-radius: 21px;
  }

  .hero--participation-shell .participation-card__header {
    margin-bottom: 8px;
  }

  .hero--participation-shell .participation-card__header h2 {
    font-size: clamp(1.20rem, 5.5vw, 1.38rem);
  }

  .hero--participation-shell .stepper {
    margin-block: 9px 14px;
  }

  .participation-page .legal-modal {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 20px;
  }

  .participation-page .legal-modal__panel {
    max-height: calc(100dvh - 20px);
    padding: 17px 14px 15px;
    border-radius: 20px;
  }

  .participation-page .legal-modal .eyebrow,
  .participation-page .legal-modal h2 {
    max-width: calc(100% - 46px);
  }

  .participation-page .legal-modal .modal__content {
    margin-top: 10px;
    padding-right: 5px;
    font-size: .88rem;
    line-height: 1.62;
  }

  .participation-page .legal-document h3 {
    font-size: .94rem;
  }

  .participation-page .legal-document h4 {
    font-size: .90rem;
  }

  .public-legal-footer--minimal {
    padding: 5px 8px max(13px, env(safe-area-inset-bottom));
  }

  .public-legal-footer--minimal .public-legal-footer__inner {
    padding: 7px 4px 9px;
  }

  .public-legal-footer--minimal .public-legal-footer__links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
  }

  .public-legal-footer--minimal .public-legal-footer__links button {
    min-height: 36px;
    padding-inline: 3px;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    font-size: clamp(.60rem, 2.65vw, .73rem);
  }

  .participation-shell__return--footer {
    font-size: .64rem;
  }
}

@media (max-width: 390px) {
  .hero--participation-shell .hero__grid--participation-only {
    margin-top: 10px;
  }

  .participation-page .legal-modal {
    width: calc(100vw - 14px);
    max-height: calc(100dvh - 14px);
  }

  .participation-page .legal-modal__panel {
    max-height: calc(100dvh - 14px);
    padding: 15px 12px 13px;
  }
}

@media (min-width: 960px) {
  .hero--participation-shell {
    display: block;
    justify-content: initial;
  }

  .hero--participation-shell .hero__grid--participation-only {
    grid-template-columns: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero--participation-shell .btn {
    transition: none !important;
  }
}
