
:root{--canvas:#20252d;--surface:#2a313c;--raised:#343d4a;--ink:#f1f4f8;--muted:#c0cad8;--line:#72839a;--action:#2864a6;--on-action:#fff;--link:#92c7ff;--selected:#263f5e;--hover:#354458;--danger:#ffb8b0;--danger-bg:#452e34;--warning-bg:#413b29;--sidebar:#1e242d;--sidebar-ink:#edf2f8;--disabled:#333a44;color-scheme:dark}
:root[data-theme=light]{--canvas:#eef1f5;--surface:#fafbfd;--raised:#e3e9f0;--ink:#202b3a;--muted:#48596d;--line:#8190a3;--action:#215eaa;--on-action:#fff;--link:#1758a2;--selected:#dce9f9;--hover:#e1eaf6;--danger:#a12524;--danger-bg:#ffeded;--warning-bg:#fff2cf;--sidebar:#283443;--sidebar-ink:#f2f5fa;--disabled:#e0e5ec;color-scheme:light}
:root{--accent:var(--action)!important;--pos-accent:var(--action)!important;--bg-main:var(--canvas)!important;--bg-dark:var(--canvas)!important;--bg-card:var(--surface)!important;--border:var(--line)!important;--border-color:var(--line)!important;--pos-border:var(--line)!important;--text-main:var(--ink)!important;--text-dim:var(--muted)!important;--pos-muted:var(--muted)!important}
*{box-sizing:border-box}body.tvs-app{margin:0!important;background:var(--canvas)!important;color:var(--ink)!important;font:15px/1.55 system-ui,-apple-system,"Segoe UI",sans-serif!important}
html[data-theme] body.tvs-app :is(h1,h2,h3,h4,strong,b,td){color:var(--ink)!important}body.tvs-app h1{font-size:28px!important;line-height:1.25}body.tvs-app h2{font-size:19px!important}body.tvs-app h3{font-size:16px!important}
html[data-theme] body.tvs-app :is(p,span,label,small,.muted,.fine-print,.doc-meta,.section-note){color:inherit}
html[data-theme] body.tvs-app :is(small,.muted,.fine-print,.doc-meta,.section-note,.summary-line,.metric-card>span,.metric-card small,.activity-row small,.quick-tile small){color:var(--muted)!important;font-size:13px!important}
html[data-theme] body.tvs-app a{color:var(--link);text-decoration:none}html[data-theme] body.tvs-app a:hover{text-decoration:underline}
html[data-theme] body.tvs-app :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){background:var(--surface)!important;color:var(--ink)!important;border:1px solid var(--line)!important;border-radius:7px!important;font-size:15px!important;min-height:44px;max-width:100%;box-shadow:none!important}
html[data-theme] body.tvs-app :is(input,textarea)::placeholder{color:var(--muted)!important;opacity:1}
html[data-theme] body.tvs-app input[type=checkbox],html[data-theme] body.tvs-app input[type=radio]{width:18px;height:18px;min-height:18px;accent-color:var(--action)}
html[data-theme] body.tvs-app :is(input,select,textarea,button):disabled{background:var(--disabled)!important;color:var(--muted)!important;cursor:not-allowed;opacity:1}
html[data-theme] body.tvs-app :is(.content-wrapper,.main-content,.workspace){background:var(--canvas)!important}
html[data-theme] body.tvs-app :is(.card,.pos-card,.surface-pane,.settings-card,.metric-card,.quick-tile,.editor-summary,.line-editor,.client-choice,.document-filters,.confirmation-sheet,.search-card,.client-card,.archive-card,.garage-panel,.tvs-panel,.summary-card,.info-card,.doc-card,.vehicle-card,.form-card){background:var(--surface)!important;color:var(--ink)!important;border:1px solid var(--line)!important;border-radius:10px!important;box-shadow:none!important}
html[data-theme] body.tvs-app :is(.admin-topbar,.garage-client-header){background:var(--surface)!important;color:var(--muted)!important;border-bottom:1px solid var(--line)!important}
html[data-theme] body.tvs-app :is(.main-content,.workspace){padding:25px 28px!important}
html[data-theme] body.tvs-app .sidebar{background:var(--sidebar)!important;border-right:1px solid var(--line)!important}
html[data-theme] body.tvs-app .sidebar :is(a,span,strong,small,summary){color:var(--sidebar-ink)!important}
html[data-theme] body.tvs-app .sidebar .nav-link.active{background:#234e7b!important;border-color:#8aa6c8!important}
html[data-theme] body.tvs-app .sidebar :is(.nav-link:hover,.nav-group summary:hover){background:#39495e!important}
html[data-theme] body.tvs-app .brand>.tvs-icon{background:var(--raised)!important;color:var(--sidebar-ink)!important}
html[data-theme] body.tvs-app.tvs-app :is(button,.tvs-button,.btn-primary,.btn-save,.btn-add-client,.btn-search){background:var(--action)!important;color:var(--on-action)!important;border:1px solid var(--action)!important;border-radius:7px!important;min-height:44px;padding:10px 15px;font-size:14px!important;font-weight:600!important;box-shadow:none!important}
html[data-theme] body.tvs-app.tvs-app :is(.button-secondary,.btn-secondary,.btn-back,.btn-preset,.filter-btn,.tabs button,.calendar-nav button,.schedule-presets button,.menu-btn,.logout-button){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme] body.tvs-app.tvs-app :is(button,.tvs-button):hover:not(:disabled){filter:brightness(1.08)}
html[data-theme] body.tvs-app.tvs-app :is(button[name*=delete],button[name*=supprimer],button[name=refuser_doc],.button-danger,.icon-action){background:var(--danger-bg)!important;color:var(--danger)!important;border-color:var(--danger)!important}
html[data-theme] body.tvs-app :is(.status-tag,.status-pill-modern,.garage-chip,.env-pill,.state-pill,.document-tabs .selected,.garage-tabs .active,.filter-btn.active){background:var(--selected)!important;color:var(--ink)!important;border:1px solid var(--line)!important;font-size:13px!important}
html[data-theme] body.tvs-app :is(.garage-chip.urgent,.garage-note,.alert-warning){background:var(--warning-bg)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme] body.tvs-app :is(.alert-error,.tvs-error){background:var(--danger-bg)!important;color:var(--danger)!important;border-color:var(--danger)!important}
html[data-theme] body.tvs-app :is(.alert-success,.tvs-success,.tvs-notice){background:var(--selected)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme] body.tvs-app :is(table,.table-scroll,.tvs-table-frame){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme] body.tvs-app :is(th,td){border-color:var(--line)!important;font-size:14px!important}
html[data-theme] body.tvs-app th{background:var(--raised)!important;color:var(--ink)!important}
html[data-theme] body.tvs-app tbody tr:hover,html[data-theme] body.tvs-app tbody tr:hover :is(td,strong,b,small,span){background:var(--hover)!important;color:var(--ink)!important}
html[data-theme] body.tvs-app tbody tr:hover a{color:var(--link)!important}
html[data-theme] body.tvs-app :is(.search-results,.autocomplete-results,.client-results){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme] body.tvs-app .search-results button{background:var(--surface)!important;color:var(--ink)!important}
html[data-theme] body.tvs-app [style*="color:white"],html[data-theme] body.tvs-app [style*="color: white"],html[data-theme] body.tvs-app [style*="color:#fff"]{color:var(--ink)!important}
html[data-theme] body.tvs-app>div[style*="position:fixed"]{background:var(--sidebar)!important;color:var(--sidebar-ink)!important}
html[data-theme] body.tvs-app :is(.time-track,.month-day){background-color:var(--surface)!important;border-color:var(--line)!important}
html[data-theme] body.tvs-app .calendar-day-label{background:var(--raised)!important;color:var(--ink)!important}
html[data-theme] body.tvs-app .calendar-event{background:var(--selected)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme] body.tvs-app .calendar-event :is(strong,small,span){color:var(--ink)!important}
html[data-theme] body.tvs-app.tvs-app .free-slot{background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;opacity:1;padding:0}
html[data-theme] body.tvs-app.tvs-app .free-slot:disabled{background:var(--raised)!important;opacity:.65}
html[data-theme] body.tvs-app .confirmation-sheet{background:var(--surface)!important;color:var(--ink)!important}
html[data-theme] body.tvs-app :is(.dialog-summary,.dialog-message){background:var(--raised)!important;color:var(--ink)!important}
html[data-theme] body.tvs-app :focus-visible{outline:3px solid var(--link)!important;outline-offset:3px}
.garage-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:23px}.garage-heading h1{margin:0 0 8px}.garage-heading p{margin:0;color:var(--muted)}.garage-tools{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0}.garage-tools input{flex:1;min-width:200px}.garage-tools select{max-width:100%}.garage-panel{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:22px;margin:18px 0;min-width:0}.garage-panel.flush{padding:0;overflow:hidden}.garage-table{width:100%;border-collapse:collapse}.garage-table :is(th,td){text-align:left;padding:14px 18px;border-bottom:1px solid var(--line)}.garage-table td strong,.garage-table td small{display:block}.garage-table a{font-weight:600}.garage-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:15px 18px;font-size:14px}.garage-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.garage-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.garage-fields label{display:grid;gap:7px}.garage-fields input,.garage-fields select,.garage-fields textarea{width:100%}.garage-fields .wide{grid-column:1/-1}.garage-chip{display:inline-block;padding:4px 9px;background:var(--raised);border:1px solid var(--line);border-radius:5px;font-size:13px;color:var(--muted)}.garage-chip.urgent{background:var(--warning-bg);border-color:var(--line);color:var(--ink)}.garage-tabs{display:flex;gap:7px;flex-wrap:wrap;margin:18px 0}.garage-tabs a{padding:9px 14px;border:1px solid var(--line);background:var(--surface);border-radius:7px;color:var(--muted)}.garage-tabs .active{background:var(--selected);color:var(--link);border-color:var(--line)}.garage-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.garage-empty{padding:30px;color:var(--muted)}.garage-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 0;border-bottom:1px solid var(--line)}.garage-row>div{min-width:0}.garage-row small{display:block}.garage-note{padding:14px 17px;border-left:3px solid var(--action);background:var(--selected);color:var(--ink);margin:15px 0}.garage-audit{border-left:2px solid var(--line);padding-left:18px}.garage-audit p{padding-bottom:15px}.garage-counts{display:flex;gap:22px;flex-wrap:wrap;margin:20px 0;color:var(--muted)}.garage-counts b{font-size:22px;color:var(--ink);margin-right:5px}
@media(max-width:767px){body.tvs-app.tvs-app :is(.main-content,.workspace){padding:22px 16px!important}body.tvs-app.tvs-app h1{font-size:26px!important}.garage-heading{align-items:stretch;flex-direction:column}.garage-heading>.garage-actions{display:grid;grid-template-columns:1fr 1fr}.garage-grid,.garage-fields{grid-template-columns:1fr}.garage-fields .wide{grid-column:auto}.garage-tools{gap:8px}.garage-tools input{width:100%;min-width:0;flex:auto}.garage-tools select{flex:1;min-width:0}.garage-table thead{display:none}.garage-table,.garage-table tbody{display:block}.garage-table tr{display:block;padding:15px;border-bottom:1px solid var(--line)}.garage-table td{display:block;padding:4px 0;border:0!important;overflow-wrap:anywhere}.garage-table td[data-label]::before{content:attr(data-label) ' : ';color:var(--muted)}.garage-table td:last-child{margin-top:8px}.garage-panel{padding:18px}.garage-panel.flush{padding:0}.garage-pagination{align-items:stretch}.garage-row{flex-wrap:wrap}.garage-tabs a{font-size:14px}.garage-tools button{flex:1}.garage-counts{gap:12px 18px}.garage-heading .garage-actions a{text-align:center}body.tvs-app.tvs-app :is(.fine-print,.doc-meta,.section-note,small){font-size:13px!important}}

.client-shell{max-width:1150px;margin:auto}.garage-client-header{padding:20px 24px;display:flex;justify-content:space-between;gap:15px;align-items:center}.garage-client-header nav{display:flex;gap:18px;flex-wrap:wrap}.garage-client-header nav a{padding:8px 0;font-size:14px}
.theme-control{position:fixed;right:16px;top:9px;z-index:1080;display:flex;align-items:center;gap:8px;padding:5px 8px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font-size:13px}
.theme-control label{font-size:13px}.theme-control select{min-height:36px!important;padding:5px 8px!important;font-size:13px!important}
.admin-topbar{padding-right:240px!important}.environment-status .state-pill{display:none}.garage-client-header{padding-right:230px}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.workshop-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.workshop-card{background:var(--surface);border:1px solid var(--line);border-radius:10px;overflow:hidden;min-width:0}.workshop-cover{display:block;width:100%;height:170px;object-fit:cover;background:var(--raised)}.workshop-no-photo{height:170px;display:grid;place-content:center;background:var(--raised);color:var(--muted)}.workshop-card-body{padding:17px}.workshop-card-body h2{margin:8px 0}.workshop-card-body p{margin:7px 0;font-size:14px}.workshop-card-body .tvs-button{display:block;text-align:center;margin-top:14px}
@media(max-width:1150px){.workshop-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767px){.theme-control{position:sticky;top:0;right:auto;justify-content:flex-end;border-radius:0;border-width:0 0 1px;min-height:50px}.admin-topbar{padding-right:16px!important}.garage-client-header{display:block;padding:16px}.garage-client-header nav{margin-top:12px;gap:14px}.workshop-cards{grid-template-columns:1fr}.workshop-cover,.workshop-no-photo{height:200px}.garage-heading{gap:14px}}

.drop-zone{display:block;padding:22px;border:2px dashed var(--line);border-radius:9px;background:var(--raised)}.drop-zone.dragover{border-color:var(--link);background:var(--selected)}.drop-zone input{display:block;margin-top:10px;width:100%}.selected-files{list-style:none;padding:0}.selected-files li{display:flex;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.selected-files img{width:64px;height:64px;object-fit:cover;border-radius:5px}.selected-files span{flex:1;min-width:0}.multi-upload progress{width:100%;height:18px}.document-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.document-gallery article{min-width:0;padding:14px;border:1px solid var(--line);border-radius:8px}.document-gallery img{width:100%;height:170px;object-fit:cover}.document-gallery a{overflow-wrap:anywhere}@media(max-width:767px){.document-gallery{grid-template-columns:1fr}.selected-files li{flex-wrap:wrap}}

html[data-theme] body.tvs-app .document-kind label{background:var(--surface)!important;border-color:var(--line)!important;color:var(--ink)!important}
html[data-theme] body.tvs-app .document-kind label:has(input:checked){background:var(--selected)!important;border-color:var(--link)!important}
html[data-theme] body.tvs-app :is(.document-kind b,.document-kind small,.doc-client,.document-number,.metric-card strong,.total-summary strong,.line-total strong,.summary-line b,.quick-tile b,.attention-row b,.activity-row b){color:var(--ink)!important}
html[data-theme] body.tvs-app .tvs-icon{color:currentColor!important}
html[data-theme] body.tvs-app .search-results button:hover{background:var(--hover)!important;color:var(--ink)!important}
.environment-status .state-pill:last-child{display:inline-flex}

html[data-theme] body.tvs-app tbody tr:hover a.tvs-button{color:var(--on-action)!important}
html[data-theme] body.tvs-app .sidebar .nav-link.active{background:#234e7b!important;color:#edf2f8!important}
html[data-theme] body.tvs-app .sidebar .nav-link:hover{background:#39495e!important;color:#edf2f8!important}

html[data-theme] body.tvs-app.print-document .a4-container{--surface:#fff;--ink:#202b3a;--muted:#48596d;--line:#8190a3;--raised:#e3e9f0;--hover:#e1eaf6;--link:#1758a2;--selected:#dce9f9;background:#fff!important;color:#202b3a!important}
@media print{.theme-control{display:none!important}body.print-document{background:#fff!important}}

html[data-theme] body.tvs-app table.tvs-responsive tr{background:var(--surface)!important;border-color:var(--line)!important}
html[data-theme] body.tvs-app table.tvs-responsive td::before{color:var(--muted)!important;font-size:13px!important}
html[data-theme] body.tvs-app .sidebar-account{padding-bottom:48px}
html[data-theme] body.tvs-app{padding-bottom:54px}
@media(max-width:767px){html[data-theme] body.tvs-app table.tvs-responsive td{display:block!important;grid-template-columns:none!important;min-width:0;padding:11px 4px!important}html[data-theme] body.tvs-app table.tvs-responsive td::before{display:block!important;margin-bottom:5px;letter-spacing:0;text-transform:none}html[data-theme] body.tvs-app table.tvs-responsive td small{display:block}}

/* Surfaces et textes des écrans historiques, reliés à la palette commune. */
:root{--pos-bg:var(--canvas)!important;--pos-card:var(--surface)!important;--pos-text:var(--ink)!important}
html[data-theme] body.tvs-app :is(.pos-sale,.filter-bar,.receipt-card,.user-card,.annonce-row,.annonce-item,.login-box,.login-card,.login-logo,.step-index){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme] body.tvs-app :is(.topbar-title,.time-label,.time-axis,.time-axis span,.section-title,.section-title span,label,summary){color:var(--ink)!important}
html[data-theme] body.tvs-app :is(.folder-id){background:var(--action)!important;color:var(--on-action)!important}
html[data-theme] body.tvs-app :is(.stat-val,.info-val,.v-immat){color:var(--link)!important}
html[data-theme] body.tvs-app .skip-link{background:var(--surface)!important;color:var(--link)!important}
html[data-theme] body.tvs-app :is(.document-filters,.editor-summary,.line-editor) :is(p,label,span,small){color:var(--ink)!important}
html[data-theme] body.tvs-app :is(.login-box,.login-card) :is(p,label){color:var(--muted)!important}
html[data-theme] body.tvs-app :is(a.btn-retry){background:var(--action)!important;color:var(--on-action)!important}

html[data-theme] body.tvs-app :is(.user-item,.perm-box,.annonce-config,.annonce-row,.cash-count,.cash-breakdown,.count-grid,.money-count,.financial-search,.login-container){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme] body.tvs-app .time-axis>div:not(:first-child){color:var(--muted)!important}
html[data-theme] body.tvs-app .topbar-title>span{color:var(--muted)!important}
html[data-theme] body.tvs-app .brand>.tvs-icon{background:#343d4a!important}

html[data-theme] body.tvs-app :is(.annonce-card,.receipt-card,.step-index){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme] body.tvs-app :is(.document-toolbar,.document-totals,.billing-totals,.line-total-label,.schedule-toggle,.login-subtitle,.login-footer){color:var(--muted)!important}
html[data-theme] body.tvs-app a[style*="var(--pos-accent)"],html[data-theme] body.tvs-app a[style*="var(--accent)"]{color:var(--link)!important}

html[data-theme] body.tvs-app :is(.document-list-summary,.document-filter-note,.line-editor label,.billing-line-total){color:var(--muted)!important}

html[data-theme] body.tvs-app :is(.document-list-summary span,.metric-card strong em,.page-title span){color:var(--muted)!important}
html[data-theme] body.tvs-app [style*="color: #64748b"],html[data-theme] body.tvs-app [style*="color: #475569"]{color:var(--muted)!important}
html[data-theme] body.tvs-app a[style*="color:var(--accent)"]{color:var(--link)!important}
html[data-theme] body.tvs-app a[style*="color:#ef4444"]{background:var(--danger-bg)!important;color:var(--danger)!important}
html[data-theme] body.tvs-app .sidebar summary{color:var(--sidebar-ink)!important}
