@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/common/fonts/plus-jakarta-sans.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/common/fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f4f5f0;
  --surface: #ffffff;
  --surface-2: #eceee6;
  --ink: #111214;
  --ink-2: #34373d;
  --muted: #5d6057;
  --line: #e3e5dc;
  --brand: #111214;
  --brand-ink: #ffffff;

  /* Identité Orange MUST • Maintenance */
  --accent: #ff7a00;
  --accent-hover: #ff8e1a;
  --accent-ink: #111214;
  --accent-dark: #c2410c;
  --accent-soft: #fff1e5;
  --accent-soft-border: #fed7aa;
  --accent-soft-ink: #9a3412;

  --ok: #22a15a;
  --ok-soft: #e5f6ea;
  --warn: #e08a1e;
  --warn-soft: #fcf0dd;
  --danger: #dc3b3b;
  --danger-soft: #fbe7e7;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 9999px;
  --shadow: 0 1px 3px rgba(17, 18, 20, .04), 0 6px 18px rgba(17, 18, 20, .05);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent-dark); text-decoration: none; }
svg[aria-hidden] { width: 18px; height: 18px; flex: none; }
a > svg[aria-hidden] { width: 16px; height: 16px; vertical-align: -3px; }
a[href^="tel:"] { white-space: nowrap; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h2 { font-size: 22px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.pre { white-space: pre-wrap; word-break: break-word; }

/* ---------- En-tête Salutation Signature MUST ---------- */
.welcome-banner {
  margin-bottom: 24px;
}
.welcome-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.welcome-name {
  color: var(--accent-dark);
}
.welcome-sub {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

/* ---------- Boutons et champs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 8px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  cursor: pointer; font-weight: 600; white-space: nowrap;
  text-decoration: none; transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  font-weight: 700; box-shadow: 0 2px 8px rgba(255, 122, 0, 0.25);
}
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-ghost { color: var(--danger); border-color: #f2c4c4; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(0, 0, 0, .05); }
.btn.sm { min-height: 32px; padding: 4px 12px; font-size: 13px; border-radius: 6px; }
.btn.lg { min-height: 48px; padding: 10px 22px; font-size: 15px; border-radius: 12px; }
.btn.pill { border-radius: var(--radius-pill); }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.icon-btn { width: 38px; padding: 0; border-radius: var(--radius-pill); }

.pwa-install-btn {
  background: rgba(255, 122, 0, 0.14);
  border-color: rgba(255, 122, 0, 0.35);
  color: var(--accent-dark);
  font-weight: 700;
  gap: 6px;
  transition: all .15s ease;
}
.topbar .pwa-install-btn {
  color: #fff;
  background: rgba(255, 122, 0, 0.22);
  border-color: rgba(255, 122, 0, 0.45);
}
.pwa-install-btn:hover {
  background: var(--accent);
  color: var(--accent-ink) !important;
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(255, 122, 0, 0.35);
}
.sidebar-install {
  width: 100%;
  margin: 12px 0 6px;
  border-radius: var(--radius-pill);
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}
.sidebar-install:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

label.field { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
label.field > span.hint { font-weight: 400; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; min-height: 42px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-weight: 400; color: var(--ink); transition: border-color .15s, outline .15s;
}
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.form-error { color: var(--danger); font-size: 14px; min-height: 1em; font-weight: 600; }
.form-error:empty { display: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

.radio-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-card {
  flex: 1; min-width: 140px; display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 700;
  background: var(--surface); transition: border-color .15s, background .15s;
}
.radio-card input { accent-color: var(--accent); }
.radio-card.prio-urgent:has(input:checked) { border-color: var(--warn); background: var(--warn-soft); }
.radio-card.prio-tres_urgent:has(input:checked) { border-color: var(--danger); background: var(--danger-soft); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.badge.prio-urgent { background: var(--warn); color: #fff; border-color: var(--warn); font-weight: 800; }
.badge.prio-tres_urgent { background: var(--danger); color: #fff; border-color: var(--danger); font-weight: 800; }
.badge.blocked { background: var(--danger-soft); color: var(--danger); border-color: #f2c4c4; font-weight: 800; }
.badge.st-nouveau { background: #eef0ff; color: #3b45b5; border-color: #d5d9fb; }
.badge.st-affecte { background: #f1ecfd; color: #6a3fc8; border-color: #ddd0f8; }
.badge.st-recu { background: #e5f4fb; color: #1f6f95; border-color: #c6e5f3; }
.badge.st-constat { background: #fff6dd; color: #8d6a00; border-color: #f4e2a8; }
.badge.st-en_cours { background: var(--accent-soft); color: var(--accent-soft-ink); border-color: var(--accent-soft-border); font-weight: 800; }
.badge.st-termine { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.badge.st-cloture { background: var(--ok-soft); color: var(--ok); border-color: #bfe6cf; }
.badge.off { background: #f0f0f0; color: #777; }
.badge.on { background: var(--ok-soft); color: var(--ok); border-color: #bfe6cf; }

/* ---------- Structure & Navigation ---------- */
.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.sidebar {
  width: 260px;
  background: var(--brand); /* #111214 */
  color: #ffffff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 16px;
  z-index: 30;
  transition: transform .2s ease;
}

.sidebar-head {
  padding: 4px 8px 24px;
}
.sidebar-head .brand {
  display: flex;
  align-items: center;
}
.sidebar-head .brand-logo {
  font-size: 21px;
}
.sidebar-head .brand-dot {
  width: 10px;
  height: 10px;
}

.sidebar-section {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #717684;
  padding: 12px 14px 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: all .15s ease;
}

.sidebar-nav a svg {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.6);
  flex: none;
  transition: color .15s ease;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
.sidebar-nav a:hover svg {
  color: #ffffff;
}

/* Pilule active dans la sidebar (Orange vif MUST • Maintenance) */
.sidebar-nav a.active {
  background: var(--accent); /* #ff7a00 */
  color: var(--accent-ink); /* #111214 */
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 122, 0, 0.35);
}
.sidebar-nav a.active svg {
  color: var(--accent-ink);
}

.sidebar-foot {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 122, 0, 0.18);
  color: var(--accent);
  border: 1px solid rgba(255, 122, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex: none;
}
.sidebar-user-text {
  line-height: 1.25;
  overflow: hidden;
}
.sidebar-user-name {
  font-weight: 700;
  font-size: 13px;
  color: #ffffff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.sidebar-user-role {
  font-size: 11px;
  color: #a9ab9f;
}
.sidebar-actions {
  display: flex;
  gap: 4px;
}
.sidebar-actions .btn.ghost {
  color: rgba(255, 255, 255, 0.65);
}
.sidebar-actions .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Zone de contenu principale */
.app-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-header {
  min-height: 62px;
  background: transparent;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 12px;
}
.app-header .spacer { flex: 1; }

.mobile-toggle {
  display: none;
}

@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-toggle {
    display: inline-flex;
  }
  .app-header {
    padding: 0 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }
}

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px; min-height: 62px;
  background: var(--brand); color: var(--brand-ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: .02em;
}
.brand-text { display: flex; flex-direction: column; }
.brand-logo {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 18px; line-height: 1.1;
}
.brand-name {
  color: #ffffff;
  font-weight: 900;
  letter-spacing: .04em;
}
.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255, 122, 0, 0.7);
  display: inline-block;
}
.brand-app {
  color: #e2e8f0;
  font-weight: 500;
  letter-spacing: .01em;
}
.brand small {
  display: block; font-weight: 500; opacity: .75; font-size: 11px;
  letter-spacing: 0; color: #a9ab9f; margin-top: 1px;
}

.nav { display: flex; gap: 6px; margin-left: 16px; }
.nav a {
  color: rgba(255, 255, 255, .72); padding: 8px 16px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 14px; text-decoration: none; transition: all .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a.active {
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; box-shadow: 0 2px 10px rgba(255, 122, 0, 0.35);
}

.topbar .spacer { flex: 1; }
.topbar .btn.ghost { color: #fff; }
.topbar .btn.ghost:hover { background: rgba(255, 255, 255, .12); }
.user-chip { font-size: 13px; opacity: .9; text-align: right; line-height: 1.25; }
.user-chip span { color: #a9ab9f; font-size: 12px; }
.main { max-width: 1280px; margin: 0 auto; padding: 26px 20px 60px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h2 { margin-right: auto; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card.pad { padding: 20px; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); }

@media (max-width: 760px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .nav { margin-left: 0; overflow-x: auto; }
  .nav a { padding: 6px 12px; font-size: 13px; }
  .user-chip { display: none; }
  .brand small { display: none; }
  .main { padding: 16px 12px 60px; }
}

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2);
  white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfcf9; }
.table .num { font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.table .title-cell { min-width: 200px; }
.table .title-cell strong { display: block; }
.assign { display: flex; gap: 6px; align-items: center; min-width: 250px; }
.assign select { min-height: 34px; padding: 4px 8px; font-size: 13px; border-radius: 8px; }
tr.row-inactive td { opacity: .55; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-pill);
  padding: 6px 14px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2);
  transition: all .15s;
}
.chip:hover { border-color: #c2c7b8; }
.chip .count { margin-left: 4px; color: var(--muted); font-weight: 700; }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.active .count { color: rgba(255, 255, 255, .75); }
.search { max-width: 260px; }

.date-prio { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }

/* ---------- Fenêtres / Modales ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(15, 20, 35, .55);
  display: flex; align-items: flex-start; justify-content: center; padding: 30px 12px; overflow-y: auto;
  backdrop-filter: blur(2px);
}
.modal {
  width: 100%; max-width: 560px; background: var(--surface); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25); margin: auto 0; border: 1px solid var(--line);
}
.modal.wide { max-width: 980px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { flex: 1; }
.modal-body { padding: 20px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px;
  border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 16px 16px;
}
@media (max-width: 640px) {
  .modal-backdrop { padding: 0; }
  .modal { border-radius: 0; min-height: 100%; }
}

/* ---------- Notifications ---------- */
.bell { position: relative; }
.bell .count {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.notif-panel {
  position: fixed; top: 66px; right: 14px; z-index: 40; width: 380px; max-width: calc(100vw - 28px);
  max-height: 70vh; display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink); border-radius: 16px; box-shadow: 0 16px 48px rgba(0, 0, 0, .2);
  border: 1px solid var(--line);
}
.notif-panel header { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.notif-panel header strong { flex: 1; }
.notif-list { overflow-y: auto; }
.notif-item {
  display: block; width: 100%; text-align: left; border: 0; background: none; cursor: pointer;
  padding: 12px 16px; border-bottom: 1px solid var(--line); transition: background .15s;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--accent-soft); }
.notif-item .when { font-size: 12px; color: var(--muted); }

.toasts { position: fixed; bottom: 18px; right: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 36px); }
.toast {
  min-width: 260px; max-width: 420px; padding: 12px 16px; border-radius: 12px; cursor: pointer;
  background: var(--brand); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  animation: toast-in .2s ease-out; border: 1px solid rgba(255,255,255,0.1);
}
.toast.error { background: var(--danger); }
.toast.ok { background: var(--ok); }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Connexion ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: var(--brand);
}
.login-card {
  width: 100%; max-width: 400px; background: var(--surface);
  border-radius: 20px; padding: 32px 28px; box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}
.login-card .brand { color: var(--ink); margin-bottom: 22px; }
.login-card .brand-name { color: var(--ink); }
.login-card .brand-app { color: var(--ink-2); }
.login-card .brand-dot { background: var(--accent); }

/* ---------- Overview ---------- */
.ov-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.ov-head .row { gap: 6px; }
.ov-title { font-size: 22px; font-weight: 800; color: var(--ink); }
.ov-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 18px; }
.ov-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); }
.ov-box h4 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ov-box .name { font-weight: 700; color: var(--ink); }
.ov-box .links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.ov-box .links a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.ov-box .links svg { width: 16px; height: 16px; }
.ov-desc { margin-bottom: 18px; }
.waiting-banner {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px; margin-bottom: 16px; border-radius: 12px;
  background: var(--warn-soft); color: #8a4a0d; font-weight: 600; border: 1px solid #f6d4b2;
}
.blocked-banner {
  padding: 12px 16px; margin-bottom: 16px; border-radius: 12px;
  background: var(--danger-soft); color: #9b1c1c; border: 1px solid #f2c4c4;
}
.blocked-banner strong { display: block; margin-bottom: 2px; }

.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.step { position: relative; padding: 0 0 18px 40px; }
.step::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.step .dot {
  position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; background: #fff; border: 2px solid var(--line); color: var(--muted);
}
.step.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.current .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 4px var(--accent-soft); }
.step.future { opacity: .55; }
.step-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-height: 28px; padding-top: 3px; }
.step-head strong { font-size: 15px; }
.step-head .meta { font-size: 13px; color: var(--muted); }
.step-body { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.assign-line { font-size: 13px; color: var(--ink-2); }
.comment { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.comment .meta { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.comment.admin { background: #fbfbf9; border-color: #dbe4fb; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.thumb {
  width: 76px; height: 76px; border-radius: 10px; overflow: hidden; padding: 0;
  border: 1px solid var(--line); background: #ddd; cursor: zoom-in;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.section-title { margin: 22px 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.blocage { border: 1px solid #f2c4c4; border-left: 5px solid var(--danger); border-radius: 12px; padding: 12px 14px; background: #fff; margin-bottom: 12px; }
.blocage.lifted { border-color: var(--line); border-left-color: var(--ok); }
.blocage .meta { font-size: 13px; color: var(--muted); }
.blocage .lift { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 14px; }

.rating-box { border: 1px solid #bfe6cf; background: var(--ok-soft); border-radius: 12px; padding: 14px 16px; }
.stars { display: inline-flex; gap: 2px; color: #f0a500; font-size: 20px; letter-spacing: 1px; }
.stars .off { color: #d5d9e0; }
.star-input { display: flex; gap: 6px; }
.star-input button {
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  font-size: 24px; line-height: 1; color: #d5d9e0; cursor: pointer; transition: all .15s;
}
.star-input button.on { color: #f0a500; border-color: #f3d27a; background: #fff9e6; }

.track { font-size: 13px; }
.track table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.track td { padding: 4px 6px; border-bottom: 1px solid var(--line); }

/* ---------- Ajout de commentaire / photos ---------- */
.composer {
  border: 1px dashed #b9c3d6; border-radius: 12px; padding: 12px; background: #fff;
  display: flex; flex-direction: column; gap: 10px;
}
.composer textarea.input { min-height: 70px; }
.previews { display: flex; gap: 6px; flex-wrap: wrap; }
.preview { position: relative; width: 70px; height: 70px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview button {
  position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; font-size: 14px; line-height: 1;
}
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- Visionneuse ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .92);
  display: flex; align-items: center; justify-content: center; user-select: none; touch-action: pan-y;
}
.lightbox img { max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: 6px; }
.lightbox .lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 28px; line-height: 1;
}
.lightbox .lb-btn:hover { background: rgba(255, 255, 255, .26); }
.lightbox .lb-prev { left: 14px; }
.lightbox .lb-next { right: 14px; }
.lightbox .lb-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 24px; cursor: pointer; }
.lightbox .lb-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #ddd; font-size: 14px; }

/* ---------- Écran de localisation obligatoire (technicien) ---------- */
.gate {
  position: fixed; inset: 0; z-index: 80; background: var(--brand); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 28px; text-align: center;
}
.gate svg { width: 64px; height: 64px; color: var(--accent); }
.gate p { max-width: 420px; margin: 0; opacity: .9; }
.gate .help { font-size: 14px; opacity: .8; text-align: left; background: rgba(255, 255, 255, .08); padding: 14px 16px; border-radius: 12px; }

/* ---------- Application technicien (mobile) ---------- */
.tcards { display: flex; flex-direction: column; gap: 10px; }
.tcard {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--warn);
  border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); color: inherit;
  transition: transform .1s, box-shadow .15s;
}
.tcard:active { transform: scale(0.99); }
.tcard.prio-tres_urgent { border-left-color: var(--danger); }
.tcard.closed { border-left-color: var(--line); opacity: .8; }
.tcard .top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.tcard .store { font-weight: 800; font-size: 15px; }
.tcard .title { margin: 2px 0 6px; font-weight: 700; }
.tcard .bottom { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.action-bar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.back-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.gps-status { font-size: 12px; opacity: .9; display: flex; align-items: center; gap: 5px; font-weight: 600; }
.gps-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; }
.gps-status.stale::before { background: var(--accent); }

.alert-box {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 16px; border-radius: 12px;
  background: var(--warn-soft); border: 1px solid #f6d4b2; color: #8a4a0d; font-weight: 600;
}

.home { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--brand); }
.home .card { max-width: 440px; width: 100%; padding: 32px 28px; border-radius: 20px; }
.home .brand-name { color: var(--ink); }
.home .brand-app { color: var(--ink-2); }
.home .links { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }

/* ---------- Priorité NORMAL, statut Annulé, actions sur un ticket ---------- */
.radio-card.prio-normal:has(input:checked) { border-color: var(--ink-2); background: var(--surface-2); }
.badge.prio-normal { background: var(--surface); color: var(--ink-2); border-color: #c9ccc1; font-weight: 800; }
.tcard.prio-normal { border-left-color: #b9bcb1; }
.badge.st-annule { background: #f0f0f0; color: #6b6b6b; border-color: #d9d9d9; text-decoration: line-through; }
.badge.warn { background: var(--warn-soft); color: #8a4a0d; border-color: #f6d4b2; font-weight: 800; }
.cancel-banner {
  padding: 12px 16px; margin-bottom: 16px; border-radius: 12px;
  background: #f2f2f0; color: #4a4a48; border: 1px solid #dcdcd6;
}
.cancel-banner strong { display: block; margin-bottom: 2px; }
.comment.boutique { background: #fffaf3; border-color: #f6dfc2; }
.ov-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.validate-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Lu / non lu par le technicien ---------- */
.read-info { font-size: 12px; font-weight: 700; margin-top: 3px; white-space: nowrap; }
.read-info.unread { color: #b45309; }
.read-info.unread::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 5px; vertical-align: 1px; }
.read-info.read { color: var(--ok); }
.badge.unread { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 800; }
