.fm-page { padding: 56px 0 96px; }
.fm-page .container { width: 100%; padding-inline: clamp(1rem, 5vw, 4rem); }
.fm-narrow { max-width: none; }
.fm-center { margin-inline: auto; }
.fm-stack { display: grid; gap: 1rem; }
.fm-muted { color: var(--muted); }

.fm-intro { max-width: 40em; margin-bottom: 36px; }
.fm-intro h1 { font-size: clamp(2rem, 3.8vw, 3rem); font-weight: 700; overflow-wrap: anywhere; }
.fm-intro p { margin-top: 14px; color: var(--muted); font-size: 1.12rem; }
.fm-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.fm-card { min-width: 0; padding: 1.5rem; background: var(--white); border: 1.5px solid var(--line); border-radius: 14px; }

.btn-sm { padding: .3rem .85rem; font-size: .9rem; }
.btn-outline.is-danger { color: #b42318; }
.btn-outline.is-danger:hover { border-color: #b42318; color: #912018; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-outline[disabled]:hover { border-color: var(--line); color: var(--ink); }
.btn-primary[disabled]:hover { background: var(--brand); }

.fm-input { width: 100%; padding: 0 14px; height: 48px; font: inherit; font-size: 16px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
textarea.fm-input { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.6; resize: vertical; }
select.fm-input { cursor: pointer; }
.fm-input:hover { border-color: #c9d2e1; }
.fm-input:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.fm-field { display: grid; gap: 8px; }
.fm-field + .fm-field { margin-top: 20px; }
.fm-label { font-weight: 600; font-size: .93rem; }
.fm-check { display: flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 500; }
.fm-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); flex: none; }

.fm-list { overflow: hidden; background: var(--white); border: 1.5px solid var(--line); border-radius: 14px; }
.fm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem 1.2rem; align-items: center; padding: 1.1rem 1.4rem; border-top: 1px solid var(--line); }
.fm-row:first-child { border-top: 0; }
.fm-row:hover { background: var(--soft); }
.fm-row-title { font: 700 1.15rem/1.3 var(--font-head); letter-spacing: -.01em; overflow-wrap: anywhere; }
.fm-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.1rem; margin-top: .3rem; color: var(--muted); font-size: .9rem; }
.fm-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
@media (max-width: 800px) { .fm-row { grid-template-columns: 1fr; } .fm-row-actions { justify-content: flex-start; } }
.fm-status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.fm-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.fm-status.is-closed { color: var(--muted); font-weight: 500; }
.fm-status.is-closed::before { background: #a6aebd; }
.fm-empty { padding: 3rem 1.5rem; text-align: center; }
.fm-empty h2 { margin-bottom: .5rem; font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; }
.fm-empty p { margin: 0 auto 1.4rem; max-width: 34em; color: var(--muted); }

.fm-q { border-left: 4px solid var(--brand); }
.fm-qhead { display: grid; grid-template-columns: minmax(0, 1fr) 12rem; gap: .7rem; }
@media (max-width: 560px) { .fm-qhead { grid-template-columns: 1fr; } }
.fm-q-label { font-weight: 600; }
.fm-opts { display: grid; gap: .5rem; margin: 1rem 0 .3rem; }
.fm-opt { display: flex; align-items: center; gap: .6rem; }
.fm-mark { flex: none; width: 16px; height: 16px; border: 2px solid #a6aebd; }
.fm-mark.round { border-radius: 50%; }
.fm-mark.square { border-radius: 4px; }
.fm-mark.num { width: auto; height: auto; min-width: 1.2rem; border: 0; color: var(--muted); font-size: .88rem; }
.fm-hint { margin: .9rem 0 0; color: var(--muted); font-size: .92rem; }
.fm-qfoot { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.fm-qfoot .fm-check { margin-right: auto; }
.fm-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .8rem; margin-top: 1.2rem; padding: .9rem 0; background: var(--white); border-top: 1px solid var(--line); }
.fm-savebar .fm-check { margin-right: auto; }

.fm-fillhead { border-top: 8px solid var(--brand); }
.fm-fillhead h1 { margin: 0 0 .6rem; font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; overflow-wrap: anywhere; }
.fm-fillhead p { color: var(--muted); white-space: pre-wrap; }
.fm-fq fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.fm-qtitle { display: block; padding: 0; margin: 0 0 .9rem; font: 700 1.1rem/1.4 var(--font-head); letter-spacing: -.01em; }
.fm-req { margin-left: .3rem; color: #b42318; }
.fm-choice { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 10px; cursor: pointer; }
.fm-choice:hover { background: var(--soft); }
.fm-choice input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.fm-rating { display: flex; flex-wrap: wrap; gap: .5rem; }
.fm-rating label { position: relative; cursor: pointer; }
.fm-rating input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fm-rating span { display: grid; place-items: center; width: 48px; height: 48px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); font: 700 1.1rem/1 var(--font-head); transition: border-color .15s, background .15s, color .15s; }
.fm-rating label:hover span { border-color: var(--brand); }
.fm-rating input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.fm-rating input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 3px; }
.fm-scale { display: flex; justify-content: space-between; gap: 1rem; max-width: 100%; margin-top: .5rem; color: var(--muted); font-size: .85rem; }
.fm-thanks { padding: 2.5rem 1.5rem; text-align: center; }
.fm-thanks h1 { margin-bottom: .5rem; }
.fm-thanks p { margin: 0 0 1.4rem; }
.fm-ok { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 1.2rem; border-radius: 50%; background: var(--ok); color: #fff; font-size: 1.8rem; line-height: 1; }

.fm-stat { display: flex; flex-direction: column; margin-bottom: .5rem; }
.fm-stat strong { font: 700 clamp(2rem, 4vw, 2.8rem)/1.05 var(--font-head); letter-spacing: -.02em; }
.fm-stat span { color: var(--muted); }
.fm-tabs { margin: 1.2rem 0 1.4rem; }
.fm-sum h2 { margin-bottom: .25rem; font-size: 1.2rem; font-weight: 700; line-height: 1.35; letter-spacing: 0; overflow-wrap: anywhere; }
.fm-sum-meta { margin-bottom: 1rem; color: var(--muted); font-size: .9rem; }
.fm-bar { display: grid; grid-template-columns: minmax(6rem, 14rem) minmax(0, 1fr) 6.5rem; gap: .8rem; align-items: center; margin: .6rem 0; font-size: .95rem; }
.fm-bar .dash-bar { margin: 0; }
.fm-bar > span:first-child { overflow-wrap: anywhere; }
.fm-bar-val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .fm-bar { grid-template-columns: minmax(0, 1fr) auto; } .fm-bar .dash-bar { grid-column: 1 / -1; order: 3; } }
.fm-avg { margin-bottom: .6rem; font: 700 2.4rem/1 var(--font-head); }
.fm-avg small { color: var(--muted); font: 400 1rem var(--font-body); }
.fm-texts { display: grid; gap: .5rem; max-height: 20rem; overflow: auto; }
.fm-texts li { padding: .6rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.fm-table-wrap { overflow-x: auto; background: var(--white); border: 1.5px solid var(--line); border-radius: 14px; }
.fm-table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .93rem; line-height: 1.5; }
.fm-table th, .fm-table td { padding: .75rem 1rem; text-align: left; vertical-align: top; border-top: 1px solid var(--line); max-width: 22rem; overflow-wrap: anywhere; }
.fm-table thead th { border-top: 0; background: var(--soft); color: var(--muted); font-weight: 600; white-space: nowrap; }

.fm-toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; max-width: 90vw; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: .92rem; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity .2s, transform .2s; }
.fm-toast.show { opacity: 1; transform: translate(-50%, 0); }
.sr-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .fm-toast, .fm-rating span { transition: none; } }

.fm-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .4rem 0 1rem; color: var(--muted); font-size: .93rem; }
.fm-filter .fm-input { height: 40px; max-width: 12rem; }
.fm-rowtools { margin-bottom: 1rem; }
.fm-sort { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: inherit; cursor: pointer; white-space: nowrap; }
.fm-sort:hover { color: var(--ink); }
.fm-sort:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.fm-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-top: 1rem; color: var(--muted); font-size: .93rem; }
.fm-pager > div { display: flex; align-items: center; gap: .6rem; }
.fm-spark { display: flex; align-items: flex-end; gap: 2px; height: 96px; margin-top: .6rem; }
.fm-spark i { flex: 1 1 0; min-width: 2px; border-radius: 3px 3px 0 0; background: var(--brand); opacity: .85; }
.fm-spark i:hover { opacity: 1; }
.fm-sum-flex { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2rem; }
.fm-sum-bars { flex: 1 1 20rem; min-width: 0; }
.fm-pie { flex: none; width: 150px; height: 150px; border-radius: 50%; }
.fm-dot { display: inline-block; width: 10px; height: 10px; margin-right: .5rem; border-radius: 50%; }

.fm-qbar { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; color: var(--muted); font-size: .88rem; font-weight: 600; }
.fm-handle { display: inline-grid; place-items: center; width: 36px; height: 30px; padding: 0; border: 1.5px solid var(--line); border-radius: 8px; background: var(--white); color: var(--muted); font-size: 1.05rem; line-height: 1; letter-spacing: -.15em; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.fm-handle:hover { border-color: var(--ink); color: var(--ink); }
.fm-handle:active { cursor: grabbing; }
.fm-handle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.fm-q.is-dragging { opacity: .55; }
.fm-q.drop-before { box-shadow: 0 -5px 0 0 var(--brand); }
.fm-q.drop-after { box-shadow: 0 5px 0 0 var(--brand); }
.fm-previewbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding-block: 1rem; border-left: 4px solid #f59e0b; background: #fffbeb; }
.fm-previewbar span { flex: 1 1 14rem; color: var(--muted); }

.fm-page [hidden] { display: none !important; }
.fm-q.fm-sec { border-left-color: var(--ink); background: var(--soft); }
.fm-cond { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px dashed var(--line); }
.fm-cond-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .6rem; margin-top: .7rem; }
.fm-add { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.fm-sectionhead { border-left: 4px solid var(--ink); }
.fm-sectionhead h2 { margin: 0; font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 700; overflow-wrap: anywhere; }
.fm-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.fm-nav .fm-progress { margin-left: auto; color: var(--muted); font-size: .9rem; }

.fm-captcha { min-height: 65px; }
.fm-dialog { width: min(92vw, 24rem); padding: 1.5rem; border: 1.5px solid var(--line); border-radius: 14px; background: var(--white); color: var(--ink); text-align: center; }
.fm-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.fm-dialog h2 { margin: 0 0 1rem; font-size: 1.25rem; font-weight: 700; }
.fm-qr { display: block; width: 100%; max-width: 260px; height: auto; margin: 0 auto; border: 1px solid var(--line); border-radius: 10px; }
.fm-qr-link { margin: .9rem 0 1.1rem; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.fm-dialog-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }

.fm-page .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.fm-qhelp { margin: -.5rem 0 .9rem; color: var(--muted); font-size: .92rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.fm-rule { display: grid; gap: .3rem; }
.fm-rule .fm-label { font-weight: 500; font-size: .85rem; color: var(--muted); }
.fm-consent { display: grid; gap: .6rem; }
.fm-consent-link { font-size: .9rem; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.fm-editor { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 2rem; align-items: start; }
.fm-editor-top { grid-column: 1 / -1; }
.fm-editor-side, .fm-editor-main { min-width: 0; }
.fm-editor-side { margin-bottom: 1rem; }
@media (min-width: 1100px) {
  .fm-editor { grid-template-columns: minmax(19rem, 26rem) minmax(0, 1fr); }
  .fm-editor-side { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); margin-bottom: 0; overflow: auto; }
}
.fm-fill { width: 100%; max-width: var(--fm-fill-max, none); }
.fm-listtools { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .6rem; }
.fm-listtools .fm-input { height: 44px; }
@media (max-width: 700px) { .fm-listtools { grid-template-columns: 1fr; } }

.fm-places { max-width: 7rem; flex: none; }
.fm-choice.is-full { color: var(--muted); cursor: not-allowed; }
.fm-choice.is-full:hover { background: none; }
.fm-cond-row + .fm-cond-row { margin-top: .5rem; }
.fm-filter select.fm-input { max-width: 18rem; }
.fm-rule-row { grid-template-columns: repeat(3, minmax(0, 1fr)) 2.6rem; align-items: center; }
.fm-rule-row .btn { padding-inline: 0; height: 48px; }
@media (max-width: 760px) { .fm-rule-row { grid-template-columns: 1fr 2.6rem; } .fm-rule-row > :nth-child(3) { grid-column: 1 / -1; } }

.fm-stats { margin-bottom: 1rem; display: grid; gap: 1.2rem; }
.fm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .8rem; }
.fm-tile { display: flex; flex-direction: column; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.fm-tile strong { font: 700 clamp(1.6rem, 3vw, 2.1rem)/1.1 var(--font-head); letter-spacing: -.02em; }
.fm-tile span { color: var(--muted); font-size: .88rem; }
.fm-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.4rem 2rem; }
.fm-stats-col { min-width: 0; }
.fm-stats h2 { margin: 0 0 .5rem; font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.fm-top { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.fm-top li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 10px; }
.fm-top a { overflow-wrap: anywhere; font-weight: 600; color: var(--ink); text-decoration: none; }
.fm-top a:hover { color: var(--brand); text-decoration: underline; }
.fm-top span { flex: none; color: var(--muted); font-size: .9rem; }
.fm-dialog-wide { width: min(94vw, 40rem); max-height: 86vh; overflow: auto; text-align: left; }
.fm-dialog-wide h2 { text-align: left; }
.fm-history { display: grid; gap: .6rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.fm-history > li { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 10px; }
.fm-history ul { margin: .3rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .9rem; }
.fm-badge { margin-left: .6rem; padding: .1rem .5rem; border-radius: 999px; background: var(--brand-tint); color: var(--brand); font-size: .78rem; font-weight: 600; }
.fm-kinds { display: grid; gap: .4rem; }
.fm-kinds .fm-check { font-weight: 400; font-size: .92rem; }
.fm-file { height: auto; padding: .7rem .8rem; }
.fm-filelink { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.fm-print-only { display: none; }

@page { margin: 14mm; }
@media print {
  .fm-print-only { display: block; }
  body.fm-printing { background: #fff !important; }
  body.fm-printing :is(header, footer, nav):not(.fm-page *) { display: none !important; }
  body.fm-printing > *:not(.fm-page):not(:has(.fm-page)) { display: none !important; }
  body.fm-printing * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.fm-printing .fm-page { padding: 0 !important; }
  body.fm-printing .fm-page .container { max-width: none; padding-inline: 0 !important; }
  body.fm-printing .fm-intro { max-width: none; margin-bottom: 12px; }
  body.fm-printing .fm-intro h1 { font-size: 1.6rem; }
  body.fm-printing :is(.fm-actions, .fm-stat, .fm-tabs, .fm-filter, .fm-rowtools, .fm-pager > div, .fm-toast, .fm-dialog) { display: none !important; }
  body.fm-printing .fm-table :is(th:last-child, td:last-child) { display: none; }
  body.fm-printing .fm-table-wrap { overflow: visible; border-radius: 0; }
  body.fm-printing .fm-table { min-width: 0; font-size: .78rem; }
  body.fm-printing .fm-table thead { display: table-header-group; }
  body.fm-printing .fm-table tr, body.fm-printing .fm-sum, body.fm-printing .fm-card { break-inside: avoid; }
  body.fm-printing .fm-texts { max-height: none; overflow: visible; }
  body.fm-printing .fm-print-head p { margin: 0 0 12px; color: #444; }
}

.fm-sharebar { border-left-color: var(--brand); background: var(--soft); }
.fm-dialog-wide h3 { margin: 1.1rem 0 .5rem; font-size: 1rem; font-weight: 700; text-align: left; }
.fm-dialog-wide .fm-add .fm-input { flex: 1 1 14rem; min-width: 0; }
.fm-dialog-wide .fm-dialog-actions { margin-top: 1.3rem; }

.fm-confirm { margin-top: 20px; display: grid; gap: 20px; }
.fm-confirm .fm-field + .fm-field { margin-top: 0; }

.fm-page.fm-themed { position: relative; isolation: isolate; min-height: 70vh; background-repeat: no-repeat; background-size: cover; background-position: center; }

.fm-page.fm-themed::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--fm-veil, transparent); pointer-events: none; }
.fm-page.fm-bg-image { background-color: #1e293b; }
.fm-bg-aurore { background: linear-gradient(135deg, #c7d2fe 0%, #fbcfe8 50%, #fde68a 100%); }
.fm-bg-ocean { background: linear-gradient(160deg, #0ea5e9 0%, #2563eb 55%, #1e3a8a 100%); }
.fm-bg-foret { background: linear-gradient(160deg, #a7f3d0 0%, #34d399 45%, #047857 100%); }
.fm-bg-coucher { background: linear-gradient(160deg, #fde68a 0%, #fb923c 45%, #be185d 100%); }
.fm-bg-lavande { background: linear-gradient(160deg, #ede9fe 0%, #c4b5fd 55%, #7c3aed 100%); }
.fm-bg-ardoise { background: linear-gradient(160deg, #e2e8f0 0%, #94a3b8 55%, #334155 100%); }
.fm-bg-sable { background: linear-gradient(160deg, #fef3c7 0%, #fde68a 40%, #e7c9a1 100%); }
.fm-bg-pointilles { background-color: #eef2ff; background-image: radial-gradient(#a5b4fc 1.5px, transparent 1.5px); background-size: 22px 22px; }
.fm-bg-vagues { background-color: #e0f2fe; background-image: repeating-radial-gradient(circle at 0 100%, transparent 0, transparent 18px, rgba(14, 165, 233, .22) 19px, rgba(14, 165, 233, .22) 20px); }
.fm-bg-grille { background-color: #f8fafc; background-image: linear-gradient(#cbd5e1 1px, transparent 1px), linear-gradient(90deg, #cbd5e1 1px, transparent 1px); background-size: 28px 28px; }
.fm-page.fm-themed.fm-bg-pointilles { background-size: 22px 22px; background-repeat: repeat; }
.fm-page.fm-themed.fm-bg-grille { background-size: 28px 28px; background-repeat: repeat; }
.fm-page.fm-themed.fm-bg-vagues { background-size: auto; background-repeat: repeat; }

.fm-logo { display: block; width: auto; height: auto; max-width: min(220px, 60%); max-height: 90px; margin: 0 0 1rem; object-fit: contain; }
.fm-contact { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; padding-block: 1rem; font-size: .95rem; }
.fm-contact a { font-weight: 600; color: var(--brand-dark); overflow-wrap: anywhere; }

.fm-appear { margin-top: 1rem; }
.fm-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.2rem, 1fr)); gap: .5rem; margin-top: .9rem; }
.fm-swatch { aspect-ratio: 4 / 3; padding: 0; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.fm-swatch:hover { border-color: #a6aebd; }
.fm-swatch[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.fm-swatch:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.fm-thumbrow { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.fm-thumb { max-width: 100%; max-height: 7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); object-fit: contain; }
input[type="file"].fm-input { height: auto; padding: .6rem .8rem; }
@media print { .fm-page.fm-themed { background: none !important; } }

.fm-page.fm-colored .btn-primary { background: var(--brand); border-color: var(--brand); color: var(--fm-on-brand); }
.fm-page.fm-colored .btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.fm-page.fm-colored .btn-outline:hover { border-color: var(--brand); color: var(--brand-dark); }
.fm-page.fm-colored .fm-rating input:checked + span { color: var(--fm-on-brand); }

.fm-page.fm-font-moderne { --font-head: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; font-family: var(--font-body); }
.fm-page.fm-font-classique { --font-head: Georgia, Cambria, 'Times New Roman', Times, serif; --font-body: Georgia, Cambria, 'Times New Roman', Times, serif; font-family: var(--font-body); }
.fm-page.fm-font-arrondie { --font-head: ui-rounded, 'SF Pro Rounded', 'Hiragino Maru Gothic ProN', Quicksand, Nunito, 'Segoe UI', system-ui, sans-serif; --font-body: ui-rounded, 'SF Pro Rounded', 'Hiragino Maru Gothic ProN', Quicksand, Nunito, 'Segoe UI', system-ui, sans-serif; font-family: var(--font-body); }
.fm-page.fm-font-machine { --font-head: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace; --font-body: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace; font-family: var(--font-body); }

.fm-appear [hidden] { display: none !important; }
.fm-colorrow { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.fm-colorpick { width: 2.6rem; height: 2.6rem; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); cursor: pointer; }
.fm-dot { width: 1.7rem; height: 1.7rem; padding: 0; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.fm-dot[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--brand); }
.fm-dot:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.fm-page.fm-w-moyen { --fm-fill-max: 52rem; }
.fm-page.fm-w-etroit { --fm-fill-max: 38rem; }
.fm-page[class*="fm-w-"] .fm-fill { margin-inline: auto; }

.fm-page.fm-cards-carre .fm-card { border-radius: 0; }
.fm-page.fm-cards-carre .fm-input, .fm-page.fm-cards-carre .btn, .fm-page.fm-cards-carre .fm-choice, .fm-page.fm-cards-carre .fm-rating span { border-radius: 3px; }
.fm-page.fm-cards-ombre .fm-card { border-color: transparent; box-shadow: 0 6px 24px rgba(15, 23, 42, .12); }
.fm-page.fm-cards-verre .fm-card { background: rgba(255, 255, 255, .72); border-color: rgba(255, 255, 255, .55); -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2); }
.fm-page.fm-cards-verre .fm-previewbar { background: rgba(255, 251, 235, .92); }

.fm-page.fm-dark { --white: #111827; --ink: #f3f4f6; --muted: #a8b0c0; --line: #374151; --soft: #1f2937; color: var(--ink); color-scheme: dark; }
.fm-page.fm-dark:not(.fm-themed) { background-color: #0b1220; }
.fm-page.fm-dark a:not(.btn) { color: var(--brand-tint); }
.fm-page.fm-dark .fm-input:hover { border-color: #4b5563; }
.fm-page.fm-dark.fm-cards-verre .fm-card { background: rgba(17, 24, 39, .7); border-color: rgba(255, 255, 255, .14); }
.fm-page.fm-dark .fm-previewbar, .fm-page.fm-dark.fm-cards-verre .fm-previewbar { background: #3a2a0a; }

.fm-qimg-pub { display: block; width: auto; height: auto; max-width: 100%; max-height: 22rem; margin: .8rem 0 .4rem; border-radius: 10px; object-fit: contain; }
.fm-sectionhead .fm-qimg-pub { margin-top: 1rem; }
.fm-page.fm-cards-carre .fm-qimg-pub { border-radius: 0; }
.fm-qimg { margin-top: .7rem; }
.fm-qimg > summary { cursor: pointer; font-weight: 600; font-size: .95rem; }
.fm-qimg[open] > summary { margin-bottom: .6rem; }

.fm-oimgbtn { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; padding: 0; overflow: hidden; cursor: pointer; }
.fm-oimgbtn img { width: 100%; height: 100%; object-fit: cover; }
.fm-oimgbtn input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.fm-oimgbtn:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }
.fm-choices-visual { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .7rem; margin-top: .6rem; }
.fm-choice.has-img { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .5rem .6rem; padding: .5rem; border: 1.5px solid var(--line); }
.fm-choice-img { grid-column: 1 / -1; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--soft); }
.fm-choice.has-img:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-tint); }
.fm-choice.is-full.has-img .fm-choice-img { filter: grayscale(1); opacity: .55; }
.fm-page.fm-cards-carre .fm-choice-img { border-radius: 0; }

.fm-page { padding: clamp(28px, 5vw, 56px) 0 clamp(56px, 8vw, 96px); }
.fm-intro { margin-bottom: clamp(22px, 3.5vw, 36px); }
.fm-intro h1 { letter-spacing: -.02em; line-height: 1.12; }
.fm-stack { gap: 1.15rem; }

.fm-card { padding: clamp(1.1rem, 3vw, 1.75rem); border-radius: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 18px -10px rgba(15, 23, 42, .10); }
.fm-fillhead { padding-top: clamp(1.3rem, 3.5vw, 2rem); }
.fm-fillhead p { line-height: 1.65; }
.fm-fq { transition: border-color .15s, box-shadow .15s; }
.fm-fq:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint), 0 6px 18px -10px rgba(15, 23, 42, .10); }
.fm-qtitle { line-height: 1.45; }
.fm-req { font-weight: 700; }

.fm-input { border-radius: 12px; border-color: #d5dcea; }
.fm-input::placeholder { color: #8a94a8; opacity: 1; }
.fm-input:hover { border-color: #aab4c8; }
textarea.fm-input { min-height: 130px; }
select.fm-input { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b7385' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.fm-page.fm-dark .fm-input { border-color: #374151; }
.fm-page.fm-dark .fm-input:hover { border-color: #4b5563; }
.fm-page.fm-dark .fm-input::placeholder { color: #7b8496; }

.fm-choice { min-height: 46px; border: 1.5px solid transparent; transition: background .15s, border-color .15s; }
.fm-choice:hover { background: var(--soft); border-color: var(--line); }
.fm-choice:has(input:checked) { border-color: var(--brand); background: var(--soft); background: color-mix(in srgb, var(--brand) 9%, transparent); }
.fm-choice:has(input:focus-visible) { outline: 3px solid var(--brand-tint); outline-offset: 1px; }
.fm-choice.is-full:has(input:checked), .fm-choice.is-full:hover { background: none; border-color: transparent; }
.fm-check { min-height: 32px; }

.fm-rating { gap: .6rem; }
.fm-rating span { border-radius: 14px; transition: border-color .15s, background .15s, color .15s, transform .15s; }
.fm-rating label:hover span { background: var(--soft); }
.fm-rating input:checked + span { transform: scale(1.06); }

.fm-nav { gap: .7rem; padding-top: .4rem; }
.fm-nav .btn { min-height: 46px; padding-inline: 1.6rem; }
.fm-savebar { box-shadow: 0 -10px 18px -14px rgba(15, 23, 42, .25); padding-bottom: calc(.9rem + env(safe-area-inset-bottom, 0px)); }
.fm-toast { bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }

.fm-list { border-radius: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 18px -10px rgba(15, 23, 42, .10); }
.fm-row { padding: 1.2rem 1.5rem; transition: background .15s; }
.fm-row-title { font-size: 1.12rem; }
.fm-row-actions .btn { white-space: nowrap; }
.fm-status { padding: .15rem .65rem .15rem .55rem; border-radius: 999px; background: var(--soft); font-size: .85rem; }
.fm-status.is-closed { font-weight: 600; }
.fm-empty { padding: clamp(2rem, 6vw, 3.5rem) 1.5rem; }

.fm-table-wrap { border-radius: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.fm-table thead th { position: sticky; top: 0; z-index: 1; font-size: .82rem; letter-spacing: .02em; text-transform: uppercase; }
.fm-table tbody tr:hover td { background: var(--soft); }
.fm-tile { border-radius: 14px; }
.fm-top li { transition: border-color .15s; }
.fm-top li:hover { border-color: var(--brand); }

.fm-dialog { border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(15, 23, 42, .45); }

.btn:focus-visible, .fm-handle:focus-visible, .fm-sort:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

@media (max-width: 600px) {
  .fm-page .container { padding-inline: 1rem; }
  .fm-stack { gap: 1rem; }
  .fm-nav { flex-direction: column-reverse; align-items: stretch; }
  .fm-nav .btn { width: 100%; justify-content: center; }
  .fm-nav .fm-progress { margin: 0 0 .2rem; text-align: center; order: -1; }
  .fm-actions .btn { flex: 1 1 100%; justify-content: center; }
  .fm-row { padding: 1rem; }
  .fm-row-actions .btn { flex: 1 1 auto; justify-content: center; }
  .fm-rating span { width: 44px; height: 44px; }
  .fm-scale { width: auto !important; }
  .fm-savebar { gap: .6rem; }
  .fm-savebar .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .fm-fq, .fm-choice, .fm-row, .fm-top li, .fm-rating span { transition: none; }
  .fm-rating input:checked + span { transform: none; }
}
