* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; background: #f5f7fb; color: #202636; }
.topbar { padding: 12px 18px; background: #1f2a44; color: #fff; display:flex; justify-content:space-between; align-items:center; }
.topbar a { color:#fff; text-decoration:none; }
.top-actions { display:flex; align-items:center; gap:10px; }
.top-actions button { width:auto; background:#35518a; border-color:#4666a8; }
.app-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; padding: 12px; }
.list-panel, .edit-panel { background:#fff; border-radius: 10px; padding: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.list-panel { max-height: calc(100vh - 92px); overflow: auto; }
.edit-panel { max-height: calc(100vh - 92px); overflow: auto; }
.filters { display:grid; grid-template-columns: 1.2fr .7fr .7fr auto; gap: 8px; margin-bottom: 10px; }
input, select, textarea, button { width: 100%; padding: 8px; border: 1px solid #d3d9e6; border-radius: 8px; font: inherit; }
button { cursor:pointer; background: #2f6fec; color:#fff; border-color:#2f6fec; }
button:hover { filter: brightness(0.95); }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid #ebeff5; text-align: left; padding: 8px; font-size: 14px; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f7faff; }
.st { display:inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.st-a_valider { background: #fff1cc; color: #8d6b0f; }
.st-valide { background: #daf6df; color: #1b7a2e; }
.st-rejete { background: #ffdfe2; color: #a0132d; }
.st-en_attente { background: #dde9ff; color: #1d4ea6; }
.panel-head { display:flex; justify-content:space-between; align-items:center; gap:8px; position: sticky; top: 0; background: #fff; padding-bottom: 8px; z-index: 3; }
.ghost-link { display:inline-block; padding:6px 10px; border:1px solid #d3d9e6; border-radius:8px; text-decoration:none; color:#1f2a44; font-size:13px; }
.ghost-link:hover { background:#f7faff; }
.form-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.row { margin-bottom: 2px; }
.row-span-2 { grid-column: span 2; }
.cols-2 { display:grid; grid-template-columns: 1fr 1fr; gap:8px; }
.actions { display:grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; margin-top: 10px; position: sticky; bottom: 0; background: #fff; padding-top: 8px; }
.import-box { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e9edf4; }
.ok { color: #0a8f3f; }
.error { color: #bc1232; }
.login-wrap { display:flex; justify-content:center; align-items:center; min-height:100vh; }
.card { background: #fff; border-radius: 12px; padding: 20px; width: 360px; box-shadow:0 2px 10px rgba(0,0,0,.1); }
.hp { display:none; }
.hint { font-size: 12px; color: #64748b; }
.geo-panel { margin: 0 12px 12px; background:#fff; border-radius:10px; box-shadow:0 2px 8px rgba(0,0,0,.07); padding: 12px; }
.geo-panel.hidden { display:none; }
.geo-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.geo-grid { display:grid; grid-template-columns: 1.2fr .8fr; gap:12px; }
#fr-map { height: 420px; border: 1px solid #e6ebf3; border-radius: 10px; }
#dept-table { width:100%; border-collapse:collapse; }
#dept-table th,#dept-table td { border-bottom:1px solid #eaf0f7; padding:8px; font-size:13px; text-align:left; }
@media (max-width: 980px) {
  .app-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .row-span-2 { grid-column: span 1; }
  .actions { grid-template-columns: 1fr 1fr; position: static; }
  .list-panel, .edit-panel { max-height: none; }
  .geo-grid { grid-template-columns: 1fr; }
  #fr-map { height: 300px; }
}
