/* ==============================
   POLICE GOOGLE
============================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ==============================
   BASE
============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #0d1117;
  color: #f0f0f0;
  display: flex;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==============================
   SIDEBAR — Conteneur
============================== */
.sidebar {
  width: 240px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: #111111;
  border-right: 1px solid #1e1e1e;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
}

/* ==============================
   LOGO
============================== */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: #3b5bff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.logo-name {
  font-size: 15px;
  font-weight: 700;
  color: #f0f0f0;
}

/* ==============================
   NAVIGATION
============================== */
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #888888;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Au survol */
.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f0f0f0;
}



/* ==============================
   PROFIL UTILISATEUR (bas)
============================== */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 8px 0 8px;
  border-top: 1px solid #1e1e1e;
  margin-top: 16px;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #f0f0f0;
}

.user-logout {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #888888;
}

.user-logout:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.user-logout svg {
  width: 16px;
  height: 16px;
}

/* ==============================
   CONTENU PRINCIPAL
============================== */
.main-content {
  margin-left: 240px;
  flex: 1;
  padding: 32px;
}

/* ==============================
   PAGE CONNEXION
============================== */

.login-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin-left: 240px;
  flex: 1;
  padding-bottom: 12vh;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  color: #f0f0f0;
  margin-bottom: 6px;
}

.login-sub {
  font-size: 13px;
  color: #888888;
  margin-bottom: 28px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 220px;
}

.login-label {
  font-size: 12px;
  font-weight: 600;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.login-input {
  padding: 14px 16px;
  background: #1e1e1e;
  border: 1px solid #2e2e2e;
  border-radius: 10px;
  color: #f0f0f0;
  font-size: 20px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 12px;
  text-align: center;
  outline: none;
}

.login-input:focus {
  border-color: #3b5bff;
}

.login-error {
  font-size: 12px;
  color: #ef4444;
  text-align: center;
}

.login-btn {
  padding: 13px;
  background: #3b5bff;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
}

.login-btn:hover {
  background: #2e4fe0;
}

/* ==============================
   PAGE POINTAGE — index.php
============================== */

.checkin-page {
  max-width: 700px;
  margin: 0 auto;
  padding-top: 8px;
}

.checkin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.checkin-title {
  font-size: 24px;
  font-weight: 700;
  color: #f0f0f0;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.checkin-sub {
  font-size: 13px;
  color: #555;
}



.checkin-card {
  background: #111;
  border: 1px solid #1e1e1e;
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 20px;
}

.checkin-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}



.status-label {
  font-size: 12px;
  font-weight: 500;
  color: #555;
  letter-spacing: 0.3px;
}

.checkin-buttons {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.checkin-buttons form.checkin-form {
  display: flex;
  flex: 1;
  width: 100%;
}

.checkin-divider {
  width: 1px;
  background: #1e1e1e;
  margin: 0 20px;
  flex-shrink: 0;
}

.btn-checkin {
  width: 100%;
  height: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid #1e1e1e;
  border-radius: 16px;
  background: #161616;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  text-align: left;
}

.btn-checkin:hover {
  transform: translateY(-3px);
}

.btn-arrivee:hover {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.05);
  box-shadow: 0 6px 28px rgba(34, 197, 94, 0.1);
}

.btn-depart:hover {
  border-color: rgba(249, 115, 22, 0.5);
  background: rgba(249, 115, 22, 0.05);
  box-shadow: 0 6px 28px rgba(249, 115, 22, 0.1);
}

.btn-checkin:active {
  transform: scale(0.97) translateY(0);
}

.btn-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.btn-checkin:hover .btn-icon {
  transform: scale(1.08);
}

.btn-arrivee .btn-icon {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.btn-depart .btn-icon {
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

.btn-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.btn-title { 
  font-size: 15px; 
  font-weight: 700; 
  color: #f0f0f0; 
  line-height: 1; 
}
.btn-desc  { 
  font-size: 11px; 
  color: #555; 
}

.success-message {
  color: #22c55e;
  margin-top: 20px;
  font-weight: bold;
  text-align: center;
  padding: 12px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

/* ==============================
   VUE HIÉRARCHIQUE
============================== */

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #f0f4ff;
  letter-spacing: -0.02em;
}

.page-header p {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.table-card {
  background: #1a1d27;
  border: 1px solid #2a2d3e;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
}

.table-card table {
  width: 100%;
  border-collapse: collapse;
}

.table-card thead tr {
  background: linear-gradient(90deg, #1e2235 0%, #252840 100%);
  border-bottom: 1px solid #2e3150;
}

.table-card thead th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7c83b0;
}

.table-card tbody tr {
  border-bottom: 1px solid #1e2130;
  transition: background 0.18s ease;
}

.table-card tbody tr:last-child {
  border-bottom: none;
}

.table-card tbody tr:hover {
  background: rgba(99, 102, 241, 0.06);
}

.table-card tbody td {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: #c9d1f5;
  vertical-align: middle;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-arrive {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-depart {
  background: rgba(249, 115, 22, 0.12);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ── Date cell ── */
.date-time {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.date-time .date {
  font-weight: 500;
  color: #e2e8f0;
}



.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.page-link {
  padding: 8px 14px;
  background: #1a1d27;
  border: 1px solid #2a2d3e;
  border-radius: 8px;
  color: #c9d1f5;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.page-link:hover:not(.disabled) {
  background: #252840;
  border-color: #3b5bff;
  color: #fff;
}

.page-link.active {
  background: #3b5bff;
  border-color: #3b5bff;
  color: #fff;
}

.page-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==============================
   RESPONSIVE (MOBILES & TABLETTES)
============================== */
@media screen and (max-width: 768px) {
  
  body {
    flex-direction: column;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #1e1e1e;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .sidebar-logo {
    margin-bottom: 16px;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
  }

  .sidebar-user {
    width: 100%;
    justify-content: space-between;
    padding-top: 16px;
    margin-top: 16px;
  }

  .main-content {
    margin-left: 0;
    padding: 20px;
    width: 100%;
  }

  .login-section {
    margin-left: 0;
    padding: 20px;
    padding-bottom: 50vh;
    width: 100%;
  }

  .checkin-header {
    flex-direction: column;
    align-items: flex-start;
  }



  .checkin-buttons form.checkin-form {
    flex-direction: column;
    gap: 16px;
  }

  .checkin-divider {
    width: 100%;
    height: 1px;
    margin: 4px 0;
  }

  .table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-card table {
    min-width: 500px;
  }
}
