.request-wizard {
  position: relative;
  min-height: 72vh;
  padding: clamp(44px, 7vw, 88px) 0 clamp(72px, 9vw, 120px);
  overflow: clip;
  background:
    radial-gradient(circle at 6% 8%, rgba(246,168,0,.10), transparent 24rem),
    radial-gradient(circle at 100% 18%, rgba(23,104,229,.10), transparent 28rem),
    linear-gradient(180deg, #f7faff, #eef4ff 52%, #f9fbff);
}
.request-wizard::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .42;
  background-image: linear-gradient(rgba(6,40,95,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(6,40,95,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000, transparent 82%);
}
.request-wizard__container { position: relative; z-index: 1; width: min(100% - 28px, 980px); margin-inline: auto; }
.request-wizard__intro { max-width: 800px; margin: 0 auto 30px; text-align: center; }
.request-wizard__kicker { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 9px 15px; border: 1px solid rgba(246,168,0,.42); border-radius: 999px; background: #fff7df; color: #1456c8; font-size: .76rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.request-wizard__kicker i { color: #e79a00; font-size: 1rem; }
.request-wizard__intro h1 { max-width: 770px; margin: 28px auto 12px; color: #031a40; font-family: "DM Serif Display", Georgia, serif; font-size: clamp(2.25rem, 6vw, 4.35rem); font-weight: 400; line-height: 1.01; letter-spacing: -.035em; text-wrap: balance; }
.request-wizard__intro > p { max-width: 670px; margin: 0 auto; color: #66738b; font-size: clamp(.98rem, 2vw, 1.12rem); line-height: 1.7; }
.request-wizard__card { padding: clamp(22px, 4vw, 42px); border: 1px solid rgba(6,40,95,.10); border-radius: 30px; background: rgba(255,255,255,.96); box-shadow: 0 22px 64px rgba(6,40,95,.12); backdrop-filter: blur(10px); }
.request-section + .request-section { margin-top: 30px; padding-top: 30px; border-top: 1px solid #e8eef7; }
.request-section__heading { display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: start; gap: 14px; margin-bottom: 22px; }
.request-section__number { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 16px; background: #06285f; color: #fff; font-weight: 850; box-shadow: 0 10px 25px rgba(6,40,95,.18); }
.request-section__heading h2 { margin: 0; color: #11203c; font-size: clamp(1.15rem, 3vw, 1.5rem); font-weight: 850; }
.request-section__heading p { margin: 5px 0 0; color: #718099; font-size: .88rem; line-height: 1.55; }
.request-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.request-field { min-width: 0; }
.request-field--wide { grid-column: 1 / -1; }
.request-field > label:not(.request-check), .request-field > .request-label { display: block; margin-bottom: 7px; color: #182642; font-size: .82rem; font-weight: 800; }
.request-field .required-mark { margin-left: 4px; color: #bb2d3b; }
.request-field .form-control, .request-field .form-select { min-height: 52px; border: 1px solid #d7e0ed; border-radius: 14px; background-color: #fff; box-shadow: none; color: #17233a; transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease; }
.request-field textarea.form-control { min-height: 105px; resize: vertical; }
.request-field .form-control:focus, .request-field .form-select:focus { border-color: #4c82e5; box-shadow: 0 0 0 4px rgba(23,104,229,.11); transform: translateY(-1px); }
.request-field small { display: block; margin-top: 7px; color: #77849a; font-size: .73rem; line-height: 1.5; }
.request-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; min-width: 0; }
.request-choice-grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
/* Django enveloppe RadioSelect/CheckboxSelectMultiple dans un conteneur puis
   dans un bloc par option. ``display: contents`` permet aux options de devenir
   les vraies cellules de la grille, sans boîte intermédiaire parasite. */
.request-choice-grid > .request-choice-widget { display: contents; width: auto; height: auto; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.request-choice-grid > .request-choice-widget > div,
.request-choice-grid .form-check,
.request-choice-card { position: relative; min-width: 0; margin: 0; padding: 0; }
.request-choice-grid input { position: absolute !important; width: 1px !important; height: 1px !important; margin: 0 !important; opacity: 0 !important; pointer-events: none; }
.request-choice-grid label, .request-choice-card label { display: flex; width: 100%; min-width: 0; min-height: 72px; align-items: center; justify-content: flex-start; gap: 12px; margin: 0; padding: 15px 17px; overflow: hidden; border: 1px solid #dbe4f0; border-radius: 16px; background: #fff; color: #273650; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; white-space: normal; cursor: pointer; transition: border-color .22s ease, background-color .22s ease, box-shadow .22s ease, transform .22s ease; }
.request-choice-grid label:hover { border-color: #9ebcf0; transform: translateY(-2px); }
.request-choice-grid label:has(input:checked) { border-color: #1768e5; background: #edf4ff; box-shadow: 0 0 0 3px rgba(23,104,229,.10); color: #06285f; }
.request-choice-grid label:has(input:focus-visible) { outline: 3px solid rgba(23,104,229,.24); outline-offset: 2px; }
.request-check { display: grid; grid-template-columns: 22px minmax(0,1fr); align-items: start; gap: 10px; color: #273650; font-size: .84rem; font-weight: 650; cursor: pointer; }
.request-check input { position: static !important; width: 20px; height: 20px; margin: 1px 0 0 !important; opacity: 1 !important; }
.request-subject-list { display: grid; gap: 16px; }
.request-subject-card { padding: 20px; border: 1px solid #dce6f3; border-radius: 20px; background: linear-gradient(145deg, #fff, #f8fbff); }
.request-subject-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.request-subject-card__head h3 { margin: 0; color: #06285f; font-size: 1rem; font-weight: 850; }
.request-subject-card__order { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: #fff0c8; color: #9b6500; font-weight: 850; }
.request-subject-needs { display: none; margin-top: 14px; padding-top: 16px; border-top: 1px solid #e1e8f2; }
.request-subject-card.is-selected .request-subject-needs { display: grid; }
.request-alert { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 12px; margin-bottom: 20px; padding: 14px 16px; border-radius: 15px; font-size: .83rem; }
.request-alert p { margin: 0; }
.request-alert p + p { margin-top: 4px; }
.request-alert--danger { background: #fff0f1; color: #8c2632; }
.request-alert--info { background: #edf4ff; color: #164b9d; }
.request-privacy-note { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 10px; margin: 24px 0 0; padding: 13px 15px; border-radius: 14px; background: #f1f5fa; color: #66738b; font-size: .76rem; line-height: 1.55; }
.request-privacy-note i { color: #1768e5; }
.request-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 30px; }
.request-actions .btn { min-height: 50px; padding-inline: 22px; border-radius: 14px; font-weight: 800; }
.request-back { display: inline-flex; align-items: center; gap: 8px; color: #42516a; font-weight: 750; text-decoration: none; }
.request-back:hover { color: #1768e5; }
.request-summary { display: grid; gap: 16px; }
.request-summary__section { padding: 20px; border: 1px solid #e0e8f2; border-radius: 18px; background: #fbfcff; }
.request-summary__section h2 { margin: 0 0 14px; color: #06285f; font-size: .98rem; font-weight: 850; }
.request-summary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 20px; }
.request-summary-grid div { min-width: 0; }
.request-summary-grid span { display: block; color: #7a879b; font-size: .7rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.request-summary-grid strong { display: block; margin-top: 3px; overflow-wrap: anywhere; color: #1c2a44; font-size: .86rem; }
.request-subject-summary { display: grid; gap: 10px; margin-top: 12px; }
.request-subject-summary article { padding: 13px 15px; border-left: 3px solid #1768e5; border-radius: 0 12px 12px 0; background: #edf4ff; }
.request-subject-summary h3 { margin: 0 0 5px; color: #06285f; font-size: .88rem; }
.request-subject-summary p { margin: 2px 0; color: #506079; font-size: .77rem; line-height: 1.5; }
.request-account-switch { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 18px; padding: 5px; border-radius: 14px; background: #edf2f8; }
.request-account-switch button { min-height: 42px; border: 0; border-radius: 11px; background: transparent; color: #66738b; font-weight: 800; }
.request-account-switch button.is-active { background: #fff; color: #1768e5; box-shadow: 0 5px 15px rgba(6,40,95,.08); }
.request-location[hidden], .request-exam-fields[hidden], .request-beneficiary-fields[hidden] { display: none !important; }

@media (max-width: 767.98px) {
  .request-wizard { padding-top: 32px; }
  .request-wizard__container { width: min(100% - 20px, 980px); }
  .request-wizard__card { padding: 20px 16px; border-radius: 24px; }
  .request-grid, .request-choice-grid, .request-choice-grid--3, .request-summary-grid { grid-template-columns: minmax(0,1fr); }
  .request-choice-grid label { min-height: 64px; padding: 14px 16px; }
  .request-field--wide { grid-column: 1; }
  .request-actions { align-items: stretch; flex-direction: column-reverse; }
  .request-actions .btn, .request-back { width: 100%; justify-content: center; }
  .request-section__heading { grid-template-columns: 42px minmax(0,1fr); }
  .request-section__number { width: 42px; height: 42px; border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .request-wizard *, .request-wizard *::before, .request-wizard *::after { transition: none !important; }
}
