/* ==========================================================================
   GREY CORNER • THEME DESIGN 2 : MODERN MIDNIGHT NAVY & ELECTRIC AMBER
   ========================================================================== */

:root {
  --bg-deep: #070c18;
  --bg-main: #0b1528;
  --bg-card: rgba(16, 28, 54, 0.78);
  --bg-card-hover: rgba(22, 38, 72, 0.85);
  --bg-card-glass: rgba(13, 23, 46, 0.90);
  
  --stroke-subtle: rgba(59, 130, 246, 0.14);
  --stroke-bright: rgba(59, 130, 246, 0.32);
  --stroke-glow: rgba(0, 240, 255, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --amber-electric: #ffb703;
  --amber-glow: rgba(255, 183, 3, 0.28);
  --cyan-neon: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.25);
  --emerald-neon: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.28);
  --coral-electric: #ef4444;
  --coral-glow: rgba(239, 68, 68, 0.25);
  --indigo-soft: #818cf8;
  --indigo-glow: rgba(129, 140, 248, 0.20);

  --shadow-lg: 0 24px 60px rgba(3, 8, 20, 0.85);
  --shadow-glow: 0 0 50px rgba(0, 240, 255, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background:
    radial-gradient(750px 450px at 50% -5%, rgba(0, 240, 255, 0.12), transparent 55%),
    radial-gradient(850px 550px at 85% 105%, rgba(255, 183, 3, 0.09), transparent 60%),
    radial-gradient(650px 380px at -10% 50%, rgba(37, 99, 235, 0.10), transparent 55%),
    linear-gradient(165deg, var(--bg-deep) 0%, var(--bg-main) 50%, #0d1a33 100%);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
  -webkit-tap-highlight-color: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px;
}

/* ─────────────────────────────────────────
   CARTE PRINCIPALE
───────────────────────────────────────── */
.card {
  width: 100%;
  max-width: 420px;
  min-height: 96vh;
  border-radius: 40px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, rgba(16, 28, 54, 0.88), rgba(9, 18, 38, 0.95));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--stroke-bright);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    var(--shadow-lg),
    var(--shadow-glow);
  position: relative;
  margin: auto;
  overflow: visible;
}

.card::before {
  content: "";
  position: absolute;
  top: -1px; left: 15%; right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan-neon), var(--amber-electric), transparent);
  border-radius: 999px;
  pointer-events: none;
  z-index: 2;
}

.content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.label-caps {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--text-secondary);
}

.gold { color: var(--amber-electric); }
.cyan { color: var(--cyan-neon); }
.muted { color: var(--text-muted); }

/* Logo */
.logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0 6px;
}
.logo-img {
  height: 48px;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), filter .3s;
  filter: drop-shadow(0 4px 18px rgba(0, 240, 255, 0.20));
  user-select: none;
}
.logo-img:active { transform: scale(.95); }

.sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--stroke-bright), transparent);
  margin: 14px 0;
  flex-shrink: 0;
}

/* Barre de session */
.session-bar {
  margin: 8px 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid var(--stroke-subtle);
  border-radius: 20px;
}
.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
}
.session-dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--emerald-neon);
  box-shadow: 0 0 8px var(--emerald-neon);
  flex-shrink: 0;
}
.btn-logout {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke-subtle);
  color: var(--text-secondary);
  transition: .2s;
}
.btn-logout:active { opacity: .7; transform: scale(.96); }

/* Bannières & Offline */
.offline-bar {
  display: none;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.40);
  color: #fca5a5;
  border-radius: 14px;
  padding: 7px 12px;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: .05em;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.18);
}

.banner-wrap {
  display: none;
  gap: 10px;
  align-items: stretch;
  margin: 10px 0;
  position: sticky;
  top: 0;
  z-index: 20;
}
.banner {
  width: 100%;
  border-radius: 18px;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.banner.msg-urgent {
  background: rgba(45, 12, 18, 0.90);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fed7d7;
}
.banner.msg-info {
  background: rgba(14, 28, 60, 0.90);
  border: 1px solid var(--stroke-bright);
  color: #e0f2fe;
}

/* Boutons Publics */
.public-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.btn-base {
  width: 100%;
  border-radius: 20px;
  padding: 16px;
  font-size: 13.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: .2s cubic-bezier(.34, 1.56, .64, 1);
}
.btn-base:active { transform: scale(.975); }

.btn-planning {
  background: linear-gradient(135deg, #0284c7, #2563eb 60%, #1d4ed8);
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-menu {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke-subtle);
  color: var(--text-primary);
}
.btn-connexion {
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.16), rgba(255, 183, 3, 0.08));
  border: 1px solid rgba(255, 183, 3, 0.38);
  color: var(--amber-electric);
  box-shadow: 0 8px 24px rgba(255, 183, 3, 0.12);
}

.home-box {
  border-radius: 20px;
  padding: 14px;
  text-align: center;
  margin-top: 4px;
}
.home-box.msg-urgent {
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #ffd2d2;
}
.home-box.msg-info {
  background: rgba(0, 240, 255, 0.07);
  border: 1px solid var(--stroke-subtle);
  color: #dbeafe;
}

/* Formulaire Login */
.login-wrap {
  background: rgba(7, 14, 30, 0.65);
  border: 1px solid var(--stroke-bright);
  border-radius: 22px;
  padding: 16px;
  margin-top: 4px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.inpt {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke-subtle);
  border-radius: 16px;
  padding: 13px 14px;
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  outline: none;
  transition: .2s;
}
.inpt::placeholder { color: var(--text-muted); }
.inpt:focus {
  border-color: var(--cyan-neon);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}
.btn-login {
  width: 100%;
  border-radius: 16px;
  padding: 13px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  background: linear-gradient(135deg, #ffb703, #fb8500);
  border: none;
  color: #0b1528;
  box-shadow: 0 8px 24px rgba(255, 183, 3, 0.25);
  transition: .2s;
}
.btn-login:disabled { opacity: .45; cursor: not-allowed; }

/* ─────────────────────────────────────────
   TIROIRS D'ÉQUIPE (COLLABORATEURS)
───────────────────────────────────────── */
.drawer-header {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke-subtle);
  border-radius: 18px;
  padding: 14px 16px;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: .2s;
}
.drawer-header:active { background: rgba(0, 240, 255, 0.06); }

.poste-badge {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .16em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 240, 255, 0.10);
  border: 1px solid var(--stroke-subtle);
  color: var(--cyan-neon);
}

.staff-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(16, 28, 54, 0.70);
  border: 1px solid var(--stroke-subtle);
  transition: .18s cubic-bezier(.34, 1.56, .64, 1);
  cursor: pointer;
  user-select: none;
  text-align: left;
  width: 100%;
}
.staff-card:hover {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--stroke-bright);
  box-shadow: 0 4px 18px rgba(0, 240, 255, 0.15);
  transform: translateY(-1px);
}
.staff-card:active { transform: scale(.975); }

.staff-thumb {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan-neon), var(--amber-electric));
  padding: 1.5px;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.22);
  overflow: hidden;
}
.staff-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
  display: block;
}
.staff-thumb-fallback {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: var(--cyan-neon);
}

.staff-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.staff-name {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.staff-sub {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .10em;
  color: var(--cyan-neon);
  opacity: .8;
  margin-top: 2px;
}

/* ─────────────────────────────────────────
   CARTE COLLABORATEUR PRO (PROFILE HEADER)
───────────────────────────────────────── */
.profile-card {
  background: linear-gradient(160deg, rgba(18, 33, 66, 0.85), rgba(11, 22, 45, 0.90));
  border: 1px solid var(--stroke-bright);
  border-radius: 26px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  margin-bottom: 18px;
  box-shadow: 0 14px 34px rgba(3, 9, 24, 0.40);
  position: relative;
  overflow: hidden;
}
.profile-card::after {
  content: "";
  position: absolute;
  top: -40px; right: -40px; width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.18), transparent 70%);
  pointer-events: none;
}
.avatar-ring {
  width: 56px; height: 56px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan-neon), var(--amber-electric));
  padding: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
  overflow: hidden;
}
.avatar-inner {
  width: 100%; height: 100%;
  border-radius: 999px;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  color: var(--cyan-neon);
}
.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
  display: block;
}
.username-display {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* ─────────────────────────────────────────
   GPS RADAR PILL & VALIDATION
───────────────────────────────────────── */
.gps-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(7, 15, 33, 0.75);
  border: 1px solid var(--stroke-bright);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.30);
  transition: .3s;
}
.gps-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
  transition: .3s;
}
.gps-dot.searching {
  background: var(--amber-electric);
  box-shadow: 0 0 10px var(--amber-electric);
  animation: blink 1s infinite;
}
.gps-dot.ok {
  background: var(--emerald-neon);
  box-shadow: 0 0 12px var(--emerald-neon);
}
.gps-dot.bad, .gps-dot.error, .gps-dot.denied {
  background: var(--coral-electric);
  box-shadow: 0 0 10px var(--coral-electric);
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Bouton Pointage Électrique */
.btn-main-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.btn-main-wrap.gps-ready::before,
.btn-main-wrap.gps-ready::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 36px;
  border: 2px solid rgba(0, 240, 255, 0.40);
  animation: pulse-ring 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  pointer-events: none;
}
.btn-main-wrap.gps-ready::after {
  animation-delay: .7s;
  border-color: rgba(255, 183, 3, 0.35);
}

@keyframes pulse-ring {
  0%   { transform: scale(.96); opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: scale(1.10); opacity: 0; }
}

.btn-main {
  width: 100%;
  border-radius: 26px;
  padding: 24px;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .14em;
  position: relative;
  overflow: hidden;
  transition: .3s cubic-bezier(.34, 1.56, .64, 1);
  background: linear-gradient(135deg, #00f0ff 0%, #0284c7 45%, #ffb703 100%);
  color: #070e1c;
  box-shadow: 0 16px 40px rgba(0, 240, 255, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.40);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.btn-main::before {
  content: "";
  position: absolute;
  top: 0; left: -75%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-18deg);
  transition: left .6s ease;
  pointer-events: none;
}
.btn-main:not(:disabled):hover::before { left: 130%; }
.btn-main:not(:disabled):active { transform: scale(.975); box-shadow: 0 8px 24px rgba(0, 240, 255, 0.25); }
.btn-main:disabled {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  box-shadow: none;
  border-color: var(--stroke-subtle);
  cursor: not-allowed;
  letter-spacing: .10em;
}

.btn-gps-retry {
  display: none;
  margin-top: 12px;
  width: 100%;
  border-radius: 18px;
  padding: 12px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .10em;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--stroke-bright);
  color: var(--cyan-neon);
  transition: .2s;
}
.btn-gps-retry:active { transform: scale(.98); }

.pointed-box {
  padding: 22px 18px;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0.04));
  border: 1px solid rgba(16, 185, 129, 0.40);
  text-align: center;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.18);
  animation: popIn .45s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes popIn {
  from { transform: scale(.88); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.pointed-box.pointed-ontime {
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.22), rgba(16, 185, 129, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.55);
  box-shadow: 0 14px 35px rgba(16, 185, 129, 0.25);
}

.pointed-box.pointed-mild-late {
  background: linear-gradient(160deg, rgba(245, 158, 11, 0.22), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.55);
  box-shadow: 0 14px 35px rgba(245, 158, 11, 0.25);
}

.pointed-box.pointed-late {
  background: linear-gradient(160deg, rgba(239, 68, 68, 0.22), rgba(239, 68, 68, 0.05));
  border: 1px solid rgba(239, 68, 68, 0.55);
  box-shadow: 0 14px 35px rgba(239, 68, 68, 0.25);
}

.pointed-check {
  width: 54px; height: 54px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.30), rgba(16, 185, 129, 0.10));
  border: 2px solid var(--emerald-neon);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
  font-size: 22px;
  box-shadow: 0 0 16px var(--emerald-glow);
}

.pointed-check.pointed-check-ontime {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(16, 185, 129, 0.12));
  border: 2px solid var(--emerald-neon);
  box-shadow: 0 0 20px var(--emerald-glow);
}

.pointed-check.pointed-check-mild-late {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(245, 158, 11, 0.12));
  border: 2px solid var(--amber-electric);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.45);
}

.pointed-check.pointed-check-late {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(239, 68, 68, 0.12));
  border: 2px solid var(--coral-electric);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.45);
}

.pointed-msg {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.pointed-msg-ontime {
  color: var(--emerald-neon);
  text-shadow: 0 0 12px var(--emerald-glow);
}
.pointed-msg-mild-late {
  color: #fde68a;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}
.pointed-msg-late {
  color: #fca5a5;
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.pointed-time {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--emerald-neon);
  letter-spacing: -0.02em;
  text-shadow: 0 0 24px var(--emerald-glow);
  line-height: 1;
}
.pointed-time.pointed-time-mild-late {
  color: #fbbf24;
  text-shadow: 0 0 24px rgba(245, 158, 11, 0.5);
}
.pointed-time.pointed-time-late {
  color: #f87171;
  text-shadow: 0 0 24px rgba(239, 68, 68, 0.5);
}

.btn-planning-inner {
  background: linear-gradient(135deg, #0284c7, #2563eb 60%, #1d4ed8);
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  width: 100%;
  border-radius: 20px;
  padding: 15px 18px;
  font-size: 13.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: .18s cubic-bezier(.34, 1.56, .64, 1);
}
.btn-planning-inner:active { transform: scale(.975); }

.btn-reset-device {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--text-muted);
  transition: .2s;
  padding: 8px;
}
.btn-reset-device:hover { color: var(--text-secondary); }

/* ─────────────────────────────────────────
   HISTORIQUE MENSUEL & KPIS DESIGN 2
───────────────────────────────────────── */
.histo-wrap {
  margin-top: 18px;
  background: rgba(11, 21, 44, 0.70);
  border: 1px solid var(--stroke-bright);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(2, 6, 18, 0.45);
}

.histo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--stroke-subtle);
  background: rgba(16, 31, 66, 0.60);
}

.histo-nav-btn {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--stroke-bright);
  color: var(--cyan-neon);
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: .15s;
  user-select: none;
}
.histo-nav-btn:hover:not(:disabled) {
  background: rgba(0, 240, 255, 0.20);
  border-color: var(--cyan-neon);
  box-shadow: 0 0 10px var(--cyan-glow);
}
.histo-nav-btn:active:not(:disabled) { transform: scale(.92); }
.histo-nav-btn:disabled { opacity: .25; cursor: not-allowed; }

.histo-month-title {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .04em;
  text-transform: capitalize;
  min-width: 115px;
  text-align: center;
}

.histo-toggle {
  display: inline-flex;
  background: rgba(4, 9, 20, 0.60);
  border: 1px solid var(--stroke-subtle);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}
.histo-tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: .18s;
}
.histo-tab-btn.active {
  background: linear-gradient(135deg, var(--cyan-neon), #0284c7);
  color: #070e1c;
  font-weight: 900;
  box-shadow: 0 2px 8px var(--cyan-glow);
}

/* Grille des 4 KPIs */
.histo-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 12px;
  background: rgba(6, 13, 28, 0.50);
  border-bottom: 1px solid var(--stroke-subtle);
}
.histo-kpi-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 4px;
  border-radius: 14px;
  background: rgba(16, 31, 66, 0.55);
  border: 1px solid var(--stroke-subtle);
  transition: transform .18s ease, border-color .2s;
}
.histo-kpi-item:hover { transform: translateY(-1px); }

.histo-kpi-item.kpi-present {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}
.histo-kpi-item.kpi-late {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
}
.histo-kpi-item.kpi-cumul {
  background: rgba(255, 183, 3, 0.08);
  border-color: rgba(255, 183, 3, 0.25);
}
.histo-kpi-item.kpi-off {
  background: rgba(129, 140, 248, 0.08);
  border-color: rgba(129, 140, 248, 0.25);
}

.histo-kpi-num {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
}
.histo-kpi-lbl {
  font-size: 7.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .10em;
  color: var(--text-secondary);
  margin-top: 3px;
  white-space: nowrap;
}

/* Liste de défilement */
.histo-list-scroll {
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 240, 255, 0.25) transparent;
}
.histo-list-scroll::-webkit-scrollbar { width: 4px; }
.histo-list-scroll::-webkit-scrollbar-track { background: transparent; }
.histo-list-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.30);
  border-radius: 999px;
}

.histo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.08);
  font-size: 11.5px;
  font-weight: 700;
  transition: background .15s;
}
.histo-row:last-child { border-bottom: none; }
.histo-row:hover { background: rgba(0, 240, 255, 0.03); }

.histo-date {
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  min-width: 90px;
}
.histo-day {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
  min-width: 34px;
}
.histo-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 800;
}
.histo-dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  flex-shrink: 0;
}

.histo-present { color: var(--emerald-neon); }
.histo-absent  { color: var(--text-muted); }
.histo-conge   { color: var(--amber-electric); }
.histo-retard  { color: var(--coral-electric); }
.histo-retard-mild { color: var(--amber-electric); }

.histo-retard-badge {
  font-size: 9px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  letter-spacing: .02em;
  white-space: nowrap;
}
.histo-retard-badge-mild {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fde68a;
}
.histo-ontime-badge {
  font-size: 8.5px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.40);
  color: #6ee7b7;
  white-space: nowrap;
}
.histo-off-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(129, 140, 248, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.35);
  color: #c7d2fe;
}
.histo-today { background: rgba(0, 240, 255, 0.05); }

/* ─────────────────────────────────────────
   SUPERVISION GÉRANT
───────────────────────────────────────── */
.admin-wrap {
  display: none;
  flex-direction: column;
  gap: 10px;
  background: rgba(11, 21, 44, 0.75);
  border: 1px solid var(--stroke-bright);
  border-radius: 24px;
  padding: 16px;
  margin-top: 10px;
}
.admin-list {
  max-height: 42vh;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--stroke-subtle);
  background: rgba(4, 9, 20, 0.50);
}
.admin-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid var(--stroke-subtle);
  font-size: 11.5px;
  font-weight: 700;
}
.admin-row:last-child { border-bottom: none; }
.btn-reset-one {
  background: rgba(239, 68, 68, 0.14);
  color: #ffb5b5;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 6px 12px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: .2s;
}
.btn-reset-all {
  background: linear-gradient(135deg, #7f1d1d, #991b1b);
  color: #fff;
  border: 1px solid rgba(239, 68, 68, 0.50);
  padding: 13px;
  border-radius: 16px;
  font-weight: 900;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.30);
}

/* Toast */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 24px; z-index: 9999;
  background: rgba(7, 15, 33, 0.94);
  border: 1px solid var(--stroke-bright);
  color: #fff;
  padding: 12px 24px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  display: none;
  max-width: min(400px, calc(100vw - 24px));
  text-align: center;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.70), 0 0 20px var(--cyan-glow);
  animation: toastIn .25s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes toastIn {
  from { transform: translateX(-50%) translateY(12px) scale(.94); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0)    scale(1);    opacity: 1; }
}

.scroll { overflow-y: auto; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }

/* Effet haptique visuel (vibration d'écran pour iOS / navigateurs sans vibreur physique) */
@keyframes hapticShake {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3px, 1.5px); }
  40%  { transform: translate(3px, -1.5px); }
  60%  { transform: translate(-2px, 1px); }
  80%  { transform: translate(2px, -1px); }
  100% { transform: translate(0, 0); }
}
.haptic-shake {
  animation: hapticShake 0.28s ease-in-out;
}

