/* Registration entry page (/register/): top bar, compact header, two-column layout with a guide panel.
   Loaded after entry.css, sector-theme.css and i18n.css. Identical on every CDE platform; colours from sector.css. */

body.reg-entry { font-size: 16px; line-height: 1.75; }
body.reg-entry.lang-fr, body.reg-entry.lang-en { line-height: 1.6; }
.reg-flip { display: inline-block; }
[dir="ltr"] .reg-flip { transform: scaleX(-1); }

/* ---------- Top bar ---------- */
.reg-top {
  position: sticky; top: 0; z-index: 900; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 25%, #fff);
}
.reg-top::after { content: ""; position: absolute; inset: auto 0 -1px 0; height: 3px; background: linear-gradient(90deg, var(--cde-mint), var(--secondary) 45%, var(--accent) 75%, var(--primary)); opacity: .85; }
.reg-top-inner { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.reg-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--deep); }
.reg-brand img { width: 44px; height: 44px; object-fit: contain; border-radius: 12px; }
.reg-brand span { display: flex; flex-direction: column; line-height: 1.2; }
.reg-brand b { font-size: 16px; font-weight: 800; letter-spacing: .01em; }
.reg-brand small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.reg-top-actions { display: flex; align-items: center; gap: 10px; }
.reg-back { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--deep); text-decoration: none; border: 1px solid color-mix(in srgb, var(--deep) 14%, transparent); transition: background-color .2s ease, border-color .2s ease; }
.reg-back:hover { background: var(--sand); border-color: var(--accent); }
.reg-top .lang-switch { box-shadow: none; }
.reg-theme { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; background: #fff; color: var(--deep);
  border: 1px solid color-mix(in srgb, var(--deep) 14%, transparent); font-size: 17px; transition: border-color .2s ease, transform .2s ease; }
.reg-theme:hover { border-color: var(--accent); transform: translateY(-1px); }
.cde-theme-float { display: none !important; }        /* the top bar has its own button */

/* ---------- Page frame ---------- */
.reg-entry .wrapper { max-width: 1200px; margin: 20px auto 36px; }

/* ---------- Header ---------- */
.reg-entry .header-box { display: block; padding: 26px 30px; margin-bottom: 18px; border-radius: 20px; }
.reg-entry .header-content { max-width: 860px; }
.reg-entry .header-content h1 { font-size: 30px; line-height: 1.35; font-weight: 800; }
.reg-entry .header-content h2 { font-size: 17px; margin: 6px 0 10px; font-weight: 600; opacity: .9; }
.reg-entry .header-content p { font-size: 15.5px; line-height: 1.8; }
.reg-facts { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.reg-facts li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); color: #fff; }
.reg-facts i { color: var(--cde-mint); }

/* ---------- Two columns ---------- */
.reg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.reg-main { min-width: 0; }
.reg-aside { position: sticky; top: 86px; display: grid; gap: 14px; }
@media (min-width: 992px) { .reg-entry .steps-indicator { display: none; } }   /* the aside shows the steps */

/* ---------- Question and path cards ---------- */
.reg-entry .question-title { font-size: 21px; line-height: 1.5; margin-bottom: 14px; }
.reg-entry .choices { gap: 16px; }
.reg-entry .choice-card { padding: 20px 22px 20px 58px; border-radius: 18px; background: #fff; }
[dir="ltr"] .reg-entry .choice-card { padding: 20px 58px 20px 22px; }
.choice-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.choice-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px; display: grid; place-items: center; font-size: 20px;
  color: var(--primary); background: var(--primary-soft); transition: background-color .2s ease, color .2s ease; }
.choice-kicker { font-size: 13px; font-weight: 800; color: var(--primary-dark); letter-spacing: .02em; }
.reg-entry .choice-card:has(input:checked) .choice-icon, .reg-entry .choice-card.is-selected .choice-icon { background: var(--primary); color: #fff; }
.reg-entry .choice-card h3 { font-size: 18px; line-height: 1.5; margin-bottom: 8px; }
.reg-entry .choice-card p { font-size: 15px; line-height: 1.75; }
.reg-entry .template-note { font-size: 14.5px; }
.reg-entry .template-note a { font-size: 14px; padding: 6px 16px; }

/* ---------- Initial information ---------- */
.reg-entry .form-box { margin-top: 20px; padding: 24px 26px; border-radius: 18px; }
.reg-entry .form-title { font-size: 19px; margin-bottom: 16px; }
.reg-entry .form-group label { font-size: 15px; font-weight: 700; }
.reg-entry .form-group input[type="text"], .reg-entry .form-group input[type="email"] { min-height: 50px; font-size: 16px; border-radius: 12px; padding: 12px 14px; }
.reg-entry .form-group .help { font-size: 13.5px; }
.reg-entry .submit-box { margin-top: 20px; }
.reg-entry .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 34px; font-size: 16.5px;
  box-shadow: 0 12px 24px -14px var(--primary-shadow, rgba(0, 0, 0, .4)); }
.reg-entry .privacy-note { font-size: 13.5px; }

/* ---------- Guide panels ---------- */
.reg-panel { background: #fff; border: 1px solid color-mix(in srgb, var(--accent) 22%, #fff); border-radius: 18px; padding: 18px 18px 16px;
  box-shadow: 0 10px 26px rgba(13, 27, 42, .06); }
.reg-panel h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 16.5px; font-weight: 800; color: var(--deep); }
.reg-panel h2 i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; color: var(--primary); background: var(--primary-soft); }
.reg-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.reg-steps li { position: relative; display: flex; gap: 12px; padding: 8px 0; }
.reg-steps li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 14px; top: 40px; bottom: -6px; width: 2px; background: color-mix(in srgb, var(--accent) 30%, #fff); }
.reg-steps .n { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 800;
  color: var(--deep); background: var(--sand); position: relative; z-index: 1; }
.reg-steps b { display: block; font-size: 14.5px; font-weight: 800; color: var(--deep); line-height: 1.45; }
.reg-steps span:not(.n) { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.6; margin-top: 2px; }
.reg-steps li.is-current .n { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px var(--primary-soft); }
.reg-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.reg-checklist li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; line-height: 1.55; color: var(--ink); }
.reg-checklist i { color: var(--primary); font-size: 17px; margin-top: 1px; }
.reg-checklist em { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.reg-help p { margin: 0 0 10px; font-size: 14.5px; color: var(--muted); line-height: 1.6; }
.reg-help a { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 800; color: var(--primary-dark); text-decoration: none; }
.reg-help a:hover { text-decoration: underline; }

/* ---------- Dark theme ---------- */
html[data-theme="dark"] .reg-top { background: color-mix(in srgb, var(--d-bg) 88%, transparent); border-color: var(--d-line); }
html[data-theme="dark"] .reg-brand, html[data-theme="dark"] .reg-back, html[data-theme="dark"] .reg-theme { color: var(--d-heading); }
html[data-theme="dark"] .reg-back, html[data-theme="dark"] .reg-theme { border-color: var(--d-line); background: transparent; }
html[data-theme="dark"] .reg-back:hover { background: var(--d-surface-2); }
html[data-theme="dark"] .reg-panel { background: var(--d-surface); border-color: var(--d-line); box-shadow: none; }
html[data-theme="dark"] .reg-panel h2, html[data-theme="dark"] .reg-steps b, html[data-theme="dark"] .reg-checklist li { color: var(--d-heading); }
html[data-theme="dark"] .reg-steps .n { background: var(--d-surface-2); color: var(--d-heading); }
html[data-theme="dark"] .reg-steps li:not(:last-child)::after { background: var(--d-line); }
html[data-theme="dark"] .reg-help a, html[data-theme="dark"] .choice-kicker { color: color-mix(in srgb, var(--primary) 55%, #fff); }

/* ---------- Smaller screens ---------- */
@media (max-width: 991.98px) {
  .reg-layout { grid-template-columns: 1fr; }
  .reg-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .reg-aside .reg-panel:first-child { display: none; }      /* steps already shown above the form */
}
@media (max-width: 600px) {
  body.reg-entry { font-size: 15px; }
  .reg-back span { display: none; }
  .reg-back { padding: 8px 10px; }
  .reg-brand small { display: none; }
  .reg-entry .wrapper { margin-top: 12px; }
  .reg-entry .header-box { padding: 20px 18px; }
  .reg-entry .header-content h1 { font-size: 23px; }
  .reg-entry .choice-card { padding: 18px 16px 18px 52px; }
  [dir="ltr"] .reg-entry .choice-card { padding: 18px 52px 18px 16px; }
  .reg-entry .form-box { padding: 18px; }
}
.reg-entry .form-group { min-width: 0; flex-basis: 240px; }
.reg-entry .form-group input { width: 100%; max-width: 100%; }

/* Nationality (2026-12): Algerian -> NIN, another nationality -> country + passport number. */
.reg-entry .reg-nat { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.reg-entry .reg-nat legend { float: none; width: auto; margin: 0 0 8px; padding: 0; font-size: 15px; font-weight: 700; }
.reg-nat-options { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 4px; border-radius: 14px;
                   border: 1px solid var(--border-color, #c9d3d6); background: rgba(127, 127, 127, .06); }
.reg-nat-opt { position: relative; display: inline-flex; align-items: center; margin: 0 !important; padding: 9px 18px;
               border-radius: 10px; font-weight: 700; font-size: 14.5px; cursor: pointer; user-select: none; }
.reg-nat-opt input { position: absolute; opacity: 0; pointer-events: none; }
.reg-nat-opt:has(input:checked) { background: var(--primary, #0aa98f); color: #fff !important; }
.reg-nat-opt:has(input:focus-visible) { outline: 2px solid var(--primary, #0aa98f); outline-offset: 2px; }
.reg-entry .reg-nat > .help { margin-top: 8px; }
.reg-entry .reg-nat-country { margin-top: 12px; max-width: 420px; }
.reg-entry .reg-nat-country[hidden] { display: none !important; }
.reg-entry .reg-nat-country select { width: 100%; min-height: 50px; font-size: 16px; border-radius: 12px; padding: 10px 12px;
                                     border: 1px solid #c9d3d6; background-color: #fff; color: inherit; }
.reg-entry [data-when][hidden] { display: none !important; }
html[data-theme="dark"] .reg-nat-options { border-color: var(--d-line); background: var(--d-surface-2); }
html[data-theme="dark"] .reg-nat-opt:has(input:checked) { color: #fff !important; }
