:root {
  --bg: #F5F7F4; --card: #FFFFFF; --line: #E1E5E0; --line-soft: #EDF0EC;
  --ink: #12213D; --ink-2: #364256; --muted: #5C6675;
  --navy: #1B3A6B; --navy-dark: #12294D;
  --accent: #1B3A6B; --accent-dark: #12294D; --accent-soft: #E8EEF6;
  --green: #3D7A1F; --green-soft: #EAF3DE; --lime: #A4C229;
  --warn: #A3520F; --warn-soft: #FBEBDD; --danger: #A12B2B;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Instrument Sans', system-ui, sans-serif; font-size: 16px; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* Mise en page */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side { flex: 1 1 220px; max-width: 100%; background: var(--card); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; font-weight: 600; }
.logo { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }
.brand-line { height: 2px; background: linear-gradient(90deg, var(--lime), var(--green)); border: 0; margin: 0; }
.mark { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
.mark img { width: 84px; height: auto; display: block; }
.mark span { font-size: 14px; font-weight: 700; letter-spacing: .14em; color: var(--navy); text-transform: uppercase; white-space: nowrap; }
.mark small { font-size: 10px; font-weight: 500; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; white-space: nowrap; }
.mark.sm img { width: 52px; }
.mark.sm span { font-size: 11px; letter-spacing: .12em; }
.mark.sm small { font-size: 8.5px; }
.mark.xs img { width: 40px; }
.mark.xs span { font-size: 9px; letter-spacing: .1em; }
.mark.xs small { font-size: 6.5px; letter-spacing: .06em; }
.side a { text-decoration: none; color: var(--ink-2); padding: 10px 12px; border-radius: 10px; font-size: 15px; }
.side a.on { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.side .spacer { flex: 1; }
.main { flex: 999 1 560px; min-width: 0; padding: 24px 28px 40px; display: flex; flex-direction: column; gap: 18px; }
.mobile { max-width: 520px; margin: 0 auto; padding: 20px 18px 110px; display: flex; flex-direction: column; gap: 14px; }

@media (max-width: 800px) {
  .shell { align-content: flex-start; flex-direction: column; flex-wrap: nowrap; }
  .side { flex: 0 0 auto; align-items: center; position: sticky; top: 0; z-index: 20; }
  .main { flex: 1 1 auto; }
  .side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; gap: 4px; flex-basis: 100%; }
  .side .brand { padding: 0 8px 0 0; }
  .side a { white-space: nowrap; }
  .side .spacer { display: none; }
  .main { padding: 18px 16px 40px; }
}

/* Éléments */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
h1 { margin: 0; font-size: 26px; font-weight: 600; }
h2 { margin: 0; font-size: 17px; font-weight: 600; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kpi { font-family: 'IBM Plex Mono', monospace; font-size: 26px; }
.big { font-family: 'IBM Plex Mono', monospace; font-size: 32px; }

.btn { height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.huge { height: 60px; font-size: 18px; width: 100%; }
.btn.small { height: 36px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn:disabled { opacity: .55; cursor: default; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 6px 0; font-weight: 600; }

label { font-size: 13px; font-weight: 500; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
input, select, textarea { height: 48px; border: 1px solid #D6D3CA; border-radius: 10px; padding: 0 12px; background: #FBFAF7; font-size: 16px; }
textarea { height: auto; padding: 10px 12px; }
.pin { letter-spacing: .4em; font-family: 'IBM Plex Mono', monospace; font-size: 20px; text-align: center; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--line-soft); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--green-soft); color: #27500A; }
.pill.warn { background: var(--warn-soft); color: #8A440C; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 8px; border-bottom: 1px solid var(--line); }
td { padding: 11px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }

.msg { padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.msg.err { background: #FBE7E7; color: var(--danger); }
.msg.ok { background: var(--green-soft); color: #27500A; }
.msg.info { background: var(--line-soft); color: var(--ink-2); }

/* Monteur */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(10px + env(safe-area-inset-bottom)); z-index: 10; }
.tabbar button { background: none; border: 0; min-height: 50px; font-size: 12px; font-weight: 500; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; }
.tabbar button.on { color: var(--accent); font-weight: 700; }
.session { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.session:last-child { border-bottom: 0; }

/* Badge */
.badge { background: var(--card); border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.badge-head { background: var(--bg); padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.badge-body { padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.badge-photo { width: 130px; height: 160px; border-radius: 14px; object-fit: cover; background: #E7E5DE; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.badge-grid { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.badge-grid span { display: block; }

.thumb { width: 54px; height: 66px; object-fit: cover; border-radius: 8px; background: #E7E5DE; }

/* Fenêtre modale */
.modal { position: fixed; inset: 0; background: rgba(20,22,21,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 90; }
.modal .sheet { background: var(--card); width: 100%; max-width: 520px; border-radius: 18px 18px 0 0; padding: 20px 18px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 801px) { .modal { align-items: center; } .modal .sheet { border-radius: 18px; } }

/* Modules chantier */
.pill.err { background: #FBE7E7; color: var(--danger); }
.n { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--warn); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; text-decoration: none; color: var(--ink); font: inherit; }
.item:hover { border-color: #C9D1C7; }
.ititle { font-size: 16px; font-weight: 600; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin: 0 -2px; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex-shrink: 0; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.chips button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.person { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.person:last-of-type { border-bottom: 0; }
.person .btn.small svg { width: 16px; height: 16px; }
.steps { display: flex; flex-direction: column; gap: 6px; border-left: 2px solid var(--line); padding-left: 12px; font-size: 13px; }
.steps .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); margin: 0 6px 1px -17px; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.tcell { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); text-decoration: none; }
.tcell img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #E7E5DE; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.kv > div { display: flex; flex-direction: column; gap: 2px; }
.items, .hours { display: flex; flex-direction: column; gap: 8px; }
.irow { display: flex; gap: 6px; flex-wrap: wrap; }
.irow input { height: 42px; min-width: 60px; flex: 1; }
table.compact { min-width: 0; }
table.compact td { padding: 7px 6px; }
.modal .sheet { max-height: 92vh; overflow-y: auto; }
.modal .sheet.wide { max-width: 760px; }
/* Mails : lecture et réponse en grand */
.modal .sheet.mailbig { max-width: min(1150px, 96vw); width: 100%; max-height: 96vh; }
@media (min-width: 801px) { .modal .sheet.mailbig { min-height: 86vh; } }
.sheet.mailbig textarea[name=texte] { min-height: 40vh; resize: vertical; }
.sheet.mailbig .pjbox { width: 100%; min-height: 78vh; border: 1px solid var(--line, #E3E8EF); border-radius: 10px; background: #fff; }
.sheet.mailbig iframe.morig { width: 100%; min-height: 30vh; border: 1px solid var(--line, #E3E8EF); border-radius: 10px; background: #fff; }
@media (max-width: 420px) { .hide-sm { display: none; } }

/* Visionneuse de plans */
.viewer { position: fixed; inset: 0; z-index: 80; background: #F5F7F4; display: flex; flex-direction: column; }
.vbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px calc(10px) 14px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--card); border-bottom: 1px solid var(--line); }
.vtitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vstage { position: relative; flex: 1; overflow: hidden; touch-action: none; cursor: grab; }
.vstage canvas { display: block; }
.vload { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.vtools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }

/* ---------- Accueil (proposition B) ---------- */
.hic { display: inline-grid; place-items: center; }
.hic svg, .hero svg, .hadmin svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar .hic svg { width: 22px; height: 22px; stroke-width: 1.8; }
.home { gap: 12px; }
.home .hero { background: var(--navy); color: #fff; margin: -20px -18px 4px; padding: calc(22px + env(safe-area-inset-top)) 18px 20px; border-radius: 0 0 26px 26px; display: flex; flex-direction: column; gap: 16px; }
.hwrap { max-width: 560px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.main .hwrap .hero { margin: 0; border-radius: 22px; }
.hero .hrow { display: flex; align-items: center; gap: 12px; }
.hero .hrow img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 12px; padding: 4px; }
.hero .hrow b { font-size: 22px; display: block; }
.hero .hrow span { opacity: .78; font-size: 14px; }
.hero .qa { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hero .qa button { position: relative; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 14px; padding: 12px 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 72px; }
.hero .qa button:active { background: rgba(255,255,255,.22); }
.hero .qb { position: absolute; top: 5px; right: 7px; background: #E2463A; color: #fff; border-radius: 99px; font-size: 11px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; }
.hsec { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hsec .link { text-transform: none; letter-spacing: 0; }
.hlist { padding: 0; gap: 0; }
.hitem { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line-soft); background: none; text-align: left; width: 100%; cursor: pointer; }
.hitem:last-child { border-bottom: 0; }
/* Mails : bloc du haut fixe, seule la liste défile */
.mtop { position: sticky; top: 0; z-index: 10; background: var(--bg); display: flex; flex-direction: column; gap: 8px; padding: 6px 0 8px; margin: -6px 0 0; box-shadow: 0 8px 8px -8px rgba(18, 33, 61, .12); }
/* Ligne glissable (mails) : le bouton d'action est derrière, révélé en glissant vers la gauche */
.swipe { position: relative; overflow: hidden; }
.swipe .hitem { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.swipe .swact { position: absolute; top: 0; right: 0; bottom: 0; width: 96px; border: 0; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; transform: translateX(96px); z-index: 1; }
.swipe:last-child .hitem { border-bottom: 0; }
.hd { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--navy); }
.hd.g { background: var(--green-soft); color: var(--green); } .hd.w { background: var(--warn-soft); color: var(--warn); } .hd.r { background: #F6E3E3; color: var(--danger); }
.hx { flex: 1; min-width: 0; } .hx b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; } .hx span { font-size: 13px; color: var(--muted); }
.hmenu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hmenu button { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; text-align: left; cursor: pointer; min-height: 62px; }
.hmenu .hic { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--navy); flex-shrink: 0; }
.hmenu .hic svg { width: 20px; height: 20px; }
.hadmin { display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; border: 0; border-radius: 16px; padding: 14px 16px; font-size: 18px; text-align: left; cursor: pointer; }
.hadmin span { flex: 1; } .hadmin b { display: block; font-size: 16px; } .hadmin small { font-size: 12.5px; opacity: .75; }
.adm-tab { display: none; }
@media (max-width: 800px) {
  .shell > .side { display: none; }
  .adm-tab { display: grid; }
  .shell > .main { padding-bottom: 110px; }
  .main .hwrap .hero { margin: -18px -16px 4px; border-radius: 0 0 26px 26px; }
}

/* ---------- Dictée vocale ---------- */
.voice-btn { align-self: flex-start; margin-top: 6px; background: var(--accent-soft); color: var(--navy); border: 0; border-radius: 99px; padding: 7px 14px; font-weight: 600; font-size: 14px; cursor: pointer; }
.voice-btn:active { filter: brightness(.95); }
#vmic.rec { background: var(--danger); border-color: var(--danger); animation: vpulse 1.2s infinite; }
@keyframes vpulse { 50% { opacity: .75; } }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(90px + env(safe-area-inset-bottom)); max-width: 480px; margin: 0 auto; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; z-index: 200; text-align: center; }

/* Navigation : bouton Retour sur chaque écran, croix de fermeture, visionneuse de documents */
.backbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.backbar.hidden { display: none; }
.shell .backbar { margin-bottom: -6px; }
body > .backbar, #app > .backbar { max-width: 520px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 18px 0; }
.backbtn { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; }
.backbtn:active { transform: scale(.97); }
.vin { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.modal .sheet { position: relative; }
.sheet-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--line-soft); color: var(--ink); font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.modal .sheet > h2:first-child, .modal .sheet > form > h2:first-child { padding-right: 40px; }
.docv { position: fixed; inset: 0; z-index: 90; background: #EEF1EC; display: flex; flex-direction: column; }
.docv-bar { display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: var(--card); border-bottom: 1px solid var(--line); }
.docv-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docv-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 8px calc(16px + env(safe-area-inset-bottom)); }
.docv-body canvas, .docv-body img { max-width: 100%; height: auto; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.docv-body iframe { width: 100%; flex: 1; min-height: 80vh; border: 0; background: #fff; }

/* iPhone : le contenu ne passe plus sous l'heure / la batterie (encoche) */
.mobile { padding-top: calc(20px + env(safe-area-inset-top)); }
.mobile.home .hero { margin-top: calc(-20px - env(safe-area-inset-top)); }
.backbar:not(.hidden) + .mobile { padding-top: 12px; }
@media (max-width: 800px) {
  .shell > .main { padding-top: calc(18px + env(safe-area-inset-top)); }
  .main .hwrap .hero { margin-top: calc(-18px - env(safe-area-inset-top)); }
}
.docv-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
.docv-acts .btn { flex: 1 1 140px; }
.docv-msg { flex-basis: 100%; }
.docv-msg:empty { display: none; }
.docv-note { flex-basis: 100%; font-size: 13px; color: var(--ink-2, #5C6675); }

/* ---------- Dépôt ---------- */
.dp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.dp-card { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; font: inherit; color: inherit; min-width: 0; }
.dp-card.van { grid-column: 1 / -1; border-color: var(--navy); background: var(--accent-soft); }
.dp-card .pill { margin-left: auto; flex-shrink: 0; }
.dp-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.dp-tx b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-ph { width: 52px; height: 52px; flex-shrink: 0; border-radius: 10px; background: var(--line-soft); display: grid; place-items: center; overflow: hidden; color: var(--navy); }
.dp-ph img { width: 100%; height: 100%; object-fit: cover; }
.dp-ph svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dp-ph.lg { width: 76px; height: 76px; }
.dp-head { display: flex; gap: 14px; align-items: center; }
.dp-cal { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 440px; margin: 0 auto; }
.depot .hsec { margin-top: 14px; }
.dp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dp-days .h { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; }
.dp-days button { position: relative; aspect-ratio: 1 / 1; min-height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; padding: 0; }
.dp-days button i { position: absolute; right: 3px; bottom: 1px; font-size: 10px; font-style: normal; color: var(--muted); }
.dp-days .free { background: var(--green-soft); border-color: #CFE3B8; }
.dp-days .part { background: var(--warn-soft); border-color: #F0D2B5; }
.dp-days .full { background: #F6E3E3; border-color: #EBC5C5; color: var(--danger); }
.dp-days .past, .dp-days .off { background: var(--line-soft); color: #A7AEB8; cursor: default; }
.dp-days .out { opacity: .45; }
.dp-days .today { outline: 2px solid var(--navy); outline-offset: -2px; font-weight: 700; }
.dp-leg { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dp-leg span { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); }
.dp-leg .free { background: var(--green-soft); } .dp-leg .part { background: var(--warn-soft); } .dp-leg .full { background: #F6E3E3; }
.st-step { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.st-step button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: 20px; line-height: 1; color: var(--navy); cursor: pointer; }
.st-step input, .st-in { width: 58px; height: 34px; text-align: center; padding: 0 4px; border-radius: 8px; }
.dp-card.st { cursor: default; }
.dp-card.st .dp-ph { cursor: pointer; }
.err-t { color: var(--danger); } .warn-t { color: var(--warn); }
.st-cart { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); margin-top: 10px; z-index: 5; display: flex; align-items: center; gap: 8px; background: var(--navy); color: #fff; border-radius: var(--radius); padding: 10px 12px; box-shadow: 0 6px 20px rgba(18, 33, 61, .25); }
.st-cart span { flex: 1; }
.st-cart .btn:not(.primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.st-cart .btn.primary { background: var(--lime); color: var(--navy); border-color: var(--lime); }
@media (min-width: 801px) { .st-cart { bottom: 12px; } }

/* ---------- Courriers RH ---------- */
.msg.warn { background: var(--warn-soft); color: #8A440C; }
.cr-mo { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 14px; }
.cr-mo:has(input:checked) { border-color: var(--navy); background: var(--accent-soft); }
.cr-sgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cr-sg { display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 10px; border: 1px dashed var(--line); font-size: 13px; }
.cr-sg span { color: var(--muted); font-size: 12px; }
.cr-sg.ok { border-style: solid; border-color: #CFE3B8; background: var(--green-soft); }
.cr-sg.ok span { color: var(--green); }
.cr-ph { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.cr-ph img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; cursor: pointer; }

/* ---------- Photos de chantier ---------- */
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.ph-it { position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; cursor: pointer; font: inherit; color: inherit; }
.ph-it img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line-soft); }
.ph-b { position: absolute; top: 6px; left: 6px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); }
.ph-b.w { background: var(--warn-soft); color: var(--warn); } .ph-b.r { background: #F6E3E3; color: var(--danger); }
.ph-tx { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; font-size: 13px; }
.ph-tx span { color: var(--muted); font-size: 12px; } .ph-tx .pill { align-self: flex-start; }
.ph-types { display: flex; flex-direction: column; gap: 6px; }
.ph-dt { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.ph-dt img { width: 100%; max-height: 320px; object-fit: contain; background: var(--line-soft); border-radius: 12px; cursor: zoom-in; }
.form label.cr-mo, label.cr-mo { flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; gap: 10px; }
label.cr-mo input { width: 20px; height: 20px; flex: 0 0 auto; margin: 0; padding: 0; }
.dp-card.st .dp-tx b { white-space: normal; }
/* Accès : fiches et adresses e-mail */
.ac-box { font-weight: 700; font-size: 17px; color: var(--navy, #1B3A6B); background: var(--line-soft); border-left: 4px solid #A4C229; padding: 10px 12px; border-radius: 6px; word-break: break-all; }
.ac-pw { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 22px; letter-spacing: .06em; text-align: center; }
.ac-list { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.ep-in { min-width: 200px; padding: 6px 8px; font-size: 13px; }

/* Aperçu « Voir comme » */
#apercu-bar { position: sticky; top: 0; z-index: 1000; display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 12px; background: #1B3A6B; color: #fff; font-size: 13px; }
#apercu-bar .btn { background: #fff; color: #1B3A6B; border: 0; }
#apercu-bar span { font-size: 12px; line-height: 1.3; } #apercu-bar .btn { white-space: nowrap; padding: 6px 10px; }
/* Factures fournisseurs */
.ffgrid{display:grid;grid-template-columns:1.2fr 1fr;gap:12px;align-items:start}
.ffpdf{width:100%;height:62vh;border:1px solid var(--line,#DDE3EA);border-radius:8px;background:#fff}
.ffpages{overflow:auto;-webkit-overflow-scrolling:touch;background:#EEF1F4;padding:7px;box-sizing:border-box}
@media (max-width:760px){.ffgrid{grid-template-columns:1fr}.ffpdf{height:46vh}}

/* Appui long (Teki) : retirer un élément de « À valider » */
.pressing { transition: transform 2s linear, background-color 2s linear; transform: scale(.98); background-color: #FDECEC !important; }
[data-i], [data-t] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

.btn.danger { background: #B42318; color: #fff; border-color: #B42318; }

/* Interprète (traduction en direct face à face) */
.ip-wrap { display: flex; flex-direction: column; gap: 0; height: calc(100dvh - 190px); min-height: 460px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line, #E3E8EF); background: #fff; }
.ip-side { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 12px; min-height: 0; }
.ip-flip { transform: rotate(180deg); background: #F4F7FB; }
.ip-mid { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 4px; background: #1B3A6B; color: #fff; font-weight: 700; font-size: 13px; }
.ip-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.ip-msg { padding: 8px 12px; border-radius: 12px; max-width: 88%; font-size: 17px; line-height: 1.35; }
.ip-msg.me { align-self: flex-end; background: #E6EEF8; color: #1F2A3D; font-size: 14px; }
.ip-msg.them { align-self: flex-start; background: #1B3A6B; color: #fff; font-weight: 600; }
.ip-msg.err { align-self: center; background: #FDECEC; color: #B42318; font-size: 13px; }
.ip-bar { display: flex; gap: 6px; align-items: center; }
.ip-bar .ip-in { flex: 1; min-width: 0; }
.ip-mic.rec { background: #B42318; border-color: #B42318; }
.ip-lang { font-weight: 700; }

/* Mail / rendez-vous ouvert sur natel : plein écran, en-tête compact, boutons sur une ligne qui défile, le mail prend le reste de l'écran */
@media (max-width: 800px) {
  .modal:has(> .sheet.mailbig) { align-items: stretch; }
  .modal .sheet.mailbig { max-width: none; height: 100vh; height: 100dvh; max-height: 100dvh; border-radius: 0; padding: calc(env(safe-area-inset-top) + 10px) 12px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
  .sheet.mailbig > .sheet-x, .sheet.mailbig .sheet-x { top: calc(env(safe-area-inset-top) + 6px); right: 8px; }
  .sheet.mailbig .mread { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
  .sheet.mailbig .mread > * { flex-shrink: 0; }
  .mread h2 { font-size: 17px; line-height: 1.25; padding-right: 44px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .mread .mfrom { font-size: 13px; line-height: 1.35; }
  .mread .mbar { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -12px; padding: 0 12px 2px; flex: none; }
  .mread .mbar::-webkit-scrollbar { display: none; }
  .mread .mbar .btn { flex: none; white-space: nowrap; }
  .sheet.mailbig .mread > iframe.mbody { flex: 1 1 auto; flex-shrink: 1; min-height: 0 !important; height: 100%; border-radius: 8px !important; }
  .mread .mclose { display: none; }
  /* Le haut (titre + boutons) reste fixe : seule la zone du mail / de la pièce jointe défile */
  .modal .sheet.mailbig { overflow: hidden; }
  /* Rédaction (nouveau, répondre, transférer) : tout le formulaire défile, boutons Envoyer toujours visibles en bas */
  .modal .sheet.mailbig:has(#mcf) { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .sheet.mailbig textarea[name=texte] { min-height: 22vh; }
  .sheet.mailbig .mread > .mbody, .sheet.mailbig .mread > .pjbox { flex: 1 1 auto; flex-shrink: 1; min-height: 0 !important; height: auto; overflow: auto; }
}

.pdfv { overflow: auto; -webkit-overflow-scrolling: touch; background: #E9ECEF !important; padding: 8px; display: block; touch-action: pan-x pan-y; overscroll-behavior: contain; }
.pdfv .pdfin { transform-origin: 0 0; width: max-content; min-width: 100%; }
.pdfv .pdfpage { display: block; margin: 0 auto 8px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
@media (max-width: 800px) { .sheet.mailbig .mread > .mbody { flex: 1 1 auto; flex-shrink: 1; min-height: 0 !important; } }

/* Barre Annuler / Envoyer de la rédaction : collée en bas de l'écran */
#mcf .mcbar { position: sticky; bottom: 0; z-index: 5; background: var(--card, #fff); padding: 8px 0 calc(4px + env(safe-area-inset-bottom)); margin-top: 4px; box-shadow: 0 -6px 12px -8px rgba(0,0,0,.18); }
.ip-mid .ip-live { background: #fff; color: #1B3A6B; border-color: #fff; font-weight: 800; }
.ip-mid .ip-live.primary { background: #B42318; color: #fff; border-color: #B42318; }
/* iPhone : barre du bas sur sa propre couche, cachée pendant la saisie au clavier */
.tabbar { -webkit-transform: translateZ(0); transform: translateZ(0); }
body.kb-open .tabbar { display: none; }

.instdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #CBD2DA; margin: 0 7px 1px 0; vertical-align: middle; }
.instdot.on { background: #2EB24B; box-shadow: 0 0 0 2px rgba(46,178,75,.18); }

/* ---------- Boîte mail façon Outlook ---------- */
body.olkmode #nb { display: none !important; }
.olkv { --olk: #2F6DB5; --olk-d: #1F4F8C; gap: 0 !important; }
.mtop.olk { background: var(--olk); color: #fff; gap: 10px; padding: 12px 16px 12px; margin: 0; border-radius: 18px; box-shadow: 0 4px 14px -6px rgba(16, 40, 80, .45); }
.olkbar { display: flex; align-items: center; gap: 12px; }
.olkic { width: 42px; height: 42px; flex-shrink: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.olkic:first-child { background: #fff; color: var(--olk); }
.olkic svg, .olkfil svg, .olkfab svg, .olkpj svg, .olkinvic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.olkti { flex: 1; min-width: 0; }
.olkti h1 { margin: 0; font-size: 24px; font-weight: 700; color: #fff; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.olkti small { display: block; font-size: 12.5px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.olksrch input { width: 100%; height: 42px; border: 0; border-radius: 12px; padding: 0 14px; background: #fff; color: var(--ink); font-size: 16px; }
.olkrow { display: flex; align-items: center; gap: 10px; }
.olkseg { flex: 1; min-width: 0; display: flex; gap: 2px; background: var(--olk-d); border-radius: 999px; padding: 3px; overflow-x: auto; scrollbar-width: none; }
.olkseg::-webkit-scrollbar { display: none; }
.olkseg button { flex-shrink: 0; border: 0; background: none; color: #fff; font-weight: 600; font-size: 15px; height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.olkseg button.on { background: #fff; color: var(--olk); }
.olkfil { flex-shrink: 0; display: flex; align-items: center; gap: 6px; border: 0; background: none; color: #fff; font-weight: 500; font-size: 15px; cursor: pointer; padding: 0 2px; }
.olkcpt { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.olkcpt button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.35); background: none; color: #fff; border-radius: 999px; height: 30px; padding: 0 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.olkcpt button.on { background: #fff; color: var(--olk); border-color: #fff; }
.olkcpt i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.olklist { background: var(--card); border-radius: 18px; margin-top: 10px; overflow: hidden; }
.olkday { padding: 14px 18px 6px; font-size: 15px; font-weight: 500; color: var(--muted); background: var(--card); }
.olkit.hitem { align-items: flex-start; gap: 12px; padding: 12px 16px 12px 18px; border-bottom: 1px solid var(--line-soft); position: relative; background: var(--card); }
.olkdot { position: absolute; left: 6px; top: 30px; width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.olkit.unread .olkdot { background: #2F6DB5; }
.olkav { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 16px; font-weight: 500; letter-spacing: .02em; }
.olkbd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.olkl1 { display: flex; align-items: baseline; gap: 8px; }
.olkl1 b { flex: 1; min-width: 0; font-size: 17px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.olkl1 em { font-style: normal; font-size: 13.5px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.olkl2 { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--ink); }
.olkl2 > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.olkl3 { font-size: 14.5px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.olkit.unread .olkl1 b { font-weight: 700; }
.olkit.unread .olkl2 > span { font-weight: 600; }
.olkpj { color: var(--muted); display: inline-grid; flex-shrink: 0; } .olkpj svg { width: 17px; height: 17px; }
.olklu { font-size: 12.5px; font-weight: 600; }
.olkinv { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; background: #F2F4F7; border-radius: 14px; padding: 8px 10px; }
.olkinvic { width: 30px; height: 30px; border-radius: 8px; background: #F5C542; color: #5B4300; display: grid; place-items: center; } .olkinvic svg { width: 18px; height: 18px; }
.olkinv .pill { border-radius: 999px; padding: 3px 10px; font-size: 12.5px; }
.olkempty { padding: 28px 18px; text-align: center; color: var(--muted); }
.olkfab { position: fixed; right: 18px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 30; display: flex; align-items: center; gap: 8px; height: 54px; padding: 0 20px 0 16px; border: 0; border-radius: 18px; background: #fff; color: var(--olk, #2F6DB5); font-weight: 700; font-size: 15px; box-shadow: 0 6px 20px rgba(16, 40, 80, .25); cursor: pointer; }
@media (min-width: 801px) { .olkfab { bottom: 28px; right: 28px; } }
@media (max-width: 800px) {
  .main .hwrap.olkv .mtop.olk { margin: calc(-18px - env(safe-area-inset-top)) -16px 0; padding-top: calc(14px + env(safe-area-inset-top)); border-radius: 0; }
  .main .hwrap.olkv .olklist { margin: 0 -16px; border-radius: 0; }
}
.mobile .hwrap.olkv .mtop.olk { margin: calc(-20px - env(safe-area-inset-top)) -18px 0; padding-top: calc(14px + env(safe-area-inset-top)); border-radius: 0; }
.mobile .hwrap.olkv .olklist { margin: 0 -18px; border-radius: 0; }
.backbar:not(.hidden) + .mobile .hwrap.olkv .mtop.olk { margin-top: -12px; padding-top: 14px; }
.olkinv .btn { height: 32px; min-height: 0; padding: 0 12px; font-size: 13.5px; border-radius: 999px; }
.hero .hvc { flex-shrink: 0; width: 46px; height: 46px; border: 0; border-radius: 12px; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.hero .hvc svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }

/* ---------- Accueil sur ordinateur : plein écran, deux colonnes (tâches | à valider), menus en grille ---------- */
.hcols { display: flex; flex-direction: column; gap: 12px; }
.hcol { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hdesk { display: none; }
@media (min-width: 1100px) {
  .main .hwrap.home { max-width: 1480px; padding: 0 12px; }
  .main .hwrap.home .hero { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 28px; }
  .main .hwrap.home .hero .hrow { flex: 1; }
  .main .hwrap.home .hero .qa { grid-template-columns: repeat(4, 130px); }
  .main .hwrap.home .hcols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; align-items: start; }
  .main .hwrap.home .hdesk { display: flex; }
  .main .hwrap.home .hcol .hlist { max-height: min(60vh, 560px) !important; }
  .main .hwrap.home .hmenu { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
  .main .hwrap.home .hmenu button { padding: 14px; }
}
@media (min-width: 1100px) { .main .hwrap:not(.home) { max-width: 1180px; } }

/* À valider sur ordinateur : la liste à gauche, la pièce sélectionnée affichée à droite */
.ibprev { display: none; }
@media (min-width: 1100px) {
  .main .hwrap.ibwide { max-width: none; }
  .ibx { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
  .ibx .ibprev { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 8px; height: calc(100vh - 40px); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; box-sizing: border-box; }
  .ibx .ibprev iframe { flex: 1; width: 100%; border: 1px solid var(--line-soft, #E5E9EE); border-radius: 10px; background: #fff; }
  .ibx .item.sel { outline: 2px solid var(--navy); outline-offset: -2px; }
}

/* ---------- Listes de matériel (Fournitures, Catalogue WS, Déjà commandé) : photo à gauche, quantité + / − et ✓ ---------- */
.mlist { padding: 0 !important; gap: 0 !important; }
.mlist > .mrow, .mlist > .mprod { border-top: 1px solid var(--line-soft, #E5E9EE); }
.mlist > :first-child { border-top: 0; }
.mrow { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; padding: 10px 12px; align-items: center; }
.mimg { width: 76px; height: 76px; border-radius: 10px; background: #fff; border: 1px solid var(--line-soft, #E5E9EE); display: grid; place-items: center; overflow: hidden; color: var(--navy); }
.mimg img { width: 100%; height: 100%; object-fit: contain; }
.mimg svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.mtx { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mtx b { line-height: 1.25; }
.mdesc { color: var(--ink-2, #3A4352); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mright { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; white-space: nowrap; }
.mprod .mrow { grid-template-columns: 76px minmax(0, 1fr); }
.mvar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px 8px 100px; border-top: 1px dashed var(--line-soft, #E5E9EE); }
.mqty { display: flex; align-items: center; gap: 4px; }
.mqty input { width: 64px; height: 44px; padding: 4px 6px; text-align: center; font-size: 16px; }
.mpm { display: flex; flex-direction: column; gap: 2px; }
.mpm button { width: 30px; height: 21px; border: 1px solid var(--line, #DDE3EA); background: var(--card, #fff); border-radius: 6px; font-weight: 700; line-height: 1; padding: 0; cursor: pointer; color: var(--navy); }
.mok { width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--navy); color: #fff; font-size: 20px; font-weight: 700; cursor: pointer; }
.mok.done { background: #1E6B30; }
.ok-t { color: #1E6B30; }
@media (max-width: 640px) {
  .mrow { grid-template-columns: 56px minmax(0, 1fr); }
  .mimg { width: 56px; height: 56px; }
  .mrow > .mright { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .mvar { padding-left: 12px; grid-template-columns: 1fr; }
  .mvar .mright { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* Kola Prod : bouton vert S-Techniques */
.hmenu button.hkp { background: #1E6B30; border-color: #1E6B30; color: #fff; }
.hmenu button.hkp .hic { background: #A4C229; color: #fff; }
.hmenu button.hkp:hover { background: #185a28; }
.side a.skp { background: #1E6B30; color: #fff !important; border-radius: 8px; }
.side a.skp.on { background: #185a28; }

/* 10.13 : barre Panier toujours visible, au-dessus de la barre du bas sur le natel */
.cartbar { position: sticky; bottom: 0; padding: 8px 0; background: var(--bg); z-index: 6; }
.cartbar .btn[disabled] { opacity: .75; }
.cartpad { display: none; }
@media (max-width: 800px) {
  .cartbar { position: fixed; left: 12px; right: 12px; bottom: calc(74px + env(safe-area-inset-bottom)); padding: 0; background: transparent; z-index: 11; }
  .cartbar .btn { min-height: 50px; font-size: 15px; box-shadow: 0 6px 20px rgba(18, 33, 61, .3); }
  .cartbar .btn[disabled] { background: var(--card); opacity: 1; color: var(--muted, #667); }
  .cartpad { display: block; height: 70px; }
  body.kb-open .cartbar { bottom: 8px; }
}

/* 10.20 : Appeler — lignes compactes, initiales, pastilles bleue (sans réponse) / rouge (pas rappelé), boutons ronds */
.ann-card { gap: 0; padding: 6px 14px; }
.ann-card h2 { margin: 8px 0 4px; }
.ann-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft, #EEF0F3); }
.ann-row:last-child { border-bottom: 0; }
.ann-av { flex: 0 0 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #1B3A6B, #2E5A9A); color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; letter-spacing: .02em; }
.ann-av.big { flex-basis: 54px; height: 54px; font-size: 19px; }
.ann-tx { flex: 1; min-width: 0; }
.ann-tx b { font-size: 16px; }
.ann-tx .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ann-bt { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.ann-ic { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line, #D9DEE3); background: var(--card, #fff); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; color: var(--navy, #1B3A6B); text-decoration: none; cursor: pointer; padding: 0; }
.ann-ic.pri { background: var(--navy, #1B3A6B); border-color: var(--navy, #1B3A6B); color: #fff; }
.ann-b { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; color: #fff; font-size: 12px; font-weight: 700; margin-left: 4px; vertical-align: 2px; }
.ann-b.blue { background: #1F5FBF; } .ann-b.red { background: #C0392B; }
.ann-leg { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: -4px 0 -6px; }
.ann-leg .ann-b { margin-left: 8px; }
.ann-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ann-st { background: var(--bg, #F4F6FA); border-radius: 12px; padding: 10px; text-align: center; display: flex; flex-direction: column; }
.ann-st b { font-size: 20px; color: var(--navy, #1B3A6B); } .ann-st span { font-size: 11px; color: #5C6675; }
.ann-hist { max-height: 40vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 420px) { .ann-ic { width: 36px; height: 36px; font-size: 15px; } .ann-bt { gap: 4px; } .ann-row { gap: 9px; } }
.ann-nm { display: flex; align-items: center; min-width: 0; }
.ann-nm b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ann-nm .ann-b { flex-shrink: 0; }
.ann-nm [data-cnt] { display: inline-flex; flex-shrink: 0; white-space: nowrap; }
.ann-b { min-width: 18px; height: 18px; font-size: 11px; padding: 0 5px; margin-left: 3px; }
@media (max-width: 420px) { .ann-ic { width: 34px; height: 34px; font-size: 14px; } .ann-ic svg { width: 17px; height: 17px; } .ann-av { flex-basis: 36px; height: 36px; font-size: 13px; } .ann-tx b { font-size: 15px; } }

/* Accueil bureau : agenda (gauche) et tâches (droite) côte à côte (10.25) */
.hduo { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.hmcol { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hmcol .hsec { font-size: 12px; letter-spacing: .06em; gap: 6px; }
.hmcol .hsec .link { font-size: 13px; }
.hmini { max-height: min(56vh, 460px); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0; gap: 0; }
.hmi { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; border-bottom: 1px solid var(--line-soft); cursor: pointer; min-width: 0; }
.hmi:last-child { border-bottom: 0; }
.hmi b { font-size: 13px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.hmi > span:not(.hmt) { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hmt { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.hmt .hd { width: 26px; height: 22px; font-size: 10px; border-radius: 6px; }
.hmt .pill { font-size: 10.5px; padding: 1px 7px; }
.hmh { font-size: 12px; font-weight: 700; color: var(--accent, #1F5FBF); }
.hmday { position: sticky; top: 0; background: var(--card, #fff); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 7px 10px 4px; border-bottom: 1px solid var(--line-soft); z-index: 1; }
.adm-tab button { font-size: 11px; line-height: 1.15; text-align: center; padding: 0 1px; }

/* Recherche mails : projets proposés et « tous les dossiers » (10.32) */
.olkqp{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.olkqp:empty{display:none}
.olkqp button{border:0;border-radius:14px;padding:5px 10px;font-size:12px;background:rgba(255,255,255,.92);color:#1F2A3D;cursor:pointer}
.olkpt{display:flex;align-items:center;gap:6px;margin-top:6px;font-size:12px;color:#fff;opacity:.9}
.olkpt input{width:auto;margin:0}

/* Appeler : bureau en vert, chantier en bleu (10.32) */
.ann-av.bur { background: linear-gradient(135deg, #1E6B3A, #2E8B57); }
/* Barre du bas : WhatsApp en vert (10.32) */
[data-tb="whatsapp"], [data-v="whatsapp"] { color: #1DA851 !important; }
[data-tb="whatsapp"] svg, [data-v="whatsapp"] svg { stroke: #25D366 !important; }

/* 10.49 : en-tête des mails compact (moins de place sur le natel) */
.mtop.olk { gap: 6px; padding: 8px 12px 8px; }
.olkbar { gap: 8px; }
.olkic { width: 34px; height: 34px; }
.olkic svg { width: 18px; height: 18px; }
.olkti h1 { font-size: 18px; line-height: 1.2; }
.olkti small { font-size: 11px; }
.olksr1 { display: flex; gap: 6px; align-items: center; }
.olksrch .olksr1 input[type=search] { flex: 1; min-width: 0; height: 36px; font-size: 15px; border-radius: 10px; padding: 0 12px; }
.olkpt { flex-shrink: 0; flex-direction: row; align-items: center; margin: 0; height: 36px; padding: 0 10px; border-radius: 10px; background: rgba(255,255,255,.16); font-size: 12px; font-weight: 600; opacity: 1; gap: 5px; cursor: pointer; }
.olkpt input { width: 15px !important; height: 15px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; flex: 0 0 auto; accent-color: #fff; }
.olkrow { gap: 6px; }
.olkseg { padding: 2px; }
.olkseg button { height: 30px; font-size: 13.5px; padding: 0 11px; }
.olkfil { font-size: 13.5px; } .olkfil svg { width: 18px; height: 18px; }
.olkcpt { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.olkcpt button { height: 26px; padding: 0 10px; font-size: 12px; flex-shrink: 0; }
