/* LuxRemap · feuille de style unique (pages publiques, espace client/atelier, factures). */

@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/dm-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/dm-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/dm-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/dm-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/poppins-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/poppins-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/poppins-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/poppins-latin-800-normal.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --bg: #111113;
  --bg-2: #161618;
  --panel: #1c1c1f;
  --panel-2: #232327;
  --line: #2f2f34;
  --line-2: #3d3d43;
  --ink: #f4f4f6;
  --muted: #a3a3ad;
  --faint: #74747e;
  --brand: #e52929;
  --brand-2: #ff4d45;
  --accent: #ff7a73;
  --ok: #45c47c;
  --warn: #f2b43f;
  --info: #5aa9ff;
  --violet: #b48cff;
  --danger: #ff5c5c;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --sidebar: 252px;
  --head: 'Poppins', 'DM Sans', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--body); }
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1.02rem; font-weight: 600; }
p { margin: 0 0 1em; }
small { color: var(--muted); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------- logo */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 700 1.25rem/1 var(--head); letter-spacing: .16em; text-decoration: none !important; }
.logo.small { font-size: 1.05rem; }
.mark { display: inline-flex; gap: 3px; align-items: flex-end; height: 20px; transform: skewX(-16deg); }
.mark i { display: block; width: 6px; height: 20px; background: var(--brand); border-radius: 1px; }
.mark i:nth-child(2) { height: 14px; }
.logo.dark { color: #141416; }
.logo .logo-a { color: var(--brand); }

/* ------------------------------------------------------------- boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 18px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--panel-2); color: var(--ink); font: 600 .95rem/1.2 var(--body); cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover { border-color: #55555d; background: #2a2a2f; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--panel-2); }
.btn.danger { border-color: #6b2a2a; color: #ffb3b0; background: #2a1517; }
.btn.danger:hover { background: #3a1a1d; }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: .88rem; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: .45; cursor: not-allowed; transform: none; }
.btn .spinner { width: 16px; height: 16px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--panel-2); color: var(--ink); cursor: pointer; font-size: 1rem; }
.icon-btn:hover { background: #2c2c31; }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ------------------------------------------------------------- formulaires */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > label, .label { font-weight: 600; font-size: .9rem; color: #dcdce2; }
.field .hint { font-size: .82rem; color: var(--muted); }
:where(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=hidden]), select, textarea) {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #141416; color: var(--ink); font: 15px/1.4 var(--body);
}
textarea { min-height: 96px; resize: vertical; }
:where(input, select, textarea):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 122, 115, .18); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[readonly] { color: var(--muted); }
input::placeholder, textarea::placeholder { color: #6c6c75; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; cursor: pointer; font-size: .92rem; line-height: 1.45; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--brand); }
.req { color: var(--accent); }
.form-error { color: #ffb0ab; font-size: .9rem; min-height: 1.2em; margin: 8px 0 0; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--brand); }

/* ------------------------------------------------------------- éléments */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; }
.eyebrow { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin: 0 0 8px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 18px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.pending { color: var(--warn); border-color: #5a4720; background: #241d10; }
.badge.in_progress { color: var(--info); border-color: #1f4266; background: #101b28; }
.badge.waiting_client { color: #ffa24d; border-color: #6b4220; background: #2a1a0d; }
.badge.delivered { color: var(--ok); border-color: #22543a; background: #0f2219; }
.badge.revision { color: var(--violet); border-color: #4a3870; background: #1c1529; }
.badge.cancelled { color: var(--faint); }
.badge.ok { color: var(--ok); border-color: #22543a; background: #0f2219; }
.badge.warn { color: var(--warn); border-color: #5a4720; background: #241d10; }
.badge.danger { color: #ff8f8a; border-color: #6b2a2a; background: #2a1517; }
.badge.info { color: var(--info); border-color: #1f4266; background: #101b28; }
.dot-unread { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px rgba(229, 41, 41, .2); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .74rem; font-weight: 700; }
.notice { border: 1px solid var(--line-2); border-left: 4px solid var(--info); background: #15181d; border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 16px; font-size: .93rem; }
.notice.warn { border-left-color: var(--warn); background: #1c1810; }
.notice.danger { border-left-color: var(--danger); background: #1f1213; }
.notice.ok { border-left-color: var(--ok); background: #101a14; }
.notice p:last-child { margin-bottom: 0; }
.notice .btn { margin-top: 8px; }
.empty { text-align: center; padding: 36px 18px; color: var(--muted); }
.empty h3 { color: var(--ink); }
.kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px 14px; margin: 0; font-size: .93rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.copy { display: flex; gap: 8px; }
.copy input { font-family: ui-monospace, monospace; font-size: .85rem; }
.spinner { display: inline-block; width: 22px; height: 22px; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 8px; background: #2a2a2f; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .15s; }

/* tableaux */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 11px 14px; background: var(--bg-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td small { display: block; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #202024; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plus { color: var(--ok); font-weight: 700; }
.minus { color: #ff9b96; font-weight: 700; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; color: var(--muted); font-size: .9rem; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.tabs button, .tabs a { border: 1px solid var(--line-2); background: transparent; color: var(--muted); padding: 7px 14px; border-radius: 999px; font: 600 .88rem var(--body); cursor: pointer; text-decoration: none; }
.tabs button[aria-pressed='true'], .tabs a[aria-current='page'] { background: var(--ink); border-color: var(--ink); color: #111; }

/* ------------------------------------------------------------- application */
.app-body { background: var(--bg); }
.boot { min-height: 100vh; display: grid; place-content: center; gap: 16px; text-align: center; color: var(--muted); }
.noscript { padding: 30px; text-align: center; }
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 22px 16px; background: var(--bg-2); border-right: 1px solid var(--line); }
.sidebar .logo { padding: 4px 8px 6px; }
.brand-sub { font-size: .66rem; letter-spacing: .26em; color: var(--faint); margin: -12px 0 0 46px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin: 8px 10px 6px; font-weight: 700; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 600; font-size: .92rem; text-decoration: none !important; }
.nav-link:hover { background: #1f1f23; color: var(--ink); }
.nav-link[aria-current='page'] { background: #26262b; color: var(--ink); box-shadow: inset 3px 0 0 var(--brand); }
.nav-link .ico { width: 20px; text-align: center; opacity: .9; }
.nav-link .count { margin-left: auto; }
.btn.primary .count { background: #fff; color: var(--brand); }
.wallet { margin-top: auto; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.wallet small { display: block; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; }
.wallet strong { display: block; font: 700 1.7rem/1.2 var(--head); margin: 4px 0 12px; }
.wallet strong span { font: 500 .9rem var(--body); color: var(--muted); }
.user-box { display: flex; align-items: center; gap: 10px; padding: 8px; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #2a2a30; font-weight: 700; font-size: .85rem; flex: none; }
.user-box .who { min-width: 0; font-size: .86rem; }
.user-box .who strong, .user-box .who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 28px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; background: rgba(17, 17, 19, .92); backdrop-filter: blur(8px); }
.topbar .crumb { color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .crumb b { color: var(--ink); font-weight: 600; }
.topbar .right-tools { display: flex; align-items: center; gap: 10px; }
.credit-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink); font-weight: 600; font-size: .9rem; text-decoration: none !important; background: var(--panel); }
.credit-pill b { font-family: var(--head); }
.menu-btn { display: none; }
.mode-banner { background: #2b2410; color: #f6d68a; border-bottom: 1px solid #4d3f17; padding: 8px 28px; font-size: .86rem; }
.mode-banner b { color: #ffe3a1; }
.announce { background: #1a1d24; border-bottom: 1px solid var(--line); padding: 9px 28px; font-size: .9rem; }
.content { padding: 28px; width: 100%; max-width: 1240px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.bottom-nav { display: none; }

/* cartes statistiques */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .label { color: var(--muted); font-size: .86rem; font-weight: 600; }
.stat strong { display: block; font: 700 1.7rem/1.25 var(--head); margin-top: 6px; }
.stat small { display: block; margin-top: 2px; }
.stat.alert { border-color: #6b4220; background: #1f170f; }
.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }

/* listes de demandes en cartes (mobile) */
.order-cards { display: none; }
.order-card { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); text-decoration: none !important; }
.order-card + .order-card { margin-top: 10px; }
.order-card .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 6px; }
.order-card .meta { color: var(--muted); font-size: .86rem; }

/* nouvelle demande */
.request-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.form-section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.form-section + .form-section { margin-top: 18px; }
.form-section h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.step-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font: 700 .85rem var(--head); flex: none; }
.dropzone { position: relative; display: block; border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 28px 18px; text-align: center; cursor: pointer; background: #151517; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: #1b1515; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone strong { display: block; font-size: 1.02rem; margin-bottom: 4px; }
.file-card { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: #151517; }
.file-card .ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: #2a1517; color: var(--accent); font-weight: 800; font-size: .72rem; flex: none; }
.file-card .info { min-width: 0; flex: 1; }
.file-card .info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card .progress { margin-top: 8px; }
.service-search { margin-bottom: 14px; }
.svc-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.svc-tools .service-search { margin: 0; flex: 1; min-width: 0; }
.service-group { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.service-group legend { font: 600 .9rem var(--head); color: var(--ink); margin-bottom: 10px; padding: 0; }
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.service { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #17171a; cursor: pointer; transition: border-color .15s, background-color .15s; }
.service:hover { border-color: var(--line-2); background: #1d1d21; }
.service input { width: 18px; height: 18px; accent-color: var(--brand); margin: 1px 0 0; }
.svc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.service strong { display: block; font-size: .9rem; line-height: 1.3; }
.svc-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.service .price { font: 600 .82rem var(--body); color: var(--muted); white-space: nowrap; }
.service .price small { display: inline; font: inherit; }
.svc-desc { display: none; font-size: .8rem; line-height: 1.35; margin-top: 4px; }
.svc-list.show-desc .services { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.svc-list.show-desc .svc-desc { display: block; }
.svc-free { display: inline-block; font: 700 .72rem var(--body); font-style: normal; color: var(--ok); margin: 0; }
.price-list .svc-free { margin: 0 0 0 8px; }
.service.is-free { border-color: #22543a; background: #0f2219; }
.service.is-free .price { color: var(--ok); }
.summary-lines .line .svc-free, .summary .line .svc-free { font-size: .85rem; }
.service.selected { border-color: var(--brand); background: #221417; }
.service.selected .price { color: var(--ink); }
.svc-hint { margin: 2px 0 0; padding: 10px 14px; border-left: 3px solid var(--brand); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: #1b1517; font-size: .86rem; color: #d7d7dd; }
.svc-hint:empty { display: none; }
.svc-hint strong { display: block; color: var(--ink); margin-bottom: 2px; }
.opt { margin-left: 4px; font-weight: 500; font-size: .78rem; color: var(--faint); }
.span-2 { grid-column: span 2; }
.vehicle-grid { align-items: end; }
.mobile-total { position: fixed; z-index: 35; left: 12px; right: 12px; bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(28, 28, 31, .96); backdrop-filter: blur(8px); box-shadow: var(--shadow); }
.mobile-total.empty { display: none !important; }
.mobile-total small { display: block; font-size: .72rem; color: var(--muted); }
.mobile-total strong { font: 700 1.15rem var(--head); }
.summary { position: sticky; top: 84px; }
.summary .line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: .93rem; border-bottom: 1px dashed var(--line); }
.summary .line:last-of-type { border-bottom: 0; }
.summary .total { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0 6px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.summary .total strong { font: 700 1.6rem var(--head); }
.summary .after { display: flex; justify-content: space-between; font-size: .9rem; color: var(--muted); }
.summary .declarations { margin: 16px 0 6px; padding: 12px 14px; border-radius: var(--radius-sm); background: #17171a; border: 1px solid var(--line); }
.summary .declarations .check { font-size: .85rem; padding: 8px 0; }
.summary .btn.block { margin-top: 14px; }

/* détail d'une demande */
.order-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 18px; }
.order-head h1 { margin: 4px 0 6px; }
.tracker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0 0 20px; padding: 0; list-style: none; }
.tracker li { position: relative; text-align: center; padding-top: 30px; font-size: .82rem; color: var(--faint); font-weight: 600; }
.tracker li::before { content: ''; position: absolute; top: 8px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--panel-2); border: 2px solid var(--line-2); z-index: 1; }
.tracker li::after { content: ''; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: var(--line-2); }
.tracker li:first-child::after { display: none; }
.tracker li.done { color: var(--ink); }
.tracker li.done::before { background: var(--ok); border-color: var(--ok); }
.tracker li.done::after { background: var(--ok); }
.tracker li.current { color: var(--ink); }
.tracker li.current::before { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 5px rgba(229, 41, 41, .2); }
.tracker li.current::after { background: var(--ok); }
.callout { border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; border: 1px solid var(--line-2); background: var(--panel); }
.callout.ok { border-color: #22543a; background: linear-gradient(135deg, #10251a, #131916); }
.callout.warn { border-color: #6b4220; background: linear-gradient(135deg, #2a1a0d, #17130f); }
.callout h2 { margin-bottom: 6px; }
.files-list { display: flex; flex-direction: column; gap: 8px; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #17171a; }
.file-row .info { min-width: 0; }
.file-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row.modified { border-color: #22543a; }
.thread { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.msg { max-width: 82%; padding: 11px 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.msg .who { font-size: .78rem; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.msg .body { white-space: pre-wrap; word-break: break-word; font-size: .93rem; }
.msg .att { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.msg.client { align-self: flex-end; background: #2a1719; border-color: #4a2427; border-bottom-right-radius: 4px; }
.msg.staff { align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.system { align-self: center; max-width: 92%; background: transparent; border: 0; color: var(--muted); font-size: .84rem; text-align: center; padding: 4px; }
.msg.question { border-color: #6b4220; background: #24190e; }
.msg.revision { border-color: #4a3870; background: #1c1529; }
.msg.delivery { border-color: #22543a; background: #10221a; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #26262b; border: 1px solid var(--line-2); font-size: .8rem; color: var(--ink); text-decoration: none !important; }
.chip button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 0 0 2px; font-size: 1rem; line-height: 1; }
.composer { border-top: 1px solid var(--line); padding-top: 16px; }
.composer .row { margin-top: 10px; }
.attach-btn { position: relative; overflow: hidden; }
.attach-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.side-actions .btn { width: 100%; margin-bottom: 8px; }
.work-card { border-color: #4a2427; }
.work-items { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.work-item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #2a1517; border: 1px solid #4a2427; font-weight: 700; font-size: .9rem; }
.work-total { margin-left: auto; color: var(--muted); font-size: .88rem; }
.work-notes { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: #1c1810; border: 1px solid #4d3f17; }
.work-notes h3 { font-size: .85rem; color: #f6d68a; margin: 0 0 4px; }
.work-notes p { margin: 0; }

/* crédits */
.credit-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 22px; border-radius: var(--radius); background: linear-gradient(135deg, #2a1416, #1a1a1d 60%); border: 1px solid #3d2326; margin-bottom: 20px; }
.credit-hero strong { font: 700 2.4rem/1 var(--head); }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.pack-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.pack-card.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.pack-flag { position: absolute; top: -11px; left: 18px; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .06em; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; }
.pack-card h3 { margin: 0; color: var(--muted); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.pack-credits { font: 800 2rem/1.1 var(--head); margin: 6px 0 0; }
.pack-credits small { font: 500 .9rem var(--body); }
.pack-price { font: 700 1.15rem var(--head); margin: 6px 0 0; }
.pack-price small { font: 500 .8rem var(--body); color: var(--muted); }
.pack-unit { color: var(--muted); font-size: .86rem; margin: 0 0 12px; }
.pack-unit strong { color: var(--ok); }
.pack-card .btn { margin-top: auto; }
.unit-buy { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.unit-buy .controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.unit-buy input { width: 120px; }
.method { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; }
.method input { margin-top: 4px; accent-color: var(--brand); width: 18px; height: 18px; }
.method:has(input:checked) { border-color: var(--brand); background: #1f1416; }
.bank { background: #151517; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 14px; }

/* administration */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.check-list li:last-child { border-bottom: 0; }
.check-list .state { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; }
.check-list .state.ok { background: #143323; color: var(--ok); }
.check-list .state.no { background: #331d14; color: var(--warn); }
.catalog-table input[type=number] { width: 92px; min-height: 34px; padding: 5px 8px; }
.catalog-table input:not([type]), .catalog-table input[type=text] { min-height: 34px; padding: 5px 8px; }
.catalog-table td.tight { width: 1%; white-space: nowrap; }
.catalog-table tr.inactive td { opacity: .5; }
.save-bar { position: sticky; bottom: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 14px 18px; border: 1px solid var(--brand); border-radius: var(--radius); background: #221416; box-shadow: var(--shadow); flex-wrap: wrap; }
.doc-editor textarea { min-height: 420px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86rem; line-height: 1.5; }
details.box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: 12px; }
details.box > summary { cursor: pointer; padding: 16px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
details.box > summary::-webkit-details-marker { display: none; }
details.box > summary::after { content: '+'; font-size: 1.3rem; color: var(--muted); }
details.box[open] > summary::after { content: '−'; }
details.box > div { padding: 0 18px 18px; }
pre.mail { white-space: pre-wrap; background: #151517; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; font-size: .85rem; max-height: 60vh; overflow: auto; }

/* dialogue et notifications */
dialog { border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel); color: var(--ink); padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0, 0, 0, .65); }
dialog .dlg { padding: 22px; overflow-y: auto; max-height: calc(100vh - 34px); }
dialog .dlg-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
dialog .dlg-head h2 { margin: 0; }
.close-x { background: none; border: 0; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 36px)); }
.toast { padding: 13px 16px; border-radius: var(--radius-sm); background: #26262b; border: 1px solid var(--line-2); border-left: 4px solid var(--info); box-shadow: var(--shadow); font-size: .93rem; animation: toast-in .2s ease-out; }
.toast.ok { border-left-color: var(--ok); }
.toast.error { border-left-color: var(--danger); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* pages d'authentification */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { padding: 48px; background: radial-gradient(circle at 20% 20%, #3a1517, transparent 55%), linear-gradient(160deg, #1b1012, #111113 70%); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; gap: 30px; }
.auth-side h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; margin-top: 40px; }
.auth-side ul { list-style: none; padding: 0; margin: 20px 0 0; }
.auth-side li { padding: 8px 0 8px 28px; position: relative; color: #e3e3e8; }
.auth-side li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card h1 { margin-bottom: 8px; }
.auth-card .sub { color: var(--muted); margin-bottom: 24px; }
.auth-foot { margin-top: 18px; font-size: .92rem; color: var(--muted); }
.pw-toggle { position: relative; }
.pw-toggle input { padding-right: 84px; }
.pw-toggle button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); font: 600 .82rem var(--body); cursor: pointer; padding: 6px 8px; }

/* ------------------------------------------------------------- pages publiques */
.public { background: var(--bg); }
.site-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 48px); background: rgba(17, 17, 19, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a:not(.btn) { color: var(--muted); font-weight: 600; font-size: .93rem; }
.site-nav a:not(.btn):hover { color: var(--ink); text-decoration: none; }
.announcement { padding: 10px clamp(16px, 4vw, 48px); background: #1a1d24; border-bottom: 1px solid var(--line); text-align: center; font-size: .92rem; }
.announcement.warn { background: #2b2410; color: #f6d68a; }
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 40px; align-items: center; padding: clamp(40px, 8vw, 96px) clamp(16px, 4vw, 48px) 60px; max-width: 1240px; margin: 0 auto; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; }
.hero h1 span { color: var(--brand-2); }
.lead { font-size: 1.12rem; color: #d2d2d8; max-width: 620px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: .93rem; }
.hero-points li::before { content: '●'; color: var(--brand); margin-right: 8px; font-size: .7rem; vertical-align: 2px; }
.hero-card { background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); transform: rotate(1.2deg); }
.hc-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.hc-row span { color: var(--muted); }
.hc-progress { height: 4px; margin-top: 18px; border-radius: 999px; background: #2a2a2f; overflow: hidden; }
.hc-progress span { display: block; height: 100%; transform-origin: left; background: linear-gradient(90deg, var(--brand), var(--ok)); }
.hc-states { position: relative; height: 26px; margin-top: 12px; }
.hc-state { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 10px; font-weight: 700; white-space: nowrap; }
.hc-state i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.hc-state.s1 { color: var(--warn); opacity: 0; }
.hc-state.s2 { color: var(--info); opacity: 0; }
.hc-state.s3 { color: var(--ok); }
.hc-state.s3 i { box-shadow: 0 0 0 5px rgba(69, 196, 124, .18); }
.section { max-width: 1240px; margin: 0 auto; padding: 56px clamp(16px, 4vw, 48px); }
.section > h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
.section-lead { color: var(--muted); max-width: 760px; margin-bottom: 26px; }
.steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.steps li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps span { font: 800 .9rem var(--head); color: var(--brand-2); }
.steps h3 { margin: 10px 0 6px; }
.steps p { color: var(--muted); margin: 0; font-size: .93rem; }
.price-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 10px; }
.price-list { columns: 2; column-gap: 36px; }
.price-list li { break-inside: avoid; }
.price-group { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.price-group h3 { color: var(--accent); letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; }
.price-list { list-style: none; padding: 0; margin: 0; }
.price-list li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.price-list li:last-child { border-bottom: 0; }
.price-list small { display: block; font-size: .8rem; line-height: 1.35; }
.credits { font: 700 1rem var(--head); white-space: nowrap; }
.price-list.compact { columns: 3; column-gap: 28px; }
.price-list.compact li { padding: 8px 0; align-items: baseline; }
.price-list.compact strong { font-weight: 600; font-size: .93rem; }
.price-list.compact .svc-free { display: block; margin: 0; }
.credits small { display: inline; font: 500 .78rem var(--body); }
.fine-print { color: var(--faint); font-size: .85rem; margin-top: 18px; }
.faq { display: grid; gap: 10px; max-width: 900px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; }
.faq details p { color: var(--muted); }
.cta-band { max-width: 1240px; margin: 20px auto 60px; padding: 40px clamp(16px, 4vw, 48px); text-align: center; border-radius: 20px; background: linear-gradient(135deg, #3a1517, #1c1c1f); border: 1px solid #4a2427; }
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 40px clamp(16px, 4vw, 48px) 26px; color: var(--muted); font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; max-width: 1240px; margin: 0 auto; }
.site-footer h2 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.footer-legal { max-width: 1240px; margin: 26px auto 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--faint); }
.legal-wrap { max-width: 920px; margin: 0 auto; padding: 36px clamp(16px, 4vw, 40px) 60px; }
.legal-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.legal-tabs a { padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .88rem; }
.legal-tabs a[aria-current='page'] { background: var(--ink); color: #111; border-color: var(--ink); text-decoration: none; }
.legal-doc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 44px); }
.legal-doc h2 { margin-top: 1.8em; font-size: 1.15rem; }
.legal-doc h3 { margin-top: 1.4em; }
.legal-doc p, .legal-doc li { color: #dadae0; }
.legal-doc ul { padding-left: 22px; }
.legal-meta { color: var(--muted); font-size: .9rem; }
.notfound { min-height: 50vh; display: grid; place-content: center; text-align: center; padding: 60px 20px; }

/* ------------------------------------------------------------- facture */
.invoice-page { background: #e9e9ec; color: #141416; }
.invoice-toolbar { max-width: 860px; margin: 18px auto 0; display: flex; justify-content: space-between; gap: 12px; padding: 0 12px; }
.invoice-toolbar .btn { background: #fff; color: #141416; border-color: #cfcfd6; }
.invoice-toolbar .btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.invoice { max-width: 860px; margin: 14px auto 40px; background: #fff; color: #141416; padding: 46px; border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, .08); font-size: 14px; }
.invoice a { color: #141416; }
.invoice-test { background: #fff3cd; color: #6b4b00; text-align: center; font-weight: 700; padding: 8px; border-radius: 4px; }
.invoice-head { display: flex; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.invoice-head p { margin: 10px 0 0; color: #3a3a40; line-height: 1.5; }
.invoice-title { text-align: right; }
.invoice-title h1 { font-size: 2rem; margin: 0 0 8px; color: #141416; }
.invoice-buyer { background: #f5f5f7; border-radius: 6px; padding: 16px 18px; margin-bottom: 26px; }
.invoice-buyer h2 { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #6b6b73; margin-bottom: 6px; }
.invoice-buyer p { margin: 0; }
.invoice-lines, .invoice-totals { width: 100%; border-collapse: collapse; }
.invoice-lines th { text-align: left; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: #6b6b73; border-bottom: 2px solid #141416; padding: 8px; }
.invoice-lines td { padding: 12px 8px; border-bottom: 1px solid #e3e3e8; }
.invoice-lines th:not(:first-child), .invoice-lines td:not(:first-child) { text-align: right; white-space: nowrap; }
.invoice-totals { width: 320px; margin: 18px 0 0 auto; }
.invoice-totals th { text-align: left; font-weight: 500; padding: 7px 8px; color: #3a3a40; }
.invoice-totals td { text-align: right; padding: 7px 8px; white-space: nowrap; }
.invoice-totals tr.grand th, .invoice-totals tr.grand td { border-top: 2px solid #141416; font-weight: 800; font-size: 1.1rem; color: #141416; }
.invoice-mention { margin-top: 24px; padding: 12px 14px; border-left: 3px solid var(--brand); background: #fafafa; font-size: .9rem; }
.invoice-paid { margin-top: 18px; color: #2f7a4f; font-weight: 700; }
.invoice-foot { margin-top: 40px; padding-top: 14px; border-top: 1px solid #e3e3e8; font-size: .78rem; color: #6b6b73; text-align: center; }

@media print {
  .no-print { display: none !important; }
  .invoice-page { background: #fff; }
  .invoice { box-shadow: none; margin: 0; padding: 0; max-width: none; }
}

/* ------------------------------------------------------------- animations
   Peu nombreuses et brèves : le logo à l'ouverture, l'apparition des pages, les chiffres qui changent,
   l'avancement d'une demande et, sur l'accueil, la carte d'exemple. Coupées si l'appareil le demande. */
@keyframes bar-rise { from { transform: scaleY(.15); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes lux-on { from { color: var(--ink); } }
.app.intro .mark i, .site-header .mark i { transform-origin: bottom; animation: bar-rise .55s cubic-bezier(.2, .8, .2, 1) both; }
.app.intro .mark i:nth-child(2), .site-header .mark i:nth-child(2) { animation-delay: .09s; }
.app.intro .mark i:nth-child(3), .site-header .mark i:nth-child(3) { animation-delay: .18s; }
.app.intro .logo-a, .site-header .logo-a { animation: lux-on .6s .3s ease-out both; }

@keyframes view-in { from { opacity: 0; } }
@keyframes head-in { from { opacity: 0; transform: translateY(6px); } }
.view-enter > * { animation: view-in .28s ease-out both; }
.view-enter .page-head, .view-enter .order-head { animation: head-in .32s cubic-bezier(.2, .7, .2, 1) both; }

@keyframes bump { 35% { transform: scale(1.07); } }
.bump { display: inline-block; animation: bump .35s ease-out; }

@keyframes track-fill { from { transform: scaleX(0); } }
@keyframes dot-pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 41, 41, .5); } 75%, 100% { box-shadow: 0 0 0 11px rgba(229, 41, 41, 0); } }
@keyframes warn-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 162, 77, .55); } 75%, 100% { box-shadow: 0 0 0 7px rgba(255, 162, 77, 0); } }
.tracker li.done::after, .tracker li.current::after { transform-origin: left; animation: track-fill .45s ease-out both; }
.tracker li:nth-child(3)::after { animation-delay: .3s; }
.tracker li.current::before { animation: dot-pulse 1.8s .4s ease-out 3; }
.badge.waiting_client::before, .badge.revision::before { animation: warn-pulse 1.8s ease-out 3; }
.dot-unread { animation: dot-pulse 1.8s ease-out 3; }

@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } }
.svc-hint { animation: rise-in .25s ease-out; }
.mobile-total { animation: rise-in .25s ease-out; }
dialog[open] { animation: rise-in .22s cubic-bezier(.2, .7, .2, 1); }
dialog[open]::backdrop { animation: view-in .22s ease-out; }

/* Accueil : une seule séquence au chargement. Le titre arrive, puis la carte d'exemple
   passe de « Fichier reçu » à « Fichier livré », comme une vraie demande. */
.hero-text > * { animation: rise-in .6s cubic-bezier(.2, .7, .2, 1) both; }
.hero-text > :nth-child(2) { animation-delay: .07s; }
.hero-text > :nth-child(3) { animation-delay: .14s; }
.hero-text > :nth-child(4) { animation-delay: .21s; }
.hero-text > :nth-child(5) { animation-delay: .28s; }
@keyframes card-in { from { opacity: 0; transform: translateY(18px) rotate(3deg); } }
.hero-card { animation: card-in .8s .3s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes hc-progress { 0% { transform: scaleX(.04); } 30% { transform: scaleX(.34); } 66% { transform: scaleX(.68); } 100% { transform: scaleX(1); } }
@keyframes hc-step { 0% { opacity: 0; transform: translateY(6px); } 15%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes hc-final { from { opacity: 0; transform: translateY(6px); } }
.hc-progress span { animation: hc-progress 3.2s 1s cubic-bezier(.4, 0, .2, 1) both; }
.hc-state.s1 { animation: hc-step 1.2s 1s both; }
.hc-state.s2 { animation: hc-step 1.25s 2.1s both; }
.hc-state.s3 { animation: hc-final .45s 3.3s cubic-bezier(.2, .7, .2, 1) both; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .request-layout { grid-template-columns: minmax(0, 1fr); }
  .stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-list.compact { columns: 2; }
  .summary { position: static; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .55); }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 10px 14px; }
  .topbar .crumb { display: none; }
  .content { padding: 18px 14px 96px; }
  .mode-banner, .announce { padding: 8px 14px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: rgba(22, 22, 24, .97); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; color: var(--muted); font-size: .72rem; font-weight: 600; text-decoration: none; }
  .bottom-nav a .ico { font-size: 1.15rem; }
  .bottom-nav a[aria-current='page'] { color: var(--ink); }
  .services, .svc-list.show-desc .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-total { bottom: calc(68px + env(safe-area-inset-bottom)); }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-card { display: none; }
  .price-list { columns: 1; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
  .table-desktop { display: none; }
  .order-cards { display: block; }
  .tracker li { font-size: .7rem; }
  .msg { max-width: 94%; }
  .unit-buy { grid-template-columns: minmax(0, 1fr); }
  .unit-buy .controls { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .vehicle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; align-items: end; }
  .vehicle-grid .span-2 { grid-column: span 2; }
  .svc-list.show-desc .services { grid-template-columns: minmax(0, 1fr); }
  .service { padding: 9px 10px; gap: 8px; }
  .svc-tools { flex-wrap: wrap; gap: 6px; }
  .svc-tools .service-search { flex-basis: 100%; }
  .price-list.compact { columns: 1; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .site-nav a:not(.btn) { display: none; }
  .site-nav a[href='/inscription'] { display: none; }
  .site-nav a[href='/connexion'] { display: inline-flex; align-items: center; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); color: var(--ink); }
  .site-header .logo { font-size: 1.1rem; }
  .hero { padding-bottom: 16px; }
  .section { padding-top: 36px; padding-bottom: 36px; }
  .panel, .form-section { padding: 16px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .invoice { padding: 22px; }
  .invoice-head { flex-direction: column; }
  .invoice-title { text-align: left; }
  .invoice-totals { width: 100%; }
  .credit-hero strong { font-size: 2rem; }
}

/* utilitaires complémentaires */
.mt { margin-top: 18px; }
.pre { white-space: pre-wrap; }
.summary-lines .line { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.summary-lines .line:last-child { border-bottom: 0; font-size: 1.05rem; }
td.tight { width: 1%; white-space: nowrap; }

.side-legal { font-size: .74rem; color: var(--faint); text-align: center; margin: 0; }
.side-legal a { color: var(--faint); }

/* ------------------------------------------------------------- simulateur de gains */
.simulateur { margin-top: 10px; }
.sim-selects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.sim-field { display: flex; flex-direction: column; gap: 6px; }
.sim-field label { font-size: .8rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.sim-output { margin-top: 22px; }
.sim-empty { color: var(--muted); }
.sim-result { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: clamp(18px, 3vw, 26px); }
.sim-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.sim-result-head h3 { margin: 0 0 8px; font-size: 1.3rem; }
.sim-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.sim-badge { font-size: .76rem; font-weight: 600; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.sim-origin { text-align: right; color: var(--muted); font-size: .82rem; line-height: 1.5; white-space: nowrap; }
.sim-origin strong { color: var(--ink); font-size: 1rem; }
.sim-stages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.sim-stage { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.sim-stage h4 { margin: 0 0 12px; color: var(--brand-2); font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; }
.sim-line { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.sim-line:last-child { border-bottom: 0; }
.sim-line span { color: var(--muted); font-size: .9rem; min-width: 74px; }
.sim-line strong { font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.sim-gain { margin-left: auto; color: var(--ok); font-weight: 700; font-style: normal; font-variant-numeric: tabular-nums; }
.sim-note, .sim-dev { color: var(--muted); font-size: .84rem; margin: 16px 0 0; }
.sim-dev { background: #2b2410; color: #f6d68a; border: 1px solid #4d3f17; border-radius: var(--radius-sm); padding: 12px 14px; }
.sim-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
@media (max-width: 760px) {
  .sim-selects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sim-stages { grid-template-columns: minmax(0, 1fr); }
  .sim-origin { text-align: left; }
}

/* Animations coupées quand l'appareil demande de réduire les mouvements (l'état final s'affiche directement). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
