/* Matoa Prospections : couleurs de la charte (corail Matoa, bleu nuit), mode clair et sombre, pensé d'abord pour le téléphone. */
:root {
  --accent: #f06752; --accent-ink: #c8432f; --accent-soft: #fde8e4;
  --bg: #f5f6fa; --card: #ffffff; --ink: #1b2440; --muted: #5d6680; --line: #e1e4ee; --chip: #eef0f6;
  --ok: #1f8a55; --ok-soft: #e3f4ea; --warn: #a65b00; --warn-soft: #fdf0dc; --danger: #c0392b; --danger-soft: #fbe6e3;
  --band: #1b2440; --shadow: 0 1px 2px rgba(27, 36, 64, .06);
  --glass: rgba(255, 255, 255, .62); --glass-edge: rgba(255, 255, 255, .75); --glass-lens: rgba(255, 255, 255, .85); --glass-shadow: 0 10px 30px rgba(27, 36, 64, .18);
  --s0: #6b7aa6; --s1: #4a77d4; --s2: #2f8fb8; --s3: #2a9d8f; --s4: #3f9d4a; --s5: #c78a12; --s6: #d0682a; --s7: #b34fb0; --s8: #7a59d0;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --accent-ink: #ff8e7c; --accent-soft: #3d2420;
  --bg: #0f1424; --card: #182035; --ink: #eef0f7; --muted: #a3abc4; --line: #2a3350; --chip: #222b45;
  --ok: #4cc584; --ok-soft: #173326; --warn: #f2a64a; --warn-soft: #33260f; --danger: #ff7a6b; --danger-soft: #3a1d1a;
  --band: #0a0e1a; --shadow: none; color-scheme: dark;
  --glass: rgba(24, 32, 53, .58); --glass-edge: rgba(255, 255, 255, .14); --glass-lens: rgba(255, 255, 255, .12); --glass-shadow: 0 10px 30px rgba(0, 0, 0, .45);
} }
:root[data-theme="dark"] {
  --accent-ink: #ff8e7c; --accent-soft: #3d2420;
  --bg: #0f1424; --card: #182035; --ink: #eef0f7; --muted: #a3abc4; --line: #2a3350; --chip: #222b45;
  --ok: #4cc584; --ok-soft: #173326; --warn: #f2a64a; --warn-soft: #33260f; --danger: #ff7a6b; --danger-soft: #3a1d1a;
  --band: #0a0e1a; --shadow: none; color-scheme: dark;
  --glass: rgba(24, 32, 53, .58); --glass-edge: rgba(255, 255, 255, .14); --glass-lens: rgba(255, 255, 255, .12); --glass-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; font-size: 15px; line-height: 1.5; padding-bottom: env(safe-area-inset-bottom) }
a { color: var(--accent-ink) }
button { font: inherit; color: inherit; cursor: pointer }
button:disabled { opacity: .55; cursor: not-allowed }
img { max-width: 100% }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px }

/* En-tête */
header.top { background: color-mix(in srgb, var(--band) 82%, transparent); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); isolation: isolate; border-bottom: 3px solid var(--accent); position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top) }
.bar { display: flex; align-items: center; gap: 16px; min-height: 60px; padding: 6px 16px; max-width: 1440px; margin: 0 auto }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; flex: none }
.brand img { height: 28px; width: auto; display: block }
.brand span { font-weight: 700; font-size: 15px; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .35); white-space: nowrap }
nav.tabs { display: flex; gap: 2px; flex: 1; flex-wrap: nowrap; min-width: 0; overflow-x: auto; scrollbar-width: none }
nav.tabs a { color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; padding: 7px 11px; border-radius: 999px; white-space: nowrap }
nav.tabs a:hover { background: rgba(255, 255, 255, .1) }
nav.tabs a.on { background: #fff; color: #1b2440 }
.tools { display: flex; gap: 8px; align-items: center; margin-left: auto }
.who { color: #cfd5e6; font-size: 13px; line-height: 1.2; text-align: right; display: flex; flex-direction: column }
.who small { color: #9aa3bf }
.seg { display: flex; background: #fff; border-radius: 999px; padding: 3px }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; color: #555 }
.seg button.on { background: #1b2440; color: #fff }
.round { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #fff; color: #1b2440; display: grid; place-items: center; flex: none }
.round svg { width: 17px; height: 17px }

/* Bandeaux */
.band { display: block; font-size: 13px; font-weight: 600; text-align: center; padding: 7px 12px; text-decoration: none }
.band.off { background: var(--warn-soft); color: var(--warn) }
.band.login { background: var(--danger-soft); color: var(--danger) }
.band.queue { background: var(--accent-soft); color: var(--accent-ink) }

main.wrap { padding-top: 26px; padding-bottom: 40px; min-height: 60vh }
.eyebrow { color: var(--accent-ink); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 8px }
h1 { font-size: clamp(24px, 4.5vw, 36px); line-height: 1.12; font-weight: 800; margin: 0 0 12px; letter-spacing: -.01em }
h2 { font-size: 19px; font-weight: 800; margin: 0 0 10px }
h3 { font-size: 15px; font-weight: 700; margin: 16px 0 6px }
.lead { color: var(--muted); font-size: 16px; max-width: 760px; margin: 0 0 22px }
.muted { color: var(--muted) }
.small { font-size: 13px }
.warnt { color: var(--warn); font-weight: 600 }
.empty { color: var(--muted); padding: 14px 0 }
.pre { white-space: pre-wrap }
em { color: var(--accent-ink); font-style: normal }

/* Boutons et puces */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 9px 15px; font-size: 14px; font-weight: 600; text-decoration: none; min-height: 40px }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff }
.btn.danger { color: var(--danger) }
.btn.big { font-size: 16px; padding: 12px 26px }
.btn svg { width: 16px; height: 16px }
.mini { font-size: 12px; font-weight: 700; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 3px 9px; color: var(--ink) }
.mini.danger { color: var(--danger) }
.link { border: 0; background: none; padding: 0; color: var(--accent-ink); text-decoration: underline; text-align: left }
.pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center }
.pills.col { flex-direction: column; align-items: stretch }
.pill { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 13px; font-size: 14px; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; color: var(--ink); text-align: left; cursor: pointer }
.pill.on, .pill:has(input:checked) { background: var(--ink); color: var(--bg); border-color: var(--ink) }
.pill input[type=radio], .pill input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none }
.chip { display: inline-block; border: 1px solid var(--line); background: var(--chip); border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; text-decoration: none }
.chip.ok { border-color: var(--ok); color: var(--ok); background: var(--ok-soft) }
.chip.wip { border-color: var(--warn); color: var(--warn); background: var(--warn-soft) }
.chip.bad { border-color: var(--danger); color: var(--danger); background: var(--danger-soft) }
.chip[class*="st-n"] { color: #fff; border-color: transparent }
.st-n0 { background: var(--s0) } .st-n1 { background: var(--s1) } .st-n2 { background: var(--s2) } .st-n3 { background: var(--s3) } .st-n4 { background: var(--s4) }
.st-n5 { background: var(--s5) } .st-n6 { background: var(--s6) } .st-n7 { background: var(--s7) } .st-n8 { background: var(--s8) }
.chip.st-signed { background: var(--ok); border-color: var(--ok); color: #fff }
.chip.st-refused { background: var(--danger); border-color: var(--danger); color: #fff }

/* Messages */
.note { background: var(--chip); border-left: 4px solid var(--muted); border-radius: 8px; padding: 10px 14px; margin: 10px 0; font-size: 14px }
.note.warn { background: var(--warn-soft); border-color: var(--warn); color: var(--warn) }
.note.danger { background: var(--danger-soft); border-color: var(--danger); color: var(--danger) }
.note.ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); font-weight: 600 }
.note ul { margin: 6px 0 0; padding-left: 20px }
.link-note { display: block; text-decoration: none; color: var(--ink); font-weight: 600 }
.saved { color: var(--ok); font-size: 13px; min-height: 1.2em; margin: -6px 0 10px }

/* Blocs, cartes, grilles */
.block { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow) }
.block h2:first-child { margin-top: 0 }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start }
.cols .block { margin-bottom: 0 }
.cols + .block, .cols + section { margin-top: 14px }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 10px }
.cards { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow) }
.card.row, .card .row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap }
.card.click, tr.click { cursor: pointer }
.card.click:hover, tr.click:hover td { background: var(--chip) }
.card.late { border-left: 4px solid var(--warn) }
.card a { text-decoration: none; color: var(--ink) }
.acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0 }
.acts.sticky { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 10px; margin: 0; z-index: 5 }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px }

/* Champs */
.field { display: block; margin: 12px 0 }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 5px }
input:not([type=radio]):not([type=checkbox]):not([type=file]), textarea, select { font: inherit; font-size: 16px; width: 100%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 9px; padding: 9px 11px; min-height: 42px }
textarea { resize: vertical }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; align-items: center }
.filters .search { flex: 1 1 220px }
.filters select { flex: 0 1 240px; width: auto }
.filters label { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted) }
.filters label input { width: auto }
.filters label:has(input[type=date]) { flex: 1 1 40%; min-width: 0; max-width: 240px }
.filters input[type=date]::-webkit-date-and-time-value { text-align: left }
.filters input[type=date] { flex: 1; min-width: 0; min-height: 40px }
@media (max-width: 600px) { .filters select { flex: 1 1 100% } }
td.places { min-width: 120px }
#srv td:first-child { white-space: nowrap }

/* Tableaux */
.tbl { overflow-x: auto; margin: 6px 0; -webkit-overflow-scrolling: touch }
table { border-collapse: collapse; width: 100%; font-size: 14px }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 8px 10px; vertical-align: top }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; white-space: nowrap }
tr.waiting td { background: var(--warn-soft) }
table.dest { min-width: 720px }
table.dest td { padding: 3px }
table.dest input { padding: 6px 8px; font-size: 15px; min-height: 36px }
dl.kv { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; gap: 6px 14px; margin: 6px 0 }
dl.kv dt { color: var(--muted); font-size: 13px; font-weight: 600 }
dl.kv dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere }

/* Chiffres */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 18px }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px }
.stat span { color: var(--muted); font-size: 13px; font-weight: 600 }
.stat b { font-size: 24px; font-weight: 800; line-height: 1.15 }
.stat small { color: var(--muted); font-size: 12px }
.stat.big b { font-size: 30px; color: var(--accent-ink) }
.stat.warn { border-color: var(--warn) } .stat.warn b { color: var(--warn) }
.stat.bad { border-color: var(--danger) } .stat.bad b { color: var(--danger) }
.stat.okc b { color: var(--ok) }
.stat .chip { align-self: flex-start }

/* Pipeline */
.pipe { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; margin-bottom: 4px }
.pstep { flex: 0 0 auto; min-width: 96px; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 10px; text-align: left; display: flex; flex-direction: column }
.pstep b { font-size: 20px } .pstep span { font-size: 11px; color: var(--muted); line-height: 1.2 }
.pstep.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent) }
.pstep.zero b { color: var(--muted) }
.stepper { list-style: none; display: flex; gap: 4px; padding: 0; margin: 14px 0 }
.stepper li { flex: 1; height: 8px; border-radius: 4px; background: var(--line); position: relative }
.stepper li span { position: absolute; top: 11px; left: 0; font-size: 10px; color: var(--muted) }
.stepper li.done { background: var(--accent) }
.stepper li.now { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
.stepper li.signed { background: var(--ok) } .stepper li.refused { background: var(--danger) }
.timeline { list-style: none; padding: 0; margin: 0 }
.timeline li { border-left: 2px solid var(--line); padding: 0 0 12px 14px; position: relative }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent) }
.timeline p { margin: 4px 0 0; font-size: 14px }
.bars { display: grid; gap: 6px }
.hbar { display: grid; grid-template-columns: minmax(130px, 40%) 1fr 32px; gap: 8px; align-items: center; text-decoration: none; color: var(--ink); font-size: 13px }
.bt { height: 14px; background: var(--chip); border-radius: 4px; overflow: hidden }
.bt i { display: block; height: 100%; background: var(--accent); border-radius: 4px; min-width: 2px }
.bt i.ok { background: var(--ok) } .bt i.no { background: var(--danger) }
.hbar b { text-align: right }
.cbars { display: flex; gap: 6px; height: 170px; align-items: flex-end }
.cb { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; font-size: 11px; color: var(--muted) }
.cb i { width: 100%; max-width: 34px; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px }
.cb b { color: var(--ink); font-size: 12px }
.cb span { white-space: nowrap }

/* Fichiers */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 8px 0 }
.thumb { aspect-ratio: 1; border: 1px solid var(--line); background: var(--chip); border-radius: 8px; padding: 0; overflow: hidden; display: grid; place-items: center; font-size: 12px; color: var(--muted) }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block }
.files { list-style: none; padding: 0; margin: 6px 0 }
.files li { margin: 4px 0 }
.atts { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px }
.atts li { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: var(--bg) }
.atts img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; display: block }
.atts audio { width: 64px }
.atts li:has(audio) { grid-template-columns: 1fr auto; } .atts li:has(audio) audio { width: 100%; grid-column: 1 / -1 }
.atts small { display: block }
.ficon { font-size: 30px; text-align: center }
.voice audio { width: 100%; max-width: 480px }

/* Fenêtre */
dialog.modal { border: 0; border-radius: 16px; padding: 0; max-width: min(720px, calc(100vw - 24px)); width: 100%; background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .35) }
dialog.modal::backdrop { background: rgba(10, 14, 26, .55) }
.mbody { padding: 20px; max-height: calc(100vh - 60px); overflow: auto }
.menu { display: grid; gap: 4px; margin-bottom: 14px }
.menu a { display: block; padding: 12px 14px; border-radius: 10px; background: var(--chip); text-decoration: none; color: var(--ink); font-weight: 600 }
.menu-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px }
.menu-tools .seg { border: 1px solid var(--line) }

/* Connexion */
.login { max-width: 460px; margin: 6vh auto; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 30px 24px }
.logo-c { height: 52px; width: auto; margin-bottom: 18px }
.login .access { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted) }
.login .access p { margin: 0 0 10px }
.login .contact { display: inline-block; margin: 0 6px 6px; padding: 6px 12px; border-radius: 999px; background: var(--chip); color: var(--ink); text-decoration: none; font-weight: 600 }
.login .contact.wa::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #25d366; margin-right: 7px; vertical-align: middle }
body.anon .tabs, body.anon .who, body.anon .desk { display: none }
/* Motif officiel Matoa (le même que sur les offres), en filigrane. Une seule image en masque, teintée selon le thème. */
header.top::before, .hero.motif::before, body::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  -webkit-mask: url(assets/matoa-motif.png) 0 0 / 300px auto repeat; mask: url(assets/matoa-motif.png) 0 0 / 300px auto repeat }
header.top::before { background: #fff; opacity: .07 }
body { position: relative; isolation: isolate; min-height: 100vh }
body::before { position: fixed; background: var(--ink); opacity: .025; -webkit-mask-size: 420px auto; mask-size: 420px auto }
body.anon { background: #1b2440 }
body.anon::before { background: #fff; opacity: .08; -webkit-mask-size: 360px auto; mask-size: 360px auto }
body.anon footer { color: rgba(255, 255, 255, .7); border-color: rgba(255, 255, 255, .15) }
body.anon footer a { color: #ffb3a7 }
body.anon .login { box-shadow: 0 20px 60px rgba(0, 0, 0, .45) }
.hero.motif { position: relative; isolation: isolate; overflow: hidden; border-radius: 18px; padding: 26px 22px 20px; margin: 0 0 22px; color: #fff; background: #1b2440; border-bottom: 4px solid var(--accent) }
.hero.motif::before { background: #fff; opacity: .1; -webkit-mask-size: 260px auto; mask-size: 260px auto }
.hero.motif .eyebrow { color: #ff9b8a }
.hero.motif .lead { color: rgba(255, 255, 255, .82) }
.hero.motif .quick { margin-bottom: 0 }
.hero.motif .btn:not(.accent) { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .3) }

footer { color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding: 16px 16px 30px }
.toast { position: fixed; bottom: 86px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; max-width: calc(100vw - 32px); text-align: center }
.toast.show { opacity: 1 }

/* Nom du collaborateur connecté, toujours visible ; le rôle disparaît quand la place manque. */
.who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; font-weight: 600 }
@media (max-width: 1900px) { .who small { display: none } .who span { max-width: 130px } }
@media (min-width: 861px) { nav.tabs a { font-size: 13.5px; padding: 7px 9px; gap: 6px } }
@media (min-width: 861px) and (max-width: 2400px) { .brand span { display: none } }
@media (max-width: 1340px) { nav.tabs a span { display: none } nav.tabs a { padding: 8px 10px } nav.tabs a.on span { display: inline } }

/* Liquid glass : barre du bas, onglets, menu « Plus » et sélecteurs, en verre dépoli qui laisse passer la page */
nav.bottom, dialog.modal.glass, .seg {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(255, 255, 255, .08), var(--glass-shadow);
}
nav.tabs { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; padding: 3px; flex: 0 1 auto; margin-right: auto; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12) }
nav.tabs a { transition: background .2s, color .2s }
nav.tabs a.on { background: rgba(255, 255, 255, .9); color: #1b2440; box-shadow: inset 0 1px 0 #fff, 0 2px 10px rgba(0, 0, 0, .25) }
.seg { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2) }
.seg button { color: rgba(255, 255, 255, .8) }
.seg button.on { background: rgba(255, 255, 255, .92); color: #1b2440; box-shadow: 0 1px 6px rgba(0, 0, 0, .25) }
.menu-tools .seg { background: var(--glass-lens); border-color: var(--line) }
.menu-tools .seg button { color: var(--muted) }
.menu-tools .seg button.on { background: var(--ink); color: var(--bg) }
dialog.modal.glass { border-radius: 24px }
dialog.modal.glass::backdrop { background: rgba(10, 14, 26, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px) }
.menu a { background: var(--glass-lens); border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35) }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  nav.bottom, dialog.modal.glass { background: var(--card) }
}

/* Champ date : iOS Safari lui donne une largeur fixe et centre le texte ; on le ramène à la largeur du formulaire. */
input[type=date] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left; line-height: 1.3 }
input[type=date]::-webkit-date-and-time-value { text-align: left; margin: 0 }
input[type=date]::-webkit-calendar-picker-indicator { opacity: .6 }

/* Icônes duotone */
svg.ic { width: 22px; height: 22px; flex: none; display: block }
svg.ic .d { fill: currentColor; stroke: none; opacity: .18 }
.on > svg.ic .d, a.on svg.ic .d { opacity: 1; fill: url(#ic-grad) }
.on > svg.ic { color: var(--accent-ink) }
nav.tabs a { display: inline-flex; align-items: center; gap: 7px }
nav.tabs svg.ic { width: 18px; height: 18px }
nav.tabs a.on svg.ic { color: #c8432f }
nav.tabs a.on svg.ic .d { opacity: .9 }
.menu a { display: flex; align-items: center; gap: 12px }
.menu svg.ic { color: var(--accent-ink) }
.menu svg.ic .d { opacity: .25 }
#theme svg.ic, .menu-tools svg.ic { width: 18px; height: 18px; display: inline-block; vertical-align: -3px }

/* Navigation du bas (téléphone) */
nav.bottom { display: none }
@media (max-width: 860px) {
  nav.tabs, .seg, #theme, .desk { display: none }
  .who { display: flex; min-width: 0 } .who small { display: block; font-size: 11px } .who span { max-width: 46vw; font-size: 13px }
  .menu-tools .seg, body.anon .tools .seg, body.anon #theme { display: flex }
  .bar { min-height: 52px }
  .brand img { height: 24px } .brand span { font-size: 14px }
  nav.bottom { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40; padding: 5px; border-radius: 26px }
  nav.bottom a, nav.bottom button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; border: 0; background: none; border-radius: 10px }
  nav.bottom svg.ic { width: 24px; height: 24px; transition: transform .2s }
  nav.bottom .on svg.ic { transform: translateY(-1px) scale(1.06) }
  nav.bottom a, nav.bottom button { border-radius: 21px; transition: background .2s, color .2s }
  nav.bottom .on { color: var(--accent-ink); background: var(--glass-lens); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 2px 8px rgba(27, 36, 64, .12) }
  body:not(.anon) footer { padding-bottom: 110px }
  body:not(.anon) .acts.sticky { bottom: 78px }
  .block { padding: 16px 14px }
  dl.kv { grid-template-columns: 1fr } dl.kv dd { margin-bottom: 8px }
  .grid3 { grid-template-columns: 1fr 1fr }
  .grid3 label:last-child { grid-column: 1 / -1 }
  .bar { gap: 10px }
}
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr } }
body.anon nav.bottom, nav.bottom:empty { display: none !important }
@media print { header.top, nav.bottom, .toast, #bands, .acts { display: none } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important } }

/* Pied de page tout en bas de l'écran, même quand la page est courte */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh }
body > header.top, body > #bands, body > main, body > footer { width: 100%; box-sizing: border-box; flex-shrink: 0 }
body > main.wrap { flex: 1 0 auto; min-height: 0 }
body > footer.wrap { margin-top: auto }

/* Carte des agences */
.mfilters .search { flex: 1 1 260px }
.mcount { margin: 0 0 10px; font-size: 14px }
.mapview { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 14px; height: calc(100vh - 350px); height: calc(100dvh - 350px); min-height: 500px }
.mapbox { position: relative; isolation: isolate; z-index: 0; height: 100%; border-radius: 18px; border: 1px solid var(--line); overflow: hidden; background: var(--chip); box-shadow: var(--shadow) }
.mapbox .leaflet-container, .mapbox.leaflet-container { font: inherit; background: var(--chip) }
.mapbox .leaflet-control-attribution { font-size: 11px }
.mapbox .leaflet-tooltip { font-weight: 700; font-size: 13px; border-radius: 8px }
.mapbox path.mdot { cursor: pointer; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)) }
:root[data-theme="dark"] .mapbox .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.85) saturate(.6) }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mapbox .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.85) saturate(.6) } }
.mpanel { overflow: auto; overscroll-behavior: contain; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow) }
.mpanel h2 { margin: 2px 0 4px; font-size: 21px }
@media (min-width: 861px) { .mpanel.sel .mlist { display: none } .mpanel:not(.sel) .mdetail { display: none } }
.mback { margin: 0 0 10px; font-weight: 700; text-decoration: none }
.mhint { font-size: 13px; margin: 2px 0 12px }
.mgroup { border-top: 1px solid var(--line); padding: 10px 0 6px }
.mgh { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px }
.mgh b { font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.mrows { list-style: none; margin: 0; padding: 0 }
.mrow { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; border: 0; background: none; color: var(--ink); padding: 7px 8px; border-radius: 10px; cursor: pointer; font: inherit }
.mrow:hover, .mrow.on { background: var(--chip) }
.mrow i { flex: 0 0 11px; height: 11px; margin-top: 5px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line) }
.mrow > span { display: flex; flex-direction: column; min-width: 0 }
.mplace { font-weight: 600; font-size: 14px }
.mpanel h3 { margin: 0 0 8px; font-size: 15px }
.mpanel h3 a { color: var(--ink) }
.mpanel .stepper { margin: 10px 0 22px }
.mhead { display: flex; justify-content: space-between; align-items: center; gap: 8px }
.mhead .eyebrow { margin: 0 }
.mclose { width: 34px; height: 34px; font-size: 14px; flex: 0 0 34px }
.msec { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px }
.msec .timeline li { font-size: 14px }
.mlegend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; font-size: 12px; color: var(--muted) }
.mlegend span { display: inline-flex; align-items: center; gap: 6px }
.mlegend i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line) }
@media (max-width: 860px) {
  .mlead { display: none }
  .mfilters select { flex: 1 1 40%; min-width: 0 }
  .mapview { display: block; height: auto; min-height: 0 }
  .mapbox { height: 62vh; height: 62dvh; min-height: 340px }
  .mpanel { margin-top: 14px; overflow: visible }
  .mpanel .mdetail { position: fixed; left: 8px; right: 8px; bottom: calc(92px + env(safe-area-inset-bottom)); max-height: 66vh; max-height: 66dvh; z-index: 45; overflow: auto;
    overscroll-behavior: contain; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
    transform: translateY(calc(100% + 120px)); transition: transform .25s ease; visibility: hidden }
  .mpanel.sel .mdetail { transform: none; visibility: visible }
}

/* Accueil : « À relancer » aligné comme un tableau */
.card.todo { display: grid; grid-template-columns: minmax(0, 1.4fr) 190px minmax(0, 1.6fr) 170px; gap: 6px 16px; align-items: center }
.card.todo .t-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.card.todo .t-idle { text-align: right }
@media (max-width: 860px) {
  .card.todo { grid-template-columns: minmax(0, 1fr) auto; }
  .card.todo .t-next { grid-column: 1 / -1 }
  .card.todo .t-idle { grid-column: 1 / -1; text-align: left }
}

/* Fiche compagnie : contenu à gauche, historique des étapes sur toute la hauteur à droite */
.cdetail { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 14px; align-items: stretch; margin-top: 14px }
.cdetail .chist { margin-bottom: 14px }
.agmap { height: 300px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; margin: 0 0 12px; position: relative; isolation: isolate; z-index: 0; background: var(--chip) }
.agmap.leaflet-container { font: inherit }
:root[data-theme="dark"] .agmap .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.85) saturate(.6) }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .agmap .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.85) saturate(.6) } }
@media (max-width: 860px) {
  .cdetail { display: flex; flex-direction: column; gap: 0 }
  .cdetail .cmain { display: contents }
  .cdetail .cinfo { order: 1 } .cdetail .chist { order: 2 } .cdetail .cmain > section:not(.cinfo) { order: 3 }
}

/* Dépenses (direction) */
.periods { margin: 0 0 16px } .periods .custom { margin-top: 10px; max-width: 420px }
.sbar { grid-template-columns: minmax(150px, 38%) 1fr minmax(90px, auto) }
.sbar .bt { display: flex } .sbar .bt i { border-radius: 0; min-width: 0 } .sbar .bt i.t { background: var(--accent) } .sbar .bt i.m { background: var(--s3, #6b7bd6) }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: -4px 0 10px }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px }
.legend i.lt { background: var(--accent) } .legend i.lm { background: var(--s3, #6b7bd6) }
table.num td:not(:first-child), table.num th:not(:first-child) { text-align: right; white-space: nowrap }
tr.msub td { color: var(--muted); font-size: 13px } tr.msub td:first-child { padding-left: 22px }
tr.mtot td { border-top: 2px solid var(--line) }
td.neg { color: var(--danger) }
td.rowacts { white-space: nowrap; text-align: right } td.rowacts .link { margin-left: 10px }
tr.sel td { background: var(--chip) }
.link.danger { color: var(--danger) }
td.nw { white-space: nowrap }
@media (max-width: 860px) {
  .stat.stot { grid-column: 1 / -1 }
  table.xlist thead { display: none }
  table.xlist tr { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l a" "d c" "x x"; column-gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line) }
  table.xlist td { border: 0; padding: 1px 0 }
  table.xlist .xl { grid-area: l } table.xlist .xa { grid-area: a; text-align: right } table.xlist .xd { grid-area: d; color: var(--muted); font-size: 13px }
  table.xlist .xc { grid-area: c; color: var(--muted); font-size: 13px; text-align: right } table.xlist .xx { grid-area: x; text-align: left; padding-top: 6px } table.xlist .xx .link:first-child { margin-left: 0 }
}
.xdel { margin-left: 8px; font-size: 13px }
@media (max-width: 860px) {
  table.txlist thead { display: none }
  table.txlist tr { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l a" "d s" "x x"; column-gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line) }
  table.txlist td { border: 0; padding: 1px 0 }
  table.txlist .xl { grid-area: l; font-weight: 600 } table.txlist .xa { grid-area: a; text-align: right; font-weight: 700 }
  table.txlist .xd { grid-area: d; color: var(--muted); font-size: 13px } table.txlist .xs { grid-area: s; color: var(--muted); font-size: 13px; text-align: right }
  table.txlist .xx { grid-area: x; font-size: 13px; color: var(--muted) } table.txlist .xx:empty { display: none }
  table.txlist .xdel { margin-left: 0; display: inline-block; margin-top: 4px }
}
@media (min-width: 861px) {
  table.xlist td.rowacts button { display: block; margin: 0 0 6px auto }
}
/* Demandes d'indemnité */
.askf { margin: 0 0 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line) }
.askf h3 { margin: 0 0 10px; font-size: 16px }
.reqlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px }
.reqlist li { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px }
.reqlist li.pending { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset }
.rq-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px }
.rq-h small { margin-left: auto }
.rq-a { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px }
.rq-r { margin: 6px 0 0 }
.rq-d { margin: 4px 0 0; font-size: 13px }
.rq-x { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px }
/* Pop-up des alertes */
.alerts-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; max-height: 55vh; overflow: auto }
.alerts-list li { border-left: 4px solid var(--line); padding: 6px 0 6px 12px }
.alerts-list li.al-allowance_topped_up { border-left-color: #2a9d8f }
.alerts-list li.al-allowance_requested { border-left-color: var(--accent) }
.alerts-list li.al-allowance_request_rejected { border-left-color: #d64545 }
/* Première connexion */
body.onboarding #tabs, body.onboarding #bottom, body.onboarding #bands { display: none }
.onboard { max-width: 820px; margin: 0 auto }
.onboard .ob-lang { display: inline-flex; border: 1px solid var(--line); background: var(--card); margin: 4px 0 12px }
.onboard .ob-lang button { color: var(--muted) }
.onboard .ob-lang button.on { background: var(--ink); color: var(--card) }
.doc { max-height: 55vh; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px 22px 18px; line-height: 1.55; overscroll-behavior: contain }
.doc h2 { margin-top: 14px } .doc h3 { margin: 22px 0 6px; font-size: 17px } .doc h4 { margin: 14px 0 4px; font-size: 15px }
.doc li { margin: 3px 0 }
label.check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; font-weight: 600; line-height: 1.45 }
label.check input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--accent) }
.ob-why { font-size: 13px; margin-top: 18px }
/* Visite guidée */
.tour { position: fixed; inset: 0; z-index: 1000 }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(10, 14, 30, .62); transition: all .25s ease; pointer-events: none }
.tour-tip { position: fixed; background: var(--card); color: var(--ink); border-radius: 16px; padding: 16px 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); max-width: calc(100vw - 24px) }
.tour-tip h3 { margin: 2px 0 6px; font-size: 18px } .tour-tip p { margin: 0 0 10px; line-height: 1.5 }
.tour-n { font-size: 12px; margin: 0 !important }
.tour-acts { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap }
.tour-acts span { display: flex; gap: 8px }

/* Guide : onglets, sommaire et captures d'écran */
.guide-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 4px 0 14px }
.guide-tabs { display: flex; flex-wrap: wrap; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px }
.guide-tabs a { padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 13.5px; color: var(--muted); text-decoration: none }
.guide-tabs a.on { background: #1b2440; color: #fff }
ol.toc { margin: 0; padding-left: 0; columns: 2 260px; column-gap: 24px }
ol.toc li { margin: 4px 0; list-style: none }
ol.toc a { font-weight: 600 }
.manual { scroll-margin-top: 70px }
.manual ol { padding-left: 20px }
.manual ol li { margin: 4px 0 }
.shots { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory }
.shots figure { margin: 0; flex: 0 0 auto; scroll-snap-align: start }
.shots img { display: block; width: 220px; height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0, 0, 0, .1); background: var(--chip) }
@media (max-width: 520px) { .shots img { width: 64vw } }
.login .first-login { text-align: left; max-width: 420px; margin: 18px auto 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px }
.login .first-login h2 { font-size: 16px; margin: 0 0 6px }
.login .first-login ol { margin: 0; padding-left: 20px; font-size: 14px; color: var(--muted) }
.login .first-login li { margin: 4px 0 }
/* En-têtes de tableau triables */
th .sorth { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; white-space: nowrap }
th .sorth span { opacity: .45; font-size: 10px }
th .sorth.on, th .sorth:hover { color: var(--ink) }
th .sorth.on span { opacity: 1; color: var(--accent, #f0674f) }
th .sorth:focus-visible { outline: 2px solid var(--accent, #f0674f); outline-offset: 2px; border-radius: 4px }
.pill.add { border-style: dashed; border-color: var(--accent); color: var(--accent-ink); font-weight: 700 }
.onboard ol.inst { margin: 0; padding-left: 22px } .onboard ol.inst li { margin: 8px 0; font-size: 15px }

/* Tout élément masqué reste masqué, même avec une classe qui impose un display (grid2, btn…). */
[hidden] { display: none !important }

/* Tablette en paysage (iPad…) : l'équipe terrain a 7 onglets, ils tiennent avec leur libellé. */
@media (min-width: 1080px) and (max-width: 1340px) {
  body:not(.boss) nav.tabs a span { display: inline }
  body:not(.boss) nav.tabs a { padding: 7px 9px; font-size: 13px; gap: 5px }
  body:not(.boss) .who span { max-width: 120px }
}

/* ---------- Partenaires : réseau d'affiliés ---------- */
.hbar { grid-template-columns: minmax(110px, 42%) 1fr minmax(34px, auto) }
.hbar > i { height: 14px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--w, 0%), var(--chip) var(--w, 0%)) }
.hbar.obj.now > span, .hbar.obj.now > b { font-weight: 800; color: var(--accent-ink) }
.hbar.obj > i { background: linear-gradient(to right, var(--ok) var(--w, 0%), var(--chip) var(--w, 0%)) }
.hbar .chip { justify-self: start }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0 0 16px }
.tiles.sm { grid-template-columns: repeat(2, 1fr) }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px }
.tile b { font-size: 26px; font-weight: 800; line-height: 1.1; color: var(--accent-ink) }
.tile span { color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.3 }
.tiles.sm .tile b { font-size: 20px }
.grow { flex: 1; min-width: 0 }
.small { font-size: 13px }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; vertical-align: 3px }
.block.quiet { background: transparent; box-shadow: none; border-style: dashed }
.big-n { font-size: 44px; font-weight: 800; color: var(--accent-ink); margin: 0; line-height: 1 }
.btn.ghost { background: transparent }
.acts.col { flex-direction: column; align-items: stretch }
.acts.col .btn { justify-content: center }

/* Étapes et notes */
.chip.stg { background: var(--chip); color: var(--ink) }
.chip.stg.on { background: var(--ok-soft); border-color: var(--ok); color: var(--ok) }
.chip.stg.x-refused { background: var(--danger-soft); border-color: var(--danger); color: var(--danger) }
.chip.stg.x-later { background: #efe8fb; border-color: #7c3aed; color: #6d28d9 }
.chip.gr { color: #fff; border-color: transparent; min-width: 22px; text-align: center }
.chip.gr-A { background: var(--ok) } .chip.gr-B { background: #c78a12 } .chip.gr-C { background: var(--muted) }
.steps9 { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; counter-reset: s }
.steps9 li { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 11px; line-height: 1.2; color: var(--muted); position: relative }
.steps9 li b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); border: 2px solid var(--line); color: var(--muted); font-size: 13px; z-index: 1 }
.steps9 li::before { content: ""; position: absolute; top: 13px; left: -50%; right: 50%; height: 2px; background: var(--line) }
.steps9 li:first-child::before { display: none }
.steps9 li.done b { background: var(--ok); border-color: var(--ok); color: #fff }
.steps9 li.done::before, .steps9 li.now::before { background: var(--ok) }
.steps9 li.now b { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft) }
.steps9 li.now span { color: var(--ink); font-weight: 700 }
.steps9 li.mks b { border-style: dashed }
.steps9 li.mks.done b, .steps9 li.mks.now b { border-style: solid }
@media (max-width: 600px) { .steps9 li span { display: none } .steps9 li.now span { display: block; position: absolute; top: 34px; white-space: nowrap } .steps9 { margin-bottom: 26px } }

/* Photos (emplacements) */
.ph { aspect-ratio: 4 / 3; border-radius: 10px; border: 1.5px dashed var(--line); background: var(--chip); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 600; text-align: center; padding: 6px }
.ph svg { width: 26px; height: 26px; opacity: .7 }
.ph.has { border-style: solid; border-color: transparent; background: linear-gradient(135deg, #c9d3e8, #9fb0d3); color: #1b2440 }
.ph.sm { width: 64px; flex: none; padding: 2px; font-size: 0 } .ph.sm svg { width: 20px; height: 20px }
.ph.lg { width: 150px; flex: none }
.phs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 6px 0 }
.phpick { cursor: pointer; display: block }
.phpick.has .ph { outline: 2px solid var(--ok); outline-offset: -2px }

/* Accueil */
.gauge { display: flex; gap: 18px; align-items: center; margin-bottom: 8px }
.gauge h2 { margin: 0 0 4px; font-size: 19px } .gauge p { margin: 0 }
.ring { --p: 0; width: 104px; height: 104px; flex: none; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(closest-side, var(--card) 76%, transparent 77%), conic-gradient(var(--accent) calc(var(--p) * 1%), var(--chip) 0) }
.ring b { font-size: 30px; font-weight: 800; line-height: 1 } .ring small { color: var(--muted); font-weight: 700 }
.mini-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px }
.mini-list li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px }
.due { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--chip); color: var(--muted); white-space: nowrap }
.due.now { background: var(--accent-soft); color: var(--accent-ink) }
.due.late { background: var(--warn-soft); color: var(--warn) }
.pstep { text-decoration: none; color: var(--ink) }

/* Fiche d'un point de vente */
.ohead { display: flex; gap: 16px; align-items: flex-start; margin: 6px 0 16px }
.ohead h1 { margin-bottom: 6px } .ohead p { margin: 0 0 6px }
@media (max-width: 600px) { .ohead .ph.lg { width: 92px } }
.res { display: inline-block; background: var(--ok-soft); color: var(--ok); border-radius: 10px; padding: 6px 12px; font-weight: 700 }
small.res, .res small { font-weight: 600 }
small.res { background: none; padding: 0; font-family: ui-monospace, Menlo, monospace }
.nx { font-size: 15px; background: var(--accent-soft); border-radius: 10px; padding: 10px 12px }
ul.plain { list-style: none; padding: 0; margin: 6px 0 }
ul.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; align-items: baseline }
ul.plain li:last-child { border-bottom: 0 }
ul.plain.rate b { color: var(--accent); letter-spacing: 2px; white-space: nowrap } ul.plain.rate b i { color: var(--line); font-style: normal }
.minimap { height: 190px; border-radius: 12px; overflow: hidden; background: var(--chip); margin: 8px 0 }
blockquote.msg { margin: 10px 0; padding: 12px 14px; background: #e7f7ec; color: #12442a; border-radius: 12px 12px 12px 2px; font-size: 14px; white-space: pre-wrap }
.sim { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 12px }
.sim div { background: var(--accent-soft); border-radius: 12px; padding: 12px; display: flex; flex-direction: column }
.sim b { font-size: 24px; color: var(--accent-ink) }
input[type=range] { width: 100%; accent-color: var(--accent) }

/* Formulaire terrain */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px }
.opt { border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; background: var(--card) }
.opt input { position: absolute; opacity: 0; pointer-events: none }
.opt small { color: var(--muted); line-height: 1.35 }
.opt.on, .opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent) }
.rate-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap }
.stars { display: flex; gap: 6px }
.stars label { cursor: pointer; display: block; position: relative }
.stars input { position: absolute; opacity: 0; pointer-events: none }
.stars i { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--card); font-style: normal; font-weight: 700 }
.stars label:has(input:checked) i { background: var(--accent); border-color: var(--accent); color: #fff }
.phone-row { display: grid; grid-template-columns: 1fr 110px; gap: 8px; margin-bottom: 10px; align-items: center }
.phone-row label.check { grid-column: 1 / -1; margin: 0 }
.field em, h3 em { color: var(--danger); font-style: normal }
.field.inline { display: flex; align-items: center; gap: 10px; margin-top: 10px } .field.inline > span { margin: 0 } .field.inline input { max-width: 110px }
.help { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.35 }
.file { display: block } .file b { display: block; border: 1.5px dashed var(--line); border-radius: 10px; padding: 10px 12px; font-weight: 600; color: var(--accent-ink); cursor: pointer; background: var(--bg) }
.file.has b { border-style: solid; border-color: var(--ok); color: var(--ok); background: var(--ok-soft) }
.gpsv { font-weight: 600 }

/* Questionnaire */
ol.qs { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px }
li.q { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px }
li.q > p { margin: 0 0 10px; font-weight: 600 }
.qnote { margin-top: 10px }

/* Kit */
table.kit input { min-height: 38px; padding: 6px 8px }
table.kit td:nth-child(2) input { width: 74px }
td.rng { display: flex; gap: 6px; align-items: center; white-space: nowrap } td.rng input { width: 86px }
table.kit tfoot td { font-weight: 700; border-bottom: 0 }
@media (max-width: 600px) {
  table.kit thead { display: none }
  table.kit tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--line) }
  table.kit td { border: 0; padding: 0 } table.kit td.rng { grid-column: 1 / -1 } table.kit td.rng input { flex: 1; width: auto }
  table.kit tfoot tr { grid-template-columns: 1fr } table.kit tfoot td[colspan] { display: none }
}

/* Carte */
.chipbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px }
.chipbar .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px }
.bigmap { position: relative; height: min(62vh, 560px); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--chip); margin-bottom: 10px }
.bigmap #map { position: absolute; inset: 0 }
.mapbtn { position: absolute; left: 10px; top: 10px; z-index: 2; box-shadow: var(--glass-shadow) }
.mk { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); cursor: pointer }
.mk.big { width: 22px; height: 22px }
.mk-ag { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; background: #1b2440; color: #fff; font-size: 11px; font-weight: 800; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4) }
.mk-ag.st { background: #0e7490 }
.legend b.mk-ag { width: 16px; height: 16px; font-size: 9px; margin-right: 5px; vertical-align: -3px; border-width: 1px }
.pickcard { margin-top: 10px } .pickcard .ph.sm { width: 84px }

/* Guide */
.guide-pv { display: block; width: 100%; border-radius: 10px; border: 1px solid var(--line) }
ul.tips { padding-left: 20px; margin: 0 0 16px } ul.tips li { margin: 6px 0 }
ol.legend9 { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px }
ol.legend9 > li { display: flex; gap: 12px; align-items: flex-start }
ol.legend9 > li > b { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 13px }
ol.legend9 > li.mks > b { background: var(--ink); color: var(--bg) }

/* Rapport */
.seg.weeks { display: inline-flex; border: 1px solid var(--line); margin-bottom: 14px }
.seg.weeks button { font-size: 13px; padding: 6px 12px }
tr.warn td { background: var(--warn-soft) }

/* Page publique d'inscription */
body.public header.top .tools .who, body.public header.top #theme + .round { display: none }
.apply { max-width: 720px; margin: 0 auto }
.apply .logo-c { height: 40px; width: auto; display: block; margin: 0 0 16px }
@media (max-width: 860px) {
  .bar { min-width: 0 } .tools { min-width: 0 } .brand { min-width: 0; flex: 0 1 auto } .brand span { overflow: hidden; text-overflow: ellipsis }
  .who span { max-width: 30vw } .who small { max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
}
.cards .card.row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center }
@media (max-width: 600px) {
  .cards .card.row { grid-template-columns: 56px minmax(0, 1fr); align-items: start }
  .cards .card.row .ph.sm { width: 56px } .cards .card.row > .due { grid-column: 2; justify-self: start; margin-top: -4px }
}
.apply .logo-c { display: none }

/* Objectifs fixés par la direction (même bloc dans Partenaires) */
.goals h2 { margin-bottom: 6px }
.okt { color: var(--ok); font-weight: 600 }
.objs { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px }
.obj { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card); display: grid; gap: 6px }
.obj.hot { border-left: 4px solid var(--warn) } .obj.wait { border-left: 4px solid var(--ok) }
.obj.achieved { border-left: 4px solid var(--ok); opacity: .85 } .obj.missed { border-left: 4px solid var(--danger); opacity: .85 }
.obj-head { display: flex; justify-content: space-between; align-items: center; gap: 10px } .obj-head h3 { margin: 0; font-size: 18px }
.obj p { margin: 0 } .obj details summary { cursor: pointer; color: var(--accent-ink); font-size: 14px; font-weight: 600 } .obj details p { margin-top: 6px; white-space: pre-wrap }
.obj .crit { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 2px } .obj .crit label.check { margin: 0; font-weight: 500 }
.obj .crit input:checked + span { text-decoration: line-through; color: var(--muted) }
.obj .acts { margin: 6px 0 0 }
.due { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--chip); color: var(--muted); white-space: nowrap }
.due.now { background: var(--accent-soft); color: var(--accent-ink) } .due.late { background: var(--warn-soft); color: var(--warn) }
.goal-team { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 10px }
.goal-team li { padding-bottom: 10px; border-bottom: 1px solid var(--line) } .goal-team li:last-child { border-bottom: 0; padding-bottom: 0 }
.goal-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px }
.crit-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px }
.field > .delay { display: flex; gap: 8px } .delay input { max-width: 80px }
.help { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px }
.obj-filter { margin-bottom: 14px }
.btn.ghost { background: transparent }

/* Objectifs : priorité, badge « Nouveau » et pop-up des nouveaux objectifs */
.obj-head h3 .chip { vertical-align: middle; margin-left: 4px; font-size: 11px }
.chip.pr-high { border-color: var(--danger); color: var(--danger); background: var(--danger-soft) }
.chip.pr-low { color: var(--muted) }
.chip.new { border-color: var(--accent); color: #fff; background: var(--accent) }
dialog.goal-pop .objs.pop { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 10px; max-height: 60vh; overflow: auto }
dialog.goal-pop .ticks { margin: 0; padding-left: 20px }

/* Menu web de la direction (plus d'onglets) : barre plus large, onglets plus serrés, et icônes seules quand la place manque
   (le libellé de l'onglet ouvert reste affiché ; les autres ont leur nom en info-bulle). */
body.boss .bar { max-width: 1680px }
@media (min-width: 861px) { body.boss nav.tabs a { padding: 7px 8px; gap: 5px; font-size: 13px } }
@media (min-width: 861px) and (max-width: 1439px) { body.boss nav.tabs a span { display: none } body.boss nav.tabs a { padding: 8px 10px } body.boss nav.tabs a.on span { display: inline } }

/* Icônes Particulier / Entreprise */
.opt svg.kind { width: 28px; height: 28px; color: var(--accent-ink); margin-bottom: 2px }
.pill svg.kind, .btn svg.kind { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px }
/* Barre du bas : chaque libellé sur une seule ligne, les plus longs prennent plus de place */
@media (max-width: 860px) {
  nav.bottom a, nav.bottom button { flex: 1 1 auto; min-width: 0; padding: 6px 4px }
  nav.bottom span { white-space: nowrap; letter-spacing: -.1px }
}

/* Vidéos du guide (format portrait) */
.vgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 12px }
.vcard .vstate { display: block; font-size: 13px }
.vcard { margin: 0 }
.vcard video { width: 100%; aspect-ratio: 9 / 16; max-height: 56vh; object-fit: contain; background: #000; border-radius: 12px; display: block }
.vcard figcaption { margin: 8px 0 4px }
.vcard .ok { color: var(--ok, #1f8a4c); font-weight: 600 }
.vcard .acts { flex-direction: column; align-items: stretch; gap: 6px; margin: 6px 0 0 }
.vcard .acts .btn { justify-content: center; text-align: center; padding: 7px 10px; font-size: 13px }
.vcard figcaption small { display: block }
