/* Savewater Pilot — charte inspirée de savewater-tmb.fr :
   bleu marine #212E43, accent bleu #007AFF, titres EB Garamond, texte Inter. */
:root {
  --navy: #212e43;
  --navy-2: #2d3d57;
  --navy-3: #3b4d6b;
  --accent: #007aff;
  --accent-soft: #e6f1ff;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --text: #1c2433;
  --muted: #6b7381;
  --border: #e3e7ec;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(33, 46, 67, .06), 0 4px 16px rgba(33, 46, 67, .05);
  --serif: 'EB Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --sidebar: 256px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.ico { flex: none; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; justify-content: center; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.cap::first-letter { text-transform: uppercase; }
.late { color: #dc2626; font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Structure ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: none; background: var(--navy); color: #d6deea;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: #fff; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.1); display: grid; place-items: center; color: #7fb8ff; }
.brand-name { display: block; font: 600 24px/1 var(--serif); letter-spacing: .2px; }
.brand-sub { display: block; font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: #8fa0b8; margin-top: 3px; }
.nav-group { margin-bottom: 10px; }
.nav-title { font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: #8191a8; padding: 10px 10px 4px; font-weight: 600; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: #cdd6e3; font-weight: 500; font-size: 13.5px; }
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link.active { background: #fff; color: var(--navy); }
.nav-link.active .ico { color: var(--accent); }
.sidebar-foot { margin-top: auto; padding: 16px 10px 4px; font: italic 500 16px var(--serif); color: #8191a8; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 500; display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 28px; background: rgba(245,247,248,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.topbar-title { font: 600 22px var(--serif); color: var(--navy); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proto-pill { font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: #92400e; background: #fef3c7; padding: 3px 8px; border-radius: 999px; }
.me { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.content { padding: 24px 28px 48px; max-width: 1400px; width: 100%; }
.scrim { display: none; }
.icon-btn.only-mobile { display: none; }

/* ---------- Titres de page ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title { font: 600 30px/1.15 var(--serif); color: var(--navy); }
.page-head p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section-title { font: 600 22px var(--serif); color: var(--navy); margin: 28px 0 12px; }
.hero { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 26px 28px; margin-bottom: 18px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(0,122,255,.35), transparent 70%); }
.hero-title { font: 600 34px var(--serif); }
.hero p { margin: 6px 0 0; color: #c6d1e0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); margin-bottom: 8px; font-weight: 500; }
.back:hover { color: var(--accent); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: #c9d1dc; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: #fff; }
.btn.danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn.danger-text { color: #dc2626; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid transparent; background: transparent; border-radius: 9px; cursor: pointer; }
.icon-btn:hover { background: #fff; border-color: var(--border); }
.link { color: var(--accent); font-weight: 600; font-size: 13px; }

/* ---------- Badges ---------- */
.badge, .chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip { background: #eef1f5; color: var(--navy); }
.tone-gray { background: #eef0f3; color: #4b5563; }
.tone-blue { background: var(--accent-soft); color: #0058c2; }
.tone-amber { background: #fef3c7; color: #92400e; }
.tone-red { background: #fee2e2; color: #b91c1c; }
.tone-green { background: #dcfce7; color: #166534; }
.tone-purple { background: #ede9fe; color: #6d28d9; }
.tone-navy { background: #e4e9f1; color: var(--navy); }
.hero .badge.tone-navy { background: rgba(255,255,255,.15); color: #fff; }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 600; flex: none; }
.who { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Statistiques ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); width: 100%;
}
.stat:disabled { cursor: default; color: inherit; opacity: 1; }
.stat.clickable { cursor: pointer; }
.stat.clickable:hover { border-color: #c3cdd9; }
.stat.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.stat-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--navy); line-height: 1.25; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--muted); font-size: 12px; }

/* ---------- Cartes / listes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-head h3 { font: 600 19px var(--serif); color: var(--navy); }
.card select { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2.wide-left { grid-template-columns: 1.6fr 1fr; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + * { margin-top: 16px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-top: 1px solid var(--border); }
.list li:first-child { border-top: 0; }
.list li > a, .list li.approve, .list.compact li { display: flex; align-items: center; gap: 10px; padding: 9px 2px; }
.list li > a:hover { color: var(--accent); }
.list.compact li { padding: 6px 0; font-size: 13px; }
.sub-section { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.sub-section h4 { font: 600 17px var(--serif); color: var(--navy); margin-bottom: 6px; }
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.module { display: flex; flex-direction: column; gap: 2px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.module:hover { border-color: var(--accent); }
.module strong { font: 600 19px var(--serif); color: var(--navy); margin-bottom: 4px; }
.module-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 8px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 16px; background: var(--surface); border: 1px dashed #cfd6df; border-radius: var(--radius); color: var(--navy); text-align: center; }
.empty .ico { color: #9fb3cc; }
.alert { background: #fee2e2; color: #991b1b; padding: 10px 12px; border-radius: 9px; margin-bottom: 12px; font-size: 13px; }
.alert.ok { background: #dcfce7; color: #166534; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 10px 0 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; text-align: right; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 32px; gap: 10px; align-items: center; font-size: 13px; }
.bar { height: 10px; background: #eef1f5; border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), var(--accent)); border-radius: 6px; }
.bar-val { text-align: right; font-weight: 600; }
.date-chip { font-size: 12px; font-weight: 600; background: #eef1f5; padding: 2px 8px; border-radius: 6px; }

/* ---------- Filtres ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filters select, .search { height: 36px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); padding: 0 10px; }
.search { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); min-width: 220px; }
.search input { border: 0; outline: 0; background: transparent; color: var(--text); width: 100%; }
.count { margin-left: auto; font-size: 12.5px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.month { font: 600 20px var(--serif); color: var(--navy); min-width: 150px; text-align: center; text-transform: capitalize; }
.import { position: relative; display: inline-flex; }
.toast { position: absolute; top: 42px; right: 0; background: var(--navy); color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 12px; white-space: nowrap; z-index: 10; }

/* ---------- Tableaux ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.table-wrap.flat { border: 0; box-shadow: none; border-radius: 0; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 11px 14px; border-bottom: 1px solid var(--border); background: #fafbfc; white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:not(.static) { cursor: pointer; }
.table tbody tr:not(.static):hover td { background: #f7f9fc; }

/* ---------- Fenêtres ---------- */
.modal-back { position: fixed; inset: 0; z-index: 1000; background: rgba(20, 28, 41, .45); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 780px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font: 600 22px var(--serif); color: var(--navy); }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 600; color: #3a4558; }
.req { color: #dc2626; }
.field input:not([type=checkbox]):not([type=color]), .field select, .field textarea, .latlng input, .card select {
  height: 38px; border: 1px solid var(--border); border-radius: 9px; padding: 0 10px; background: #fff; width: 100%;
}
.field input[type=color] { height: 38px; width: 64px; border: 1px solid var(--border); border-radius: 9px; padding: 2px; background: #fff; }
.field textarea { height: auto; padding: 8px 10px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .latlng input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.latlng .row-inline input { flex: 1; min-width: 120px; }
.hint { font-size: 12px; color: var(--muted); }

/* ---------- Cartes géographiques ---------- */
.map-wrap { position: relative; }
.map { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); z-index: 0; }
.map-picker { height: 240px; margin-top: 8px; }
.map-legend { position: absolute; left: 12px; bottom: 12px; z-index: 400; background: rgba(255,255,255,.95); border-radius: 9px; padding: 8px 10px; display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; box-shadow: var(--shadow); }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }
.legend-item i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.map-fallback { padding: 40px; text-align: center; background: var(--surface); border-radius: var(--radius); border: 1px dashed var(--border); }
.leaflet-container { font-family: var(--sans); }

/* ---------- Flotte ---------- */
.vehicle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.vehicle { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: block; }
.vehicle:hover { border-color: var(--accent); }
.vehicle-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.vehicle-name { font: 600 19px var(--serif); color: var(--navy); }
.plate { display: inline-block; font: 700 13px/1 ui-monospace, Menlo, monospace; letter-spacing: 1px; border: 2px solid var(--navy); border-left-width: 8px; border-left-color: #1d4ed8; border-radius: 5px; padding: 5px 8px; background: #fff; color: var(--navy); }
.plate.lg { font-size: 18px; vertical-align: middle; }

/* ---------- Badgeuse ---------- */
.badge-wrap { max-width: 460px; margin: 0 auto; }
.badge-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 26px 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.badge-card .who { text-align: left; }
.clock { font: 600 72px/1 var(--serif); color: var(--navy); font-variant-numeric: tabular-nums; margin-top: 6px; }
.clock small { font-size: 24px; color: var(--muted); margin-left: 6px; }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .blink { animation: none; } }
.greet { font: italic 500 20px var(--serif); color: var(--muted); }
.badge-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin: 8px 0; }
.badge-stats div { background: var(--bg); border-radius: 10px; padding: 10px 6px; display: flex; flex-direction: column; }
.badge-stats strong { font-size: 18px; color: var(--navy); }
.badge-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: 100%; }
.badge-actions .btn { flex: 1; justify-content: center; }
.timeline { list-style: none; padding: 0; margin: 8px 0 0; width: 100%; border-top: 1px solid var(--border); }
.timeline li { display: flex; justify-content: space-between; padding: 7px 4px; border-bottom: 1px dashed var(--border); font-size: 13px; }

/* ---------- Planning ---------- */
.legend { display: inline-flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.planning-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.planning { border-collapse: collapse; font-size: 12px; min-width: 100%; }
.planning th, .planning td { border-bottom: 1px solid var(--border); border-right: 1px solid #f0f2f5; text-align: center; padding: 0; }
.planning thead th { padding: 6px 2px; font-weight: 600; color: var(--navy); min-width: 32px; }
.planning thead th span { display: block; color: var(--muted); font-weight: 500; font-size: 10.5px; }
.planning th.sticky { position: sticky; left: 0; background: #fff; z-index: 1; text-align: left; padding: 8px 12px; min-width: 180px; font-weight: 500; white-space: nowrap; }
.planning td { height: 40px; cursor: pointer; }
.planning td:hover { background: var(--accent-soft); }
.planning .we { background: #f6f7f9; }
.planning .today { box-shadow: inset 0 0 0 2px var(--accent); }
.planning tr.totals td, .planning tr.totals th { cursor: default; color: var(--muted); font-weight: 600; background: #fafbfc; }
.abs-chip { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 3px 4px; border-radius: 5px; min-width: 28px; }
.abs-chip.pending { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.55) 0 4px, transparent 4px 8px); outline: 1px dashed currentColor; }
.legend .abs-chip.pending { background-color: #eef0f3; color: #4b5563; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-2, .grid-2.wide-left { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 900; transform: translateX(-100%); transition: transform .2s ease; }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 800; }
  .icon-btn.only-mobile { display: inline-grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 16px 16px 40px; }
  .me-name { display: none; }
  .page-title { font-size: 26px; }
  .form-grid { grid-template-columns: 1fr; }
  .search { min-width: 0; flex: 1 1 100%; }
  .filters select { flex: 1 1 45%; min-width: 0; }
  .count { margin-left: 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 12px; }
  .stat-ico { display: none; }
  /* Tableaux en cartes */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .table td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; }
  .table td.num { text-align: right; }
  .modal-back { padding: 0; align-items: end; }
  .modal { max-height: 92vh; border-radius: 16px 16px 0 0; }
  .clock { font-size: 60px; }
  .proto-pill { display: none; }
}
@media print {
  .sidebar, .topbar, .page-actions, .filters button { display: none !important; }
  .content { padding: 0; }
  body { background: #fff; }
}

/* =========================================================
   Planning des shifts & badgeuse (style « Skello »)
   ========================================================= */
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: #0068db; }
.btn.accent:disabled { opacity: .45; cursor: not-allowed; }
.btn.round { border-radius: 999px; padding: 0 18px; }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* Barre d'outils */
.pl-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pl-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pl-range { position: relative; display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); font-weight: 600; cursor: pointer; }
.pl-range input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pl-range input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.week-chip { font-size: 12px; font-weight: 600; background: #eef1f5; color: var(--muted); padding: 4px 8px; border-radius: 6px; }
.seg { display: inline-flex; background: #eceff3; border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 16px; border-radius: 8px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--accent); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg.underline { background: transparent; padding: 0; gap: 4px; }
.seg.underline button { border-radius: 0; border-bottom: 2px solid transparent; padding: 8px 12px; }
.seg.underline button.on { background: transparent; box-shadow: none; border-bottom-color: var(--accent); }
.seg.pills { background: transparent; padding: 0; margin: 0; gap: 6px; }
.seg.pills button { border-radius: 999px; }
.seg.pills button.on { background: var(--accent); color: #fff; }
.pl-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pl-filter { height: 36px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); padding: 0 10px; }
.pub-pill { font-size: 12.5px; font-weight: 600; color: #92400e; background: #fef3c7; padding: 6px 12px; border-radius: 999px; }
.pub-pill.ok { color: #166534; background: #dcfce7; display: inline-flex; gap: 4px; align-items: center; }
.menu-wrap { position: relative; }
.menu-wrap > .icon-btn { font-size: 20px; font-weight: 700; }
.menu { position: absolute; right: 0; top: 40px; z-index: 600; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.14); padding: 6px; min-width: 260px; }
.menu button, .menu a { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; font-size: 13.5px; }
.menu button:hover, .menu a:hover { background: var(--bg); }
.pl-help { margin-top: 10px; }

/* Grille */
.pl-scroll { overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); max-height: calc(100vh - 210px); }
.pl-grid { display: grid; min-width: min-content; }
.pl-cell { border-right: 1px solid #edf0f3; border-bottom: 1px solid #edf0f3; min-width: 0; }
.pl-corner, .pl-day, .pl-total-h { position: sticky; top: 0; z-index: 3; background: #fff; }
.pl-corner { left: 0; z-index: 4; display: flex; align-items: flex-end; padding: 0 8px; }
.pl-tabs { display: flex; gap: 2px; }
.pl-tabs button { border: 0; background: none; padding: 10px 8px; font-weight: 600; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; }
.pl-tabs button.on { color: var(--navy); border-bottom-color: var(--accent); }
.pl-day { display: flex; align-items: baseline; justify-content: center; gap: 5px; padding: 12px 4px; font-size: 12.5px; color: var(--muted); }
.pl-day b { color: var(--text); font-size: 14px; }
.pl-day b.pill { background: var(--accent); color: #fff; border-radius: 999px; min-width: 26px; height: 26px; display: inline-grid; place-items: center; }
.pl-day.today { background: #f5f9ff; }
.pl-total-h { display: grid; place-items: center; font-weight: 700; color: var(--navy); right: 0; position: sticky; z-index: 4; }
.pl-rowhead { position: sticky; left: 0; z-index: 2; background: #fff; padding: 8px 10px; }
.pl-emp { display: flex; align-items: center; gap: 8px; }
.pl-name { flex: 1; font-size: 12.5px; line-height: 1.25; min-width: 0; }
.pl-name b { font-weight: 600; text-transform: uppercase; }
.pl-contract { font-size: 12px; font-weight: 600; color: #d97706; }
.pl-contract.zero { color: var(--accent); }
.avatar.na { width: 32px; height: 32px; background: #dbeafe; color: #1d4ed8; font-size: 10.5px; }
.poste-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; }
.pl-slot { position: relative; padding: 4px; min-height: 58px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.pl-slot:hover { background: #f7faff; }
.pl-slot.we, .pl-foot.we { background: #fafbfc; }
.pl-slot.today { background: #f8fbff; }
.pl-slot.over { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.pl-add { position: absolute; right: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); opacity: 0; transition: opacity .1s; }
.pl-slot:hover .pl-add { opacity: 1; }
.pl-total { position: sticky; right: 0; z-index: 2; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; font-size: 13px; border-left: 1px solid var(--border); }
.delta { font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.delta i { font-style: normal; width: 14px; height: 14px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; color: #fff; }
.delta.under { color: var(--accent); } .delta.under i { background: var(--accent); }
.delta.over { color: #dc2626; } .delta.over i { background: #dc2626; }
.delta.ok { color: #16a34a; }
.pl-foot-h, .pl-foot { position: sticky; bottom: 0; z-index: 2; background: #f7f8fa; border-top: 1px solid var(--border); }
.pl-foot-h { left: 0; z-index: 4; padding: 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pl-foot { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 10px 4px; font-size: 12.5px; }
.pl-foot b { font-size: 14px; color: var(--navy); }
.pl-foot-total { right: 0; z-index: 4; }

/* Shift */
.shift { background: var(--c); border-left: 4px solid color-mix(in srgb, var(--c) 55%, #000); border-radius: 7px; padding: 5px 7px; font-size: 12px; line-height: 1.3; cursor: grab; box-shadow: 0 1px 1px rgba(0,0,0,.06); user-select: none; }
.shift:hover { filter: brightness(.96); }
.shift:active { cursor: grabbing; }
.shift.draft { background: repeating-linear-gradient(135deg, var(--c) 0 8px, color-mix(in srgb, var(--c) 78%, #fff) 8px 16px); outline: 1.5px dashed color-mix(in srgb, var(--c) 55%, #000); outline-offset: -1.5px; }
.shift-top { display: flex; justify-content: space-between; gap: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -.1px; }
.shift-top strong { overflow: hidden; text-overflow: ellipsis; }
.shift-sub { display: flex; justify-content: space-between; align-items: center; gap: 4px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.shift-sub span { overflow: hidden; text-overflow: ellipsis; }
.shift.compact, .abs-card.compact { padding: 3px 2px; text-align: center; font-size: 10px; font-weight: 700; border-left-width: 3px; }
.shift.inline { display: inline-block; cursor: default; font-weight: 600; padding: 5px 10px; }
.planned-today { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.abs-card { background: repeating-linear-gradient(135deg, #e5e7eb 0 6px, #eef0f3 6px 12px); border-left: 4px solid #9ca3af; border-radius: 7px; padding: 5px 7px; font-size: 12px; color: #374151; cursor: pointer; }
.abs-card.pending { border-left-color: #d97706; }

.pl-grid.is-month .pl-slot { min-height: 44px; padding: 3px 2px; gap: 2px; }
.pl-grid.is-month .pl-day { flex-direction: column; align-items: center; gap: 0; padding: 8px 0; }
.pl-grid.is-month .pl-add { display: none; }
.pl-grid.is-month .pl-foot { font-size: 10.5px; padding: 8px 0; }

/* Vue jour */
.tl { min-width: 900px; }
.tl-row { display: grid; grid-template-columns: 190px 1fr 100px; border-bottom: 1px solid #edf0f3; min-height: 58px; }
.tl-head { position: sticky; top: 0; z-index: 3; background: #fff; min-height: 40px; }
.tl-name { padding: 8px 10px; position: sticky; left: 0; background: #fff; z-index: 2; border-right: 1px solid #edf0f3; }
.tl-track { position: relative; cursor: pointer; }
.tl-track.over { background: var(--accent-soft); }
.tl-head .tl-track span { position: absolute; top: 12px; transform: translateX(-50%); font-size: 11px; color: var(--muted); }
.tl-grid { position: absolute; top: 0; bottom: 0; border-left: 1px dashed #edf0f3; }
.tl-bar { position: absolute; top: 8px; bottom: 8px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; white-space: nowrap; }
.tl-bar span { font-size: 11px; opacity: .9; }
.tl-total { display: grid; place-items: center; border-left: 1px solid #edf0f3; font-size: 13px; }

/* Fenêtre shift */
.sk-modal { max-width: 640px; overflow: hidden; }
.sk-head { padding: 18px 22px 0; transition: background .2s; }
.sk-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sk-head h3 { font: 700 20px var(--sans); }
.sk-head .icon-btn { color: inherit; }
.sk-head .icon-btn:hover { background: rgba(255,255,255,.18); border-color: transparent; }
.sk-date { opacity: .9; margin-top: 2px; }
.sk-tabs { display: flex; gap: 6px; margin-top: 18px; }
.sk-tabs button { border: 0; background: none; color: inherit; opacity: .8; padding: 8px 10px 10px; font-weight: 600; border-bottom: 3px solid transparent; cursor: pointer; }
.sk-tabs button.on { opacity: 1; border-bottom-color: currentColor; }
.sk-body { padding: 6px 22px 12px; }
.sk-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.sk-row:last-child { border-bottom: 0; }
.sk-row > label { font-weight: 600; color: var(--navy); }
.sk-row select, .sk-row input:not([type=checkbox]):not([type=radio]):not([type=color]), .sk-row textarea { height: 42px; width: 100%; border: 0; background: #f1f3f6; border-radius: 9px; padding: 0 12px; }
.sk-row textarea { height: auto; padding: 10px 12px; resize: vertical; }
.sk-row select:focus, .sk-row input:focus, .sk-row textarea:focus { outline: 2px solid var(--accent); }
.sk-hours { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sk-hours > input { flex: 1; min-width: 100px; }
.sk-mini { display: flex; flex-direction: column; background: #f1f3f6; border-radius: 9px; padding: 4px 10px; min-width: 100px; }
.sk-mini span { font-size: 11px; color: var(--muted); }
.sk-mini input { height: 22px !important; padding: 0 !important; background: transparent !important; outline: 0 !important; }
.sk-mini.ro { background: transparent; }
.sk-mini.ro strong { font-size: 15px; color: var(--navy); }
.sk-select-color { position: relative; }
.sk-select-color i { position: absolute; right: 34px; top: 11px; width: 20px; height: 20px; border-radius: 50%; pointer-events: none; }
.sk-link { border: 0; background: none; font-weight: 600; font-size: 13px; padding: 8px 0 0; cursor: pointer; color: var(--navy); }
.sk-link:hover { color: var(--accent); }
.sk-inline { margin-top: 8px; }
.sk-inline input[type=color] { width: 44px; height: 36px; border: 0; background: none; }
.sk-days { display: flex; gap: 6px; flex-wrap: wrap; }
.sk-day { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 32px; border-radius: 8px; background: #f1f3f6; font-size: 12.5px; font-weight: 600; cursor: pointer; text-transform: capitalize; }
.sk-day input { display: none; }
.sk-day.on { background: var(--accent); color: #fff; }
.sk-radios { display: flex; gap: 16px; flex-wrap: wrap; }
.sk-radios label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.sk-radios input { accent-color: var(--accent); width: 16px; height: 16px; }

/* Badgeuse (validation) */
.bv { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.bv-side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 76px; }
.bv-side .search.sm { margin-bottom: 8px; min-width: 0; }
.bv-day { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px; border: 0; background: transparent; border-radius: 10px; text-align: left; cursor: pointer; font-weight: 500; }
.bv-day:hover { background: #fff; }
.bv-day.on { background: #e8f1ff; color: var(--accent); font-weight: 600; }
.vcheck { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #c7ced8; background: #fff; display: inline-grid; place-items: center; color: transparent; cursor: pointer; flex: none; }
.vcheck.sm { width: 20px; height: 20px; cursor: default; }
.vcheck.on { background: #16a34a; border-color: #16a34a; color: #fff; }
.bv-main { min-width: 0; }
.bv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.info-banner { display: flex; gap: 10px; align-items: flex-start; background: #e8f1ff; color: #1e3a8a; padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; }
.bv-head .info-banner { margin-bottom: 0; }
.bv-title { font: 600 20px var(--serif); color: var(--navy); margin-bottom: 10px; }
.bv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.bv-card { display: flex; flex-direction: column; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; }
.bv-card span { color: var(--muted); font-weight: 500; }
.bv-card strong { font-size: 28px; color: var(--navy); }
.bv-card small { color: var(--muted); }
.bv-card.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.bv-card.primary span, .bv-card.primary strong, .bv-card.primary small { color: #fff; }
.bv-table td, .bv-table th { padding: 9px 10px; }
.bv-table .sep { border-left: 1px solid var(--border); }
.bv-table tr.validated td { background: #f6fef9; }
.tt { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
.pause-chip { background: #fbbf24; color: #78350f; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 5px; white-space: nowrap; }
.paid { display: inline-flex; align-items: center; gap: 4px; }
.paid input, .pause-in, .note-in { height: 32px; border: 0; border-bottom: 2px solid #14b8a6; background: #f1f3f6; border-radius: 6px 6px 0 0; padding: 0 6px; font-variant-numeric: tabular-nums; }
.paid input:last-child { border-bottom-color: #6366f1; }
.pause-in { width: 56px; border-bottom-color: #f59e0b; }
.note-in { width: 110px; border-bottom-color: #d1d5db; }
.paid input:disabled, .pause-in:disabled { opacity: .4; }
.over-t { color: #dc2626; font-weight: 600; } .under-t { color: var(--accent); font-weight: 600; }

@media (max-width: 860px) {
  .seg { margin: 0; }
  .pl-actions { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .pl-scroll { max-height: none; }
  .sk-row { grid-template-columns: 1fr; gap: 6px; }
  .bv { grid-template-columns: 1fr; }
  .bv-side { position: static; flex-direction: row; overflow-x: auto; }
  .bv-day { white-space: nowrap; }
  .paid input { width: 92px; }
}
@media print {
  .pl-toolbar .pl-actions, .pl-help { display: none !important; }
  .pl-scroll { max-height: none; overflow: visible; box-shadow: none; }
}
.shift-sub em { font-style: normal; font-weight: 600; flex: none; }
.bv { grid-template-columns: 190px 1fr; }
.bv-table td, .bv-table th { padding: 8px 7px; white-space: nowrap; }
.bv-table th { font-size: 10.5px; letter-spacing: .3px; }
.paid input { width: 88px; padding: 0 4px; }
.pause-in { width: 48px; }
.note-in { width: 90px; }
.bv-table .who span { white-space: normal; }
.map-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.settings-tabs { margin-bottom: 16px; border-bottom: 1px solid var(--border); display: flex; }
.settings-tabs + .page-head .page-title { font-size: 24px; }

/* Calcul bouteilles de gaz */
.gas-layout { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 16px; align-items: start; }
.gas-layout .card { margin-bottom: 16px; }
.gas-side { min-width: 0; }
.gas-table td, .gas-table th { padding: 7px 10px; }
.gas-table tfoot th { background: #f7f8fa; color: var(--navy); font-size: 13px; text-transform: none; letter-spacing: 0; border-top: 2px solid var(--border); }
.gas-table tr.filled td { background: #f5f9ff; }
.gas-table tr.sel td { background: var(--accent-soft); }
.gas-in { width: 110px; height: 32px; border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; text-align: right; font-variant-numeric: tabular-nums; }
.gas-in:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.gas-result { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; }
.gas-result div { display: flex; flex-direction: column; padding: 12px; border-radius: 10px; background: var(--bg); }
.gas-result span { font-size: 12px; color: var(--muted); }
.gas-result strong { font-size: 22px; color: var(--navy); font-variant-numeric: tabular-nums; }
.gas-result small { color: var(--muted); font-size: 11.5px; }
.gas-result .hl { background: var(--navy); }
.gas-result .hl span, .gas-result .hl strong, .gas-result .hl small { color: #fff; }
.gas-save { display: flex; gap: 8px; flex-wrap: wrap; }
.gas-save input, .gas-save select { flex: 1; min-width: 160px; height: 36px; border: 1px solid var(--border); border-radius: 9px; padding: 0 10px; background: #fff; }
.gas-params { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 8px; }
.gas-params input, .field .sk-days { margin-top: 4px; }
.gas-params .field span, .gas-side .field > span { font-size: 12.5px; font-weight: 600; color: #3a4558; }
.gas-params input { height: 36px; border: 1px solid var(--border); border-radius: 9px; padding: 0 10px; }
@media (max-width: 1100px) { .gas-layout { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .gas-table thead { display: table-header-group; }
  .gas-table { display: table; }
  .gas-table tbody { display: table-row-group; }
  .gas-table tr { display: table-row; padding: 0; }
  .gas-table td { display: table-cell; padding: 6px 8px; text-align: left; }
  .gas-table td.num { text-align: right; }
  .gas-table td::before { content: none; }
  .gas-in { width: 90px; }
}
.gas-controls { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.gas-days input { width: 110px; height: 36px; border: 1px solid var(--border); border-radius: 9px; padding: 0 10px; margin-top: 4px; }
.gas-days span { font-size: 12.5px; font-weight: 600; color: #3a4558; }
.gas-result strong.mix { font-size: 18px; line-height: 1.25; }
.gas-detail { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 10px; margin-bottom: 12px; }
.gas-detail span { color: var(--muted); margin-right: 6px; }
.gas-detail .saving { flex-basis: 100%; color: #166534; }
.gas-param-group h4 { font: 600 15px var(--serif); color: var(--navy); margin: 4px 0 6px; }

/* Tracé sur carte satellite */
.trace-bar, .trace-draw { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.trace-search { position: relative; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--muted); flex: 1 1 260px; max-width: 420px; }
.trace-search input { border: 0; outline: 0; flex: 1; min-width: 0; color: var(--text); background: transparent; }
.trace-results { position: absolute; top: 38px; left: 0; right: 0; z-index: 800; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.14); padding: 4px; }
.trace-results button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; color: var(--text); }
.trace-results button:hover { background: var(--bg); }
.trace-draw { background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.trace-dn { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.trace-dn select, .trace-table select { height: 30px; border: 1px solid var(--border); border-radius: 8px; padding: 0 6px; background: #fff; }
.trace-live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.trace-live i { width: 18px; height: 4px; border-radius: 2px; display: inline-block; }
.trace-map { height: 460px; }
.trace-map.drawing, .trace-map.drawing .leaflet-interactive { cursor: crosshair !important; }
.trace-table td, .trace-table th { padding: 6px 8px; }
.trace-table tr.sel td { background: var(--accent-soft); }
.trace-name { height: 30px; border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; width: 100%; min-width: 120px; }
.vtx { background: #fff; border: 2px solid #111; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.traced { color: var(--accent); font-weight: 600; }
@media (max-width: 860px) {
  .trace-map { height: 60vh; }
  .trace-table thead { display: none; }
}

/* Vues technicien / commercial / client */
.gas-views { margin-bottom: 14px; }
.com-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 12px; }
.com-col { background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.com-col.sale { background: #eef6ff; }
.com-col h4 { font: 600 16px var(--serif); color: var(--navy); margin-bottom: 6px; }
.com-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 4px 0; border-bottom: 1px dashed #dde3ea; }
.com-line b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.com-line.total { border-bottom: 0; font-size: 15px; padding-top: 8px; }
.margin-band { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 10px; margin-bottom: 12px; }
.margin-band strong { font-size: 24px; }
.quote-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 10px; }
.quote-form .field span { font-size: 12.5px; font-weight: 600; color: #3a4558; }
.quote-form input, .quote-form select { height: 36px; border: 1px solid var(--border); border-radius: 9px; padding: 0 10px; background: #fff; margin-top: 4px; width: 100%; }
.quote { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 30px; margin-bottom: 16px; color: #1c2433; }
.quote-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-bottom: 3px solid var(--navy); padding-bottom: 16px; margin-bottom: 18px; }
.quote-brand { display: flex; gap: 10px; align-items: center; }
.quote-brand .brand-mark { background: var(--navy); color: #7fb8ff; }
.quote-brand strong { display: block; font: 600 26px/1 var(--serif); color: var(--navy); }
.quote-brand small { color: var(--muted); }
.quote-meta { text-align: right; font-size: 13px; }
.quote-meta h3 { font: 600 24px var(--serif); color: var(--navy); }
.quote-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; font-size: 13.5px; }
.quote-parties > div { background: var(--bg); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.quote-intro { font-size: 13.5px; }
.quote-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13.5px; }
.quote-table th { text-align: left; background: var(--navy); color: #fff; padding: 8px 10px; font-weight: 600; font-size: 12px; }
.quote-table th.num, .quote-table td.num { text-align: right; }
.quote-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.quote-table tfoot td { font-weight: 600; background: var(--bg); }
.quote-table.small-t th { background: #e4e9f1; color: var(--navy); }
.quote-totals { margin-left: auto; width: min(320px, 100%); font-size: 14px; }
.quote-totals div { display: flex; justify-content: space-between; padding: 6px 10px; }
.quote-totals .ttc { background: var(--navy); color: #fff; border-radius: 8px; font-size: 16px; margin-top: 4px; }
.quote-foot { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 10px; }
@media (max-width: 860px) { .com-grid, .quote-parties { grid-template-columns: 1fr; } .quote { padding: 18px; } .quote-meta { text-align: left; } }
@media print {
  body.print-quote .content > *:not(.gas-layout), body.print-quote .gas-input, body.print-quote .no-print { display: none !important; }
  body.print-quote .gas-layout { display: block; }
  body.print-quote .quote { border: 0; box-shadow: none; padding: 0; }
  body.print-quote .quote-table th, body.print-quote .quote-totals .ttc { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Vue client (visuel) */
.client-view { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 10px; }
.cv-main { background: var(--navy); color: #fff; border-radius: 12px; padding: 18px; display: flex; flex-direction: column; }
.cv-main span, .cv-main small { color: #c6d1e0; }
.cv-main strong { font: 600 56px/1.1 var(--serif); }
.cv-price { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.cv-price div { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 10px; background: var(--bg); }
.cv-price span { color: var(--muted); }
.cv-price b { font-size: 18px; color: var(--navy); }
.cv-price .total { background: var(--accent-soft); }
.cv-price .total b { font-size: 26px; color: var(--accent); }
.cv-sections { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 860px) { .client-view { grid-template-columns: 1fr; } }

/* Suivi de parcours */
.rec { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 16px; align-items: start; }
.rec-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.rec-status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--navy); }
.rec-status .dot { width: 12px; height: 12px; border-radius: 50%; background: #9ca3af; }
.rec-status.st-recording .dot { background: #dc2626; animation: blink 1s steps(1) infinite; }
.rec-status.st-paused .dot { background: #d97706; }
.rec-status.st-done .dot { background: #16a34a; }
.rec-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rec-stats.inline { grid-template-columns: repeat(4, 1fr); margin-bottom: 12px; }
.rec-stats div { background: var(--bg); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.rec-stats span { font-size: 12px; color: var(--muted); }
.rec-stats strong { font-size: 22px; color: var(--navy); font-variant-numeric: tabular-nums; }
.rec-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rec-actions .btn { flex: 1; justify-content: center; }
.rec-wpt { display: flex; gap: 8px; }
.rec-wpt input { flex: 1; min-width: 0; height: 38px; border: 1px solid var(--border); border-radius: 9px; padding: 0 10px; }
.rec-send { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.rec-send h4 { font: 600 18px var(--serif); color: var(--navy); }
.rec-send .field span { font-size: 12.5px; font-weight: 600; color: #3a4558; }
.rec-send input, .rec-send select, .rec-send textarea { width: 100%; border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; background: #fff; }
.rec-map { position: relative; }
.rec-follow { position: absolute; z-index: 500; left: 56px; top: 10px; background: #fff; padding: 6px 10px; border-radius: 8px; box-shadow: var(--shadow); }
.wpt { background: #f59e0b; color: #fff; border: 2px solid #fff; border-radius: 50%; display: grid !important; place-items: center; font-size: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
@media (max-width: 960px) { .rec { grid-template-columns: 1fr; } .rec-map { order: -1; } .rec-stats.inline { grid-template-columns: 1fr 1fr; } }

/* Rôles et droits */
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; display: contents; }
fieldset.plain[disabled] input, fieldset.plain[disabled] select, fieldset.plain[disabled] textarea { background: #f4f6f8 !important; color: #475569; cursor: not-allowed; }
.readonly-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: #92400e; background: #fef3c7; padding: 4px 10px; border-radius: 999px; }
.role-badge { font-weight: 600; }
.me { display: flex; align-items: center; gap: 8px; font-weight: 500; border: 0; background: none; cursor: pointer; padding: 4px 6px; border-radius: 10px; }
.me:hover { background: #fff; }
.me-name { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.me-name small { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.user-menu { min-width: 320px; }
.user-menu .menu-title { padding: 8px 10px 6px; font-size: 12.5px; font-weight: 600; color: var(--navy); }
.user-menu button.on { background: var(--accent-soft); }
.shift.nodrag { cursor: pointer; }
.empty.denied .ico { color: #dc2626; }
.roles { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
.roles-list { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 76px; }
.role-item { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border: 1px solid transparent; background: none; border-radius: 10px; cursor: pointer; }
.role-item:hover { background: #fff; }
.role-item.on { background: #fff; border-color: var(--border); box-shadow: var(--shadow); }
.role-item i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.role-item strong { display: block; color: var(--navy); }
.role-item small { color: var(--muted); font-size: 11.5px; }
.roles-main { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.role-head { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.role-head input[type=color] { width: 44px; height: 44px; border: 0; background: none; padding: 0; }
.role-name { width: 100%; font: 600 24px var(--serif); color: var(--navy); border: 1px solid transparent; border-radius: 8px; padding: 2px 6px; background: transparent; }
.role-name:not(:disabled):hover, .role-name:focus { border-color: var(--border); outline: 0; }
.role-desc { width: 100%; border: 1px solid transparent; border-radius: 8px; padding: 4px 6px; color: var(--muted); background: transparent; }
.role-desc:not(:disabled):hover, .role-desc:focus { border-color: var(--border); outline: 0; }
.perm-group { border: 1px solid var(--border); border-radius: 12px; margin-top: 14px; overflow: hidden; }
.perm-group-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #f7f8fa; border-bottom: 1px solid var(--border); }
.perm-group-head h4 { font: 600 17px var(--serif); color: var(--navy); }
.perm-page { display: grid; grid-template-columns: 240px 1fr; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #f0f2f5; align-items: start; }
.perm-page:last-child { border-bottom: 0; }
.perm-page.off .perm-actions { opacity: .45; }
.perm-main { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.perm-main input, .perm-chip input { accent-color: var(--accent); width: 16px; height: 16px; }
.perm-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.perm-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 5px 10px; border-radius: 999px; background: #f1f3f6; cursor: pointer; }
.perm-chip.on { background: var(--accent-soft); color: #0058c2; font-weight: 600; }
@media (max-width: 960px) { .roles { grid-template-columns: 1fr; } .roles-list { position: static; } .perm-page { grid-template-columns: 1fr; } }

/* Envoi du planning par e-mail */
.mail-table td { vertical-align: middle; }
.mail-in { height: 32px; border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; min-width: 200px; }
.mail-preview { white-space: pre-wrap; font: 13px/1.5 var(--sans); background: var(--bg); border-radius: 10px; padding: 12px 14px; margin: 0; }
a.btn { text-decoration: none; }


/* =========================================================
   Aquasonic — charte Savewater
   ========================================================= */
.aq-hero { background: linear-gradient(120deg, var(--navy) 0%, #1d3557 60%, #0b4f8a 100%); }
.aq-hero::after { background: radial-gradient(circle, rgba(127,184,255,.35), transparent 70%); }
.aq-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 16px; }
.aq-module strong { display: flex; align-items: center; gap: 6px; }
.aq-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.aq-head .page-title { margin: 0; }
.aq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.aq-card { margin-bottom: 16px; }
.aq-grid .aq-card { margin-bottom: 0; }
.aq-grid + .aq-card { margin-top: 16px; }
.aq-card h3 { display: flex; align-items: center; gap: 10px; font: 600 19px var(--serif); color: var(--navy); margin-bottom: 14px; }
.aq-h-ico { width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.aq-h-ico.sm { width: 26px; height: 26px; border-radius: 7px; }
.aq-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.aq-field > span { font-size: 12.5px; font-weight: 600; color: #3a4558; }
.aq-field input, .aq-field select, .aq-field textarea { height: 38px; width: 100%; border: 1px solid var(--border); border-radius: 9px; padding: 0 10px; background: #fff; font-size: 14px; }
.aq-field textarea { height: auto; padding: 8px 10px; resize: vertical; }
.aq-field input:focus, .aq-field select:focus, .aq-field textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.aq-field input:disabled, .aq-field select:disabled, .aq-field textarea:disabled { background: #f4f6f8; color: var(--text); opacity: 1; -webkit-text-fill-color: var(--text); }
.aq-unit { display: flex; align-items: stretch; }
.aq-unit input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.aq-unit em { font-style: normal; display: grid; place-items: center; padding: 0 12px; background: var(--bg); border: 1px solid var(--border); border-left: 0; border-radius: 0 9px 9px 0; color: var(--muted); font-size: 13px; }
.aq-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.aq-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.aq-ro { background: var(--bg); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; }
.aq-ro span { font-size: 12px; color: var(--muted); } .aq-ro b { font-weight: 500; word-break: break-all; color: var(--navy); }
.aq-map .field > label { display: none; }
.aq-map { margin: 10px 0 12px; }
.aq-card .map-wrap { margin-bottom: 12px; }
.aq-actions { display: flex; gap: 8px; align-items: center; margin-bottom: 24px; }
.aq-file { border-top: 1px solid var(--border); padding: 12px 0; }
.aq-file:first-of-type { border-top: 0; }
.aq-file-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.aq-img { max-width: 260px; max-height: 200px; border-radius: 10px; border: 1px solid var(--border); }
/* Lecteur */
.aq-player { display: flex; gap: 12px; align-items: flex-start; }
.aq-play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; box-shadow: 0 2px 8px rgba(33,46,67,.25); }
.aq-play:hover { background: var(--navy-2); }
.aq-play.on { background: var(--accent); }
.aq-wave-wrap { flex: 1; min-width: 0; }
.aq-wave { min-height: 72px; background: #f5f8fc; border: 1px solid var(--border); border-radius: 10px; padding: 0 6px; }
.aq-bar { height: 8px; background: #e5e7eb; border-radius: 4px; margin-top: 32px; overflow: hidden; } .aq-bar i { display: block; height: 100%; background: var(--accent); }
.aq-spec:not(:empty) { margin-top: 6px; border-radius: 10px; overflow: hidden; }
.aq-time { margin-top: 4px; }
.aq-now { display: flex; gap: 8px; align-items: flex-start; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.aq-now .aq-player { flex: 1; }
/* Listes */
.aq-toolbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.aq-seg { margin-left: auto; }
.aq-sort { border: 0; background: none; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; padding: 0; }
.aq-sort-ico { color: #b6c0cc; font-size: 11px; }
.aq-sort-ico.on { color: var(--accent); }
.aq-table td { vertical-align: middle; }
.aq-listen { display: inline-flex; align-items: center; gap: 4px; height: 28px; min-width: 28px; justify-content: center; padding: 0 8px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--navy); font-size: 12px; font-weight: 600; cursor: pointer; }
.aq-listen:hover { border-color: var(--accent); color: var(--accent); }
.aq-listen.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.aq-act { color: var(--muted); }
.aq-act:hover { color: var(--accent); }
.aq-act.del:hover { color: #dc2626; }
.aq-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.aq-pages { display: flex; gap: 4px; align-items: center; }
.aq-pages button { min-width: 34px; height: 34px; border: 1px solid var(--border); background: #fff; color: var(--navy); border-radius: 9px; cursor: pointer; font-weight: 600; }
.aq-pages button:hover:not(:disabled) { border-color: #c3cdd9; }
.aq-pages button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.aq-pages button:disabled { color: #c3cbd5; cursor: default; }
.aq-pages span { color: var(--muted); padding: 0 4px; }
.aq-pager select { height: 32px; border: 1px solid var(--border); border-radius: 8px; margin-left: 6px; background: #fff; }
/* Saisie rapide */
.aq-quick-choice { display: grid; grid-template-columns: repeat(2, minmax(200px, 260px)); justify-content: center; gap: 14px; margin: 6px 0 12px; }
.aq-choice { cursor: pointer; text-align: left; font: inherit; }
.aq-quick { max-width: 640px; margin: 0 auto; }
.aq-rec { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 14px 0; }
.aq-rec canvas { width: 100%; height: 90px; background: var(--navy); border-radius: 12px; }
.aq-rec-time { font: 600 34px var(--serif); color: var(--navy); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .aq-grid, .aq-two, .aq-three { grid-template-columns: 1fr; } .aq-quick-choice { grid-template-columns: 1fr; } .aq-seg { margin-left: 0; } }

/* Carte des écoutes */
.aq-mapview { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.aq-mapfilters { position: sticky; top: 76px; margin-bottom: 0; }
.aq-res-check { display: flex; align-items: center; gap: 8px; padding: 5px 2px; cursor: pointer; font-size: 13.5px; }
.aq-res-check i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; flex: none; }
.aq-res-check b { color: var(--navy); font-variant-numeric: tabular-nums; }
.aq-map-btns { margin-top: 10px; }
.aq-bigmap { height: calc(100vh - 170px); min-height: 480px; }
.aq-cluster div { border-radius: 50%; background: rgba(33,46,67,.92); color: #fff; display: grid; place-items: center; position: relative; box-shadow: 0 0 0 5px rgba(33,46,67,.18); font: 600 12.5px var(--sans); }
.aq-cluster i { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #dc2626; color: #fff; font: 700 10.5px/18px var(--sans); font-style: normal; text-align: center; border: 2px solid #fff; }
.aq-pop { font: 13px/1.45 var(--sans); min-width: 220px; }
.aq-pop-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.aq-pop-res { color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.aq-pop-meta { color: #6b7381; font-size: 12px; margin: 2px 0 6px; }
.aq-pop-com { background: #f5f7f8; border-radius: 6px; padding: 4px 8px; margin-bottom: 6px; }
.aq-pop audio { width: 100%; height: 32px; margin: 4px 0 6px; }
.aq-pop a { color: var(--accent); font-weight: 600; }
@media (max-width: 960px) { .aq-mapview { grid-template-columns: 1fr; } .aq-mapfilters { position: static; } .aq-bigmap { height: 65vh; } }
.aq-field .aq-res-check input[type=checkbox] { width: 16px; height: 16px; flex: none; margin: 0; accent-color: var(--accent); }
.aq-field .aq-res-check span { font-size: 13.5px; font-weight: 500; color: var(--text); }
.aq-field input, .aq-field select { min-width: 0; }
.aq-mapfilters .aq-two { gap: 8px; }
.aq-mapfilters .aq-field input[type=date] { padding: 0 6px; font-size: 13px; }

/* Fiche véhicule */
.veh-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.veh-head .page-title { margin: 0; }
.veh-head p { margin: 2px 0 0; }
.veh-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.veh-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-bottom: 14px; }
.veh-group { margin-bottom: 0; }
.veh-group h3 { display: flex; align-items: center; gap: 10px; font: 600 18px var(--serif); color: var(--navy); margin-bottom: 10px; }
.veh-dl { display: grid; grid-template-columns: minmax(130px, 45%) 1fr; gap: 0; margin: 0; font-size: 13.5px; }
.veh-dl dt { color: var(--muted); padding: 7px 8px 7px 0; border-top: 1px solid #f0f2f5; }
.veh-dl dd { margin: 0; padding: 7px 0; border-top: 1px solid #f0f2f5; font-weight: 500; word-break: break-word; }
.veh-dl dt:first-of-type, .veh-dl dt:first-of-type + dd { border-top: 0; }
.veh-dl input:not([type=checkbox]), .veh-dl select { width: 100%; height: 32px; border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; font-size: 13.5px; background: #fff; }
.veh-notes { width: 100%; border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; }
.doc-drop { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 2px dashed #c9d6e6; background: #f8fbff; }
.doc-drop select { height: 36px; border: 1px solid var(--border); border-radius: 9px; padding: 0 10px; background: #fff; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; text-align: left; }
.reading { display: flex; align-items: center; gap: 10px; background: var(--accent-soft); color: #0b3d8c; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; }
.reading.err { background: #fee2e2; color: #991b1b; }
.reading-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.reading-bar { width: 160px; height: 6px; background: rgba(255,255,255,.7); border-radius: 3px; overflow: hidden; } .reading-bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.review-table tr.on td { background: #f5f9ff; }
.review-table td { vertical-align: middle; }
.review-in input:not([type=checkbox]), .review-in select { width: 100%; min-width: 160px; height: 32px; border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; }
.deadlines { display: flex; flex-direction: column; gap: 10px; }
.deadline { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid #cbd5e1; border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.deadline-date { display: flex; flex-direction: column; align-items: flex-end; } .deadline-date strong { font-size: 17px; color: var(--navy); } .deadline-date span { font-size: 12.5px; color: var(--muted); }
.tone-b-red { border-left-color: #dc2626; } .tone-b-red .deadline-date span { color: #dc2626; font-weight: 600; }
.tone-b-amber { border-left-color: #d97706; } .tone-b-amber .deadline-date span { color: #b45309; font-weight: 600; }
.tone-b-green { border-left-color: #16a34a; }
.cg-import { position: relative; display: inline-flex; }
.cg-import-status { position: absolute; top: 44px; right: 0; z-index: 20; width: 380px; }
.cg-import-status .reading { box-shadow: var(--shadow); }
@media (max-width: 860px) { .veh-groups { grid-template-columns: 1fr; } .cg-import-status { width: 300px; } }

/* Flotte : conducteurs et documents OneDrive */
.drivers { display: flex; flex-direction: column; gap: 10px; }
.driver-ev { display: flex; gap: 16px; background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 12px; padding: 12px 14px; }
.driver-ev.current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.driver-date { width: 110px; flex: none; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.driver-ev .who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.driver-photos { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.driver-photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line, #e5e7eb); }
.od-docs { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.od-group { width: 100%; } .od-group h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.list.compact li a { display: flex; align-items: center; gap: 8px; padding: 6px 4px; color: inherit; text-decoration: none; }
.list.compact li a:hover { background: var(--accent-soft); border-radius: 6px; }
@media (max-width: 600px) { .driver-ev { flex-direction: column; gap: 6px; } }

/* ---------- SaveField ---------- */
.sf-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sf-hero-actions { display: flex; gap: 8px; position: relative; z-index: 1; flex-wrap: wrap; }
.btn.ghost.light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
.sf-months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 170px; padding-top: 18px; }
.sf-month { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; position: relative; }
.sf-month i { display: block; width: 100%; max-width: 34px; background: linear-gradient(180deg, var(--accent), var(--navy)); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.sf-month small { color: var(--muted); font-size: 11px; text-transform: capitalize; }
.sf-month-val { font-size: 11px; font-weight: 600; color: var(--navy); }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0; }
.sf-report { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.sf-report-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 16px; }
.sf-report-side .card { margin-bottom: 0; }
.sf-section h3 { font: 600 18px var(--serif); color: var(--navy); margin-bottom: 10px; }
.sf-dl { display: grid; grid-template-columns: minmax(140px, 34%) 1fr; margin: 0; }
.sf-dl dt, .sf-dl dd { padding: 8px 0; border-top: 1px solid var(--border); margin: 0; }
.sf-dl dt { color: var(--muted); font-size: 13px; padding-right: 12px; }
.sf-dl dd { font-weight: 500; white-space: pre-wrap; word-break: break-word; }
.sf-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.sf-thumb { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 110px; height: 110px; border-radius: 10px; overflow: hidden; background: #eef1f5; border: 1px solid var(--border); }
.sf-thumb img, video.sf-thumb { width: 100%; height: 100%; object-fit: cover; }
.sf-thumb.missing::after { content: 'Photo pas encore dans OneDrive'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px; font-size: 11px; color: var(--muted); background: #eef1f5; }
.sf-thumb-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.sf-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.sf-form-card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.sf-form-top { display: flex; gap: 12px; align-items: center; }
.sf-form-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sf-form-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.link-card:hover { border-color: var(--accent); }
.sf-builder-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.sf-title-input { font: 600 24px var(--serif); color: var(--navy); border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; background: transparent; min-width: 260px; }
.sf-title-input:hover, .sf-title-input:focus { border-color: var(--border); background: #fff; outline: 0; }
.sf-builder { display: grid; grid-template-columns: 210px 1fr 330px; gap: 14px; align-items: start; }
.sf-palette, .sf-side { position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow: auto; margin: 0; }
.sf-palette h4, .sf-settings h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 4px 0 8px; }
.sf-pal-group { display: flex; flex-direction: column; margin-bottom: 8px; }
.sf-pal-group small { color: var(--accent); font-weight: 600; margin: 4px 0 2px; }
.sf-pal-group button { display: flex; align-items: center; gap: 8px; border: 0; background: none; text-align: left; padding: 5px 6px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.sf-pal-group button:hover { background: var(--accent-soft); color: var(--accent); }
.sf-canvas { display: flex; flex-direction: column; gap: 12px; }
.sf-page { margin: 0; }
.sf-page-head, .sf-sec-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sf-page-head input, .sf-sec-head input { border: 1px solid transparent; border-radius: 7px; padding: 4px 6px; font-weight: 600; background: transparent; flex: 1; }
.sf-page-head input:focus, .sf-sec-head input:focus, .sf-page-head input:hover, .sf-sec-head input:hover { border-color: var(--border); background: #fff; outline: 0; }
.sf-sec { border: 1px dashed var(--border); border-radius: 10px; padding: 10px; margin-bottom: 10px; }
.sf-sec.current { border-color: var(--accent); background: #fafcff; }
.sf-empty { margin: 4px 0; }
.sf-field { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: #fff; margin-bottom: 6px; cursor: pointer; }
.sf-field.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sf-settings { display: flex; flex-direction: column; gap: 10px; }
.sf-settings .field span { font-size: 12.5px; font-weight: 600; color: #3a4558; }
.sf-settings input, .sf-settings select, .sf-settings textarea { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; background: #fff; }
.sf-checks { display: flex; gap: 14px; flex-wrap: wrap; }
.sf-rule { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: 9px; font-size: 12.5px; }
.sf-rule select[multiple] { width: 100%; }
.btn.danger { color: #b91c1c; }
.sf-fill { max-width: 760px; margin: 0 auto; }
.sf-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.sf-steps span { font-size: 12px; padding: 4px 10px; border-radius: 20px; background: #eef1f5; color: var(--muted); }
.sf-steps span.on { background: var(--navy); color: #fff; }
.sf-steps span.done { background: var(--accent-soft); color: var(--accent); }
.sf-q { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--border); }
.sf-q:first-of-type { border-top: 0; }
.sf-q > label { font-weight: 600; font-size: 13.5px; }
.sf-q .req { color: #dc2626; margin-left: 3px; }
.sf-q.err > label { color: #b91c1c; }
.sf-q input:not([type=checkbox]):not([type=file]), .sf-q select, .sf-q textarea { border: 1px solid var(--border); border-radius: 9px; padding: 9px 10px; background: #fff; width: 100%; font-size: 15px; }
.sf-static { margin: 0; color: var(--muted); white-space: pre-wrap; }
.sf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-chip { border: 1px solid var(--border); background: #fff; border-radius: 20px; padding: 7px 14px; cursor: pointer; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.sf-chip input { display: none; }
.sf-chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.sf-sign canvas { width: 100%; max-width: 600px; aspect-ratio: 3 / 1; border: 1px dashed var(--border); border-radius: 10px; background: #fff; touch-action: none; display: block; margin-bottom: 6px; }
.sf-loc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sf-fill-foot { display: flex; align-items: center; gap: 8px; margin: 16px 0 40px; }
.sf-csv { width: 100%; font: 12.5px/1.5 ui-monospace, Menlo, monospace; border: 1px solid var(--border); border-radius: 9px; padding: 10px; }
@media (max-width: 1100px) { .sf-builder { grid-template-columns: 1fr; } .sf-palette, .sf-side { position: static; max-height: none; } .sf-report { grid-template-columns: 1fr; } .sf-report-side { position: static; } }
@media (max-width: 640px) { .sf-dl { grid-template-columns: 1fr; } .sf-dl dd { border-top: 0; padding-top: 0; } .sf-months { gap: 3px; } }
@media print { .sidebar, .topbar, .page-actions, .sf-report-side .map-wrap { display: none !important; } .sf-report { grid-template-columns: 1fr; } }

/* ---------- Connexion (mode serveur) ---------- */
.proto-pill.online { color: #166534; background: #dcfce7; }
.login-screen { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(140deg, var(--navy) 0%, #1d3557 60%, #0b4f8a 100%); padding: 16px; }
.login-card { background: #fff; border-radius: 16px; padding: 34px 32px; width: 100%; max-width: 400px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.25); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.login-card h1 { font: 600 30px var(--serif); color: var(--navy); }
.login-card p { margin: 0; color: var(--muted); }
.brand-mark.big { width: 54px; height: 54px; border-radius: 14px; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.btn.big { padding: 12px 18px; font-size: 15px; }
.login-form { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.login-form input { border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; font-size: 15px; width: 100%; }
.login-form input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-code { text-align: center; letter-spacing: 6px; font-size: 22px !important; font-weight: 600; }
.login-form .alert { margin: 0; text-align: left; }
.login-form .link { background: none; border: 0; color: var(--accent); cursor: pointer; }
/* Fichiers en ligne */
.file-img-wait { display: inline-block; width: 64px; height: 64px; border-radius: 8px; background: #eef1f5; }
.reading-bar.big { width: 100%; height: 10px; background: #eef1f5; margin: 12px 0; }
.transfer pre { white-space: pre-wrap; max-height: 240px; overflow: auto; background: #f5f7f8; padding: 8px; border-radius: 8px; }
