:root {
  --tblr-font-sans-serif: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --tblr-primary: #206bc4;
}
body { font-feature-settings: "cv03", "cv04", "cv11"; }
.navbar-vertical { background: linear-gradient(180deg, #13203a 0%, #1d273b 100%) !important; }
.brand span { font-weight: 700; letter-spacing: .02em; margin-left: .4rem; }
.sidebar-user { border-top: 1px solid rgba(255,255,255,.08); }
.topbar { background: #fff; border-bottom: 1px solid var(--tblr-border-color); }
.page-body { margin-top: 1rem; }
.card { box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.kpi .h1 { font-weight: 700; }
.kpi .kpi-icon { width: 2.6rem; height: 2.6rem; border-radius: .6rem; display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; }
.thumb { height: 110px; object-fit: cover; }
.map { height: 340px; border-radius: var(--tblr-border-radius); z-index: 0; }
.map-sm { height: 230px; }
.history { max-height: 420px; overflow: auto; }
.table td, .table th { vertical-align: middle; }
.table-hover tbody tr[data-href] { cursor: pointer; }

/* Carte plein écran */
.map-page .page-header, .map-page footer { display: none; }
.map-page .page-body { margin: 0; }
.map-page .page-body > .container-xl { max-width: none; padding: 0; }
.map-shell { display: flex; height: calc(100vh - 57px); }
.map-panel { width: 330px; min-width: 330px; background: #fff; border-right: 1px solid var(--tblr-border-color); overflow-y: auto; }
#bigmap { flex: 1; z-index: 0; }
.layer-row { display: flex; align-items: center; gap: .5rem; padding: .3rem .75rem; }
.layer-row:hover { background: var(--tblr-bg-surface-secondary); }
.layer-swatch { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.measure-tip { background: #1d273b; color: #fff; border: 0; font-weight: 600; }
.leaflet-popup-content { min-width: 220px; }
.leaflet-popup-content table td { padding: 1px 6px 1px 0; vertical-align: top; }
.pin { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; }
.pin i { transform: rotate(45deg); color: #fff; font-size: 13px; }
.pin.late { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(214,57,57,.7);} 70% { box-shadow: 0 0 0 10px rgba(214,57,57,0);} 100% { box-shadow: 0 0 0 0 rgba(214,57,57,0);} }

/* Planning grille */
.grid-cell { min-width: 150px; font-size: .78rem; }
.grid-cell .chip { display: block; border-radius: 4px; padding: 2px 6px; margin-bottom: 3px; color: #fff; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid-cell.absent { background: repeating-linear-gradient(45deg, #f1f3f5, #f1f3f5 6px, #e9ecef 6px, #e9ecef 12px); }

/* Mobile */
.field-card { border-left: 4px solid var(--tblr-primary); }
@media (max-width: 991px) {
  .map-shell { flex-direction: column; height: auto; }
  .map-panel { width: 100%; min-width: 0; max-height: 40vh; }
  #bigmap { height: 60vh; }
}
@media print {
  .navbar-vertical, .topbar, .btn, form { display: none !important; }
  .page-wrapper { margin: 0 !important; }
}
.login-bg { background: radial-gradient(circle at 20% 20%, #2b6cb0 0%, #1d273b 55%, #101828 100%); min-height: 100vh; }
.fc .fc-toolbar-title { font-size: 1.15rem; }
.fc-event { cursor: pointer; }
