/* ============================================
   PAGES - Styles complémentaires
   ============================================ */

/* ====== LOGIN PAGE ====== */
#login-page input:focus {
  border-color: #006633 !important;
  box-shadow: 0 0 0 3px rgba(0,102,51,0.15) !important;
}

/* ====== NAVIGATION ACTIVE ====== */
.nav-item.active {
  background: rgba(255,255,255,0.15) !important;
}

/* ====== TABLE ACTIONS ====== */
td .btn + .btn { margin-left: 4px; }

/* ====== PRODUCT IMAGE FALLBACK ====== */
img[src=""] { display: none; }

/* ====== SESSION STATUS ====== */
#session-status .badge {
  font-size: 12px;
  padding: 6px 14px;
}

/* ====== STATS GRID RESPONSIVE ====== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

/* ====== CARD HOVER ====== */
.card {
  transition: box-shadow 0.2s;
}

/* ====== TABLE FIXED HEADER ====== */
.table-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--gray-50);
}

/* ====== ADMIN SESSIONS TABLE ====== */
#sessions-table-body tr td:nth-child(7) {
  font-weight: 700;
  font-size: 14px;
}

/* ====== PRODUCT ONLINE GRID EMPTY ====== */
.products-online-grid .empty-state {
  grid-column: 1 / -1;
}

/* ====== CHART CONTAINERS ====== */
.card-body canvas {
  max-height: 100%;
}

/* ====== INVENTORY TABLE ====== */
#inventory-table-body img {
  flex-shrink: 0;
}

/* ====== FORM VALIDATION ====== */
input:invalid {
  border-color: var(--red);
}

/* ====== NOTIFICATION AREA ====== */
#notif-message {
  resize: vertical;
  min-height: 90px;
}

/* ====== PRINT STYLES ====== */
@media print {
  .sidebar, .topbar, .btn, button { display: none !important; }
  .main-content { margin: 0 !important; }
  .page-content { padding: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ====== SCROLLABLE TABLES ====== */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ====== CATEGORY FILTER ROW ====== */
#caisse-categories,
#stock-category-filter,
#product-category-chips {
  padding: 4px 0;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: thin;
}

/* ====== PAGINATION ====== */
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 16px;
}

/* ====== DELIVERY MAP PLACEHOLDER ====== */
.delivery-map {
  background: var(--gray-100);
  border-radius: var(--radius-md);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 13px;
}

/* ====== RAPPROCHEMENT CAISSE ====== */
.rapprochement-table td:last-child {
  font-weight: 700;
}

/* ====== ARABIC RTL ADJUSTMENTS ====== */
body.rtl .nav-item i {
  margin-right: 0;
  margin-left: 0;
}

body.rtl .card-header {
  flex-direction: row-reverse;
}

body.rtl .stat-card {
  flex-direction: row-reverse;
}

body.rtl .stat-info {
  text-align: right;
}

body.rtl table thead th,
body.rtl table tbody td {
  text-align: right;
}

body.rtl .badge {
  direction: rtl;
}

body.rtl .modal-header {
  flex-direction: row-reverse;
}

body.rtl .flex.justify-between {
  flex-direction: row-reverse;
}

body.rtl .toast-container {
  right: auto;
  left: 24px;
}

body.rtl input,
body.rtl textarea,
body.rtl select {
  text-align: right;
}

body.rtl .topbar {
  flex-direction: row-reverse;
}

body.rtl .topbar-left {
  flex-direction: row-reverse;
}

body.rtl .topbar-right {
  flex-direction: row-reverse;
}

body.rtl .nav-item.active {
  border-right: none !important;
  border-left: 3px solid var(--gold) !important;
}

/* ====== DARK MODE PLACEHOLDER ====== */
/* (Peut être activé via toggle futur) */

/* ====== ANIMATION ====== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page.active {
  animation: fadeIn 0.25s ease;
}

.stat-card {
  animation: fadeIn 0.3s ease;
}

/* ====== PILL BADGES IN TOPBAR ====== */
.topbar-right .badge {
  font-size: 11px;
}

/* ====== STOCK PROGRESS BARS ====== */
.progress {
  position: relative;
}

/* ====== NUMBER FORMATTING ====== */
.currency-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ====== LARGE TOUCH TARGETS (Mobile) ====== */
@media (max-width: 768px) {
  .btn { min-height: 38px; }
  .nav-item { padding: 12px 16px; min-height: 48px; }
  .caisse-product { min-height: 160px; }
  td .btn { padding: 6px 10px; }
}

/* ====== FOCUS VISIBLE ====== */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
