/* DELTA CONNECT — Système conçu et développé par Bahi Haithem
   Direction : poste de contrôle de réseau — fond nuit, lignes de signal, accent cyan « fibre »,
   alerte ambre « balisage chantier ». */
:root {
  /* Thème clair (superviseurs & techniciens) : blanc, rouge, gris */
  --bg: #F3F4F6; --bg2: #EBEDF0; --panel: #FFFFFF; --panel2: #F7F8FA; --line: #E1E4E9; --line2: #CDD2DA;
  --fg: #1C2026; --fg2: #474E59; --mute: #7A818C;
  --acc: #D7192F; --acc-ink: #FFFFFF; --acc2: #2B2F36; --acc2-ink: #FFFFFF;
  --ok: #138A52; --warn: #B86E00; --bad: #C8102E; --info: #1F63D6; --violet: #6D3FD8;
  --glow: 0 6px 18px -8px rgba(215,25,47,.45);
  --shadow: 0 14px 40px -20px rgba(28,32,38,.35);
  --r: 14px; --r-s: 10px;
  --f-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --grid: transparent;
  color-scheme: light;
}
/* Thème anthracite (poste du patron) : anthracite, rouge, blanc */
:root[data-theme="dark"] {
  --bg: #111317; --bg2: #16191E; --panel: #1C2026; --panel2: #232830; --line: #2D333C; --line2: #3B424D;
  --fg: #F3F4F6; --fg2: #B8BEC8; --mute: #808895;
  --acc: #EF2B45; --acc-ink: #FFFFFF; --acc2: #F3F4F6; --acc2-ink: #16191E;
  --ok: #3DD68C; --warn: #F5B342; --bad: #FF5468; --info: #5EA2FF; --violet: #A98BFF;
  --glow: 0 0 0 1px rgba(239,43,69,.3), 0 10px 30px -12px rgba(239,43,69,.55);
  --shadow: 0 14px 44px -18px rgba(0,0,0,.8);
  --grid: rgba(239,43,69,.035);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 34px 34px; background-attachment: fixed;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--acc); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: .3px; text-wrap: balance; margin: 0; }
.mono, .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Démarrage ---------- */
.boot { height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; }
.boot-name { font-family: var(--f-display); letter-spacing: 6px; font-size: 18px; color: var(--fg2); }
.boot-bar { width: 160px; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 40%; background: var(--acc); animation: bar 1.1s ease-in-out infinite; }
@keyframes bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.delta-logo { color: var(--acc); width: 34px; height: 34px; }
:root[data-theme="dark"] .delta-logo { filter: drop-shadow(0 0 10px rgba(239,43,69,.45)); }
.delta-logo.big { width: 72px; height: 72px; }
.delta-logo svg { width: 100%; height: 100%; }

/* ---------- Connexion ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero { position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); background: radial-gradient(1100px 600px at 0% 110%, rgba(215,25,47,.22), transparent 60%), linear-gradient(160deg, #1B1E23, #111317); color: #F3F4F6; }
.login-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .7; }
.login-hero > * { position: relative; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--f-display); font-weight: 700; letter-spacing: 4px; font-size: 17px; }
.brand small { display: block; letter-spacing: 1.5px; font-weight: 500; color: var(--mute); font-size: 11px; font-family: var(--f-body); }
.login-hero h1 { font-size: clamp(32px, 4.4vw, 58px); line-height: 1.04; max-width: 12ch; }
.login-hero h1 em { font-style: normal; color: var(--acc); }
.login-hero p { color: #B8BEC8; max-width: 46ch; }
.login-hero .brand small { color: #9AA1AC; }
.login-hero .signature { color: #9AA1AC; }
.signature { font-size: 12px; color: var(--mute); letter-spacing: .4px; }
.signature b { color: var(--acc); font-weight: 600; }
.login-form { display: grid; place-items: center; padding: 32px max(20px, env(safe-area-inset-right, 0px)) 32px max(20px, env(safe-area-inset-left, 0px)); }
.login-card { width: min(400px, 100%); display: grid; gap: 16px; }
.login-card h2 { font-size: 26px; }
.login-card .sub { color: var(--fg2); margin-top: -8px; }
.role-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.role-pills span { font-size: 11px; letter-spacing: .6px; text-transform: uppercase; padding: 4px 9px; border: 1px solid var(--line2); border-radius: 99px; color: var(--fg2); }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { padding: 28px 20px 26px; border-right: 0; border-bottom: 1px solid var(--line); gap: 18px; }
  .login-hero h1 { font-size: 30px; }
  .login-hero p { display: none; }
}

/* ---------- Champs & boutons ---------- */
label.f, div.f, .f { display: grid; gap: 6px; font-size: 13px; color: var(--fg2); font-weight: 500; min-width: 0; }
label.f > span.req::after, div.f > span.req::after { content: " *"; color: var(--acc2); }
.inp, select.inp, textarea.inp {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-s); border: 1px solid var(--line2);
  background: var(--bg2); color: var(--fg); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.inp { min-height: 90px; resize: vertical; }
.inp:focus { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 18%, transparent); }
.inp[readonly], .inp:disabled { opacity: .8; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: var(--r-s); border: 1px solid var(--line2); background: var(--panel2); color: var(--fg);
  font-weight: 600; cursor: pointer; white-space: nowrap; transition: transform .08s, background .15s, border-color .15s; text-decoration: none;
}
.btn:hover { border-color: var(--acc); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.pri { background: var(--acc); color: var(--acc-ink); border-color: transparent; box-shadow: var(--glow); }
.btn.amb { background: var(--acc2); color: var(--acc2-ink); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: transparent; }
.btn.sm { min-height: 34px; padding: 0 11px; font-size: 13px; }
.btn.icon { width: 42px; padding: 0; }
.btn.sm.icon { width: 34px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.block { width: 100%; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; }
.hint { font-size: 12.5px; color: var(--mute); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.full { grid-column: 1 / -1; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--line2); position: relative; cursor: pointer; transition: background .15s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--fg); transition: transform .15s; }
.switch input:checked { background: var(--acc); }
.switch input:checked::after { transform: translateX(18px); background: var(--acc-ink); }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: var(--r-s); overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 12px; cursor: pointer; color: var(--fg2); font-weight: 600; font-size: 13px; }
.seg button.on { background: var(--acc); color: var(--acc-ink); }

/* ---------- Structure de l'application ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg2) 92%, transparent); backdrop-filter: blur(10px); padding: 18px 12px 18px; display: flex; flex-direction: column; gap: 6px; }
.side .brand { padding: 4px 8px 16px; font-size: 14px; }
.nav-sec { font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--mute); padding: 12px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; color: var(--fg2); text-decoration: none; font-weight: 500; font-size: 14px; position: relative; }
.nav a svg { width: 19px; height: 19px; flex: none; color: var(--mute); }
.nav a:hover { background: var(--panel); color: var(--fg); }
.nav a.on { background: var(--panel2); color: var(--fg); box-shadow: inset 2px 0 0 var(--acc); }
.nav a.on svg { color: var(--acc); }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who .av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--panel2); border: 1px solid var(--line2); font-family: var(--f-display); font-weight: 700; color: var(--acc); flex: none; }
.who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { color: var(--mute); font-size: 12px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px max(18px, env(safe-area-inset-right, 0px)) 12px max(18px, env(safe-area-inset-left, 0px)); padding-top: calc(12px + env(safe-area-inset-top, 0px)); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); }
.topbar h1 { font-size: 20px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar h1 span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumb { color: var(--mute); font-size: 12px; font-family: var(--f-mono); letter-spacing: .5px; }
.topbar .tb-brand { display: none; }
.content { padding: 22px max(18px, env(safe-area-inset-right, 0px)) 40px max(18px, env(safe-area-inset-left, 0px)); width: 100%; max-width: 1500px; display: grid; gap: 18px; align-content: start; }
.content.flush { padding: 0; max-width: none; flex: 1; }
.mobile-only { display: none !important; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .mobile-only { display: inline-flex !important; }
  .topbar .tb-brand { display: flex; }
  .content { padding-top: 16px; padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Grille d'icônes (accueil technicien) ---------- */
.hello { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.hello h2 { font-size: 26px; }
.hello p { margin: 4px 0 0; color: var(--fg2); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile {
  position: relative; display: grid; gap: 12px; align-content: space-between; min-height: 132px; padding: 16px; text-decoration: none; color: var(--fg);
  border-radius: var(--r); border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel2), var(--panel)); overflow: hidden;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.tile::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--c, var(--acc)); opacity: .09; filter: blur(4px); }
.tile:hover { transform: translateY(-2px); border-color: var(--c, var(--acc)); box-shadow: 0 10px 30px -16px var(--c, var(--acc)); }
.tile .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: var(--c, var(--acc)); background: color-mix(in srgb, var(--c, var(--acc)) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c, var(--acc)) 35%, transparent); }
.tile .ic svg { width: 24px; height: 24px; }
.tile b { font-family: var(--f-display); font-size: 16px; font-weight: 600; letter-spacing: .2px; display: block; }
.tile small { color: var(--mute); font-size: 12px; display: block; margin-top: 2px; }
.tile .idx { position: absolute; top: 12px; right: 14px; font-family: var(--f-mono); font-size: 11px; color: var(--mute); }
.tile .badge { position: absolute; top: 12px; right: 12px; }
@media (max-width: 520px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tile { min-height: 118px; padding: 14px; } .tile b { font-size: 14.5px; } }

/* ---------- Panneaux, KPI, chips ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.card h3 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, var(--acc)); }
.kpi small { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--mute); }
.kpi .v { font-family: var(--f-display); font-size: 30px; font-weight: 700; line-height: 1.1; margin-top: 6px; color: var(--fg); font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12.5px; color: var(--fg2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: color-mix(in srgb, var(--c, var(--mute)) 16%, transparent); color: var(--c, var(--fg2)); border: 1px solid color-mix(in srgb, var(--c, var(--mute)) 35%, transparent); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.plain::before { display: none; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--acc2); color: var(--acc2-ink); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; font-family: var(--f-mono); }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.tabs button { flex: none; display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); background: var(--panel); color: var(--fg2); padding: 8px 13px; border-radius: 99px; cursor: pointer; font-weight: 600; font-size: 13px; }
.tabs button .n { font-family: var(--f-mono); font-size: 11.5px; color: var(--mute); }
.tabs button.on { border-color: var(--c, var(--acc)); color: var(--fg); background: color-mix(in srgb, var(--c, var(--acc)) 12%, var(--panel)); }
.tabs button.on .n { color: var(--c, var(--acc)); }
.empty { text-align: center; padding: 38px 16px; color: var(--mute); display: grid; gap: 10px; justify-items: center; }
.empty svg { width: 40px; height: 40px; opacity: .6; }
.empty b { color: var(--fg2); font-size: 15px; }

/* ---------- Tableaux (cartes empilées sur mobile) ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { position: relative; flex: 1 1 220px; min-width: 0; max-width: 420px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--mute); }
.search .inp { padding-left: 38px; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--mute); font-weight: 600; padding: 11px 12px; border-bottom: 1px solid var(--line); background: var(--panel2); white-space: nowrap; position: sticky; top: 0; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr { cursor: pointer; transition: background .1s; }
.tbl tbody tr:hover { background: var(--panel2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td.clip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .thumbs { display: flex; gap: 4px; }
.tbl .thumbs img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line2); }
@media (max-width: 720px) {
  .tbl-wrap { border: 0; background: transparent; overflow: visible; }
  table.tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl thead { display: none; }
  .tbl tbody { display: grid; gap: 10px; }
  .tbl tbody tr { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 4px; }
  .tbl td { border: 0; padding: 5px 12px; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; }
  .tbl td::before { content: attr(data-l); font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--mute); padding-top: 2px; }
  .tbl td.clip { max-width: none; white-space: normal; }
  .tbl td.first { font-family: var(--f-display); font-size: 16px; font-weight: 600; }
}

/* ---------- Modale ---------- */
.modal-back { position: fixed; inset: 0; z-index: 3500; background: rgba(3,6,12,.66); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 18px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(760px, 100%); max-height: calc(100vh - 36px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow); animation: pop .18s; }
.modal.wide { width: min(1080px, 100%); }
.modal.narrow { width: min(440px, 100%); }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-h h2 { font-size: 19px; flex: 1; min-width: 0; }
.modal-b { padding: 18px; overflow-y: auto; display: grid; gap: 14px; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .modal-back { padding: 0; align-items: end; }
  .modal, .modal.wide, .modal.narrow { width: 100%; max-height: 94vh; border-radius: 18px 18px 0 0; }
  .modal-f { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .modal-f .btn { flex: 1; }
}

/* ---------- Photos / fichiers ---------- */
.drop { border: 1.5px dashed var(--line2); border-radius: var(--r); padding: 18px; text-align: center; color: var(--fg2); cursor: pointer; transition: border-color .15s, background .15s; display: grid; gap: 6px; justify-items: center; }
.drop svg { width: 28px; height: 28px; color: var(--acc); }
.drop.over, .drop:hover { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 6%, transparent); }
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.gal .it { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line2); background: var(--bg2); display: grid; place-items: center; font-size: 11px; color: var(--fg2); text-align: center; padding: 4px; max-width: 100%; }
.gal .it img, .gal .it video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gal .it .x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; display: grid; place-items: center; z-index: 2; }
.gal .it a { position: absolute; inset: 0; z-index: 1; }
.viewer-img { width: 100%; max-height: 75vh; object-fit: contain; border-radius: 10px; background: #000; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; z-index: 4000; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast { padding: 12px 14px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 14px; display: flex; gap: 10px; align-items: start; animation: pop .2s; }
.toast::before { content: ""; width: 4px; align-self: stretch; border-radius: 4px; background: var(--c, var(--acc)); flex: none; }
.toast.ok { --c: var(--ok); } .toast.bad { --c: var(--bad); } .toast.warn { --c: var(--warn); }

/* ---------- Carte ---------- */
.map-page { position: relative; flex: 1; display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: calc(100vh - 65px); }
.map-panel { border-right: 1px solid var(--line); background: var(--bg2); padding: 14px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: calc(100vh - 65px); }
#map { width: 100%; height: 100%; min-height: 420px; background: var(--bg2); }
.map-legend { display: grid; gap: 6px; font-size: 12.5px; color: var(--fg2); }
.map-legend span { display: flex; align-items: center; gap: 8px; }
.near-list { display: grid; gap: 6px; }
.near-list button { text-align: left; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; color: var(--fg); }
.near-list button b { font-family: var(--f-mono); font-size: 13px; }
.near-list button small { grid-column: 1 / -1; color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.near-list button .d { font-family: var(--f-mono); font-size: 12px; color: var(--ok); }
@media (max-width: 960px) {
  .map-page { grid-template-columns: 1fr; grid-template-rows: auto minmax(60vh, 1fr); min-height: 0; }
  .map-panel { border-right: 0; border-bottom: 1px solid var(--line); max-height: none; }
  #map { min-height: 62vh; }
  .map-panel .near-wrap { max-height: 210px; overflow-y: auto; }
}
.pin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(0,0,0,.55); box-shadow: 0 0 0 2px rgba(255,255,255,.65), 0 2px 8px rgba(0,0,0,.5); }
.pin.y { background: #FACC15; }
.pin.o { background: #F97316; box-shadow: 0 0 0 2px #fff, 0 0 12px rgba(249,115,22,.9); animation: blinkO 1s ease-in-out infinite; }
@keyframes blinkO { 50% { background: #FED7AA; box-shadow: 0 0 0 2px #fff, 0 0 2px rgba(249,115,22,.2); transform: scale(.85); } }
.pin.sq { border-radius: 4px; }
.pin.g { background: #22C55E; box-shadow: 0 0 0 2px #fff, 0 0 14px rgba(34,197,94,.9); }
.pin.r { background: #EF4444; box-shadow: 0 0 0 3px #fff, 0 0 18px rgba(239,68,68,1); animation: blink .7s steps(2, start) infinite, ring 1.4s ease-out infinite; }
@keyframes blink { to { background: #7F1D1D; } }
@keyframes ring { 0% { box-shadow: 0 0 0 3px #fff, 0 0 0 0 rgba(239,68,68,.8); } 100% { box-shadow: 0 0 0 3px #fff, 0 0 0 22px rgba(239,68,68,0); } }
.pin.me { width: 20px; height: 20px; background: #3B82F6; border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(59,130,246,.7); animation: me 1.8s ease-out infinite; }
@keyframes me { 0% { box-shadow: 0 0 0 0 rgba(59,130,246,.65); } 100% { box-shadow: 0 0 0 18px rgba(59,130,246,0); } }
.pin-tech { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px 10px 10px 2px; background: #7C3AED; color: #fff; font: 700 12px var(--f-display); border: 2px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.5); transform: rotate(-45deg); }
.pin-tech span { transform: rotate(45deg); }
.pin-tech.old { background: #64748B; }
.cl { display: grid; place-items: center; border-radius: 50%; font: 700 13px var(--f-mono); color: #1a1300; background: #FACC15; border: 3px solid rgba(255,255,255,.85); box-shadow: 0 0 0 5px rgba(250,204,21,.28), 0 4px 14px rgba(0,0,0,.45); }
.cl.o { background: #F97316; color: #fff; box-shadow: 0 0 0 5px rgba(249,115,22,.3); animation: blinkO 1.2s ease-in-out infinite; }
.cl.g { background: #22C55E; color: #00210d; box-shadow: 0 0 0 5px rgba(34,197,94,.3); }
.cl.r { background: #EF4444; color: #fff; box-shadow: 0 0 0 5px rgba(239,68,68,.35); }
.leaflet-container { font: 13px var(--f-body); background: var(--bg2); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--fg); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 14px 16px; min-width: 240px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--fg2); }
.pop h4 { margin: 0 0 6px; font: 600 17px var(--f-display); }
.pop dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; margin: 8px 0; font-size: 13px; }
.pop dt { color: var(--mute); }
.pop dd { margin: 0; }
.pop .row { margin-top: 10px; }
.leaflet-bar a { background: var(--panel); color: var(--fg); border-color: var(--line2); }
.leaflet-control-layers { background: var(--panel); color: var(--fg); border: 1px solid var(--line2) !important; }

/* ---------- Chat ---------- */
.chat { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: calc(100vh - 65px); }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; background: var(--bg2); padding: 10px; display: grid; gap: 4px; align-content: start; }
.chat-list button { display: flex; align-items: center; gap: 10px; padding: 9px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; color: var(--fg); }
.chat-list button.on, .chat-list button:hover { background: var(--panel2); }
.chat-list .av { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--panel2); border: 1px solid var(--line2); font: 700 13px var(--f-display); color: var(--acc); flex: none; position: relative; }
.chat-list .av.on::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); border: 2px solid var(--bg2); }
.chat-list b { display: block; font-size: 14px; }
.chat-list small { color: var(--mute); font-size: 12px; }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: min(560px, 82%); align-self: flex-start; display: grid; gap: 4px; }
.msg.me { align-self: flex-end; }
.msg .bub { padding: 10px 13px; border-radius: 14px 14px 14px 4px; background: var(--panel2); border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; }
.msg.me .bub { background: color-mix(in srgb, var(--acc) 18%, var(--panel)); border-color: color-mix(in srgb, var(--acc) 35%, transparent); border-radius: 14px 14px 4px 14px; }
.msg .meta { font-size: 11.5px; color: var(--mute); }
.msg.me .meta { text-align: right; }
.msg img, .msg video { max-width: 100%; max-height: 300px; border-radius: 10px; display: block; margin-top: 6px; }
.msg .pos { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; }
.chat-in { border-top: 1px solid var(--line); padding: 12px; display: flex; gap: 8px; align-items: end; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--bg2); }
.chat-in textarea { min-height: 44px; max-height: 140px; resize: none; }
@media (max-width: 760px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - 65px - env(safe-area-inset-top, 0px)); }
  .chat-list { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .chat-list button { flex-direction: column; flex: none; width: 76px; gap: 4px; text-align: center; padding: 6px; }
  .chat-list button small { display: none; }
  .chat-list b { font-size: 11.5px; width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- Divers ---------- */
.sig-pad { width: 100%; height: 190px; border-radius: var(--r); border: 1px solid var(--line2); background: #FFFFFF; touch-action: none; cursor: crosshair; display: block; }
.lines { display: grid; gap: 10px; }
.line { display: grid; grid-template-columns: 140px 1.1fr 1.4fr 110px 90px 40px; gap: 8px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg2); }
@media (max-width: 900px) { .line { grid-template-columns: 1fr 1fr; } .line .del { justify-self: end; } }
.total-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--acc) 40%, transparent); background: color-mix(in srgb, var(--acc) 8%, var(--panel)); }
.total-bar .v { font: 700 26px var(--f-display); font-variant-numeric: tabular-nums; color: var(--acc); }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.folder { text-align: left; display: grid; gap: 6px; padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); cursor: pointer; color: var(--fg); }
.folder:hover, .folder.on { border-color: var(--acc2); }
.folder svg { width: 30px; height: 30px; color: var(--acc2); }
.folder b { font-family: var(--f-display); font-size: 15px; }
.folder small { color: var(--mute); }
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.ds { text-align: left; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); cursor: pointer; display: grid; gap: 4px; color: var(--fg); }
.ds.on { border-color: var(--acc); box-shadow: var(--glow); }
.ds b { font-size: 14px; }
.ds small { color: var(--mute); font-size: 12px; }
.report { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.report div { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--bg2); }
.report b { display: block; font: 700 22px var(--f-display); }
.report small { color: var(--mute); font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; }
.chart-box { position: relative; height: 360px; }
@media (max-width: 640px) { .chart-box { height: 290px; } }
.pwd { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); }
.list-plain { display: grid; gap: 8px; }
.list-plain .it { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); min-width: 0; }
.list-plain .it > div { min-width: 0; flex: 1; }
.list-plain .it small { color: var(--mute); display: block; font-size: 12px; }
.alert { padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--c, var(--warn)) 40%, transparent); background: color-mix(in srgb, var(--c, var(--warn)) 9%, var(--panel)); display: flex; gap: 10px; align-items: start; font-size: 14px; }
.alert svg { width: 20px; height: 20px; color: var(--c, var(--warn)); flex: none; margin-top: 1px; }
.foot-sign { text-align: center; font-size: 12px; color: var(--mute); padding: 6px 0 4px; }
.foot-sign b { color: var(--acc); font-weight: 600; }
.ocr-box { font-family: var(--f-mono); font-size: 12px; white-space: pre-wrap; max-height: 160px; overflow: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; color: var(--fg2); }
.progress { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--acc); width: 0; transition: width .2s; }
.miss { color: var(--bad); font-weight: 700; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--mute); } .kv dd { margin: 0; }
.timeline { display: grid; gap: 6px; font-size: 13px; color: var(--fg2); }

/* ---------- Profils ---------- */
.role-tech .shell { grid-template-columns: 1fr; }
.role-tech .side { display: none; }
.role-tech .mobile-only { display: inline-flex !important; }
.role-tech .topbar .tb-brand { display: flex; }
.role-tech .content { max-width: 980px; margin: 0 auto; }
.role-tech .inp { min-height: 52px; font-size: 16px; }
.role-tech .btn { min-height: 48px; }
.role-tech .btn.sm { min-height: 40px; }
.role-tech .tile { min-height: 140px; }
.role-tech .tile .ic { width: 54px; height: 54px; }
.role-tech .tile .ic svg { width: 28px; height: 28px; }
.role-viewer .tile::after, .role-tech .tile::after { opacity: .06; }
.tb-tools { display: flex; gap: 6px; align-items: center; }
.gsearch { position: relative; width: min(380px, 40vw); }
.gsearch svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--mute); }
.gsearch .inp { padding-left: 36px; min-height: 40px; }
@media (max-width: 960px) { .gsearch { display: none; } }
.bell { position: relative; }
.bell .badge { position: absolute; top: -4px; right: -4px; background: var(--acc); color: var(--acc-ink); }
.zone-title { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 -4px; }
.zone-title h2 { font-size: 18px; }
.zone-title span { font-family: var(--f-mono); font-size: 11px; color: var(--acc); letter-spacing: 1px; }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-6 { grid-column: span 6; } .span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; }
@media (max-width: 1100px) { .span-8, .span-6, .span-4 { grid-column: span 12; } .span-3 { grid-column: span 6; } }
@media (max-width: 560px) { .span-3 { grid-column: span 12; } }
.mini-map { height: 340px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.bars { display: grid; gap: 8px; }
.bars .b { display: grid; grid-template-columns: 130px minmax(0, 1fr) 46px; gap: 10px; align-items: center; font-size: 13px; }
.bars .b i { display: block; height: 10px; border-radius: 6px; background: var(--c, var(--acc)); min-width: 2px; transition: width .6s ease; }
.bars .b .t { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
.bars .b span:last-child { text-align: right; font-family: var(--f-mono); }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.quick a { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--fg); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.quick a svg { width: 18px; height: 18px; color: var(--acc); }
.quick a:hover { border-color: var(--acc); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters .inp { min-height: 38px; padding: 6px 10px; width: auto; max-width: 220px; font-size: 13.5px; }
.filters label { font-size: 12px; color: var(--mute); display: grid; gap: 3px; }
/* Planning */
.plan-days { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 8px; overflow-x: auto; }
.plan-day { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; min-height: 160px; display: flex; flex-direction: column; min-width: 0; }
.plan-day.today { border-color: var(--acc); }
.plan-day header { padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--mute); display: flex; justify-content: space-between; text-transform: capitalize; }
.plan-day header b { color: var(--fg); font-family: var(--f-display); font-size: 14px; }
.plan-day .list { padding: 6px; display: grid; gap: 6px; align-content: start; }
.job { text-align: left; border: 1px solid var(--line); border-left: 4px solid var(--c, var(--mute)); background: var(--panel2); border-radius: 8px; padding: 7px 9px; cursor: pointer; color: var(--fg); display: grid; gap: 2px; font-size: 12.5px; min-width: 0; width: 100%; }
.job:hover { border-color: var(--c, var(--acc)); }
.job b { font-family: var(--f-mono); font-size: 12.5px; }
.job span { color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job .t { color: var(--mute); font-size: 11.5px; }
.job.changed::after { content: "modifié à l’import"; font-size: 10.5px; color: var(--warn); }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month .dow { font-size: 11px; color: var(--mute); text-align: center; text-transform: uppercase; letter-spacing: 1px; padding: 4px 0; }
.month .cell { min-height: 92px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 5px; display: grid; gap: 3px; align-content: start; cursor: pointer; min-width: 0; }
.month .cell.out { opacity: .45; }
.month .cell.today { border-color: var(--acc); }
.month .cell .d { font: 600 12px var(--f-mono); color: var(--fg2); }
.month .cell .dot { font-size: 11px; padding: 1px 5px; border-radius: 4px; background: color-mix(in srgb, var(--c, var(--mute)) 18%, transparent); color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) { .month .cell { min-height: 58px; } .month .cell .dot { display: none; } .month .cell .n { display: block !important; } }
.lanes { display: grid; gap: 10px; }
.lane { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 8px; }
.lane h4 { margin: 0; font: 600 14px var(--f-display); display: flex; justify-content: space-between; }
.lane .jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.map-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.conf { border-left: 3px solid var(--warn); padding: 6px 10px; background: color-mix(in srgb, var(--warn) 8%, transparent); border-radius: 6px; font-size: 13px; }
.diff { font-family: var(--f-mono); font-size: 12px; color: var(--fg2); }
.diff del { color: var(--bad); } .diff ins { color: var(--ok); text-decoration: none; }

h3 svg, .card h3 svg { width: 18px; height: 18px; flex: none; color: var(--acc); }
.alert > div { min-width: 0; }
@media (max-width: 960px) {
  .topbar { gap: 6px; }
  .topbar .btn.icon, .role-tech .topbar .btn.icon { width: 38px; min-height: 38px; }
  .topbar h1 { font-size: 17px; }
}

.topbar .gone { display: none !important; }
.list-plain .it > svg, .msg .btn svg, .chat-list .av svg { width: 20px; height: 20px; flex: none; color: var(--acc); }
.gal .it > svg { width: 22px; height: 22px; position: relative; color: var(--fg2); }
.empty svg { flex: none; }
.map-panel .search, .modal .search { flex: none; }

/* Fond de carte sombre : OpenStreetMap inversé (aucune clé nécessaire) */
.tiles-dark { filter: invert(1) hue-rotate(180deg) brightness(.95) contrast(.9) saturate(.6); }
.bars.gauges .b { grid-template-columns: 90px minmax(0, 1fr) auto; }
.bars.gauges .b span:last-child { white-space: nowrap; }

/* Bandeau de connexion (anti-blocage) */
.netbar { position: fixed; z-index: 1500; left: 50%; transform: translateX(-50%); top: calc(10px + env(safe-area-inset-top, 0px)); display: flex; gap: 8px; align-items: center; padding: 9px 14px; border-radius: 99px; font-size: 13.5px; font-weight: 600; background: var(--panel2); border: 1px solid var(--line2); box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.netbar svg { width: 18px; height: 18px; flex: none; }
.netbar.bad { color: #fff; background: var(--bad); border-color: transparent; }
.netbar.ok { color: #fff; background: var(--ok); border-color: transparent; }
.dev-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--panel2); border: 1px solid var(--line2); flex: none; }
.dev-ic svg { width: 20px; height: 20px; color: var(--fg2); }
.diag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.diag-grid > div { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--bg2); min-width: 0; }
.diag-grid small { display: block; font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .5px; }
.diag-grid b { font-size: 14px; overflow-wrap: anywhere; }

/* ===================== Caméra géolocalisée ===================== */
.cam { position: fixed; inset: 0; z-index: 3000; background: #000; color: #fff; display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.cam-view { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.cam-top { grid-row: 1; grid-column: 1; z-index: 2; display: flex; gap: 8px; align-items: center; padding: calc(10px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px)); background: linear-gradient(rgba(0,0,0,.65), transparent); }
.cam-bottom { grid-row: 3; grid-column: 1; z-index: 2; display: flex; align-items: center; justify-content: space-around; padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.cam-btn { position: relative; width: 50px; height: 50px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.cam-btn svg { width: 24px; height: 24px; }
.cam-btn .badge { position: absolute; top: -4px; right: -4px; background: var(--acc); color: #fff; }
.cam-sel { flex: 1 1 0; width: 0; min-width: 0; max-width: 420px; height: 40px; border-radius: 99px; border: 0; padding: 0 14px; background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.cam-sel option { color: #111; }
.cam-gps { flex: none; font: 600 12px var(--f-mono); padding: 6px 10px; border-radius: 99px; background: rgba(255,255,255,.18); }
.cam-gps.ok { background: #138A52; } .cam-gps.mid { background: #B86E00; } .cam-gps.bad { background: #C8102E; }
.cam-shutter-wrap { display: grid; justify-items: center; gap: 10px; }
.cam-modes { display: flex; gap: 16px; font: 700 12px var(--f-body); letter-spacing: 1.5px; }
.cam-modes button { background: none; border: 0; color: rgba(255,255,255,.6); cursor: pointer; font: inherit; }
.cam-modes button.on { color: #FACC15; }
.cam-shutter { width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; background: #fff; box-shadow: inset 0 0 0 4px #000; cursor: pointer; transition: transform .1s; }
.cam-shutter:active { transform: scale(.92); }
.cam-shutter.video { background: #E30613; }
.cam-shutter.recording { background: #E30613; border-radius: 22px; animation: recp 1.2s ease-in-out infinite; }
@keyframes recp { 50% { box-shadow: inset 0 0 0 4px #000, 0 0 0 10px rgba(227,6,19,.35); } }
.cam-rec { grid-row: 2; grid-column: 1; z-index: 2; justify-self: center; align-self: start; margin-top: 10px; display: flex; gap: 8px; align-items: center; background: rgba(0,0,0,.6); padding: 6px 12px; border-radius: 99px; font: 700 15px var(--f-mono); }
.cam-rec i { width: 10px; height: 10px; border-radius: 50%; background: #E30613; animation: blink .8s steps(2, start) infinite; }
.cam-msg { grid-row: 2; grid-column: 1; z-index: 3; align-self: center; justify-self: center; max-width: min(460px, 90vw); background: rgba(17,19,23,.92); border: 1px solid rgba(255,255,255,.2); border-radius: 16px; padding: 20px; text-align: center; line-height: 1.6; }
.cam.flash::after { content: ""; position: absolute; inset: 0; background: #fff; opacity: .7; z-index: 5; pointer-events: none; }
.cam-review { position: absolute; inset: 0; z-index: 10; background: rgba(0,0,0,.94); display: grid; grid-template-rows: 1fr auto; }
.cam-review-media { display: grid; place-items: center; min-height: 0; padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px; }
.cam-review-media img, .cam-review-media video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.cam-review-form { background: var(--panel); color: var(--fg); padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 12px; border-radius: 18px 18px 0 0; max-height: 60vh; overflow: auto; }
.cam-hero { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cam-big { display: grid; justify-items: center; gap: 6px; padding: 22px 12px; border-radius: var(--r); border: 0; background: var(--acc); color: var(--acc-ink); cursor: pointer; text-align: center; font: inherit; box-shadow: var(--glow); }
.cam-big:nth-child(2) { background: var(--acc2); color: var(--acc2-ink); box-shadow: none; }
.cam-big.ghost { background: var(--panel); color: var(--fg); border: 1px solid var(--line2); box-shadow: none; }
.cam-big svg { width: 34px; height: 34px; }
.cam-big b { font: 600 18px var(--f-display); }
.cam-big small { opacity: .8; font-size: 12px; }
@media (max-width: 520px) { .cam-hero { gap: 8px; } .cam-big { padding: 16px 6px; } .cam-big small { display: none; } }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.media-grid.big { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.media-it { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #000; padding: 0; cursor: pointer; aspect-ratio: 4 / 3; display: block; color: #fff; text-align: left; max-width: 100%; }
.media-it img, .media-it video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-it.picked { outline: 3px solid var(--acc); outline-offset: -3px; }
.media-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 9px 7px; background: linear-gradient(transparent, rgba(0,0,0,.8)); display: grid; gap: 1px; }
.media-cap b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-cap small { font-size: 11px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-badge { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; align-items: center; background: rgba(0,0,0,.65); padding: 3px 7px; border-radius: 99px; font: 600 11px var(--f-mono); }
.media-badge svg, .media-check svg { width: 14px; height: 14px; }
.media-check { position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.4); display: grid; place-items: center; }
.media-it.picked .media-check { background: var(--acc); }
.media-day { display: grid; gap: 6px; margin-bottom: 14px; }
.pin-media { width: 30px; height: 30px; border-radius: 50%; background: #0EA5E9; border: 2px solid #fff; display: grid; place-items: center; color: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.45); }
.pin-media svg { width: 16px; height: 16px; }

/* ===================== Éditeur de photos annotées ===================== */
.ced { position: fixed; inset: 0; z-index: 3000; background: var(--bg); display: grid; grid-template-rows: auto 1fr; }
.ced-top { display: flex; gap: 6px; align-items: center; padding: calc(8px + env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) 8px max(10px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); background: var(--bg2); }
.ced-title { max-width: 380px; min-height: 40px; }
.ced-body { display: grid; grid-template-columns: 92px minmax(0, 1fr) 300px; min-height: 0; }
.ced-tools { display: grid; align-content: start; gap: 4px; padding: 8px 6px; overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg2); }
.ced-tools button { display: grid; justify-items: center; gap: 3px; padding: 8px 2px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--fg2); cursor: pointer; font-size: 10.5px; line-height: 1.15; text-align: center; }
.ced-tools button svg { width: 22px; height: 22px; }
.ced-tools button.on { background: var(--acc); color: var(--acc-ink); }
.ced-stage { overflow: auto; background: repeating-conic-gradient(var(--bg2) 0 25%, var(--bg) 0 50%) 0 0 / 22px 22px; display: grid; place-items: center; padding: 8px; touch-action: none; min-height: 0; }
.ced-stage.panning { cursor: grab; }
.ced-canvas { position: relative; box-shadow: 0 6px 30px rgba(0,0,0,.4); flex: none; }
.ced-canvas img, .ced-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-select: none; }
.ced-canvas svg { touch-action: none; }
.ced-h { fill: #fff; stroke: #2EA8FF; cursor: grab; }
.ced-h.tip { fill: #FACC15; } .ced-h.rot { fill: #2EA8FF; }
.ced-mid circle { fill: rgba(46,168,255,.85); stroke: #fff; cursor: copy; } .ced-mid path { stroke: #fff; }
.ced-props { overflow-y: auto; border-left: 1px solid var(--line); background: var(--panel); padding: 10px; display: grid; gap: 10px; align-content: start; }
.ced-row { display: grid; gap: 8px; }
.ced-sw { display: flex; flex-wrap: wrap; gap: 6px; }
.ced-sw button { width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--line2); cursor: pointer; }
.ced-sw button.on { outline: 3px solid var(--acc); outline-offset: 1px; }
.ced-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ced-presets button { display: grid; gap: 5px; padding: 7px 8px; border: 1px solid var(--line2); border-radius: 8px; background: var(--bg2); color: var(--fg); cursor: pointer; font-size: 12px; text-align: left; }
.ced-presets button i { display: block; width: 100%; }
.ced-presets button.on { border-color: var(--acc); }
.ced-syms { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.ced-syms.small { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); }
.ced-syms button { display: grid; justify-items: center; gap: 3px; padding: 6px 3px; border: 1px solid var(--line2); border-radius: 8px; background: #fff; cursor: pointer; color: #111; font-size: 10.5px; line-height: 1.15; }
.ced-syms button svg { width: 38px; height: 38px; }
.ced-syms.small button svg { width: 28px; height: 28px; }
.ced-syms button.on { outline: 3px solid var(--acc); }
.ced-props input[type=range] { width: 100%; accent-color: var(--acc); }
@media (max-width: 860px) {
  .ced-desk { display: none !important; }
  .ced-title { display: none; }
  .ced-top .btn.pri { margin-left: auto; }
  .ced-top .spacer { display: none; }
  .ced-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto auto; }
  .ced-stage { grid-row: 1; }
  .ced-props { grid-row: 2; border-left: 0; border-top: 1px solid var(--line); max-height: 34vh; }
  .ced-props.empty { display: none; }
  .ced-tools { grid-row: 3; display: flex; overflow-x: auto; border-right: 0; border-top: 1px solid var(--line); padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); }
  .ced-tools button { flex: none; width: 70px; }
}

.lignes { display: grid; gap: 8px; }
.lignes [data-rows] { display: grid; gap: 6px; }
.ligne { display: grid; grid-template-columns: minmax(0, 1fr) 90px 86px 40px; gap: 6px; align-items: center; }
.ligne .inp { min-height: 40px; }
@media (max-width: 520px) { .ligne { grid-template-columns: minmax(0, 1fr) 70px 70px 36px; } }

.maj-step { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 6px; align-content: start; }
.maj-step p { margin: 4px 0; }

/* ===== Boîte mail ===== */
.mb { display: grid; grid-template-columns: 220px minmax(300px, 400px) minmax(0, 1fr); height: calc(100dvh - 150px); min-height: 480px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel); }
.mb-folders { border-right: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow: auto; background: var(--panel2); }
.mb-new { width: 100%; justify-content: center; }
.mb-folders nav { display: grid; gap: 2px; }
.mb-folders nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: inherit; text-decoration: none; font-size: 14px; }
.mb-folders nav a svg { width: 18px; height: 18px; flex: none; }
.mb-folders nav a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-folders nav a.on { background: color-mix(in srgb, var(--acc) 14%, transparent); color: var(--acc); font-weight: 700; }
.mb-folders nav a:hover:not(.on) { background: color-mix(in srgb, var(--fg) 6%, transparent); }
.mb-n { font-size: 12px; }
.mb-acct { margin-top: auto; font-size: 12px; word-break: break-all; }
.mb-acct svg { width: 14px; height: 14px; vertical-align: -2px; }
.mb-list { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); }
.mb-tools { display: flex; gap: 6px; padding: 10px; align-items: center; }
.mb-chips { display: flex; gap: 6px; padding: 0 10px 8px; overflow-x: auto; }
.chip-btn { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.chip-btn.on { background: var(--acc); border-color: var(--acc); color: #fff; }
.mb-bulk { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 8px 10px; background: color-mix(in srgb, var(--acc) 8%, transparent); }
.mb-rows { flex: 1; overflow: auto; }
.mb-row { display: flex; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); cursor: pointer; align-items: center; }
.mb-row:hover { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.mb-row.on { background: color-mix(in srgb, var(--acc) 10%, transparent); }
.mb-row.unread .mb-from, .mb-row.unread .mb-subj { font-weight: 800; }
.mb-row.unread { box-shadow: inset 3px 0 0 var(--acc); }
.mb-av { position: relative; width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; background: hsl(var(--h) 55% 45%); color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; }
.mb-av.big { width: 44px; height: 44px; cursor: default; }
.mb-av input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.mb-av:has(input:checked) { background: var(--acc); }
.mb-av:has(input:checked) span { visibility: hidden; }
.mb-av:has(input:checked)::after { content: '✓'; position: absolute; font-size: 18px; }
.mb-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mb-l1, .mb-l2 { display: flex; gap: 8px; align-items: center; min-width: 0; }
.mb-from, .mb-subj { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-subj { font-size: 13px; color: var(--mute); }
.mb-row.unread .mb-subj { color: inherit; }
.mb-l2 svg { width: 14px; height: 14px; flex: none; opacity: .7; }
.mb-date { font-size: 12px; color: var(--mute); flex: none; }
.mb-star { border: 0; background: none; color: var(--mute); font-size: 16px; cursor: pointer; padding: 0 2px; opacity: .5; }
.mb-star.on { color: #E8A100; opacity: 1; }
.mb-pager { display: flex; gap: 6px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); }
.mb-read { overflow: auto; min-width: 0; display: flex; flex-direction: column; }
.mb-rhead { padding: 12px 16px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.mb-subject { margin: 4px 0 0; font-size: 20px; line-height: 1.3; overflow-wrap: anywhere; }
.mb-meta { display: flex; gap: 12px; align-items: flex-start; }
.mb-meta .hint { overflow-wrap: anywhere; }
.mb-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.mb-links svg { width: 16px; height: 16px; }
.mb-att { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 8px; }
.att-card .row { flex: none; flex-wrap: nowrap; }
.att-card { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.att-card .ic { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--acc) 12%, transparent); color: var(--acc); flex: none; }
.att-card > div:nth-child(2) { flex: 1; min-width: 70px; display: grid; }
.att-card b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-card small { color: var(--mute); font-size: 11px; }
.mb-imgbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mb-imgbar svg { width: 16px; height: 16px; }
.mb-body { padding: 0; flex: 1; }
.mb-frame { width: 100%; border: 0; min-height: 300px; display: block; background: #fff; }
.mb-text { white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.55 inherit; font-family: inherit; padding: 16px; margin: 0; }
.compose { display: grid; gap: 10px; }
.att-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.att { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 13px; }
.att svg { width: 14px; height: 14px; }
.steps-ol { padding-left: 20px; display: grid; gap: 8px; }
.inp.sm { min-height: 32px; padding: 4px 8px; font-size: 13px; }
@media (max-width: 1100px) { .mb { grid-template-columns: 190px minmax(0, 1fr); } .mb-read { display: none; } .mb[data-mode=read] { grid-template-columns: 190px minmax(0, 1fr); } .mb[data-mode=read] .mb-list { display: none; } .mb[data-mode=read] .mb-read { display: flex; } }
@media (max-width: 720px) {
  .mb { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 130px); border-radius: 12px; }
  .mb[data-mode=read] { grid-template-columns: minmax(0, 1fr); }
  .mb-folders { display: none; border-right: 0; }
  .mb[data-mode=folders] .mb-folders { display: flex; } .mb[data-mode=folders] .mb-list { display: none; }
  .mb-list { border-right: 0; }
  .mb-rhead .btn.sm span { display: none; }
  .mb-rhead .btn.sm[data-bk] span { display: inline; }
}

/* ===== NAS & Archives ===== */
.nas-hero { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: linear-gradient(120deg, color-mix(in srgb, #0E7490 16%, var(--panel)), var(--panel)); }
.nas-ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: #0E7490; color: #fff; flex: none; }
.nas-ic svg { width: 28px; height: 28px; }
.kpi-card small { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--mute); }
.kpi-card .v { font-family: var(--f-display); font-size: 30px; font-weight: 700; margin: 4px 0; }
.kvf { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 16px; }
.kvf > div { display: grid; gap: 2px; min-width: 0; } .kvf small { color: var(--mute); font-size: 12px; } .kvf b { font-weight: 600; overflow-wrap: anywhere; }
.arc-list { display: grid; gap: 6px; max-height: 60vh; overflow: auto; }
.arc-it { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.arc-it.hl { border-color: var(--acc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--acc) 30%, transparent); }
.arc-it input { margin-top: 4px; }
.arc-th { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.arc-th img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; display: block; }
.arc-res { margin-bottom: 12px; }
@media (max-width: 900px) { .span-4 { grid-column: span 12; } }

.hsteps { display: grid; gap: 14px; }
.hstep { display: flex; gap: 12px; align-items: flex-start; }
.hn { width: 30px; height: 30px; border-radius: 50%; background: var(--acc); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }

.dr-tbl td, .dr-tbl th { padding: 6px 10px; }
.dr-spec { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; margin-top: 10px; }

/* ===== Consignes & demandes : cadres clignotants ===== */
@keyframes dcflash { 0%, 100% { box-shadow: inset 0 0 0 2px var(--fc, var(--acc)); } 50% { box-shadow: inset 0 0 0 3px var(--fc, var(--acc)), 0 0 16px color-mix(in srgb, var(--fc, var(--acc)) 55%, transparent); } }
.flash { animation: dcflash 1.1s ease-in-out infinite; border-radius: 10px; }
tr.flash td { background: color-mix(in srgb, var(--fc, var(--acc)) 10%, transparent) !important; }
tr.flash { animation: none; } tr.flash td:first-child { box-shadow: inset 4px 0 0 var(--fc, var(--acc)); animation: dcflashc 1.1s ease-in-out infinite; }
@keyframes dcflashc { 50% { box-shadow: inset 8px 0 0 var(--fc, var(--acc)); } }
.flash-tag { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--fc, var(--acc)); border-radius: 999px; padding: 1px 8px; margin: 0 6px 4px 0; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .flash, tr.flash td:first-child { animation: none; } }
.dlist { display: grid; gap: 8px; margin-bottom: 18px; }
.dcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--panel); cursor: pointer; }
.sec-t { display: flex; gap: 8px; align-items: center; font-size: 16px; margin: 14px 0 8px; }
.sec-t svg { width: 18px; height: 18px; }
.msg-refs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.ref-chip { border: 1px solid color-mix(in srgb, var(--acc) 40%, transparent); background: color-mix(in srgb, var(--acc) 10%, transparent); color: inherit; border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }

/* ===== SOS, pause ===== */
.sos-btn { background: #C8102E; color: #fff; font-weight: 800; letter-spacing: 1px; border-radius: 999px; padding: 0 14px; min-height: 38px; border: 0; position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.sos-btn::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.35); transform: scaleX(0); transform-origin: left; }
.sos-btn.hold::after { transform: scaleX(1); transition: transform 2s linear; }
.pause-screen { position: fixed; inset: 0; z-index: 5000; background: rgba(17,19,23,.92); display: grid; place-items: center; padding: 20px; }
.pause-box { background: var(--panel); color: var(--fg); border-radius: 18px; padding: 28px; max-width: 420px; text-align: center; }
.pause-ic { width: 60px; height: 60px; border-radius: 50%; background: var(--warn); color: #fff; display: grid; place-items: center; margin: 0 auto 10px; }
.pause-ic svg { width: 30px; height: 30px; }
.pausebar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: #C8102E; color: #fff; padding: 8px 16px; font-size: 14px; }
.pausebar svg { width: 18px; height: 18px; }

/* ===== Fiche d'accès, connexion ===== */
.fiche { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel); }
.fiche-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: #16191E; color: #fff; }
.fiche-h small { display: block; color: #EF2B45; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.fiche-b { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; padding: 18px; align-items: center; }
.fiche-qr { display: grid; gap: 6px; justify-items: center; text-align: center; background: #fff; border-radius: 12px; padding: 10px; color: #444; }
.fiche-qr svg { width: 220px; height: 220px; }
.fiche-i { display: grid; gap: 10px; } .fiche-i small { display: block; color: var(--mute); font-size: 12px; }
.fiche-code { font-size: 26px; letter-spacing: 3px; color: var(--acc); }
.fiche-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0 18px 16px; font-size: 13px; }
.fiche-steps > div { background: var(--panel2); border-radius: 10px; padding: 10px; } .fiche-steps b { display: block; margin-bottom: 4px; }
.fiche-f { font-size: 11px; color: var(--mute); padding: 8px 18px; border-top: 1px solid var(--line); }
@media (max-width: 720px) { .fiche-b, .fiche-steps { grid-template-columns: 1fr; } }
@media print { .fiche { border: 0; } }
.qr-full { position: fixed; inset: 0; z-index: 5000; background: #fff; color: #111; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; cursor: pointer; }
.qr-full svg { width: min(80vw, 80vh); height: min(80vw, 80vh); }
.qr-full b { font-size: 24px; } .qr-full span { font-size: 28px; letter-spacing: 4px; }
.login-links { display: grid; gap: 4px; margin-top: 12px; }
.linkbtn { background: none; border: 0; color: var(--acc); font: inherit; font-size: 14px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; padding: 6px 0; text-align: left; }
.linkbtn svg { width: 16px; height: 16px; }
.inst-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.inst-row > div:first-child { flex: 1; min-width: 220px; }
.inst-qr { background: #fff; border-radius: 10px; padding: 6px; } .inst-qr svg { width: 150px; height: 150px; display: block; }

/* ===== Comptabilité ===== */
.seg-wrap { flex-wrap: wrap; }
.tot-box { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.tot-box > div { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; min-width: 120px; text-align: right; }
.tot-box small { display: block; color: var(--mute); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.tot-box b { font-family: var(--f-display); font-size: 18px; }
.tot-box > div:last-child { background: #16191E; color: #fff; border-color: transparent; } .tot-box > div:last-child small { color: #c8cdd4; }
.lines-tbl td { padding: 4px; } .lines-tbl .inp { min-height: 36px; }
.scan-view { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 4/3; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; }
.scan-line { position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: #EF2B45; box-shadow: 0 0 10px #EF2B45; }
.signer { max-width: 760px; margin: 0 auto; padding: 18px; display: grid; gap: 10px; }
.signer-h { background: #16191E; color: #fff; padding: 14px 18px; border-radius: 12px; display: grid; } .signer-h small { color: #c8cdd4; }

/* ===== Chantier ===== */
.ck-list { display: grid; gap: 6px; }
.ck-it { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.ck-it > span { flex: 1; min-width: 200px; }
.ck-it[data-v=oui] { border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.ck-it[data-v=non] { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent); }
.seg button.on { background: var(--acc); color: #fff; }
img.mini { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; display: block; }
/* Mode terrain : gros boutons, gros texte */
html.big-ui { font-size: 118%; }
html.big-ui body { font-size: 17px; }
html.big-ui .btn { min-height: 50px; padding: 0 18px; font-size: 16px; }
html.big-ui .btn.sm { min-height: 44px; font-size: 15px; }
html.big-ui .inp { min-height: 52px; font-size: 17px; }
html.big-ui .tbl td { padding: 14px 12px; font-size: 16px; }
html.big-ui .nav a { padding: 14px 12px; font-size: 17px; }
html.big-ui .switch input { transform: scale(1.25); }

/* ===== Points d'explication ===== */
.info-dot { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--acc); color: var(--acc); background: transparent; font: italic 700 11px/1 Georgia, serif; margin-left: 6px; padding: 0; cursor: pointer; vertical-align: middle; flex: none; }
.info-dot:hover, .info-dot:focus-visible { background: var(--acc); color: #fff; outline: none; }
.info-dot.page { width: 22px; height: 22px; font-size: 13px; margin-left: 8px; }
.info-pop { position: fixed; z-index: 6000; background: #16191E; color: #F3F4F6; border-radius: 12px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; box-shadow: 0 14px 40px -12px rgba(0,0,0,.5); border-left: 3px solid #EF2B45; }
html.big-ui .info-dot { width: 24px; height: 24px; font-size: 14px; }

/* ---------- Serveur de secours ---------- */
.secours-bar { position: fixed; z-index: 1400; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; background: #7A2E0B; color: #FFF4E5; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.secours-bar.ok { background: #0F5132; color: #E8FFF1; }
.secours-bar svg { width: 18px; height: 18px; flex: none; }
.secours-bar .btn { flex: none; }

/* ---------- Domaines d'activité ---------- */
.nav-sec-i { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }
.dom-block { display: grid; gap: 10px; margin-bottom: 14px; }
.dom-block h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--c); font-size: 15px; }
.dom-block h3 svg { width: 18px; height: 18px; }
.dom-block .tile { border-color: color-mix(in srgb, var(--c) 35%, var(--line)); }
.dom-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.dom-card { position: relative; display: grid; gap: 6px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--panel2); }
.dom-card input { position: absolute; top: 12px; right: 12px; }
.dom-card b { display: flex; align-items: center; gap: 8px; color: var(--c); }
.dom-card b svg { width: 18px; height: 18px; }
.dom-card small { color: var(--fg2); }
.dom-card ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--fg2); }
.dom-card.on { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.tache { display: grid; grid-template-columns: 1fr 160px 52px auto; gap: 8px; align-items: center; }
@media (max-width: 640px) { .tache { grid-template-columns: 1fr 1fr auto; } .tache input[type=range] { grid-column: 1 / 3; } }
.av-bar { display: inline-block; width: 70px; height: 7px; border-radius: 9px; background: var(--line); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.av-bar span { display: block; height: 100%; background: #A78BFA; }

/* ---------- Éditeur de plans électriques ---------- */
.plan-ed { position: fixed; inset: 0; z-index: 1300; display: flex; flex-direction: column; background: var(--bg); }
.pe-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.pe-t { font-family: var(--disp, inherit); margin-right: 6px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-tools, .pe-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pe-act { margin-left: auto; }
.pe-tools .btn.on, .pe-sym.on { border-color: var(--acc); color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); }
.pe-tools select.inp.sm { width: auto; padding: 6px 8px; }
.pe-z { min-width: 46px; text-align: center; font-size: 12px; }
.pe-body { flex: 1; display: grid; grid-template-columns: 210px 1fr 240px; min-height: 0; }
.pe-pal, .pe-side { overflow: auto; padding: 10px; border-right: 1px solid var(--line); background: var(--panel); }
.pe-side { border-right: 0; border-left: 1px solid var(--line); }
.pe-side h4 { margin: 4px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--fg2); }
.pe-syms { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.pe-sym { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #111827; font-size: 10.5px; line-height: 1.15; cursor: pointer; text-align: center; }
.pe-sym svg { width: 34px; height: 34px; }
.pe-zone { overflow: auto; background: #CBD5E1; padding: 14px; }
.pe-zone[data-mode=sym], .pe-zone[data-mode=cable], .pe-zone[data-mode=echelle] { cursor: crosshair; }
.pe-zone[data-mode=texte] { cursor: text; }
.pe-svg { display: block; box-shadow: 0 2px 14px rgba(0,0,0,.18); background: #fff; touch-action: none; }
.pe-it { cursor: move; }
.pe-it[data-sel] > rect, .pe-it[data-sel] > path:first-child { stroke: #2563EB; stroke-width: 1.5; stroke-dasharray: 4 3; }
.pe-it[data-sel] text { fill: #2563EB; }
.pe-leg { display: grid; grid-template-columns: 28px 1fr auto; gap: 6px; align-items: center; padding: 4px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.pe-leg svg { width: 26px; height: 26px; background: #fff; color: #111827; border-radius: 6px; }
.pe-line { display: block; height: 3px; background: #D7192F; border-radius: 3px; }
.pe-help { margin-top: 14px; }
@media (max-width: 900px) { .pe-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; } .pe-pal { max-height: 150px; border-right: 0; border-bottom: 1px solid var(--line); } .pe-syms { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); } .pe-side { max-height: 170px; border-left: 0; border-top: 1px solid var(--line); } .pe-tools .btn span { display: none; } }
.first-choice { display: grid; gap: 10px; margin: 6px 0 12px; }
.dom-mini { display: flex; flex-wrap: wrap; gap: 8px; }
.dom-pill { padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line2); cursor: pointer; font-weight: 600; font-size: 13.5px; }
.dom-pill.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }

/* ---------- Planning : glisser-déposer, tournée ---------- */
.job[draggable=true] { cursor: grab; }
.job.dragging { opacity: .45; }
.dnd-on [data-dk] { outline: 1px dashed var(--line2); outline-offset: -2px; }
.drop-over { outline: 2px solid var(--acc) !important; background: color-mix(in srgb, var(--acc) 8%, transparent); }
.job .ord { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-right: 6px; border-radius: 99px; background: var(--acc); color: #fff; font-size: 11.5px; font-weight: 700; }
.lane h4 [data-tournee] { margin-left: auto; }
ol.tour { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
ol.tour li span { color: var(--fg2); }
/* ---------- Rendement ---------- */
.rbar { display: inline-flex; width: 90px; height: 8px; border-radius: 9px; overflow: hidden; background: var(--line); vertical-align: middle; margin-right: 8px; }
.rbar span { display: block; height: 100%; } .rbar .ok { background: var(--ok); } .rbar .wa { background: var(--warn); } .rbar .ba { background: var(--bad); }
/* ---------- Hors connexion ---------- */
.hl-pill { position: fixed; z-index: 1450; left: max(12px, env(safe-area-inset-left, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line2); background: var(--panel2); color: var(--fg); font: 600 13px var(--font, inherit); box-shadow: var(--shadow); cursor: pointer; }
.hl-pill.off { background: #7A2E0B; color: #FFF4E5; border-color: transparent; }
.hl-pill svg { width: 16px; height: 16px; }
/* ---------- Dossier en plusieurs pages ---------- */
.dos-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 8px; position: sticky; top: -16px; background: var(--panel); z-index: 2; }
.dos-tabs button { display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--fg2); font: 600 13.5px inherit; cursor: pointer; }
.dos-tabs button svg { width: 16px; height: 16px; }
.dos-tabs button.on { color: var(--acc); border-color: var(--line2); background: var(--panel2); }
.dos-tabs b { font-size: 11px; padding: 0 6px; border-radius: 99px; background: var(--line); color: var(--fg); }
.dos-tabs b:empty { display: none; }
.dos-page { display: grid; gap: 12px; }
.mut-wrap { max-height: 60vh; overflow: auto; }
table.mut th { white-space: nowrap; cursor: pointer; position: relative; padding-right: 22px; }
table.mut td { padding: 2px; }
.mut-in { width: 100%; min-width: 110px; padding: 7px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--fg); font: 13px inherit; }
.mut-in:focus { outline: none; border-color: var(--acc); background: var(--panel2); }
.mut-n { width: 34px; text-align: center; color: var(--fg2); font-size: 12px; }
.mut-x { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--fg2); cursor: pointer; font-size: 15px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.plan-card { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); }
.plan-th { height: 130px; border: 0; border-radius: 8px; background: #fff; display: grid; place-items: center; overflow: hidden; cursor: pointer; padding: 0; color: #111827; }
.plan-th img { width: 100%; height: 100%; object-fit: cover; }
.plan-th span { display: grid; justify-items: center; gap: 4px; } .plan-th svg { width: 36px; height: 36px; }
.plan-nm { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notes-l { display: grid; gap: 8px; }
.note-it { padding: 10px 12px; border-left: 3px solid var(--acc); background: var(--panel2); border-radius: 8px; }
.hint svg, [data-diff] svg { width: 16px; height: 16px; vertical-align: -3px; flex: none; }

/* Espaces par domaine */
.espaces { margin: 4px 10px 10px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--bg2) 70%, transparent); }
.esp-l { display: block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); font-weight: 700; margin-bottom: 7px; }
.esp-row { display: flex; flex-wrap: wrap; gap: 6px; }
.esp { appearance: none; font: inherit; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line2); background: transparent; color: var(--fg2); cursor: pointer; }
.esp:hover { border-color: var(--c); color: var(--fg); }
.esp.on { border-color: var(--c); color: var(--fg); background: color-mix(in srgb, var(--c) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }
.esp-bandeau { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.outils-x { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.outils-x .ox { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.ced-lib { margin: 6px 0; flex-wrap: wrap; }
/* Bibliothèque de symboles personnels */
.sym-new { display: grid; gap: 14px; }
.sym-res { display: grid; grid-template-columns: 140px 70px 1fr; gap: 14px; align-items: center; }
.sym-prev { width: 140px; height: 140px; border: 1px dashed var(--line2); border-radius: 14px; background: #fff; color: #111827; display: grid; place-items: center; }
.sym-prev svg { width: 120px; height: 120px; }
.sym-prev.small { width: 70px; height: 70px; display: flex; gap: 6px; justify-content: center; }
.sym-prev.small svg { width: 34px; height: 34px; }
.sym-pad canvas { width: min(360px, 100%); aspect-ratio: 1; background: #fff; border: 1px solid var(--line2); border-radius: 14px; touch-action: none; display: block; }
.sym-cell { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: #fff; color: #111827; }
.sym-cell svg { width: 32px; height: 32px; }
.pe-pal [data-newsym] { width: 100%; justify-content: center; margin: 6px 0; }
@media (max-width: 600px) { .sym-res { grid-template-columns: 1fr 1fr; } .sym-res p { grid-column: 1 / -1; } }
.sym-new [data-modes] { flex-wrap: wrap; }
.sym-new [data-modes] button { display: inline-flex; align-items: center; gap: 8px; }
.sym-new [data-modes] button svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 900px) {
  .pe-top { padding: 6px 8px; gap: 6px; }
  .pe-pal { max-height: none; padding: 6px 8px; display: flex; gap: 6px; align-items: center; overflow-x: auto; overflow-y: hidden; }
  .pe-pal > input { display: none; }
  .pe-pal [data-newsym] { width: auto; margin: 0; flex: none; }
  .pe-syms { display: flex !important; gap: 6px; }
  .pe-sym { flex: none; width: 74px; }
  .pe-side { max-height: 130px; }
  .pe-zone { padding: 6px; }
}
/* Listing opérateur */
.lst-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.lst-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lst-btns { display: flex; gap: 4px; }
.lst-btns button { font: inherit; font-size: 11.5px; font-weight: 700; padding: 4px 7px; border-radius: 7px; border: 1px solid var(--line2); background: transparent; color: var(--fg2); cursor: pointer; }
.lst-btns button.on.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.lst-btns button.on.nok { background: var(--bad); border-color: var(--bad); color: #fff; }
.lst-btns button.on.hs { background: var(--warn); border-color: var(--warn); color: #111; }
.mut tr.lst-ok td { background: color-mix(in srgb, var(--ok) 9%, transparent); }
.mut tr.lst-nok td { background: color-mix(in srgb, var(--bad) 11%, transparent); }
.mut tr.lst-hs td:not(.lst-t):not(.mut-n) .mut-in { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--warn) 80%, transparent); }
.mut td.lst-mod { box-shadow: inset 0 0 0 2px #F97316; background: color-mix(in srgb, #F97316 14%, transparent) !important; }
.mut td.lst-dout { background: color-mix(in srgb, #FACC15 30%, transparent) !important; }
.lst-t { white-space: nowrap; }
/* Dictée vocale */
.dictee { position: relative; }
.dictee textarea { padding-right: 44px; width: 100%; }
.dictee-b { position: absolute; right: 6px; top: 6px; }
.dictee-b.on { color: #fff; background: var(--acc); animation: dc-pulse 1.2s infinite; }
@keyframes dc-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--acc) 30%, transparent); } }
.mut td.lst-dbl { box-shadow: inset 0 0 0 2px var(--bad); }
.span-9 { grid-column: span 9; } .span-7 { grid-column: span 7; } .span-5 { grid-column: span 5; } .span-2 { grid-column: span 2; }
@media (max-width: 1100px) { .span-9, .span-7, .span-5 { grid-column: span 12; } .span-2 { grid-column: span 4; } }
/* Plateforme multi-entreprises */
.plat-banner { margin:10px 16px 0; padding:9px 13px; border-radius:12px; border:1px solid color-mix(in srgb,var(--c) 55%,transparent); background:color-mix(in srgb,var(--c) 12%,transparent); font-size:14px; }
.plat-banner a { color:inherit; font-weight:700; }
/* ===== Assistant installation électrique ===== */
.ea-ov { position:fixed; inset:0; z-index:60; background:var(--bg); display:flex; flex-direction:column; }
.ea-top { display:flex; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid var(--line); background:var(--panel); flex-wrap:wrap; }
.ea-t { display:grid; min-width:0; } .ea-t b { font-size:16px; } .ea-t small { color:var(--mute); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ea-tabs { display:flex; gap:4px; padding:8px 12px; border-bottom:1px solid var(--line); overflow-x:auto; scrollbar-width:thin; }
.ea-tabs button { background:none; border:0; color:var(--fg2); padding:8px 12px; border-radius:9px; font-weight:600; cursor:pointer; white-space:nowrap; font:inherit; font-weight:600; }
.ea-tabs button[aria-selected=true] { background:color-mix(in srgb,#FACC15 18%,transparent); color:var(--fg); box-shadow:inset 0 0 0 1px color-mix(in srgb,#FACC15 50%,transparent); }
.ea-body { flex:1; min-height:0; overflow:auto; }
.ea-pad { padding:16px; max-width:1200px; margin:0 auto; }
.ea-pad h3 { margin:18px 0 8px; font-size:15px; }
.ea-plan { display:grid; grid-template-columns:300px 1fr; height:100%; min-height:0; }
.ea-side { border-right:1px solid var(--line); overflow:auto; padding:12px; display:grid; gap:14px; align-content:start; }
.ea-sec-h { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; flex-wrap:wrap; }
.ea-pieces { display:grid; gap:6px; }
.ea-pc { position:relative; border:1px solid var(--line); border-radius:10px; padding:8px 40px 8px 10px; cursor:pointer; display:grid; }
.ea-pc small { color:var(--mute); font-size:12px; } .ea-pc.on { border-color:#FACC15; background:color-mix(in srgb,#FACC15 10%,transparent); }
.ea-pc [data-ed] { position:absolute; right:4px; top:50%; transform:translateY(-50%); }
.ea-g { font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute); margin:10px 0 5px; font-weight:700; }
.ea-pal { display:grid; grid-template-columns:1fr 1fr; gap:5px; }
.ea-pi { display:flex; align-items:center; gap:6px; padding:5px 6px; border:1px solid var(--line); border-radius:9px; background:var(--panel); color:var(--fg); font:inherit; font-size:12px; text-align:left; cursor:pointer; line-height:1.2; }
.ea-pi svg { flex:none; background:#fff; border-radius:6px; }
.ea-pi.on { border-color:#FACC15; box-shadow:0 0 0 2px color-mix(in srgb,#FACC15 40%,transparent); }
.ea-main { display:flex; flex-direction:column; min-width:0; min-height:0; }
.ea-tools { display:flex; gap:6px; padding:8px 10px; border-bottom:1px solid var(--line); flex-wrap:wrap; align-items:center; }
.ea-info { padding:7px 12px; font-size:13px; color:var(--fg2); border-bottom:1px solid var(--line); }
.ea-zone { flex:1; overflow:auto; padding:10px; background:var(--bg2,#0B0D10); touch-action:none; }
.ea-zone svg { display:block; border-radius:8px; box-shadow:0 4px 18px rgba(0,0,0,.25); user-select:none; }
.ea-room rect { fill:rgba(250,204,21,.05); stroke:#94A3B8; stroke-width:2; }
.ea-room.on rect { stroke:#CA8A04; fill:rgba(250,204,21,.12); }
.ea-room text { font:700 14px Arial,sans-serif; fill:#475569; }
.ea-pt { cursor:grab; } .ea-pt .ea-hit { fill:transparent; stroke:none; }
.ea-pt.sel .ea-hit { fill:rgba(225,29,53,.12); stroke:#E11D35; stroke-width:2; stroke-dasharray:4 3; }
.ea-pt.ex { opacity:.45; }
.ea-lab { font:600 10px Arial,sans-serif; fill:#334155; stroke:#fff; stroke-width:3px; paint-order:stroke; }
.ea-tab rect { fill:#111827; stroke:#FACC15; stroke-width:2; } .ea-tab text { font:700 11px Arial,sans-serif; fill:#FACC15; } .ea-tab { cursor:grab; }
.ea-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px; margin-bottom:10px; }
.ea-kpi { padding:12px 14px; display:grid; gap:2px; } .ea-kpi small { color:var(--mute); font-size:11.5px; text-transform:uppercase; letter-spacing:.06em; } .ea-kpi b { font-size:20px; }
.ea-code { display:inline-block; min-width:34px; text-align:center; padding:2px 6px; border-radius:7px; font-weight:800; font-size:12px; color:#fff; background:var(--c); }
.ea-steps { padding-left:22px; display:grid; gap:6px; } .ea-steps li { line-height:1.45; }
.ea-scroll { overflow:auto; }
.ea-ctrl { display:grid; gap:6px; } .ea-c { display:flex; gap:9px; align-items:flex-start; padding:9px 11px; border-radius:10px; border:1px solid color-mix(in srgb,var(--c) 45%,transparent); background:color-mix(in srgb,var(--c) 8%,transparent); }
.ea-c svg { width:18px; height:18px; flex:none; color:var(--c); margin-top:1px; }
.alert.ok { border-color:color-mix(in srgb,var(--ok) 50%,transparent); }
/* Tableau 3D */
.t3-scene { perspective:1400px; display:grid; place-items:center; min-height:520px; cursor:grab; touch-action:none; padding:40px 0; overflow:hidden; }
.t3-box { position:relative; transform-style:preserve-3d; transition:transform .05s; }
.t3-f { position:absolute; left:0; top:0; backface-visibility:hidden; }
.t3-front { background:linear-gradient(180deg,#F8FAFC,#E5E7EB); border-radius:8px; padding:20px; display:grid; gap:12px; align-content:start; box-shadow:inset 0 0 0 2px #9CA3AF; }
.t3-back { background:#CBD5E1; border-radius:8px; } .t3-side { background:linear-gradient(90deg,#D1D5DB,#E5E7EB); }
.t3-row { display:flex; height:80px; background:#CBD5E1; border-radius:4px; padding:3px 0; box-shadow:inset 0 -3px 0 #94A3B8; }
.t3-mod { position:relative; height:74px; background:#fff; border:1px solid #94A3B8; border-radius:3px; display:grid; justify-items:center; align-content:start; padding-top:4px; font:700 9px Arial,sans-serif; color:#111827; box-sizing:border-box; }
.t3-mod i { width:9px; height:20px; border-radius:2px; background:#111827; margin:3px 0 4px; box-shadow:0 2px 0 #374151; }
.t3-mod em { font-style:normal; font-size:10px; } .t3-id { background:#E0F2FE; } .t3-id i { background:#0369A1; } .t3-parafoudre { background:#FEF3C7; } .t3-contacteur, .t3-telerupteur { background:#EDE9FE; }
.t3-vide { background:transparent; border:1px dashed #94A3B8; }
.t3-door { position:absolute; left:0; top:0; transform-origin:left center; border-radius:8px; background:rgba(148,163,184,.28); border:2px solid #9CA3AF; backdrop-filter:blur(1px); transition:transform .5s; pointer-events:none; }
@media (max-width:820px) {
  .ea-plan { grid-template-columns:1fr; grid-template-rows:auto 1fr; }
  .ea-side { border-right:0; border-bottom:1px solid var(--line); max-height:38vh; }
  .ea-pal { grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); }
  .ea-top .btn span { display:none; }
  .t3-scene { min-height:380px; } .t3-box { transform-origin:center; scale:.7; }
}
/* Calculs & guides électricité, photovoltaïque */
.eo-tabs { display:flex; gap:6px; flex-wrap:wrap; }
.eo-tabs button, .eo-gl button { background:var(--panel); border:1px solid var(--line); color:var(--fg2); padding:8px 13px; border-radius:10px; font:inherit; font-weight:600; cursor:pointer; text-align:left; }
.eo-tabs button.on, .eo-gl button.on { color:var(--fg); border-color:#FACC15; background:color-mix(in srgb,#FACC15 14%,transparent); }
.eo-calcs { display:grid; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)); gap:12px; }
.eo-calc { padding:14px; } .eo-calc h3 { margin:0 0 4px; font-size:15px; } .eo-calc p { margin:0 0 10px; }
.eo-res { display:grid; gap:4px; margin-top:10px; padding:10px 12px; border-radius:10px; background:color-mix(in srgb,#FACC15 8%,transparent); border:1px solid color-mix(in srgb,#FACC15 30%,transparent); }
.eo-res div { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; } .eo-res span { color:var(--fg2); }
.eo-guides { display:grid; grid-template-columns:260px 1fr; gap:14px; align-items:start; }
.eo-gl { display:grid; gap:6px; position:sticky; top:8px; }
.eo-ga h2 { margin:0 0 10px; } .eo-ga h3 { margin:16px 0 6px; font-size:15px; }
.eo-schema { overflow:auto; margin:6px 0 10px; }
.eo-pv { display:grid; gap:10px; }
@media (max-width:760px) { .eo-guides { grid-template-columns:1fr; } .eo-gl { position:static; grid-template-columns:1fr 1fr; } .eo-calcs { grid-template-columns:1fr; } }
/* Réponses aux clients */
.am-modes { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:8px; }
.am-mode { display:grid; gap:4px; padding:11px 12px; border:1px solid var(--line); border-radius:12px; cursor:pointer; }
.am-mode input { position:absolute; opacity:0; pointer-events:none; } .am-mode span { color:var(--fg2); font-size:13px; }
.am-mode.on { border-color:var(--acc); background:color-mix(in srgb,var(--acc) 10%,transparent); }
.am-list { display:grid; gap:10px; } .am-it { padding:14px; } .am-h { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.am-q { color:var(--fg2); font-style:italic; margin:8px 0; font-size:13.5px; } .am-pre { white-space:pre-wrap; font:inherit; font-size:13.5px; margin:6px 0 0; }
/* Signaler un problème */
.pills { display:flex; flex-wrap:wrap; gap:6px; }
.pill { padding:7px 12px; border-radius:99px; border:1px solid var(--line2); background:transparent; color:var(--fg2); cursor:pointer; font:inherit; font-weight:600; font-size:13px; }
.pill.on { border-color:var(--acc); color:var(--fg); background:color-mix(in srgb,var(--acc) 15%,transparent); }
.sg-etapes { display:grid; gap:5px; padding:10px 12px; border-radius:12px; border:1px solid var(--line); background:var(--bg2,transparent); }
.sg-etapes b { font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--mute); margin-top:6px; }
.sg-l { display:flex; gap:8px; align-items:flex-start; font-size:13.5px; } .sg-l svg { width:16px; height:16px; flex:none; margin-top:2px; }
.sg-l.ok svg { color:var(--ok); } .sg-l.ko svg { color:var(--warn); }
.sg-q { margin-top:10px; display:grid; gap:8px; } .btn.ok-b { border-color:var(--ok); }
.inline-i { width:14px; height:14px; vertical-align:-2px; }
/* 1.8.1 : documents du dossier, usage, conseils photo */
.dd-sec { border:1px solid var(--line); border-radius:12px; padding:8px 12px; margin-bottom:10px; background:var(--panel); }
.dd-sec > summary { cursor:pointer; display:flex; align-items:center; gap:8px; list-style:none; } .dd-sec > summary svg { width:18px; height:18px; }
.dd-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:8px; margin-top:8px; }
.dd-it { display:flex; gap:10px; align-items:center; padding:8px; border:1px solid var(--line); border-radius:10px; text-decoration:none; color:var(--fg); min-width:0; }
.dd-it img, .dd-ic { width:46px; height:46px; border-radius:8px; object-fit:cover; flex:none; display:grid; place-items:center; background:var(--bg2,#0B0D10); }
.dd-it span { display:grid; min-width:0; } .dd-it b { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:13.5px; } .dd-it small { color:var(--mute); font-size:12px; }
.dd-pick { display:flex; gap:10px; align-items:flex-start; padding:8px 10px; border:1px solid var(--line); border-radius:10px; cursor:pointer; } .dd-pick span { display:grid; } .dd-pick small { color:var(--mute); }
.usage-bar { position:fixed; left:12px; right:12px; bottom:calc(14px + env(safe-area-inset-bottom,0px)); z-index:1500; display:flex; gap:10px; align-items:center; padding:12px 14px; border-radius:14px; background:#7F1D1D; color:#fff; box-shadow:0 10px 30px rgba(0,0,0,.4); font-weight:600; }
.usage-bar svg { width:20px; height:20px; flex:none; } .usage-bar span { flex:1; } .usage-bar .btn { color:#fff; border-color:rgba(255,255,255,.5); }
.cam-conseil { display:flex; gap:8px; align-items:flex-start; padding:9px 11px; border-radius:10px; background:color-mix(in srgb,var(--warn) 14%,transparent); border:1px solid color-mix(in srgb,var(--warn) 45%,transparent); font-size:13.5px; } .cam-conseil svg { width:16px; height:16px; flex:none; margin-top:2px; }
/* Caméras & Wi-Fi */
.cf-leg { display:flex; flex-wrap:wrap; gap:10px 16px; padding:8px 12px; border-top:1px solid var(--line); font-size:12.5px; color:var(--fg2); }
.cf-leg i { display:inline-block; width:12px; height:12px; border-radius:3px; margin-right:5px; vertical-align:-2px; }
.cf-mur { cursor:pointer; } .cf-mur.sel { stroke-dasharray:10 5; }
.cf-poignee { fill:#E11D35; stroke:#fff; stroke-width:3; cursor:grab; }
.cf-recette { display:grid; gap:8px; } .inp.sm { font-size:13px; }
/* Suivi des téléphones */
.st-batt { display:inline-block; width:34px; height:13px; border:1.5px solid var(--fg2); border-radius:3px; padding:1px; vertical-align:-2px; position:relative; }
.st-batt i { display:block; height:100%; background:var(--c); border-radius:1px; }
.st-al { display:flex; gap:5px; align-items:center; color:var(--warn); font-size:12px; margin-top:3px; } .st-al svg { width:14px; height:14px; }
.st-sem { display:flex; gap:3px; } .st-sem span { width:20px; height:20px; border-radius:5px; display:grid; place-items:center; font-size:10.5px; font-weight:700; background:color-mix(in srgb,var(--bad) 18%,transparent); color:var(--fg2); }
.st-sem span.on { background:color-mix(in srgb,var(--ok) 30%,transparent); color:var(--fg); }
.pill input[hidden] { display:none; }

/* ===== 1.9 : bureau ===== */
.l19-ban { position: sticky; top: 0; z-index: 900; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 8px 14px; background: #7C2D12; color: #fff; font-size: 13px; }
.l19-ban .btn { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.3); }
.l19-jour { padding: 14px; margin-bottom: 14px; }
a.l19-k { text-decoration: none; color: inherit; border-left: 3px solid var(--c, var(--line)); }
a.l19-k b { color: var(--c); }
.l19-comp { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .l19-comp { grid-template-columns: 1fr; } }
.l19-bar { height: 7px; background: var(--line, #e5e7eb); border-radius: 4px; overflow: hidden; margin: 2px 0; }
.l19-bar i { display: block; height: 100%; background: #94A3B8; }
.l19-bar.b i { background: #8B5CF6; }
.l19-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.l19-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
@media (max-width: 860px) { .l19-2col { grid-template-columns: 1fr; } }
/* ===== 1.9 : métiers ===== */
.tache.tache-lot { grid-template-columns: minmax(140px, 1.3fr) minmax(110px, 1fr) 132px 132px 110px 46px auto; }
@media (max-width: 900px) { .tache.tache-lot { grid-template-columns: 1fr 1fr; } .tache.tache-lot input[type=range] { grid-column: 1 / 2; } }
.gantt { color: var(--fg, #111827); max-width: 100%; }
.rs-item { display: grid; grid-template-columns: 84px 1fr auto; gap: 10px; align-items: center; padding: 10px; border-left: 3px solid var(--warn); }
.rs-item.ok { border-left-color: var(--ok); opacity: .85; }
.rs-item img, .rs-ph { width: 84px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--bg2, #f1f5f9); display: grid; place-items: center; }
@media (max-width: 600px) { .rs-item { grid-template-columns: 64px 1fr; } .rs-item img, .rs-ph { width: 64px; height: 52px; } .rs-item > .row { grid-column: 1 / -1; } }
.dg-box { padding: 14px; display: grid; gap: 8px; }
.dg-box details { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 8px 10px; }
.dg-pt { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px dashed var(--line, #e5e7eb); }
.dg-pt > input { grid-column: 2 / -1; }
.dg-pt.nc > span:nth-child(2) { color: var(--bad); font-weight: 600; }
.dg-pt.ok > span:nth-child(2) { color: var(--ok); }
@media (max-width: 640px) { .dg-pt { grid-template-columns: 30px 1fr; } .dg-pt > .row { grid-column: 1 / -1; } }
.pv-mois { padding: 14px; display: grid; gap: 10px; }
.pv-graph { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; }
.pv-m { display: grid; justify-items: center; gap: 2px; font-size: 11px; }
.pv-m b { font-size: 10px; }
.pv-bars { height: 110px; width: 100%; display: flex; gap: 2px; align-items: flex-end; justify-content: center; }
.pv-bars i { display: block; width: 42%; border-radius: 3px 3px 0 0; }
.pv-bars i.p, .pv-leg.p { background: #F59E0B; }
.pv-bars i.c, .pv-leg.c { background: #60A5FA; }
.pv-leg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
.dm-box { padding: 12px; display: grid; gap: 10px; }
.dm-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.dm-tbl input.inp { min-width: 0; padding: 4px 6px; }
.dm-tbl input.num { width: 54px; text-align: center; }
.dm-tbl td:first-child input { min-width: 120px; }
.dm-scen { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 6px; padding: 8px; }
.dm-scen textarea { grid-column: 1 / 3; }
@media (max-width: 640px) { .dm-scen { grid-template-columns: 1fr auto; } .dm-scen > input:nth-child(2), .dm-scen textarea { grid-column: 1 / -1; } }
.dm-code { background: #0F172A; color: #E2E8F0; padding: 12px; border-radius: 10px; font-size: 12px; max-height: 420px; overflow: auto; white-space: pre; }
/* bouton « Installer l'application » (techniciens, superviseurs) */
.dc-inst { position: fixed; z-index: 950; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); width: min(560px, calc(100% - 24px)); display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--panel, #111827); color: var(--fg, #fff); border: 2px solid var(--acc, #2EE6C9); box-shadow: 0 12px 34px rgba(0,0,0,.35); animation: dcInst 2.4s ease-in-out infinite; }
.dc-inst-t { display: grid; gap: 2px; flex: 1; min-width: 0; } .dc-inst-t span { font-size: 12.5px; color: var(--mute); }
.dc-inst .btn { white-space: nowrap; }
@keyframes dcInst { 0%,100% { box-shadow: 0 12px 34px rgba(0,0,0,.35); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--acc, #2EE6C9) 30%, transparent), 0 12px 34px rgba(0,0,0,.35); } }
@media (max-width: 520px) { .dc-inst { flex-direction: column; align-items: stretch; text-align: center; } }
body.dc-inst-on #view { padding-bottom: 110px; }
/* ===== Vue satellite & 3D ===== */
.vs-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px 1fr; }
.vs-side { border-right: 1px solid var(--line); overflow: auto; padding: 10px; display: grid; gap: 10px; align-content: start; background: var(--panel); }
.vs-map { min-height: 300px; background: #111827; }
.vs-map.vs-dessin { cursor: crosshair; } .vs-map.vs-dessin .leaflet-interactive { cursor: crosshair; }
.vs-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.vs-t { display: grid; justify-items: center; gap: 2px; padding: 7px 2px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: inherit; font-size: 10.5px; cursor: pointer; }
.vs-t.on { background: var(--acc); color: #04201B; border-color: var(--acc); }
.vs-t svg { width: 18px; height: 18px; }
.vs-card { padding: 10px; display: grid; gap: 8px; }
.vs-r { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; border-bottom: 1px dashed var(--line); padding: 3px 0; }
.vs-list { display: grid; gap: 3px; margin-top: 6px; max-height: 220px; overflow: auto; }
.vs-it { display: flex; gap: 8px; align-items: center; text-align: left; padding: 5px 6px; border-radius: 8px; border: 0; background: transparent; color: inherit; font-size: 12.5px; cursor: pointer; }
.vs-it.on, .vs-it:hover { background: color-mix(in srgb, var(--acc) 15%, transparent); }
.vs-it i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.vs-search { display: flex; gap: 4px; } .vs-search .inp { width: 220px; }
.vs-lab { background: rgba(17,24,39,.82); color: #fff; border: 0; font-weight: 700; font-size: 11.5px; box-shadow: none; padding: 2px 6px; }
.vs-lab::before { display: none; }
.vs3d { position: fixed; inset: 0; z-index: 70; background: #0B1220; display: flex; flex-direction: column; }
.vs3d-c { flex: 1; width: 100%; min-height: 0; touch-action: none; cursor: grab; }
.vs3d-leg { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: #E2E8F0; background: rgba(15,23,42,.7); padding: 6px 10px; border-radius: 10px; }
.vs3d-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
@media (max-width: 760px) { .vs-body { grid-template-columns: 1fr; grid-template-rows: 55% 45%; } .vs-body .vs-side { order: 2; border-right: 0; border-top: 1px solid var(--line); } .vs-search .inp { width: 130px; } }
.vs-pion { border-radius: 50%; background: var(--c); border: 2px solid #111827; box-shadow: 0 0 0 2px rgba(255,255,255,.7); cursor: grab; }
/* ===== Sécurité des techniciens ===== */
.sec-card { padding: 12px; display: grid; gap: 6px; border-left: 3px solid var(--bad); }
.sec-l { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-top: 1px dashed var(--line); }
.sec-l > svg { color: var(--c); flex: none; margin-top: 2px; }
.sec-ph { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; margin-top: 4px; }
.sec-tbl td, .sec-tbl th { vertical-align: top; }
.sec-tbl select { min-width: 110px; }
/* 1.10 — outils par domaine et outils modernes */
.g-tbl td { padding: 4px; }
.g-tbl .inp.sm { min-width: 70px; }
.pw-wrap { overflow: auto; -webkit-overflow-scrolling: touch; }
.pw { border-collapse: separate; border-spacing: 4px; min-width: 860px; width: 100%; }
.pw th { font-size: 12px; text-align: left; position: sticky; top: 0; background: var(--bg); }
.pw th.auj { color: var(--acc); }
.pw tbody th { position: sticky; left: 0; z-index: 1; min-width: 110px; }
.pw-c { vertical-align: top; background: var(--bg2); border-radius: 8px; padding: 6px; min-width: 120px; min-height: 60px; transition: outline .1s; }
.pw-c.ov { outline: 2px dashed var(--acc); }
.pw-bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; margin-bottom: 2px; }
.pw-bar i { display: block; height: 100%; }
.pw-job { display: grid; gap: 1px; font-size: 11px; background: var(--panel); border-left: 3px solid var(--c); border-radius: 6px; padding: 4px 6px; margin-top: 4px; cursor: grab; user-select: none; }
.pw-job b { font-size: 12px; }
.pw-job.sel { outline: 2px solid var(--acc); }
.pw-libres { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; }
.pastille-sig { margin-left: auto; }
.pw-libres { max-height: 190px; overflow: auto; }

/* ===== 1.10 — Apparence au choix de l'utilisateur (palettes, densité, police, coins, menu) ===== */
:root[data-palette="nuit"] { --bg: #0B1220; --bg2: #0F172A; --panel: #131C2E; --panel2: #18233A; --line: #22304A; --line2: #2E3E5C; --fg: #E6EDF7; --fg2: #A9B6CC; --mute: #7A8AA6; --acc: #5EA2FF; --acc-ink: #06101F; --grid: rgba(94,162,255,.04); --glow: 0 0 0 1px rgba(94,162,255,.3), 0 10px 30px -12px rgba(94,162,255,.5); }
:root[data-palette="graphite"] { --bg: #18181B; --bg2: #1F1F23; --panel: #27272A; --panel2: #2F2F33; --line: #3A3A40; --line2: #4A4A52; --fg: #F4F4F5; --fg2: #C4C4CC; --mute: #8E8E99; --acc: #E4E4E7; --acc-ink: #18181B; --grid: rgba(255,255,255,.025); --glow: 0 0 0 1px rgba(255,255,255,.15), 0 10px 30px -14px rgba(0,0,0,.8); }
:root[data-palette="foret"] { --bg: #0E1512; --bg2: #121C17; --panel: #17241E; --panel2: #1C2C25; --line: #26392F; --line2: #33493D; --fg: #E8F2EC; --fg2: #A9C2B3; --mute: #7D968A; --acc: #3DD68C; --acc-ink: #06140D; --grid: rgba(61,214,140,.035); --glow: 0 0 0 1px rgba(61,214,140,.3), 0 10px 30px -12px rgba(61,214,140,.45); }
:root[data-palette="ocean"] { --bg: #EFF5FA; --bg2: #E4EDF5; --panel: #FFFFFF; --panel2: #F5F9FC; --line: #D9E4EE; --line2: #C3D3E2; --fg: #12202E; --fg2: #3E5165; --mute: #6F8396; --acc: #1F63D6; --acc-ink: #FFFFFF; --glow: 0 6px 18px -8px rgba(31,99,214,.45); }
:root[data-palette="sable"] { --bg: #F6F1E8; --bg2: #EEE7DA; --panel: #FFFDF8; --panel2: #FAF5EC; --line: #E5DCCB; --line2: #D6CAB3; --fg: #2A251D; --fg2: #5A5143; --mute: #8A7F6C; --acc: #B45309; --acc-ink: #FFFFFF; --glow: 0 6px 18px -8px rgba(180,83,9,.45); }
:root[data-palette="contraste"] { --bg: #000000; --bg2: #0A0A0A; --panel: #000000; --panel2: #111111; --line: #FFFFFF; --line2: #FFFFFF; --fg: #FFFFFF; --fg2: #FFFFFF; --mute: #E0E0E0; --acc: #FFD60A; --acc-ink: #000000; --ok: #4ADE80; --warn: #FFD60A; --bad: #FF6B6B; --info: #7CC4FF; --grid: transparent; --glow: 0 0 0 2px #FFD60A; }
:root[data-palette="contraste"] .btn, :root[data-palette="contraste"] .inp, :root[data-palette="contraste"] .card { border-width: 2px; }
:root[data-police="systeme"] { --f-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --f-display: system-ui, -apple-system, "Segoe UI", sans-serif; }
:root[data-police="lisible"] { --f-body: Verdana, Tahoma, "DejaVu Sans", sans-serif; --f-display: Verdana, Tahoma, sans-serif; }
:root[data-police="lisible"] body { letter-spacing: .01em; line-height: 1.6; }
:root[data-police="arrondie"] { --f-body: "Trebuchet MS", "Segoe UI Rounded", "Nunito", system-ui, sans-serif; --f-display: "Trebuchet MS", "Segoe UI Rounded", system-ui, sans-serif; }
:root[data-coins="carres"] { --r: 4px; --r-s: 3px; }
:root[data-coins="doux"] { --r: 22px; --r-s: 14px; }
:root[data-coins="carres"] .modal, :root[data-coins="carres"] .pill, :root[data-coins="carres"] .chip { border-radius: 4px; }
:root[data-densite="compact"] .btn { min-height: 34px; padding: 0 12px; }
:root[data-densite="compact"] .inp { min-height: 34px; }
:root[data-densite="compact"] .card { padding: 12px; }
:root[data-densite="compact"] .tbl td, :root[data-densite="compact"] .tbl th { padding: 6px 9px; }
:root[data-densite="compact"] .nav a { padding: 6px 10px; }
:root[data-densite="compact"] .content { gap: 12px; padding-top: 14px; }
:root[data-densite="aere"] .btn { min-height: 48px; padding: 0 20px; }
:root[data-densite="aere"] .card { padding: 24px; }
:root[data-densite="aere"] .tbl td { padding: 15px 14px; }
:root[data-densite="aere"] .nav a { padding: 12px 10px; }
:root[data-densite="aere"] .content { gap: 24px; }
:root[data-grille="off"] { --grid: transparent; }
:root[data-motion="off"] *, :root[data-motion="off"] *::before, :root[data-motion="off"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
:root[data-largeur="pleine"] .content { max-width: none; }
@media (min-width: 961px) {
  :root[data-menu="compact"] .shell { grid-template-columns: 76px minmax(0, 1fr); }
  :root[data-menu="compact"] .side { padding: 14px 8px; }
  :root[data-menu="compact"] .side .brand > div, :root[data-menu="compact"] .nav a span:not(.badge), :root[data-menu="compact"] .nav-sec, :root[data-menu="compact"] .esp-tx, :root[data-menu="compact"] .esp-ch, :root[data-menu="compact"] .side-foot .hint, :root[data-menu="compact"] .side-foot .btn span { display: none; }
  :root[data-menu="compact"] .nav a { justify-content: center; padding: 10px 0; }
  :root[data-menu="compact"] .nav-sec { display: block; height: 1px; background: var(--line); margin: 8px 6px; padding: 0; font-size: 0; }
  :root[data-menu="compact"] .esp-sw { justify-content: center; padding: 8px 0; }
  :root[data-menu="compact"] .side-foot .row { flex-direction: column; }
}
.ap { display: grid; gap: 12px; }
.ap-t { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); font-weight: 700; margin-bottom: 6px; }
.ap-pals { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.ap-pal { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 8px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--panel2); color: var(--fg); cursor: pointer; }
.ap-pal small { color: var(--mute); font-size: 11px; line-height: 1.3; }
.ap-pal.on { border-color: var(--acc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--acc) 40%, transparent); }
.ap-ap { position: relative; width: 100%; height: 38px; border-radius: 8px; border: 1px solid rgba(128,128,128,.35); overflow: hidden; }
.ap-ap i { position: absolute; left: 10%; top: 22%; width: 55%; height: 56%; border-radius: 5px; }
.ap-ap em { position: absolute; right: 10%; top: 34%; width: 18%; height: 32%; border-radius: 99px; }
.ap-accs { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-acc { position: relative; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line2); background: var(--c); cursor: pointer; display: grid; place-items: center; color: var(--fg2); }
.ap-acc svg { width: 16px; height: 16px; }
.ap-acc.on { outline: 3px solid var(--fg); outline-offset: 2px; }
.ap-perso input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ap-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line2); border-radius: var(--r-s); overflow: hidden; }
.ap-seg button { border: 0; background: var(--panel2); color: var(--fg2); padding: 7px 11px; cursor: pointer; font-size: 13px; }
.ap-seg button + button { border-left: 1px solid var(--line2); }
.ap-seg button.on { background: var(--acc); color: var(--acc-ink); font-weight: 600; }

/* ===== 1.10 — Navigation entre les domaines ===== */
.esp-sw { display: flex; align-items: center; gap: 10px; width: calc(100% - 8px); margin: 2px 4px 10px; padding: 10px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--c) 20%, var(--panel)), var(--panel)); color: var(--fg); cursor: pointer; text-align: left; transition: transform .12s, box-shadow .15s; }
.esp-sw:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 24px -14px var(--c); }
.esp-sw:disabled { cursor: default; }
.esp-ic { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 85%, #000 0%); color: #fff; box-shadow: 0 6px 16px -8px var(--c); }
.esp-ic svg { width: 20px; height: 20px; }
.esp-tx { display: grid; min-width: 0; flex: 1; line-height: 1.25; }
.esp-tx small { font-size: 10.5px; color: var(--mute); letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.esp-tx b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.esp-st { font-size: 11.5px; color: var(--fg2); }
.esp-ch svg { width: 18px; height: 18px; color: var(--mute); }
.esp-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 8px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--fg); font-weight: 600; font-size: 13px; cursor: pointer; margin-left: 8px; white-space: nowrap; }
.esp-chip svg { width: 15px; height: 15px; color: var(--c); }
.esp-chip svg:last-child { color: var(--mute); }
@media (max-width: 960px) { .esp-chip { margin-left: 4px; padding: 0 6px; gap: 2px; } .esp-chip span { display: none; } }
.esp-pal { grid-template-columns: minmax(0, 1fr); justify-items: center; position: fixed; inset: 0; z-index: 3600; background: rgba(3,6,12,.6); backdrop-filter: blur(6px); display: grid; place-items: start center; padding: 9vh 16px 16px; animation: fade .15s; }
.esp-pal.out { opacity: 0; transition: opacity .15s; }
.esp-box { width: min(620px, 100%); background: var(--panel); border: 1px solid var(--line2); border-radius: 20px; box-shadow: var(--shadow); padding: 14px; animation: pop .18s; }
.esp-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 4px 6px 12px; }
.esp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.esp-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel2); color: var(--fg); cursor: pointer; text-align: left; position: relative; transition: border-color .12s, transform .12s, background .12s; }
.esp-card .esp-tx small { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; }
.esp-card:hover, .esp-card.sel { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--panel2)); transform: translateY(-1px); }
.esp-card.cur::after { content: ''; position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
.esp-card kbd { position: absolute; bottom: 8px; right: 10px; font: 600 10px var(--f-mono); color: var(--mute); border: 1px solid var(--line2); border-radius: 5px; padding: 1px 5px; }
@media (max-width: 960px) { .esp-pal { place-items: end center; padding: 0; } .esp-cards { grid-template-columns: 1fr; } .esp-box { width: 100%; border-radius: 20px 20px 0 0; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); max-height: 80vh; overflow: auto; } .esp-card kbd { display: none; } }
.esp-trans { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; pointer-events: none; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--c) 40%, transparent), color-mix(in srgb, var(--bg) 85%, transparent) 70%); animation: fade .18s; transition: opacity .4s; }
.esp-trans.out { opacity: 0; }
.esp-trans > div { display: grid; justify-items: center; gap: 10px; animation: pop .25s; }
.esp-trans .esp-ic { width: 64px; height: 64px; border-radius: 20px; }
.esp-trans .esp-ic svg { width: 34px; height: 34px; }
.esp-trans b { font: 700 22px var(--f-display); }
/* 1.10 — chefs d'équipe et contrôle qualité */
.eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.eq-card { display: grid; gap: 8px; padding: 14px; }
.eq-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.eq-dos { display: grid; gap: 4px; }
.eq-d { display: grid; grid-template-columns: auto auto 1fr; gap: 2px 8px; text-align: left; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); border-left: 3px solid var(--c); background: var(--panel2); color: var(--fg); cursor: pointer; font-size: 13px; }
.eq-d span { color: var(--c); font-weight: 600; justify-self: end; }
.eq-d small { grid-column: 1 / -1; color: var(--mute); }
.ctl-l { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ctl-l .inp { grid-column: 1 / -1; }
.ctl-b { display: flex; gap: 4px; }
.ctl-b .pill { min-width: 40px; justify-content: center; }
.ctl-b .pill.on { background: var(--c); color: #fff; border-color: var(--c); }
@media (max-width: 600px) { .ctl-l { grid-template-columns: 1fr; } }
/* 1.10 — outils d'ingénierie */
.ing-map { position: fixed; inset: 0; z-index: 3700; background: var(--bg); display: grid; grid-template-rows: auto 1fr; }
.ing-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.ing-m { min-height: 0; }
.sig-body { display: grid; grid-template-columns: 300px 1fr; min-height: 0; }
.sig-body .ing-m { height: 100%; }
.sig-side { overflow: auto; padding: 10px; border-right: 1px solid var(--line); background: var(--panel); display: grid; gap: 10px; align-content: start; }
.sig-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.sig-tools .pill i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; }
@media (max-width: 760px) { .sig-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .sig-side { max-height: 38vh; border-right: 0; border-bottom: 1px solid var(--line); } }
.app-t { position: relative; text-decoration: none; }
.app-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--acc); color: var(--acc-ink); font-weight: 800; }
.app-x { position: absolute; top: 6px; right: 6px; }
.vs3d-h { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.vs3d-h input { width: 110px; }

/* 1.10 calculs terrain */
.alert.bad { --c: var(--bad); } .alert.ok { --c: var(--ok); } .alert.info { --c: var(--info); }
.ct-sw { display:inline-block; width:14px; height:14px; border-radius:50%; background:var(--sw); border:1px solid var(--swb, color-mix(in srgb, var(--sw) 70%, #000)); vertical-align:-2px; flex:none; }
.ct-res { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:8px; }
.ct-r { display:flex; gap:10px; align-items:center; padding:8px 10px; border:1px solid var(--line); border-radius:10px; }
.ct-r .ct-sw { width:26px; height:26px; border-radius:8px; }
.ct-r div { display:grid; } .ct-cl { font-size:18px; }
.ct-zone svg { width:100%; height:auto; margin-top:10px; border-radius:10px; }
.ct-chk { display:grid; gap:6px; } .ct-q { display:flex; justify-content:space-between; gap:10px; align-items:center; padding:8px 10px; border:1px solid var(--line); border-radius:10px; flex-wrap:wrap; }
.ct-q > span { flex:1 1 240px; min-width:0; }
.ct-urg { display:flex; gap:8px; flex-wrap:wrap; }
.ct-4a { padding:10px 12px; } .ct-4a ul { margin:6px 0 0; display:grid; gap:4px; }
.ct-n { display:inline-grid; place-items:center; width:22px; height:22px; border-radius:50%; background:var(--bad); color:#fff; font-size:12px; margin-right:8px; }
.ct-big { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:8px; }
.ct-big > div { display:grid; gap:4px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--bg2, transparent); }
.ct-big b { font-size:16px; display:flex; gap:6px; align-items:center; flex-wrap:wrap; } .ct-big .ct-sw { width:20px; height:20px; }
.ct-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(64px,1fr)); gap:4px; margin-top:8px; }
.ct-p, .ct-f { position:relative; display:flex; gap:3px; align-items:center; justify-content:center; padding:5px 4px; border:1px solid var(--line); border-radius:8px; background:var(--panel); color:inherit; cursor:pointer; font-size:12px; }
.ct-p.on, .ct-f.on { outline:2px solid var(--accent, #D7192F); }
.ct-g { position:absolute; left:-3px; top:3px; bottom:3px; width:2px; background:var(--accent,#D7192F); }
.ct-12 { display:grid; grid-template-columns:repeat(auto-fill,minmax(70px,1fr)); gap:6px; }
.ct-12 > div { display:grid; justify-items:center; gap:2px; padding:6px; border:1px solid var(--line); border-radius:10px; } .ct-12 .ct-sw { width:22px; height:22px; }
.ct-tubes { display:grid; gap:6px; margin-top:8px; } .ct-tube { display:flex; flex-wrap:wrap; gap:3px; align-items:center; }
.ct-th { min-width:54px; font-weight:600; display:flex; gap:4px; align-items:center; font-size:12px; }
.ct-f { flex-direction:column; padding:3px 4px; min-width:30px; }
.ct-bar { position:relative; display:flex; height:16px; border-radius:8px; overflow:hidden; background:var(--line); }
.ct-bar i { position:absolute; top:-2px; bottom:-2px; width:2px; background:var(--text,#111); }
.ct-otdr { width:100%; height:auto; border-radius:10px; }
.ct-zone svg { max-width:760px; display:block; }
.ct-grid { grid-template-columns:repeat(auto-fill,minmax(76px,1fr)); }
.ct-p span { white-space:nowrap; }

/* 1.10.1 parapheur et contrats */
.par-liste { display:grid; gap:10px; }
.par-c { padding:14px; }
.par-urg { border-color:color-mix(in srgb, var(--acc, #D7192F) 55%, var(--line)); box-shadow:0 0 0 1px color-mix(in srgb, var(--acc, #D7192F) 30%, transparent); }
.par-sigs { display:grid; gap:6px; margin-top:10px; }
.par-s { display:flex; justify-content:space-between; gap:8px; align-items:center; flex-wrap:wrap; padding:8px 10px; border:1px solid var(--line); border-radius:10px; }
.par-s > div:first-child { min-width:0; }
.par-apercu { max-height:55vh; overflow:auto; border:1px solid var(--line); border-radius:10px; padding:8px; background:color-mix(in srgb, var(--mute) 12%, transparent); }
.par-page { width:100%; height:auto; display:block; margin:0 0 8px; background:#fff; border-radius:4px; box-shadow:0 1px 4px rgba(0,0,0,.18); }
.par-row { padding:10px; }
.par-place { position:relative; max-height:65vh; overflow:auto; border:1px solid var(--line); border-radius:10px; }
.par-place canvas { width:100%; height:auto; display:block; cursor:crosshair; background:#fff; }
.par-place [data-z] { position:absolute; inset:0; pointer-events:none; }
.par-zone { position:absolute; border:2px dashed #2563EB; background:rgba(37,99,235,.12); color:#1E3A8A; font:600 11px system-ui; padding:2px 4px; border-radius:4px; overflow:hidden; }
.par-zone.cachet { border-color:#DC2626; background:rgba(220,38,38,.12); color:#7F1D1D; }
.par-damier { min-height:120px; display:grid; place-items:center; border-radius:10px; border:1px solid var(--line); background-color:#fff; background-image:linear-gradient(45deg,#e5e7eb 25%,transparent 25%),linear-gradient(-45deg,#e5e7eb 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e5e7eb 75%),linear-gradient(-45deg,transparent 75%,#e5e7eb 75%); background-size:16px 16px; background-position:0 0,0 8px,8px -8px,-8px 0; }
.ctr-doc { padding:16px; font-size:14px; line-height:1.55; }
.ctr-doc p { margin:0 0 10px; white-space:pre-wrap; }
.ctr-art { display:grid; gap:4px; margin:0 0 12px; }
.ctr-art textarea { font-size:14px; line-height:1.5; }

.dir-cpt { display:flex; gap:14px; align-items:center; padding:14px; border-left:4px solid var(--ok); }
.dir-cpt-n { display:grid; justify-items:center; min-width:72px; }
.dir-cpt-n b { font-size:34px; line-height:1; color:var(--ok); font-family:var(--f-display, inherit); }
.dir-cpt-n span { font-size:12px; color:var(--mute); }
.dir-cpt > div:nth-child(2) { flex:1; }
.dir-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:10px; }
.dir-t { display:flex; gap:10px; align-items:flex-start; padding:12px; color:var(--fg); text-decoration:none; border-left:4px solid var(--c); }
.dir-t svg { width:22px; height:22px; color:var(--c); flex:none; margin-top:2px; }
.dir-n { display:inline-block; margin-left:8px; padding:0 8px; border-radius:999px; background:var(--c); color:#fff; font-weight:700; font-size:13px; }

/* 1.10.1 réunions de prévention */
.pz-ov { position:fixed; inset:0; z-index:9000; background:radial-gradient(circle at 30% 20%, #16324F, #0B1220 70%); color:#F8FAFC; display:flex; flex-direction:column; outline:none; }
.pz-scene { flex:1; display:grid; place-items:center; padding:24px 5vw; overflow:auto; cursor:pointer; }
.pz-s { width:min(1100px, 100%); }
.pz-s h1 { font-size:clamp(28px, 6vw, 64px); margin:0 0 12px; line-height:1.1; }
.pz-s h2 { font-size:clamp(22px, 4vw, 44px); margin:0 0 18px; color:#FDE68A; }
.pz-s p { font-size:clamp(16px, 2.6vw, 26px); color:#CBD5E1; }
.pz-titre { text-align:center; }
.pz-s ul { margin:0; padding-left:1.1em; display:grid; gap:12px; font-size:clamp(17px, 2.8vw, 30px); line-height:1.3; }
.pz-new { animation:pz-in .55s ease both; }
.pz-corps { display:grid; gap:18px; }
.pz-imgtxt .pz-corps { grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); align-items:start; }
.pz-img { max-width:100%; max-height:55vh; border-radius:14px; box-shadow:0 10px 30px rgba(0,0,0,.4); }
.pz-choix { display:grid; gap:12px; }
.pz-c { position:relative; display:flex; gap:14px; align-items:center; text-align:left; padding:14px 16px; border-radius:14px; border:2px solid rgba(255,255,255,.18); background:rgba(255,255,255,.06); color:inherit; font-size:clamp(16px, 2.4vw, 26px); cursor:pointer; overflow:hidden; }
.pz-c b { display:inline-grid; place-items:center; width:1.8em; height:1.8em; border-radius:50%; background:#FDE68A; color:#0B1220; flex:none; }
.pz-c.on { border-color:#38BDF8; background:rgba(56,189,248,.18); }
.pz-c.bon { border-color:#22C55E; background:rgba(34,197,94,.22); }
.pz-c i { position:absolute; left:0; bottom:0; height:4px; width:var(--p); background:#38BDF8; font-style:normal; font-size:0; }
.pz-c i::after { content:attr(data-n); }
.pz-bar { display:flex; gap:8px; align-items:center; padding:10px 14px; background:rgba(0,0,0,.35); flex-wrap:wrap; }
.pz-bar .hint { color:#CBD5E1; }
.pz-num { font-weight:700; }
.pz-note { padding:0 16px 6px; color:#94A3B8; font-size:13px; min-height:6px; }
.pz-tech .pz-note { display:none; }
.pz-prog { height:4px; background:rgba(255,255,255,.12); } .pz-prog i { display:block; height:100%; background:#FDE68A; transition:width .4s; }
.pz-a-fondu { animation:pz-fondu .6s ease both; } .pz-a-glisser { animation:pz-glisser .6s cubic-bezier(.2,.7,.2,1) both; } .pz-a-zoom { animation:pz-zoom .6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes pz-fondu { from { opacity:0; } to { opacity:1; } }
@keyframes pz-glisser { from { opacity:0; transform:translateX(60px); } to { opacity:1; transform:none; } }
@keyframes pz-zoom { from { opacity:0; transform:scale(.85); } to { opacity:1; transform:none; } }
@keyframes pz-in { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce) { .pz-a-fondu, .pz-a-glisser, .pz-a-zoom, .pz-new { animation:none; } }
.pz-ed { padding:10px; display:grid; gap:8px; }
@media (max-width: 700px) { .pz-imgtxt .pz-corps { grid-template-columns:1fr; } }
.pz-ov { z-index:3000; }
.pz-cnt { margin-left:auto; font-style:normal; font-weight:700; background:#38BDF8; color:#0B1220; border-radius:999px; padding:0 10px; }
/* Badges et cartes de visite (aperçu à l'échelle 85,6 × 54 mm) */
.bdg-zone { display:flex; justify-content:center; padding:6px 0; }
.bdg { width:min(100%, 342px); aspect-ratio:85.6/54; background:#fff; color:#1A1C22; border-radius:12px; box-shadow:0 6px 22px #0003; overflow:hidden; display:flex; flex-direction:column; position:relative; font-size:11px; }
.bdg-band { background:var(--c1); color:#fff; display:flex; align-items:center; gap:8px; padding:6px 10px; min-height:22%; }
.bdg-sobre .bdg-band { background:#fff; color:var(--c1); }
.bdg-logo { max-height:26px; max-width:80px; background:#fff; border-radius:3px; padding:1px; }
.bdg-c { flex:1; display:flex; gap:10px; padding:8px 10px; align-items:flex-start; }
.bdg-ph { width:23%; aspect-ratio:54/68; background:#F3F4F6; border:1px solid #DDE1E6; display:grid; place-items:center; overflow:hidden; color:#9CA3AF; font-size:9px; }
.bdg-ph img { width:100%; height:100%; object-fit:cover; }
.bdg-t { flex:1; display:grid; gap:2px; min-width:0; }
.bdg-t > * { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bdg-n { font-size:14px; }
.bdg-f { color:var(--c2); font-weight:700; }
.bdg small { color:#6B7280; font-size:9px; }
.bdg-qr { width:22%; align-self:flex-end; }
.bdg-qr svg { width:100%; height:auto; display:block; }
.bdg-foot { height:5%; background:var(--c2); }
.bdg-sobre .bdg-foot { height:2%; }
.bdg-carte { flex-direction:row; border-left:6px solid var(--c1); padding:10px 12px; gap:8px; }
.bdg-carte .bdg-l { flex:1; display:grid; gap:3px; align-content:start; min-width:0; }
.bdg-carte .bdg-qr { width:26%; }
/* Icônes dans les titres en gras, les résumés et les lignes d'historique (sinon trop grandes) */
b > svg, strong > svg, summary svg, .timeline svg, .hint > svg, label.switch svg { width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; }
/* Bandeau d'annonce (maintenance) */
#dc-annonce { position: sticky; top: 0; z-index: 2500; display: grid; }
.dc-ann { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #B45309; color: #fff; font-size: 14px; font-weight: 600; }
.dc-ann.info { background: #1D4ED8; }
.dc-ann svg { width: 18px; height: 18px; flex: none; }
.dc-ann span { flex: 1; }
.dc-ann button { background: none; border: 0; color: inherit; cursor: pointer; padding: 2px; display: grid; place-items: center; }

/* 1.13.2 : espace « tous les domaines » : nom de l'entreprise + ses domaines */
.esp-doms { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.esp-doms i { font-style: normal; font-size: 10.5px; font-weight: 600; padding: 1px 7px 1px 6px; border-radius: 999px; color: var(--fg2); background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.esp-doms i::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
:root[data-menu="compact"] .esp-doms { display: none; }

/* 1.13.2 : repères de la carte par domaine (forme) et par état (couleur) */
.pin-dom { width: 20px; height: 20px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.65)); }
.pin-dom svg { display: block; }
.pin-dom.o { animation: pinDomO 1.2s ease-in-out infinite; }
.pin-dom.r { animation: pinDomR .7s ease-in-out infinite; }
@keyframes pinDomO { 50% { transform: scale(.82); opacity: .8; } }
@keyframes pinDomR { 50% { transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .pin-dom.o, .pin-dom.r { animation: none; } }
/* 1.13.2 : listes déroulantes dans les tableaux : le choix reste lisible */
@media (min-width: 761px) { .tbl td select.inp { min-width: 140px; } }
.esp-doms i { font-size: 10px; padding: 0 6px 0 5px; }

/* 1.13.3 : sources de dossiers par domaine */
.src-dom { border-left: 3px solid var(--c); padding: 8px 0 8px 12px; margin: 10px 0; display: grid; gap: 6px; }
.src-dh { display: flex; align-items: center; gap: 8px; } .src-dh b { color: var(--c); }
.src-it { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); }
.src-it.off { opacity: .55; }
.src-tx { display: grid; min-width: 160px; flex: 1; } .src-tx small { color: var(--mute); font-size: 12px; overflow-wrap: anywhere; }
.tile.app-t > svg { width: 34px; height: 34px; }
/* 1.13.3 : aide au marquage-piquetage (vue satellite) */
.modal.full { width: 100%; max-width: none; height: 100vh; max-height: none; border-radius: 0; display: flex; flex-direction: column; }
.modal-back:has(.modal.full) { padding: 0; }
.modal.full .modal-b { flex: 1; min-height: 0; padding: 0; overflow: hidden; display: flex; }
.trc { display: flex; flex-direction: column; flex: 1; min-height: 0; width: 100%; }
.trc-alerte { display: flex; gap: 8px; align-items: center; padding: 8px 14px; background: color-mix(in srgb, var(--warn) 18%, var(--panel)); border-bottom: 1px solid var(--line); font-size: 12.5px; }
.trc-alerte svg { flex: none; width: 18px; height: 18px; color: var(--warn); }
.trc-panneau .alert svg, .trc-bloc > b svg { width: 16px; height: 16px; vertical-align: -3px; }
.trc-corps { flex: 1; min-height: 0; display: flex; }
.trc-carte { flex: 1; min-width: 0; min-height: 300px; }
.trc-cale { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-right: 1px solid var(--line); background: var(--panel); }
.trc-plan { flex: 1; overflow: auto; background: #fff; border-radius: 10px; }
.trc-plan img { display: block; cursor: crosshair; max-width: none; }
.trc-rep { position: absolute; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; background: #EC4899; color: #fff; font: 700 12px/22px var(--f-display, sans-serif); text-align: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.5); pointer-events: none; display: inline-block; }
.leaflet-marker-icon .trc-rep { position: static; transform: none; }
.trc-panneau { width: 330px; flex: none; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; border-left: 1px solid var(--line); background: var(--panel); }
.trc-bloc { display: grid; gap: 8px; }
.trc-it { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); }
.trc-it > div:first-child { display: grid; }
.trc-leg { display: grid; gap: 4px; font-size: 11.5px; } .trc-leg span { display: flex; align-items: center; gap: 6px; } .trc-leg i { width: 18px; height: 6px; border-radius: 3px; display: inline-block; }
@media (max-width: 760px) {
  .trc-corps { flex-direction: column; }
  .trc-carte { flex: none; height: 56vh; }
  .trc-panneau { width: 100%; flex: 1; min-height: 0; border-left: 0; border-top: 1px solid var(--line); }
  .trc-alerte { font-size: 11.5px; padding: 6px 10px; }
  .trc-cale { max-height: 50vh; border-right: 0; }
}
/* 1.13.4 : outil de marquage professionnel */
.leaflet-tooltip.trc-lbl { background: transparent; border: 0; box-shadow: none; padding: 0; }
.leaflet-tooltip.trc-lbl::before { display: none; }
.trc-lbl span { display: inline-block; font: 800 11px/1 var(--f-display, sans-serif); letter-spacing: .04em; color: #fff; background: var(--c); padding: 3px 6px; border-radius: 4px; border: 1.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.6); white-space: nowrap; }
.leaflet-tooltip.trc-cote { background: #111827; color: #FDE047; border: 1px solid #FDE047; font: 700 12px/1.2 var(--f-mono, monospace); padding: 2px 6px; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.6); }
.leaflet-tooltip.trc-cote::before { display: none; }
.trc-v { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid #111827; box-shadow: 0 1px 4px rgba(0,0,0,.6); cursor: move; }
.trc-v.mi { width: 10px; height: 10px; background: rgba(255,255,255,.7); border-width: 1.5px; }
.trc-edit { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--acc); border-radius: 10px; background: color-mix(in srgb, var(--acc) 8%, var(--panel2)); }
.trc-it.on { outline: 2px solid var(--acc); }
.trc-imp-tete { display: none; }
@media print {
  body.trc-impression > *:not(.modal-back) { display: none !important; }
  body.trc-impression .modal-back { position: static; background: none; padding: 0; }
  body.trc-impression .modal.full { height: auto; }
  body.trc-impression .modal-h, body.trc-impression .trc-panneau, body.trc-impression .trc-cale, body.trc-impression .trc-alerte, body.trc-impression .leaflet-control-zoom, body.trc-impression .leaflet-control-layers { display: none !important; }
  body.trc-impression .trc-imp-tete { display: grid; gap: 2px; font: 12px/1.35 sans-serif; color: #000; padding: 0 0 6px; }
  body.trc-impression .trc-imp-tete b { font-size: 16px; }
  body.trc-impression .trc-imp-tete .leg i { display: inline-block; width: 16px; height: 5px; margin: 0 3px 0 8px; vertical-align: middle; }
  body.trc-impression .trc-corps { display: block; }
  body.trc-impression .trc-carte { width: 100%; height: 175mm !important; }
  @page { size: A4 landscape; margin: 10mm; }
}
