/* Boolba Logistic — design : papier clair, encre noire, rose du logo. Mobile d'abord. */
:root {
  --paper: #f4f1ea; --surface: #fff; --ink: #17150f; --ink2: #2b2820; --muted: #6f695e; --line: #e3ddd0; --line2: #d6cfbf;
  --acc: #c63b80; --acc-d: #a4306a; --accs: #fbe4ef; --grad: linear-gradient(120deg, #df8fd6, #f3b9a2);
  --ok: #0e8a5c; --oks: #dcf2e7; --warn: #9a6410; --warns: #faefd3; --late: #c0342a; --lates: #fbe1dd; --wa: #1f9d55;
  --r: 18px; --shadow: 0 10px 30px rgba(23, 21, 15, .08);
  --f-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-disp: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.45 var(--f-body); -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.disp { font-family: var(--f-disp); letter-spacing: -.025em; }
.mono { font-family: var(--f-mono); letter-spacing: .02em; }
.muted { color: var(--muted); }
.lbl { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------ écran d'ouverture : le pneu roule et devient le B */
#splash { position: fixed; inset: 0; z-index: 100; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity .45s, visibility .45s; overflow: hidden; }
#splash.done { opacity: 0; visibility: hidden; }
.sp-stage { position: relative; width: 150px; height: 210px; }
.sp-stage > * { position: absolute; inset: 0; margin: auto; }
.sp-tire { width: 132px; height: 132px; animation: spRoll 1.5s cubic-bezier(.3, .6, .4, 1) both, spMorph .55s 1.45s ease-in both; }
.sp-b { width: 150px; animation: spB .75s 1.6s cubic-bezier(.2, .8, .3, 1.25) both; }
.sp-ar { width: 150px; animation: spAr .6s 2.15s cubic-bezier(.2, .8, .3, 1) both; }
.sp-trail { inset: auto; left: -60vw; right: 50%; bottom: 36px; height: 3px; transform-origin: left; background: repeating-linear-gradient(90deg, #cfc6b4 0 14px, transparent 14px 24px); animation: spTrail 1.9s ease-out both; }
.sp-glow { width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(223, 143, 214, .45), transparent 65%); animation: spGlow 1.2s 1.9s ease-out both; }
.sp-text { margin-top: 18px; text-align: center; animation: spTxt .5s 2.5s ease-out both; }
.sp-text img { height: 44px; }
.sp-text div { letter-spacing: .42em; font-weight: 700; font-size: 11px; color: var(--muted); margin-top: 6px; }
.sp-credits { position: absolute; bottom: calc(26px + env(safe-area-inset-bottom)); font-size: 12px; color: var(--muted); animation: spTxt .5s 2.7s both; }
.sp-skip { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px; border: 0; background: none; color: var(--muted); font-size: 13px; padding: 10px; cursor: pointer; }
@keyframes spRoll { from { transform: translateX(-70vw) rotate(-900deg); } to { transform: translateX(0) rotate(0); } }
@keyframes spMorph { to { transform: rotate(540deg) scale(.4); opacity: 0; } }
@keyframes spB { from { transform: rotate(-200deg) scale(.25); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spAr { from { transform: translate(-90px, 70px) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spTrail { 0% { transform: scaleX(0); opacity: 1; } 75% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes spGlow { 0% { opacity: 0; transform: scale(.6); } 40% { opacity: 1; transform: scale(1.05); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes spTxt { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* chargement de page : petit pneu qui roule et devient le B */
.loader { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 60px 0; color: var(--muted); font-size: 13px; }
.ld { position: relative; width: 56px; height: 74px; }
.ld > * { position: absolute; inset: 0; margin: auto; }
.ld .t { width: 50px; height: 50px; animation: ldRoll 1.6s cubic-bezier(.3, .6, .4, 1) infinite; }
.ld .b { width: 56px; animation: ldB 1.6s cubic-bezier(.2, .8, .3, 1.2) infinite; }
@keyframes ldRoll { 0% { transform: translateX(-90px) rotate(-540deg); opacity: 1; } 50% { transform: none; opacity: 1; } 65%, 100% { transform: rotate(240deg) scale(.4); opacity: 0; } }
@keyframes ldB { 0%, 52% { transform: rotate(-180deg) scale(.3); opacity: 0; } 72% { transform: rotate(8deg) scale(1.06); opacity: 1; } 85%, 100% { transform: none; opacity: 1; } }
#topbar-progress { position: fixed; top: 0; left: 0; height: 3px; z-index: 90; background: var(--grad); width: 0; opacity: 0; transition: width .3s, opacity .3s; }
#topbar-progress.on { opacity: 1; width: 70%; transition: width 4s cubic-bezier(.1, .7, .2, 1); }
@media (prefers-reduced-motion: reduce) { .sp-tire, .sp-b, .sp-ar, .sp-trail, .sp-glow, .sp-text, .sp-credits, .ld .t, .ld .b { animation-duration: .01s !important; animation-delay: 0s !important; } }

/* ------------------------------------------------ structure */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 10px 28px; padding-top: calc(10px + env(safe-area-inset-top)); background: rgba(244, 241, 234, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15.5px; text-decoration: none; line-height: 1.15; min-width: 0; }
.logo img { height: 36px; width: auto; display: block; }
.logo small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); }
.tabs { display: flex; gap: 2px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; min-height: 38px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tabs a:hover { background: #ebe6db; color: var(--ink); }
.tabs a.on { background: var(--ink); color: #fff; }
.tabs b, .bnav b { background: var(--acc); color: #fff; font-size: 11px; border-radius: 99px; padding: 0 6px; line-height: 17px; }
.top-r { display: flex; align-items: center; gap: 8px; }
.av { width: 36px; height: 36px; border-radius: 50%; background: #d9cfbd; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; border: 0; cursor: pointer; }
main.page { padding: 24px 28px 40px; max-width: 1500px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ph-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.ph-row h1 { margin: 4px 0 0; font: 800 34px/1.05 var(--f-disp); letter-spacing: -.025em; }
.ph-row .grow { flex: 1 1 260px; min-width: 0; }
.foot { font-size: 11.5px; color: var(--muted); text-align: center; padding: 14px 16px 24px; }
.bnav { display: none; }
.lic-band { background: var(--warns); color: #6b4a0b; padding: 9px 16px; font-size: 13.5px; text-align: center; font-weight: 600; }
.lic-band.bad { background: var(--lates); color: #7f1d1d; }

/* ------------------------------------------------ composants */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; min-width: 0; }
.panel > .ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px 0; flex-wrap: wrap; }
.panel > .ph h2 { margin: 0; font-size: 17px; }
.pb { padding: 12px 20px 18px; }
.grid2 { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.grid2 > .main { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.grid2 > .side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.btn { font-weight: 700; font-size: 14px; border-radius: 999px; padding: 9px 18px; min-height: 42px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.acc { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.acc:hover { background: var(--acc-d); }
.btn.ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn.danger { color: var(--late); border-color: #e8b8b2; }
.btn.sm { min-height: 34px; padding: 5px 13px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: none; }
.btn.icon { padding: 0; width: 40px; min-height: 40px; }
.btn.block { width: 100%; }
.tag { display: inline-flex; align-items: center; gap: 6px; border-radius: 7px; padding: 3px 9px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ok { background: var(--oks); color: var(--ok); } .warn { background: var(--warns); color: var(--warn); } .late { background: var(--lates); color: var(--late); }
.neu { background: #ece7dc; color: var(--ink2); } .hot { background: var(--accs); color: var(--acc-d); }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.row > span:first-child { color: var(--muted); }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; min-height: 34px; color: var(--muted); }
.seg button.on { background: var(--ink); color: #fff; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; min-height: 44px; flex: 1 1 260px; max-width: 420px; color: var(--muted); }
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; font-size: 14.5px; color: var(--ink); }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .i { width: 30px; height: 30px; }
.list a.li, .list .li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); text-decoration: none; min-width: 0; }
.list a.li:hover { background: #faf8f3; }
.li .t { font-weight: 700; } .li .s { font-size: 12.5px; color: var(--muted); }
.li .grow { flex: 1; min-width: 0; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpis { display: flex; flex-wrap: wrap; gap: 14px 0; }
.kpi { flex: 1 1 180px; padding: 4px 22px; border-left: 1px solid var(--line); }
.kpi:first-child { border-left: 0; padding-left: 0; }
.kpi b { display: block; font: 800 36px/1.1 var(--f-disp); letter-spacing: -.03em; margin-top: 6px; }
.kpi span.s { color: var(--muted); font-size: 13px; }
.thumb { width: 64px; height: 48px; border-radius: 10px; object-fit: cover; background: #e9e4d9; flex: none; }
.ph-car { background: linear-gradient(160deg, #e3ddd0, #a39b8a); display: grid; place-items: center; color: #fff; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; }
.tbl td { padding: 11px 12px; border-top: 1px solid var(--line); }
.tbl-wrap { overflow-x: auto; }
.money { font-family: var(--f-mono); font-weight: 600; white-space: nowrap; }

/* corridor (tableau de bord) */
.corridor { background: var(--ink); color: #fff; border-radius: 26px; padding: 22px 26px 24px; }
.cor { display: flex; overflow-x: auto; padding: 6px 0 4px; scrollbar-width: thin; }
.cor .st { flex: 1 0 104px; position: relative; padding-right: 10px; text-decoration: none; color: #fff; }
.cor .st::after { content: ""; position: absolute; left: 12px; right: 0; top: 56px; height: 3px; background: var(--grad); }
.cor .st:last-child::after { display: none; }
.cor .n { font: 800 32px/1 var(--f-disp); height: 42px; }
.cor .dot { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); border: 3px solid #e7a3c8; margin-top: 2px; }
.cor .dot.red { border-color: #ff6b5e; box-shadow: 0 0 0 5px rgba(255, 107, 94, .25); }
.cor .nm { margin-top: 12px; font-weight: 700; font-size: 13px; line-height: 1.25; }
.cor .sb { font-size: 12px; color: #a8a194; margin-top: 2px; }
.days { display: flex; overflow-x: auto; padding: 4px 10px 8px; }
.day { flex: 1 0 104px; border-left: 1px solid var(--line); padding: 0 8px 8px; }
.day:first-child { border-left: 0; }
.day .d { font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 0; }
.day .d b { display: block; font: 800 22px var(--f-disp); color: var(--ink); }
.vc { display: block; background: var(--paper); border-radius: 10px; padding: 8px 9px; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; text-decoration: none; border-left: 3px solid var(--ok); }
.vc small { display: block; font: 500 11px var(--f-mono); color: var(--muted); }
.vc.late { border-color: var(--late); }

/* kanban commandes */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.col { flex: 0 0 250px; display: flex; flex-direction: column; gap: 10px; }
.col h3 { margin: 0; display: flex; justify-content: space-between; font-size: 13.5px; padding: 0 4px; }
.col h3 span { font-family: var(--f-mono); color: var(--muted); font-size: 12px; }
.kc { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px; text-decoration: none; cursor: pointer; }
.kc:hover { border-color: var(--ink); }
.kc .m { font-weight: 700; } .kc .c { font-size: 12.5px; color: var(--muted); }
.kc .f { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 12px; gap: 6px; }
.flow { display: flex; gap: 4px; } .flow i { flex: 1; height: 5px; border-radius: 9px; background: var(--line); }
.flow i.d { background: var(--ink); } .flow i.c { background: var(--acc); }
.spec { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.spec > div { background: var(--surface); padding: 9px 12px; min-width: 0; }
.spec small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.prop { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; }
.prop.on { border: 2px solid var(--ink); }
.receipt { background: var(--paper); border-radius: 16px; padding: 14px 16px; }

/* dossier : billet + trajet horizontal + journal */
.ticket { display: flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.ticket > div { padding: 20px 24px; min-width: 0; }
.ticket .perf { flex: 0 0 0; padding: 0; border-left: 2px dashed var(--line2); }
.rt { display: flex; overflow-x: auto; padding: 18px 4px 6px; }
.rt .s { flex: 1 0 96px; position: relative; padding-right: 8px; }
.rt .s::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 3px; background: var(--line2); }
.rt .s.done::before { background: var(--ink); }
.rt .s.next::before { background: linear-gradient(90deg, var(--acc) 50%, var(--line2) 50%); }
.rt .s:last-child::before { right: auto; width: 20px; }
.rt .k { position: relative; width: 25px; height: 25px; border-radius: 50%; background: var(--paper); border: 3px solid var(--line2); display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800; }
.rt .done .k { background: var(--ink); border-color: var(--ink); }
.rt .next .k { background: #fff; border-color: var(--acc); box-shadow: 0 0 0 6px var(--accs); }
.rt .t { font-size: 12.5px; font-weight: 700; margin-top: 10px; line-height: 1.25; }
.rt .w { font: 11.5px var(--f-mono); color: var(--muted); margin-top: 3px; }
.jr { display: flex; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line); align-items: flex-start; flex-wrap: wrap; }
.jr .c { width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--line2); flex: none; display: grid; place-items: center; font-weight: 800; background: #fff; cursor: pointer; }
.jr.done .c { background: var(--ink); border-color: var(--ink); color: #fff; }
.jr.next { background: var(--accs); }
.jr.next .c { border-color: var(--acc); }
.jr .grow { flex: 1 1 200px; min-width: 0; }
.jr .me { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.jr > .act { display: flex; gap: 6px; flex-wrap: wrap; align-self: center; }
.photos { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.photos img { width: 70px; height: 52px; border-radius: 9px; object-fit: cover; cursor: zoom-in; }
.doc { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.doc i { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; flex: none; }
.bal { display: flex; gap: 10px; margin-top: 12px; }
.bal > div { flex: 1; border-radius: 14px; padding: 10px 12px; }

/* catalogue */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cc { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 8px 8px 12px; text-decoration: none; display: block; cursor: pointer; }
.cc:hover { border-color: var(--ink); }
.cc .pic { position: relative; height: 160px; border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, #e3ddd0, #a39b8a); }
.cc .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc .pic .tag { position: absolute; left: 10px; top: 10px; }
.prices { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 10px; gap: 8px; }
.prices b.big { font: 800 22px var(--f-disp); }
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.gal .g { position: relative; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; background: #e9e4d9; }
.gal .g img { width: 100%; height: 100%; object-fit: cover; }
.gal .g button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(23, 21, 15, .7); color: #fff; cursor: pointer; }
.gal .g .cv { position: absolute; left: 4px; bottom: 4px; font-size: 10.5px; background: rgba(23, 21, 15, .7); color: #fff; border-radius: 6px; padding: 2px 6px; border: 0; cursor: pointer; }
.gal .add { border: 1.5px dashed var(--line2); display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; background: none; }

/* formulaires */
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea { border: 1.5px solid var(--line2); border-radius: 12px; padding: 10px 12px; font-size: 15px; background: var(--paper); min-height: 46px; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--acc); outline-offset: 0; border-color: var(--acc); background: #fff; }
.field.check { flex-direction: row; align-items: center; gap: 10px; }
.field.check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--acc); }
.field.check label { text-transform: none; letter-spacing: 0; font-size: 14.5px; color: var(--ink); font-weight: 600; }
.field .err { display: none; color: var(--late); font-size: 12.5px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--late); }
.field.invalid .err { display: block; }
.field .help { font-size: 12px; color: var(--muted); }
.req { color: var(--acc); }

/* fenêtres */
.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(23, 21, 15, .45); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 24px; width: 100%; max-width: 560px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(23, 21, 15, .25); }
.modal.lg { max-width: 820px; } .modal.sm { max-width: 420px; }
.mh { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 22px 10px; }
.mh h2 { margin: 0; font: 800 21px var(--f-disp); letter-spacing: -.02em; }
.mb { padding: 6px 22px 16px; overflow-y: auto; }
.mf { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; width: calc(100% - 32px); max-width: 460px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; font-weight: 600; box-shadow: var(--shadow); animation: fade .2s; text-align: center; }
.toast.err { background: var(--late); }
.wa-bubble { background: #dcf8c6; border-radius: 14px 14px 4px 14px; padding: 10px 12px; font-size: 13.5px; white-space: pre-wrap; line-height: 1.5; }
.wa-wrap { background: #e7ddd0; border-radius: 18px; padding: 12px; }
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .9); display: grid; place-items: center; cursor: zoom-out; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }

/* connexion */
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-wrap: wrap; }
.login .art { flex: 1 1 420px; background: var(--ink); color: #fff; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; min-height: 260px; }
.login .art img { width: 220px; max-width: 60%; }
.login .box { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 30px 20px; }
.login form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }

/* installation / notifications */
.install-card { display: flex; gap: 14px; align-items: center; background: var(--ink); color: #fff; border-radius: 20px; padding: 14px 16px; flex-wrap: wrap; }
.install-card img { width: 46px; height: 46px; border-radius: 12px; }
.install-card .grow { flex: 1 1 180px; }

/* ------------------------------------------------ téléphone */
@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .top { padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); }
  .top .tabs { display: none; }
  .top .logo { flex: 1; }
  main.page { padding: 18px 14px calc(96px + env(safe-area-inset-bottom)); gap: 16px; }
  .ph-row h1 { font-size: 28px; }
  .bnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .bnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); text-decoration: none; padding: 6px 0; min-height: 50px; justify-content: center; position: relative; }
  .bnav a.on { color: var(--ink); } .bnav a.on .i { color: var(--acc); }
  .bnav a b { position: absolute; top: 2px; right: calc(50% - 22px); }
  .bnav .plus { flex: 0 0 58px; height: 50px; border-radius: 16px; background: var(--acc); color: #fff !important; font-size: 28px; }
  .panel > .ph { padding: 14px 16px 0; } .pb { padding: 10px 16px 16px; }
  .list a.li, .list .li { padding: 12px 16px; }
  .kpi { flex: 1 1 45%; padding: 4px 12px; border-left: 0; }
  .kpi:first-child { padding-left: 12px; }
  .kpi b { font-size: 28px; }
  .corridor { padding: 18px 16px; border-radius: 22px; }
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal, .modal.lg, .modal.sm { max-width: none; border-radius: 24px 24px 0 0; max-height: 92vh; max-height: 92dvh; }
  .mf { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .mf .btn { flex: 1; }
  .ticket > div { padding: 16px 18px; }
  .ticket .perf { flex-basis: 100%; border-left: 0; border-top: 2px dashed var(--line2); }
  .jr { padding: 12px 16px; }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .login .art { padding: 28px 22px; min-height: 0; }
  .hide-m { display: none !important; }
}
@media (min-width: 761px) { .show-m { display: none !important; } }

/* ouverture rapide (déjà vue aujourd'hui) */
#splash.quick > * { animation: none !important; }
#splash.quick .sp-tire, #splash.quick .sp-trail, #splash.quick .sp-glow, #splash.quick .sp-skip, #splash.quick .sp-text, #splash.quick .sp-credits { display: none; }
#splash.quick .sp-b, #splash.quick .sp-ar { animation: none !important; opacity: 1; transform: none; }

/* choix de la langue */
.langs { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; align-self: flex-start; flex-wrap: wrap; }
.langs button { border: 0; background: none; border-radius: 999px; padding: 7px 13px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); min-height: 36px; }
.langs button.on { background: var(--ink); color: #fff; }
.langs button.dark { color: #cfc6b6; }
.langs button.dark.on { background: #fff; color: var(--ink); }
.langs:has(.dark) { background: #2b2820; border-color: #2b2820; }
.btn.ink .i { color: #fff; }
