/* LAVAGE METZ — noir, anthracite, jaune-vert néon. Typo : Barlow / Barlow Condensed (famille née de la signalétique routière). */

@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url('/fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url('/fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url('/fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 500; font-display: swap; src: url('/fonts/barlow-condensed-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url('/fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url('/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }

:root {
  --bg: #000;
  --surface: #15171a;
  --surface-2: #202327;
  --line: #2f3338;
  --text: #fff;
  --muted: #a6acb3;
  --lime: #d6ff1f;
  --lime-ink: #0a0b00;
  --amber: #ffb224;
  --red: #ff5d52;
  --plate: #f6f6f1;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --tabs-h: 64px;
  --top-h: 56px;
  --r: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.45 var(--body);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul { list-style: none; padding: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.on:focus-visible, .btn-primary:focus-visible { outline-color: #fff; }

h2 { font: 600 22px/1.15 var(--display); letter-spacing: .01em; }
h3 { font: 600 18px/1.2 var(--display); color: var(--muted); margin-top: 18px; margin-bottom: 8px; }
.muted { color: var(--muted); font-size: 14px; }
.lead { color: var(--muted); margin-bottom: 14px; }
.lime { color: var(--lime); }
.warn { color: var(--amber); }
.danger { color: var(--red); }
.center { text-align: center; display: flex; justify-content: center; margin-top: 14px; }
.icon { width: 22px; height: 22px; flex: none; }
.loading { color: var(--muted); padding: 32px 0; text-align: center; }

/* ---------- Marque ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-small { font: 600 20px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.brand-plate {
  font: 700 22px/1 var(--display); letter-spacing: .12em; color: var(--lime-ink); background: var(--lime);
  padding: 5px 9px 4px; border-radius: 6px;
}
.brand-city { font: 500 15px/1 var(--display); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }

/* ---------- Connexion ---------- */
.login { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 36px; padding: 32px 22px calc(32px + var(--safe-b)); max-width: 440px; margin: 0 auto; }
.login-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.login-brand .brand-small { font-size: 34px; }
.login-brand .brand-plate { font-size: 76px; padding: 10px 18px 6px; border-radius: 12px; letter-spacing: .08em; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-note { display: flex; gap: 10px; align-items: flex-start; color: var(--amber); font-size: 14px; }

/* ---------- Champs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field-label { font-weight: 500; font-size: 15px; }
.field-hint { color: var(--muted); font-size: 13px; }
input[type='text'], input[type='password'], input[type='search'], input[type='tel'], input[type='number'], input[type='date'], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; background: var(--surface-2); border: 2px solid var(--line); border-radius: 12px; font-size: 17px;
  -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lime); }
input::placeholder, textarea::placeholder { color: #70767d; }
.check { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.check input { width: 24px; height: 24px; accent-color: var(--lime); flex: none; }
.form-error { color: var(--red); font-weight: 500; background: rgba(255, 93, 82, .12); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: 12px;
  border: 2px solid transparent; font: 600 19px/1.1 var(--display); letter-spacing: .02em; text-decoration: none; transition: transform .08s ease, background-color .12s ease;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-primary { background: var(--lime); color: var(--lime-ink); }
.btn-primary:disabled { background: var(--surface-2); color: #6b7178; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:disabled { color: #6b7178; }
.btn-danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn-xl { min-height: 62px; font-size: 24px; width: 100%; }
.btn-sm { min-height: 40px; padding: 6px 12px; font-size: 17px; }
.btn.is-busy { opacity: .6; }
.icon-btn { background: none; border: 0; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); }
.link { background: none; border: 0; padding: 4px 0; text-decoration: underline; font-size: 14px; text-align: left; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.actions .btn { flex: 1 1 auto; }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar p { flex: 1 1 240px; }

/* ---------- Cadre ---------- */
.side { display: none; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: calc(var(--top-h) + var(--safe-t));
  padding: var(--safe-t) 14px 0; background: rgba(0, 0, 0, .92); border-bottom: 1px solid var(--line);
}
.top h1 { font: 600 22px/1 var(--display); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-top .brand-plate { font-size: 17px; padding: 4px 7px 3px; }
.sync-pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot-ok { background: var(--lime); }
.dot-warn { background: var(--amber); }
.dot-err { background: var(--red); }

/* Bande de chantier : le seul motif décoratif, réservé au mode hors ligne. */
.offline-banner {
  display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; font-size: 14px; font-weight: 500; color: var(--lime); background: var(--surface); position: relative;
}
.offline-banner::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 6px; background: repeating-linear-gradient(-45deg, var(--lime) 0 10px, #000 10px 20px); }
.update-banner { width: 100%; border: 0; background: var(--lime); color: var(--lime-ink); padding: 10px; font-weight: 600; }

.content { padding: 16px 14px calc(var(--tabs-h) + var(--safe-b) + 24px); max-width: 860px; margin: 0 auto; outline: none; }
.tabs {
  position: fixed; inset: auto 0 0 0; z-index: 30; display: flex; height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: #0b0c0d; border-top: 1px solid var(--line);
}
.tab {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: 0; color: var(--muted);
  text-decoration: none; font: 500 13px/1 var(--display); letter-spacing: .02em; position: relative;
}
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.tab.active { color: var(--lime); }
.tab.active::before { content: ''; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; background: var(--lime); border-radius: 0 0 3px 3px; }
.more-list { display: flex; flex-direction: column; }
.more-item { display: flex; align-items: center; gap: 14px; padding: 16px 4px; background: none; border: 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 18px; text-align: left; }
.more-item:last-child { border-bottom: 0; color: var(--red); }

/* ---------- Cartes, lignes, chiffres ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }
.card > h2 { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.card-warn { border-color: var(--amber); }
.card-off { opacity: .6; }
.rows.card { padding: 0 16px; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); width: 100%; }
.rows > li:last-child .row, .rows > li.row:last-child { border-bottom: 0; }
.row-btn { background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-main strong { font-weight: 600; overflow-wrap: anywhere; }
.row-amount { font: 700 22px/1.1 var(--display); text-align: right; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.row-amount .muted { font: 400 13px/1 var(--body); }
.row-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.row-error { color: var(--amber); font-size: 14px; }
.row-cancelled .row-main strong, .row-cancelled .row-amount { text-decoration: line-through; color: var(--muted); }
.rows-tight .row { padding: 9px 0; }
.row-closure { align-items: flex-start; }
.row-closure .btn { flex: none; margin-top: 2px; }
.list-total { color: var(--muted); font-weight: 500; margin: 4px 2px 10px; }
.audit-details { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; display: flex; flex-direction: column; gap: 16px; align-items: center; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 13px; font-weight: 500; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); white-space: nowrap; }
.badge-cash, .badge-lime { color: var(--lime); border-color: rgba(214, 255, 31, .45); }
.badge-credit, .badge-warn { color: var(--amber); border-color: rgba(255, 178, 36, .5); }
.badge-danger { color: var(--red); border-color: rgba(255, 93, 82, .5); }
.plate-tag, .plate-big {
  display: inline-block; background: var(--plate); color: #000; font: 700 17px/1 var(--display); letter-spacing: .08em; padding: 4px 8px 3px; border-radius: 5px;
  box-shadow: inset 0 0 0 1.5px #000, 0 0 0 1.5px var(--plate); white-space: nowrap;
}
.plate-big { font-size: 30px; padding: 8px 14px 6px; border-radius: 8px; }

.lines { display: flex; flex-direction: column; }
.line { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; align-items: baseline; }
.line span { color: var(--muted); }
.line strong { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.line-strong strong, .line-total strong { font: 700 24px/1 var(--display); }
.line-total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px; }
.line-total span { color: var(--text); font-weight: 600; }
.line-total strong { color: var(--lime); }
.line-credit strong { color: var(--amber); }
.line-danger strong { color: var(--red); }
.stat-row { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; }
.stat-row strong { font: 700 26px/1 var(--display); color: var(--amber); }
.notice { display: flex; gap: 10px; align-items: flex-start; background: rgba(255, 178, 36, .1); border: 1px solid rgba(255, 178, 36, .45); color: var(--amber); border-radius: 12px; padding: 12px; margin-bottom: 14px; font-size: 15px; }
.notice ul { list-style: disc; padding-left: 18px; }

.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); font: 500 17px/1 var(--display); }
.chip.on { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.choice { display: flex; gap: 8px; margin-bottom: 14px; }
.choice-btn { flex: 1; min-height: 46px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 2px solid var(--line); font: 600 18px/1.15 var(--display); }
.choice-btn.on { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.choice-stack { flex-direction: column; }
.choice-stack .choice-btn { text-align: left; font: 500 15px/1.3 var(--body); padding: 12px; }

/* ---------- Caisse ---------- */
.session-box { margin-bottom: 18px; }
.open-session { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 16px; }
.open-session h2 { font-size: 30px; margin-bottom: 6px; }
.session-open { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.session-figures { display: grid; grid-template-columns: 1.5fr 0.7fr 1fr; gap: 10px; align-items: end; }
.figure { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.figure-label { color: var(--muted); font-size: 13px; line-height: 1.2; }
.figure strong { font: 700 26px/1 var(--display); white-space: nowrap; }
.figure-main strong { font-size: 40px; color: var(--lime); }
.session-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.session-actions .muted { flex: 1; }
.open-float { display: block; margin: 14px auto 0; text-align: center; color: var(--muted); }
.session-auto { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; }
.session-auto p { flex: 1 1 200px; color: var(--muted); }
.session-auto strong { color: var(--lime); }
.session-pending { display: flex; align-items: center; gap: 8px; color: var(--amber); font-weight: 500; font-size: 15px; margin-top: 10px; }
.gap { font-weight: 600; padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; }
.gap-ok { color: var(--lime); background: rgba(214, 255, 31, .1); }
.gap-bad { color: var(--red); background: rgba(255, 93, 82, .12); }

.step { margin-bottom: 20px; }
.step > h2 { font-size: 17px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.tile {
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); min-height: 72px; padding: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  text-align: center; transition: transform .08s ease, background-color .1s ease, border-color .1s ease;
}
.tile:active:not(:disabled) { transform: scale(.97); }
.tile.on { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.tile:disabled { opacity: .42; border-style: dashed; }
.tile-dashed { border-style: dashed; }
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type-tile { min-height: 84px; font: 600 19px/1.1 var(--display); }
.type-tile .icon { width: 34px; height: 34px; }
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.service-name { font: 600 19px/1.1 var(--display); }
.service-price { font: 700 28px/1 var(--display); }
.tile:disabled .service-price, .tile-dashed:not(.on) .service-price { font: 500 15px/1.2 var(--body); color: var(--muted); }
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.pay-tile { min-height: 80px; font: 600 20px/1.1 var(--display); }
.pay-tile .icon { width: 30px; height: 30px; }
.pay-card.on { background: #fff; border-color: #fff; color: #000; }
.pay-credit.on { background: var(--amber); border-color: var(--amber); color: #1a0f00; }

/* Le champ plaque ressemble à une vraie plaque : blanc, lettres noires, liseré. */
.plate-input {
  width: 100%; min-height: 70px !important; background: var(--plate) !important; color: #000 !important; border: 0 !important; border-radius: 10px !important;
  box-shadow: inset 0 0 0 3px #000, 0 0 0 3px var(--plate); margin: 3px; width: calc(100% - 6px) !important;
  font: 700 36px/1 var(--display) !important; letter-spacing: .1em; text-align: center; text-transform: uppercase;
}
.plate-input::placeholder { color: #b9b9b2; }
.plate-input:focus { box-shadow: inset 0 0 0 3px #000, 0 0 0 3px var(--plate), 0 0 0 6px var(--lime); }
.vehicle-info { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.debt { display: flex; align-items: center; gap: 8px; color: var(--amber); font-weight: 600; }
.reward { display: flex; align-items: center; gap: 10px; text-align: left; background: transparent; border: 2px dashed var(--lime); color: var(--lime); border-radius: 12px; padding: 12px; font-weight: 600; }
.reward.on { background: var(--lime); color: var(--lime-ink); border-style: solid; }

.confirm-bar {
  position: sticky; bottom: calc(var(--tabs-h) + var(--safe-b)); z-index: 10; margin: 0 -14px; padding: 10px 14px 12px; background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000 22%);
  display: flex; flex-direction: column; gap: 6px;
}
.confirm-summary { font-size: 14px; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.confirm-btn { min-height: 66px; font-size: 26px; }

/* ---------- Rapports ---------- */
.hero { padding: 6px 2px 18px; display: flex; flex-direction: column; gap: 6px; }
.hero-label { color: var(--muted); font-size: 15px; }
.hero-value { font: 700 clamp(56px, 17vw, 96px)/.95 var(--display); letter-spacing: -.01em; }
.hero-credit .hero-value { color: var(--amber); }
.hero-expense .hero-value { color: var(--red); }
.kpis-2 { grid-template-columns: repeat(2, 1fr); }
a.link { color: var(--lime); }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi-label { color: var(--muted); font-size: 14px; }
.kpi-value { font: 700 32px/1 var(--display); white-space: nowrap; }
.kpi-sub { color: var(--muted); font-size: 13px; line-height: 1.3; }
.kpi-lime .kpi-value { color: var(--lime); }
.kpi-credit .kpi-value { color: var(--amber); }
.kpi-danger .kpi-value { color: var(--red); }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; align-items: baseline; }
.bar-val { white-space: nowrap; }
.bar-val strong { font: 700 19px/1 var(--display); }
.bar-track { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--lime); border-radius: 4px; }
.days { display: flex; align-items: flex-end; gap: 3px; height: 120px; margin-bottom: 12px; }
.day { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.day-bar { width: 100%; max-width: 28px; background: var(--lime); border-radius: 3px 3px 0 0; min-height: 2px; }
.day span { font-size: 10px; color: var(--muted); }
.alert-link { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--amber); }
.alert-link div { display: flex; flex-direction: column; gap: 2px; }
.export-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin-bottom: 10px; }

/* ---------- Fidélité ---------- */
.search-head { margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.loyalty { background: var(--surface-2); border-radius: 12px; padding: 14px; margin: 12px 0; display: flex; flex-direction: column; gap: 10px; }
.loyalty-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.ldot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); }
.ldot.on { background: var(--lime); border-color: var(--lime); }
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.detail-amount { font: 700 44px/1 var(--display); }
.revisions p { margin-bottom: 8px; font-size: 15px; }
.vehicle-form, .repay-form { margin-top: 14px; }
.steps { padding-left: 22px; list-style: decimal; display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }

/* ---------- Fenêtres et messages ---------- */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .72); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.backdrop.out { opacity: 0; transition: opacity .18s ease; }
.sheet {
  width: 100%; max-width: 560px; max-height: 92dvh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 20px 20px 0 0; animation: rise .2s cubic-bezier(.2, .8, .2, 1);
}
.sheet-wide { max-width: 680px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 10px 6px 18px; }
.sheet-head h2 { font-size: 26px; }
.sheet-body { padding: 6px 18px calc(20px + var(--safe-b)); overflow-y: auto; overscroll-behavior: contain; }
#toasts { position: fixed; top: calc(var(--top-h) + var(--safe-t) + 10px); left: 12px; right: 12px; z-index: 70; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { max-width: 520px; width: 100%; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 500; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); animation: drop .2s ease; }
.toast.out { opacity: 0; transition: opacity .25s ease; }
.toast-success { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.toast-warn { background: var(--amber); color: #1a0f00; border-color: var(--amber); }
.toast-error { background: var(--red); color: #1f0200; border-color: var(--red); }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes drop { from { transform: translateY(-10px); opacity: 0; } }

/* ---------- Petits écrans ---------- */
@media (max-width: 380px) {
  .content { padding-left: 10px; padding-right: 10px; }
  .confirm-bar { margin: 0 -10px; padding-left: 10px; padding-right: 10px; }
  .figure-main strong { font-size: 34px; }
  .figure strong { font-size: 22px; }
  .type-tile, .pay-tile { font-size: 17px; }
  .confirm-btn { font-size: 22px; }
  .grid-2 { grid-template-columns: 1fr; gap: 0; }
  .plate-input { font-size: 30px !important; }
}

/* ---------- Tablette et ordinateur ---------- */
@media (min-width: 720px) {
  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .backdrop { align-items: center; padding: 24px; }
  .sheet { border-radius: 20px; border-bottom: 1px solid var(--line); max-height: 88dvh; }
  .actions .btn { flex: 0 1 auto; }
}
@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100dvh; }
  .side { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100dvh; padding: 22px 16px; background: #0b0c0d; border-right: 1px solid var(--line); }
  .side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
  .side-link { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font: 500 19px/1 var(--display); }
  .side-link.active { background: var(--lime); color: var(--lime-ink); }
  .side-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
  .who { display: flex; flex-direction: column; min-width: 0; }
  .tabs, .brand-top { display: none; }
  .top { padding: 0 28px; }
  .top h1 { font-size: 28px; }
  .content { padding: 24px 28px 40px; max-width: 980px; margin: 0; }
  .confirm-bar { bottom: 0; margin: 0; padding: 12px 0 16px; }
  #toasts { left: 262px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
