/**
 * Fichier : /assets/css/orders.css
 * Rôle    : Styles dédiés aux listes de commandes, détails, téléchargement PDF
 *           Corrige le débordement des colonnes dans account.php?tab=orders
 */

/* ══════════════════════════════════════════════════════════
   ORDERS LIST — corrige le débordement
══════════════════════════════════════════════════════════ */
.orders-list { padding: 0; }

.order-row {
  display: grid;
  grid-template-columns: 1.6fr 130px 120px 90px 28px;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid #181b1e;
  transition: background .2s;
  text-decoration: none;
  color: inherit;
  min-width: 0; /* important pour éviter le débordement */
}
.order-row:hover { background: rgba(255,255,255,.03); }
.order-row:last-child { border-bottom: 0; }

/* Numéro de commande */
.or-num { min-width: 0; overflow: hidden; }
.or-num b {
  display: block;
  font-size: 14px;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.or-num small { color: #666; font-size: 12px; }

/* Méthode paiement */
.or-method {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Montant */
.or-amount {
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  text-align: right;
  white-space: nowrap;
}

/* Flèche */
.or-arrow {
  color: var(--red);
  font-size: 20px;
  font-weight: 700;
  text-align: right;
  flex: none;
}

/* Status badge dans la liste */
.or-status .status-badge {
  font-size: 9px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════
   ORDER DETAIL — grille infos + bouton PDF
══════════════════════════════════════════════════════════ */
.order-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid #1a1d20;
}
.order-detail-header h3 { margin: 0; font-family: Oswald; font-size: 18px; font-style: italic; color: #fff; }

/* Bouton télécharger PDF dans le détail */
.btn-dl-pdf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .8px;
  text-decoration: none;
  transition: background .2s, transform .2s;
  white-space: nowrap;
}
.btn-dl-pdf:hover { background: #ff2929; transform: translateY(-1px); }
.btn-dl-pdf svg { flex: none; }
.pdf-ext { background: rgba(255,255,255,.2); padding: 2px 7px; font-size: 9px; letter-spacing: 1px; }

/* Grille détails commande */
.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #1e2124;
}
.od-info { background: #111416; padding: 18px 22px; }
.od-info small { display: block; font-size: 9px; letter-spacing: 1.2px; color: #555; font-weight: 800; margin-bottom: 8px; }
.od-info b { font-size: 14px; color: #fff; line-height: 1.5; }
.od-total { font-family: Oswald; font-size: 24px; color: var(--red); }

/* Table articles dans détail */
.order-items-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.order-items-table th {
  text-align: left; font-size: 10px; letter-spacing: 1.2px; color: #555;
  padding: 12px 22px; border-bottom: 1px solid #1e2124; background: #0d0f10;
  font-weight: 800;
}
.order-items-table th:not(:first-child) { text-align: right; }
.order-items-table td { padding: 15px 22px; border-bottom: 1px solid #181b1e; color: #d0d0d0; }
.order-items-table td:not(:first-child) { text-align: right; }
.order-items-table tr:hover td { background: rgba(255,255,255,.02); }
.order-items-table tr:last-child td { border-bottom: 0; }

/* Total ligne */
.order-items-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-top: 2px solid #1e2124;
  background: #0d0f10;
}
.order-items-total span { font-size: 12px; font-weight: 800; letter-spacing: .8px; color: #888; }
.order-items-total b { font-family: Oswald; font-size: 22px; color: var(--red); }

/* Bloc virement bancaire */
.bank-reminder {
  margin: 0;
  padding: 20px 22px;
  background: #1a0f00;
  border-top: 1px solid #3a2800;
}
.bank-reminder h4 { color: #f59e0b; margin: 0 0 10px; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.bank-reminder p { color: #d0c0a0; font-size: 14px; margin: 0 0 6px; line-height: 1.7; }
.bank-reminder .bank-ref { color: var(--red); font-weight: 900; font-size: 16px; }
.bank-iban-block { background: #0f0800; border: 1px solid #3a2800; padding: 12px 16px; margin-top: 12px; }
.bank-iban-block table { font-size: 13px; }
.bank-iban-block td:first-child { color: #777; padding: 4px 16px 4px 0; width: 160px; font-weight: 700; }
.bank-iban-block td:last-child { color: #d0c0a0; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE ORDERS
══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .order-row { grid-template-columns: 1fr 110px 30px; }
  .or-method { display: none; }
  .or-status  { display: none; }
  .order-detail-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px) {
  .order-row { grid-template-columns: 1fr auto 28px; gap: 8px; padding: 14px 16px; }
  .or-method { display: none; }
  .or-status  { display: none; }
  .order-detail-grid { grid-template-columns: 1fr; }
  .order-detail-header { flex-direction: column; align-items: flex-start; }
  .btn-dl-pdf { width: 100%; justify-content: center; }
  .order-items-table th, .order-items-table td { padding: 12px 16px; }
}
@media (max-width: 480px) {
  .order-row { padding: 12px 14px; }
  .or-num b { font-size: 13px; }
  .or-amount { font-size: 14px; }
}
