/* Créer un compte (vues/inscription) — the funnel's own look. The form card, side column, fields, buttons and
   messages are the shared login / Mot de passe oublié parts (components.css.php: .pwr__*, .loginform, .loginfield,
   .loginsubmit, .loginaltcha): this file only adds the three doors, the company lookup and the chips. */

/* Panels: the card is display:grid (shared rule) → the hidden attribute needs the win. */
.ins [hidden] { display: none !important; }
/* The shared login rules size email/text/password inputs; the funnel also has search / tel fields. */
.ins__form input:not([type=checkbox]):not([type=radio]):not([type=hidden]) {
  width: 100%; box-sizing: border-box; padding: var(--space-2); border: 1px solid #c3ccd2; background: #fff; font: inherit; -webkit-appearance: none; appearance: none;
}
.ins__form input[type=search]::-webkit-search-decoration, .ins__form input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ── state change: the leaving panel fades while the page glides to the title; the new one fades in (inscription.js) ── */
[data-ins-panel] { transition: opacity .18s ease, transform .18s ease; }
[data-ins-panel].is-leaving { opacity: 0; transform: translateY(-6px); pointer-events: none; }
[data-ins-panel].is-entering { opacity: 0; transform: translateY(8px); transition: none; }

/* ── the three doors: house cards — gradient header (icon + title) + white body ── */
.ins__doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); max-width: 760px; margin: 0 auto; }   /* the pagehead--narrow column */
.ins__door {
  display: grid; grid-template-rows: auto 1fr; background: #fff; box-shadow: var(--shadow-panel); color: #1d2939; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ins__door:hover, .ins__door:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .18); outline: none; }
.ins__door:focus-visible { box-shadow: 0 0 0 3px var(--brand), 0 10px 26px rgba(0, 0, 0, .18); }
.ins__door-head { display: flex; align-items: center; gap: var(--space-2); min-height: 56px; box-sizing: border-box; padding: 8px var(--space-3); background: var(--brand-gradient); color: #fff; font-size: 1.02rem; line-height: 1.2; }   /* min-height: one- and two-line titles align across the row */
.ins__door-head .icon { flex: 0 0 auto; width: 22px; height: 22px; }
.ins__door-body { display: grid; grid-template-rows: 1fr auto; gap: var(--space-2); padding: var(--space-3); }
.ins__door-txt { color: #475467; font-size: 14px; line-height: 1.45; }
.ins__door-go { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-weight: 700; }
.ins__door-go .icon { width: 16px; height: 16px; transition: transform .15s ease; }
.ins__door:hover .ins__door-go .icon { transform: translateX(3px); }

/* ── the picked door, above the form (shape: the same icon tile, smaller + a way back) ── */
.ins__picked { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4) 0; }
.ins__picked-item { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 1.05rem; color: #1d2939; }
.ins__picked-item[hidden] { display: none; }
.ins__picked-item .icon { width: 32px; height: 32px; padding: 6px; box-sizing: border-box; background: var(--brand-gradient); color: #fff; }
.ins__change { margin-left: auto; justify-self: auto; font-size: 14px; }
.ins__form[hidden] { display: none; }
.ins__form textarea {
  width: 100%; box-sizing: border-box; padding: var(--space-2); border: 1px solid #c3ccd2; background: #fff; font: inherit; resize: vertical; min-height: 72px;
}
.ins__form textarea:focus, .ins__select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 0, 17, .08); }
.ins__select { width: 100%; box-sizing: border-box; padding: var(--space-2); border: 1px solid #c3ccd2; background: #fff; font: inherit; }
.ins__form [aria-invalid="true"] { border-color: #b42318 !important; box-shadow: 0 0 0 3px rgba(180, 35, 24, .12) !important; }
.ins__cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.ins__cols--cp { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.ins__fs { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: var(--space-3); }
.ins__fs > legend { display: flex; align-items: center; gap: var(--space-1); padding: 0; margin-bottom: var(--space-2); font-weight: 800; font-size: 1.02rem; color: #1d2939; }
.ins__fs > legend .icon { width: 18px; height: 18px; color: var(--brand); }
.ins__fs + .ins__fs { padding-top: var(--space-3); border-top: 1px solid #eef0f3; }
.loginfield label small, .ins__chips-lbl small { font-weight: 400; color: #667085; }
.ins__cgv { display: flex; gap: var(--space-2); align-items: flex-start; line-height: 1.4; }
.ins__cgv input { margin-top: 3px; }
.ins__cgv a { color: var(--brand); }
.ins__honest { display: flex; gap: var(--space-1); align-items: flex-start; }
.ins__honest .icon { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; }
.ins__inline { border: 0; padding: 0; background: none; font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline; display: inline; justify-self: auto; }
.ins__inline .icon { width: 14px; height: 14px; vertical-align: -2px; }

/* ── SIRENE lookup: field + hit list + the chosen company ── */
.ins__lookup { position: relative; }
.ins__q { position: relative; }
.ins__q input { padding-right: 40px; }
.ins__q-ico { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #98a2b3; pointer-events: none; }
.ins__q-ico .icon { width: 18px; height: 18px; }
.ins__lookup.is-busy .ins__q-ico { animation: ins-spin 1s linear infinite; }
@keyframes ins-spin { to { transform: translateY(-50%) rotate(360deg); } }
.ins__hits { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid #c3ccd2; border-top: 0; max-height: 300px; overflow: auto; }
.ins__hits[hidden] { display: none; }
.ins__hit { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--space-2); width: 100%; padding: var(--space-2); border: 0; border-top: 1px solid #eef0f3; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.ins__hit:first-child { border-top: 0; }
.ins__hit:hover, .ins__hit:focus-visible, .ins__hit.is-active { background: #f5f7fa; outline: none; }
.ins__hit b { color: #1d2939; }
.ins__hit span { grid-column: 1; font-size: 13px; color: #667085; }
.ins__hit small { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 12px; color: #98a2b3; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ins__hit.is-closed b { color: #98a2b3; text-decoration: line-through; }
.ins__hits-empty { padding: var(--space-2); font-size: 14px; color: #667085; }
.ins__hits-empty .ins__inline { margin-left: 4px; }
.ins__company { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-2); align-items: start; padding: var(--space-2); background: #ecfdf3; }
.ins__company[hidden] { display: none; }
.ins__company-ico { color: #067647; }
.ins__company-ico .icon { width: 22px; height: 22px; }
.ins__company-txt { display: grid; gap: 2px; min-width: 0; line-height: 1.35; }
.ins__company-txt b { color: #1d2939; }
.ins__company-txt small { color: #475467; font-size: 12.5px; }
.ins__company-warn { display: flex; gap: 4px; align-items: center; color: #93370d; }
.ins__company-warn[hidden] { display: none; }
.ins__company-warn .icon { width: 14px; height: 14px; }
.ins__company .ins__inline { white-space: nowrap; text-decoration: none; font-size: 14px; }
.ins__manual { display: grid; gap: var(--space-3); }
.ins__manual[hidden] { display: none; }

/* ── chips (brands: checkboxes; need: radios) — the input is the state, the label is the control ── */
.ins__chips { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.ins__chips-lbl { flex: 1 0 100%; font-weight: 700; margin-bottom: 2px; }
.ins__chip { position: relative; cursor: pointer; user-select: none; }
.ins__chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ins__chip span { display: inline-block; padding: 5px 10px; border: 1px solid #c3ccd2; background: #fff; font-size: 14px; line-height: 1.2; color: #344054; transition: background .12s ease, border-color .12s ease, color .12s ease; }
.ins__chip:hover span { border-color: var(--brand); color: var(--brand); }
.ins__chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.ins__chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 0, 17, .12); }
.ins__chips--radio .ins__chip span { font-weight: 700; }

/* ── done ── */
.ins__card--done { grid-template-columns: 1fr; }
.ins__card--done .pwr__done { max-width: 100%; }

@media (max-width: 960px) {
  .ins__doors { grid-template-columns: 1fr; gap: var(--space-2); }
  .ins__door-head { min-height: 0; }
}
@media (max-width: 760px) {
  .ins__cols { grid-template-columns: 1fr; }
  .ins__cols--cp { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .ins__picked { padding: var(--space-3) var(--space-3) 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ins__door, .ins__door-go .icon, [data-ins-panel] { transition: none; }
  .ins__lookup.is-busy .ins__q-ico { animation: none; }
}
