/* Fenêtre d'inscription aux formations — design « Demande d'inscription »
   (<x-visitor.inscription>, contexte formation) : infos de la formation à
   gauche, formulaire en 3 étapes à droite. Les champs du composant gardent
   leurs styles en ligne : on les harmonise ici (!important nécessaire). */

.enroll-modal-box.enr-split {
    /* Polices du site (thème admin : --m-font-body / --m-font-display). */
    font-family: var(--m-font-body, 'Montserrat', Helvetica, Arial, sans-serif);
    max-width: 1180px;
    width: 100%;
    max-height: 92vh;
    padding: 0 !important;
    display: grid;
    grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 30px 80px -20px rgba(0, 7, 29, 0.45);
}
.enr-aside svg, .enr-privacy svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ── Colonne gauche ─────────────────────────────────────────────── */
.enr-aside { display: flex; flex-direction: column; background: #f3f4f6; overflow-y: auto; min-height: 0; }
.enr-aside__hero {
    position: relative;
    display: flex; align-items: flex-end;
    min-height: 23rem;
    padding: 3rem 2.75rem 2.25rem;
    color: #fff;
    background: #0b1220;
    overflow: hidden;
}
.enr-aside__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.enr-aside__hero::before {
    content: ''; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(90deg, rgba(8, 13, 26, 0.92) 0%, rgba(8, 13, 26, 0.72) 55%, rgba(8, 13, 26, 0.35) 100%);
}
.enr-aside__content { position: relative; z-index: 2; }
.enr-aside__eyebrow {
    display: flex; align-items: center; gap: 0.9rem;
    margin: 0 0 1rem;
    font-size: 12px; font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase; color: rgba(255, 255, 255, 0.88);
}
.enr-aside__eyebrow::before { content: ''; width: 28px; height: 3px; background: #e11d2a; flex: none; }
.enr-aside__title {
    margin: 0 0 1.25rem;
    font-family: var(--m-font-display, 'Fraunces', Georgia, serif);
    font-size: clamp(1.9rem, 2.8vw, 2.75rem); font-weight: 500; line-height: 1.08; color: #fff;
}
.enr-aside__org { display: flex; align-items: center; gap: 0.9rem; margin: 0 0 1.6rem; font-size: 15.5px; line-height: 1.45; color: rgba(255, 255, 255, 0.92); }
.enr-aside__org svg { width: 34px; height: 34px; flex: none; }
.enr-aside__stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem 2.25rem; }
.enr-aside__stats li { display: flex; align-items: center; gap: 0.7rem; font-size: 15px; }
.enr-aside__stats svg { width: 30px; height: 30px; flex: none; }
.enr-aside__stats small { display: block; font-size: 12px; opacity: 0.85; }

.enr-aside__session {
    display: flex; gap: 1.4rem; align-items: flex-start;
    margin: 1.4rem;
    padding: 1.5rem 1.6rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
}
.enr-aside__cal { flex: none; display: grid; place-items: center; width: 4.25rem; height: 4.25rem; border-radius: 50%; background: #fde2e4; color: #d11124; }
.enr-aside__cal svg { width: 30px; height: 30px; }
.enr-aside__label { margin: 0 0 0.2rem; font-size: 16px; color: #111827; }
.enr-aside__date { margin: 0 0 0.45rem; font-family: var(--m-font-display, 'Fraunces', Georgia, serif); font-size: 1.95rem; font-weight: 500; line-height: 1.15; color: #0f172a; }
.enr-aside__place { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.7rem; font-size: 15px; color: #374151; }
.enr-aside__place svg { width: 20px; height: 20px; flex: none; }
.enr-aside__badge { display: inline-block; padding: 0.25rem 0.7rem; border-radius: 6px; background: #fde2e4; color: #c81e1e; font-size: 14px; }

/* ── Colonne droite ─────────────────────────────────────────────── */
.enr-main { position: relative; min-height: 0; max-height: 92vh; overflow-y: auto; padding: 3.25rem 3.25rem 2.5rem; }
.enr-main .enr-close { color: #6b7280 !important; font-size: 2rem !important; top: 1.25rem !important; right: 1.25rem !important; }
.enr-head__bar { display: block; width: 28px; height: 3px; margin-bottom: 1.1rem; background: #d11124; }
.enr-head h2 { margin: 0 0 0.7rem; font-family: var(--m-font-display, 'Fraunces', Georgia, serif); font-size: clamp(1.8rem, 2.6vw, 2.45rem); font-weight: 500; line-height: 1.1; color: #0f172a; text-transform: none; }
.enr-head p { margin: 0 0 1.8rem; font-size: 16px; line-height: 1.55; color: #6b7280; }

.enr-steps { list-style: none; display: flex; justify-content: space-between; gap: 0.75rem; margin: 0 0 1.8rem; padding: 0 0 1rem; border-bottom: 1px solid #e5e7eb; }
.enr-steps li { position: relative; display: flex; align-items: center; gap: 0.75rem; font-size: 13.5px; color: #6b7280; }
.enr-steps li span { flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: #e5e7eb; color: #4b5563; font-size: 15px; }
.enr-steps li.is-active { color: #111827; font-weight: 500; }
.enr-steps li.is-active span { background: #d11124; color: #fff; }
.enr-steps li.is-active::after { content: ''; position: absolute; left: 0; right: -1.5rem; bottom: calc(-1rem - 1px); height: 2px; background: #d11124; }
.enr-steps li.is-done span { background: #fde2e4; color: #d11124; }

.enr-missing { margin: 0 0 1rem; padding: 0.8rem 1rem; border-radius: 8px; background: #fdf1f2; color: #7f1d1d; font-size: 14px; }

/* Formulaire affiché directement (plus de bouton « remplir manuellement »). */
.enr-split .enr-manual-toggle { display: none !important; }
.enr-split #enrollFormFields { display: block !important; }
.enr-split .enr-step[hidden] { display: none !important; }

/* Champs harmonisés (styles en ligne du composant). */
.enr-main label[style*="color:#999"] { color: #111827 !important; font-size: 14.5px !important; font-weight: 500; margin-bottom: 0.45rem !important; text-transform: none !important; letter-spacing: 0 !important; }
.enr-main input[type="text"], .enr-main input[type="email"], .enr-main input[type="tel"],
.enr-main input[type="date"], .enr-main input[type="number"], .enr-main select, .enr-main textarea {
    border: 1px solid #e3e5e8 !important;
    border-radius: 6px !important;
    padding: 0.8rem 0.95rem !important;
    font-size: 15px !important;
    background-color: #fff !important;
    color: #111827;
}
.enr-main input:focus, .enr-main select:focus, .enr-main textarea:focus { outline: none; border-color: #d11124 !important; box-shadow: 0 0 0 3px rgba(209, 17, 36, 0.12); }
.enr-main .ts-control { border: 1px solid #e3e5e8 !important; border-radius: 6px !important; padding: 0.78rem 0.95rem !important; min-height: 48px; font-size: 15px !important; box-shadow: none !important; }
.enr-main .ts-wrapper.focus .ts-control { border-color: #d11124 !important; box-shadow: 0 0 0 3px rgba(209, 17, 36, 0.12) !important; }
/* Champ de recherche interne des listes (TomSelect) : il ne doit pas
   reprendre le cadre / le remplissage des champs du formulaire. */
.enr-main .ts-control input, .enr-main .ts-control input:focus {
    border: 0 !important; padding: 0 !important; margin: 0 !important; min-height: 0 !important;
    box-shadow: none !important; background: transparent !important; width: auto; flex: 1 1 auto;
}
.enr-main .ts-control { display: flex; align-items: center; flex-wrap: nowrap; }
.enr-main .ts-wrapper.single .ts-control > .item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.enr-main textarea { min-height: 6rem; }
.enr-main .enr-addons-slot > div { margin-bottom: 1.4rem !important; }

.enr-nav { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.6rem; }
.enr-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.9rem 1.7rem;
    border: 0; border-radius: 6px;
    background: #d11124; color: #fff;
    font-family: inherit; font-size: 15.5px; font-weight: 600;
    cursor: pointer; transition: background 0.2s;
}
.enr-btn:hover { background: #a90d1d; }
.enr-btn--ghost { margin-right: auto; background: #fff; color: #374151; border: 1px solid #e3e5e8; }
.enr-btn--ghost:hover { background: #f9fafb; }

.enr-main #manualEnrollSubmit,
.enr-main form button[type="submit"][style*="#cc0000"] { background: #d11124 !important; border-radius: 6px !important; padding: 1.1rem !important; font-size: 16px !important; }

.enr-privacy { display: flex; align-items: center; gap: 1.1rem; margin-top: 1.3rem; padding: 1.05rem 1.3rem; border-radius: 8px; background: #fdf1f2; font-size: 14.5px; line-height: 1.5; color: #374151; }
.enr-privacy svg { width: 30px; height: 30px; flex: none; color: #d11124; }

/* ── Mobile / tablette : une colonne, tout défile ensemble ─────── */
@media (max-width: 900px) {
    .enroll-modal-box.enr-split { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
    .enr-aside, .enr-main { overflow: visible; max-height: none; }
    .enr-aside__hero { min-height: 15rem; padding: 2rem 1.5rem 1.5rem; }
    .enr-aside__session { margin: 1rem; padding: 1.1rem; }
    .enr-aside__date { font-size: 1.5rem; }
    .enr-main { padding: 2rem 1.25rem 1.75rem; }
    .enr-steps li { font-size: 12px; flex-direction: column; text-align: center; gap: 0.35rem; }
    .enr-steps li.is-active::after { right: 0; }
}
@media (max-width: 520px) {
    .enroll-modal { padding: 0.5rem !important; }
    .enr-main form > div > div[style*="grid-template-columns:1fr 1fr"],
    .enr-main .enr-step > div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: minmax(0, 1fr) !important; }
    .enr-main .enr-step > div[style*="grid-template-columns:1fr 1fr"] > div[style*="span 2"] { grid-column: auto !important; }
}

/* Étapes 2 et 3 : pas de rappel ni de connexion Google / Facebook ; les CGU
   (obligatoires avant l'envoi) restent visibles aux étapes 1 et 3. */
.enr-main[data-enr-step="2"] .enr-alert,
.enr-main[data-enr-step="3"] .enr-alert,
.enr-main[data-enr-step="2"] .enr-social,
.enr-main[data-enr-step="3"] .enr-social,
.enr-main[data-enr-step="2"] .enr-social-label,
.enr-main[data-enr-step="3"] .enr-social-label,
.enr-main[data-enr-step="2"] #enrollCguGate { display: none !important; }

.enr-main input, .enr-main select, .enr-main textarea, .enr-main button { font-family: inherit !important; }

/* Inscription Google / Facebook mise en avant : juste sous les étapes, puis
   la case CGU (obligatoire avant la connexion), puis « ou remplissez le
   formulaire ». Ordre visuel seulement (flex), le HTML ne bouge pas. */
.enr-main { display: flex; flex-direction: column; }
.enr-main > * { order: 20; }
.enr-main > .enr-head { order: 1; }
.enr-main > .enr-steps { order: 2; }
.enr-main > .enroll-error-banner { order: 3; }
.enr-main > .enr-social-label { order: 4; }
.enr-main > .enr-social { order: 5; }
.enr-main > #enrollCguGate { order: 6; }
.enr-main > .enr-alert { order: 8; }
.enr-main > #enrollFormFields { order: 9; }

.enr-main > .enr-social-label { margin: 0 0 0.7rem !important; text-align: left !important; font-size: 14.5px !important; font-weight: 500; color: #111827 !important; }
.enr-main > .enr-social { gap: 0.75rem !important; margin-bottom: 1rem !important; }
.enr-main > .enr-social a {
    padding: 0.85rem 1rem !important;
    border: 1px solid #d9dce1 !important; border-radius: 8px !important;
    font-size: 15px !important; font-weight: 600 !important; color: #111827 !important;
    background: #fff !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}
.enr-main > .enr-social a:hover { box-shadow: 0 4px 14px -6px rgba(0, 7, 29, 0.25); }
.enr-main > .enr-social a svg { width: 20px !important; height: 20px !important; }
.enr-social__pre { font-weight: 400; color: #4b5563; }
.enr-main > #enrollFormFields::before {
    content: 'ou remplissez le formulaire';
    display: flex; align-items: center; gap: 1rem;
    margin: 0.4rem 0 1.4rem;
    font-size: 13px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.06em;
    background: linear-gradient(#e5e7eb, #e5e7eb) left center / calc(50% - 7.5rem) 1px no-repeat,
                linear-gradient(#e5e7eb, #e5e7eb) right center / calc(50% - 7.5rem) 1px no-repeat;
    justify-content: center;
}
/* Aux étapes 2 et 3, pas de séparateur (Google / Facebook masqués). */
.enr-main[data-enr-step="2"] > #enrollFormFields::before,
.enr-main[data-enr-step="3"] > #enrollFormFields::before { display: none; }
@media (max-width: 520px) {
    .enr-main > .enr-social { grid-template-columns: minmax(0, 1fr) !important; }
}

/* ── Étape « Paiement » (acompte en ligne facultatif) ───────────── */
.enr-pay { display: grid; gap: 0.8rem; }
.enr-pay__intro { margin: 0 0 0.2rem; font-size: 14.5px; color: #4b5563; }
.enr-pay__opt {
    display: flex; gap: 0.9rem; align-items: flex-start;
    padding: 1rem 1.1rem;
    border: 1.5px solid #e3e5e8; border-radius: 10px;
    background: #fff; cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.enr-pay__opt:has(input:checked) { border-color: #d11124; background: #fff7f7; }
.enr-pay__opt input[type="radio"] { flex: none; width: 19px; height: 19px; margin-top: 0.2rem; accent-color: #d11124; }
.enr-pay__body { display: grid; gap: 0.45rem; flex: 1; min-width: 0; }
.enr-pay__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; font-size: 15.5px; color: #111827; }
.enr-pay__head img { height: 26px; width: auto; }
.enr-pay__badge { margin-left: auto; padding: 0.15rem 0.55rem; border-radius: 999px; background: #16a34a; color: #fff; font-size: 12px; font-weight: 700; }
.enr-pay__hint { font-size: 13.5px; line-height: 1.5; color: #4b5563; }
.enr-pay__amount { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.55rem 0.8rem; border-radius: 8px; background: #f0fdf4; border: 1px solid #bbf7d0; font-size: 14px; color: #374151; }
.enr-pay__amount s { color: #9ca3af; font-size: 13px; margin-right: 0.35rem; }
.enr-pay__amount strong { color: #166534; font-size: 16px; }
.enr-pay__warn { font-size: 12px; line-height: 1.4; color: #92400e; }

.enr-submit {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    margin-top: 0.4rem; padding: 1.05rem 1rem;
    border: 0; border-radius: 6px;
    background: #d11124; color: #fff;
    font-family: inherit; font-size: 16px; font-weight: 600;
    cursor: pointer; transition: background 0.2s;
}
.enr-submit:hover { background: #a90d1d; }
.enroll-modal .enr-pay + .enr-submit { margin-top: 1rem; }

/* ── Version compacte (NAIM, 2026-10-28) : tout le contenu tient sur
   un écran d'ordinateur sans défiler, avec des espacements plus fins. ── */
@media (min-width: 901px) {
    .enr-main { padding: 2.1rem 2.6rem 1.6rem; }
    .enr-main .enr-close { top: 0.9rem !important; right: 0.9rem !important; }
    .enr-head__bar { margin-bottom: 0.75rem; }
    .enr-head h2 { margin-bottom: 0.4rem; font-size: clamp(1.55rem, 2vw, 1.95rem); }
    .enr-head p { margin-bottom: 1.1rem; font-size: 14.5px; line-height: 1.45; }
    .enr-steps { margin-bottom: 1.2rem; padding-bottom: 0.75rem; }
    .enr-steps li span { width: 2rem; height: 2rem; font-size: 13.5px; }
    .enr-main > .enr-alert { margin-bottom: 0.9rem !important; padding: 0.6rem 0.85rem !important; }
    .enr-main > .enr-alert > div { font-size: 11px !important; line-height: 1.4 !important; }
    .enr-direct { margin-bottom: 0 !important; }
    .enr-direct__hello { margin-bottom: 0.6rem !important; font-size: 13.5px !important; }
    .enr-direct .cgu-checkbox-wrap { margin-bottom: 0.6rem !important; }
    /* Texte des CGU au plus petit encore lisible (NAIM, 2026-10-28). */
    .enr-direct .cgu-checkbox-wrap label,
    .enr-main > #enrollCguGate label { font-size: 11px !important; line-height: 1.4 !important; align-items: flex-start !important; color: #4b5563 !important; }
    .enr-direct .cgu-checkbox-wrap input,
    .enr-main > #enrollCguGate input { width: 15px !important; height: 15px !important; margin-top: 1px; }
    .enr-main > #enrollCguGate { padding: 0.55rem 0.8rem !important; }
    .enr-direct > form > div[style*="margin-bottom:1rem"] { margin-bottom: 0.6rem !important; }
    .enr-pay { gap: 0.55rem; }
    .enr-pay__intro { font-size: 13px; }
    .enr-pay__opt { padding: 0.7rem 0.9rem; gap: 0.75rem; }
    .enr-pay__body { gap: 0.3rem; }
    .enr-pay__head { font-size: 14.5px; }
    .enr-pay__head img { height: 22px; }
    .enr-pay__hint { font-size: 12.5px; line-height: 1.4; }
    .enr-pay__amount { padding: 0.4rem 0.7rem; font-size: 13px; }
    .enr-pay__amount strong { font-size: 15px; }
    .enr-pay__warn { font-size: 11.5px; }
    .enr-submit { padding: 0.85rem 1rem; font-size: 15px; }
    .enroll-modal .enr-pay + .enr-submit { margin-top: 0.75rem; }
    .enr-main #manualEnrollSubmit { padding: 0.85rem !important; font-size: 15px !important; }
    .enr-privacy { margin-top: 0.8rem; padding: 0.7rem 1rem; gap: 0.8rem; font-size: 13px; }
    .enr-privacy svg { width: 24px; height: 24px; }
    .enr-nav { margin-top: 1.1rem; }
    .enr-btn { padding: 0.75rem 1.4rem; font-size: 14.5px; }
}
/* Écrans d'ordinateur portable peu hauts (720–820 px). */
@media (min-width: 901px) and (max-height: 820px) {
    .enroll-modal-box.enr-split, .enr-main { max-height: 96vh; }
    .enr-main { padding-top: 1.6rem; padding-bottom: 1.2rem; }
    .enr-head p { margin-bottom: 0.8rem; font-size: 13.5px; }
    .enr-main > .enr-alert { margin-bottom: 0.7rem !important; padding: 0.5rem 0.8rem !important; }
    .enr-main > .enr-alert > div > strong { margin-bottom: 0 !important; }
    .enr-main > .enr-alert > div { font-size: 0 !important; }
    .enr-main > .enr-alert > div > strong { font-size: 11px; }
    .enr-main > .enr-alert { padding: 0.4rem 0.7rem !important; align-items: center !important; }
    .enr-main > .enr-alert > svg { width: 14px; height: 14px; margin-top: 0 !important; }
    .enr-pay__opt { padding: 0.6rem 0.85rem; }
}
/* Textes encore réduits (NAIM, 2026-10-28 : « réduire encore »). */
@media (min-width: 901px) {
    .enr-head h2 { font-size: clamp(1.35rem, 1.7vw, 1.65rem); }
    .enr-head p { font-size: 12.5px; margin-bottom: 0.7rem; }
    .enr-main > .enr-alert > div,
    .enr-main > .enr-alert > div > strong { font-size: 10.5px !important; }
    .enr-direct__hello { font-size: 12px !important; margin-bottom: 0.45rem !important; }
    .enr-direct .cgu-checkbox-wrap label,
    .enr-main > #enrollCguGate label { font-size: 10px !important; }
    .enr-pay { gap: 0.45rem; }
    .enr-pay__intro { font-size: 11.5px; }
    .enr-pay__opt { padding: 0.55rem 0.8rem; gap: 0.65rem; }
    .enr-pay__opt input[type="radio"] { width: 16px; height: 16px; margin-top: 0.1rem; }
    .enr-pay__head { font-size: 13px; gap: 0.45rem; }
    .enr-pay__head img { height: 18px; }
    .enr-pay__badge { font-size: 10.5px; padding: 0.1rem 0.45rem; }
    .enr-pay__hint { font-size: 11px; line-height: 1.35; }
    .enr-pay__amount { padding: 0.3rem 0.6rem; font-size: 11.5px; }
    .enr-pay__amount s { font-size: 11px; }
    .enr-pay__amount strong { font-size: 13.5px; }
    .enr-pay__warn { font-size: 10.5px; }
    .enr-submit, .enr-main #manualEnrollSubmit { padding: 0.7rem 1rem !important; font-size: 13.5px !important; }
    .enr-privacy { font-size: 11.5px; padding: 0.55rem 0.85rem; }
    .enr-btn { padding: 0.6rem 1.2rem; font-size: 13px; }
}
