/* Fenêtre de calcul « Votre formation » (formation.js), sur toutes les pages du site (29.10.2026).
   Reprise de la landing v2 (apercu-landing-medicerta/hero.css, bloc « lightbox »), avec ses propres couleurs :
   elle ne dépend pas des variables de la page qui l'accueille. */
.mx { --h-font: inherit; --h-ink: #40392e; --h-ink-soft: #6f675d; --h-orange: #ed772f; --h-orange-deep: #d9621c;
      --h-card: #ffffff; --h-cream: #f7f6f2; --h-paper: #fdfcf9; --h-sep: #efebe4; --h-wash: #f7f6f2; --h-btn-hover: #574e41;
      --s-ease: cubic-bezier(.2, .7, .2, 1); }
body.lock { overflow: hidden; }
.mx-btn svg { transition: transform .2s var(--s-ease); }
.mx-btn:hover svg { transform: translateX(3px); }
.mx a, .mx button { text-decoration: none; }
/* Liens « Calculer mes UE et mon prix » posés dans les pages */
.calc-link { font-weight: 600; white-space: nowrap; }
.calc-link::after { content: " →"; }
a.calc-link:not([class*="btn"]) { color: #b5481f; text-decoration: underline; text-underline-offset: 3px; }
/* blocs sombres du site (bandeau final, encadrés d'appel, boîte d'achat) */
.bottom-cta a.calc-link:not([class*="btn"]), .inline-cta a.calc-link:not([class*="btn"]), .buy-box a.calc-link:not([class*="btn"]),
.cta-final a.calc-link:not([class*="btn"]), .final-cta a.calc-link:not([class*="btn"]) { color: #fff; }
.spotlight .price a.calc-link:not([class*="btn"]) { color: inherit; }
/* ---------- Module « Votre formation » en lightbox (22.10) ----------
   Même langage que le hero : cartes blanches à filet fin, ombres douces, orange pour l'action et les codes. */
.mx { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; font-family: var(--h-font); color: var(--h-ink); }
.mx[hidden] { display: none !important; }
.mx-bg { position: absolute; inset: 0; background: rgba(64, 57, 46, .42); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s ease; }
.mx-card {
  position: relative; width: 100%; max-width: 640px; max-height: calc(100svh - 48px);
  display: flex; flex-direction: column;
  background: var(--h-paper); border: 1.5px solid #e2dacd; border-radius: 24px;
  box-shadow: 0 2px 6px rgba(64, 57, 46, .08), 0 30px 70px -20px rgba(64, 57, 46, .45);
  opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .2s ease, transform .25s cubic-bezier(.2, .9, .3, 1);
}
.mx.on .mx-bg { opacity: 1; }
.mx.on .mx-card { opacity: 1; transform: none; }
.mx-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 22px 14px; }
.mx-titles { flex: 1; min-width: 0; }
.mx-kicker { margin: 2px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--h-orange-deep); }
.mx-head .mx-h { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
.mx-icon-btn {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer;
  color: var(--h-ink); background: var(--h-card); border: 1.5px solid #e2dacd; border-radius: 50%;
  box-shadow: 0 1px 2px rgba(64, 57, 46, .08);
}
.mx-icon-btn:hover { background: var(--h-wash); border-color: #cdc2b1; }
.mx-icon-btn:focus-visible, .mx-opt:focus-visible, .mx-btn:focus-visible, .mx-ghost:focus-visible { outline: 3px solid var(--h-orange); outline-offset: 2px; }
.mx-progress { height: 4px; margin: 0 22px; border-radius: 4px; background: var(--h-sep); overflow: hidden; }
.mx-progress span { display: block; height: 100%; width: 25%; border-radius: 4px; background: var(--h-orange); transition: width .3s ease; }
.mx-body { padding: 18px 22px 8px; overflow-y: auto; overscroll-behavior: contain; }
.mx-legal { margin: 0; padding: 10px 22px 18px; font-size: 11.5px; color: var(--h-ink-soft); border-top: 1px solid var(--h-sep); }

.mx-list { display: grid; gap: 10px; }
.mx-opt {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; cursor: pointer;
  font: inherit; color: var(--h-ink); background: var(--h-card);
  border: 1.5px solid #e2dacd; border-radius: 16px; box-shadow: 0 1px 2px rgba(64, 57, 46, .06);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.mx-opt:hover { border-color: var(--h-orange); box-shadow: 0 1px 2px rgba(64, 57, 46, .06), 0 8px 18px -10px rgba(237, 119, 47, .5); }
.mx-opt-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mx-opt-txt strong { font-size: 16px; font-weight: 700; line-height: 1.25; }
.mx-opt-txt small { font-size: 13px; font-weight: 500; color: var(--h-ink-soft); line-height: 1.35; }
.mx-opt-go { flex: none; color: var(--h-ink-soft); transition: transform .15s ease, color .15s ease; }
.mx-opt:hover .mx-opt-go { color: var(--h-orange); transform: translateX(3px); }
.mx-ico { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--h-cream); color: var(--h-orange); }
.mx-ico svg { width: 24px; height: 24px; }
.mx-code {
  flex: none; align-self: flex-start; padding: 5px 10px 4px; border-radius: 8px; white-space: nowrap;
  font-size: 13px; font-weight: 800; letter-spacing: .02em; color: var(--h-orange-deep); background: #fdeee4;
}
.mx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mx-chips span { padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--h-ink); background: var(--h-cream); border: 1px solid var(--h-sep); }
.mx-lead { margin: 0 0 14px; font-size: 14.5px; color: var(--h-ink-soft); }
.mx-lead strong { color: var(--h-ink); }
.mx-note { margin: 14px 0 6px; padding: 10px 14px; font-size: 13px; color: var(--h-ink-soft); background: var(--h-cream); border-radius: 12px; }

/* Résultat */
.mx-result-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 16px; font-weight: 700; }
.mx-check { display: flex; gap: 8px; margin: 10px 0 16px; font-size: 14px; color: var(--h-ink-soft); }
.mx-check::before {
  content: ''; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%;
  background: var(--h-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.mx-gate { padding: 18px; border-radius: 18px; background: var(--h-card); border: 1.5px solid #e2dacd; }
.mx-gate strong { display: block; font-size: 17px; font-weight: 800; }
.mx-gate p { margin: 6px 0 12px; font-size: 14px; color: var(--h-ink-soft); }
.mx-gate small { display: block; margin-top: 10px; font-size: 12px; color: var(--h-ink-soft); }
.mx-gate-row { display: flex; gap: 8px; }
/* Champ e-mail : même hauteur que le bouton, fond blanc, enveloppe à gauche */
.mx-gate input {
  flex: 1 1 auto; min-width: 0; height: 52px; padding: 0 18px 0 48px; font: 500 16px var(--h-font); color: var(--h-ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a39a8d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E") 18px 50% / 18px no-repeat;
  border: 1.5px solid #e2dacd; border-radius: 999px; box-shadow: 0 1px 2px rgba(64, 57, 46, .06); transition: border-color .2s ease, box-shadow .2s ease;
}
.mx-gate input::placeholder { color: #b1a99d; font-weight: 500; }
.mx-gate .mx-btn { height: 52px; }
.mx-gate input:focus { outline: none; border-color: var(--h-orange); box-shadow: 0 0 0 4px rgba(237, 119, 47, .14); }
.mx-gate .mx-gate-err { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: #c0392b; }
.mx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; cursor: pointer;
  font: 600 16px/1 var(--h-font); color: #fff; background: var(--h-ink); border: 0; border-radius: 999px; text-decoration: none;
  box-shadow: 0 1px 2px rgba(64, 57, 46, .18); transition: background .15s ease, box-shadow .15s ease;
}
.mx-btn:hover { background: var(--h-btn-hover); box-shadow: 0 1px 2px rgba(64, 57, 46, .18), 0 6px 14px -4px rgba(64, 57, 46, .3); }
.mx-btn-lg { height: 52px; padding: 0 26px; }
.mx-sent { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; font-size: 13.5px; font-weight: 600; color: #23803f; }
.mx-sent::before { content: '✓'; font-weight: 800; }
.mx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mx-stats > div { padding: 14px; border-radius: 16px; background: var(--h-card); border: 1.5px solid #e2dacd; }
.mx-stats small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--h-ink-soft); }
.mx-stats b { display: block; margin: 6px 0 4px; font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.mx-stats em { margin-left: 4px; font-style: normal; font-size: 14px; font-weight: 700; color: var(--h-ink-soft); }
.mx-stats span { display: block; font-size: 12px; color: var(--h-ink-soft); }
.mx-stats .mx-stat-price { background: #fdeee4; border-color: #f5c9ad; }
.mx-stats .mx-stat-price b { color: var(--h-orange-deep); }
.mx-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 16px; }
.mx-ghost { font-size: 15px; font-weight: 600; color: var(--h-ink); text-underline-offset: 3px; }
.mx-foot { margin: 12px 0 6px; font-size: 13px; color: var(--h-ink-soft); }

@media (max-width: 560px) {
  .mx { padding: 0; place-items: end center; }
  .mx-card { max-height: 92svh; border-radius: 22px 22px 0 0; border-bottom: 0; transform: translateY(30px); }
  .mx-head { padding: 18px 16px 12px; }
  .mx-head .mx-h { font-size: 20px; }
  .mx-progress { margin: 0 16px; }
  .mx-body { padding: 14px 16px 8px; }
  .mx-legal { padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
  .mx-opt { padding: 12px 14px; gap: 12px; }
  .mx-prof { flex-wrap: wrap; }
  .mx-stats { grid-template-columns: 1fr 1fr; }
  .mx-stats > div:last-child { grid-column: 1 / -1; }
  .mx-gate-row { flex-direction: column; }
  .mx-gate input, .mx-gate .mx-btn { flex: none; width: 100%; }
  .mx-btn-lg { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .mx-bg, .mx-card, .mx-progress span { transition: none; } }


/* Réponse « combien d'UE » en grand dans le résultat */
.mx-answer {
  display: flex; align-items: center; gap: 16px; margin-bottom: 10px; padding: 16px 18px;
  border-radius: 18px; background: #fdeee4; border: 1.5px solid #f5c9ad;
}
.mx-answer b { flex: none; font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: var(--h-orange-deep); }
.mx-answer em { margin-left: 4px; font-style: normal; font-size: 20px; font-weight: 800; }
.mx-answer span { font-size: 14px; color: var(--h-ink-soft); }
.mx-answer strong { display: block; font-size: 17px; font-weight: 800; color: var(--h-ink); }
.mx-stats { grid-template-columns: 1fr 1fr; }
.mx-stats .mx-stat-price { background: var(--h-card); border-color: #e2dacd; }
.mx-stats .mx-stat-price b { color: var(--h-ink); }
@media (max-width: 560px) {
  .mx-answer b { font-size: 44px; }
  .mx-stats > div:last-child { grid-column: auto; }
}

