/* ==========================================================================
   LIVRE D'OR — mobile.css
   Adaptations smartphone : jusqu'à 767.98 px
   ========================================================================== */

@media (max-width: 767.98px) {
  .container,
  .container-fluid { --bs-gutter-x: 1.5rem; }

  .section { padding-block: 1.5rem; }

  .page-head { flex-direction: column; align-items: stretch; }
  .page-head__actions { width: 100%; }
  .page-head__actions .btn { flex: 1 1 auto; }

  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .form-control,
  .toolbar .form-select,
  .toolbar .btn { width: 100%; }

  .btn-mobile-block { width: 100%; }

  .form-actions { display: flex; flex-direction: column-reverse; gap: 0.5rem; }
  .form-actions .btn { width: 100%; }

  .breadcrumb {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }
  .breadcrumb::-webkit-scrollbar { display: none; }

  .pagination { flex-wrap: wrap; justify-content: center; gap: 0.25rem 0; }
  .pagination .page-extra { display: none; }

  .modal-dialog { margin: 0.5rem; }
  .modal-footer { flex-direction: column-reverse; align-items: stretch; }
  .modal-footer > .btn { width: 100%; margin: 0; }

  .ld-card__body,
  .ld-card__header,
  .ld-card__footer { padding-inline: 0.875rem; }

  /* Tableaux : colonnes secondaires masquées */
  .ld-table:not(.table-stack) .col-sec,
  .ld-table:not(.table-stack) .col-ter { display: none; }

  /* Tableaux transformés en cartes */
  .ld-table.table-stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .ld-table.table-stack,
  .ld-table.table-stack > tbody,
  .ld-table.table-stack > tbody > tr,
  .ld-table.table-stack > tbody > tr > td { display: block; width: 100%; }

  .ld-table.table-stack > tbody > tr {
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.875rem;
    background: var(--ld-white);
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius);
    box-shadow: var(--ld-shadow-sm);
  }
  .ld-table.table-stack > tbody > tr:hover { background: var(--ld-white); }

  .ld-table.table-stack > tbody > tr > td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    text-align: right;
    border: 0;
    border-bottom: 1px dashed var(--ld-border);
    background: transparent;
  }
  .ld-table.table-stack > tbody > tr > td:last-child { border-bottom: 0; }

  .ld-table.table-stack > tbody > tr > td::before {
    content: attr(data-label);
    flex: 0 0 38%;
    max-width: 38%;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ld-muted);
  }
  .ld-table.table-stack > tbody > tr > td[data-label=""]::before { display: none; }
  .ld-table.table-stack .table-actions { justify-content: flex-end; }

  /* Barre d'action collante (panier, checkout, fiche produit) */
  .sticky-action {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: var(--ld-white);
    border-top: 1px solid var(--ld-border);
    box-shadow: 0 -6px 18px rgba(11, 31, 58, 0.1);
  }
  .sticky-action .btn { flex: 1 1 auto; }
  body.has-sticky-action { padding-bottom: 5.5rem; }
}

@media (max-width: 575.98px) {
  .product-card__body { padding: 0.625rem; }
  .product-card__title { font-size: 0.9rem; }
  .price--lg { font-size: 1.35rem; }
}

@media (max-width: 359.98px) {
  .product-grid { grid-template-columns: minmax(0, 1fr); }
  .ld-logo { font-size: 1rem; letter-spacing: 0.04em; }
  .btn { padding-inline: 0.75rem; }
}