/* Réglementation : parcours par étapes (stepper), choix du type en cartes, grille de champs, récapitulatif. */
.rf { display: grid; gap: 16px; }

/* En-tête du parcours : étapes reliées + sous-étapes + barre de progression */
.rf-head { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 20px 14px; box-shadow: var(--shadow); display: grid; gap: 10px; position: relative; overflow: hidden; }
.rf-head::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, #2563eb, #1d4ed8); }
.rf-steps { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.rf-steps li { display: inline-flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 999px; color: var(--fg-3); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: color .15s var(--ease); position: relative; }
.rf-steps li + li::before { content: ''; width: 34px; height: 2px; background: var(--line-2); margin: 0 6px 0 -4px; border-radius: 2px; }
.rf-steps li .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--line-2); color: var(--fg-3); font: 600 12.5px/1 var(--display, var(--font)); transition: all .15s var(--ease); }
.rf-steps li.cur { color: var(--accent-ink); font-weight: 600; }
.rf-steps li.cur .n { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.rf-steps li.done { color: var(--ok); }
.rf-steps li.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.rf-steps li.done + li::before { background: var(--ok); }
.rf-substeps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rf-substeps li { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg-3); font-size: 12.5px; cursor: pointer; }
.rf-substeps li.cur { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); font-weight: 500; }
.rf-substeps:empty { display: none; }

/* Sections de champs : reprise de la disposition du CRM actuel (arc-reglementation-form.php) — largeurs ACF via --w, libellés, champs, chips */
.rf-sec { padding: 28px 36px 24px; --rf-blue: #0e4c97; --rf-ink: #0f172a; --rf-muted: #64748b; --rf-line: #e2e8f0; --rf-bd: #c4cbd4; --rf-soft: #f6f7f9; }
@media (max-width: 900px) { .rf-sec { padding: 20px 16px; } }
.rf-sec-title { font-family: var(--display, var(--font)); font-size: 1.02rem; font-weight: 700; color: var(--rf-blue); text-transform: uppercase; letter-spacing: .02em; margin: 0 0 22px; padding: 0 0 9px; border-bottom: 2px solid #eef2f7; }
.rf-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 22px 18px; container-type: inline-size; }
.rf-field { flex: 0 1 calc(var(--w, 100) * 1% - 18px * (1 - var(--w, 100) / 100)); min-width: 0; margin: 0; }
@container (max-width: 940px) { .rf-field.rf-w-s { flex-basis: calc(50% - 9px); } }
@container (max-width: 560px) { .rf-grid .rf-field { flex-basis: 100%; } }
.rf-field.rf-t-text, .rf-field.rf-t-select { align-self: flex-end; }
.rf-field.rf-t-checkbox, .rf-field.rf-t-textarea, .rf-field[data-field="type_confo"], .rf-field[data-field="client_select"] { flex: 0 0 100%; }
.rf-field .rf-label { display: block; margin: 0 0 6px; font-size: .88rem; font-weight: 600; color: #334155; text-transform: none; }
.rf-field .rf-label .req { color: #dc2626; }
.rf-field input[type="text"], .rf-field input[type="search"], .rf-field textarea, .rf-field select { width: 100%; max-width: 100%; padding: 11px 13px; border: 1.5px solid var(--rf-bd); border-radius: 10px; background: #fff; font-family: inherit; font-size: .92rem; color: var(--rf-ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); height: auto; line-height: 1.4; }
.rf-field.rf-t-text input[type="text"], .rf-field.rf-t-select select { height: 45px; }
.rf-field textarea { min-height: 100px; resize: vertical; }
.rf-field input:focus, .rf-field textarea:focus, .rf-field select:focus { border-color: var(--rf-blue); box-shadow: 0 0 0 4px rgba(14, 76, 151, .12); outline: 0; }
.rf-field .field-hint { font-size: .8rem; color: var(--rf-muted); margin: 6px 0 0; }
.rf-field.rf-hidden { display: none; }
.rf-field.rf-invalid input, .rf-field.rf-invalid select, .rf-field.rf-invalid textarea, .rf-field.rf-invalid .rf-chips { outline: 2px solid #fca5a5; outline-offset: 3px; border-radius: 11px; }
/* Cases à cocher = chips qui passent à la ligne ; empilées quand les libellés sont longs */
.rf-chips { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.rf-chip { display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 11px 14px; border: 1.5px solid var(--rf-bd); border-radius: 11px; background: var(--rf-soft); font-size: .86rem; font-weight: 500; color: #334155; cursor: pointer; line-height: 1.35; max-width: 100%; transition: border-color .15s, background .15s; }
.rf-chip:hover { border-color: #94a3b8; background: #eef1f5; }
.rf-chip input { margin: 0; width: 16px; height: 16px; min-width: 16px; accent-color: var(--rf-blue); flex: 0 0 auto; }
.rf-chip:has(input:checked) { border-color: var(--rf-blue); background: #f4f8ff; color: var(--rf-blue); }
.rf-chips.rf-stack { flex-direction: column; gap: 9px; } .rf-chips.rf-stack .rf-chip { width: 100%; justify-content: flex-start; }

/* Choix du type : cartes */
.rf-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.rf-type { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 18px 18px 16px; border: 1.5px solid var(--line-2); border-radius: var(--r-lg); cursor: pointer; background: var(--surface); transition: all .15s var(--ease); min-height: 128px; }
.rf-type:hover { border-color: var(--accent-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.rf-type input { position: absolute; opacity: 0; pointer-events: none; }
.rf-type-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); }
.rf-type-body { display: grid; gap: 3px; min-width: 0; }
.rf-type-body strong { font-family: var(--display, var(--font)); font-size: 15px; font-weight: 600; color: var(--fg); }
.rf-type-body em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .06em; }
.rf-type-body small { font-size: 12.5px; color: var(--fg-3); line-height: 1.45; margin-top: 4px; }
.rf-type-check { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--accent); color: #fff; opacity: 0; transform: scale(.6); transition: all .15s var(--ease); }
.rf-type.on, .rf-type:has(input:checked) { border-color: var(--accent); background: linear-gradient(160deg, #fff, var(--accent-soft) 160%); box-shadow: 0 0 0 3px var(--accent-soft); }
.rf-type.on .rf-type-check, .rf-type:has(input:checked) .rf-type-check { opacity: 1; transform: scale(1); }
.rf-type.on .rf-type-ico, .rf-type:has(input:checked) .rf-type-ico { background: var(--accent); color: #fff; }

/* Navigation collante */
.rf-nav { display: flex; align-items: center; gap: 10px; position: sticky; bottom: 0; padding: 12px 16px; margin-top: 4px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.rf-nav [data-rf-progress] { font-weight: 500; }

/* Récapitulatif (fiche dossier) */
.rf-sum-title { font-family: var(--display, var(--font)); font-size: 14px; font-weight: 600; color: var(--fg); margin: 16px 0 6px; }
.rf-sum { font-size: 13.5px; }

/* Page liste : tuiles + démarrage rapide */
.rf-start { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 18px; }
.rf-start a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--fg); box-shadow: var(--shadow); transition: all .15s var(--ease); }
.rf-start a:hover { text-decoration: none; border-color: var(--accent-2); transform: translateY(-1px); }
.rf-start .rf-type-ico { width: 40px; height: 40px; }
.rf-start strong { display: block; font-family: var(--display, var(--font)); font-weight: 600; font-size: 14px; }
.rf-start small { color: var(--fg-3); font-size: 12px; }
.rf-start .chev { margin-left: auto; color: var(--fg-4); }
@media (max-width: 860px) { .rf-grid .rf-field { flex-basis: 100%; } .rf-steps li + li::before { width: 14px; } }
