:root {
  --bg: #f3f4f8; --card: #fff; --ink: #1b2233; --muted: #667085; --line: #e2e5ec; --soft: #f6f7fa;
  --navy: #1f2a44; --accent: #c8102e; --accent-ink: #fff; --ok: #1f9d55; --warn: #e08a00; --bad: #d4202a;
  --primary: #1f4fd1; --c-pc: #2b5fd9; --c-ex: #e07b00; --c-ma: #7a3fd1; --c-mo: #0d8c8c;
  --shadow: 0 1px 2px rgba(20, 28, 50, .06), 0 4px 14px rgba(20, 28, 50, .06);
  --radius: 12px; --drawer-w: 340px; --top-h: 58px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #11141c; --card: #1a1f2b; --ink: #e8ebf3; --muted: #9aa3b5; --line: #2b3243; --soft: #212837; --navy: #0d1220;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .3); color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; max-width: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; }
h2 { font-size: 1.35rem; } h3 { font-size: 1.02rem; } h4 { font-size: .95rem; }
a { color: var(--c-pc); }
code { background: var(--soft); padding: 1px 5px; border-radius: 5px; font-size: .85em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; } .err { color: var(--bad); min-height: 1.2em; margin: .3em 0; }
.bad { color: var(--bad); } .badc { color: var(--bad); font-weight: 600; } .req { color: var(--bad); }
[hidden] { display: none !important; }
.loading { padding: 3rem; text-align: center; color: var(--muted); }
pre { white-space: pre-wrap; word-break: break-word; font: inherit; margin: .3em 0; }

/* ---- boutons & champs ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .55em .95em; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 38px; }
.btn:hover { background: var(--soft); } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; } .btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-o { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.ghost { background: transparent; } .btn.block { width: 100%; margin-top: .6rem; }
.btn.small { padding: .35em .7em; min-height: 32px; font-size: .88rem; } .btn.tiny { padding: .2em .55em; min-height: 28px; font-size: .8rem; }
.icon-btn { border: 0; background: transparent; color: var(--muted); font-size: 1.05rem; cursor: pointer; padding: .3em .5em; border-radius: 8px; } .icon-btn:hover { background: var(--soft); color: var(--ink); }
.link { background: none; border: 0; color: var(--c-pc); cursor: pointer; font: inherit; padding: 0 .3em; text-decoration: underline; }
.fld { margin: 0 0 .8rem; } .fld label, .lab { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.fld small { color: var(--muted); display: block; margin-top: 2px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: .5em .65em; min-height: 38px; }
textarea { resize: vertical; min-height: 60px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid color-mix(in srgb, var(--c-pc) 70%, transparent); outline-offset: 1px; }
input[readonly], textarea[readonly], select:disabled, input:disabled { background: var(--soft); color: var(--muted); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--accent); }
.check { display: flex; gap: .5em; align-items: flex-start; margin: .35em 0; cursor: pointer; } .check input { margin-top: .25em; }
.inl { display: inline-flex; align-items: center; gap: .4em; } .inl input { width: auto; }
.search { max-width: 420px; }
fieldset.grp { border: 1px solid var(--line); border-radius: 10px; margin: .6rem 0; padding: .4rem .8rem .6rem; } fieldset.grp legend { font-weight: 700; padding: 0 .4em; font-size: .9rem; }
.ogrp { margin: .3rem 0; } .ogrp .check { display: inline-flex; margin-right: 1rem; }
.coords { display: grid; grid-template-columns: 1fr 1fr auto; gap: .6rem; align-items: end; } .coords .btn { margin-bottom: .8rem; }

/* ---- éléments communs ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); } .pad { padding: 1rem; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .74rem; font-weight: 700; background: var(--soft); border: 1px solid var(--line); color: var(--ink); white-space: nowrap; }
.chip.cat-VRTPC, .avatar.cat-VRTPC { background: var(--c-pc); color: #fff; border-color: transparent; }
.chip.cat-VRTEX, .avatar.cat-VRTEX { background: var(--c-ex); color: #fff; border-color: transparent; }
.chip.cat-VRTMA, .avatar.cat-VRTMA { background: var(--c-ma); color: #fff; border-color: transparent; }
.chip.cat-VRTMO, .avatar.cat-VRTMO { background: var(--c-mo); color: #fff; border-color: transparent; }
.chip.adm { background: var(--navy); color: #fff; border-color: transparent; }
.chipbtn { border: 1px solid var(--line); background: var(--soft); border-radius: 99px; padding: 3px 10px; cursor: pointer; color: var(--ink); font: inherit; font-size: .85rem; margin: 2px; }
.status { padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; } .status.en_cours { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); } .status.clos { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.count { font-size: .76rem; font-weight: 700; background: var(--soft); border: 1px solid var(--line); border-radius: 99px; padding: 1px 9px; margin-left: .4rem; color: var(--muted); } .count.okc { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); border-color: transparent; }
.badge { background: var(--accent); color: #fff; border-radius: 99px; font-size: .7rem; padding: 1px 6px; margin-left: .3em; }
.who { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; background: var(--soft); border: 1px solid var(--line); padding: 2px 9px 2px 7px; border-radius: 99px; margin: 2px 4px 2px 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .82rem; }
.logo { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 800; letter-spacing: .5px; } .logo.big { width: 60px; height: 60px; font-size: 1.5rem; border-radius: 14px; }

/* ---- structure ---- */
.top { position: sticky; top: 0; z-index: 40; height: var(--top-h); display: flex; align-items: center; gap: 1rem; padding: 0 1rem; background: var(--navy); color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.brand { display: flex; gap: .7rem; align-items: center; color: #fff; text-decoration: none; } .brand-t { display: flex; flex-direction: column; line-height: 1.1; } .brand-t small { opacity: .7; font-size: .7rem; }
.nav { display: flex; gap: .25rem; margin-left: 1rem; } .nav a { color: #dfe4f1; text-decoration: none; padding: .5em .85em; border-radius: 9px; display: flex; gap: .4em; font-weight: 600; font-size: .92rem; } .nav a:hover { background: rgba(255, 255, 255, .1); } .nav a.on { background: rgba(255, 255, 255, .18); color: #fff; }
.top-r { margin-left: auto; display: flex; align-items: center; gap: .7rem; }
.top .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }
.user-btn { display: flex; align-items: center; gap: .6rem; background: none; border: 0; color: #fff; cursor: pointer; font: inherit; text-align: left; } .user-n { display: flex; flex-direction: column; line-height: 1.15; font-weight: 600; font-size: .88rem; } .user-n small { opacity: .7; font-weight: 400; }
.conn { width: 10px; height: 10px; border-radius: 50%; background: #8a93a6; } .conn.ok { background: #36d17c; } .conn.off { background: #ff5c5c; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.tabbar { display: none; }
#banner .bnr { padding: .55rem 1rem; font-weight: 600; text-align: center; } .bnr.info { background: #fff3cd; color: #5c4400; } .bnr.warn { background: #ffe1e1; color: #7a1010; }
main { min-height: calc(100vh - var(--top-h)); }
.page { max-width: 1080px; margin: 0 auto; padding: 1rem; } .page.narrow { max-width: 640px; } .page.wide { max-width: 1400px; }
.page > .card, .page > form.card { margin-bottom: 1rem; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: .4rem .8rem; margin: 0; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: linear-gradient(160deg, var(--navy), #3a1220); }
.login { width: 100%; max-width: 380px; padding: 1.6rem; } .login-logo { text-align: center; margin-bottom: .6rem; } .login h1 { text-align: center; font-size: 1.4rem; } .login .muted { text-align: center; }

/* ---- toasts & modales ---- */
#toasts { position: fixed; right: 12px; bottom: 12px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 24px)); }
.toast { background: #222a3d; color: #fff; padding: .65rem .85rem; border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, .3); display: flex; gap: .7rem; align-items: center; animation: tin .2s ease-out; font-size: .9rem; border-left: 4px solid var(--c-pc); }
.toast.err { border-left-color: var(--bad); } .toast.clickable { cursor: pointer; } .toast.out { opacity: 0; transform: translateX(20px); transition: .25s; } .toast-act { background: transparent; color: #8fb4ff; border: 0; font-weight: 700; cursor: pointer; }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }
.overlay { position: fixed; inset: 0; background: rgba(10, 14, 26, .55); z-index: 150; display: grid; place-items: center; padding: 1rem; overflow: auto; }
.modal { background: var(--card); border-radius: 14px; width: 100%; max-width: 480px; max-height: calc(100vh - 2rem); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); } .modal.wide { max-width: 760px; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--line); } .modal-h h3 { margin: 0; }
.modal-b { padding: 1rem; overflow: auto; } .modal-f { padding: .8rem 1rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.secret { display: flex; gap: .6rem; align-items: center; background: var(--soft); padding: .7rem; border-radius: 10px; } .secret code { font-size: 1.2rem; letter-spacing: 1px; background: none; flex: 1; user-select: all; }
.vers { list-style: none; margin: 0; padding: 0; } .vers li { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; margin-bottom: .6rem; } .v-h { font-size: .82rem; color: var(--muted); }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; } .cmp > div { background: var(--soft); border-radius: 10px; padding: .5rem .7rem; }
.ctx { position: fixed; z-index: 160; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 32px rgba(0, 0, 0, .3); padding: 4px; min-width: 250px; }
.ctx button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .55em .8em; border-radius: 7px; cursor: pointer; color: var(--ink); font: inherit; } .ctx button:hover { background: var(--soft); }

/* ---- rapport ---- */
.rhead { padding: 1rem; margin-bottom: 1rem; border-top: 4px solid var(--accent); }
.rhead-t { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; } .rhead h2 { margin: 0; }
.eyebrow { text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; color: var(--accent); font-weight: 800; }
.rhead-b { display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; align-items: center; margin-top: .7rem; } .rhead-a { display: flex; gap: .4rem; flex-wrap: wrap; }
.banner { background: color-mix(in srgb, var(--ok) 14%, transparent); border-radius: 8px; padding: .5rem .8rem; margin: .6rem 0 0; }
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .6rem; }
.slot { border: 1px dashed var(--line); border-radius: 10px; padding: .55rem .7rem; display: grid; gap: 2px; background: var(--soft); } .slot.taken { border-style: solid; background: var(--card); }
.slot-g { margin: .4rem 0 .5rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); } .slot-g + .slots { margin-bottom: .9rem; }
.slot-p { display: flex; justify-content: space-between; gap: .4rem; align-items: flex-start; padding: .25rem 0; border-top: 1px dashed var(--line); } .slot-p:first-of-type { border-top: 0; } .slot-p small { display: block; color: var(--muted); font-size: .75rem; } .slot-a, .slot-b { display: flex; flex-wrap: wrap; gap: .3rem; } .slot-b { margin-top: .35rem; }
.plist { display: grid; gap: .2rem; max-height: 50vh; overflow: auto; margin-top: .5rem; } .plist label { padding: .45rem .3rem; border-bottom: 1px solid var(--line); }
.slot-l { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; } .slot-v small { display: block; color: var(--muted); } .slot .btn { justify-self: start; margin-top: 4px; } .tel { text-decoration: none; }
.ovstrip { display: flex; gap: .6rem; overflow-x: auto; padding: .2rem 0 .8rem; scroll-snap-type: x proximity; margin: .6rem 0 .2rem; }
.ovcard { flex: 0 0 230px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; cursor: pointer; display: grid; gap: 4px; font: inherit; color: var(--ink); scroll-snap-align: start; box-shadow: var(--shadow); }
.ovcard.on { outline: 2px solid var(--primary); } .ov-g { font-size: .7rem; font-weight: 800; color: var(--accent); letter-spacing: .06em; } .ov-n { font-weight: 700; line-height: 1.2; min-height: 2.4em; }
.ov-row { display: grid; gap: 2px; } .ov-row em { font-style: normal; font-size: .74rem; color: var(--muted); }
.bar { display: block; height: 7px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); overflow: hidden; min-width: 40px; } .bar i { display: block; height: 100%; transition: width .4s; } .bar.closed i { background: var(--bad); } .bar.open i { background: var(--ok); }
.flag { font-size: .7rem; padding: 1px 7px; border-radius: 99px; background: var(--soft); margin-right: 4px; } .flag.bad { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); } .flag.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.ouv-h { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: .6rem 0; }
details.sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .8rem; box-shadow: var(--shadow); border-left: 4px solid var(--line); }
details.sec > summary { list-style: none; cursor: pointer; padding: .75rem 1rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; } details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; } details.sec[open] > summary::before { transform: rotate(90deg); } details.sec > summary h3 { margin: 0; flex: 1; min-width: 160px; }
.sec-b { padding: 0 1rem 1rem; }
.sec-VRTPC { border-left-color: var(--c-pc); } .sec-VRTEX { border-left-color: var(--c-ex); } .sec-VRTMA { border-left-color: var(--c-ma); } .sec-VRTMO { border-left-color: var(--c-mo); }
details.mini { margin-top: .6rem; font-size: .85rem; } .hl { margin: .3rem 0 0; padding-left: 1.1rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.eqgrp { margin-bottom: 1rem; } .eqgrp-h { display: flex; gap: .6rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line); margin-bottom: .4rem; } .eqgrp-h .muted { margin-left: auto; }
.eq { display: grid; grid-template-columns: minmax(200px, 1.5fr) 1fr 1fr minmax(180px, 1.2fr); gap: .6rem 1rem; align-items: start; padding: .6rem .5rem; border-radius: 10px; border-bottom: 1px solid var(--line); transition: background .3s; }
.eq.st-ferme { background: color-mix(in srgb, var(--bad) 6%, transparent); } .eq.st-ouvert { background: color-mix(in srgb, var(--ok) 8%, transparent); } .eq.has-pb { box-shadow: inset 3px 0 0 var(--warn); }
.eq-name { font-weight: 700; } .eq-sub { font-size: .8rem; color: var(--muted); }
.tk { display: grid; gap: 3px; } .tk-t { border: 0; background: var(--soft); border-radius: 6px; font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; padding: 1px 8px; cursor: pointer; justify-self: start; color: var(--ink); } .tk-w { font-size: .78rem; color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; user-select: none; } .switch.dis { cursor: not-allowed; opacity: .6; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { width: 50px; height: 28px; border-radius: 99px; background: #b9c0d0; position: relative; transition: .2s; flex: none; } .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.tk.close input:checked + .sw { background: var(--bad); } .tk.open input:checked + .sw { background: var(--ok); } input:checked + .sw::after { left: 25px; } .switch input:focus-visible + .sw { outline: 2px solid var(--c-pc); outline-offset: 2px; }
.tk-l { font-weight: 600; font-size: .9rem; }
.lines { display: grid; gap: .7rem; margin-bottom: .6rem; } .empty { margin: .2rem 0; }
.lcard { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem .5rem; background: var(--soft); } .lcard .x { position: absolute; top: 4px; right: 4px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 4px 8px; }
.lgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .5rem .8rem; padding-right: 1.4rem; } .lf.w2 { grid-column: span 2; } .lf > label { display: block; font-size: .74rem; font-weight: 700; color: var(--muted); margin-bottom: 2px; } .lmeta { font-size: .72rem; color: var(--muted); margin-top: .3rem; }
.cf { position: relative; border-radius: 8px; transition: box-shadow .3s; } .cf-w { display: block; font-size: .7rem; color: var(--muted); margin-top: 2px; }
.cf .hbtn { position: absolute; top: 2px; right: 2px; border: 0; background: var(--card); color: var(--muted); border-radius: 6px; font-size: .9rem; line-height: 1; padding: 3px 6px; cursor: pointer; opacity: 0; } .cf .hbtn { opacity: .45; } .cf:hover .hbtn, .cf:focus-within .hbtn { opacity: .95; } @media (hover: none) { .cf .hbtn { opacity: .55; } }
.cf textarea, .cf input[type=text] { padding-right: 1.6rem; } .cf.saved { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 50%, transparent); }
.timef { display: flex; gap: .3rem; align-items: center; } .timef input { min-width: 0; flex: 1; } .timef .btn { flex: none; }
.flash { animation: flash 2.2s ease-out; } @keyframes flash { 0%, 40% { background: color-mix(in srgb, var(--warn) 40%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 40%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---- panneau d'activité ---- */
.drawer { position: fixed; top: var(--top-h); right: 0; bottom: 0; width: var(--drawer-w); max-width: 100vw; background: var(--card); border-left: 1px solid var(--line); z-index: 45; transform: translateX(100%); transition: transform .25s; display: none; flex-direction: column; box-shadow: -6px 0 20px rgba(0, 0, 0, .08); }
body[data-page=nuit] .drawer, body[data-page=rapport] .drawer { display: flex; } .drawer { visibility: hidden; transition: transform .25s, visibility 0s .25s; } body.drawer-open .drawer { transform: none; visibility: visible; transition: transform .25s; }
.dr-h { display: flex; justify-content: space-between; align-items: center; padding: .7rem .9rem; border-bottom: 1px solid var(--line); } .dr-online { padding: .4rem .9rem; border-bottom: 1px solid var(--line); min-height: 34px; }
.dr-list { overflow-y: auto; flex: 1; padding: .3rem 0; }
.act { display: grid; grid-template-columns: 44px 1fr; gap: .5rem; width: 100%; text-align: left; padding: .55rem .9rem; border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; font: inherit; color: var(--ink); } .act:hover { background: var(--soft); }
.act time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .82rem; } .act-t { display: block; font-size: .86rem; margin-top: 2px; } .act.new { background: color-mix(in srgb, var(--accent) 7%, transparent); box-shadow: inset 3px 0 0 var(--accent); } .act.k-tick .act-t { font-weight: 600; }
@media (min-width: 1100px) { body.drawer-open[data-page=nuit] main, body.drawer-open[data-page=rapport] main, body.drawer-open[data-page=nuit] #banner, body.drawer-open[data-page=rapport] #banner { margin-right: var(--drawer-w); } }

/* ---- admin ---- */
.subtabs { display: flex; gap: .3rem; overflow-x: auto; margin: .3rem 0 1rem; border-bottom: 1px solid var(--line); } .subtabs a { padding: .55em .9em; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; } .subtabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.bar-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: .8rem; } .bar-actions select { width: auto; max-width: 260px; } .bar-actions .btn.primary { margin-left: auto; }
.tblwrap { overflow-x: auto; } .tbl { width: 100%; border-collapse: collapse; } .tbl th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: .6rem .8rem; border-bottom: 1px solid var(--line); background: var(--soft); }
.tbl td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; } .tbl td small { display: block; color: var(--muted); } .tbl tr.off { opacity: .55; } .tbl tr.badrow td { background: color-mix(in srgb, var(--bad) 7%, transparent); }
.acts { white-space: nowrap; text-align: right; } .acts .btn { margin: 2px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; margin-bottom: 1rem; } .tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .9rem; text-decoration: none; color: var(--ink); display: grid; box-shadow: var(--shadow); } .tile b { font-size: 1.8rem; color: var(--ink); } .tile span { color: var(--muted); font-size: .85rem; }
.listgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; } .listgrid textarea { min-height: 150px; margin-bottom: .6rem; }
.narrow-f { max-width: 640px; } .pager { text-align: center; padding: .8rem; }
.hlist { display: grid; gap: .7rem; } .hcard { display: block; padding: .9rem 1rem; text-decoration: none; color: var(--ink); } .hcard:hover { border-color: var(--accent); }
.hc-d { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; } .hc-o { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: .5rem; } .hc-p { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--muted); } .hc-p .bar { width: 90px; } .hc-s { margin-top: .5rem; font-style: italic; color: var(--muted); font-size: .88rem; }
.filters { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; } .filters .search { flex: 1; min-width: 220px; }

/* ---- carte ---- */
.maphead { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; } .mapctl { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; } .mapctl select { width: auto; max-width: 280px; }
.legend { font-size: .82rem; color: var(--muted); } .lg { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin: 0 4px 0 10px; } .lg.red { background: #d4202a; } .lg.green { background: #1f9d55; } .lg.orange { background: #e08a00; } .lg.grey { background: #8a93a6; }
.mapwrap { display: grid; grid-template-columns: 1fr 300px; gap: 1rem; margin-top: .8rem; } #map { height: calc(100vh - 190px); min-height: 420px; border-radius: 12px; border: 1px solid var(--line); z-index: 1; }
.mapside { padding: 1rem; max-height: calc(100vh - 190px); overflow: auto; } .sit { display: flex; gap: 1rem; margin-bottom: .6rem; } .sit div { display: grid; text-align: center; } .sit b { font-size: 1.6rem; } .sit span { font-size: .75rem; color: var(--muted); }
.mlist button { display: flex; gap: .5rem; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: .4rem .2rem; cursor: pointer; color: var(--ink); font: inherit; border-bottom: 1px solid var(--line); } .dotc { width: 11px; height: 11px; border-radius: 50%; flex: none; }

/* ---- horaires : blocs fermeture / ouverture (étapes + équipements) ---- */
.hgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.hblk { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.hblk-h { padding: .5rem .8rem; color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; font-size: .85rem; } .hblk-h span { font-weight: 600; opacity: .9; text-transform: none; margin-left: .3rem; }
.hblk.hf .hblk-h { background: #c00000; } .hblk.ho .hblk-h { background: #006600; }
.hblk.hf .hblk-b { background: color-mix(in srgb, #ff7c80 14%, var(--card)); } .hblk.ho .hblk-b { background: color-mix(in srgb, #46c284 14%, var(--card)); }
.hblk-b { padding: .3rem .5rem; } .hempty { padding: .6rem .3rem; }
.hrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, auto); gap: .3rem .8rem; align-items: center; padding: .55rem .4rem; border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent); transition: background .3s; }
.hrow:last-child { border-bottom: 0; } .hrow .eq-pb { grid-column: 1 / -1; } .hrow .eq-pb:empty { display: none; }
.h-name { font-weight: 700; line-height: 1.25; } .h-sub { font-size: .78rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-top: 2px; }
.hrow.et { background: color-mix(in srgb, var(--c-pc) 5%, transparent); border-radius: 8px; } .hrow.et .h-name::before { content: "◆ "; color: var(--c-pc); }
.hrow.et input:checked + .sw { background: var(--c-pc); } .hrow.et.on { background: color-mix(in srgb, var(--c-pc) 11%, transparent); }
.hrow.eq.st-ferme { background: color-mix(in srgb, var(--bad) 7%, transparent); } .hrow.eq.st-ouvert { background: color-mix(in srgb, var(--ok) 9%, transparent); } .hrow.eq.has-pb { box-shadow: inset 3px 0 0 var(--warn); }
.hrow .tk { justify-items: start; }
.imp { display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; background: color-mix(in srgb, var(--c-pc) 8%, transparent); border-radius: 10px; padding: .6rem .8rem; margin-bottom: .8rem; }
.impbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .6rem; } .impbar .search { flex: 1; min-width: 200px; }
.impl { display: grid; gap: .5rem; } .impr { border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; display: grid; gap: .35rem; } .impr.done { opacity: .6; } .impr.hors { border-style: dashed; }
.impm { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .8rem; color: var(--muted); padding-left: 1.6rem; } .impr select { max-width: 360px; margin-left: 1.6rem; width: calc(100% - 1.6rem); }
.nplan { margin: .3rem 0 .6rem; } .plan-ok { border-left: 4px solid var(--c-pc); } .plist2 { margin: .4rem 0; padding-left: 1.1rem; } .plist2 li { margin: .25rem 0; }
#nlist label.planned { background: color-mix(in srgb, var(--c-pc) 10%, transparent); border-radius: 8px; } #nlist label.planned span::after { content: " · planning VRT"; color: var(--c-pc); font-size: .75rem; font-weight: 700; }
.htabs { display: flex; flex-wrap: wrap; gap: .3rem; margin: .5rem 0; } .chipbtn.on { background: var(--navy); color: #fff; border-color: transparent; } #hq { margin-bottom: .6rem; }
.hdiff { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .3rem 0; } .hdiff > div { background: var(--soft); border-radius: 8px; padding: .3rem .5rem; min-width: 0; } .hdiff small { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: .66rem; } .hdiff pre { margin: 0; } .hacts { display: flex; flex-wrap: wrap; gap: .3rem; }
@media (max-width: 759px) { .hdiff { grid-template-columns: 1fr; } }
.tk-m { border: 1px dashed var(--line); background: transparent; color: var(--muted); border-radius: 6px; font: inherit; font-size: .76rem; padding: 1px 7px; cursor: pointer; justify-self: start; } .tk-m:hover { color: var(--ink); border-color: var(--muted); } .tk-t i { font-style: normal; font-weight: 400; opacity: .55; font-size: .8em; }
.tnr-link { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1rem; }
/* ---- éditeur d'étapes (admin) ---- */
.etedit #etl { display: grid; gap: .4rem; margin: .5rem 0; } .etr { display: grid; grid-template-columns: 120px 190px 1fr 100px auto; gap: .4rem; align-items: center; } .et-a { display: flex; gap: .5rem; flex-wrap: wrap; } .et-mv { display: flex; }
/* ---- tests de non-régression (saisie) ---- */
.tnrcard { border-style: dashed; } .tnrcard .ov-g { color: var(--c-pc); }
.tnr-st { font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); white-space: nowrap; margin-left: auto; } .tnr-st.ok { color: var(--ok); } .tnr-st.bad { color: var(--bad); }
.tnr-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 1rem; }
.tnr-band { background: #8f8f8f; color: #fff; font-weight: 800; padding: .35rem .7rem; border-radius: 8px 8px 0 0; }
.tnr-scroll { overflow-x: auto; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; }
.tnr-t { border-collapse: collapse; width: 100%; min-width: 560px; } .tnr-t th, .tnr-t td { border: 1px solid var(--line); padding: 2px; text-align: center; font-size: .72rem; }
.tnr-t thead th { background: var(--soft); color: var(--muted); font-weight: 700; line-height: 1.15; padding: 4px 2px; }
.tnr-t tbody th { background: var(--soft); text-align: left; padding: 2px 6px; white-space: nowrap; font-weight: 600; } .tnr-t tbody th img { vertical-align: middle; margin-right: 5px; image-rendering: pixelated; }
.tnr-t tbody th span { display: inline-block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.tnr-t td { position: relative; min-width: 40px; } .tnr-t input.tn { width: 100%; min-width: 34px; text-align: center; padding: .3em .1em; min-height: 32px; border-color: transparent; background: transparent; font-variant-numeric: tabular-nums; font-weight: 600; }
.tnr-t input.tn:focus { border-color: var(--c-pc); background: var(--card); }
.tnr-t td small { position: absolute; right: 2px; top: 0; font-size: .62rem; font-weight: 800; }
.tnr-t td.up { background: color-mix(in srgb, var(--bad) 13%, transparent); color: var(--bad); } .tnr-t td.down { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.tnr-f { display: grid; grid-template-columns: auto minmax(180px, 1fr) 2fr; gap: .8rem; align-items: end; margin-top: .8rem; }
@media (max-width: 759px) { .tnr-f { grid-template-columns: 1fr; } }

/* ===== revue UX : fiabilité, terrain, poste de contrôle ===== */
.page.report { max-width: 1180px; } @media (min-width: 1500px) { .page.report { max-width: 1440px; } }
#netbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: .55rem 1rem; font-weight: 700; font-size: .9rem; text-align: center; box-shadow: 0 -4px 14px rgba(0, 0, 0, .2); }
#netbar.off { background: #b3261e; color: #fff; } #netbar.sync { background: #e08a00; color: #1b1300; }
@media (max-width: 759px) { #netbar { bottom: calc(60px + env(safe-area-inset-bottom)); } }
.nightbar { position: sticky; top: calc(var(--top-h) + 4px); z-index: 30; display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: center; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 12px; padding: .45rem .8rem; margin-bottom: .8rem; box-shadow: var(--shadow); font-size: .88rem; }
.nb-clock { font-weight: 800; font-variant-numeric: tabular-nums; } .nb-fin { color: var(--muted); } .nb-c { display: inline-flex; align-items: center; gap: .3rem; font-variant-numeric: tabular-nums; }
.nb-al { margin-left: auto; border: 0; border-radius: 99px; padding: .3rem .8rem; font: inherit; font-weight: 800; cursor: pointer; } .nb-al.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); } .nb-al.warn { background: #f5b301; color: #241a00; } .nb-al.crit { background: var(--bad); color: #fff; animation: pulse-doux 2.4s infinite; } @keyframes pulse-doux { 50% { opacity: .78; } }
.al-dot { font-size: .7rem; border-radius: 99px; padding: 0 6px; margin-left: 4px; font-weight: 800; } .al-dot.crit { background: var(--bad); color: #fff; } .al-dot.warn { background: #f5b301; color: #241a00; }
.ov-ph { font-size: .74rem; color: var(--muted); font-weight: 600; } .dashcard .ov-g { color: var(--primary); }
.alist { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; } .alist li { border-radius: 8px; padding: .45rem .6rem; border-left: 4px solid var(--line); background: var(--soft); }
.alist li.al-crit { border-left-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--card)); } .alist li.al-warn { border-left-color: #f5b301; } .alist li.al-info { border-left-color: var(--c-pc); }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; } .alist .linkbtn { width: 100%; } .h-sub .linkbtn { color: var(--muted); font-size: .76rem; text-decoration: underline dotted; }
.team-sum { font-size: .82rem; color: var(--muted); width: 100%; padding-left: 1.2rem; } details.sec[open] > summary .team-sum { display: none; }
.ouv-h { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; } .ouv-a { display: flex; gap: .4rem; flex-wrap: wrap; } .btn.on { background: var(--navy); color: #fff; border-color: transparent; }
.addq { margin-left: .2rem; } details.sec.empty > summary h3 { color: var(--muted); font-weight: 600; } details.sec.empty { box-shadow: none; }
.phase-sw { display: none; } .eqsearch { margin-bottom: .6rem; }
.tk.pending .sw { background: #e08a00 !important; } .tk-q { font-size: .8rem; font-weight: 700; color: #b26b00; } .why { color: var(--muted); font-size: .78rem; }
.cf.unsent { box-shadow: 0 0 0 2px #e08a00; } .cf.unsent::after { content: "⏳ non envoyé"; position: absolute; right: 6px; bottom: -1.1rem; font-size: .68rem; color: #b26b00; font-weight: 700; }
.cf:not(:has(textarea)) { display: flex; align-items: center; gap: 4px; } .cf:not(:has(textarea)) > :first-child { flex: 1; min-width: 0; } .cf:not(:has(textarea)) .hbtn { position: static; flex: none; } .cf:not(:has(textarea)) input[type=text] { padding-right: .65em; }
.callb { flex: none; text-decoration: none; }
body.mine .ouv .other { display: none !important; } body:not(.mine) .mine-note { display: none; }
.dr-f { display: flex; flex-wrap: wrap; gap: .25rem; padding: .3rem .8rem; border-bottom: 1px solid var(--line); } .dr-f .chipbtn { font-size: .76rem; padding: 2px 9px; }
.tabbar a.callpc { color: var(--ok); } .tabbar a.callpc[hidden] { display: none; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; font: 600 .82rem ui-monospace, monospace; background: var(--soft); } .kbd { list-style: none; padding: 0; display: grid; gap: .4rem; }
/* synthèse */
.dal { margin-bottom: .8rem; } .ok-line { color: var(--ok); font-weight: 700; margin: 0; }
.dtab { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: .8rem; overflow: hidden; }
.dhead, .drow { display: grid; grid-template-columns: 1.4fr 1.3fr 1fr 1.3fr 1.4fr; gap: .8rem; padding: .55rem .9rem; align-items: center; }
.dhead { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--soft); border-bottom: 1px solid var(--line); }
.drow { border-bottom: 1px solid var(--line); cursor: pointer; border-left: 4px solid transparent; } .drow:hover { background: var(--soft); } .drow.crit { border-left-color: var(--bad); } .drow.warn { border-left-color: #f5b301; }
.drow > div { display: grid; gap: 2px; min-width: 0; justify-items: start; } .d-ph { font-size: .78rem; color: var(--primary); font-weight: 700; } .d-e span, .d-x span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; } .drow small { color: var(--muted); }
.pst-l { display: flex; flex-wrap: wrap; gap: 3px; } .pst { width: 13px; height: 13px; border-radius: 3px; display: inline-block; background: #b9c0d0; } .pst.st-ferme { background: var(--bad); } .pst.st-ouvert { background: var(--ok); }
.dref { font-size: .82rem; } .dref small { display: inline-block; min-width: 1.6rem; font-weight: 800; color: var(--muted); }
.who-s::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #b9c0d0; margin-right: 4px; vertical-align: middle; } .who-s.on::before { background: var(--ok); }
.dlist { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; font-size: .9rem; }
@media (max-width: 899px) { .dhead { display: none; } .drow { grid-template-columns: 1fr 1fr; } .d-o, .d-x { grid-column: 1 / -1; } }
/* tests de non-régression avant / après côte à côte dès que possible */
.tnr-sides { grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); } .tnr-t { min-width: 430px; } .tnr-t input.tn { min-width: 28px; }
/* mode sombre : bandeaux moins éblouissants la nuit */
@media (prefers-color-scheme: dark) {
  :root { --primary: #3b6cf0; }
  .hblk.hf .hblk-h { background: color-mix(in srgb, #c00000 35%, var(--card)); border-bottom: 3px solid #e04848; }
  .hblk.ho .hblk-h { background: color-mix(in srgb, #006600 40%, var(--card)); border-bottom: 3px solid #2fa34f; }
  .hblk.hf .hblk-b, .hblk.ho .hblk-b { background: var(--card); }
}
/* terrain : cibles tactiles larges (gants), une phase à la fois */
@media (max-width: 759px) {
  .phase-sw { display: flex; gap: .3rem; margin-bottom: .6rem; background: var(--soft); padding: .25rem; border-radius: 12px; }
  .phase-sw button { flex: 1; border: 0; border-radius: 9px; padding: .7rem .4rem; font: inherit; font-weight: 800; background: transparent; color: var(--muted); }
  .phase-sw button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
  .hgrid.ph-F .hblk.ho, .hgrid.ph-O .hblk.hf { display: none; }
  .switch { min-height: 48px; } .sw { width: 62px; height: 36px; } .sw::after { width: 30px; height: 30px; } input:checked + .sw::after { left: 29px; }
  .tk-t, .tk-m { min-height: 40px; padding: .35rem .8rem; font-size: .95rem; } .tk-l { font-size: 1rem; }
  .hrow { padding: .75rem .45rem; } .h-name { font-size: 1.05rem; }
  .nightbar { top: calc(var(--top-h) + 2px); font-size: .8rem; gap: .2rem .6rem; padding: .35rem .6rem; } .nb-fin { display: none; }
  .ouv-h h2 { font-size: 1.15rem; }
}

/* ===== revue UX n°2 ===== */
:root { --accent-txt: #b00f2a; }
@media (prefers-color-scheme: dark) { :root { --accent-txt: #ff6b7d; } }
.rhead { border-top-color: var(--navy); } .eyebrow { color: var(--primary); } .ov-g { color: var(--muted); } .tabbar a.on { color: var(--primary); }
@media (prefers-color-scheme: dark) { .eyebrow, .tabbar a.on { color: #8fb0ff; } .rhead { border-top-color: #3b6cf0; } }
.chip.cat-VRTEX { color: #1b1300; }
.toast.warn { border-left-color: #e08a00; } .toast-act { min-height: 44px; padding: 0 1rem; border-radius: 8px; }
.tk { gap: 10px; } .tk-undo { min-height: 44px; border: 2px solid var(--primary); background: var(--card); color: var(--primary); border-radius: 10px; font: inherit; font-weight: 800; padding: 0 1rem; cursor: pointer; justify-self: start; }
.tk-q { color: #8a5300; } .cf.unsent::after { color: #8a5300; font-size: .72rem; }
@media (prefers-color-scheme: dark) { .tk-q, .cf.unsent::after { color: #ffb547; } .sw { background: #4a5368; box-shadow: inset 0 0 0 2px #9aa3b5; } }
.h-sub .linkbtn { text-decoration: none; border: 1px solid var(--line); border-radius: 8px; padding: .15rem .55rem; }
@media (max-width: 759px) { .h-sub .linkbtn { min-height: 36px; padding: .3rem .7rem; } .ouv .slots { grid-template-columns: 1fr; } }
.tnr-band { background: #5f6368; }
/* barre de nuit : puces par ouvrage, fraîcheur des données, panneau d'alertes */
.nightbar { position: sticky; } .nb-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.nb-o { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: .15rem .45rem; font: inherit; font-size: .8rem; cursor: pointer; color: var(--ink); } .nb-o.on { outline: 2px solid var(--primary); } .nb-o.crit { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--card)); } .nb-o.warn { border-color: #f5b301; }
.nb-o .pst { width: 9px; height: 9px; }
.nb-fresh { font-size: .78rem; color: var(--ok); } .nb-fresh.stale { color: #b26b00; } .nb-fresh.old { color: var(--bad); font-weight: 800; }
.nb-al.warn { animation: none; } .nb-al.crit { animation: pulse-doux 2.4s infinite; }
.al-panel { position: absolute; right: .5rem; top: calc(100% + 6px); width: min(620px, calc(100vw - 1.5rem)); max-height: 70vh; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .28); padding: .7rem; z-index: 40; }
.al-ph { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.alist li { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: start; } .al-t small { display: block; color: var(--muted); } .al-a { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.alist li.acked { opacity: .55; } .ackw { color: var(--ok) !important; }
/* pastilles : forme + couleur (pas la couleur seule) */
.pst.st-attente { background: transparent; box-shadow: inset 0 0 0 2px #5b6475; } .pst.st-ouvert { position: relative; } .pst.st-ouvert::after { content: "✓"; position: absolute; inset: 0; color: #fff; font-size: 9px; line-height: 13px; text-align: center; font-weight: 900; }
.nb-o .pst.st-ouvert::after { font-size: 7px; line-height: 9px; }
.dlegend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .8rem; color: var(--muted); margin: -.3rem 0 .6rem; } .dlegend span { display: inline-flex; align-items: center; gap: .3rem; }
/* synthèse : colonnes tronquées proprement */
.d-e span, .d-x span { display: block; max-width: 100%; } .d-e, .d-x { justify-items: stretch !important; } .d-ph { color: var(--ink); font-weight: 700; }
.ovstrip.compact .ovcard { flex-basis: 170px; } .ovstrip.compact .ov-row, .ovstrip.compact .ov-flags { display: none; } .ovstrip.compact .ov-n { min-height: 0; }
/* menu « ⋯ Plus » */
details.more { position: relative; display: inline-block; } details.more > summary { list-style: none; } details.more > summary::-webkit-details-marker { display: none; }
.more-m { position: absolute; right: 0; top: calc(100% + 4px); z-index: 35; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); padding: .4rem; display: grid; gap: .3rem; min-width: 250px; } .more-m .btn { justify-content: flex-start; }
/* activité compacte */
.act-b { display: block; line-height: 1.3; } .act-ic { display: inline-block; width: 1.2em; } .act-t { display: inline; font-size: .86rem; margin: 0; }
.act { padding: .45rem .8rem; } .act time { flex: none; } .act.undo { box-shadow: inset 3px 0 0 #e08a00; }
.cat-t { font-size: .68rem; border-radius: 4px; padding: 0 4px; margin-right: 2px; color: #fff; } .cat-t.cat-VRTPC { background: var(--c-pc); } .cat-t.cat-VRTEX { background: var(--c-ex); color: #1b1300; } .cat-t.cat-VRTMA { background: var(--c-ma); } .cat-t.cat-VRTMO { background: var(--c-mo); }
/* bascule de phase (mobile) : onglet actif bien contrasté et collant */
@media (max-width: 759px) {
  .phase-sw { position: sticky; top: calc(var(--top-h) + 52px); z-index: 25; }
  .phase-sw button.on[data-p="F"] { background: #c00000; color: #fff; } .phase-sw button.on[data-p="O"] { background: #006600; color: #fff; }
  .nightbar { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; } .nb-chips { display: none; } .nb-fin { display: inline; } .nb-fresh { display: none; } .nightbar .nb-al { flex: none; }
  .al-panel { position: fixed; left: .5rem; right: .5rem; top: calc(var(--top-h) + 56px); width: auto; }
}
.tabbar a.callpc.nophone { color: var(--muted); }

/* ---- versions du site (Admin → Versions) ---- */
.vtop h2 { margin: .2rem 0; } .vtimeline { display: grid; gap: .8rem; margin-top: .8rem; position: relative; }
.vcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); border-left: 4px solid var(--line); } .vcard.cur { border-left-color: var(--primary); }
.vh { display: flex; gap: .8rem; align-items: center; margin-bottom: .4rem; } .vh h3 { margin: 0; } .vbadge { flex: none; background: var(--navy); color: #fff; font-weight: 800; border-radius: 8px; padding: .3rem .55rem; font-variant-numeric: tabular-nums; } .vcard.cur .vbadge { background: var(--primary); }
.vlive { color: var(--ok); } .vcard h4 { margin: .6rem 0 .2rem; font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; } .vlist { margin: .2rem 0; padding-left: 1.2rem; } .vlist li { margin: .2rem 0; }
.vchip { font-size: .75rem; vertical-align: middle; text-decoration: none; } .vtech { margin-top: .5rem; } .vtech summary { cursor: pointer; color: var(--muted); font-weight: 600; }

/* ---- impression / PDF : reproduction des feuilles Excel (A4 portrait) ---- */
.printpage { max-width: 860px; margin: 0 auto; padding: 1rem; } .ptool { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.xprev { width: 800px; margin: 0 auto; }
.xpaper { width: 210mm; min-height: 297mm; padding: 9mm 10mm; margin: 0 auto 14px; background: #fff; color: #000; box-shadow: 0 2px 12px rgba(0, 0, 0, .18); font-family: Calibri, Carlito, "Segoe UI", Arial, sans-serif; font-size: 10.5px; line-height: 1.25; position: relative; overflow: hidden; }
.xpaper * { box-sizing: border-box; } .xpaper img { display: block; } .xpaper small { font-size: 7.5px; color: #555; }
.xpaper .bad { color: #c00000; } .xpaper .ok { color: #006100; }
.x-head { display: grid; grid-template-columns: 30mm 1fr 30mm; align-items: center; border: 1px solid #000; padding: 1.5mm 2mm; }
.x-head img { height: 9mm; width: auto; max-width: 100%; } .x-head img:last-child { justify-self: end; }
.x-title { text-align: center; font-weight: 700; font-size: 15px; letter-spacing: .2px; }
.x-date { display: flex; justify-content: center; align-items: baseline; gap: 6mm; margin: 2.5mm 0 3mm; font-size: 12px; } .x-date i { color: #333; } .x-date b { font-size: 13px; }
.x-people { width: 100%; border-collapse: separate; border-spacing: 0 1.6mm; margin-bottom: 1mm; table-layout: fixed; }
.x-people td { padding: 0 1.5mm; vertical-align: middle; font-size: 10.5px; } .x-people td.v { border: 1px solid #000; height: 5.6mm; font-weight: 600; } .x-people td.v.nob { border: 0; }
.x-people td.p { text-align: center; font-size: 9px; border: 1px solid #000; border-left: 0; } .x-people td.p:empty { border: 0; } .x-people td.r { text-align: right; }
.x-hor { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5mm; margin-top: 2mm; }
.x-hb { border: 1px solid #000; } .x-hh { color: #fff; font-weight: 700; text-align: center; padding: 1.2mm; font-size: 11px; }
.x-hb.f .x-hh { background: #c00000; } .x-hb.f .x-hbody { background: #ff7c80; } .x-hb.o .x-hh { background: #006600; } .x-hb.o .x-hbody { background: #46c284; }
.x-hbody { padding: 1.5mm 2mm 3mm; min-height: 30mm; }
.x-hl { display: grid; grid-template-columns: 1fr 19mm; gap: 2mm; align-items: center; margin: 1.3mm 0; } .x-lab { line-height: 1.15; } .x-lab small { display: block; color: #222; font-size: 7.5px; }
.x-hl.et .x-lab { font-weight: 600; } .x-time { background: #fff; border: 1px solid #000; height: 5.2mm; text-align: center; font-weight: 700; font-size: 11px; line-height: 5mm; font-variant-numeric: tabular-nums; }
.x-comm { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5mm; margin-top: 1.5mm; } .x-comm > div { border: 1px solid #000; min-height: 19mm; padding: 1mm 1.5mm; }
.x-comm .x-cb { border: 0; padding: 1mm 0; min-height: 0; }
.x-ct { font-weight: 700; font-style: italic; text-decoration: underline; margin-top: 2mm; } .x-ct.f { color: #c00000; margin: 0; } .x-ct.o { color: #006600; margin: 0; }
.x-ct.VRTEX { color: #c55a11; } .x-ct.VRTMA { color: #7030a0; } .x-ct.VRTMO { color: #00747a; }
.x-cb { border: 1px solid #000; padding: 1.2mm 1.5mm; min-height: 9mm; margin-top: .8mm; white-space: normal; overflow-wrap: anywhere; }
.x-t { width: 100%; border-collapse: collapse; table-layout: fixed; margin-top: 3mm; page-break-inside: auto; }
.x-t th, .x-t td { border: 1px solid #000; padding: .8mm 1.1mm; vertical-align: top; overflow-wrap: anywhere; word-break: normal; hyphens: auto; font-size: 9.5px; }
.x-t th.x-band { color: #fff; text-align: center; font-size: 11px; padding: 1.1mm; }
.x-t tr.x-th th { font-weight: 400; text-align: center; vertical-align: middle; font-size: 9px; line-height: 1.15; }
.x-t tr.x-empty td { height: 6.5mm; } .x-t td.c { text-align: center; } .x-t td.bad { color: #c00000; font-weight: 700; }
.x-blue .x-band { background: #4472c4; } .x-blue .x-th th { background: #b4c6e7; }
.x-gold .x-band { background: #7f6000; } .x-gold .x-th th { background: #fff2cc; }
.x-orange .x-band { background: #c55a11; } .x-orange .x-th th { background: #ffffcc; }
.x-navy .x-band { background: #1f4e79; } .x-navy .x-th th { background: #ddebf7; }
.x-red .x-band { background: #c00000; } .x-red .x-th th { background: #ffd7d7; }
.x-VRTEX .x-band { background: #c55a11; } .x-VRTEX .x-th th { background: #fbe5d6; }
.x-VRTMA .x-band { background: #7030a0; } .x-VRTMA .x-th th { background: #e4d7f1; }
.x-VRTMO .x-band { background: #00747a; } .x-VRTMO .x-th th { background: #d4efef; }
/* page de garde */
.x-cover { padding-top: 10mm; } .cv-red { background: #ff0000; color: #fff; text-align: center; padding: 8mm 6mm 3mm; font-family: Arial, sans-serif; }
.cv-l1 { font-size: 22px; font-weight: 700; } .cv-l2 { font-size: 22px; font-weight: 700; margin-top: 3mm; display: flex; justify-content: center; gap: 7mm; } .cv-l2 b { font-weight: 700; }
.cv-val { text-align: right; font-size: 10px; font-weight: 700; font-style: italic; color: #000; margin-top: 8mm; }
.cv-photo { width: 100%; height: auto; } .cv-body { margin-top: 6mm; } .cv-when { text-align: right; font-style: italic; color: #333; }
.cv-logo { position: absolute; right: 18mm; bottom: 14mm; width: 62mm; height: auto; }
/* tests de non-régression */
.x-tb { margin-top: 4mm; break-inside: avoid; } .x-tname { display: inline-block; font-family: Arial, sans-serif; font-weight: 700; font-size: 15px; padding: 0 6mm 0 4mm; border-right: 1px solid #000; border-bottom: 1px solid #000; margin-bottom: 1mm; }
.x-tsides { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }
.x-tn { width: 100%; border-collapse: collapse; table-layout: fixed; }
.x-tn th.x-gb { background: #b8b8b8; color: #fff; font-family: Arial, sans-serif; font-size: 12px; font-weight: 700; text-align: left; padding: .8mm 2mm; border: 1px solid #000; } .x-tn th.x-gb span { margin-left: 5mm; }
.x-tn td { border: 1px solid #9a9a9a; text-align: center; padding: .4mm .3mm; font-size: 9.5px; height: 6.4mm; vertical-align: middle; font-variant-numeric: tabular-nums; }
.x-tn td.ic { background: #b8b8b8; border-color: #000; } .x-tn td.ic img { width: 5.2mm; height: 5.2mm; margin: 0 auto; image-rendering: pixelated; }
.x-tn td small { display: block; font-size: 7px; } .x-tn td.up { color: #c00000; font-weight: 700; background: #ffe5e5; } .x-tn td.down { color: #006100; font-weight: 700; background: #e3f5e8; }
.x-tn tfoot td { border: 0; font-size: 7px; line-height: 1.1; height: auto; padding-top: .8mm; vertical-align: top; }
.x-tconcl { margin-top: 1.5mm; font-size: 10px; }
.x-legend { display: flex; flex-wrap: wrap; gap: 1.5mm 4mm; margin-top: 5mm; padding-top: 2mm; border-top: 1px solid #999; font-size: 8.5px; } .x-legend span { display: inline-flex; align-items: center; gap: 1.2mm; } .x-legend img { width: 4.5mm; height: 4.5mm; }

@media print {
  @page { size: A4 portrait; margin: 0; }
  html, body { background: #fff !important; }
  .top, .tabbar, .drawer, #toasts, #banner, .noprint, .ctx, #netbar, .nightbar { display: none !important; }
  main { margin: 0 !important; padding: 0 !important; min-height: 0; } .printpage { max-width: none; padding: 0; } .xprev { width: auto; zoom: 1 !important; }
  .xpaper { box-shadow: none; margin: 0; min-height: 296mm; page-break-after: always; break-after: page; } .xpaper:last-child { page-break-after: auto; break-after: auto; }
  .x-t tr, .x-hb, .x-comm, .x-people, .x-head, .x-tb { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- mobile ---- */
@media (hover: none) and (pointer: coarse), (max-width: 759px) { input, select, textarea { font-size: 16px; } .tnr-t input.tn { font-size: 16px; } }
@media (max-width: 899px) { .user-n { display: none; } .brand-t small { display: none; } }
@media (max-width: 759px) {
  :root { --top-h: 52px; } .nav { display: none; } .top { padding: 0 .7rem; } .top .btn.ghost { padding: .3em .6em; }
  main { padding-bottom: 72px; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); } .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; padding: .45rem 0 .35rem; font-size: .68rem; text-decoration: none; color: var(--muted); font-weight: 600; } .tabbar a .ic { font-size: 1.2rem; } .tabbar a.on { color: var(--accent); }
  .page { padding: .7rem; } .rhead-t { flex-direction: column; } .rhead h2 { font-size: 1.1rem; }
  .slots { grid-template-columns: 1fr 1fr; gap: .45rem; } .slot { padding: .45rem .55rem; } .slot-l { font-size: .66rem; letter-spacing: .02em; } .slot .btn { min-height: 32px; padding: .3em .7em; font-size: .85rem; }
  .rhead { padding: .8rem; } .rhead-a { display: flex; flex-wrap: wrap; gap: .4rem; } .rhead-a .btn { flex: 1 1 auto; } .sec-b { padding-left: .6rem; padding-right: .6rem; }
  .eq { grid-template-columns: 1fr 1fr; } .eq-id { grid-column: 1 / -1; } .eq-pb { grid-column: 1 / -1; }
  .two, .cmp, .hgrid { grid-template-columns: 1fr; } .lf.w2 { grid-column: auto; }
  .hrow { grid-template-columns: 1fr auto; } .hrow .eq-pb { grid-column: 1 / -1; } .etr { grid-template-columns: 1fr 1fr; } .etr .et-lib { grid-column: 1 / -1; }
  .coords { grid-template-columns: 1fr 1fr; } .coords .btn { grid-column: 1 / -1; margin-top: -.4rem; }
  .mapwrap { grid-template-columns: 1fr; } #map { height: 58vh; } .mapside { max-height: none; }
  .drawer { top: 0; width: 100vw; z-index: 70; } .ovcard { flex-basis: 190px; }
  .modal { max-height: calc(100vh - 1rem); } .overlay { padding: .5rem; align-items: end; } #toasts { bottom: 76px; }
  .tbl thead { display: none; } .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; } .tbl tr { border-bottom: 6px solid var(--bg); padding: .4rem 0; } .tbl td { border: 0; padding: .25rem .9rem; display: flex; justify-content: space-between; gap: 1rem; text-align: right; } .tbl td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: .75rem; text-align: left; flex: none; } .acts { text-align: left; flex-wrap: wrap; justify-content: flex-start !important; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
