/* Styles pour l'impression de ticket POS */
@media print {
  @page {
    size: 80mm auto;
    margin: 0;
  }

  body {
    margin: 0;
    padding: 0;
  }

  /* Masquer tout sauf le ticket */
  body > *:not(.ticket-pos-container) {
    display: none !important;
  }

  .ticket-pos-container {
    display: block !important;
  }
}

.ticket-pos-container {
  display: none;
  width: 80mm;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.4;
  color: #000;
  background: #fff;
  padding: 10px;
  margin: 0 auto;
}

.ticket-pos-container.printing {
  display: block;
}

.ticket-header {
  text-align: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px dashed #000;
}

.ticket-logo {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 5px;
}

.ticket-company {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 3px;
}

.ticket-info {
  font-size: 10px;
  margin-bottom: 2px;
}

.ticket-title {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin: 10px 0;
  text-transform: uppercase;
}

.ticket-section {
  margin-bottom: 10px;
}

.ticket-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
  font-size: 11px;
}

.ticket-label {
  font-weight: bold;
}

.ticket-value {
  text-align: right;
}

.ticket-separator {
  border-top: 1px dashed #000;
  margin: 8px 0;
}

.ticket-separator-bold {
  border-top: 2px solid #000;
  margin: 10px 0;
}

.ticket-total {
  font-size: 14px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
  padding: 5px 0;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
}

.ticket-footer {
  text-align: center;
  margin-top: 15px;
  padding-top: 10px;
  border-top: 2px dashed #000;
  font-size: 10px;
}

.ticket-thank {
  font-weight: bold;
  margin-bottom: 5px;
}

.ticket-barcode {
  text-align: center;
  margin: 10px 0;
  font-size: 18px;
  letter-spacing: 2px;
  font-family: 'Libre Barcode 128', cursive;
}

/* Style pour le mode non-impression (prévisualisation) */
.ticket-pos-container:not(.printing) {
  border: 1px solid #ccc;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
