/* Portail AF Motors — couleurs et formes reprises de la maquette validée du 30/11 */
@font-face { font-family: 'Inter'; src: url('fonts/inter-latin.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('fonts/space-grotesk-latin.woff2') format('woff2'); font-weight: 500 700; font-display: swap; }

:root {
  --ink: #15181D; --ink-2: #22262D; --accent: #F2B705; --bg: #F3F4F6; --card: #fff;
  --line: #E5E7EB; --line-2: #D1D5DB; --muted: #4B5563; --soft: #6B7280;
  --red: #991B1B; --red-bg: #FEE2E2; --blue: #1E40AF; --blue-bg: #DBEAFE; --green: #166534; --green-bg: #DCFCE7;
  --amber: #92400E; --amber-bg: #FEF3C7; --grey: #374151; --grey-bg: #E5E7EB;
  --title: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45; }
h1, h2 { margin: 0; }
h1 { font-family: var(--title); font-size: 32px; line-height: 1.15; }
h2 { font-size: 18px; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: default; }
:focus-visible { outline: 3px solid #2563EB; outline-offset: 2px; }
.muted { color: var(--muted); font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.ic { flex: none; vertical-align: -3px; }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.accent { background: var(--accent); color: var(--ink); }
.btn.ghost { background: #fff; border-color: var(--line-2); }
.btn.ghost-dark { background: transparent; border-color: #4B5563; color: #E5E7EB; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn.big { min-height: 56px; font-size: 17px; font-weight: 700; border-radius: 10px; width: 100%; }
.link { background: none; border: 0; padding: 6px 0; color: var(--amber); font-weight: 600; font-size: 13px; text-decoration: underline; min-height: 32px; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.grey { background: var(--grey-bg); color: var(--grey); } .badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.green { background: var(--green-bg); color: var(--green); } .badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red { background: var(--red-bg); color: var(--red); }
.notice { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.notice.warn { background: var(--amber-bg); color: #78350F; }

/* ---------- bandeau de test, messages ---------- */
.test-banner { background: var(--accent); color: var(--ink); text-align: center; font-size: 13px; font-weight: 600; padding: 6px 12px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(92vw, 520px); background: var(--ink); color: #fff; padding: 14px 18px; border-radius: 10px; font-weight: 600; font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 50; }
#toast.show { opacity: 1; }
#toast.error { background: var(--red); }

/* ---------- connexion ---------- */
.login { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; }
.login-card { width: 100%; max-width: 420px; background: var(--card); border-radius: 12px; padding: 28px 24px; display: flex; flex-direction: column; gap: 18px; }
.login-card h1 { font-size: 26px; }
.logo { display: block; width: 140px; height: auto; filter: invert(1); }       /* logo noir → blanc sur fond sombre */
.logo.dark { filter: none; width: 150px; }
form#login { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
input, select, textarea { min-height: 52px; border-radius: 10px; border: 1px solid var(--line-2); padding: 0 14px; font-size: 16px; background: #fff; width: 100%; }
.demo { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--muted); }
.demo-roles { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- cadre bureau (gérant, magasinier) ---------- */
.desk { display: flex; min-height: 100vh; }
.side { flex: none; width: 250px; background: var(--ink); color: #fff; padding: 24px 16px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-logo { padding: 0 8px 20px; }
.side-links { display: flex; flex-direction: column; gap: 6px; }
.side a { color: #E5E7EB; padding: 12px; border-radius: 8px; font-size: 15px; text-decoration: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.side a:hover { background: var(--ink-2); }
.side a.on { color: var(--ink); background: var(--accent); font-weight: 600; }
.tag { font-size: 11px; color: #9CA3AF; font-weight: 500; white-space: nowrap; }
.side a.on .tag { color: var(--ink); }
.side-user { margin-top: auto; padding: 12px; border-radius: 8px; background: var(--ink-2); font-size: 13px; color: #D1D5DB; display: flex; flex-direction: column; gap: 10px; }
.side-user b { color: #fff; }
.content { flex: 1; min-width: 0; padding: 32px; max-width: 1180px; }
.screen { display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.page-head.narrow { margin-bottom: 24px; }
.kicker { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.kicker a { text-decoration: none; font-weight: 600; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.tile { background: var(--card); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.tile b { font-family: var(--title); font-size: 32px; line-height: 1.1; color: var(--ink); }
.tile.hot { box-shadow: inset 0 0 0 2px var(--accent); }
.hot-text { color: var(--amber); font-weight: 600; }
.card { background: var(--card); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.more { font-size: 14px; font-weight: 600; color: var(--amber); }
.line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bg); font-size: 14px; }
.foot { font-size: 12px; color: var(--muted); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; font-weight: 600; font-size: 13px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pickbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--amber-bg); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
td, th { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
td.num { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.act { white-space: nowrap; text-align: right; }
td.act .link { display: block; margin-left: auto; }
tr.row-urgent, tr.row-before { background: #FFFBEB; }
a.link-tile { text-decoration: none; color: var(--muted); }
a.link-tile:hover { box-shadow: inset 0 0 0 2px var(--line-2); }
.late { color: var(--red); font-weight: 600; font-size: 13px; }
.pick { flex-direction: row; align-items: center; justify-content: flex-end; gap: 8px; font-size: 13px; min-height: 36px; cursor: pointer; }
.pick input { width: 22px; height: 22px; min-height: 0; padding: 0; accent-color: var(--ink); }
.overlay { position: fixed; inset: 0; background: rgba(21,24,29,.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 40; }
.dialog { background: #fff; border-radius: 12px; padding: 24px; width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 16px; max-height: 90vh; overflow-y: auto; }
.dlg-list { margin: 0; padding-left: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
[hidden] { display: none !important; }

/* ---------- cadre téléphone (mécanicien, carrossier, peintre) ---------- */
.phone { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.phone-head { background: var(--ink); color: #fff; padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 6px; }
.phone-head .logo { width: 96px; }
.phone-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.phone-head h1 { font-size: 26px; }
.phone-head p { color: #D1D5DB; font-size: 14px; }
.phone-body { padding: 16px; flex: 1; }

/* ---------- demande de pièce ---------- */
.screen-demande { max-width: 520px; }
.ask { display: flex; flex-direction: column; gap: 20px; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: 16px; }
legend label { font-size: 16px; }
.choice { min-height: 56px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; font-weight: 600; font-size: 16px; text-align: left; padding: 8px 14px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.choice small { font-weight: 500; font-size: 13px; color: var(--muted); }
.choice.on { border: 2px solid var(--ink); background: var(--amber-bg); padding: 7px 13px; }
.two { display: flex; gap: 8px; }
.pill { flex: 1; min-height: 56px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; font-weight: 600; font-size: 16px; }
.pill.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill.urgent.on { background: var(--red); border-color: var(--red); }
.send { display: flex; flex-direction: column; gap: 8px; }
.send small { font-size: 12px; color: var(--muted); text-align: center; }
.seg { display: flex; gap: 8px; }
.seg .pill { padding: 6px 8px; line-height: 1.2; }
.fields { display: flex; flex-direction: column; gap: 12px; background: #fff; border-radius: 10px; padding: 14px; }
.req::after { content: ' *'; color: var(--red); }
.lab { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input.plate { text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
textarea { padding: 12px 14px; min-height: 84px; resize: vertical; line-height: 1.4; }
.pline { background: #fff; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.pline-head { display: flex; justify-content: space-between; align-items: center; min-height: 32px; }
.pline-row { display: flex; gap: 12px; align-items: flex-end; }
.pline-row label { flex: 1; min-width: 0; }
.pline .pill { min-height: 48px; font-size: 14px; background: var(--bg); }
.pline .pill.on { background: var(--ink); }
.stepper { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; height: 52px; }
.stepper button { width: 48px; height: 100%; border: 0; background: var(--bg); font-size: 24px; font-weight: 600; }
.stepper output { width: 40px; text-align: center; font-weight: 700; font-size: 18px; }
.btn.add { min-height: 52px; border-style: dashed; font-size: 15px; }
.notice.bad { background: var(--red-bg); color: var(--red); font-weight: 600; }
.qty { font-weight: 600; color: var(--muted); }
.mine { margin-top: 28px; display: flex; flex-direction: column; gap: 4px; }
.mine h2 { margin-bottom: 6px; }
.mine-card { background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; font-size: 15px; }
.mine-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; }
.mine-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--bg); }
.mine-end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }

/* ---------- petit écran : le menu passe en haut ---------- */
@media (max-width: 860px) {
  .desk { flex-direction: column; }
  .side { width: auto; height: auto; position: static; padding: 12px; gap: 10px; }
  .side-logo { padding: 0 4px; } .side-logo .logo { width: 84px; }
  .side-links { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .side a { white-space: nowrap; padding: 10px 12px; }
  .side-user { margin-top: 0; flex-direction: row; justify-content: space-between; align-items: center; }
  .content { padding: 20px 16px; }
  h1 { font-size: 26px; }
}

/* fiche véhicule */
.veh-id { flex-direction: row; flex-wrap: wrap; gap: 24px; align-items: center; }
.veh-main { flex: 1 1 280px; } .veh-client { flex: 1 1 240px; font-size: 14px; line-height: 1.6; }
.veh-plate { font-family: var(--title); font-size: 30px; font-weight: 700; } .veh-model { font-size: 16px; color: var(--muted); }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.col { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; } .col.wide { flex: 2 1 520px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv > span:first-child { color: var(--muted); } .kv > span:last-child { font-weight: 600; text-align: right; }
.gauge { display: flex; flex-direction: column; gap: 4px; font-size: 13px; } .gauge > div:first-child { display: flex; justify-content: space-between; }
.gauge-bar { height: 8px; background: var(--line); border-radius: 99px; } .gauge-bar i { display: block; height: 8px; border-radius: 99px; }
.gauge-bar i.ok { background: var(--green); } .gauge-bar i.bad { background: var(--red); }
a.plate-link { color: inherit; font-weight: 600; text-decoration: underline; }

/* recherche d'un véhicule */
.side-search { display: flex; gap: 6px; margin: 0 0 10px; }
.side-search input { min-height: 44px; background: var(--ink-2); border-color: #374151; color: #fff; font-size: 14px; padding: 0 12px; }
.side-search input::placeholder { color: #9CA3AF; }
.side-search button { flex: none; width: 44px; min-height: 44px; border-radius: 10px; border: 0; background: var(--accent); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.search-big { display: flex; gap: 10px; flex-wrap: wrap; } .search-big input { flex: 1 1 260px; width: auto; text-transform: uppercase; }
.search-big input::placeholder { text-transform: none; }
.results { display: flex; flex-direction: column; }
a.result { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 8px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 15px; border-radius: 8px; }
a.result:hover { background: var(--bg); } .result-plate { font-family: var(--title); font-size: 17px; margin-right: 6px; }

/* planning RDV */
.switch { display: flex; border: 1px solid var(--ink); border-radius: 8px; overflow: hidden; }
.switch a { min-height: 44px; padding: 0 18px; display: flex; align-items: center; font-weight: 600; font-size: 14px; text-decoration: none; background: #fff; color: var(--ink); }
.switch a.on { background: var(--ink); color: #fff; }
a.btn { text-decoration: none; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--grey); align-items: center; }
.legend span { display: flex; gap: 6px; align-items: center; }
.dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; } .dot.mec { background: var(--ink); } .dot.car { background: #9D174D; } .dot.web { background: #fff; border: 2px dashed var(--blue); }
.week { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.day { flex: 1 1 190px; min-width: 0; background: #F9FAFB; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.day.today { background: var(--amber-bg); }
a.day-name { font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; } a.day-name:hover { text-decoration: underline; }
.load { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.gauge-bar.thin { height: 6px; margin-top: 3px; } .gauge-bar.thin i { height: 6px; }
.rdv { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.rdv.car { border-left-color: #9D174D; } .rdv.web { border-style: dashed; border-color: var(--blue); border-left-style: solid; }
.rdv-top { display: flex; justify-content: space-between; gap: 6px; } .rdv-top span { font-size: 11px; color: var(--muted); }
.rdv-flag { font-size: 11px; font-weight: 700; } .rdv-flag.wait { color: var(--amber); } .rdv-flag.web { color: var(--blue); }
.pending { border: 1px dashed var(--blue); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.pending-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.pending-load { font-size: 12px; font-weight: 700; text-align: right; white-space: nowrap; } .pending-load.fine { color: var(--green); }
.pending-actions { display: flex; gap: 8px; flex-wrap: wrap; } .pending-actions .btn { flex: 1 1 120px; }
.grid-day { display: grid; grid-template-columns: 48px repeat(4, minmax(140px, 1fr)); grid-template-rows: auto repeat(20, 28px); column-gap: 8px; min-width: 680px; }
.g-head { font-weight: 700; font-size: 14px; padding-bottom: 6px; }
.g-hour { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 2px; } .g-line { border-top: 1px solid var(--bg); }
.g-lunch { background: repeating-linear-gradient(45deg, var(--bg), var(--bg) 6px, #fff 6px, #fff 12px); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
.g-rdv { background: #F9FAFB; border-left: 4px solid var(--ink); border-radius: 6px; padding: 4px 8px; font-size: 12px; line-height: 1.3; overflow: hidden; z-index: 1; }
.g-rdv.car { background: #FDF2F8; border-left-color: #9D174D; } .g-rdv.wait { background: var(--amber-bg); border-left-color: #D97706; }
.g-rdv.web { background: var(--blue-bg); border-left-color: var(--blue); outline: 1px dashed var(--blue); }

/* carrosserie : planning à la semaine */
.bp-grid { display: grid; grid-template-columns: 110px repeat(5, minmax(120px, 1fr)); gap: 6px; min-width: 760px; }
.bp-day { font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 2px; } .bp-day.today { color: var(--amber); }
.bp-who { padding: 6px 4px; line-height: 1.3; font-size: 13px; } .bp-who span { font-size: 11px; color: var(--muted); }
.bp-empty { border: 1px dashed var(--line-2); border-radius: 8px; min-height: 52px; background: #fff; color: var(--soft); font-size: 18px; cursor: pointer; }
.bp-empty:hover { background: var(--bg); border-color: var(--soft); }
.bp-block { border: 0; border-radius: 8px; padding: 6px 8px; font-size: 12px; line-height: 1.35; min-width: 0; min-height: 52px; text-align: left; cursor: pointer; }
.bp-block:hover { box-shadow: inset 0 0 0 2px rgba(0,0,0,.15); }
.bp-block.done { background: var(--green-bg, #DCFCE7) !important; color: var(--green, #166534); } .bp-done { font-size: 11px; opacity: .85; }
.st-demontage { background: #E5E7EB; color: #374151; } .st-tolerie { background: #FEF3C7; color: #92400E; } .st-preparation { background: #DBEAFE; color: #1E40AF; }
.st-peinture { background: #FCE7F3; color: #9D174D; } .st-remontage { background: #DCFCE7; color: #166534; }
form.dialog label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
form.dialog label.pick { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; }
form.dialog label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; font-size: 14px; } form.dialog label.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }

/* accueil : ma liste du jour */
.myday { box-shadow: inset 0 0 0 2px var(--accent); }
.md-line { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--bg); font-size: 14px; } .md-line:last-child { border-bottom: 0; }
.md-line.off { opacity: .6; } .md-txt { flex: 1; min-width: 0; line-height: 1.4; } .md-txt .muted { font-size: 13px; } .md-empty { margin: 12px 0 4px; font-size: 14px; }
.md-n { min-width: 36px; height: 36px; border-radius: 10px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.md-n.blue { background: #1E40AF; } .md-n.red { background: #991B1B; } .md-n.pink { background: #9D174D; } .md-n.green { background: #166534; } .md-n.amber { background: #92400E; } .md-n.grey { background: #6B7280; }

/* relances, véhicules de remplacement, pilotage */
.rc-result { min-height: 36px; border-radius: 8px; border: 1px solid var(--line-2); font: inherit; font-size: 13px; padding: 0 8px; background: #fff; }
.pl-bars { display: flex; gap: 6px; align-items: flex-end; padding-top: 8px; }
.pl-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.pl-col .pl-val { min-height: 16px; font-weight: 600; color: var(--ink); }
.pl-bar { width: 60%; max-width: 36px; min-height: 2px; background: var(--ink); border-radius: 4px 4px 0 0; } .pl-bar.now { background: var(--accent); }
.screen-relances table { min-width: 0; } .screen-relances td.act .head-actions { flex-wrap: wrap; justify-content: flex-start; } .screen-relances td.act { width: 150px; }

/* écran TV de la salle d'attente : dessiné en 1920 × 1080 puis mis à l'échelle de la télévision */
.tv-root { position: fixed; inset: 0; background: #0F1115; overflow: hidden; z-index: 50; }
.tv-frame { width: 1920px; height: 1080px; transform-origin: top left; box-sizing: border-box; color: #fff; display: flex; flex-direction: column; padding: 48px 64px; gap: 32px; position: relative; }
.tv-head { display: flex; justify-content: space-between; align-items: center; } .tv-brand { display: flex; align-items: center; gap: 32px; }
.tv-logo { width: 240px; height: auto; filter: brightness(0) invert(1); } .tv-welcome { font: 700 44px var(--title); } .tv-sub { font-size: 24px; color: #9CA3AF; margin-top: 4px; }
.tv-clock { text-align: right; } .tv-time { font: 700 72px/1 var(--title); }
.tv-main { flex: 1; display: flex; gap: 40px; min-height: 0; }
.tv-board { flex: 1; background: #16191F; border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; }
.tv-row { display: grid; grid-template-columns: 260px 1fr 380px 200px; align-items: center; gap: 24px; padding: 18px 28px; border-bottom: 1px solid #2A2F37; }
.tv-cols { background: #1E222A; font-size: 20px; font-weight: 700; color: #9CA3AF; text-transform: uppercase; letter-spacing: 2px; border: 0; padding: 20px 28px; } .tv-cols .c { text-align: center; } .tv-cols .r { text-align: right; }
.tv-plate { font: 700 38px var(--title); letter-spacing: 2px; } .tv-veh { font-size: 30px; } .tv-wait { font-size: 20px; color: #F2B705; font-weight: 600; margin-left: 12px; }
.tv-state { font-size: 26px; font-weight: 700; padding: 10px 20px; border-radius: 12px; text-align: center; } .tv-eta { font-size: 28px; color: #D1D5DB; text-align: right; }
.tv-note { margin-top: auto; padding: 16px 28px; font-size: 20px; color: #6B7280; } .tv-empty { padding: 60px 28px; font-size: 30px; color: #9CA3AF; text-align: center; }
.tv-side { width: 460px; display: flex; flex-direction: column; gap: 24px; }
.tv-ad { border-radius: 24px; padding: 32px; min-height: 330px; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; }
.tv-ad-tag { font-size: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; opacity: .85; } .tv-ad-title { font: 700 38px/1.15 var(--title); } .tv-ad-text { font-size: 22px; line-height: 1.4; }
.tv-dots { margin-top: auto; display: flex; gap: 10px; } .tv-dots span { width: 12px; height: 12px; border-radius: 99px; background: currentColor; opacity: .35; } .tv-dots span.on { width: 36px; opacity: 1; }
.tv-info { background: #16191F; border-radius: 24px; padding: 32px; flex: 1; display: flex; flex-direction: column; gap: 16px; font-size: 28px; }
.tv-info-title { font-size: 22px; font-weight: 700; color: #9CA3AF; text-transform: uppercase; letter-spacing: 2px; }
.tv-full { position: absolute; inset: 0; display: flex; background: #0F1115; } .tv-full-text { flex: 1; padding: 80px; display: flex; flex-direction: column; gap: 28px; }
.tv-full-tag { margin-top: auto; font-size: 26px; font-weight: 700; color: #F2B705; text-transform: uppercase; letter-spacing: 3px; } .tv-full-title { font: 700 96px/1.05 var(--title); }
.tv-full-body { font-size: 36px; color: #D1D5DB; line-height: 1.4; max-width: 900px; } .tv-full-foot { display: flex; align-items: center; gap: 24px; margin-top: 20px; font-size: 28px; color: #9CA3AF; }
.tv-price { background: #F2B705; color: #15181D; font-size: 44px; font-weight: 700; padding: 16px 32px; border-radius: 16px; }
.tv-full-photo { width: 820px; background: #1E222A; display: flex; align-items: center; justify-content: center; color: #6B7280; font-size: 30px; text-align: center; padding: 40px; box-sizing: border-box; } .tv-full-photo img { max-width: 100%; max-height: 100%; }
.tv-exit { position: absolute; left: 64px; bottom: 10px; font-size: 18px; color: #4B5563; text-decoration: underline; } .tv-exit:hover { color: #fff; }
.tv-logo.big { width: 520px; opacity: .9; } .tv-edit { margin-bottom: 12px; background: var(--bg); }
.tv-root { display: grid; place-items: center; } .tv-frame { transform-origin: center; flex: none; }
button.tv-exit { background: none; border: 0; cursor: pointer; font-family: inherit; }

/* pièces différées Renault */
.subtabs { margin: 0 0 16px; } .subtabs a.chip { display: inline-flex; align-items: center; text-decoration: none; color: inherit; } .subtabs a.chip.on { color: #fff; }
.bo-line { align-items: flex-start; } .bo-act { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.bo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; } .bo-hint { margin: -4px 0 0; font-size: 12px; }
@media (max-width: 640px) { .bo-line { flex-wrap: wrap; } .bo-act { width: 100%; justify-content: flex-start; } }
.link.danger { color: var(--red); }

/* pilotage repris de la feuille */
table.num td:not(:first-child), table.num th:not(:first-child) { text-align: right; white-space: nowrap; }
.up { color: #15803D; font-weight: 600; } .down { color: #B91C1C; font-weight: 600; }
tr.muted-row td { color: var(--muted); }
.pl-more { margin-top: 10px; } .pl-more summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 0; }
/* planning RDV : vue Mois, RDV pris dans le portail */
.rdv-flag.todo { color: #9D174D; }
.month { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.m-head { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 2px; }
a.m-day { min-height: 84px; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; font-size: 13px; }
a.m-day:hover { border-color: var(--ink); } a.m-day.out { background: #F9FAFB; opacity: .7; } a.m-day.today { border: 2px solid var(--amber); padding: 7px; }
.m-num { font-size: 12px; color: var(--muted); font-weight: 600; }
.m-bar { height: 5px; background: #E5E7EB; border-radius: 3px; overflow: hidden; } .m-bar i { display: block; height: 100%; background: var(--green); } .m-bar i.bad { background: #DC2626; }
.m-todo { font-size: 11px; font-weight: 700; color: #9D174D; }
.bo-grid.two { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
@media (max-width: 640px) { .month { gap: 4px; } a.m-day { min-height: 64px; padding: 5px; font-size: 12px; } }

/* écran TV : photos des publicités */
.tv-photo-pick { display: flex; gap: 12px; align-items: center; grid-column: 1 / -1; font-size: 13px; }
.tv-thumb { width: 96px; height: 72px; border-radius: 8px; background: #F3F4F6; display: flex; align-items: center; justify-content: center; color: #9CA3AF; overflow: hidden; flex: none; }
.tv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-btn { position: relative; overflow: hidden; display: inline-flex; } .file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tv-ad-photo { width: calc(100% + 64px); margin: -32px -32px 8px; height: 220px; object-fit: cover; border-radius: 24px 24px 0 0; }
.tv-full-photo.has { padding: 0; } .tv-full-photo.has img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.tv-frame { position: absolute; left: 50%; top: 50%; }   /* centré quelle que soit la taille de la télévision */

/* ---------- véhicules de remplacement : planning de la semaine (06/12/2026) ---------- */
.sync-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); background: #fff; border-radius: 10px; padding: 10px 14px; }
.dot-ok, .dot-off { width: 10px; height: 10px; border-radius: 50%; background: #16A34A; display: inline-block; flex: none; }
.dot-off { background: #9CA3AF; }
.lw { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.lw-row { display: grid; grid-template-columns: 150px 1fr; border-top: 1px solid var(--line); min-height: 58px; }
.lw-row:first-child { border-top: 0; }
.lw-head { display: grid; grid-template-columns: 150px repeat(7, 1fr); min-height: 0; background: #F9FAFB; }
.lw-head div { padding: 8px 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; border-left: 1px solid var(--line); }
.lw-head div:first-child { text-align: left; border-left: 0; padding-left: 10px; }
.lw-head .today { background: var(--amber-bg); color: var(--amber); }
.lw-car { padding: 8px 10px; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; justify-content: center; }
.lw-car b { color: var(--ink); font-size: 13px; }
.lw-track { position: relative; }
.lw-day { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.lw-day.we { background: #F9FAFB; } .lw-day.today { background: #FFFBEB; }
.lw-bar { position: absolute; top: 8px; height: 42px; border-radius: 7px; border: 1px solid; padding: 3px 7px; text-align: left; overflow: hidden; display: flex; flex-direction: column; justify-content: center; font-size: 11px; line-height: 1.25; min-width: 0; }
.lw-bar b, .lw-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lw-bar b { font-size: 12px; }
.lw-out, .lw-legend .lw-out { background: var(--amber-bg, #FEF3C7); border-color: #FCD34D; }
.badge.pink { background: #FDE2E4; color: #9D174D; }
.lw-plan, .lw-legend .lw-plan { background: var(--blue-bg); border-color: #93C5FD; }
.lw-back, .lw-legend .lw-back { background: var(--green-bg); border-color: #86EFAC; }
.lw-late, .lw-legend .lw-late { background: var(--red-bg); border-color: #FCA5A5; }
.lw-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.lw-legend i { display: inline-block; width: 16px; height: 10px; border-radius: 3px; border: 1px solid; margin-right: 6px; vertical-align: -1px; }
fieldset.choices { flex-direction: row; flex-wrap: wrap; gap: 8px; align-items: center; }
fieldset.choices legend { font-weight: 600; font-size: 14px; margin-bottom: 4px; width: 100%; }
fieldset.choices label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; }
@media (max-width: 700px) { .lw-row, .lw-head { grid-template-columns: 92px 1fr; } .lw-head { grid-template-columns: 92px repeat(7, 1fr); } .lw-bar span { display: none; } }

/* carrosserie : relevé des portails d'experts */
.sync-line > span { display: inline-flex; align-items: center; gap: 5px; margin-right: 6px; }
.notice.ex-news { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; line-height: 1.6; }
.notice.ex-news .btn { flex: none; }

/* véhicules présents : partis aujourd'hui */
.left-today { margin-top: 14px; border-top: 1px solid var(--line, #E5E7EB); padding-top: 10px; }
.left-today h3 { font-size: 15px; margin: 0 0 6px; }

/* ---------- Réception véhicules (maquette validée le 05/12/2026) ---------- */
.screen-reception { gap: 0; }
.rc-solo { max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.rc-split { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 20px; align-items: start; }
.rc-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; padding-right: 4px; }
.rc-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; max-width: 820px; }
.rc-list { display: flex; flex-direction: column; gap: 12px; }
.rc-items { display: flex; flex-direction: column; gap: 8px; }
.rc-tabs { display: flex; gap: 4px; background: var(--grey-bg); padding: 4px; border-radius: 10px; }
.rc-tabs button { flex: 1; min-height: 40px; border: 0; border-radius: 8px; background: transparent; font-weight: 600; font-size: 14px; }
.rc-tabs button.on { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.rc-tabs small { color: var(--soft); font-weight: 500; }
.rc-search { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; }
.rc-day { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 10px; padding: 0 2px; }
.rc-day b { font-family: var(--title); font-size: 16px; } .rc-day small { color: var(--soft); font-size: 12px; text-align: right; }
.rc-card { display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: 12px; border: 2px solid transparent; }
.rc-card.on { border-color: var(--accent); }
.rc-card > .btn { margin: 0 12px 12px; align-self: flex-start; }
.rc-open { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; background: none; border: 0; padding: 12px 14px; font-size: 14px; }
.rc-r { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-t { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rc-plate { display: inline-block; font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 13px; padding: 2px 6px; border: 1.5px solid var(--ink); border-radius: 4px; background: #fff; letter-spacing: .5px; }
.rc-wait { align-self: flex-start; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; letter-spacing: .4px; }
.rc-prop { font-size: 12px; color: var(--amber); font-weight: 600; }
.small { font-size: 12px; }
.rc-fold { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.rc-fold-btn { text-align: left; background: #fff; border: 1px dashed var(--line-2); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--muted); }
.rc-fold-btn b { color: var(--ink); }
.rc-bottom { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rc-veh { background: var(--ink); color: #fff; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.rc-veh .rc-plate { color: var(--ink); }
.rc-veh .muted { color: #D1D5DB; }
.rc-client { font-family: var(--title); font-size: 20px; }
.rc-badges { display: flex; flex-wrap: wrap; gap: 6px; } .rc-badges:empty { display: none; }
.rc-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.rc-veh .btn.ghost { background: transparent; color: #fff; border-color: #4B5563; }
.rc-propbox { background: var(--amber-bg); color: #78350F; border-radius: 10px; padding: 10px 12px; margin-top: 6px; font-size: 14px; }
.rc-propbox ul { margin: 6px 0 0; padding-left: 20px; } .rc-propbox li.late { color: var(--red); font-weight: 600; }
.rc-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.rc-steps button { min-height: 48px; border: 1px solid var(--line-2); background: #fff; border-radius: 8px; font-weight: 600; font-size: 13px; padding: 0 4px; }
.rc-steps button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.rc-steps button.done { background: var(--green-bg); color: var(--green); border-color: #BBF7D0; }
.rc-steps .sm { display: none; }
.rc-stage { display: flex; flex-direction: column; gap: 12px; }
.rc-box h3 { margin: 0; font-size: 17px; } .rc-h4 { margin: 8px 0 0; font-size: 15px; }
.rc-box label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.rc-box input:not([type=checkbox]):not([type=file]), .rc-box select, .rc-box textarea, .rc-solo form input:not([type=checkbox]) { min-height: 46px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font-size: 16px; color: var(--ink); font-weight: 400; }
.rc-box textarea { min-height: 0; resize: vertical; }
.rc-box input[readonly] { background: var(--bg); }
.rc-box small { font-weight: 400; color: var(--soft); }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.rc-check { flex-direction: row !important; align-items: center; gap: 10px !important; min-height: 44px; color: var(--ink) !important; font-size: 15px !important; }
.rc-check input { width: 22px; height: 22px; }
.rc-memory { background: var(--blue-bg); color: var(--blue); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.rc-ct { font-size: 13px; font-weight: 700; } .rc-ct.late { color: var(--red); } .rc-ct.soon { color: var(--amber); }
.rc-tyre { border: 1px solid var(--line); border-left: 6px solid var(--line-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.rc-tyre.ok { border-left-color: #16A34A; } .rc-tyre.watch { border-left-color: #D97706; } .rc-tyre.bad { border-left-color: #DC2626; }
.rc-tyre.bad .rc-verdict { color: var(--red); font-weight: 700; } .rc-tyre.watch .rc-verdict { color: var(--amber); font-weight: 700; } .rc-tyre.ok .rc-verdict { color: var(--green); }
.rc-step { display: inline-flex; align-items: center; gap: 6px; }
.rc-step button { width: 52px; height: 52px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; font-size: 26px; font-weight: 700; line-height: 1; }
.rc-step button.clr { width: 40px; height: 40px; font-size: 16px; color: var(--soft); }
.rc-step output { min-width: 108px; text-align: center; font-family: var(--title); font-size: 20px; font-weight: 700; }
.rc-alert { color: var(--red); font-weight: 700; font-size: 13px; }
.rc-tyre details summary { cursor: pointer; font-size: 13px; color: var(--muted); min-height: 32px; display: flex; align-items: center; }
.rc-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-seg button { min-height: 46px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font-weight: 600; font-size: 14px; flex: 1 1 auto; }
.rc-seg button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.rc-item { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.rc-req { color: var(--red); }
#rc-car { width: 100%; max-width: 520px; align-self: center; background: #FAFAFA; border: 1px solid var(--line); border-radius: 10px; touch-action: none; }
.rc-damages { display: flex; flex-direction: column; gap: 8px; }
.rc-dmg { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; align-items: center; }
.rc-dmg b { grid-column: 1 / -1; font-size: 13px; }
.rc-photo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .rc-photo input[name=caption] { flex: 1 1 200px; }
.rc-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.rc-photos figure { margin: 0; font-size: 12px; color: var(--muted); } .rc-photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; }
.rc-foot { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.rc-saved { font-size: 13px; color: var(--soft); min-height: 20px; text-align: center; }
.rc-saved.ok { color: var(--green); } .rc-saved.warn { color: var(--amber); font-weight: 600; }
.rc-conflict { flex-direction: column; }
.rc-done { background: var(--green-bg); color: var(--green); font-weight: 700; border-radius: 10px; padding: 12px 14px; display: flex; gap: 8px; align-items: center; }
.rc-tiles .tile b { font-size: 22px; } .rc-tiles .bad { color: var(--red); } .rc-tiles .warn { color: var(--amber); }
.rc-sum .kv > span:last-child { max-width: 70%; }
.rc-row { display: flex; gap: 8px; flex-wrap: wrap; } .rc-row input { flex: 1 1 200px; }
.rc-matches { display: flex; flex-direction: column; gap: 6px; }
.rc-match { display: flex; flex-direction: column; text-align: left; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; }
.rc-match.on { border: 2px solid var(--accent); }
.rc-match small { color: var(--soft); }
@media (max-width: 640px) {
  .rc-steps .lg { display: none; } .rc-steps .sm { display: inline; } .rc-steps button { font-size: 12px; }
  .rc-dmg { grid-template-columns: 1fr; }
  .rc-foot { grid-template-columns: 1fr 1.6fr; }
  .rc-sum .kv { flex-direction: column; gap: 2px; } .rc-sum .kv > span:last-child { max-width: none; text-align: left; }
}
