:root {
  --ink: #3f3c38;
  --ink-soft: #5b5650;
  --stone: #6f665b;
  --muted: #8b7c68;
  --gold: #a78955;
  --gold-soft: #c9ad7a;
  --paper: #ffffff;
  --canvas: #f2f0ea;
  --canvas-deep: #e9e5dd;
  --line: #e2ddd3;
  --success: #58705a;
  --danger: #a44d43;
  --warning: #a06f2b;
  --shadow: 0 18px 50px rgba(63, 60, 56, 0.09);
  --radius: 14px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.4; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow.light { color: var(--gold-soft); }
.muted { color: #746e67; }
.serif { font-family: var(--serif); }

/* Connexion */
.login-page { min-height: 100vh; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 46%) 1fr; }
.login-brand { position: relative; display: flex; align-items: center; overflow: hidden; padding: 64px; color: white; background: var(--ink); }
.login-brand::before { content: ''; position: absolute; inset: -20% -25% auto auto; width: 560px; height: 560px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.login-brand::after { content: ''; position: absolute; left: 64px; bottom: 0; width: 1px; height: 20%; background: var(--gold); opacity: .55; }
.login-brand-inner { position: relative; z-index: 1; width: min(540px, 100%); margin: auto; }
.login-logo { width: 118px; height: 118px; object-fit: contain; margin-bottom: 40px; border-radius: 11px; box-shadow: 0 8px 28px rgba(0,0,0,.13); }
.login-brand h1 { margin: 0; font: 700 clamp(38px, 4.3vw, 66px)/1.07 var(--serif); letter-spacing: -.035em; }
.login-intro { max-width: 510px; margin: 28px 0 0; color: #ded9d1; font-size: 17px; line-height: 1.75; }
.brand-rule { width: 54px; height: 3px; margin: 38px 0 15px; background: var(--gold); }
.brand-caption { margin: 0; color: #bcb5ab; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.login-panel { display: grid; place-items: center; padding: 48px 8vw; background: var(--paper); }
.login-card { width: min(430px, 100%); }
.login-card h2 { margin: 0; font: 700 46px/1.1 var(--serif); letter-spacing: -.03em; }
.login-card > .muted { margin: 14px 0 30px; line-height: 1.65; }
.form-stack { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field > span, .field-label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.field input, .field textarea, .field select, .search-control input, .search-control select {
  width: 100%; border: 1px solid #d8d2c8; border-radius: 8px; color: var(--ink); background: #fff; outline: none; transition: border .2s, box-shadow .2s;
}
.field input, .field select { height: 46px; padding: 0 13px; }
.field textarea { min-height: 104px; resize: vertical; padding: 12px 13px; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus, .search-control input:focus, .search-control select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(167,137,85,.14); }
.field small { color: #817a72; line-height: 1.45; }
.login-help { margin: 24px 0 0; color: #968e84; text-align: center; font-size: 12px; }
.alert { margin: 0 0 20px; padding: 12px 14px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.alert-error { color: #7f342d; background: #f8e9e7; border: 1px solid #ebc9c5; }

/* Structure */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 264px; display: flex; flex-direction: column; padding: 27px 18px 22px; color: white; background: var(--ink); }
.brand { display: flex; align-items: center; gap: 13px; padding: 0 8px 28px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-logo { width: 48px; height: 48px; object-fit: contain; border-radius: 6px; }
.brand span { min-width: 0; }
.brand strong { display: block; font: 700 16px/1.15 var(--serif); }
.brand small { display: block; margin-top: 5px; color: #c9c2b9; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.main-nav { display: grid; gap: 5px; padding-top: 27px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 8px; padding: 12px 13px; color: #d6d1ca; background: transparent; text-align: left; cursor: pointer; transition: color .18s, background .18s; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.09); }
.nav-item.active { box-shadow: inset 3px 0 var(--gold-soft); }
.nav-icon { width: 20px; color: var(--gold-soft); font-size: 19px; text-align: center; }
.sidebar-footer { margin-top: auto; }
.sidebar-footer form { margin: 0; }
.sidebar-signature { margin: 22px 11px 0; padding-top: 20px; color: #938d85; border-top: 1px solid rgba(255,255,255,.1); font: italic 12px/1.5 var(--serif); }
.main-content { min-height: 100vh; margin-left: 264px; padding: 43px clamp(28px, 4.4vw, 72px) 70px; }
.mobile-header, .mobile-menu { display: none; }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; margin-bottom: 32px; }
.page-header h1 { margin: 0; font: 700 clamp(32px, 3.3vw, 48px)/1.07 var(--serif); letter-spacing: -.035em; }
.page-header p:not(.eyebrow) { margin: 10px 0 0; color: #746e67; line-height: 1.55; }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 7px; padding: 10px 16px; font-weight: 700; font-size: 13px; cursor: pointer; transition: transform .15s, background .18s, border .18s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: white; background: var(--stone); }
.btn-primary:hover { background: var(--ink); }
.btn-gold { color: white; background: var(--gold); }
.btn-gold:hover { background: #8e733f; }
.btn-secondary { border-color: #d5cfc5; background: white; }
.btn-secondary:hover { border-color: var(--gold); }
.btn-danger { color: var(--danger); border-color: #e5cac7; background: #fff; }
.btn-danger:hover { background: #faeeec; }
.btn-quiet { min-height: 34px; padding: 7px 10px; border-color: var(--line); color: var(--ink-soft); background: transparent; }
.btn-full { width: 100%; min-height: 48px; margin-top: 4px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; cursor: pointer; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 26px; }
.stat-card { min-height: 124px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.78); }
.stat-card strong { display: block; font: 700 34px/1 var(--serif); }
.stat-card span { display: block; margin-top: 9px; color: #7d766e; font-size: 12px; }
.stat-mark { width: 40px; height: 40px; display: grid !important; place-items: center; margin: 0 !important; border-radius: 50%; color: var(--gold) !important; background: #f3eee4; font-size: 18px !important; }
.stat-card.alerting { border-color: #e3c8a3; background: #f9f4e9; }
.stat-card.alerting .stat-mark { color: var(--warning) !important; background: #f0e2c8; }

.content-card { border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 8px 30px rgba(63,60,56,.035); }
.section-block { margin-top: 30px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.section-heading h2 { margin: 0; font: 700 25px/1.2 var(--serif); }
.section-heading p { margin: 5px 0 0; color: #837b72; font-size: 13px; }
.section-count { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.toolbar { display: flex; align-items: center; gap: 10px; padding: 15px; border-bottom: 1px solid var(--line); }
.search-control { position: relative; flex: 1; }
.search-control input { height: 42px; padding: 0 14px 0 40px; }
.search-control::before { content: '⌕'; position: absolute; left: 14px; top: 9px; color: #958d84; font-size: 20px; }
.search-control select { width: auto; height: 42px; padding: 0 32px 0 13px; }
.vehicle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 15px; }
.vehicle-card { position: relative; min-height: 216px; display: flex; flex-direction: column; overflow: hidden; padding: 21px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; transition: transform .18s, box-shadow .18s, border .18s; }
.vehicle-card::before { content: ''; position: absolute; left: 0; top: 0; width: 4px; height: 100%; background: var(--gold); transform: scaleY(0); transform-origin: bottom; transition: transform .2s; }
.vehicle-card:hover { transform: translateY(-2px); border-color: #cfc5b5; box-shadow: var(--shadow); }
.vehicle-card:hover::before { transform: scaleY(1); }
.vehicle-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.park-badge { display: inline-flex; align-items: center; min-height: 27px; padding: 5px 9px; border-radius: 4px; color: #6f5831; background: #f2eadc; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.vehicle-arrow { color: #9b9389; font-size: 20px; }
.vehicle-card h3 { margin: 19px 0 5px; font: 700 22px/1.2 var(--serif); }
.registration { display: inline-block; color: #6d675f; font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.vehicle-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: auto; padding-top: 20px; border-top: 1px solid #eeeae4; color: #817a72; font-size: 12px; }
.vehicle-meta span:last-child { text-align: right; }
.empty-state { grid-column: 1 / -1; padding: 65px 25px; text-align: center; }
.empty-state-mark { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; color: var(--gold); background: var(--canvas); font: 30px var(--serif); }
.empty-state h3 { margin: 0; font: 700 23px var(--serif); }
.empty-state p { max-width: 460px; margin: 9px auto 20px; color: #817a72; font-size: 14px; line-height: 1.6; }

.reminder-list { overflow: hidden; }
.reminder-row { display: grid; grid-template-columns: 9px minmax(180px, 1.5fr) minmax(150px, 1fr) minmax(150px, 1fr) auto; align-items: center; gap: 18px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.reminder-row:last-child { border-bottom: 0; }
.urgency-dot { width: 9px; height: 9px; border-radius: 50%; background: #a3a099; }
.urgency-dot.overdue { background: var(--danger); box-shadow: 0 0 0 4px rgba(164,77,67,.1); }
.urgency-dot.soon { background: var(--warning); box-shadow: 0 0 0 4px rgba(160,111,43,.1); }
.reminder-title strong { display: block; margin-bottom: 4px; font-size: 14px; }
.reminder-title span, .reminder-detail span { color: #817a72; font-size: 12px; }
.reminder-vehicle { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; line-height: 1.35; }
.reminder-vehicle span { position: relative; }
.reminder-vehicle span + span::before { content: "·"; position: absolute; left: -6px; color: #b1aaa0; }
.reminder-vehicle .reminder-vehicle-type { color: #5f5a53; font-weight: 700; }
.reminder-vehicle .reminder-registration { color: #765b31; font-weight: 800; letter-spacing: .035em; }
.reminder-detail strong { display: block; margin-bottom: 4px; font-size: 13px; }
.status-chip { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border-radius: 999px; color: #66615a; background: #eeebe5; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.status-chip.overdue { color: #84372f; background: #f7e6e4; }
.status-chip.soon { color: #80581f; background: #f5ead6; }
.row-actions { display: flex; gap: 6px; }

/* Fiche véhicule */
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 22px; border: 0; padding: 0; color: var(--stone); background: transparent; font-weight: 700; font-size: 13px; cursor: pointer; }
.vehicle-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 26px; padding: 29px 31px; color: white; border-radius: var(--radius); background: var(--ink); }
.vehicle-hero::after { content: 'MH'; position: absolute; right: 32px; bottom: -38px; color: rgba(255,255,255,.035); font: 700 140px var(--serif); }
.vehicle-hero > * { position: relative; z-index: 1; }
.vehicle-hero .park-badge { color: #f0dfc0; background: rgba(167,137,85,.22); }
.vehicle-hero h1 { margin: 13px 0 8px; font: 700 clamp(30px, 3.2vw, 44px)/1.05 var(--serif); }
.vehicle-hero .registration { color: #d5cfc6; }
.vehicle-km { align-self: center; min-width: 155px; padding-left: 25px; border-left: 1px solid rgba(255,255,255,.18); }
.vehicle-km strong { display: block; font: 700 29px var(--serif); }
.vehicle-km span { color: #bdb7af; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.tabs { display: flex; gap: 3px; overflow-x: auto; margin: 25px 0 18px; border-bottom: 1px solid #d8d2c8; scrollbar-width: none; }
.tab { flex: 0 0 auto; border: 0; border-bottom: 3px solid transparent; padding: 13px 17px 11px; color: #777067; background: transparent; font-size: 13px; font-weight: 700; cursor: pointer; }
.tab.active { color: var(--ink); border-color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.detail-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
.detail-card { padding: 24px; }
.detail-card h2, .panel-head h2 { margin: 0; font: 700 23px/1.2 var(--serif); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.info-list { display: grid; margin-top: 20px; }
.info-row { display: grid; grid-template-columns: 160px 1fr; gap: 18px; padding: 13px 0; border-bottom: 1px solid #eeeae4; }
.info-row:last-child { border-bottom: 0; }
.info-row span { color: #817a72; font-size: 12px; }
.info-row strong { font-size: 13px; text-align: right; }
.notes-box { min-height: 145px; margin-top: 18px; padding: 16px; color: #5e5952; border-left: 3px solid var(--gold); background: #f8f6f1; white-space: pre-wrap; font-size: 14px; line-height: 1.65; }
.notes-box.empty { color: #958e85; font-style: italic; }
.timeline { padding: 5px 22px 10px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 130px 1fr auto; gap: 20px; padding: 23px 0 23px 25px; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-item::before { content: ''; position: absolute; left: 2px; top: 29px; width: 9px; height: 9px; border: 2px solid white; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.timeline-date strong { display: block; font-size: 13px; }
.timeline-date span { color: #857e75; font-size: 11px; }
.timeline-main strong { display: block; margin-bottom: 6px; font: 700 17px var(--serif); }
.timeline-main p { margin: 0; color: #716b64; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.record-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 9px; }
.record-meta span { padding: 4px 7px; border-radius: 999px; color: #716b64; background: #f3f0ea; font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.completed { opacity: .58; }
.completed .reminder-title strong { text-decoration: line-through; }

.document-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; padding: 18px; }
.document-card { min-width: 0; display: grid; grid-template-columns: 45px minmax(0, 1fr); gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; }
.document-icon { width: 45px; height: 49px; display: grid; place-items: center; border-radius: 6px; color: var(--gold); background: #f4efe5; font: 700 11px var(--sans); }
.document-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.document-card small { display: block; margin-top: 5px; color: #8a837a; }
.document-actions { grid-column: 1 / -1; display: flex; gap: 7px; padding-top: 4px; }

/* Fenêtres et retours */
.modal { width: min(620px, calc(100% - 28px)); max-height: calc(100vh - 30px); overflow: auto; padding: 0; border: 0; border-radius: 14px; background: transparent; box-shadow: 0 25px 80px rgba(29,27,24,.24); }
.modal::backdrop { background: rgba(38,36,33,.58); backdrop-filter: blur(2px); }
.modal-shell { position: relative; padding: 30px; background: white; }
.modal-close { position: absolute; top: 16px; right: 17px; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: #716b63; background: white; font-size: 22px; cursor: pointer; }
.modal h2 { margin: 0 45px 7px 0; font: 700 29px/1.2 var(--serif); }
.modal-subtitle { margin: 0 0 24px; color: #7c756d; font-size: 13px; line-height: 1.55; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.field.full { grid-column: 1 / -1; }
.modal-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; padding-top: 8px; }
.form-error { grid-column: 1 / -1; margin: 0; color: var(--danger); font-size: 13px; font-weight: 700; }
.drop-zone { grid-column: 1 / -1; display: grid; place-items: center; min-height: 155px; padding: 22px; border: 1px dashed #cbbfae; border-radius: 10px; background: #faf8f4; text-align: center; }
.drop-zone input { max-width: 100%; }
.drop-zone span { display: block; margin-bottom: 13px; font: 700 18px var(--serif); }
.toast-region { position: fixed; z-index: 100; right: 22px; bottom: 22px; display: grid; gap: 9px; }
.toast { min-width: 260px; max-width: 390px; padding: 14px 17px; color: white; border-radius: 8px; background: var(--ink); box-shadow: 0 12px 35px rgba(0,0,0,.2); font-size: 13px; line-height: 1.45; animation: toast-in .22s ease-out; }
.toast.error { background: #843d36; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.loading-state { min-height: 60vh; display: grid; place-content: center; justify-items: center; color: #867f77; }
.spinner { width: 32px; height: 32px; border: 3px solid #dfd9d0; border-top-color: var(--gold); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .vehicle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-brand { min-height: 340px; padding: 42px 30px; }
  .login-brand::after { left: 30px; }
  .login-logo { width: 78px; height: 78px; margin-bottom: 22px; }
  .login-brand h1 { font-size: clamp(34px, 9vw, 48px); }
  .login-intro { margin-top: 18px; font-size: 15px; }
  .brand-rule, .brand-caption { display: none; }
  .login-panel { padding: 44px 24px 60px; }
  .login-card h2 { font-size: 38px; }

  .sidebar { display: none; }
  .mobile-header { position: sticky; top: 0; z-index: 25; height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; color: white; background: var(--ink); }
  .mobile-header .icon-btn { color: white; border-color: rgba(255,255,255,.25); background: transparent; }
  .mobile-brand { display: flex; align-items: center; gap: 9px; font: 700 16px var(--serif); }
  .mobile-brand img { width: 39px; height: 39px; object-fit: contain; border-radius: 5px; }
  .mobile-menu { position: fixed; inset: 66px 0 auto; z-index: 24; display: grid; padding: 12px 18px 18px; color: white; background: var(--ink); box-shadow: 0 12px 25px rgba(0,0,0,.2); }
  .mobile-menu button { width: 100%; border: 0; padding: 13px 6px; color: #e3ded7; border-bottom: 1px solid rgba(255,255,255,.1); background: transparent; text-align: left; }
  .main-content { margin-left: 0; padding: 30px 20px 55px; }
  .detail-grid { grid-template-columns: 1fr; }
  .reminder-row { grid-template-columns: 9px 1fr auto; gap: 12px; }
  .reminder-row .reminder-detail { display: none; }
}

@media (max-width: 570px) {
  .login-brand { min-height: 305px; }
  .login-brand h1 br { display: none; }
  .page-header { align-items: stretch; flex-direction: column; margin-bottom: 24px; }
  .page-header .btn { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 110px; padding: 16px; }
  .stat-card strong { font-size: 28px; }
  .stat-mark { display: none !important; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-control select { width: 100%; }
  .vehicle-grid, .document-grid { grid-template-columns: 1fr; }
  .vehicle-card { min-height: 200px; }
  .vehicle-hero { grid-template-columns: 1fr; padding: 24px; }
  .vehicle-km { padding: 15px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.18); }
  .timeline-item { grid-template-columns: 1fr auto; gap: 10px; padding-left: 23px; }
  .timeline-main { grid-column: 1 / -1; }
  .info-row { grid-template-columns: 1fr; gap: 5px; }
  .info-row strong { text-align: left; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full, .modal-actions, .form-error, .drop-zone { grid-column: 1; }
  .modal-shell { padding: 26px 20px 22px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
  .reminder-row { grid-template-columns: 8px 1fr; }
  .reminder-row .row-actions { grid-column: 2; }
  .toast-region { inset: auto 12px 12px; }
  .toast { min-width: 0; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Inventaire enrichi */
.fleet-toolbar select { width: auto; min-width: 170px; height: 42px; }
.vehicle-card.has-cover { min-height: 320px; padding: 0; }
.vehicle-card-body { flex: 1; display: flex; flex-direction: column; padding: 18px 20px 20px; }
.vehicle-card-body h3 { margin-top: 14px; }
.vehicle-cover { position: relative; height: 132px; overflow: hidden; background: #e9e5de; }
.vehicle-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.vehicle-cover em { position: absolute; left: 12px; bottom: 10px; padding: 4px 7px; color: white; border-radius: 4px; background: rgba(48,45,41,.78); font-size: 9px; font-style: normal; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.vehicle-cover.placeholder { display: grid; place-items: center; color: rgba(79,74,68,.35); background: linear-gradient(135deg, #ede9e2, #d8d2c9); }
.vehicle-cover.placeholder span { font: 700 54px var(--serif); }

.vehicle-hero.with-photo { min-height: 220px; grid-template-columns: minmax(0, 1fr) auto 260px; align-items: stretch; padding: 0; }
.vehicle-hero-copy { align-self: center; padding: 30px 0 30px 31px; }
.vehicle-hero-metric { align-self: center; min-width: 155px; padding: 0 25px; border-left: 1px solid rgba(255,255,255,.18); }
.vehicle-hero-metric strong { display: block; font: 700 25px var(--serif); }
.vehicle-hero-metric span { color: #bdb7af; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.vehicle-hero-photo { min-height: 220px; overflow: hidden; background: #4a4742; }
.vehicle-hero-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.vehicle-hero-photo.placeholder { display: grid; place-items: center; color: rgba(255,255,255,.18); font: 700 66px var(--serif); }

.notes-card { grid-column: 1 / -1; }
.photo-panel { height: 250px; overflow: hidden; margin-top: 18px; border-radius: 9px; background: var(--canvas); }
.photo-panel img { width: 100%; height: 100%; display: block; object-fit: cover; }
.photo-panel.empty, .photo-placeholder { display: grid; place-items: center; color: #948c82; }
.source-note { margin: 12px 0 0; color: #837c73; font-size: 11px; }
.source-note a, .source-link { color: #765b31; font-weight: 700; }

.registration-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 16px; align-items: start; }
.spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin-top: 20px; }
.spec-grid > div { min-width: 0; padding: 12px 0; border-bottom: 1px solid #eeeae4; }
.spec-grid span { display: block; margin-bottom: 5px; color: #817a72; font-size: 11px; }
.spec-grid strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.model-card h3 { margin: 25px 0 18px; font: 700 24px/1.25 var(--serif); }
.research-chip { flex: 0 0 auto; padding: 5px 8px; color: #765b31; border-radius: 99px; background: #f2eadc; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.maintenance-callout { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 15px 0; padding: 14px; border-left: 3px solid var(--gold); background: #f8f5ef; }
.maintenance-callout span { color: #7c746b; font-size: 11px; text-transform: uppercase; }
.maintenance-callout strong { text-align: right; font-size: 13px; }
.guidance { color: #605a53; white-space: pre-wrap; font-size: 13px; line-height: 1.65; }
.caution-note { margin: 20px 0 12px; padding-top: 15px; color: #8a5d31; border-top: 1px solid #e8dcc8; font-size: 11px; line-height: 1.5; }
.source-link { display: inline-block; margin-top: 7px; font-size: 12px; }

.document-category { display: block; margin-bottom: 5px; color: #8b6c38; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.fuel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 18px; }
.fuel-grid.global { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fuel-card { min-width: 0; padding: 19px; color: #f6f3ee; border-radius: 12px; background: linear-gradient(145deg, #4c4944, #302e2b); box-shadow: 0 11px 25px rgba(42,39,35,.12); }
.fuel-card-head, .fuel-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fuel-symbol { color: #d8b878; font-size: 24px; }
.fuel-card h3 { margin: 18px 0 6px; overflow-wrap: anywhere; font: 700 19px var(--serif); }
.fuel-card > p { min-height: 35px; margin: 0 0 15px; color: #c8c2b9; font-size: 11px; line-height: 1.5; }
.fuel-card dl { margin: 16px 0; }
.fuel-card dl div { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.fuel-card dt { color: #aaa39b; font-size: 10px; text-transform: uppercase; }
.fuel-card dd { margin: 0; overflow-wrap: anywhere; text-align: right; font-size: 11px; font-weight: 700; }
.fuel-actions { flex-wrap: wrap; justify-content: flex-start; }
.fuel-card .btn-quiet { color: #f2eee7; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.06); }
.fuel-card .status-chip { color: #e8dfce; background: rgba(255,255,255,.11); }
.fuel-card .status-chip.soon { color: #f4dab0; background: rgba(178,124,53,.28); }
.fuel-stats .stat-card strong { font-size: clamp(24px, 2.1vw, 34px); overflow-wrap: anywhere; }
.fuel-period-filter { display: grid; grid-template-columns: minmax(220px, 1fr) 180px 180px auto; align-items: end; gap: 16px; margin-bottom: 18px; padding: 18px 20px; }
.fuel-period-filter > div:first-child { align-self: center; }
.fuel-period-filter > div:first-child strong, .fuel-period-filter > div:first-child span { display: block; }
.fuel-period-filter > div:first-child strong { margin-bottom: 5px; font: 700 19px var(--serif); }
.fuel-period-filter > div:first-child span { color: #817a72; font-size: 11px; }
.fuel-period-filter .field { margin: 0; }
.fuel-period-actions { display: flex; gap: 8px; }
.fuel-calculation-card { margin-bottom: 18px; overflow: hidden; }
.fuel-calculation-card .panel-head { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.fuel-calculation-card .panel-head h2 { margin: 3px 0 5px; }
.fuel-calculation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.fuel-calculation-grid article { min-width: 0; padding: 22px 20px; background: #fff; }
.fuel-calculation-grid article.featured { color: #f8f4ec; background: linear-gradient(145deg, #6c5a3b, #443a2b); }
.fuel-calculation-grid span, .fuel-calculation-grid small { display: block; }
.fuel-calculation-grid span { margin-bottom: 8px; color: #817a72; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.fuel-calculation-grid strong { display: block; overflow-wrap: anywhere; color: var(--ink); font: 700 clamp(22px, 2.2vw, 34px) var(--serif); }
.fuel-calculation-grid small { margin-top: 6px; color: #918a81; font-size: 10px; line-height: 1.45; }
.fuel-calculation-grid .featured span, .fuel-calculation-grid .featured small { color: #d9ccb5; }
.fuel-calculation-grid .featured strong { color: #fff; }
.fuel-method-note { margin: 0; padding: 13px 20px; color: #756d62; border-top: 1px solid var(--line); background: #faf8f4; font-size: 10px; line-height: 1.5; }
.fuel-method-note.warning { color: #865437; background: #fff8ed; }
.fuel-consumption-table { min-width: 860px; }
.calculation-missing { color: #9a6a43; font-size: 10px; font-weight: 700; }
.data-table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 12px; }
.data-table th { padding: 12px 14px; color: #7b746c; border-bottom: 1px solid var(--line); background: #faf8f4; text-align: left; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 14px; color: #625d56; border-bottom: 1px solid #ece8e1; vertical-align: middle; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fcfaf7; }
.data-table td strong { color: var(--ink); }
.data-table td small { display: block; margin-top: 4px; color: #948d84; }
.data-table tr.needs-review, .data-table tr.reading-anomaly { background: #fff8ed; }
.data-table tr.reading-duplicate { color: #928b82; background: #faf9f7; }
.data-table tr.reading-duplicate td { color: #928b82; }
.table-link { color: #765b31; font-weight: 700; text-decoration: underline; text-decoration-color: #d8c5a5; text-underline-offset: 3px; }
.table-link:hover { color: var(--ink); }
.table-caption { margin: 0; padding: 13px 20px; color: #817a72; border-top: 1px solid var(--line); background: #faf8f4; font-size: 11px; }
.audit-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.audit-chip.valid, .audit-chip.accepted { color: #47644d; background: #e8f0e8; }
.audit-chip.correction { color: #735c2b; background: #f4ebd5; }
.audit-chip.review, .audit-chip.anomaly { color: #8b463b; background: #f7e7e4; }
.audit-chip.duplicate { color: #777168; background: #ece9e4; }
.negative-amount { color: var(--success) !important; }
.monthly-table { min-width: 560px; }
.monthly-table td:first-child { text-transform: capitalize; }

@media (max-width: 1180px) {
  .registration-grid { grid-template-columns: 1fr; }
  .fuel-grid.global { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vehicle-hero.with-photo { grid-template-columns: minmax(0, 1fr) 230px; }
  .vehicle-hero-metric { display: none; }
}

@media (max-width: 820px) {
  .fleet-toolbar select { width: 100%; }
  .vehicle-hero.with-photo { grid-template-columns: 1fr 180px; min-height: 190px; }
  .vehicle-hero-copy { padding-left: 24px; }
  .vehicle-hero-photo { min-height: 190px; }
  .fuel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fuel-period-filter { grid-template-columns: 1fr 1fr; }
  .fuel-period-filter > div:first-child, .fuel-period-actions { grid-column: 1 / -1; }
  .fuel-calculation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 570px) {
  .vehicle-card.has-cover { min-height: 300px; }
  .vehicle-hero.with-photo { grid-template-columns: 1fr; }
  .vehicle-hero-copy { padding: 24px; }
  .vehicle-hero-photo { height: 190px; min-height: 0; }
  .spec-grid { grid-template-columns: 1fr; }
  .fuel-grid, .fuel-grid.global { grid-template-columns: 1fr; }
  .fuel-period-filter { grid-template-columns: 1fr; }
  .fuel-period-filter > div:first-child, .fuel-period-actions { grid-column: 1; }
  .fuel-period-actions { flex-direction: column; }
  .fuel-calculation-grid { grid-template-columns: 1fr; }
  .photo-panel { height: 210px; }
}
