/* Atelier Cox — factures Odoo dans Mes commandes, DEV v1.
   Desktop: colonne PDF dédiée. <= 1100px: cartes lisibles sans scroll horizontal. */
.woocommerce-MyAccount-content.ac-account-content .ac-orders-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.ac-orders-table th,
.ac-orders-table td { box-sizing: border-box; }
.ac-orders-table th.ac-col-number { width: 18%; }
.ac-orders-table th.ac-col-date { width: 19%; }
.ac-orders-table th.ac-col-status { width: 23%; }
.ac-orders-table th.ac-col-total { width: 19%; }
.ac-orders-table th.ac-col-invoice { width: 14%; }
.ac-orders-table th.ac-col-view { width: 7%; }
.ac-orders-table th.ac-col-invoice,
.ac-orders-table td.ac-col-invoice { text-align: center; }
.ac-orders-table td.ac-col-invoice { vertical-align: middle; white-space: normal; }
.ac-orders-table td.ac-col-invoice .ac-invoice-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #d8e3d2;
  border-radius: 8px;
  color: #524235;
  background: #fff;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.ac-orders-table td.ac-col-invoice .ac-invoice-pdf svg { width: 23px; height: 23px; flex: none; }
.ac-orders-table td.ac-col-invoice .ac-invoice-pdf:hover {
  background: #f1f7e8;
  border-color: #8fbd46;
  color: #524235;
}
.ac-orders-table td.ac-col-invoice .ac-invoice-pdf:focus-visible {
  outline: 3px solid #8fbd46;
  outline-offset: 2px;
}
.ac-orders-table td.ac-col-invoice .ac-invoice-pending {
  display: inline-block;
  max-width: 100%;
  color: #736b62;
  font-size: 12px;
  line-height: 1.3;
}
.ac-orders-table .ac-col-view { text-align: center; }
.ac-orders-table .ac-order-products-cell { padding-top: 5px; }
@media (max-width: 1100px) {
  .woocommerce-MyAccount-content.ac-account-content .ac-orders-table,
  .woocommerce-MyAccount-content.ac-account-content .ac-orders-table tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }
  .woocommerce-MyAccount-content.ac-account-content .ac-orders-table thead { display: none !important; }
  .woocommerce-MyAccount-content.ac-account-content .ac-orders-table tr.ac-order-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 13px 15px;
    padding: 17px 18px 13px;
    width: 100%;
    min-width: 0;
    background: #faf9f7;
    border: 1px solid #e6e2dd;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    box-sizing: border-box;
  }
  .woocommerce-MyAccount-content.ac-account-content .ac-orders-table tr.ac-order-row > td {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    width: auto !important;
    min-width: 0;
    height: auto;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    text-align: left !important;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .ac-orders-table tr.ac-order-row > td::before {
    content: attr(data-label);
    display: block;
    margin: 0 0 4px;
    font: 600 12px/1.25 "niveau-grotesk", Arial, sans-serif;
    color: #786c5f;
  }
  .ac-orders-table tr.ac-order-row > td.ac-col-invoice .ac-invoice-pdf {
    min-height: 43px;
    min-width: 43px;
  }
  .ac-orders-table tr.ac-order-row > td.ac-col-view a.ac-order-view {
    min-height: 43px;
    min-width: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .woocommerce-MyAccount-content.ac-account-content .ac-orders-table tr.ac-order-products-row {
    display: block !important;
    width: 100%;
    min-width: 0;
    margin-bottom: 18px;
    border: 1px solid #e6e2dd;
    border-top: 0;
    border-radius: 0 0 10px 10px;
    box-sizing: border-box;
    background: #fff;
  }
  .woocommerce-MyAccount-content.ac-account-content .ac-orders-table tr.ac-order-products-row > td {
    display: block !important;
    width: 100% !important;
    padding: 12px 14px 15px !important;
    box-sizing: border-box;
    min-width: 0;
  }
  .ac-orders-table .ac-order-products,
  .ac-orders-table .ac-order-product { max-width: 100%; min-width: 0; }
}
@media (max-width: 420px) {
  .woocommerce-MyAccount-content.ac-account-content .ac-orders-table tr.ac-order-row {
    gap: 13px 10px;
    padding: 15px 14px 12px;
  }
  .ac-orders-table tr.ac-order-row > td {
    font-size: 13px;
    line-height: 1.4;
  }
  .ac-orders-table tr.ac-order-row > td.ac-col-invoice .ac-invoice-pending { font-size: 12px; }
  .ac-orders-table tr.ac-order-products-row > td { padding: 10px 12px 14px !important; }
}
