/* CFL Boutique — shared UI layer on top of brand-tokens.css (charte v1.1). Radius 0 everywhere, Anton caps titles,
   Montserrat for everything else, crimson = action, rose = red text on dark, ivoire sections for product legibility.
   Direction: editorial poster — thin rules, spread micro-labels, oversized Anton, "ticket" confirmation. */

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
main { flex: 1; }
:where(h1, h2, h3, p) { margin: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--cfl-ivoire); color: var(--cfl-noir); padding: 10px 14px; font-weight: 700; }
.skip:focus { top: 8px; }
:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
.wrap { width: 100%; max-width: var(--container-max); margin-inline: auto; padding-inline: var(--gutter); }
.num { font-variant-numeric: tabular-nums; }

/* ── header ───────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--cfl-noir); border-bottom: 1px solid var(--border-subtle); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand { --H: 34px; gap: calc(var(--H) * .3); padding-block: calc(var(--H) * .15); }
.brand img.symbol { height: var(--H); width: auto; }
.brand .sep { width: 1px; height: calc(var(--H) * .7); background: var(--cfl-gris); opacity: .5; }
.brand img.word { height: 22px; width: auto; }
.brand .lockup-txt { font: 400 calc(var(--H) * .4)/.92 var(--font-display); text-transform: uppercase; letter-spacing: .02em; color: var(--text-primary); }
@media (min-width: 1024px) { .brand { --H: 40px; } }
.header-meta { font: 700 var(--type-caption)/1 var(--font-body); letter-spacing: var(--tracking-nav); text-transform: uppercase; color: var(--text-secondary); }
.header-meta a { text-decoration: none; }
.header-meta a:hover { color: var(--text-primary); }

/* ── editorial micro-rule row (poster labels spread across a line) ── */
.microrow { display: flex; justify-content: space-between; gap: var(--space-4); font: 700 11px/1.3 var(--font-body); letter-spacing: .22em; text-transform: uppercase; color: var(--text-secondary); padding-block: 10px; border-bottom: 1px solid var(--border-subtle); }
.microrow > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hairline { height: 1px; background: var(--border-subtle); border: 0; margin: 0; }

/* ── buttons (extends .cfl-btn from tokens) ───────────── */
.cfl-btn { position: relative; touch-action: manipulation; }
.cfl-btn--block { width: 100%; }
.cfl-btn--lg { min-height: 56px; font-size: 16px; }
.cfl-btn--ghost { background: transparent; color: var(--text-primary); border-color: transparent; padding-inline: 12px; }
.cfl-btn--ghost:hover { color: var(--text-accent); }
.cfl-btn--danger { background: transparent; color: var(--feedback-error); border-color: var(--feedback-error); }
.cfl-btn--danger:hover { background: rgb(214 44 31 / .12); }
.cfl-btn--sm { min-height: 40px; padding: 10px 16px; font-size: 13px; }
.cfl-btn[aria-busy="true"] { color: transparent !important; pointer-events: none; }
.cfl-btn[aria-busy="true"]::after { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border: 2px solid currentColor; border-color: var(--btn-primary-fg) transparent var(--btn-primary-fg) transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── badges ───────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; font: 700 12px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; border: 1px solid currentColor; white-space: nowrap; }
.badge--solid { color: var(--text-primary); border-color: var(--text-primary); }
.badge--muted { color: var(--text-secondary); }
.badge--ivory, .badge--full { background: var(--cfl-beton-clair); color: var(--cfl-gris); border-color: var(--cfl-beton-clair); }
.badge--warn { color: var(--text-accent); }
.badge .dot { width: 6px; height: 6px; background: currentColor; }

/* ── forms ────────────────────────────────────────────── */
.field { display: grid; gap: 0; margin-bottom: var(--space-5); }
.field .hint { color: var(--text-secondary); font-size: var(--type-body-sm); margin-top: var(--space-2); line-height: 1.45; }
.field .req { color: var(--text-accent); margin-left: 2px; }
.row2 { display: grid; gap: var(--space-4); }
@media (min-width: 600px) { .row2 { grid-template-columns: 1fr 1fr; } }
select.cfl-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
textarea.cfl-input { min-height: 110px; resize: vertical; line-height: 1.5; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: var(--type-body-sm); line-height: 1.5; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--cfl-crimson); flex: none; }
.fieldset { border: 0; padding: 0; margin: 0 0 var(--space-6); }
.fieldset > legend { padding: 0; margin-bottom: var(--space-4); font: 800 var(--type-eyebrow)/1.3 var(--font-body); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--text-secondary); display: flex; gap: 12px; align-items: center; width: 100%; }
.fieldset > legend::after { content: ""; flex: 1; height: 1px; background: var(--border-subtle); }
.error-box { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--feedback-error); color: var(--feedback-error); padding: 12px 14px; font-weight: 600; font-size: var(--type-body-sm); line-height: 1.45; margin-bottom: var(--space-4); }
.error-box svg { flex: none; margin-top: 1px; }

/* ── size / option picker ─────────────────────────────── */
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.opts--wide { grid-template-columns: 1fr; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt label { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; min-height: 52px; min-width: 44px; padding: 8px 10px; border: 1px solid var(--border-control); font-weight: 700; text-align: center; cursor: pointer; transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.opts--wide .opt label { flex-direction: row; justify-content: space-between; text-align: left; padding: 14px 16px; min-height: 60px; }
.opt label small { font-weight: 600; font-size: 12px; color: var(--text-secondary); }
.opt input:checked + label { background: var(--text-primary); color: var(--surface-primary); border-color: var(--text-primary); }
.opt input:checked + label small { color: inherit; opacity: .8; }
.opt input:focus-visible + label { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
.opt input:disabled + label { color: var(--cfl-gris); border-color: var(--border-subtle); cursor: not-allowed; background: repeating-linear-gradient(-45deg, transparent 0 6px, rgb(178 184 190 / .08) 6px 7px); }
.opt input:disabled + label .lbl { text-decoration: line-through; }
.cfl-light .opt input:disabled + label { color: var(--cfl-ardoise); }

/* ── stepper ──────────────────────────────────────────── */
.stepper { display: inline-grid; grid-template-columns: 48px 56px 48px; border: 1px solid var(--border-control); }
.stepper button { background: none; border: 0; height: 48px; font-size: 22px; line-height: 1; display: grid; place-items: center; }
.stepper button:disabled { color: var(--cfl-gris); opacity: .5; cursor: not-allowed; }
.stepper output { display: grid; place-items: center; font-weight: 800; font-variant-numeric: tabular-nums; border-inline: 1px solid var(--border-subtle); }

/* ── cards / tables ───────────────────────────────────── */
.panel { background: var(--surface-secondary); border: 1px solid var(--border-subtle); padding: var(--space-5); }
@media (min-width: 768px) { .panel { padding: var(--space-6); } }
.table-wrap { overflow-x: auto; border: 1px solid var(--border-subtle); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--type-body-sm); }
table.data th { text-align: left; font: 800 11px/1.2 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--text-secondary); padding: 12px 14px; border-bottom: 1px solid var(--border-subtle); white-space: nowrap; position: sticky; top: 0; background: var(--surface-secondary); }
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: rgb(244 243 241 / .03); }
table.data .r { text-align: right; }

/* ── toast ────────────────────────────────────────────── */
.toast-host { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--cfl-ivoire); color: var(--cfl-noir); padding: 14px 16px; font-weight: 600; font-size: var(--type-body-sm); border: 1px solid var(--cfl-noir); display: flex; gap: 10px; align-items: center; animation: toast-in var(--dur-ui) var(--ease); pointer-events: auto; }
.toast--error { background: var(--cfl-beton); color: var(--cfl-rose); border-color: var(--cfl-rose); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ── footer ───────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border-subtle); margin-top: var(--space-9); padding-block: var(--space-6) calc(var(--space-6) + env(safe-area-inset-bottom)); color: var(--text-secondary); font-size: var(--type-body-sm); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-5); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text-primary); }
.tagline { font-family: var(--font-marker); font-size: 22px; color: var(--cfl-crimson); display: inline-block; transform: rotate(-2.5deg); text-transform: lowercase; }
.site-footer .word { width: 96px; height: auto; }
.site-footer .legal-note { flex-basis: 100%; font-size: var(--type-caption); line-height: 1.5; margin: 0; }

/* skeleton */
.sk { background: var(--cfl-beton); animation: sk 1.4s ease-in-out infinite alternate; }
@keyframes sk { to { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .sk, .toast, .cfl-btn[aria-busy="true"]::after { animation: none; } }
