/* Digitalcar — Portail Loueurs. Aucune police externe, aucun style inline (CSP). */
:root {
  --navy: #101c2f; --navy-2: #22334b; --navy-3: #2c3c52;
  --orange: #ff6a2b; --orange-hover: #ff8650; --orange-text: #b8400a;
  --ink: #1c2739; --muted: #566579; --line: #dfe5ee; --bg: #f4f6fa; --card: #fff;
  --link: #0b57d0; --focus: #0b57d0;
  --red: #b42318; --red-bg: #fde8e6; --green: #0f5132; --green-bg: #dcf5e4;
  --radius: 14px; --shadow: 0 2px 14px rgba(16, 28, 47, .06);
  --tenant-color: var(--orange); --tenant-ink: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 15px; color: var(--ink); background: var(--bg);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.45; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; font-weight: 800; }
h2 { font-size: 1.1rem; font-weight: 750; margin-bottom: .75rem; }
h3 { font-size: 1rem; font-weight: 700; }
h4 { font-size: .9rem; margin: 1rem 0 .4rem; }
p { margin: 0 0 .6rem; }
a { color: var(--link); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: #eef1f6; padding: .1em .35em; border-radius: 4px; word-break: break-all; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sidebar :focus-visible, .auth-hero :focus-visible { outline-color: #fff; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; background: #fff; color: var(--navy); padding: 10px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip-link:focus { top: 8px; }
.loading, .empty { color: var(--muted); padding: 1.5rem; text-align: center; }
.muted, .sub, .hint { color: var(--muted); }
.sub { display: block; font-size: .85rem; }
.hint { font-size: .84rem; margin-top: .25rem; display: block; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; font-weight: 800; color: var(--muted); margin: 0 0 .25rem; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.link { background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.plain li:last-child { border-bottom: 0; }

/* --- Boutons --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid transparent; border-radius: 10px; padding: .6rem 1rem; font-weight: 700; line-height: 1.2; text-decoration: none; min-height: 40px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--orange); color: var(--navy); }
.btn-primary:hover:not(:disabled) { background: var(--orange-hover); }
.btn-secondary { background: #fff; border-color: #c5cedb; color: var(--ink); }
.btn-secondary:hover:not(:disabled) { background: #eef2f8; }
.btn-ghost { background: transparent; border-color: var(--navy-3); color: #dbe5f2; }
.btn-ghost:hover { background: var(--navy-2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #8f1c12; }
.btn-danger-outline { background: #fff; border-color: var(--red); color: var(--red); }
.btn-danger-outline:hover:not(:disabled) { background: var(--red-bg); }
.btn-sm { padding: .35rem .7rem; font-size: .85rem; min-height: 34px; }
.btn-xl { padding: 1.1rem 1.2rem; font-size: 1.15rem; min-height: 64px; width: 100%; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.head-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* --- Pastilles, avis --- */
.pill { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; line-height: 1.4; white-space: normal; }
.pill-green { background: var(--green-bg); color: var(--green); }
.pill-red { background: var(--red-bg); color: #8f1d1d; }
.pill-orange { background: #ffe9d9; color: #8a3a07; }
.pill-blue { background: #e0ecff; color: #123f9a; }
.pill-gray { background: #e8ecf3; color: #2d3a4d; }
.pill-yellow { background: #fff4cc; color: #6b4a00; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .3rem; }
.notice { border-radius: 10px; padding: .75rem 1rem; margin: .75rem 0; border: 1px solid; }
.notice ul { margin: .3rem 0 0 1.1rem; padding: 0; }
.notice-error { background: var(--red-bg); border-color: #f1b3ad; color: #7a1a12; }
.notice-ok { background: var(--green-bg); border-color: #a5dbb7; color: var(--green); }
.notice-warn { background: #fff4cc; border-color: #e8cf7a; color: #5a3f00; }
.notice-info { background: #e8f0fe; border-color: #b9cdf5; color: #123f9a; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; background: var(--navy); color: #fff; padding: .75rem 1rem; border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.toast-error { background: var(--red); }
.toast-close { background: none; border: 0; color: inherit; font-size: 1.3rem; line-height: 1; padding: 0 4px; }

/* --- Coque : barre latérale + contenu --- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--navy); color: #c9d5e5; padding: 24px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: #fff; font-weight: 800; font-size: 1.1rem; }
.brand small { display: block; color: #9db0c7; font-size: .65rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; }
.brandmark { background: var(--orange); color: var(--navy); border-radius: 12px; width: 40px; height: 40px; display: grid; place-items: center; font-size: 1.3rem; font-weight: 900; flex: none; }
#nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
#nav a { display: flex; align-items: center; gap: 12px; padding: .65rem .8rem; border-radius: 10px; color: #c9d5e5; text-decoration: none; font-weight: 600; }
#nav a:hover { background: var(--navy-2); color: #fff; }
#nav a[aria-current="page"] { background: var(--navy-2); color: #fff; box-shadow: inset 3px 0 0 var(--orange); }
.nav-icon { width: 1.3rem; text-align: center; opacity: .9; }
.badge { margin-left: auto; background: var(--orange); color: var(--navy); border-radius: 999px; padding: 0 .5rem; font-size: .75rem; font-weight: 800; min-width: 1.4rem; text-align: center; }
.sidebottom { margin-top: auto; border-top: 1px solid var(--navy-3); padding: 16px 8px 0; display: grid; gap: 2px; font-size: .85rem; }
.sidebottom strong { color: #fff; }
.sidebottom .sub { color: #9db0c7; overflow-wrap: anywhere; }
.sidebottom .btn { margin-top: 10px; }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: #fff; border-bottom: 3px solid var(--tenant-color); padding: 12px 32px; position: sticky; top: 0; z-index: 20; }
.brandline { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.15rem; min-height: 40px; flex: 1; min-width: 0; }
.brand-x { background: var(--tenant-color); color: var(--tenant-ink); border-radius: 8px; width: 26px; height: 26px; display: grid; place-items: center; font-size: .95rem; }
.brand-logo { max-height: 38px; max-width: 160px; object-fit: contain; display: block; }
.brand-tenant-name { font-weight: 800; }
.tenant-select { display: flex; align-items: center; gap: 8px; }
.tenant-select label { font-size: .8rem; color: var(--muted); font-weight: 700; }
.tenant-select select { max-width: 220px; }
.menu-btn { display: none; background: var(--navy); color: #fff; border: 0; border-radius: 10px; padding: .55rem .9rem; font-weight: 700; }
main#main { padding: 28px 32px 64px; max-width: 1500px; width: 100%; margin: 0 auto; }
main:focus, h1:focus { outline: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.crumb { margin: 0 0 .3rem; font-size: .88rem; }
.plate-h { font-size: .9rem; font-weight: 800; background: #fff; border: 2px solid var(--navy); border-radius: 6px; padding: .05rem .5rem; vertical-align: middle; letter-spacing: .06em; }
.plate { display: block; font-weight: 800; letter-spacing: .04em; }

/* --- Cartes et grilles --- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; }
.card-head h2 { margin: 0; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.two-col > .card { margin: 0; }
.kpi-row, .kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpi-row .kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.kpi-grid .kpi { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fafbfd; }
.kpi h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.kpi-value { font-size: 1.9rem; font-weight: 800; margin: .3rem 0 .1rem; }
.kpi-meta, .kpi-help { font-size: .85rem; color: var(--muted); margin: 0 0 .15rem; }
.kpi-help { font-size: .78rem; margin-top: .4rem; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: minmax(110px, 40%) 1fr 2.5rem; gap: 10px; align-items: center; font-size: .9rem; }
.bar { background: #e8ecf3; height: 10px; border-radius: 5px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: calc(var(--w, 0) * 1%); background: var(--orange); border-radius: 5px; }
.bar-n { text-align: right; font-weight: 700; }
.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-list li { display: flex; gap: 12px; align-items: flex-start; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.alert-list li:last-child { border-bottom: 0; }

/* --- Formulaires --- */
.field { display: grid; gap: 4px; align-content: start; min-width: 0; }
.field label, legend { font-weight: 700; font-size: .85rem; }
.req { color: var(--red); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], input[type=date], input[type=datetime-local], input:not([type]), select, textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid #aab6c6; border-radius: 9px; background: #fff; min-height: 40px; }
textarea { resize: vertical; }
input[type=color] { width: 64px; height: 40px; padding: 2px; border: 1px solid #aab6c6; border-radius: 9px; background: #fff; }
input[type=file] { max-width: 100%; }
input:disabled, select:disabled { background: #eef1f6; }
.field-check { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.field-check input { width: 20px; height: 20px; flex: none; }
.field-check .hint { flex-basis: 100%; }
.field-wide { grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 18px; }
.narrow { max-width: 440px; display: grid; gap: 12px; }
fieldset.choice { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .9rem .9rem; margin: 0 0 12px; display: grid; gap: 8px; min-width: 0; }
fieldset.choice label { font-weight: 500; display: flex; gap: 8px; align-items: center; font-size: .95rem; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 16px; align-items: end; padding: 16px; }
.filters .field-wide { grid-column: span 2; }
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.savebar { position: sticky; bottom: 0; z-index: 5; border-color: #c5cedb; box-shadow: 0 -6px 20px rgba(16, 28, 47, .1); }
.savebar-main { display: grid; gap: 10px; }
.kv { margin: 0; min-width: 0; }
.kv dt { font-weight: 700; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kv dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 18px; margin: .5rem 0; }
.meta dt { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.meta dd { margin: 0; overflow-wrap: anywhere; }
.meta > div { min-width: 0; }

/* --- Tableaux --- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .7rem .9rem; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: #f6f8fb; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
tbody th { font-weight: 600; text-align: left; }
tbody tr:hover { background: #fafbfd; }
tr[data-case] { cursor: pointer; }
.tenant-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; }
.tenant-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--tenant-color); border: 1px solid rgba(0, 0, 0, .25); }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 5px; background: var(--tenant-color); border: 1px solid rgba(0, 0, 0, .3); vertical-align: middle; }
.logo-prev { max-height: 32px; max-width: 120px; object-fit: contain; }
.rules-table input[type=number] { width: 90px; }
.ua { max-width: 340px; overflow-wrap: anywhere; font-size: .85rem; }
.json { display: block; max-height: 4.5em; overflow: auto; font-size: .78rem; background: #f3f5f9; }

/* --- Pagination --- */
.pager { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; padding: 12px 4px 0; }
.pager-info { margin-right: auto; font-weight: 700; }
.pager-page { color: var(--muted); font-size: .85rem; }

/* --- Fiche dossier --- */
.hero { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 24px; }
.hero-big { margin: 0 0 1rem; font-size: 1.1rem; }
.hero-big .pill { font-size: .95rem; padding: .3rem .9rem; }
.hero-next { font-size: 1.05rem; font-weight: 600; margin: 0 0 .3rem; }
.dims { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dim { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fafbfd; }
.jump ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { display: inline-block; padding: .35rem .8rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: .85rem; }
.case-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); gap: 20px; align-items: start; }
.col-side .card:first-child { margin-top: 0; }
.rdv-state { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.files { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.file { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.file-q { border-color: #f1b3ad; background: var(--red-bg); }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; background: #e8ecf3; display: block; }
.thumb-doc { display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: var(--muted); }
.file-main { min-width: 0; overflow-wrap: anywhere; }
.upload { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.upload h3 { margin-bottom: 10px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: grid; gap: 14px; }
.timeline li { position: relative; padding-left: 12px; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.tl-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.timeline p { margin: .2rem 0; }
.changes { margin: .3rem 0; padding-left: 1.1rem; font-size: .88rem; }
.changes .k { color: var(--muted); }

/* --- Planning --- */
.plan-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.plan-nav, .plan-mode { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.plan-title::first-letter { text-transform: uppercase; }
.plan-title { font-size: 1.25rem; margin: 6px 0 12px; }
.slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.slot { display: flex; gap: 12px; border: 1px solid var(--line); border-left: 4px solid #4b83d8; border-radius: 10px; padding: 8px 12px; background: #fff; }
.slot-overlap { border-color: #e0716a; border-left-color: var(--red); background: var(--red-bg); }
.slot-time { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.slot-main { min-width: 0; overflow-wrap: anywhere; }
.slots-compact .slot { flex-direction: column; gap: 2px; padding: 6px 8px; font-size: .85rem; }
table.week { table-layout: fixed; min-width: 1120px; }
table.week th:first-child { width: 120px; }
table.week td { background: #fff; }
table.week td.today { background: #fff8f3; }
.tech-group h3 { margin-bottom: 10px; }
.job { padding: 18px; }
.job h2 { margin: 0; font-size: 1.5rem; }
.job-time { font-weight: 800; font-size: 1.1rem; margin: 0 0 .2rem; }
.job-actions { display: grid; gap: 10px; margin: 14px 0; }
.photos { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 1px solid var(--line); padding-top: 12px; }
.photos .hint { grid-column: 1 / -1; }

/* --- Notifications, e-mails, revues --- */
.notif-list, .cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.notif-list li { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.notif-list li.unread { background: #fff8f3; border-color: #ffc8a6; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); margin-right: 8px; }
.mail-body { white-space: pre-wrap; background: #f6f8fb; padding: 12px; border-radius: 8px; max-height: 320px; overflow: auto; font-size: .88rem; }
details summary { cursor: pointer; font-weight: 700; padding: .3rem 0; }
.reasons { margin: 0 0 .5rem 1.1rem; padding: 0; }
.cards > .card { margin: 0; }
.subnav ul { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.subnav a { display: block; padding: .5rem .9rem; border-radius: 10px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 700; color: var(--ink); }
.subnav a[aria-current="page"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.rules { margin: 0 0 1rem 1.1rem; padding: 0; color: var(--muted); font-size: .9rem; }
.steps { margin: 0 0 1rem 1.2rem; padding: 0; display: grid; gap: 6px; }
.secret { display: grid; gap: 8px; }
.secret-input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; }
.verify { margin-top: 12px; display: grid; gap: 10px; justify-items: start; }

/* --- Dialogues --- */
dialog.dlg { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); color: var(--ink); }
dialog.dlg-wide { width: min(880px, calc(100vw - 24px)); }
dialog.dlg::backdrop { background: rgba(16, 28, 47, .6); }
.dlg-form { padding: 24px; display: grid; gap: 14px; }
.dlg-form h2 { margin: 0; font-size: 1.25rem; }
.dlg-form h2:focus { outline: none; }
.dlg-intro { margin: 0; color: var(--muted); }
.dlg-body { display: grid; gap: 12px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* --- Pages hors session --- */
.auth-page { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-hero { background: linear-gradient(160deg, var(--navy) 0%, #1a2e4d 100%); color: #dbe5f2; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.auth-claim { font-size: 2.3rem; font-weight: 800; line-height: 1.1; color: #fff; margin-bottom: 1rem; }
.auth-claim em { color: var(--orange); font-style: normal; }
.auth-foot { font-size: .85rem; color: #9db0c7; margin: 0; }
.auth-card { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.auth-card:focus { outline: none; }
.auth-form { width: min(440px, 100%); display: grid; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: var(--shadow); }
.auth-form h1 { font-size: 1.6rem; }
.auth-links { margin: 0; text-align: center; }

/* --- Mobile --- */
@media (max-width: 1100px) {
  .case-grid, .hero { grid-template-columns: minmax(0, 1fr); }
  .two-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-flex; gap: 6px; align-items: center; }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: auto; transform: translateX(-102%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
  .sidebar.open { transform: none; visibility: visible; transition: transform .2s ease; box-shadow: 0 0 0 100vmax rgba(16, 28, 47, .55); }
  .topbar { padding: 10px 14px; }
  main#main { padding: 18px 14px 56px; }
  .auth-page { grid-template-columns: minmax(0, 1fr); }
  .auth-hero { padding: 24px; gap: 16px; }
  .auth-claim { font-size: 1.6rem; }
  .auth-form { padding: 22px; }
}
@media (max-width: 760px) {
  .brandline { flex-basis: 100%; order: 3; font-size: 1rem; }
  .tenant-select { flex: 1; }
  .tenant-select select { max-width: none; width: 100%; }
  .tenant-select label { display: none; }
  h1 { font-size: 1.4rem; }
  .dims { grid-template-columns: minmax(0, 1fr); }
  .filters .field-wide { grid-column: auto; }
  .table-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards th, .table-cards td { display: block; width: 100%; }
  .table-cards tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; background: #fff; }
  .table-cards th, .table-cards td { border: 0; padding: .3rem 0; }
  .table-cards td[data-label]::before, .table-cards th[data-label]::before { content: attr(data-label); display: block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
  .pager { justify-content: space-between; }
  .toasts { left: 16px; right: 16px; max-width: none; }
  .bars li { grid-template-columns: minmax(90px, 40%) 1fr 2rem; }
  .slot { flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .sidebar, .topbar, .toasts, .btn { display: none !important; } .shell { display: block; } }
main#main > h1 { margin-bottom: 18px; }

/* Logo Digitalcar officiel (image) */
.brand-img { flex-direction: column; align-items: flex-start; gap: 6px; }
.brand-img img { width: 168px; height: auto; display: block; }
.auth-hero .brand-img img { width: 240px; }
.brand-dc-logo { height: 26px; width: auto; display: block; flex: none; }
@media (max-width: 640px) { .brand-img img { width: 132px; } .brand-dc-logo { height: 20px; } }
