/* OPTIMA PDR Estimate V0.1 — système de design (thème sombre bleu/noir des maquettes validées) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/inter-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/inter-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/inter-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/inter-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/inter-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --bg: #0a1018; --bg-2: #0d141e; --panel: #111823; --panel-2: #151d29; --card: #131a25; --card-2: #19212e; --raise: #1d2634;
  --line: rgba(255,255,255,.075); --line-2: rgba(255,255,255,.14); --line-3: rgba(255,255,255,.22);
  --text: #f3f6fb; --mute: #a0abbc; --mute-2: #7a8699;
  --blue: #1d78e0; --blue-2: #3a8ef5; --blue-3: #5aa5ff; --active: #1b5fa8; --active-2: #17487f; --navy: #12335c;
  --green: #7cc12b; --green-2: #5d9f1a; --ok: #12a94a; --danger: #ef4a4a; --warn: #f2a516; --info: #4aa3ff;
  --radius: 12px; --radius-lg: 16px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --topbar-h: 82px; --sidebar-w: 250px; --tab-h: 74px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: radial-gradient(1200px 700px at 70% -10%, #101a2a 0%, var(--bg) 60%); color: var(--text); font: 400 15px/1.4 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
#app { min-height: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue-3); text-decoration: none; }
svg.ic { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mute { color: var(--mute); } .mute-2 { color: var(--mute-2); }
.nowrap { white-space: nowrap; } .grow { flex: 1; min-width: 0; } .right { text-align: right; } .center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; } .col { display: flex; flex-direction: column; gap: 10px; }
.wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .end { justify-content: flex-end; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--blue-3); outline-offset: 2px; border-radius: 8px; }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 0 18px; border-radius: 11px; font-weight: 600; font-size: 15px; background: linear-gradient(180deg, #1c2431, #171e29); border: 1px solid var(--line-2); color: var(--text); transition: .15s; white-space: nowrap; }
.btn:hover { border-color: var(--line-3); background: linear-gradient(180deg, #212b3a, #1a2230); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #2a86ee, #1b6fd2); border-color: #3b92f2; box-shadow: 0 4px 16px rgba(29,120,224,.28); }
.btn.primary:hover { background: linear-gradient(180deg, #3590f6, #2177dc); }
.btn.ok { background: linear-gradient(180deg, #19b852, #109c43); border-color: #2fd36e; }
.btn.danger { background: linear-gradient(180deg, #5a1f24, #451519); border-color: #8b2c33; color: #ffd5d7; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { min-height: 36px; padding: 0 13px; font-size: 14px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.btn.icon { width: 40px; min-height: 40px; padding: 0; border-radius: 10px; }
.iconbtn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #1c2431; border: 1px solid var(--line-2); font-size: 19px; }
.iconbtn:hover { background: #232d3d; }
.iconbtn.flat { background: none; border-color: transparent; }

/* ---------- formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: 13px; font-weight: 600; color: var(--mute); }
.input, .select, .textarea { width: 100%; min-height: 44px; padding: 0 14px; border-radius: 10px; background: #0e151f; border: 1px solid var(--line-2); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
.textarea { padding: 11px 14px; min-height: 92px; resize: vertical; line-height: 1.4; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(58,142,245,.2); }
.input::placeholder, .textarea::placeholder { color: #6d788a; }
.input[readonly] { color: var(--mute); }
.input.invalid { border-color: var(--danger); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #9aa6b8 50%), linear-gradient(135deg, #9aa6b8 50%, transparent 50%); background-position: calc(100% - 20px) 19px, calc(100% - 14px) 19px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 34px; }
.span2 { grid-column: 1 / -1; }
.hint { font-size: 12.5px; color: var(--mute-2); } .err { font-size: 13px; color: #ff8d8d; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blue-2); flex: none; }

.toggle { position: relative; width: 58px; height: 32px; flex: none; border-radius: 16px; background: #3b4452; border: 1px solid rgba(255,255,255,.1); transition: .18s; }
.toggle::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #f4f7fb; box-shadow: 0 1px 4px rgba(0,0,0,.4); transition: .18s; }
.toggle.on { background: linear-gradient(180deg, #2f8cf5, #1b6fd2); border-color: #4a9bf6; }
.toggle.on::after { left: 29px; }
.toggle[disabled] { opacity: .45; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; background: #131b26; }
.seg button { min-height: 50px; padding: 6px 8px; font-weight: 600; color: var(--text); border-right: 1px solid var(--line); line-height: 1.2; }
.seg button:last-child { border-right: 0; }
.seg button small { display: block; font-weight: 400; color: var(--mute); font-size: 13px; }
.seg button.on { background: linear-gradient(180deg, #2278e2, #1565c4); box-shadow: inset 0 0 0 2px #4da0ff; }
.seg button.on.green { background: linear-gradient(180deg, #80c52a, #66a31c); box-shadow: none; color: #0d1a05; }
.seg button.on small { color: #d6e8ff; }

/* ---------- cartes / badges ---------- */
.card { background: linear-gradient(180deg, rgba(24,32,45,.82), rgba(16,22,32,.92)); border: 1px solid var(--line); border-radius: 14px; }
.card.pad { padding: 18px 20px; }
.card-title { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.card-title .ic { font-size: 22px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 600; background: #232c3a; border: 1px solid var(--line-2); color: var(--text); white-space: nowrap; }
.badge.info { background: rgba(58,142,245,.16); border-color: rgba(58,142,245,.4); color: #9ccaff; }
.badge.success { background: rgba(31,170,80,.16); border-color: rgba(31,170,80,.45); color: #7fe3a2; }
.badge.danger { background: rgba(239,74,74,.14); border-color: rgba(239,74,74,.4); color: #ff9c9c; }
.badge.warn { background: rgba(242,165,22,.14); border-color: rgba(242,165,22,.45); color: #ffd180; }
.badge.demo { background: rgba(242,165,22,.16); border-color: rgba(242,165,22,.55); color: #ffc65c; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.pill-green { display: inline-block; padding: 5px 16px; border-radius: 20px; font-weight: 700; color: #f4ffe4; background: linear-gradient(180deg, #78bf26, #5b9a14); border: 1px solid #98d84a; }
.pro-chip { display: inline-block; padding: 1px 9px; border-radius: 6px; background: #1b64c8; color: #fff; font-size: 13px; font-weight: 600; }
.notice { padding: 11px 14px; border-radius: 11px; font-size: 14px; border: 1px solid var(--line-2); background: #151d29; display: flex; gap: 10px; align-items: flex-start; }
.notice .ic { font-size: 18px; margin-top: 1px; }
.notice.warn { background: rgba(242,165,22,.1); border-color: rgba(242,165,22,.4); color: #ffd7a0; }
.notice.danger { background: rgba(239,74,74,.1); border-color: rgba(239,74,74,.4); color: #ffb3b3; }
.notice.info { background: rgba(58,142,245,.1); border-color: rgba(58,142,245,.4); color: #b5d6ff; }
.notice.ok { background: rgba(31,170,80,.1); border-color: rgba(31,170,80,.4); color: #a5ecc0; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--blue-2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { padding: 46px 20px; text-align: center; color: var(--mute); }
.empty .ic { font-size: 40px; color: var(--mute-2); margin-bottom: 8px; }

/* ---------- tableaux ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--mute); padding: 11px 14px; background: rgba(255,255,255,.04); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
.table tr.click { cursor: pointer; } .table tr.click:hover td { background: rgba(255,255,255,.035); }
.table .r { text-align: right; } .table .c { text-align: center; }

/* ---------- modales ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(4,8,14,.72); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal { width: min(560px, 100%); max-height: calc(100dvh - 40px); overflow: auto; background: linear-gradient(180deg, #172030, #101722); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: pop .18s; }
.modal.wide { width: min(860px, 100%); } .modal.xl { width: min(1000px, 100%); }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #151e2c; z-index: 2; }
.modal-h h3 { font-size: 18px; flex: 1; } .modal-b { padding: 20px; } .modal-f { padding: 14px 20px 20px; display: flex; gap: 12px; justify-content: flex-end; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.toasts { position: fixed; z-index: 120; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 36px)); }
.toast { padding: 12px 16px; border-radius: 12px; background: #1b2535; border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0,0,0,.5); display: flex; gap: 10px; align-items: flex-start; animation: pop .2s; font-size: 14.5px; }
.toast.ok { border-color: rgba(31,170,80,.6); } .toast.err { border-color: rgba(239,74,74,.6); } .toast.warn { border-color: rgba(242,165,22,.6); }
.toast .ic { font-size: 19px; margin-top: 1px; } .toast.ok .ic { color: #53d985; } .toast.err .ic { color: #ff7b7b; } .toast.warn .ic { color: #ffc65c; }
.menu { position: absolute; z-index: 70; min-width: 210px; background: #18212f; border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; box-shadow: 0 18px 50px rgba(0,0,0,.55); animation: pop .12s; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 8px; text-align: left; color: var(--text); font-size: 14.5px; }
.menu button:hover, .menu a:hover { background: rgba(255,255,255,.07); } .menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu .danger { color: #ff9c9c; }

/* =================================================================== COQUE (desktop) */
.topbar { height: var(--topbar-h); display: flex; align-items: center; background: linear-gradient(180deg, #151b27 0%, #0f151f 100%); border-bottom: 1px solid rgba(255,255,255,.08); position: sticky; top: 0; z-index: 40; }
.logo-link { width: var(--sidebar-w); padding: 0 0 0 34px; display: flex; align-items: center; flex: none; }
.logo-link img { height: 56px; width: auto; display: block; }
.topnav { display: flex; align-items: stretch; height: 70px; gap: 6px; margin-left: 52px; }
.topnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0 24px; min-width: 124px; border-radius: 12px; color: #e8edf5; font-size: 15.5px; font-weight: 500; }
.topnav a .ic { font-size: 27px; stroke-width: 1.6; }
.topnav a:hover { background: rgba(255,255,255,.05); }
.topnav a.active { background: linear-gradient(180deg, #19416d 0%, #14345a 100%); box-shadow: inset 0 0 0 1px rgba(80,150,240,.25), 0 0 24px rgba(30,110,220,.18); color: #fff; }
.topbar .spacer { flex: 1; }
.profile-btn { display: flex; align-items: center; gap: 12px; padding: 6px 14px 6px 8px; margin-right: 28px; border-radius: 30px; font-size: 16px; font-weight: 500; position: relative; }
.profile-btn:hover { background: rgba(255,255,255,.06); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #4a5d78, #2a3648); font-weight: 700; font-size: 15px; color: #e8eefa; border: 1px solid rgba(255,255,255,.12); flex: none; }
.avatar.blue { background: radial-gradient(circle at 35% 30%, #4da2ff, #1a62b8); }
.avatar .ic { font-size: 22px; }
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: calc(100dvh - var(--topbar-h)); }
.sidebar { background: linear-gradient(180deg, #141e2a 0%, #0e1621 100%); border-right: 1px solid rgba(255,255,255,.05); padding: 16px 14px 20px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: var(--topbar-h); height: calc(100dvh - var(--topbar-h)); overflow-y: auto; }
.userchip { display: flex; align-items: center; gap: 12px; padding: 6px 8px 14px; font-weight: 500; font-size: 16px; }
.userchip .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 108px; }
.sidenav { display: flex; flex-direction: column; gap: 2px; }
.sidenav a { display: flex; align-items: center; gap: 16px; height: 48px; padding: 0 16px; border-radius: 11px; font-size: 16.5px; color: #eaf0f8; font-weight: 450; }
.sidenav a .ic { font-size: 23px; stroke-width: 1.6; }
.sidenav a:hover { background: rgba(255,255,255,.05); }
.sidenav a.active { background: linear-gradient(180deg, #2468b6 0%, #1a5192 100%); box-shadow: 0 2px 14px rgba(30,110,220,.25); color: #fff; font-weight: 600; }
.sidenav .gap { height: 8px; }
.promo { margin-top: auto; border: 1px solid #1b65b5; border-radius: 12px; padding: 14px 14px 16px; background: linear-gradient(180deg, rgba(10,50,100,.55), rgba(8,28,58,.6)); text-align: center; position: relative; overflow: hidden; }
.promo .tool { position: absolute; left: 8px; top: 12px; color: #e0463a; font-size: 56px; opacity: .95; transform: rotate(-20deg); }
.promo .pn { font-style: italic; font-weight: 800; font-size: 22px; letter-spacing: -.02em; text-align: left; padding-left: 62px; }
.promo .ps { font-size: 13px; color: #cfe1f7; text-align: left; padding-left: 62px; margin-bottom: 12px; }
.promo .btn { min-height: 38px; font-size: 14px; width: 100%; }
.main { min-width: 0; padding: 0 0 24px; }
.page { padding: 22px 28px 40px; max-width: 1280px; }
.page-h { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-h h1 { font-size: 26px; flex: 1; min-width: 200px; }
.page-sub { color: var(--mute); margin: -10px 0 18px; }

/* barre mobile + tab bar : masquées sur desktop */
.mbar, .tabbar, .drawer { display: none; }

/* =================================================================== ÉDITEUR DE DEVIS */
.qgrid { display: grid; grid-template-columns: minmax(0, 1fr) 342px; gap: 14px; padding: 0 12px 12px 12px; align-items: start; }
.qmain { background: linear-gradient(180deg, rgba(15,22,32,.9), rgba(12,18,27,.95)); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.qtitle { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--line); min-height: 52px; }
.qtitle h1 { font-size: 24px; font-weight: 600; flex: 1; }
.saved { font-size: 13px; color: var(--mute-2); display: flex; align-items: center; gap: 6px; }
.saved.dirty { color: #ffc65c; } .saved .ic { font-size: 15px; }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px 20px 6px; position: relative; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: 16px; color: #d7deea; cursor: pointer; }
.step .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 16px; background: radial-gradient(circle at 35% 30%, #4b5361, #353c48); border: 1px solid rgba(255,255,255,.18); position: relative; z-index: 2; }
.step.done .dot, .step.active .dot { background: radial-gradient(circle at 35% 30%, #46a3ff, #1c7be6); border-color: #7cc0ff; box-shadow: 0 0 14px rgba(40,140,255,.45); }
.step::before { content: ''; position: absolute; top: 16px; left: -50%; right: 50%; height: 3px; background: #4a515d; z-index: 1; }
.step:first-child::before { display: none; }
.step.done::before, .step.active::before { background: linear-gradient(90deg, #2f8cf5, #3d9bff); }
.qbody { padding: 4px 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.sect { background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 14px; padding: 9px 14px 12px; }
.sect > .sect-t { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.sect > .sect-t span { font-weight: 400; color: var(--mute); }
.vehrow { display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 16px; align-items: center; }
.plate { display: flex; height: 46px; border-radius: 8px; overflow: hidden; background: #f1f3f7; border: 2px solid #0e2347; flex: 1; min-width: 0; }
.plate .eu { width: 34px; background: linear-gradient(180deg, #1a47a8, #0f2f7a); color: #fff; font-size: 11px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 3px; position: relative; flex: none; }
.plate .eu::before { content: '★ ★ ★\A★   ★\A★ ★ ★'; white-space: pre; position: absolute; top: 3px; left: 0; right: 0; text-align: center; font-size: 4.5px; line-height: 6px; color: #ffd84a; letter-spacing: 0; }
.plate input { flex: 1; min-width: 0; border: 0; background: transparent; color: #0e1a2e; font-weight: 700; font-size: 24px; letter-spacing: .02em; text-align: center; outline: none; padding: 0 6px; font-family: var(--font); text-transform: uppercase; }
.plate input::placeholder { color: #a7afbd; font-weight: 500; }
.plate-wrap { display: flex; gap: 6px; align-items: stretch; }
.plate-wrap .go { width: 46px; border-radius: 9px; background: linear-gradient(180deg, #2a86ee, #1b6fd2); display: grid; place-items: center; font-size: 21px; flex: none; }
.vehinfo { display: flex; align-items: center; gap: 14px; min-width: 0; }
.vlogo { width: 100px; height: 64px; border-radius: 10px; display: grid; place-items: center; background: #0e141d; border: 1px solid var(--line-2); flex: none; overflow: hidden; }
.vlogo img { max-width: 72%; max-height: 72%; filter: grayscale(1) brightness(1.7); }
.mono { font-weight: 800; letter-spacing: .02em; color: #d9e4f5; font-size: 22px; }
.vehinfo .vt { font-size: 21px; font-weight: 600; line-height: 1.15; } .vehinfo .vs { color: var(--mute); font-size: 15px; }
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.method { display: flex; align-items: center; gap: 18px; padding: 0 20px; height: 66px; text-align: left; border-radius: 12px; background: linear-gradient(180deg, #1a2230, #151c27); border: 1px solid var(--line-2); transition: .15s; }
.method .ic { font-size: 38px; stroke-width: 1.5; color: #f0f4fa; }
.method .mt { font-size: 17px; font-weight: 600; line-height: 1.2; } .method .ms { font-size: 14.5px; color: var(--mute); }
.method:hover { border-color: var(--line-3); }
.method.on { background: linear-gradient(180deg, #17375f, #122b4b); border: 2px solid #3d93f5; box-shadow: 0 0 22px rgba(40,130,240,.3); }
.method.on .ic { color: #3d9bff; }
.work { display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 18px; padding: 4px 2px 0; }
.work h3 { font-size: 20px; margin: 4px 0 10px; font-weight: 600; }

/* schéma véhicule */
.carbox { position: relative; width: 100%; max-width: 296px; margin: 0 auto; }
.carbox svg { width: 100%; height: auto; display: block; overflow: visible; }
.carbox .zone { cursor: pointer; transition: filter .15s; }
.carbox .zone:hover { filter: brightness(1.12); }
.carbox .zone.sel { filter: drop-shadow(0 0 6px rgba(124,193,43,.9)); }
.zone-fill { fill: rgba(255,255,255,0); } .zone.has .zone-fill { fill: url(#gGreen); }
.carbox .bubble { cursor: pointer; }
.bubble circle { fill: #f2f4f8; stroke: #d5dae3; stroke-width: 1.5; } .bubble.has circle { fill: url(#gGreenB); stroke: #c6ee8e; }
.bubble text, .carcount { font-family: var(--font); font-weight: 700; fill: #162003; font-size: 19px; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.bubble.has text, .carcount { fill: #fff; }
.carbox .bubble:hover circle { stroke: #fff; }
.carbox .zone-label { font-size: 11px; fill: #8a95a8; text-anchor: middle; pointer-events: none; }
.total-row { display: grid; grid-template-columns: 1fr 1.5fr; border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; margin-top: 12px; background: #131b26; }
.total-row > div { padding: 8px 6px; text-align: center; border-right: 1px solid var(--line); line-height: 1.15; }
.total-row > div:last-child { border-right: 0; background: linear-gradient(180deg, #1e75dd, #1763c3); }
.total-row b { display: block; font-size: 21px; } .total-row span { font-size: 13px; color: var(--mute); } .total-row > div:last-child span { color: #dcebff; }

/* tableau des éléments (desktop) */
.eltable { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.02); }
.eltable table { width: 100%; border-collapse: collapse; }
.eltable th { background: linear-gradient(180deg, #232b37, #1c232e); color: #f2f5fa; font-size: 14.5px; font-weight: 600; padding: 10px 8px; text-align: center; white-space: nowrap; }
.eltable th:first-child, .eltable td:first-child { text-align: left; padding-left: 16px; }
.eltable td { text-align: center; padding: 0 8px; height: 30.7px; font-size: 15px; border-top: 1px solid rgba(255,255,255,.05); font-variant-numeric: tabular-nums; }
.eltable tr:nth-child(even) td { background: rgba(255,255,255,.018); }
.eltable td.price { text-align: right; padding-right: 8px; white-space: nowrap; }
.eltable td.edit { width: 40px; padding: 0; border-left: 1px solid rgba(255,255,255,.05); }
.eltable td.edit button { width: 100%; height: 100%; font-size: 17px; color: #e8edf5; display: grid; place-items: center; }
.eltable td.edit button:hover { color: var(--blue-3); }
.eltable tr.sel td { background: rgba(124,193,43,.1); }
.eltable tr.zero td { color: #d9dfe9; }
.eltable .ov { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-right: 6px; vertical-align: middle; }
.eltable td.dcell { cursor: pointer; } .eltable td.dcell:hover { background: rgba(58,142,245,.12); }
.eltable-actions { margin-top: 12px; display: flex; gap: 10px; }

/* colonne droite */
.rcol { display: flex; flex-direction: column; gap: 14px; }
.rcard { background: linear-gradient(180deg, rgba(20,27,38,.92), rgba(14,20,29,.96)); border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.rcard-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 14px; background: rgba(255,255,255,.035); border-bottom: 1px solid var(--line); }
.rcard-h h2 { font-size: 22px; font-weight: 600; flex: 1; letter-spacing: -.01em; }
.rcard-b { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.kv { display: flex; align-items: center; gap: 12px; }
.kv > .ic { font-size: 25px; stroke-width: 1.5; flex: none; }
.kv .k { font-size: 14px; color: #d5dce8; } .kv .v { font-size: 17px; font-weight: 500; }
.optrow { display: flex; align-items: center; gap: 12px; min-height: 40px; font-size: 16.5px; }
.optrow .lbl2 { flex: 1; }
.amount { height: 38px; width: 116px; border-radius: 9px; background: #0f1620; border: 1px solid var(--line-2); text-align: center; font-size: 15.5px; font-weight: 500; padding: 0 6px; color: var(--text); }
.recap-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 17.5px; padding: 3px 4px; }
.recap-row b { font-weight: 700; font-variant-numeric: tabular-nums; }
.recap-row .ov { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); display: inline-block; margin-right: 6px; }
.tot-ht { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-radius: 11px; background: linear-gradient(180deg, #153c6e, #11335f); border: 1px solid #1f5da8; box-shadow: inset 0 0 22px rgba(30,120,230,.22); font-size: 20px; font-weight: 700; margin: 4px 0; }
.tot-ttc { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 11px; background: #f5f6f8; color: #0b0f16; font-size: 22px; font-weight: 700; margin-top: 6px; box-shadow: 0 0 26px rgba(255,255,255,.12); }
.tva-row { color: #8fc0ff; } .tva-row b { color: var(--text); }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.actions .btn { padding: 6px 10px; min-height: 48px; min-width: 0; white-space: normal; line-height: 1.2; text-align: center; }
.secret-box { border: 1px dashed rgba(242,165,22,.5); background: rgba(242,165,22,.06); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.secret-box .row b { font-variant-numeric: tabular-nums; }
.msg-list { max-height: 260px; overflow: auto; }

/* éditeur d'élément (feuille) */
.sheet-veh { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.03); }
.sheet-veh .vlogo { width: 56px; height: 48px; }
.stepnum { display: grid; grid-template-columns: 76px 1fr 76px 58px; gap: 0; height: 66px; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: #131b26; }
.stepnum button, .stepnum input { border: 0; background: transparent; color: var(--text); text-align: center; font-size: 34px; font-weight: 600; width: 100%; }
.stepnum button { font-size: 30px; background: #19212d; border-right: 1px solid var(--line); } .stepnum button:hover { background: #222c3b; }
.stepnum input { font-size: 32px; outline: none; min-width: 0; font-variant-numeric: tabular-nums; }
.stepnum .keys { border-left: 1px solid var(--line); border-right: 0; font-size: 26px; }
.sheet-sec { border-top: 1px solid var(--line); padding-top: 14px; }
.sheet-row { display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-size: 18px; border-bottom: 1px solid var(--line); }
.moneybox { display: flex; align-items: center; height: 50px; border: 1px solid var(--line-2); border-radius: 11px; background: #131b26; padding: 0 16px; font-size: 21px; gap: 10px; }
.moneybox input { flex: 1; background: transparent; border: 0; color: var(--text); font-size: 21px; outline: none; min-width: 0; font-variant-numeric: tabular-nums; }
.moneybox.ro { color: #dfe6f1; }
.moneybox .ic { color: #cdd6e4; font-size: 20px; }

/* sélection véhicule (flux plaque / marque / modèle) */
.vflow { display: flex; flex-direction: column; gap: 16px; }
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tabs2 button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 12px; border: 1px solid var(--line-2); background: #151c27; font-weight: 600; }
.tabs2 button .ic { font-size: 30px; stroke-width: 1.5; }
.tabs2 button.on { background: linear-gradient(180deg, #1873d8, #135db4); border-color: #4da0ff; }
.auto-box { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; border: 1px solid #1f5da8; background: linear-gradient(180deg, rgba(20,70,140,.5), rgba(14,44,90,.55)); text-align: left; width: 100%; }
.auto-box .ic { font-size: 40px; color: #5aa5ff; stroke-width: 1.3; }
.auto-box b { display: block; font-size: 16.5px; font-weight: 600; } .auto-box span { color: #bcd2ee; font-size: 14px; }
.sep-or { display: flex; align-items: center; gap: 14px; color: var(--mute); } .sep-or::before, .sep-or::after { content: ''; flex: 1; border-top: 1px solid var(--line-2); }
.regions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.region { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 6px 12px; border-radius: 12px; background: #151c27; border: 1px solid var(--line-2); font-weight: 600; font-size: 16px; }
.region .flag { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: #0e151f; border: 1px solid var(--line-2); }
.region.on { border: 2px solid #3d93f5; background: linear-gradient(180deg, #14325a, #10264a); }
.region.on::after, .brand.on::after, .model.on::after { content: ''; }
.tick { position: absolute; right: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; font-size: 15px; border: 2px solid #0f1620; }
.search { position: relative; } .search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--mute); font-size: 20px; pointer-events: none; } .search .input { padding-left: 44px; }
.brands { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.brand { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 100px; border-radius: 12px; background: #151c27; border: 1px solid var(--line); font-size: 14px; padding: 6px 2px; min-width: 0; }
.brand .bl { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #2a3546, #19212e); border: 1px solid var(--line-2); font-weight: 800; font-size: 16px; color: #dbe5f6; letter-spacing: -.02em; overflow: hidden; }
.brand .bl img { width: 70%; height: 70%; object-fit: contain; }
.brand span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand.on { border: 2px solid #3d93f5; background: linear-gradient(180deg, #14325a, #10264a); } .brand.on .tick { right: 3px; bottom: 3px; width: 22px; height: 22px; }
.dots { display: flex; justify-content: center; gap: 9px; } .dots i { width: 9px; height: 9px; border-radius: 50%; background: #4a5362; } .dots i.on { background: var(--blue-2); }
.models { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-height: 380px; overflow-y: auto; background: #111822; }
.model { display: flex; align-items: center; gap: 16px; width: 100%; padding: 8px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 19px; font-weight: 500; position: relative; min-height: 49px; }
.model:last-child { border-bottom: 0; } .model:hover { background: rgba(255,255,255,.04); }
.model .car { width: 62px; height: 30px; color: #cfd8e6; flex: none; }
.model .ic.chev { margin-left: auto; font-size: 22px; color: #b9c4d4; }
.model.on { background: linear-gradient(180deg, #14325a, #10264a); box-shadow: inset 0 0 0 2px #3d93f5; }
.vf-head { display: flex; align-items: center; gap: 14px; } .vf-head h3 { font-size: 24px; text-align: center; flex: 1; }
.vf-sub { text-align: center; color: var(--mute); margin-top: -10px; }
.branddisp { display: flex; align-items: center; gap: 14px; } .branddisp .bl { width: 52px; height: 52px; }

/* tableaux de bord / listes */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; } .kpi .kl { color: var(--mute); font-size: 14px; display: flex; gap: 8px; align-items: center; } .kpi .kv2 { font-size: 30px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; } .kpi .ks { font-size: 13px; color: var(--mute-2); }
.cta-new { display: flex; align-items: center; gap: 18px; padding: 20px 24px; margin-bottom: 18px; background: linear-gradient(110deg, #14407a 0%, #0f2c52 60%, #0d1f38 100%); border: 1px solid #1f5da8; border-radius: 16px; box-shadow: 0 10px 40px rgba(20,100,220,.18); }
.cta-new h2 { font-size: 22px; } .cta-new p { margin: 4px 0 0; color: #bcd2ee; }
.adbanner { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border: 1px dashed var(--line-3); border-radius: 12px; font-size: 13.5px; color: var(--mute); background: rgba(255,255,255,.025); margin-bottom: 16px; }
.adbanner b { color: var(--text); } .adbanner .tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; border: 1px solid var(--line-2); padding: 1px 6px; border-radius: 5px; color: var(--mute-2); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; } .chip { padding: 7px 14px; border-radius: 20px; background: #19212e; border: 1px solid var(--line-2); font-size: 14px; font-weight: 500; } .chip.on { background: #1b5fa8; border-color: #4da0ff; }
.qcard { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; } .qcard:hover { background: rgba(255,255,255,.03); }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.subtabs button, .subtabs a { padding: 9px 16px; border-radius: 10px; font-weight: 600; color: var(--mute); font-size: 15px; } .subtabs .on { background: #1b3b66; color: #fff; box-shadow: inset 0 0 0 1px #3d93f5; }
.cell-input { width: 100%; height: 38px; border-radius: 8px; background: #0e151f; border: 1px solid var(--line-2); color: var(--text); text-align: right; padding: 0 10px; font-variant-numeric: tabular-nums; }
.cell-input:focus { outline: none; border-color: var(--blue-2); }
.cell-input.dirty { border-color: var(--warn); background: rgba(242,165,22,.08); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan { padding: 20px; display: flex; flex-direction: column; gap: 10px; } .plan.cur { border: 2px solid #3d93f5; box-shadow: 0 0 30px rgba(40,130,240,.2); } .plan .price { font-size: 32px; font-weight: 800; } .plan ul { margin: 0; padding-left: 18px; color: var(--mute); font-size: 14px; }
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: radial-gradient(900px 500px at 50% 0%, #12233f 0%, transparent 70%); }
.login-card { width: min(440px, 100%); padding: 28px; display: flex; flex-direction: column; gap: 16px; } .login-card .logo { width: 100%; max-width: 320px; margin: 0 auto 4px; display: block; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.kvtable { display: grid; grid-template-columns: 180px 1fr; gap: 8px 14px; font-size: 14.5px; } .kvtable dt { color: var(--mute); } .kvtable dd { margin: 0; }
.pdfframe { width: 100%; height: min(70dvh, 720px); border: 0; border-radius: 10px; background: #fff; }

/* =================================================================== TABLETTE */
@media (max-width: 1279px) {
  .topnav a { min-width: 98px; padding: 0 14px; font-size: 14px; } .topnav { margin-left: 20px; }
  .qgrid { grid-template-columns: minmax(0, 1fr) 316px; }
  .work, .vehrow { grid-template-columns: 250px minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1023px) {
  :root { --sidebar-w: 0px; }
  .shell { grid-template-columns: 1fr; } .sidebar { display: none; }
  .logo-link { width: auto; padding: 0 12px 0 20px; } .logo-link img { height: 46px; }
  .topnav { margin-left: 0; } .topnav a { min-width: 0; padding: 0 12px; gap: 3px; font-size: 12.5px; } .topnav a .ic { font-size: 24px; }
  .profile-btn { margin-right: 14px; } .profile-btn .pname { display: none; }
  .qgrid { grid-template-columns: 1fr; padding: 0 10px 10px; }
  .plans { grid-template-columns: 1fr; }
}

/* =================================================================== MOBILE */
@media (max-width: 719px) {
  body { font-size: 15px; }
  .topbar { display: none; }
  .shell { display: block; min-height: 100dvh; }
  .main { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 12px); }
  .mbar { display: flex; align-items: center; justify-content: space-between; height: 66px; padding: 0 14px; position: sticky; top: 0; z-index: 40; background: linear-gradient(180deg, #151b27, #0f151f); border-bottom: 1px solid rgba(255,255,255,.07); }
  .mbar img { height: 48px; } .mbar .iconbtn { width: 44px; height: 44px; background: none; border: 0; font-size: 28px; position: relative; }
  .mbar .dotn { position: absolute; top: 7px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); border: 2px solid #121824; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(var(--tab-h) + var(--safe-b)); padding: 8px 6px calc(8px + var(--safe-b)); background: linear-gradient(180deg, #111823, #0c121b); border-top: 1px solid rgba(255,255,255,.08); gap: 2px; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12.5px; color: #d6deea; border-radius: 12px; font-weight: 500; }
  .tabbar a .ic { font-size: 26px; stroke-width: 1.6; } .tabbar a.active { background: linear-gradient(180deg, #1d73db, #1560bf); color: #fff; box-shadow: 0 2px 14px rgba(29,120,224,.4); }
  .drawer { display: block; position: fixed; inset: 0; z-index: 90; background: rgba(4,8,14,.7); animation: fade .15s; }
  .drawer nav { width: min(310px, 86vw); height: 100%; background: linear-gradient(180deg, #141e2a, #0e1621); padding: 18px 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; animation: slide .2s; }
  @keyframes slide { from { transform: translateX(-30px); opacity: 0; } }
  .page { padding: 16px 14px 24px; } .page-h h1 { font-size: 22px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi .kv2 { font-size: 24px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .cta-new { flex-direction: column; align-items: stretch; }
  .overlay { padding: 0; align-items: end; } .modal, .modal.wide, .modal.xl { width: 100%; max-height: 94dvh; border-radius: 20px 20px 0 0; }
  .overlay.full { align-items: stretch; } .overlay.full .modal { max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .toasts { left: 12px; right: 12px; bottom: calc(var(--tab-h) + var(--safe-b) + 10px); max-width: none; }

  .qgrid { display: block; padding: 0 10px 10px; } .rcol { margin-top: 12px; }
  .qmain { border-radius: 16px; } .qtitle { padding: 12px 14px; min-height: 0; } .qtitle h1 { font-size: 22px; text-align: center; }
  .qtitle .saved { display: none; }
  .stepper { padding: 12px 6px 6px; } .step { font-size: 14px; } .step .dot { width: 32px; height: 32px; }
  .qbody { padding: 4px 10px 12px; } .sect { padding: 10px 12px; border-radius: 13px; } .sect > .sect-t { font-size: 17px; margin-bottom: 8px; }
  .vehrow { grid-template-columns: minmax(0, 1fr); gap: 10px; } .vlogo { width: 66px; height: 58px; } .vehinfo { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: rgba(255,255,255,.025); } .vehinfo .vt { font-size: 21px; } .vehinfo .vs { font-size: 14px; }
  .methods { gap: 8px; } .method { flex-direction: column; justify-content: center; height: 104px; padding: 6px 4px; gap: 6px; text-align: center; position: relative; } .method .ic { font-size: 34px; } .method .mt { font-size: 15px; } .method .ms { font-size: 13px; }
  .method.on .tick { position: absolute; right: -6px; bottom: -6px; }
  .work { grid-template-columns: 1fr; } .carbox { max-width: 300px; }
  .total-row b { font-size: 22px; } .total-row { margin-top: 6px; }
  .mcontinue { margin-top: 12px; width: 100%; min-height: 56px; font-size: 17px; border-radius: 12px; }
  .eltable { display: none; } .mlist { display: block !important; }
  .rcard-h h2 { font-size: 21px; } .actions { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .stepnum { height: 70px; } .sheet-row { font-size: 18px; }
  .tabs2 button { padding: 14px 4px; } .brand { height: 96px; }
  .plate input { font-size: 25px; }
  .modal-h { padding: 14px 16px; } .modal-b { padding: 16px; } .modal-f { padding: 12px 16px calc(16px + var(--safe-b)); }
  .modal-f .btn { flex: 1; }
  .table.resp thead { display: none; } .table.resp tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 0; border-bottom: 1px solid var(--line); } .table.resp td { border: 0; padding: 2px 4px; }
}
.mlist { display: none; }
.mrow { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 11px 6px; border-bottom: 1px solid var(--line); font-size: 17px; width: 100%; text-align: left; }
.mrow:last-child { border-bottom: 0; } .mrow .cnt { color: var(--mute); font-size: 14.5px; } .mrow .pr { font-weight: 600; font-variant-numeric: tabular-nums; }
.mrow.on-z .nm { color: var(--green); }
@media print { .topbar, .sidebar, .mbar, .tabbar, .toasts { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* barre d'enregistrement (matrices) */
.savebar { position: sticky; bottom: 0; z-index: 40; display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap; padding: 12px 16px; margin-top: 18px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(14,21,31,.96); backdrop-filter: blur(8px); box-shadow: 0 -10px 30px rgba(0,0,0,.35); }
@media (max-width: 719px) { .savebar { bottom: calc(var(--tab-h) + var(--safe-b) + 8px); } .savebar .btn { flex: 1; } }

/* compactage éditeur (tient en 1024 px comme la maquette) */
.vehleft { min-width: 0; }
.rcard-b { gap: 10px; }
.optrow { min-height: 34px; }
.rcard-h { padding: 10px 14px; }
.rcol { gap: 12px; }
.optrow { min-height: 32px; } .recap-row { padding: 2px 4px; } #sec-dossier .rcard-b { gap: 8px; } #sec-dossier textarea { min-height: 56px !important; }

.rcard-h h2 { font-size: 21px; }
@media (min-width: 720px) { .qtitle .badge { flex: none; } }
@media (max-width: 719px) { .qtitle .badge, .qtitle .saved { display: none; } }

/* fenêtres : en-tête et pied fixes, corps défilant */
.modal { display: flex; flex-direction: column; overflow: hidden; }
.modal-h, .modal-f { flex: none; } .modal-b { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-f { border-top: 1px solid var(--line); background: #131b28; }
.stepnum > span { display: flex !important; } .stepnum > span > span { display: flex; flex: 1; } .stepnum .keys { flex: 1; height: 100%; width: 100%; display: grid; place-items: center; }
.moneybox > span:not(.grow):not(.ic) { color: #cdd6e4; }

@media (min-width: 1280px) and (max-width: 1439px) { .topnav a { min-width: 104px; padding: 0 14px; } .topnav { margin-left: 24px; } .profile-btn { margin-right: 14px; } }
@media (min-width: 1024px) and (max-width: 1179px) { .topnav a { min-width: 80px; padding: 0 8px; font-size: 13px; } .topnav { margin-left: 8px; gap: 2px; } .logo-link { padding-left: 20px; } .logo-link img { height: 50px; } .profile-btn .pname { display: none; } .profile-btn { margin-right: 12px; } }
@media (max-width: 899px) { .topnav a:not(.active) { font-size: 0; gap: 0; padding: 0 11px; min-width: 0; } .topnav a:not(.active) .ic { font-size: 26px; } .logo-link img { height: 40px; } }
.plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } @media (max-width: 1023px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan .btn { white-space: normal; height: auto; min-height: 44px; padding-top: 8px; padding-bottom: 8px; text-align: center; }

.split32 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } @media (max-width: 1023px) { .split32 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 719px) { .table td, .table th { padding: 8px 6px; } .cell-input { min-width: 0; } .card .table input.cell-input[style*="width:84px"] { width: 64px !important; } }

/* ================= V0.2 — schéma véhicule réaliste ================= */
.vsvg { position: relative; width: 100%; }
.vsvg svg { display: block; width: 100%; height: auto; max-height: 100%; user-select: none; -webkit-user-select: none; }
.vsvg .vz { fill: transparent; stroke: rgba(40, 52, 70, .28); stroke-width: .9; cursor: pointer; transition: fill .12s; vector-effect: non-scaling-stroke; }
.vsvg .vz:hover { fill: rgba(47, 140, 255, .22); }
.vsvg .vz.has { fill: rgba(122, 196, 30, .78); stroke: #cdeea0; }
.vsvg .vz.sel { fill: rgba(30, 126, 255, .62); stroke: #8cc4ff; stroke-width: 1.6; }
.vsvg .vz.virt { stroke-dasharray: 5 3; }
.vsvg .vm { cursor: pointer; outline: none; }
.vsvg .vm .vhit { fill: transparent; }
.vsvg .vm .vc { fill: #eef2f7; stroke: #26303f; stroke-width: 2; transition: fill .12s, stroke .12s; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.vsvg .vm .vn { fill: #101826; font-weight: 800; text-anchor: middle; dominant-baseline: central; pointer-events: none; font-family: Inter, system-ui, sans-serif; }
.vsvg .vm .vl { stroke: rgba(180, 196, 220, .5); stroke-width: 1.4; }
.vsvg .vm .vdot { fill: rgba(180, 196, 220, .75); }
.vsvg .vm.has .vc { fill: #86c926; stroke: #d8f2a8; }
.vsvg .vm.has .vn { fill: #0d1b03; }
.vsvg .vm.sel .vc { fill: #1e7eff; stroke: #cfe4ff; stroke-width: 3; }
.vsvg .vm.sel .vn { fill: #fff; }
.vsvg .vm.sel .vl { stroke: #5aa8ff; stroke-width: 2; }
.vsvg .vm:hover .vc, .vsvg .vm:focus-visible .vc { stroke: #5aa8ff; stroke-width: 3; }
.vsvg .vm.virt .vc { stroke-dasharray: 3 2; }
.vzoom { position: absolute; right: 8px; bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.vzoom .iconbtn { background: rgba(14, 22, 34, .88); border: 1px solid var(--line, #2a3646); width: 40px; height: 40px; }

/* observations par élément */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line, #2b3a4f); background: rgba(255,255,255,.04); color: var(--text, #e8eef7); font-size: 15px; cursor: pointer; }
.chip .ic { width: 16px; height: 16px; }
.chip.on { background: rgba(30, 126, 255, .22); border-color: #3b8cff; color: #fff; }
.chip:disabled { opacity: .6; cursor: default; }
.mute.warn { color: #ffb454; }
.notebadge { display: inline-flex; margin-left: 6px; color: var(--blue-3, #5aa8ff); vertical-align: middle; }
.notebadge .ic { width: 14px; height: 14px; }

/* ===== mode véhicule plein écran ===== */
.vstage { position: fixed; inset: 0; z-index: 70; background: radial-gradient(900px 600px at 50% 0%, #121e31 0%, var(--bg) 70%); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); }
.vstage-h { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: rgba(9, 14, 22, .9); }
.vstage-h .vs-t { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vstage-h .vs-s { color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vstage-h .bodytype b { font-weight: 600; }
.vstage-b { flex: 1; min-height: 0; display: flex; position: relative; }
.vstage-car { flex: 1; min-width: 0; min-height: 0; display: flex; align-items: stretch; justify-content: center; }
.vstage-car .vsvg { height: 100%; width: 100%; }
.vstage-car .vsvg svg { width: 100%; height: 100%; max-height: none; }
.vstage-list { width: min(300px, 46%); border-left: 1px solid var(--line); overflow-y: auto; background: rgba(9, 14, 22, .96); }
.vstage-f { display: flex; align-items: center; gap: 12px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(9, 14, 22, .94); }
.vstage-f .tot { display: flex; flex-direction: column; line-height: 1.1; min-width: 56px; }
.vstage-f .tot b { font-size: 18px; } .vstage-f .tot span { color: var(--mute); font-size: 11px; }
.vstage-f .tot.hl { flex: 1; } .vstage-f .tot.hl b { color: #7bb8ff; }
.vstage-f .btn.primary { min-height: 50px; padding: 0 22px; }
.pick-list { display: flex; flex-direction: column; }
.pick-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--text); text-align: left; background: transparent; font-size: 15px; }
.pick-row .cnt { min-width: 28px; text-align: center; border-radius: 999px; padding: 2px 8px; background: rgba(255,255,255,.07); font-weight: 700; }
.pick-row.has .cnt { background: #86c926; color: #0d1b03; }
.pick-row.sel { background: rgba(30, 126, 255, .22); }
.vsvg-inline { position: relative; }
.carbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.bodytype { gap: 6px; }
@media (max-width: 719px) { .vstage-list { position: absolute; right: 0; top: 0; bottom: 0; width: min(78%, 320px); box-shadow: -10px 0 30px rgba(0,0,0,.5); } }

/* ===== V0.2 : verrous Pro, statistiques, abonnement ===== */
.badge.pro { display: inline-flex; align-items: center; gap: 4px; background: linear-gradient(180deg, #2a6fd1, #1b4a93); color: #fff; border: 1px solid #4da0ff; font-weight: 700; }
.badge.pro .ic { width: 12px; height: 12px; } .badge.pro.big { padding: 5px 12px; font-size: 13px; }
.btn.locked { opacity: .62; background: #1a212c; border-style: dashed; color: var(--mute); display: inline-flex; align-items: center; gap: 8px; }
.btn.locked:hover { opacity: .9; }
.btn.locked .proTag { font-size: 11px; font-weight: 700; color: #7bb8ff; border: 1px solid #2f6db8; border-radius: 999px; padding: 1px 8px; }
.navlock { width: 14px; height: 14px; margin-left: auto; opacity: .7; }
.topnav a.locked, .sidenav a.locked { opacity: .78; }
.lockedpanel { position: relative; }
.lp-ghost { filter: grayscale(1) blur(2px); opacity: .35; pointer-events: none; user-select: none; }
.lp-card { position: absolute; left: 50%; top: 40px; transform: translateX(-50%); width: min(460px, 92%); text-align: center; background: #121b29; border: 1px solid var(--line-2); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 12px; align-items: center; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lp-card h2 { margin: 0; } .lp-card p { margin: 0; color: var(--mute); }
.lp-ic { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #1b3b66; font-size: 26px; }
.cmp th, .cmp td { text-align: center; } .cmp th:first-child, .cmp td:first-child { text-align: left; } .cmp .okc { color: #5fd08b; } .cmp th.curp { color: #7bb8ff; }
.adbanner.consent { border-style: solid; flex-wrap: wrap; } .adbanner .adhide { margin-left: auto; font-size: 12px; color: var(--mute-2); text-decoration: underline; white-space: nowrap; }
.adbanner { margin-top: 18px; margin-bottom: 0; }
.kpis6 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.kpi .delta.up { color: #5fd08b; } .kpi .delta.down { color: #ff9c9c; }
.filters { display: flex; flex-direction: column; gap: 12px; }
.filters .frow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.seg.small button { padding: 7px 12px; font-size: 14px; min-height: 40px; }
.chartbox .tooltip { position: absolute; top: 4px; z-index: 3; background: #0b1320; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; font-size: 13px; pointer-events: none; min-width: 140px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.tooltip i, .lg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.lg { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--mute); }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hb { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 4px 10px; align-items: center; padding: 4px 6px; border-radius: 8px; cursor: default; min-height: 36px; }
.hb.on { background: rgba(255,255,255,.05); }
.hb .hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; } .hb .hr { height: 10px; background: rgba(255,255,255,.06); border-radius: 999px; overflow: hidden; }
.hb .hf { height: 100%; border-radius: 0 4px 4px 0; } .hb .hv { font-weight: 700; font-size: 14px; text-align: right; } .hb .hs { grid-column: 1 / -1; color: var(--mute); font-size: 12px; }
.ul-loss { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; } .ul-loss li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; } .ul-loss .ic { margin-top: 3px; flex: none; color: #ffb74d; }
.btn.small.on { background: #1b5fa8; border-color: #4da0ff; }
/* débordements V0.2 : barre haute à 7 entrées, notices avec boutons, tableaux larges */
@media (max-width: 1023px) { .profile-btn .pname { display: none; } .profile-btn { margin-right: 8px; padding: 6px 8px; } .logo-link img { height: 38px; } }
@media (max-width: 899px) { .topnav a:not(.active) { padding: 0 8px; } }
.notice { flex-wrap: wrap; } .notice > .grow { min-width: 180px; }
.tablewrap { overflow-x: auto; max-width: 100%; }
.card .table { max-width: 100%; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.kvtable dd { min-width: 0; overflow-wrap: anywhere; }
.grid2 > *, .grid3 > * { min-width: 0; }
@media (min-width: 1536px) { .work { grid-template-columns: 372px minmax(0, 1fr); } }
@media (min-width: 720px) and (max-width: 1023px) { .vsvg-inline { max-width: 420px; margin: 0 auto; } }

/* ---- page de présentation publique (#/decouvrir) ---- */
.pres { max-width: 1040px; margin: 0 auto; padding: 16px 16px 48px; display: grid; gap: 28px; }
.pres-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pres-top .logo { height: 36px; }
.pres-hero { text-align: center; display: grid; gap: 12px; padding: 24px 0 4px; }
.pres-hero h1 { font-size: clamp(26px, 5vw, 40px); margin: 0; }
.pres-hero p { margin: 0 auto; max-width: 620px; color: var(--muted, #6b7a90); }
.pres-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.pres-b h3 { margin: 8px 0 4px; font-size: 16px; } .pres-b p { margin: 0; color: var(--muted, #6b7a90); font-size: 14px; }
.pres-ic { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: rgba(60,120,220,.12); }
.pres-shotrow { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; align-items: flex-start; }
.pres-shot { margin: 0; flex: 0 0 auto; max-width: 78vw; } .pres-shot img { max-height: 420px; max-width: 100%; border-radius: 12px; border: 1px solid rgba(128,128,128,.25); }
.pres-shot figcaption { font-size: 12px; text-align: center; color: var(--muted, #6b7a90); margin-top: 4px; }
.pres-end { text-align: center; display: grid; gap: 8px; justify-items: center; }
.shop-link { margin-top: 8px; }
.pwa-banner { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 10px; border-radius: 10px; background: rgba(60,120,220,.14); font-size: 14px; flex-wrap: wrap; }
.pwa-banner.warn { background: rgba(230,160,40,.2); }

/* ---------- espace propriétaire (V0.4) ---------- */
.owner { min-height: 100vh; }
.owner-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: rgba(10,16,24,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-2); }
.owner-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 20px; font-weight: 700; background: linear-gradient(180deg, rgba(242,165,22,.2), rgba(242,165,22,.1)); border: 1px solid rgba(242,165,22,.5); color: #ffd180; }
.owner-tabs { display: flex; gap: 6px; padding: 10px 20px 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.owner-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; color: var(--mute); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.owner-tabs a.on { color: var(--text); border-bottom-color: var(--blue-2); }
.owner-main { max-width: 1180px; margin: 0 auto; padding: 20px; }
.otiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; } .otiles.small { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.otile { padding: 16px 18px; border-radius: 14px; background: linear-gradient(180deg, rgba(24,32,45,.82), rgba(16,22,32,.92)); border: 1px solid var(--line); }
.otile.warn { border-color: rgba(242,165,22,.5); }
.ol { color: var(--mute); font-size: 13.5px; } .ov { font-size: 32px; font-weight: 700; line-height: 1.15; margin: 4px 0; } .os { color: var(--mute-2); font-size: 13px; }
.ogrid { align-items: start; }
.orow { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); } .orow:last-child { border-bottom: 0; }
.obars { display: flex; flex-direction: column; gap: 10px; }
.obar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.otrack { height: 10px; border-radius: 5px; background: rgba(255,255,255,.06); overflow: hidden; } .ofill { display: block; height: 100%; border-radius: 5px; background: var(--blue-2); }
.oval { text-align: right; white-space: nowrap; }
.oaccounts { display: flex; flex-direction: column; gap: 10px; }
.oacc { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.oacc-name { font-size: 16px; overflow-wrap: anywhere; } .oacc-sub { font-size: 13.5px; overflow-wrap: anywhere; }
.oacc-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; color: var(--mute); font-size: 13.5px; }
.oacc-actions { display: flex; gap: 8px; flex: none; }
.danger-t { color: #ff9c9c; }
.oinv { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 820px) {
  .otiles { grid-template-columns: repeat(2, 1fr); } .ov { font-size: 26px; }
  .oacc { flex-direction: column; align-items: stretch; } .oacc-actions .btn { flex: 1; }
  .owner-main { padding: 14px; } .owner-bar { padding: 10px 14px; } .owner-tabs { padding: 8px 10px 0; }
  .obar { grid-template-columns: 1fr auto; } .obar .otrack { grid-column: 1 / -1; order: 3; }
  .oinv { flex-wrap: wrap; } .hide-m { display: none; }
}
.orow > span, .orow > b { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 820px) { .orow { flex-wrap: wrap; gap: 4px 14px; } }
.notice > svg.ic + div { flex: 1 1 160px; min-width: 0; }   /* l'icône reste à côté du texte, même pour un long message */
@media (max-width: 480px) { .owner-badge { padding: 5px 10px; font-size: 14px; white-space: nowrap; } .owner-bar .btn.small { padding: 0 10px; } }
.owner-bar { flex-wrap: wrap; }
.show-m { display: none; } @media (max-width: 820px) { .show-m { display: inline; } }
.owner-main section.card, .owner-main .card { min-width: 0; max-width: 100%; overflow-x: auto; }   /* un tableau trop large défile dans sa carte, jamais dans la page */
.otiles > *, .otiles.small > * { min-width: 0; }

/* ---- V0.4.2 : recherche rapide ---- */
.qs { position: relative; margin-right: 12px; width: clamp(170px, 20vw, 320px); flex: 0 1 auto; }
.qs .search .input { min-height: 44px; border-radius: 12px; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); font-size: 15px; }
.qs-pop { position: absolute; right: 0; top: calc(100% + 8px); width: min(480px, 92vw); max-height: 70vh; overflow-y: auto; z-index: 60; padding: 6px 0; box-shadow: 0 18px 50px rgba(0,0,0,.55); }
.qs-hint { padding: 14px 16px; color: var(--mute); font-size: 14px; }
.qs-sec { padding: 10px 16px 4px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--mute); }
.qs-veh { display: flex; align-items: center; gap: 8px; padding: 2px 10px; }
.qs-vbtn { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 6px; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; border-radius: 10px; font: inherit; }
.qs-vbtn:hover, .qs-q:hover { background: rgba(255,255,255,.05); }
.plate-chip { font-weight: 700; letter-spacing: .06em; padding: 3px 9px; border-radius: 7px; background: #f3f5f8; color: #12202f; font-size: 14px; white-space: nowrap; }
.qs-q { display: grid; gap: 2px; width: 100%; text-align: left; padding: 10px 16px; background: none; border: 0; border-top: 1px solid var(--line); color: inherit; font: inherit; cursor: pointer; min-height: 56px; }
.qs-l1 { display: flex; align-items: center; gap: 6px; } .qs-l2 { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-all { display: block; padding: 12px 16px; text-align: center; border-top: 1px solid var(--line); font-weight: 600; }
.mbar-r { display: flex; align-items: center; }
.qs-sheet { position: fixed; inset: 0; z-index: 95; background: var(--bg, #0c121b); display: flex; flex-direction: column; }
.qs-sheet-h { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
.qs-sheet-h .input { min-height: 48px; font-size: 16px; }
.qs-sheet-b { flex: 1; overflow-y: auto; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
/* En-tête étroit : la barre se replie en loupe (48 px) et s'étend en surimpression au focus, sans pousser la navigation. */
@media (max-width: 1499px) {
  .qs { width: 48px; margin-right: 6px; height: 48px; flex: none; }
  .qs .search { position: absolute; right: 0; top: 0; width: 48px; transition: width .15s; }
  .qs .search .input { width: 100%; padding-left: 0; padding-right: 0; cursor: pointer; color: transparent; caret-color: transparent; }
  .qs .search .input::placeholder { color: transparent; }
  .qs .search .ic { left: 14px; color: #e8edf5; }
  .qs:focus-within .search { width: min(330px, 62vw); z-index: 61; }
  .qs:focus-within .search .input { cursor: text; color: var(--text, #e8edf5); caret-color: auto; padding-left: 44px; padding-right: 12px; background: #17202d; }
  .qs:focus-within .search .input::placeholder { color: var(--mute); }
  .qs-pop { top: calc(100% + 4px); }
}
@media (max-width: 719px) { .qs { display: none; } }
@media print { .qs-sheet { display: none !important; } }
/* V0.4.2 : la loupe de recherche (48 px) prend sa place dans l'en-tête : navigation légèrement resserrée sous 1500 px pour éviter tout débordement. */
@media (min-width: 1280px) and (max-width: 1499px) { .topnav a { min-width: 92px; padding: 0 10px; } .topnav { margin-left: 12px; } .profile-btn { margin-right: 8px; } }
@media (min-width: 1180px) and (max-width: 1279px) { .topnav a { min-width: 84px; padding: 0 8px; font-size: 14px; } .topnav { margin-left: 6px; gap: 2px; } .profile-btn { margin-right: 8px; } .profile-btn .pname { display: none; } }
@media (min-width: 1024px) and (max-width: 1179px) { .topnav a { min-width: 70px; padding: 0 6px; } .logo-link { padding-left: 12px; } .profile-btn { margin-right: 6px; } .qs { margin-right: 2px; } }
@media (min-width: 720px) and (max-width: 899px) { .topnav a:not(.active) { padding: 0 6px; } .logo-link { padding-left: 10px; } .logo-link img { height: 36px; } .qs { margin-right: 2px; } .profile-btn { margin-right: 4px; padding: 6px; } }
.qs-cc { font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.1); color: var(--mute); }
.qs-group { border-top: 1px solid var(--line); padding-top: 4px; } .qs-group:first-child { border-top: 0; }

/* ---------- V0.5.1 : DSP classique (trois vues détaillées, repères) ---------- */
.dsp-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dsp-views { display: grid; grid-template-columns: 1fr; gap: 12px; }
.dsp-view { background: linear-gradient(180deg, #111c33, #0d1626); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 8px 10px 10px; }
.dsp-view-h { display: flex; justify-content: space-between; font-size: 14px; padding: 2px 4px 4px; }
.dsp-view[data-dsp-view="top"] svg { max-height: 420px; }
@media (min-width: 900px) {
  .dsp-views { grid-template-columns: 1.7fr 1fr; grid-template-rows: auto auto; }
  .dsp-view[data-dsp-view="top"] { grid-column: 2; grid-row: 1 / span 2; }
  .dsp-view[data-dsp-view="left"] { grid-column: 1; grid-row: 1; } .dsp-view[data-dsp-view="right"] { grid-column: 1; grid-row: 2; }
}
.vv svg { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.vv .vv-bg.dim { opacity: .38; }
.vv .s-body { fill: #162a52; stroke: #3b5a96; stroke-width: 1.2; } .vv .s-glass { fill: #0b1731; stroke: #29437a; stroke-width: 1; } .vv .s-glass.faint { opacity: .6; }
.vv .s-tire { fill: #05080f; stroke: #1c2740; stroke-width: 1; } .vv .s-rim { fill: #26385f; } .vv .s-hub { fill: #3d5486; }
.vv .s-seam, .vv .s-handle, .vv .s-rail { stroke: #6c82b0; stroke-width: 1.3; fill: none; } .vv .s-seam.faint { stroke-opacity: .5; }
.vv .s-mirror { fill: #1b3166; stroke: #3b5a96; } .vv .s-light { fill: #d9b455; } .vv .s-roof { fill: #2a4a8c; } .vv .s-trim { fill: #0d1830; } .vv .s-shadow { fill: rgba(0,0,0,.35); }
.vv .vz { fill: rgba(70, 130, 230, .07); stroke: rgba(150, 180, 235, .5); stroke-width: 1; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .12s; }
.vv .vz:hover { fill: rgba(70, 150, 255, .3); }
.vv .vz.has { fill: rgba(124, 193, 43, .22); }
.vv .vz.virt { stroke-dasharray: 5 3; }
/* V0.6.1 — vues sur images de référence (Clio / Jumpy) : fond blanc, zones discrètes, mise en évidence au survol / à la sélection, code couleur métier */
.vv-img { pointer-events: none; }
.vv-img.dim { opacity: .55; }
.vv:has(.vv-img) svg { background: transparent; border-radius: 10px; }   /* V0.14.2 : plus de rectangle blanc autour du dessin (images détourées) */
.vv:has(.vv-img) .vz { fill: rgba(30, 110, 230, 0); stroke: rgba(30, 80, 160, .16); stroke-width: 1; }
.vv:has(.vv-img) .vz:hover { fill: rgba(30, 110, 230, .28); stroke: rgba(30, 90, 200, .8); }
.vv:has(.vv-img) .vz.sel { fill: rgba(30, 126, 255, .32); stroke: #1e7eff; stroke-width: 2.2; }
.vv:has(.vv-img) .vz.has { fill: rgba(124, 193, 43, .5); stroke: rgba(60, 110, 10, .7); }
.vv:has(.vv-img) .vz.has.t-DSP { fill: rgba(124, 193, 43, .55); } .vv:has(.vv-img) .vz.has.t-DAP { fill: rgba(242, 165, 22, .6); } .vv:has(.vv-img) .vz.has.t-ECHANGE { fill: rgba(74, 163, 255, .58); }
.vv:has(.vv-img) .vz.has.t-PEINTURE { fill: rgba(239, 74, 74, .55); } .vv:has(.vv-img) .vz.has.t-RIEN { fill: rgba(154, 165, 181, .6); } .vv:has(.vv-img) .vz.has.t-TRADI { fill: rgba(150, 110, 220, .58); }
.vv:has(.vv-img).vv-focus .vz.off { fill: transparent; stroke: transparent; pointer-events: none; }
.vv:has(.vv-img).vv-focus .vz.f { fill: rgba(30, 126, 255, .14); stroke: #1e7eff; stroke-width: 2.4; }
.vv .vz.diag { stroke: rgba(200, 40, 120, .85); stroke-width: 1.2; fill: rgba(200, 40, 120, .12); }
.vv .vz-diag { fill: #7a0f46; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; paint-order: stroke; stroke: #fff; stroke-width: 3px; font-family: Inter, system-ui, sans-serif; }
.vv .vz-badge circle { fill: #0f1b30; stroke: #fff; stroke-width: 2; } .vv .vz-badge text { fill: #fff; font-weight: 800; text-anchor: middle; dominant-baseline: central; font-family: Inter, system-ui, sans-serif; }
.hail-views { display: grid; grid-template-columns: 1fr; gap: 10px; }
.hail-views .dsp-view { padding: 6px 8px 8px; }
@media (min-width: 900px) { .hail-views { grid-template-columns: 1.7fr 1fr; grid-template-rows: auto auto; } .hail-views .dsp-view[data-dsp-view="top"] { grid-column: 2; grid-row: 1 / span 2; } .hail-views .dsp-view[data-dsp-view="left"] { grid-column: 1; grid-row: 1; } .hail-views .dsp-view[data-dsp-view="right"] { grid-column: 1; grid-row: 2; } }
.vstage .hail-views { padding: 8px; overflow: auto; width: 100%; align-content: start; }
.vv-focus .vz { cursor: crosshair; }
.vv-focus .vz.off { fill: transparent; stroke: rgba(150, 180, 235, .18); pointer-events: none; }
.vv-focus .vz.f { fill: rgba(70, 150, 255, .2); stroke: #8cc4ff; stroke-width: 2; }
.vv .vmk { cursor: grab; } .vv .vmk.dim { opacity: .4; pointer-events: none; }
/* V0.6 — détails de carrosserie (décor) */
.vv .s-arch { fill: #02050b; } .vv .s-sidewall { fill: #0c1426; } .vv .s-disc { fill: #1a2744; stroke: #2c426f; stroke-width: .8; }
.vv .s-spoke { stroke: #5a74a8; stroke-width: 2.2; fill: none; stroke-linecap: round; }
.vv .s-crease, .vv .s-trimline, .vv .s-wiper { stroke: #5a74a8; stroke-width: 1.1; fill: none; stroke-linecap: round; } .vv .s-crease.faint { stroke-opacity: .45; } .vv .s-trimline { stroke: #8aa3d6; stroke-width: 1.3; } .vv .s-wiper { stroke: #0a1226; stroke-width: 1.6; }
.vv .s-grille { fill: #060b16; stroke: #29437a; stroke-width: .8; } .vv .s-fog { fill: #d9b455; stroke: #0a1226; stroke-width: .8; } .vv .s-plate { fill: #cfd8ea; stroke: #0a1226; stroke-width: .6; } .vv .s-mirrorglass { fill: #0b1731; }
.vv .vmn { fill: #0a1018; font-weight: 800; text-anchor: middle; dominant-baseline: central; pointer-events: none; font-family: Inter, system-ui, sans-serif; }
.vv .vmk.draft circle:nth-child(2) { animation: none; }
.mstage { gap: 12px; } .mstage-view { background: linear-gradient(180deg, #111c33, #0d1626); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 6px; max-width: 920px; margin: 0 auto; width: 100%; }
.mstage-view .vv svg { max-height: 46vh; }
.mform { background: var(--card-2); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 12px; display: flex; flex-direction: column; gap: 10px; max-width: 920px; margin: 0 auto; width: 100%; }
.mform-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .mform-row .seg { flex: 1; min-width: 220px; }
.mform-l { width: 96px; font-weight: 600; color: var(--mute); font-size: 14px; }
.mform .seg button { min-height: 44px; }
.mform-act { gap: 8px; flex-wrap: wrap; }
.mprice { min-width: 120px; max-width: 150px; }
.kdot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.4); }
.mchips { display: flex; flex-wrap: wrap; gap: 8px; max-width: 920px; margin: 0 auto; width: 100%; }
.mchip { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: #131b26; font-size: 13.5px; } .mchip.on { border-color: var(--blue-3); background: var(--active-2); }
.linkbtn { color: var(--blue-3); text-decoration: underline; font-size: 12.5px; }
.dsp-legend { display: flex; gap: 16px; font-size: 13.5px; color: var(--mute); margin-top: 8px; }
.mnum { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; color: #0a1018; font-weight: 800; font-size: 13px; }
.mtable td, .mtable th { padding: 9px 12px; }

/* ---------- V0.5.1 : choix du mode métier, lignes libres ---------- */
.modecards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; max-width: 980px; margin: 0 auto; }
.modecard { text-align: left; padding: 18px; border-radius: var(--radius-lg); border: 1px solid var(--line-2); background: linear-gradient(180deg, #14213a, #0f1830); display: flex; flex-direction: column; gap: 8px; min-height: 150px; transition: .15s; position: relative; }
.modecard:hover { border-color: var(--blue-3); transform: translateY(-1px); }
.modecard h3 { font-size: 19px; display: flex; align-items: center; gap: 10px; } .modecard p { margin: 0; color: var(--mute); font-size: 14px; }
.modecard.locked { opacity: .8; } .modecard .badge { align-self: flex-start; }
.pill-mode { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(124,193,43,.14); border: 1px solid rgba(124,193,43,.5); color: #c9ec97; font-weight: 600; font-size: 13.5px; }
.freelines { display: flex; flex-direction: column; gap: 10px; }
.fl { background: var(--card-2); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 12px; display: grid; gap: 8px; grid-template-columns: 1fr; }
.fl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; align-items: end; }
.fl-grid label { font-size: 12.5px; color: var(--mute); display: flex; flex-direction: column; gap: 4px; }
.fl-amt { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.fl-act { display: flex; gap: 6px; justify-content: flex-end; }

/* ---- V0.6 : commentaires par ligne, commentaire général, ordre de réparation ---- */
.lc-input { width: 100%; min-width: 180px; min-height: 34px; max-height: 140px; resize: vertical; padding: 6px 9px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); color: var(--text); font: 400 14px/1.35 var(--font); }
.lc-input::placeholder { color: var(--mute-2); }
.lc-input:focus { outline: 2px solid var(--blue-2); outline-offset: 0; }
.lc-input[readonly] { background: transparent; border-color: transparent; padding-left: 0; resize: none; }
.eltable td.lc-cell, .ctable td.lc-cell { text-align: left; padding: 4px 8px; height: auto; min-width: 200px; }
.eltable th.lc-th, .ctable th.lc-th { min-width: 200px; }
.mrow-wrap { border-bottom: 1px solid var(--line); } .mrow-wrap:last-child { border-bottom: 0; } .mrow-wrap .mrow { border-bottom: 0; }
.mrow-cmt { padding: 0 6px 10px; } .mrow-cmt .lc-input { min-height: 44px; font-size: 16px; }
.fl-cmt { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--mute); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.presets .chip { min-height: 34px; padding: 5px 12px; font-size: 13.5px; text-align: left; }
.ro-page { max-width: 880px; margin: 0 auto; padding: 14px; display: grid; gap: 14px; }
.ro-doc { background: #fff; color: #1c2430; border-radius: 12px; padding: 22px 24px; font-size: 14.5px; line-height: 1.45; display: grid; gap: 12px; }
.ro-doc h2 { font-size: 20px; letter-spacing: .02em; color: #12335c; } .ro-doc h4 { font-size: 13px; text-transform: uppercase; color: #12335c; letter-spacing: .05em; margin: 6px 0 4px; }
.ro-doc table { width: 100%; border-collapse: collapse; } .ro-doc th { background: #12335c; color: #fff; font-size: 12.5px; padding: 6px 8px; text-align: left; } .ro-doc td { border-bottom: 1px solid #dfe5ee; padding: 6px 8px; vertical-align: top; }
.ro-doc .ro-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .ro-doc .ro-box { border: 1px solid #cfd8e5; border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; }
.ro-doc .ro-stamp { display: inline-block; border: 2px solid #c0392b; color: #c0392b; border-radius: 6px; padding: 2px 10px; font-weight: 700; font-size: 13px; transform: rotate(-3deg); }
.ro-doc .ro-stamp.ok { border-color: #1f8a4c; color: #1f8a4c; }
.ro-sign { display: grid; gap: 10px; }
.sigpad-wrap { position: relative; border: 2px dashed var(--line-3); border-radius: 12px; background: #fff; }
.sigpad { display: block; width: 100%; height: 220px; touch-action: none; cursor: crosshair; border-radius: 10px; }
.sigpad-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #8a96a8; pointer-events: none; font-size: 16px; }
.ro-steps { display: flex; gap: 8px; flex-wrap: wrap; } .ro-steps span { padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.06); font-size: 13px; color: var(--mute); } .ro-steps span.on { background: var(--active); color: #fff; }
.ro-list-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card-2); }
@media (max-width: 720px) { .ro-doc { padding: 16px 14px; } .ro-doc .ro-cols { grid-template-columns: 1fr; } .sigpad { height: 260px; } .eltable td.lc-cell { min-width: 150px; } }
@media print { .ro-page > :not(.ro-doc) { display: none; } }
.secret-box-note { border: 1px dashed rgba(242,165,22,.5); background: rgba(242,165,22,.06); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-top: 10px; }
.kseg { grid-auto-flow: row !important; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }
.kseg button { border-bottom: 1px solid var(--line); } .kseg button.on { background: linear-gradient(180deg, #2a3446, #222b3a); box-shadow: inset 0 0 0 2px var(--blue-2); }
.dsp-legend .kdot, .kseg .kdot { width: 13px; height: 13px; }
.vz.t-DSP.has { fill: rgba(124,193,43,.55); } .vz.t-DAP.has { fill: rgba(242,165,22,.55); } .vz.t-ECHANGE.has { fill: rgba(74,163,255,.55); } .vz.t-PEINTURE.has { fill: rgba(239,74,74,.55); } .vz.t-RIEN.has { fill: rgba(154,165,181,.5); } .vz.t-TRADI.has { fill: rgba(185,163,230,.55); }

.vsvg .vm.has.t-DSP .vc { fill: #86c926; stroke: #d8f2a8; } .vsvg .vm.has.t-DAP .vc { fill: #f2a516; stroke: #ffdf9c; } .vsvg .vm.has.t-ECHANGE .vc { fill: #4aa3ff; stroke: #cfe4ff; } .vsvg .vm.has.t-PEINTURE .vc { fill: #ef4a4a; stroke: #ffc4c4; } .vsvg .vm.has.t-RIEN .vc { fill: #9aa5b5; stroke: #dfe5ee; } .vsvg .vm.has.t-TRADI .vc { fill: #b9a3e6; stroke: #e6dcff; }
.vsvg .vz.has.t-DSP { fill: rgba(122,196,30,.78); } .vsvg .vz.has.t-DAP { fill: rgba(242,165,22,.78); stroke: #ffdf9c; } .vsvg .vz.has.t-ECHANGE { fill: rgba(74,163,255,.75); stroke: #cfe4ff; } .vsvg .vz.has.t-PEINTURE { fill: rgba(239,74,74,.75); stroke: #ffc4c4; } .vsvg .vz.has.t-RIEN { fill: rgba(154,165,181,.65); stroke: #dfe5ee; } .vsvg .vz.has.t-TRADI { fill: rgba(185,163,230,.75); stroke: #e6dcff; }
.vsvg .vm.has.t-PEINTURE .vn, .vsvg .vm.has.t-ECHANGE .vn { fill: #fff; }

/* V0.6.1b — DSP classique : aucun coloriage permanent des zones ; seuls les repères numérotés comptent. Une zone portant des repères reçoit un simple contour renforcé. */
.vv:has(.vv-img) .vz.hm { fill: transparent; stroke: rgba(30, 80, 160, .38); stroke-width: 1.2; }
.vv .vz.hm { fill: transparent; }
.vv:not(.vv-focus) .vmn { font-size: inherit; }

/* ---- V0.8 : visionneuse PDF intégrée (thème bleu nuit / noir) ---- */
.pdfv { position: fixed; inset: 0; z-index: 1200; display: flex; flex-direction: column; background: #05080f; color: #e8eefc; }
.pdfv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 12px; background: #0b1426; border-bottom: 1px solid #1c2c4c; }
.pdfv-title { flex: 1 1 160px; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdfv-grp { display: inline-flex; align-items: center; gap: 4px; }
.pdfv-actions { gap: 6px; flex-wrap: wrap; }
.pdfv-pg, .pdfv-z { min-width: 62px; text-align: center; font-variant-numeric: tabular-nums; color: #cfdaf5; }
.pdfv-z { background: transparent; border: 1px solid #243759; border-radius: 8px; color: inherit; min-height: 36px; cursor: pointer; }
.pdfv-note { display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: #3a2c07; color: #ffe29a; font-size: 14px; }
.pdfv-scroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; background: #0a0f1c; padding: 14px 8px 40px; touch-action: pan-x pan-y pinch-zoom; }
.pdfv-pages { display: flex; flex-direction: column; align-items: center; gap: 14px; width: max-content; min-width: 100%; margin: 0 auto; }
.pdfv-page { background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.55); flex: none; max-width: none; }
.pdfv-state { display: grid; justify-items: center; gap: 12px; padding: 60px 16px; color: #b9c7e8; text-align: center; }
.pdfv-frame { width: 100%; height: 100%; border: 0; background: #fff; border-radius: 8px; }
@media (max-width: 719px) {
  .pdfv-bar { padding: 6px 8px; gap: 6px 8px; }
  .pdfv-title { flex-basis: 100%; font-size: 15px; }
  .pdfv-actions .lbl { display: none; }
  .pdfv-actions .btn { min-width: 44px; min-height: 44px; padding: 0 10px; }
  .pdfv-bar .iconbtn { min-width: 44px; min-height: 44px; }
  .pdfv-scroll { padding: 8px 4px 32px; }
}
@media print { .pdfv { display: none !important; } }

/* ---- V0.8 : jetons, bandeaux, documents juridiques ---- */
.token-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 14px; text-decoration: none; border: 1px solid #28406b; background: #0f1d36; color: #dbe6ff; margin-right: 8px; white-space: nowrap; }
.token-chip.warn { border-color: #8a6a1a; background: #2a2208; color: #ffe29a; }
.token-chip.danger { border-color: #8a2a2a; background: #2e0e0e; color: #ffb4b4; }
.token-chip .ic { width: 18px; height: 18px; }
.mbar-r .token-chip { padding: 4px 8px; margin-right: 2px; }
.legal-wrap { align-items: start; }
.legal-card { width: min(860px, 100%); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.legal-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.legal-tabs a { padding: 7px 12px; border-radius: 8px; border: 1px solid #243759; color: inherit; text-decoration: none; font-size: 14px; }
.legal-tabs a.active { background: #1b64c8; border-color: #1b64c8; color: #fff; }
.legal-body { line-height: 1.65; font-size: 15.5px; overflow-wrap: anywhere; }
.legal-body h2 { font-size: 19px; margin: 22px 0 6px; } .legal-body h3 { font-size: 16.5px; margin: 16px 0 4px; }
.legal-body table { border-collapse: collapse; } .legal-body td, .legal-body th { border: 1px solid #243759; padding: 5px 8px; }
.check-row a { text-decoration: underline; }
.warnc { color: #f1b84b; }
.rte { border: 1px solid #243759; border-radius: 10px; overflow: hidden; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: #0b1426; border-bottom: 1px solid #243759; }
.rte-bar button { min-width: 38px; min-height: 36px; border-radius: 8px; border: 1px solid #243759; background: #0f1d36; color: inherit; cursor: pointer; }
.rte-edit { min-height: 260px; max-height: 60vh; overflow: auto; padding: 12px; background: #070d1a; line-height: 1.6; outline: none; }
.stale-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 13px; background: #3a2c07; color: #ffe29a; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; margin: 8px 0; }
.feat-row { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; } .feat-row input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } @media (max-width: 719px) { .grid3 { grid-template-columns: 1fr; } }

/* ===================================================================== V0.9 — vue grêle à pastilles, fiche élément, observations, dégarnissage */
.overlay.side { place-items: stretch end; padding: 0; }
.overlay.side .modal { width: min(460px, 100%); height: 100dvh; max-height: 100dvh; border-radius: 18px 0 0 18px; animation: slidein .18s ease-out; }
@keyframes slidein { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.hailschema { display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; }
.hailtop { width: 100%; max-width: 560px; margin: 0 auto; background: linear-gradient(180deg, #111c33, #0d1626); border: 1px solid var(--line-2); border-radius: 16px; padding: 4px; touch-action: manipulation; }
.hailtop svg { width: 100%; height: auto; display: block; max-height: 68dvh; user-select: none; -webkit-user-select: none; }
.hailtop-img { opacity: .94; pointer-events: none; }
.hailschema-bar { display: flex; gap: 8px; justify-content: center; width: 100%; }
.hailschema-bar .btn { min-height: 46px; }
.schema-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.schema-actions .btn { padding: 0 8px; font-size: 14px; min-height: 48px; }
.hpin { cursor: pointer; outline: none; }
.hpin-hit { fill: transparent; }
.hpin-disc { stroke: #0d1626; stroke-width: 6; transition: transform .1s; }
.hpin.empty .hpin-disc { stroke: rgba(255,255,255,.55); stroke-width: 4; stroke-dasharray: 10 8; }
.hpin-txt { text-anchor: middle; dominant-baseline: central; font-weight: 800; pointer-events: none; font-family: var(--font); }
.hpin-lead { stroke: rgba(255,255,255,.55); stroke-width: 4; stroke-dasharray: 3 8; stroke-linecap: round; pointer-events: none; }
.hpin-anchor { fill: #fff; stroke: #0d1626; stroke-width: 3; pointer-events: none; }
.hpin-ring { fill: none; stroke: #fff; stroke-width: 6; pointer-events: none; }
.hpin:focus-visible .hpin-ring-f, .hpin:focus-visible .hpin-disc { stroke: #fff; stroke-width: 8; }
.hpin-badge circle { fill: #fff; stroke: #0d1626; stroke-width: 3; }
.hpin-badge text { text-anchor: middle; dominant-baseline: central; font-weight: 800; fill: #0d1626; pointer-events: none; }
.hpin.empty .hpin-txt { fill: #0d1a2b; }
.rv-wheel { fill: #1d2738; } .rv-body { fill: #24324a; stroke: rgba(255,255,255,.3); stroke-width: 4; }
.rv-glass { fill: #0f1a2c; stroke: rgba(255,255,255,.25); stroke-width: 3; } .rv-lamp { fill: #7a2b2b; } .rv-bumper { fill: #1b2638; stroke: rgba(255,255,255,.25); stroke-width: 3; }
.rv-seam { fill: none; stroke: rgba(255,255,255,.35); stroke-width: 3; }
.rv-zone { stroke: transparent; stroke-width: 3; cursor: pointer; fill-opacity: .28; } .rv-zone.has { stroke: rgba(255,255,255,.55); } .rv-zone:hover { stroke: rgba(255,255,255,.4); } .rv-zone.sel { stroke: #fff; stroke-width: 6; }
.hailrear .hint.center { text-align: center; }
/* fiche élément */
.slbl { font-size: 13px; font-weight: 700; color: var(--mute); margin-bottom: 6px; text-transform: none; }
.kseg { grid-template-columns: repeat(3, 1fr); grid-auto-flow: row; }
.kseg button { min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; border-bottom: 1px solid var(--line); }
.kseg button.on { background: rgba(124,193,43,.16); box-shadow: inset 0 0 0 2px var(--green); }
.kdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.drow { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.drow.act { border-color: var(--green); background: rgba(124,193,43,.08); }
.dlab { display: flex; flex-direction: column; min-width: 0; } .dlab small { color: var(--mute); font-size: 12.5px; }
.dstep { display: grid; grid-template-columns: 48px 76px 48px; gap: 6px; }
.dstep button { min-height: 48px; border-radius: 10px; background: #1c2431; border: 1px solid var(--line-2); font-size: 22px; font-weight: 700; }
.dstep input { min-height: 48px; width: 100%; text-align: center; font-size: 20px; font-weight: 700; border-radius: 10px; background: #0e151f; border: 1px solid var(--line-2); color: var(--text); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.keypad button { min-height: 54px; font-size: 22px; font-weight: 700; border-radius: 12px; background: #1c2431; border: 1px solid var(--line-2); }
.sheetcol { min-width: 0; } .sheetcol * { max-width: 100%; }
/* observations / dégarnissage / configuration */
.obsgrid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.degarn-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 520px) { .degarn-list { grid-template-columns: 1fr; } }
.obsopt { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: #151d29; text-align: left; font-weight: 600; font-size: 15px; color: var(--text); }
.obsopt .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line-3); display: grid; place-items: center; flex: none; }
.obsopt.on { border-color: var(--green); background: rgba(124,193,43,.12); } .obsopt.on .box { background: var(--green); border-color: var(--green); color: #0d1a05; }
.obsopt.wide { width: 100%; } .obsopt .lb { min-width: 0; overflow-wrap: anywhere; }
.moneybox.sm { min-height: 40px; } .moneybox.sm input { width: 90px; }
.recap-degarn { margin-top: 6px; font-size: 13px; color: var(--mute); }
.recap-degarn button { color: #8fc0ff; font-weight: 600; font-size: 13.5px; }
/* éditeur de listes (Paramètres) */
.listedit { display: flex; flex-direction: column; gap: 8px; }
.listedit .lrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.03); }
.listedit .lrow.hid { opacity: .5; } .listedit .lrow .btns { display: flex; gap: 4px; }
.listedit .lrow .btns .btn { min-height: 38px; padding: 0 10px; }
@media (max-width: 720px) { .overlay.side { padding: 0; } }
.vtag { margin-left: 8px; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--line-2); color: var(--mute); background: #1a2331; } .vtag.utilitaire { color: #ffd479; border-color: rgba(242,165,22,.5); }
.chipbtn { min-height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: #151d29; font-weight: 600; font-size: 14px; color: var(--text); } .chipbtn.on { border-color: var(--green); background: rgba(124,193,43,.14); } .chipbtn:disabled { opacity: .4; }
/* V0.9 : la vue grêle ne doit jamais élargir la page (iPhone SE / petits écrans) */
.work, .qbody > *, .vsvg-inline, .hailschema, .hailtop { min-width: 0; max-width: 100%; }
.hailtop svg { max-width: 100%; }
.hailschema > .hailtop { width: 100%; }
.schema-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.schema-actions .btn { min-width: 0; flex-direction: column; gap: 2px; padding: 6px 4px; line-height: 1.15; font-size: 13.5px; white-space: normal; text-align: center; overflow-wrap: anywhere; }
@media (min-width: 720px) { .schema-actions .btn { flex-direction: row; gap: 8px; font-size: 14.5px; } }
/* V0.9 : en-tête mobile — le logo se réduit au lieu de pousser les icônes hors de l'écran (360 px) */
@media (max-width: 600px) { .mbar { gap: 4px; padding: 0 8px 0 12px; } .mbar > a, .mbar > button:first-child { min-width: 0; flex: 0 1 auto; } .mbar img { height: auto; max-height: 44px; max-width: 100%; width: auto; min-width: 0; object-fit: contain; } .mbar-r { flex: none; } .mbar .iconbtn { width: 40px; } }

/* ======================================================================== V0.10 */
/* Plaque : partie bleue cliquable + menu pays ancré dessous */
.plate .eu-btn { border: 0; cursor: pointer; font-family: var(--font); min-width: 44px; width: 44px; padding: 0 0 3px; }
.plate .eu-btn:disabled { cursor: default; }
.plate .eu-btn .eu-code { font-size: 15px; font-weight: 800; line-height: 1; }
.plate .eu-btn .eu-caret { font-size: 9px; line-height: 1; opacity: .85; }
.plate-menu { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(290px, 92vw); max-height: 320px; overflow: auto; background: #111a27; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, .55); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.plate-menu button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border-radius: 8px; text-align: left; font-size: 15px; font-weight: 500; color: var(--text); }
.plate-menu button.on, .plate-menu button:hover { background: #1b2a40; }
.plate-menu .fl { font-size: 22px; width: 28px; text-align: center; }
.plate-menu .plate-more { color: #7db8ff; justify-content: center; }
.plate-menu .plate-hint { font-size: 12.5px; color: var(--mute); padding: 6px 10px 4px; }
.vin-input { text-transform: uppercase; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.known-alert { border: 1px solid #c9922b; background: rgba(201, 146, 43, .1); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.known-alert .kq { display: flex; gap: 8px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.fold-h { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: #121b29; font-weight: 600; font-size: 16px; color: var(--text); }
.fold-b { padding: 10px 2px 2px; display: flex; flex-direction: column; gap: 10px; }
.stepper.s4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.sortbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--mute); }
.sortbar .chip { min-height: 36px; }
.nearby-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 12px; border-radius: 12px; background: #121b29; border: 1px solid var(--line-2); text-align: left; color: var(--text); }
.nearby-row .dist { font-weight: 700; color: #7db8ff; white-space: nowrap; }
.offline-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 8px 14px; font-size: 14px; font-weight: 600; }
.offline-bar.off { background: #5a3b05; color: #ffe2a6; }
.offline-bar.sync { background: #123a63; color: #cfe6ff; }
.offline-bar.err { background: #5b1d22; color: #ffd0d3; }
.kpis3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.kpis3 .kpi { padding: 10px 12px; }
.kpis3 .kl { font-size: 13px; }
.kpis3 .kv2 { font-size: 26px; }
@media (max-width: 640px) { .kpis3 .kl { font-size: 12px; gap: 4px; } .kpis3 .kv2 { font-size: 22px; } }

/* V0.10 — Mon activité */
.pie-card summary{cursor:pointer;list-style:none}
.pie-row{display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.pie-leg{list-style:none;margin:0;padding:0;flex:1;min-width:160px;display:flex;flex-direction:column;gap:6px}
.pie-leg li{display:flex;align-items:center;gap:8px;font-size:14px}
.pie-leg i{width:12px;height:12px;border-radius:3px;display:inline-block}
.seg.scroll{overflow-x:auto;flex-wrap:nowrap;max-width:100%}
.seg.scroll button{white-space:nowrap}
.notice.compact{padding:8px 12px;font-size:13px;gap:8px}
.page-h .iconbtn.flat{margin-left:4px}
.pwa-banner.danger { background: rgba(220,70,70,.22); }

/* ---- V0.11 : contacts, actions rapides, groupes de devis ---- */
.clink { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: #9ccaff; text-decoration: none; word-break: break-all; }
.clink:hover, .clink:focus-visible { text-decoration: underline; }
.clink .ic { width: 16px; height: 16px; flex: 0 0 auto; }
.ccard .avatar .ic { width: 20px; height: 20px; }
.popmenu .btn.flat { background: transparent; border: 0; box-shadow: none; text-align: left; min-height: 44px; }
.popmenu .btn.flat:hover { background: rgba(255,255,255,.06); }
@media (max-width: 480px) { .ccard { padding: 10px 12px !important; } .popmenu { right: 6px !important; min-width: 200px !important; } }
.qa { position: relative; margin: -4px 0 12px; }
.qa-toggle { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 12px; border: 1px solid var(--line-2, #2b3a4f); background: rgba(255,255,255,.04); color: inherit; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.qa-toggle .ic { width: 18px; height: 18px; }
.qa-toggle:focus-visible, .qa-item:focus-visible { outline: 2px solid #3a8ef5; outline-offset: 2px; }
.qa-menu { display: flex; flex-direction: column; margin-top: 6px; padding: 6px; border-radius: 14px; border: 1px solid var(--line-2, #2b3a4f); background: var(--surface, #0e1726); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.qa-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; font-size: 16px; text-align: left; cursor: pointer; width: 100%; overflow-wrap: anywhere; }
.qa-item:hover:not([disabled]) { background: rgba(255,255,255,.07); }
.qa-item[disabled] { opacity: .45; cursor: not-allowed; }
.qa-item .ic { width: 20px; height: 20px; flex: 0 0 auto; }

/* V0.11 — Ajustement rapide des matrices grêle : cartes dépliables compactes */
[data-adj-card] > summary, [data-adv-tiers] > summary { list-style: none; }
[data-adj-card] > summary::-webkit-details-marker, [data-adv-tiers] > summary::-webkit-details-marker { display: none; }
[data-adj-card][open] > summary .ic:last-child { transform: rotate(180deg); }
[data-adj-card] .table td, [data-adj-card] .table th { padding: 6px 8px; }
[data-adj-card] .cell-input { width: 110px; text-align: right; }
@media (max-width: 480px) { [data-hail-adjust] .seg button { min-height: 44px; } }

/* V0.11 — page « À propos » / vision et bouton discret sur les pages d'offres */
.vision { max-width: 65ch; margin: 0 auto; display: grid; gap: 12px; padding: 8px 4px 32px; line-height: 1.65; }
.vision h1 { font-size: 26px; margin: 4px 0 0; color: var(--blue-3, #60a5fa); }
.vision h2 { font-size: 21px; margin: 18px 0 0; }
.vision h3.vision-sub { font-size: 17px; margin: 0; font-weight: 600; color: #b9d6fa; }
.vision p, .vision ul { margin: 0; } .vision ul { padding-left: 20px; display: grid; gap: 4px; }
.vision-logo { max-width: 100%; height: auto; justify-self: center; margin-top: 8px; }
.vision-sign { display: grid; gap: 4px; margin-top: 12px !important; padding-top: 14px; border-top: 1px solid var(--line, #2a394d); }
.vision > .btn { justify-self: start; } .vision > .btn.primary { justify-self: stretch; margin-top: 12px; }
.vision-link { max-width: 520px; margin: 12px auto 0; display: grid; gap: 4px; }
.vision-link .btn { justify-content: center; gap: 8px; background: transparent; }
@media (max-width: 400px) { .vision h1 { font-size: 23px; } .vision h2 { font-size: 19px; } }

/* ---- V0.12 : forfaits panneaux (éditeur de barèmes, conditions du client, chiffrage DSP) — même identité premium bleu / noir ---- */
.pn-limits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.pn-lim { display: grid; gap: 4px; font-size: 13px; color: var(--mute-2); }
.pn-lim .cell-input, .pn-mm { text-align: center; }
.pn-rows { display: grid; gap: 8px; }
.pn-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr) 40px; gap: 8px; align-items: center; }
.pn-row .moneybox { height: 38px; font-size: 16px; padding: 0 10px; gap: 6px; }
.pn-row .moneybox input { font-size: 16px; text-align: right; }
.pn-head { font-size: 12.5px; color: var(--mute-2); }
.pn-int { text-align: center; }
.pn-price { font-size: 26px; color: var(--blue-3); font-weight: 650; font-variant-numeric: tabular-nums; }
.pn-sim { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pn-sim label { display: grid; gap: 4px; font-size: 13px; color: var(--mute-2); }
.warn-text { color: #ffd180; }
.ptable td .moneybox { height: 38px; font-size: 16px; padding: 0 10px; min-width: 120px; }
.ptable td .moneybox input { font-size: 16px; text-align: right; }
.ptable td .linkbtn { font-size: 12.5px; margin-top: 4px; }
@media (max-width: 480px) {
  .pn-row { grid-template-columns: minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.4fr) 36px; gap: 6px; }
  .pn-sim { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pn-price { font-size: 23px; }
}

/* ---- Correctifs ergonomie (chiffrage) : ligne Dégarnissage à prix cliquable, sans bouton « Choisir » ---- */
.degarn-wrap { display: grid; gap: 6px; min-width: 0; }
.degarn-wrap .optrow { flex-wrap: wrap; min-width: 0; row-gap: 6px; gap: 8px 10px; }
.degarn-wrap .optrow .lbl2 { flex: 1 1 108px; min-width: 0; }
.degarn-wrap .optrow .toggle { margin-left: auto; flex: none; }
.pricebtn { cursor: pointer; height: 40px; min-width: 96px; max-width: 140px; padding: 0 10px; font-size: 16.5px; justify-content: space-between; color: var(--text); text-align: left; }
.pricebtn .num { flex: 1; text-align: right; font-variant-numeric: tabular-nums; }
.pricebtn.open { border-color: var(--blue-3, #3b82f6); }
.pricebtn:disabled { opacity: .6; cursor: default; }
.degarn-pick { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line-2); border-radius: 12px; background: #0f1620; min-width: 0; }
.degarn-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 6px 12px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text); font-size: 16px; text-align: left; min-width: 0; flex-wrap: wrap; }
button.degarn-opt { cursor: pointer; width: 100%; }
.degarn-opt .dl { flex: 1 1 80px; min-width: 0; overflow-wrap: anywhere; }
.degarn-opt .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.degarn-opt.on { background: rgba(37, 99, 235, .18); border-color: #2563eb; }
.degarn-opt.custom .moneybox { max-width: 150px; }
@media (max-width: 340px) { .degarn-wrap .optrow .pricebtn { order: 3; flex: 1 1 100%; max-width: none; } .degarn-wrap .optrow .toggle { order: 2; } }

/* ---- Correctif responsive global : une piste « 1fr » seule laisse le contenu le plus large (minimum de contenu) élargir toute la page ; les pistes deviennent minmax(0, 1fr)
   et les enfants de grille / flex peuvent rétrécir (retours à la ligne), sans masquer aucune commande par « overflow: hidden ». ---- */
.grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.seg { grid-auto-columns: minmax(0, 1fr); }
.seg button { min-width: 0; overflow-wrap: anywhere; }
.stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.methods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.total-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.tabs2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.qcard { grid-template-columns: minmax(0, 1fr) auto; }
.plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qmain, .rcol, .rcard, .rcard-b, .qmain > *, .rcol > * { min-width: 0; max-width: 100%; }
.optrow { min-width: 0; } .optrow .lbl2 { min-width: 0; overflow-wrap: anywhere; }
.recap-row { gap: 10px; } .recap-row > span { min-width: 0; overflow-wrap: anywhere; }
.recap-row b, .tot-ht b, .tot-ttc b { overflow-wrap: normal; white-space: nowrap; }
@media (max-width: 1279px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1023px) { .shell { grid-template-columns: minmax(0, 1fr); } .qgrid { grid-template-columns: minmax(0, 1fr); } .plans { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 719px) {
  .tabbar { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .work { grid-template-columns: minmax(0, 1fr); }
  .table.resp tr { grid-template-columns: minmax(0, 1fr) auto; }
  .mrow { grid-template-columns: minmax(0, 1fr) auto auto; }
  .drow, .listedit .lrow { grid-template-columns: minmax(0, 1fr) auto; }
  .obsgrid { grid-template-columns: minmax(0, 1fr); }
  .degarn-list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stepper.s4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .schema-actions, .keypad, .kpis3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) { .degarn-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 820px) { .obar { grid-template-columns: minmax(0, 1fr) auto; } .otiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1499px) { .dsp-views { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 900px) { .dsp-views { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }
@media (max-width: 899px) { .hail-views { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 900px) { .hail-views { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }
@media (max-width: 360px) {
  .schema-actions .btn { font-size: 12.5px; padding: 6px 2px; overflow-wrap: normal; word-break: normal; hyphens: none; }
  .step { font-size: 12.5px; min-width: 0; overflow-wrap: normal; text-align: center; } .stepper { padding-left: 2px; padding-right: 2px; }
  .total-row b { font-size: 19px; }
}
@media (max-width: 340px) { .schema-actions .btn { font-size: 11.5px; } .step { font-size: 11.5px; } .total-row b { font-size: 17px; } }

/* ---- Ordre de réparation : boutons d'action empilés sur mobile, côte à côte quand la largeur le permet ---- */
.ro-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; min-width: 0; }
.ro-actions > .btn { flex: 1 1 250px; min-width: 0; max-width: 100%; white-space: normal; line-height: 1.2; text-align: center; justify-content: center; }
.ro-actions > .stale-pill { flex: 1 1 100%; }

/* ===== Espace client (correctifs V0.13) : fiche = espace de travail ; rubriques de facturation préparées (« non disponible ») ===== */
.cws { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; min-width: 0; }
.cws-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.cws-id { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 240px; }
.cws-av { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(58,142,245,.14); border: 1px solid rgba(58,142,245,.35); color: #9ccaff; font-size: 22px; flex: none; }
.cws-name { font-size: 19px; font-weight: 650; overflow-wrap: anywhere; }
.cws-sub { font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cws-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.cws-contact { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.cws-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cws-actions .btn { flex: 1 1 180px; justify-content: center; white-space: normal; }
.cws-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .cws-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cws-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px; min-width: 0; border-radius: var(--radius); background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line-2); color: var(--text); }
.cws-card:hover { border-color: var(--blue-2); }
.cws-card { position: relative; padding-right: 30px; }
.cws-chev { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--mute-2); display: grid; place-items: center; font-size: 18px; }
.cws-card:hover .cws-chev { color: var(--blue-3); }
.cws-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(58,142,245,.14); color: var(--blue-3); font-size: 17px; flex: none; }
.cws-ic.big { width: 44px; height: 44px; font-size: 22px; }
.cws-lbl { font-size: 13.5px; color: var(--mute); line-height: 1.2; overflow-wrap: anywhere; }
.cws-n { font-size: 24px; font-weight: 700; line-height: 1; }
.cws-card.na { border-style: dashed; background: transparent; }
.cws-card.na .cws-ic { background: rgba(255,255,255,.05); color: var(--mute-2); }
.cws-na, .cws-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 600; color: var(--mute); background: rgba(255,255,255,.06); border: 1px solid var(--line-2); white-space: nowrap; }
.cws-unavail { opacity: .75; border-style: dashed; }
.cws-unavail .cws-pill { margin-left: 6px; }
.cws-money { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cws-m { display: flex; flex-direction: column; gap: 6px; min-width: 0; } .cws-m b { font-size: 18px; }
.cws-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.cs-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-width: 0; }
@media (max-width: 360px) { .cws-money { grid-template-columns: minmax(0, 1fr); } .cws-n { font-size: 21px; } }
/* Boutons : jamais plus larges que leur conteneur (le libellé passe à la ligne au lieu de faire déborder la page, ex. « Enregistrer les conditions du client » à 320 px). */
.btn { max-width: 100%; }
@media (max-width: 420px) { .card .btn:not(.small):not(.iconbtn) { white-space: normal; text-align: center; } }

/* ===== V0.13.2 : immatriculation française — switch Nouveau / Ancien format et saisie en trois zones AA-123-AA ===== */
/* plaque + bouton de recherche : grille à deux colonnes — le switch et les notes occupent toute la largeur, la plaque et la loupe restent alignées sur la même ligne */
.plate-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 6px; align-items: stretch; }
.plate-wrap > .plate-anchor { display: contents; }
.plate-wrap .plate-fmt { grid-column: 1 / -1; order: 0; }
.plate-wrap .plate { order: 1; }
.plate-wrap .go { order: 2; height: 46px; align-self: start; }
.plate-wrap .plate-note { grid-column: 1 / -1; order: 3; }
.plate-wrap { position: relative; }
.plate-fmt { margin-bottom: 8px; }
.plate-fmt button { min-height: 40px; font-size: 14.5px; white-space: normal; }
.plate-zones { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 2px; padding: 0 4px; }
.plate .plate-zones .pz { flex: 2 1 0; width: 0; min-width: 0; height: 36px; padding: 0 2px; border-radius: 7px; font-size: 24px; letter-spacing: .04em; text-align: center; }
.plate .plate-zones .pz-b { flex: 3 1 0; }
.plate .plate-zones .pz:focus { background: rgba(29, 120, 224, .13); box-shadow: inset 0 0 0 2px #2a86ee; }
.plate .plate-zones .pz::placeholder { color: #b7bfcc; font-weight: 600; letter-spacing: .04em; }
.pz-sep { flex: none; color: #8a93a6; font-weight: 700; font-size: 18px; }
.plate-note { margin-top: 6px; font-size: 12.5px; color: var(--mute); line-height: 1.35; }
@media (max-width: 360px) { .plate .plate-zones .pz { font-size: 21px; } .plate-fmt button { font-size: 13px; padding: 4px 4px; } }

/* ---- V0.13.3 : barres d'onglets défilantes (Collaborateurs / Relevé / Activité / Journal / Points…) ----
   Cause du chevauchement : `.seg` impose des colonnes de largeur égale (minmax(0,1fr)) et `overflow-wrap:anywhere` → avec 5 onglets sur 320–430 px,
   les libellés étaient écrasés puis coupés. Une barre `.scroll` garde la largeur NATURELLE de chaque onglet et défile horizontalement. */
.seg.scroll { display: flex; grid-auto-flow: unset; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; max-width: 100%; min-width: 0; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scrollbar-width: thin; overscroll-behavior-x: contain; }
.seg.scroll > button { flex: 0 0 auto; width: auto; min-width: max-content; white-space: nowrap; overflow-wrap: normal; word-break: normal; padding-left: 16px; padding-right: 16px; scroll-snap-align: center; }
.seg.scroll > button.on { position: relative; }
.seg.scroll:focus-within { outline: 2px solid #4da0ff; outline-offset: 2px; }

/* V0.14 — entrées verrouillées de la navigation (dirigeant) : cadenas en coin, fonction visible mais grisée ; clic = présentation de l'offre */
.topnav a.locked, .tabbar a.locked { position: relative; opacity: .8; }
.topnav a.locked .navlock, .tabbar a.locked .navlock { position: absolute; top: 6px; right: 8px; width: 13px; height: 13px; margin: 0; opacity: .9; }
.tabbar a.locked .navlock { top: 5px; right: 10px; }
.sidenav a.locked { opacity: .78; }
.sidenav a.locked .navlbl { flex: 1; }
@media (max-width: 899px) { .topnav a.locked:not(.active) .navlock { top: 5px; right: 4px; } }

/* V0.14 — fiche élément (maquette 03) : D1/D2/D3 côte à côte, quantité unique, pavé commun */
.dtabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.dtabs button { min-height: 52px; border-radius: 12px; background: #1c2431; border: 1px solid var(--line-2); font-size: 18px; font-weight: 700; color: var(--text); }
.dtabs button.on { background: linear-gradient(180deg, #2f86ff, #1b62d6); border-color: #6ab0ff; box-shadow: 0 0 0 2px rgba(80,160,255,.35); color: #fff; }
.dqty { display: grid; grid-template-columns: 64px 1fr 64px; gap: 10px; margin-top: 10px; }
.dqty button { min-height: 56px; border-radius: 12px; background: #1c2431; border: 1px solid var(--line-2); font-size: 28px; font-weight: 700; color: var(--text); }
.dqty input { min-height: 56px; width: 100%; text-align: center; font-size: 28px; font-weight: 700; border-radius: 12px; background: #0e151f; border: 1px solid var(--line-2); color: var(--text); }
.dqty-field { position: relative; display: flex; min-width: 0; } .dqty-field input { padding: 0 52px; }
.kback { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 46px; height: 44px; min-height: 0 !important; display: flex; align-items: center; justify-content: center; padding: 0; border: 0 !important; background: transparent !important; color: var(--mute); font-size: 26px; border-radius: 10px; }
.kback:active:not(:disabled) { background: rgba(255,255,255,.08) !important; } .kback:disabled { opacity: .4; }
.dqty.small { grid-template-columns: 44px 64px 44px; gap: 6px; margin: 0; } .dqty.small button, .dqty.small input { min-height: 44px; font-size: 20px; }
.keypad { gap: 10px; } .keypad button { min-height: 58px; }
.keypad .kzero { grid-column: span 2; }
.keypad .kclr { background: linear-gradient(180deg, #e0302e, #b01616); border-color: #ff7a74; color: #fff; }
.sheet-opts { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: rgba(255,255,255,.03); }
.sheet-opts .sheet-row:last-child { border-bottom: 0; }

/* V0.14 — page véhicule (maquettes 01/02/04/05) : Vue arrière + Dégarnissage sur une même ligne */
.hailschema-bar .btn { flex: 1 1 0; min-width: 0; }
.hailschema-bar .btn[data-open-degarn] { border-color: var(--blue-2); background: linear-gradient(180deg, rgba(38,112,255,.35), rgba(20,70,190,.35)); }
.sheet-sec.prices2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.sheet-sec.prices2 .moneybox { min-width: 0; }
.hail-legend { width: 100%; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 8px 8px; background: rgba(255,255,255,.03); text-align: center; }
.hail-legend b { display: block; font-size: 14px; margin-bottom: 8px; }
.hail-legend-row { display: flex; justify-content: space-around; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--text); }
.hail-legend-row span { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.hail-legend .kdot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #000; display: inline-block; }
/* maquettes 01/02 : l'action mise en avant est « Dégarnissage » sur la vue de dessus, « Vue de dessus » sur la vue arrière */
.hailschema[data-view=rear] .hailschema-bar .btn[data-view-toggle] { border-color: var(--blue-2); background: linear-gradient(180deg, rgba(38,112,255,.35), rgba(20,70,190,.35)); }
.hailschema[data-view=rear] .hailschema-bar .btn[data-open-degarn] { border-color: var(--line-2); background: #1c2431; }


/* ===================================================================== V0.14.2 — finitions DSP classique + détourage */
/* navigation à quatre boutons : une seule vue active */
.dsp-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: #0f1827; margin: 6px 0 10px; }
.dsp-tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 64px; padding: 6px 2px; font-size: 14.5px; font-weight: 600; color: var(--text); border-right: 1px solid var(--line); line-height: 1.15; white-space: nowrap; min-width: 0; }
.dsp-tabs button:last-child { border-right: 0; }
.dsp-tabs button .ic { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; }
.dsp-tabs button .ic.flip { transform: scaleX(-1); }
.dsp-tabs button .ic svg { width: 26px; height: 26px; }
.dsp-tabs button.on { background: linear-gradient(180deg, #2278e2, #1565c4); box-shadow: inset 0 0 0 2px #4da0ff; color: #fff; }
@media (max-width: 400px) { .dsp-tabs button { font-size: 13px; } }
.dsp > .dsp-view { margin-bottom: 10px; }
/* légende encadrée (comme en grêle) */
.dsp-legend { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 14px; background: #0f1827; padding: 10px 8px; margin: 0 0 10px; }
.dsp-legend > b { font-size: 15px; }
.dsp-legend-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 14.5px; }
.dsp-legend-row span { display: inline-flex; align-items: center; gap: 6px; }
/* prestations complémentaires */
.complement { border: 1px solid var(--line-2); border-radius: 14px; background: #0f1827; margin: 0 0 12px; }
.complement-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.complement-h > b { flex: 1; font-size: 15.5px; min-width: 0; line-height: 1.2; }
.complement-b { display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px; }
.complement-f { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--mute); }
.complement-f .moneybox { height: 44px; }
/* fiche repère : intervention sur toute la largeur, jamais de mot coupé (Peinture, Échange) */
.mform-row.kind-row .mform-l { width: 100%; }
.mform-row.kind-row .seg { flex: 1 1 100%; min-width: 0; }
.mform .kseg button { white-space: nowrap; overflow-wrap: normal; word-break: normal; padding: 6px 4px; font-size: 15px; }
/* repères : double contour (blanc + sombre) lisible sur fond sombre */
.vv .vmk .vmk-halo { fill: #fff; }
.hpin-halo { fill: #fff; pointer-events: none; }
/* V0.15.1 — points techniques (Aluminium = gris, Colle / Accès difficile = orange) : bien plus petits que les pastilles, sans prise de clic ni déplacement */
.hpin-tech, .tdot { pointer-events: none; }
.tdot { stroke: #0d1626; stroke-width: 2.5; }
.tdot-alu { fill: #cfd6e0; } .tdot-glue { fill: #ff8a1f; }
/* V0.15.1 — saisie des heures d'un élément (taux horaire) */
.hours-disp { position: relative; min-height: 60px; display: flex; align-items: center; justify-content: center; margin-top: 8px; border-radius: 12px; background: #0e151f; border: 1px solid var(--line-2); font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hours-amount { min-height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--line-2); background: #131b26; font-size: 18px; margin-top: 8px; }
.dsp-view[data-dsp-view="rear"] svg, .dsp-view[data-dsp-view="left"] svg, .dsp-view[data-dsp-view="right"] svg { max-height: 460px; }

/* ---------- V0.14.7 — Archivage et conservation, conditions d'utilisation (maquettes validées : bleu nuit / noir) ---------- */
.arch-h { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.arch-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.arch-kpi { border: 1px solid var(--line-2); border-radius: 14px; background: var(--card); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.arch-kpi span { color: var(--mute); font-size: 14px; }
.arch-kpi b { font-size: 30px; line-height: 1.1; font-weight: 700; } .arch-kpi b.blue { color: var(--blue-3); } .arch-kpi b.amber { color: #ffc22e; }
.arch-due { border: 1px solid var(--line-2); border-radius: 14px; background: var(--card); padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; }
.arch-due b { font-size: 17px; } .arch-due span { color: var(--mute); }
.arch-rows { display: flex; flex-direction: column; }
.arch-row { padding: 12px 4px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.arch-row b { font-size: 18px; font-weight: 700; } .arch-row span { color: var(--mute); } .arch-row small { margin-top: 2px; font-size: 13px; overflow-wrap: anywhere; }
.arch-after { border: 1px solid var(--line-2); border-radius: 14px; background: #172a44; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; line-height: 1.45; }
.arch-after b { font-size: 17px; }
.arch-files { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.arch-file { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.arch-pick { display: flex; gap: 10px; align-items: center; min-width: 0; flex: 1 1 auto; cursor: pointer; }
.arch-pick input { width: 20px; height: 20px; flex: none; }
.arch-fn { display: flex; flex-direction: column; min-width: 0; } .arch-fn b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .arch-fn small { font-size: 12.5px; }
.terms-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); padding: 14px 16px; color: #8cc0ff; font-size: 16px; }
.terms-link svg { color: var(--text); font-size: 18px; }
.terms-check { border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); padding: 14px 16px; }
.legal-ver { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line); }
.legal-ver > div:first-child { min-width: 0; flex: 1 1 220px; }
.ok-text { color: #a5ecc0; }
@media (max-width: 560px) { .arch-h { font-size: 24px; } .arch-kpi b { font-size: 32px; } .subtabs { gap: 4px 6px; } }

/* V0.14.7 — Espace super-administrateur : Conservation des données (mêmes jetons de design que le reste de l'espace) */
.ret-row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-top: 1px solid var(--line); }
.ret-row:first-child { border-top: 0; }
.ret-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(58,142,245,.14); border: 1px solid rgba(58,142,245,.35); color: #9ccaff; font-size: 20px; }
.ret-ic.big { width: 52px; height: 52px; font-size: 26px; }
.ret-act { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.ret-fixed, .ret-rule { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: #121a26; }
.ret-fixed > .icon, .ret-fixed svg { flex: none; margin-top: 2px; }
@media (max-width: 640px) { .ret-row { flex-wrap: wrap; align-items: flex-start; } .ret-act { width: 100%; justify-content: flex-end; } .ret-rule { flex-wrap: wrap; } }

/* V0.15 — Copilot Super-administrateur et Copilot métier */
.cop-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cop-tile .mute { font-size: 13px; }
.cop-comp .ret-row:first-child { border-top: 0; }
.cop-state { font-weight: 600; }
.cop-alert { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; }
.cop-alert.p-critical { border-color: rgba(239,74,74,.5); } .cop-alert.p-high { border-color: rgba(242,165,22,.45); }
.cop-draft { white-space: pre-wrap; background: #0e1623; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 14px; }
@media (max-width: 640px) { .cop-alert { flex-wrap: wrap; } }

/* V0.15.1 — voyant de connexion (Online / Offline / Sync) posé contre le logo de l'en-tête existant : compact, jamais en débordement */
.logo-wrap, .mbar-logo { position: relative; display: flex; align-items: center; flex: none; min-width: 0; }
.mbar-logo { flex: 0 1 auto; }
.logo-wrap .logo-link { flex: none; }
.net-led { position: absolute; right: 2px; bottom: 3px; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; line-height: 1; font-weight: 600; letter-spacing: .01em; pointer-events: none; white-space: nowrap; }
.net-led i { width: 9px; height: 9px; border-radius: 50%; display: block; box-shadow: 0 0 0 2px rgba(10, 16, 26, .85); }
.net-led.online { color: #4ade80; } .net-led.online i { background: #22c55e; }
.net-led.offline { color: #f87171; } .net-led.offline i { background: #ef4444; }
.net-led.sync, .net-led.pending { color: #fbbf24; } .net-led.sync i, .net-led.pending i { background: #f59e0b; }
.net-led.sync i { animation: netled-pulse 1s ease-in-out infinite; }
@keyframes netled-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .net-led.sync i { animation: none; } }
/* V0.16 — repositionnement : le voyant n'est plus posé sur le logo ; il suit le logo (mobile, tablette) dans l'espace libre avant la loupe, sans jamais le recouvrir */
.mbar-logo .net-led { position: static; flex: none; margin-left: 8px; font-size: 10px; }
@media (max-width: 600px) { .mbar > .mbar-logo { min-width: 0; flex: 0 1 auto; } .mbar-logo > a { min-width: 0; display: block; } .mbar-logo .net-led { margin-left: 6px; font-size: 9.5px; } }
/* ordinateur : le voyant suit le logo dans la barre (en ligne, jamais superposé à la navigation) */
.topbar > .net-led { position: static; flex: none; flex-direction: row; gap: 5px; margin: 0 14px 0 6px; font-size: 11px; }     /* V0.16 : voyant décalé vers la droite, juste avant la recherche — plus aucun chevauchement du logo */
.topbar > .net-led i { width: 10px; height: 10px; }
@media print { .net-led { display: none !important; } }

/* DSP classique : sélection du type d'intervention limitée à DSP / DAP — deux boutons égaux sur une seule ligne, toute la largeur (téléphone, tablette, ordinateur) */
.kseg.kseg-dsp { grid-template-columns: repeat(var(--kn, 2), minmax(0, 1fr)); grid-auto-flow: row; width: 100%; }
.kseg.kseg-dsp button { border-bottom: 0; border-right: 1px solid var(--line); min-width: 0; white-space: nowrap; }
.kseg.kseg-dsp button:last-child { border-right: 0; }

/* ---------- V0.16 : espace client professionnel (portail) — design sombre existant, interface plus épurée que celle du technicien ---------- */
.pt { min-height: 100dvh; background: radial-gradient(900px 500px at 50% 0%, #12233f 0%, transparent 70%); }
.pt-main { max-width: 920px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; min-width: 0; }
.pt-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line-2); padding-bottom: 18px; }
.pt-co { font-size: 18px; overflow-wrap: anywhere; } .pt-sub { color: var(--mute); font-size: 13px; overflow-wrap: anywhere; }
.pt-logo { height: 40px; max-width: 120px; object-fit: contain; border-radius: 6px; flex: none; }
.pt-link { background: none; border: 0; color: var(--mute); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; padding: 8px 4px; min-height: 44px; } .pt-link:hover { color: var(--text); }
.pt-h1 { font-size: 26px; margin: 22px 0 4px; } .pt-lead { color: var(--mute); margin: 0 0 16px; } .pt-h2 { font-size: 18px; margin: 26px 0 8px; }
.pt-search { position: relative; } .pt-search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--mute); pointer-events: none; } .pt-search .input { width: 100%; padding-left: 44px; min-height: 52px; font-size: 16px; }
.pt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 4px; }
.pt-tile { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 14px; text-align: left; background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-height: 76px; color: inherit; font: inherit; cursor: pointer; }
.pt-tile:hover { border-color: var(--line-3); } .pt-tile.wide { grid-column: 1 / -1; }
.pt-ti { color: var(--blue-3); font-size: 26px; display: inline-flex; } .pt-tl { font-weight: 650; overflow-wrap: anywhere; } .pt-n { color: var(--mute); font-variant-numeric: tabular-nums; }
.pt-doc { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 10px 0; }
.pt-doc > div:first-child { overflow-wrap: anywhere; } .pt-act { display: flex; gap: 8px; flex: none; }
.pt-card { background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; margin: 26px auto 0; width: min(460px, 100%); display: flex; flex-direction: column; gap: 14px; } .pt-card h1 { font-size: 22px; margin: 0; }
.pt-hint { color: var(--mute); font-size: 14px; margin: 0; } .pt-foot { text-align: center; color: var(--mute-2); font-size: 12px; margin: 32px 0 12px; }
.pt-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--mute); padding: 28px 16px; border: 1px dashed var(--line-2); border-radius: var(--radius); } .pt-empty .ic { font-size: 28px; }
@media (max-width: 500px) { .pt-main { padding: 16px; } .pt-h1 { font-size: 22px; } .pt-tile { padding: 14px 16px; } .pt-doc { flex-wrap: wrap; } .pt-act { width: 100%; } .pt-act .btn { flex: 1; } .pt-card { padding: 20px; } }
.pt .langpick .select { min-width: 74px; }
.pt .langpick .select { min-width: 112px; }
.pt-head { flex-wrap: wrap; } .pt-tl { overflow-wrap: break-word; word-break: normal; hyphens: auto; min-width: 0; }
@media (max-width: 560px) {
  .pt-tile { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "i n" "l l"; row-gap: 10px; align-items: start; min-height: 0; }
  .pt-tile .pt-ti { grid-area: i; } .pt-tile .pt-n { grid-area: n; } .pt-tile .pt-tl { grid-area: l; font-size: 15px; }
  .pt-tile.wide { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "i l n"; align-items: center; }
  .pt-search .input::placeholder { font-size: 14px; }
}
@media (max-width: 360px) { .pt-search .input::placeholder { font-size: 12.5px; } .pt-grid { gap: 10px; } .pt-main { padding: 12px; } }

/* V0.16 — action « Corriger la facture » (maquette : bordure ambrée) */
.btn.correct { border-color: #d99b43; color: #eab76b; background: #2c251b; }
.btn.correct:hover { background: #352c1e; }

/* V0.16.1 — gratuité d'un repère DSP / DAP : rose fuchsia #EC4899 (type conservé ; couleur d'origine rétablie à la désactivation) */
.chip.free.on { background: #EC4899; border-color: #EC4899; color: #1a0612; font-weight: 700; }
.mnum[data-free="1"] { color: #1a0612; }

/* V0.16.1 — lignes de facture / d'avoir : quantité, prix unitaire HT, remise ligne et TVA sans chevauchement.
   Deux colonnes sur petit écran (320–639 px), quatre colonnes ensuite ; les champs prennent toute la largeur de leur colonne (aucun calcul modifié). */
.bill-line { display: grid; gap: 10px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bill-line .bl-label, .bill-line .bl-foot { grid-column: 1 / -1; }
.bill-line .field { min-width: 0; }
.bill-line .field .input, .bill-line .field .amount, .bill-line .field select { width: 100%; min-width: 0; box-sizing: border-box; text-align: left; }
.bill-line .field .amount { height: 44px; }
.bill-line .field select { padding-right: 28px; text-overflow: clip; }
.bill-line .field > label { white-space: normal; line-height: 1.2; }
@media (min-width: 640px) { .bill-line { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* V0.16.1 — nouveau devis : le client d'abord (2 repères : Client, Type de devis) */
.stepper.qstart { grid-template-columns: repeat(2, 1fr); max-width: 380px; margin: 0 auto 10px; }
.stepper.qstart .step { background: none; border: 0; color: inherit; font: inherit; }
.stepper.qstart .step.active { cursor: default; }

/* V0.16.1 — validation des étapes : « Continuer » grisé tant que les informations obligatoires manquent (bleu dès qu'elles sont valides) ; points numérotés verrouillés au-delà de la première étape incomplète. */
.btn.primary.step-next[disabled], .btn.primary.step-next[aria-disabled="true"] { background: #2a3343; background-image: none; border-color: #3a4558; color: #93a0b3; box-shadow: none; opacity: 1; cursor: not-allowed; }
.step.locked, .step[disabled] { cursor: not-allowed; }
.step.locked .dot { opacity: .6; }
.step-hint { margin-top: 2px; }

/* V0.16.2 — Forfait panneaux : panneau entier. Zone entière colorée (DSP vert, DAP orange, Gratuit rose #EC4899), y compris dans la fenêtre agrandie et au retour à la vue générale. */
.vz.t-FREE.has, .vv .vz.has.t-FREE, .vsvg .vz.has.t-FREE { fill: rgba(236, 72, 153, .58); stroke: #f9a8d4; }
.vv:has(.vv-img) .vz.has.t-FREE { fill: rgba(236, 72, 153, .6); }
.vv.vv-focus .vz.f.has.t-DSP, .vv:has(.vv-img).vv-focus .vz.f.has.t-DSP { fill: rgba(124, 193, 43, .6); stroke: #7cc12b; }
.vv.vv-focus .vz.f.has.t-DAP, .vv:has(.vv-img).vv-focus .vz.f.has.t-DAP { fill: rgba(242, 165, 22, .62); stroke: #f2a516; }
.vv.vv-focus .vz.f.has.t-FREE, .vv:has(.vv-img).vv-focus .vz.f.has.t-FREE { fill: rgba(236, 72, 153, .62); stroke: #EC4899; }
.panel-recap { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .03); }
.panel-recap .row { gap: 12px; }
[data-panel-cat] button small { display: block; font-size: 11px; opacity: .75; }
[data-panel-minus], [data-panel-plus] { width: 44px; height: 44px; font-size: 22px; line-height: 1; }

/* V0.17.1 — prestations complémentaires multiples et dégarnissage pavillon (DSP classique) */
.complement-item { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: #0b1422; }
.complement-item-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.complement-item-h > b { min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
.complement-item .btn.icon { flex: none; }
.complement-total { padding-top: 4px; font-size: 15.5px; gap: 8px; flex-wrap: wrap; }
.complement-total > b { white-space: nowrap; }
[data-roof-degarn] .row.between { gap: 10px; flex-wrap: wrap; }
[data-roof-degarn] .row.between > b { min-width: 0; overflow-wrap: anywhere; }

/* =================================================================== V0.19 — programme bêta privé (bannière BÊTA-TEST, Mon bêta-test, Bêta-testeurs, Messagerie) */
.betabar { position: sticky; top: var(--topbar-h); z-index: 30; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 16px; background: #12294d; border-bottom: 1px solid rgba(96,165,250,.55); box-shadow: 0 6px 14px rgba(0,0,0,.35); font-size: 14px; }
.betabar-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; letter-spacing: .06em; color: #fff; background: var(--blue); padding: 3px 10px; border-radius: 20px; }
.betabar-txt { color: var(--text); flex: 1 1 220px; min-width: 0; }
.betabar-link { color: #9ccaff; font-weight: 700; white-space: nowrap; }
.betanotice { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.betainfo { border-color: rgba(96,165,250,.45); }
.otiles.three { grid-template-columns: repeat(3, 1fr); }
.otiles.three .ov { color: #60a5fa; }
.betarow { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.betarow .grow { min-width: 0; overflow-wrap: anywhere; }
.betaact { justify-content: flex-end; max-width: 330px; }
@media (max-width: 719px) {
  .betabar { top: 66px; padding: 6px 12px; gap: 4px 10px; font-size: 12.5px; line-height: 1.3; } .betabar-txt { flex: 1 1 150px; } .betabar-tag { font-size: 12px; padding: 2px 8px; }
  .otiles.three { grid-template-columns: repeat(3, 1fr); gap: 8px; } .otiles.three .ov { font-size: 24px; } .otiles.three .ol { font-size: 12.5px; }
  .betarow { flex-wrap: wrap; } .betaact { max-width: none; width: 100%; justify-content: flex-start; }
}
/* V0.19.1 — menu « ⋯ » : action indisponible (ordre protégé) et message explicatif, sans changer le design du menu */
.menu button:disabled { opacity: .45; cursor: not-allowed; } .menu button:disabled:hover { background: transparent; }
.menu-hint { padding: 4px 12px 8px; font-size: 12.5px; color: var(--mute); max-width: 260px; line-height: 1.35; }
/* V0.19.1 — carte « Clôture du programme bêta » (Espace propriétaire) : même langage visuel que les autres cartes, bouton principal bleu */
.closure-card { border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px; background: #16213a; }
.closure-t { font-weight: 800; font-size: 16px; color: #fff; }
.closure-lines > div { line-height: 1.45; }
@media (max-width: 719px) { .closure-card .btn { width: 100%; } }

/* V0.20 — liste des devis d'un client (cartes, maquette « Devis — client ») */
.cq-list { gap: 12px; }
.cq-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cq-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cq-veh { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-size: 17px; }
.cq-ref { font-size: 15px; }
.cq-mid { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cq-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 2px; }
.cq-actions .btn { justify-content: center; min-height: 44px; font-weight: 600; }

/* ---- V0.20 : Parcs grêle ---- */
.pc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pc-k { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pc-k b { font-size: 22px; }
.pc-card { text-decoration: none; }
.pc-veh { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; }
.pc-veh > input[type=checkbox] { width: 22px; height: 22px; margin-top: 3px; flex: none; }
.pc-ids { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.pc-sel { min-height: 40px; max-width: 240px; font-size: 14px; }
.pc-dg { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; min-height: 40px; }
.pc-forfait { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; }
.pc-amt { display: flex; align-items: center; gap: 8px; }
.pc-amt .amount { width: 150px; text-align: right; }
.pc-imp { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.pc-imp.bad { border-color: rgba(239,74,74,.55); }
.pc-imp.skip { opacity: .55; }
.pc-imp-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.pc-err { color: #ff9c9c; } .pc-warn { color: #ffd180; }
.pw-res { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; color: inherit; text-align: left; cursor: pointer; }
@media (max-width: 719px) { .pc-sel { max-width: none; width: 100%; } .pc-amt .amount { width: 120px; } }
/* V0.20.1 — bulles de catégorie de dégarnissage : la lettre puis, dessous, le montant HT de la matrice (aucun clic ajouté ; les bulles passent à la ligne si un montant est long). */
.chipbtn.priced { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px; flex: 1 1 56px; max-width: 100%; line-height: 1.15; }
@media (max-width: 420px) { .chips:has(.chipbtn.priced) { gap: 5px; } .chipbtn.priced { padding: 6px 2px; flex-basis: 52px; } .chipbtn.priced .cb-p { font-size: 11px; } }
.chipbtn.priced .cb-p { font-size: 12px; font-weight: 600; color: var(--mute); white-space: nowrap; }
.chipbtn.priced.on .cb-p { color: var(--text); }

/* V0.20.2 — aide à l'installation (Android / iPhone) : mêmes composants et couleurs que le reste de l'application. */
.inst-h { color: var(--blue-3); font-weight: 700; font-size: 17px; }
.inst-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
