/* Formulaires : la page des membres (.ff-*), l'éditeur du tableau de bord (.fb-*) et la page des réponses (.fr-*). Couleurs du thème du site. */

/* ---------- Page des membres et aperçu ---------- */
.ff-body { background: var(--t-bg); min-height: 100vh; }
.ff-page { max-width: 680px; margin: 0 auto; padding: 32px 16px 64px; }
.ff-loading { color: var(--muted); text-align: center; padding: 40px 0; }
.ff-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.ff-head { display: flex; align-items: center; gap: 14px; }
.ff-head h1 { margin: 0; font-size: 24px; line-height: 1.2; }
.ff-icon { width: 48px; height: 48px; border-radius: 12px; }
.ff-kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ff-desc, .ff-note, .ff-who { margin: 0; color: var(--soft); line-height: 1.55; }
.ff-who { font-size: 13px; color: var(--muted); }
.ff-form { display: flex; flex-direction: column; gap: 18px; }
.ff-q { display: flex; flex-direction: column; gap: 6px; }
.ff-label { font-weight: 700; }
.ff-star { color: var(--danger); }
.ff-help { font-size: 13px; color: var(--muted); }
.ff-input { width: 100%; background: var(--input); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; }
.ff-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.ff-area { resize: vertical; min-height: 110px; }
.ff-choices { display: flex; flex-direction: column; gap: 6px; }
.ff-choice { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.ff-choice input { width: 18px; height: 18px; accent-color: var(--accent); }
.ff-check { font-weight: 600; }
.ff-scale { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ff-scale-l { font-size: 13px; color: var(--muted); }
.ff-dot { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--input); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.ff-dot.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.ff-info { background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; padding: 12px 14px; }
.ff-info p { margin: 6px 0 0; color: var(--soft); }
.ff-sep { border: 0; border-top: 1px solid var(--line); width: 100%; margin: 2px 0; }
.ff-cond { border-left: 3px solid var(--line); padding-left: 12px; }
.ff-err { color: var(--danger); font-size: 13px; min-height: 0; }
.ff-err:empty { display: none; }
.ff-top { font-size: 14px; }
.ff-invalid .ff-input { border-color: var(--danger); }
.ff-send { align-self: flex-start; padding: 11px 22px; font-size: 15px; border-radius: 10px; }
.ff-send:disabled { opacity: .6; cursor: default; }
.ff-done { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 0; text-align: center; }
.ff-tick { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; background: var(--accent); color: var(--on-accent); }

/* ---------- Éditeur (page Formulaires du tableau de bord) ---------- */
.fb { display: flex; flex-direction: column; gap: 16px; max-width: 1180px; }
.fb-box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.fb-box h3 { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fb-sub { margin: 0; color: var(--muted); font-size: 14px; }
.fb-tpls { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.fb-tpl { text-align: left; background: var(--panel2); border: 1px dashed var(--line); border-radius: 12px; padding: 14px; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 6px; font: inherit; }
.fb-tpl:hover { border-color: var(--accent); }
.fb-tpl b { font-size: 15px; }
.fb-tpl span { font-size: 13px; color: var(--muted); }
.fb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.fb-form { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.fb-form h4 { margin: 0; font-size: 16px; }
.fb-meta { font-size: 13px; color: var(--muted); }
.fb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fb-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--chip); color: var(--soft); margin-left: 8px; vertical-align: middle; }
.fb-badge.open { background: color-mix(in srgb, #2ecc71 25%, var(--panel)); color: var(--text); }
.fb-btn { background: var(--raised); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.fb-btn:hover { border-color: var(--accent); }
.fb-btn.main { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.fb-btn.danger { color: var(--danger); }
.fb-btn:disabled { opacity: .55; cursor: default; }
.fb-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.fb-tab { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 700; padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; }
.fb-tab.on { color: var(--text); border-bottom-color: var(--accent); }
.fb-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .fb-edit { grid-template-columns: minmax(0, 1fr); } }
.fb-qs { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fb-q { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.fb-qhead { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.fb-qhead b { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.fb-qhead small { color: var(--muted); }
.fb-arrow { background: var(--raised); border: 1px solid var(--line); color: var(--text); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font: inherit; }
.fb-arrow:disabled { opacity: .35; cursor: default; }
.fb-qbody { padding: 4px 12px 14px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line2); }
.fb-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.fb-field input[type="text"], .fb-field input[type="number"], .fb-field textarea, .fb-field select { width: 100%; min-width: 0; box-sizing: border-box; background: var(--input); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; }
.fb-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fb-row > .fb-field { flex: 1 1 140px; }
.fb-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.fb-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fb-type { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; color: var(--text); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; text-align: left; }
.fb-type:hover { border-color: var(--accent); }
.fb-preview { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 8px; }
.fb-preview .ff-card { background: var(--panel); }
.fb-warn { background: color-mix(in srgb, #f1c40f 14%, var(--panel)); border: 1px solid color-mix(in srgb, #f1c40f 40%, var(--line)); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.fb-link { font-family: var(--mono); font-size: 12px; word-break: break-all; color: var(--soft); }

/* ---------- Réponses ---------- */
.fr { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; max-width: 1180px; }
@media (max-width: 900px) { .fr { grid-template-columns: minmax(0, 1fr); } }
.fr-side, .fr-main { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.fr-side select, .fr-side input[type="search"], .fr-side input[type="text"] { background: var(--input); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; width: 100%; }
.fr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fr-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel2); border: 1px solid var(--line); color: var(--soft); border-radius: 99px; padding: 5px 11px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; opacity: .6; }
.fr-chip.on { opacity: 1; border-color: var(--accent); color: var(--text); }
.fr-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--muted); }
.fr-dot.pending { background: #f1c40f; } .fr-dot.review { background: #4e8cff; } .fr-dot.accepted { background: #2ecc71; } .fr-dot.refused { background: #e74c6f; }
.fr-items { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.fr-item { display: flex; align-items: center; gap: 10px; text-align: left; background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 10px; color: var(--text); font: inherit; cursor: pointer; }
.fr-item.on { border-color: var(--accent); }
.fr-item img, .fr-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--chip); flex: none; }
.fr-item b { display: block; font-size: 14px; }
.fr-item small { color: var(--muted); }
.fr-empty { color: var(--muted); text-align: center; padding: 26px 8px; border: 1px dashed var(--line); border-radius: 10px; }
.fr-head { display: flex; align-items: center; gap: 12px; }
.fr-head h3 { margin: 0; font-size: 18px; }
.fr-answers { display: flex; flex-direction: column; gap: 12px; }
.fr-answer b { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.fr-answer div { white-space: pre-wrap; overflow-wrap: anywhere; }
.fr-decide { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.fr-decide textarea { background: var(--input); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; min-height: 72px; resize: vertical; }
.fr-note { font-size: 13px; color: var(--muted); }

.fb-edit > * { min-width: 0; }
.fb-row select { min-width: 0; max-width: 100%; background: var(--input); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; }
