/* ============================================
   CAISSE TACTILE - Styles spécifiques
   ============================================ */

/* ====== CAISSE LAYOUT ====== */
#caisse-body {
  display: flex !important;
  gap: 16px;
  height: calc(100vh - 175px);
}

.caisse-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding: 4px;
}

/* ====== PRODUCT CARD (Caisse) ====== */
.caisse-product {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  user-select: none;
}

.caisse-product:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,102,51,0.15);
}

.caisse-product:active {
  transform: scale(0.97);
}

.caisse-product.out-of-stock {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.caisse-product-img {
  position: relative;
  height: 95px;
  overflow: hidden;
  background: var(--gray-100);
}

.caisse-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.caisse-product:hover .caisse-product-img img {
  transform: scale(1.05);
}

.out-badge {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.cart-qty-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--red);
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.caisse-product-info {
  padding: 8px 10px;
}

.caisse-product-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.caisse-product-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
}

.caisse-product-stock {
  font-size: 10px;
  margin-top: 2px;
}

/* ====== CART ====== */
.caisse-cart {
  flex-shrink: 0;
}

/* ====== QTY CONTROL ====== */
.qty-control {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--gray-100);
  border-radius: 6px;
  padding: 2px;
  width: fit-content;
}

.qty-control button {
  background: white;
  border: 1px solid var(--gray-200);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  color: var(--gray-700);
}

.qty-control button:hover {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

.qty-control span {
  min-width: 28px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

/* ====== PAYMENT METHOD BUTTONS ====== */
.payment-method-btn {
  cursor: pointer;
  user-select: none;
}

.payment-method-btn input[type="radio"] {
  display: none;
}

.payment-method-btn div {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.payment-method-btn div i {
  font-size: 18px;
}

.payment-method-btn input:checked + div {
  border-color: var(--green);
  background: var(--green-pale);
  color: var(--green);
}

/* ====== CLIENT SELECT ITEMS ====== */
.client-select-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.15s;
}

.client-select-item:hover {
  border-color: var(--green);
  background: var(--green-pale);
}

/* ====== INLINE INPUT (Inventory) ====== */
.inline-input {
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  text-align: center;
  border: 1.5px solid var(--gray-200) !important;
  transition: border-color 0.2s;
}

.inline-input:focus {
  border-color: var(--green) !important;
  outline: none;
}

/* ====== KANBAN BOARD ====== */
.kanban-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.kanban-col {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.kanban-col-header {
  padding: 12px 16px;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1.5px solid var(--gray-200);
}

.kanban-count {
  margin-left: auto;
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 12px;
}

.kanban-items {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
  max-height: 450px;
  overflow-y: auto;
}

.kanban-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 12px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.kanban-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--green);
}

/* ====== PRODUCTS ONLINE GRID ====== */
.products-online-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.product-online-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--gray-200);
  overflow: hidden;
  transition: all 0.2s;
}

.product-online-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-online-img {
  position: relative;
  height: 150px;
  overflow: hidden;
  background: var(--gray-100);
  cursor: pointer;
}

.product-online-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-online-img:hover img {
  transform: scale(1.05);
}

.product-online-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
}

.product-online-badge.online {
  background: var(--green);
  color: white;
}

.product-online-badge.offline {
  background: var(--gray-500);
  color: white;
}

.product-online-body {
  padding: 12px;
}

.product-online-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-online-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--green);
}

/* ====== SESSION RAPPROCHEMENT ====== */
.rapprochement-ok {
  background: var(--green-pale);
  border: 1px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: var(--green);
  font-weight: 600;
  font-size: 13px;
}

.rapprochement-diff {
  background: var(--red-pale);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: var(--red);
  font-weight: 600;
  font-size: 13px;
}

/* ====== RESPONSIVE CAISSE ====== */
@media (max-width: 900px) {
  #caisse-body {
    flex-direction: column;
    height: auto;
  }
  .caisse-cart {
    width: 100% !important;
  }
  .caisse-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  .kanban-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .products-online-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .caisse-products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
