/* Administration Taxilog GPS.
   Identite reprise du site taxilog.com : navy profond, jaune, boutons pilule.
   Ecrite a la main : aucun build Vite/Tailwind a lancer en production. */

:root {
  /* Palette de marque */
  --navy-900: #101735;
  --navy-800: #161F3D;
  --navy: #1B2547;
  --navy-600: #26325C;
  --yellow: #F5C63D;
  --yellow-600: #E5B52E;
  --yellow-100: #FDF4DA;

  /* Interface */
  --bg: #F5F6FA;
  --panel: #FFFFFF;
  --ink: #1B2547;
  --muted: #6E7896;
  --line: #E2E6F0;
  --ok: #17804C;
  --warn: #A9700B;
  --danger: #C0261E;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 23, 53, .06), 0 8px 24px rgba(16, 23, 53, .05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-decoration-color: rgba(27, 37, 71, .3); }
a:hover { color: var(--navy-600); }

h1 { font-size: 24px; font-weight: 800; letter-spacing: -.3px; margin: 0 0 4px; }
h2 { font-size: 16px; font-weight: 700; margin: 0 0 14px; color: var(--navy); }

/* ---- Barre de navigation ---- */

.topbar {
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 22px;
  height: 62px;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.topbar .brand img { width: 32px; height: 32px; display: block; }
.topbar .brand .wordmark {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.4px;
  color: #fff;
}
.topbar .brand .wordmark em { font-style: normal; color: var(--yellow); }
.topbar .brand .product {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
  border-left: 1px solid rgba(255, 255, 255, .2);
  padding-left: 10px;
  margin-left: 2px;
}

.topbar nav { display: flex; gap: 2px; flex: 1; }
.topbar nav a {
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 999px;
  white-space: nowrap;
}
.topbar nav a:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.topbar nav a.active { background: var(--yellow); color: var(--navy); }

.topbar .session { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.topbar .session .who { color: rgba(255, 255, 255, .7); text-align: right; line-height: 1.25; }
.topbar .session .who strong { display: block; color: #fff; font-weight: 600; }

.wrap { max-width: 1400px; margin: 0 auto; padding: 24px 22px 48px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin: 0; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 18px;
}

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

/* ---- Indicateurs ---- */

.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  border-top: 3px solid var(--yellow);
}
.kpi .value { font-size: 30px; font-weight: 800; line-height: 1.15; letter-spacing: -.5px; color: var(--navy); }
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.kpi.alert { border-top-color: var(--danger); }
.kpi.alert .value { color: var(--danger); }

/* ---- Tableaux ---- */

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  font-weight: 700;
  background: #FAFBFD;
  border-bottom: 1px solid var(--line);
}
tbody tr:hover { background: #FAFBFE; }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: Consolas, "Cascadia Mono", "Courier New", monospace; font-size: 13px; }

/* ---- Etiquettes d'etat ---- */

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.tag.online { background: #E3F5EA; color: var(--ok); }
.tag.silent { background: var(--yellow-100); color: var(--warn); }
.tag.disabled { background: #EDEFF5; color: var(--muted); }
.tag.danger { background: #FBE7E5; color: var(--danger); }
.tag.info { background: #E8EBF5; color: var(--navy); }

/* ---- Formulaires ---- */

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; color: var(--navy); }
input[type=text], input[type=email], input[type=password], input[type=search],
input[type=date], input[type=datetime-local], select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font: inherit;
  color: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245, 198, 61, .3);
}
textarea { min-height: 90px; resize: vertical; }
.checkbox { display: flex; align-items: center; gap: 9px; }
.checkbox input { width: auto; accent-color: var(--navy); }
.checkbox label { margin: 0; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 5px; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters .field { margin-bottom: 0; min-width: 180px; }

/* ---- Boutons ---- */

.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: #F1F3F9; color: var(--navy); }
.btn.primary {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--navy);
  font-weight: 700;
}
.btn.primary:hover { background: var(--yellow-600); border-color: var(--yellow-600); }
.btn.danger { background: #fff; border-color: #EBC3C0; color: var(--danger); }
.btn.danger:hover { background: #FBE7E5; }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions form { display: inline; }

/* ---- Messages ---- */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  border: 1px solid;
  border-left-width: 4px;
  font-size: 14px;
}
.alert.success { background: #EDF8F1; border-color: #BFE3CE; border-left-color: var(--ok); color: #10603A; }
.alert.error { background: #FCEBE9; border-color: #F0CAC6; border-left-color: var(--danger); color: #8E1C16; }
.alert.warn { background: var(--yellow-100); border-color: #EDD79A; border-left-color: var(--yellow); color: #7A5307; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

/* ---- Cartes ---- */

.map { height: 540px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.map.small { height: 330px; }

/* ---- Pagination ---- */

.pagination { display: flex; gap: 5px; list-style: none; padding: 0; margin: 16px 0 0; flex-wrap: wrap; }
.pagination li { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.pagination li.active { background: var(--navy); border-color: var(--navy); }
.pagination li.active span { color: #fff; font-weight: 700; }
.pagination a, .pagination span { display: block; padding: 6px 12px; text-decoration: none; font-size: 13px; color: var(--navy); }
.pagination .disabled span { color: #AEB6CB; }

/* ---- Connexion ---- */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;

  /* Repli si l'image ne charge pas : le degrade navy de la marque. */
  background-color: var(--navy-900);
  background-image:
    radial-gradient(ellipse at 50% 45%, rgba(16, 23, 53, .18) 0%, rgba(16, 23, 53, .74) 100%),
    url("../img/login-bg.jpg");
  /* Le WebP fait moitie moins lourd ; les navigateurs anciens gardent le JPEG. */
  background-image:
    radial-gradient(ellipse at 50% 45%, rgba(16, 23, 53, .18) 0%, rgba(16, 23, 53, .74) 100%),
    image-set(url("../img/login-bg.webp") type("image/webp"), url("../img/login-bg.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 18px;
  padding: 34px 32px;
  box-shadow: 0 30px 70px rgba(6, 10, 26, .6), 0 0 0 1px rgba(255, 255, 255, .1);
}
.login-card .brand { display: flex; align-items: center; justify-content: center; gap: 11px; margin-bottom: 6px; }
.login-card .brand img { width: 40px; height: 40px; }
.login-card .brand .wordmark { font-size: 25px; font-weight: 800; letter-spacing: -.5px; color: var(--navy); }
.login-card .brand .wordmark em { font-style: normal; color: var(--yellow-600); }
.login-card .sub {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  margin: 0 0 26px;
}
.login-card .btn.primary { width: 100%; padding: 11px; font-size: 15px; }

/* ---- Divers ---- */

.definition { display: grid; grid-template-columns: 190px 1fr; gap: 8px 16px; font-size: 14px; }
.definition dt { color: var(--muted); font-weight: 600; }
.definition dd { margin: 0; }
.empty { color: var(--muted); padding: 26px; text-align: center; font-size: 14px; }
