.page-header {
  margin-top: 3.5rem;
}

.page-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-header__actions {
  display: flex;
  gap: 0.75rem;
}

/* Header compact avec boutons */
.page-header-compact {
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  background: #ffffff;
}

.page-header-compact__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

/* Boutons avec animation hover */
.nav-button-compact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
  background: #f3f4f6;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.nav-button-compact:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
  background: #e5e7eb;
}

.nav-button-compact--primary {
  background: #3b82f6;
  color: white;
}

.nav-button-compact--primary:hover {
  background: #2563eb;
}

.nav-button-icon {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.nav-button-text {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
  margin: 0;
}

.nav-button-compact:hover .nav-button-text {
  max-width: 200px;
  opacity: 1;
  margin-left: 0.5rem;
}

.nav-button-compact:hover .nav-button-icon {
  transform: scale(1.1);
}

.page-title {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-subtitle {
  margin: 0.5rem 0 0;
  opacity: 0.9;
  font-size: 1.1rem;
}

.page-section {
  padding: 2rem;
}

.search-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.search-container--full {
  flex: 1;
}

.is-hidden {
  display: none !important;
}

.search-info {
  margin-bottom: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #0ea5e9;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(14, 165, 233, 0.1);
}

.search-info__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.search-info__icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #0ea5e9;
}

.search-info__title {
  font-weight: 600;
  color: #0c4a6e;
  font-size: 0.95rem;
}

.search-info__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-info__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-info__item-icon {
  width: 1rem;
  height: 1rem;
  color: #059669;
}

.search-info__item-icon--accent {
  color: #7c3aed;
}

.search-info__item-text {
  color: #065f46;
  font-size: 0.9rem;
}

.search-info__item-value {
  color: #5b21b6;
  font-size: 0.9rem;
  font-weight: 600;
}

.page-section--light {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.glasses-client {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.glasses-client__title {
  margin: 0;
  color: var(--gray-900);
  font-size: 1.5rem;
  font-weight: 700;
}

.glasses-client__meta {
  margin: 0.5rem 0 0 0;
  color: var(--gray-600);
}

.glasses-client__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.loading-text {
  margin-top: 1rem;
  font-size: 1rem;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.empty-description {
  margin: 0;
  color: var(--gray-500);
}

.form-hint {
  color: var(--gray-600);
  margin-top: 0.25rem;
  display: block;
  font-size: 0.85rem;
}

.table-sortable {
  cursor: pointer;
  user-select: none;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.code-badge {
  display: inline-flex;
  align-items: center;
  background: #f3f4f6;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.85rem;
  color: var(--gray-700);
}

.postit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.postit-toggle {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  background: #ffd700;
  color: #333333;
  border: 2px solid #f0e68c;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.postit-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.25);
}

.icon-sm {
  width: 1rem;
  height: 1rem;
}

.postit-textarea {
  background: #fffacd;
  border: 2px solid #ffd700;
  display: none;
}

.postit-textarea.is-visible {
  display: block;
}

.postit-preview {
  color: var(--gray-700);
  font-size: 0.9rem;
  font-weight: 500;
  display: none;
  padding: 0.5rem;
  background: #fffacd;
  border: 1px dashed #ffd700;
  border-radius: 4px;
  max-height: 60px;
  overflow: hidden;
}

.postit-preview.is-visible {
  display: block;
}

.equipment-section {
  display: none;
  padding: 2rem;
  border-top: 1px solid var(--gray-200);
}

.equipment-section.is-visible {
  display: block;
}

.equipment-section__title {
  margin: 0 0 1.5rem;
  color: var(--gray-800);
  font-size: 1.1rem;
  font-weight: 600;
}

.equipment-section__actions {
  display: flex;
  gap: 1rem;
}

.equipment-section__action-btn {
  flex: 1;
}

.postit-modal {
  max-width: 500px;
  background: #fffacd;
  border: 3px solid #ffd700;
  box-shadow: 0 10px 40px rgba(255, 215, 0, 0.3);
}

.postit-modal__header {
  background: #ffd700;
  border-bottom: 3px solid #f0e68c;
}

.postit-modal__title {
  color: #333333;
  margin: 0;
}

.postit-modal__textarea {
  width: 100%;
  height: 200px;
  padding: 1rem;
  border: 2px dashed #f0e68c;
  border-radius: 8px;
  font-family: 'Comic Sans MS', 'Trebuchet MS', cursive;
  font-size: 14px;
  resize: none;
  background: #fffef0;
}

.postit-modal__hint {
  color: #666666;
  margin-top: 0.5rem;
  display: block;
}

.postit-modal__footer {
  background: #f0e68c;
  border-top: 3px solid #ffd700;
}

.modal-body--compact {
  padding: 1.5rem;
}

/* Pagination */
/* ==============================
   PAGINATION — shadcn style
   ============================== */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
  padding: 0.75rem 0;
  background: transparent;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  background: transparent;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.pagination-btn:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pagination-number {
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  background: transparent;
  color: #374151;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-number:hover:not(:disabled):not(.pagination-number--active) {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.pagination-number--active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.pagination-number--active:hover {
  background: #1e293b;
  border-color: #1e293b;
}

.pagination-number:disabled {
  cursor: default;
}

.pagination-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  color: #9ca3af;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

.date-selector {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.date-selector__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--gray-700);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.date-selector__trigger:hover:not(.date-selector__trigger--disabled) {
  background: #e0f2fe;
  border-color: rgba(37, 99, 235, 0.5);
  color: #0c4a6e;
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.25);
}

.date-selector__trigger--disabled {
  cursor: default;
  opacity: 0.65;
}

.date-selector__caret {
  font-size: 1.1rem;
  line-height: 1;
}

.date-selector__menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 0.25rem;
  z-index: 60;
  display: none;
}

.date-selector__menu.open {
  display: block;
}

.date-selector__option {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--gray-700);
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.date-selector__option:hover {
  background: #e0f2fe;
  color: #0f172a;
}

.date-selector__option--active,
.date-selector__option--active:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #1d4ed8;
  font-weight: 600;
}

/* ==============================
   CLEAN DATA TABLE — all pages
   ============================== */

/* Override overflow on ancestors so sticky works relative to viewport */
.main-container:has(.clients-table) {
  overflow: visible !important;
}

.main-container:has(.clients-table) > main {
  overflow: visible !important;
}

.clients-container {
  overflow: visible !important;
  padding: 0 !important;
  display: block !important;
}

/* Container — all dynamic table wrappers */
#clientsList,
#framesList,
#doctorsList,
#monturesList,
#verresList,
#fournisseursList,
#storesList {
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  overflow: visible !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
  padding: 0 !important;
  display: block !important;
}

/* Override the JS-generated wrapper div inside table containers
   (articles.js generates a <div style="height:100%;overflow:auto;box-shadow;border-radius"> around the table) */
#framesList > div,
#clientsList > div,
#doctorsList > div,
#monturesList > div,
#verresList > div,
#fournisseursList > div,
#storesList > div {
  height: auto !important;
  overflow: visible !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Table base */
#clientsList table,
#framesList table,
#doctorsList table,
#monturesList table,
#verresList table,
#fournisseursList table,
#storesList table,
#ordersTable,
.invoices-table,
.transactions-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}

/* Header — kill gradient backgrounds AND kill inline sticky on thead/tr
   (sticky is on th only to avoid conflicts with inline <style> blocks) */
body #clientsList thead,
body #clientsList thead tr,
body #framesList thead,
body #framesList thead tr,
body #doctorsList thead,
body #doctorsList thead tr,
body #monturesList thead,
body #monturesList thead tr,
body #verresList thead,
body #verresList thead tr,
body #fournisseursList thead,
body #fournisseursList thead tr,
body #storesList thead,
body #storesList thead tr,
body #ordersTable thead,
body #ordersTable thead tr,
body .invoices-table thead,
body .invoices-table thead tr,
body .transactions-table thead,
body .transactions-table thead tr {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  background: #f9fafb !important;
  background-image: none !important;
}

/* Header cells — all tables */
body #clientsList th,
body #clientsList th[style],
body #framesList th,
body #framesList th[style],
body #doctorsList th,
body #doctorsList th[style],
body #monturesList th,
body #monturesList th[style],
body #verresList th,
body #verresList th[style],
body #fournisseursList th,
body #fournisseursList th[style],
body #storesList th,
body #storesList th[style],
body #ordersTable th,
body #ordersTable th[style],
body .invoices-table th,
body .transactions-table th {
  padding: 0.75rem 1rem !important;
  text-align: left !important;
  font-weight: 600 !important;
  font-size: 0.8125rem !important;
  color: #111827 !important;
  text-transform: lowercase !important;
  letter-spacing: 0 !important;
  background: #f9fafb !important;
  background-image: none !important;
  border-bottom: 2px solid #e5e7eb !important;
  border-top: none !important;
  position: sticky !important;
  top: var(--navbar-h, 49px) !important;
  z-index: 100 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
  white-space: nowrap;
}

body #clientsList th::first-letter,
body #framesList th::first-letter,
body #doctorsList th::first-letter,
body #monturesList th::first-letter,
body #verresList th::first-letter,
body #fournisseursList th::first-letter,
body #storesList th::first-letter,
body #ordersTable th::first-letter,
body .invoices-table th::first-letter,
body .transactions-table th::first-letter {
  text-transform: uppercase !important;
}

body #clientsList th:hover,
body #framesList th:hover,
body #doctorsList th:hover,
body #monturesList th:hover,
body #verresList th:hover,
body #fournisseursList th:hover,
body #storesList th:hover,
body #ordersTable th:hover,
body .invoices-table th:hover,
body .transactions-table th:hover {
  color: #000 !important;
}

/* Rows — override alternating colors and blue hover from inline styles */
body #clientsList tbody tr,
body #clientsList tbody tr:nth-child(2n),
body #framesList tbody tr,
body #framesList tbody tr:nth-child(2n),
body #doctorsList tbody tr,
body #doctorsList tbody tr:nth-child(2n),
body #monturesList tbody tr,
body #monturesList tbody tr:nth-child(2n),
body #verresList tbody tr,
body #verresList tbody tr:nth-child(2n),
body #fournisseursList tbody tr,
body #fournisseursList tbody tr:nth-child(2n),
body #storesList tbody tr,
body #storesList tbody tr:nth-child(2n),
body #ordersTable tbody tr,
body #ordersTable tbody tr:nth-child(2n),
body .invoices-table tbody tr,
body .invoices-table tbody tr:nth-child(2n),
body .transactions-table tbody tr,
body .transactions-table tbody tr:nth-child(2n) {
  border-bottom: 1px solid #f3f4f6 !important;
  transition: background 0.1s ease;
  background: #fff !important;
  background-color: #fff !important;
}

body #clientsList tbody tr:last-child,
body #framesList tbody tr:last-child,
body #doctorsList tbody tr:last-child,
body #monturesList tbody tr:last-child,
body #verresList tbody tr:last-child,
body #fournisseursList tbody tr:last-child,
body #storesList tbody tr:last-child,
body #ordersTable tbody tr:last-child,
body .invoices-table tbody tr:last-child,
body .transactions-table tbody tr:last-child {
  border-bottom: none !important;
}

body #clientsList tbody tr:hover,
body #framesList tbody tr:hover,
body #doctorsList tbody tr:hover,
body #monturesList tbody tr:hover,
body #verresList tbody tr:hover,
body #fournisseursList tbody tr:hover,
body #storesList tbody tr:hover,
body #ordersTable tbody tr:hover,
body .invoices-table tbody tr:hover,
body .transactions-table tbody tr:hover {
  background: #f9fafb !important;
  background-color: #f9fafb !important;
}

/* Order status row colors */
body #ordersTable tbody tr.status-en_commande,
body #ordersTable tbody tr.status-en_commande:nth-child(2n) {
  background: #fef9c3 !important;
  background-color: #fef9c3 !important;
}
body #ordersTable tbody tr.status-en_commande:hover {
  background: #fef08a !important;
  background-color: #fef08a !important;
}
body #ordersTable tbody tr.status-recu,
body #ordersTable tbody tr.status-recu:nth-child(2n) {
  background: #fed7aa !important;
  background-color: #fed7aa !important;
}
body #ordersTable tbody tr.status-recu:hover {
  background: #fdba74 !important;
  background-color: #fdba74 !important;
}

/* Cells — all tables */
body #clientsList td,
body #framesList td,
body #doctorsList td,
body #monturesList td,
body #verresList td,
body #fournisseursList td,
body #storesList td,
body #ordersTable td,
body .invoices-table td,
body .transactions-table td {
  padding: 0.75rem 1rem !important;
  color: #374151 !important;
  font-size: 0.875rem !important;
  vertical-align: middle;
  line-height: 1.5;
}

/* Keep special row states (unpaid, failed, refunded) */
body .invoices-table tbody tr.unpaid {
  background: #fef2f2 !important;
  border-left: 3px solid #ef4444 !important;
}
body .invoices-table tbody tr.unpaid:hover {
  background: #fee2e2 !important;
}
body .transactions-table tbody tr.failed {
  background: #fef2f2 !important;
  border-left: 3px solid #ef4444 !important;
}
body .transactions-table tbody tr.refunded {
  background: #fef3c7 !important;
  border-left: 3px solid #f59e0b !important;
}

/* Static table wrappers — clean up container */
.table-section {
  background: #fff !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  border: 1px solid #e5e7eb !important;
  overflow: visible !important;
}

.transactions-table-wrapper {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

/* Override table row hover */
.table-row-hover {
  transition: background 0.1s ease;
}

body .table-row-hover:hover {
  background: #f9fafb !important;
}

/* Override commandes table container overflow — including anonymous wrapper divs */
.main-container:has(#ordersTable) {
  overflow: visible !important;
}

.main-container:has(#ordersTable) > main {
  overflow: visible !important;
}

.main-container:has(#ordersTable) > main > div {
  overflow: visible !important;
  overflow-x: visible !important;
}

.main-container:has(#ordersTable) > main > div > div {
  overflow: visible !important;
  overflow-x: visible !important;
}

/* Override verres wrapper divs overflow */
.main-container:has(#verresList) {
  overflow: visible !important;
}

.main-container:has(#verresList) > main {
  overflow: visible !important;
}

.main-container:has(#verresList) > main > div {
  overflow: visible !important;
  overflow-x: visible !important;
}

.main-container:has(#verresList) > main > div > div {
  overflow: visible !important;
  overflow-x: visible !important;
}

/* Override montures wrapper overflow */
.main-container:has(#monturesList) {
  overflow: visible !important;
}

.main-container:has(#monturesList) > main {
  overflow: visible !important;
}

/* Override admin pages overflow for sticky */
.main-container:has(.invoices-table) {
  overflow: visible !important;
}

.main-container:has(.invoices-table) > main {
  overflow: visible !important;
}

.main-container:has(.transactions-table) {
  overflow: visible !important;
}

.main-container:has(.transactions-table) > main {
  overflow: visible !important;
}

.suggestion-item {
  transition: background 0.2s ease, color 0.2s ease;
}

.suggestion-item:hover {
  background: #e0f2fe;
}

.equipment-overlay {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1200;
}

.equipment-overlay.active {
  display: block;
}

.equipment-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.equipment-overlay__panel {
  position: absolute;
  top: clamp(6px, 2%, 32px);
  bottom: clamp(6px, 2%, 32px);
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 94%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.equipment-overlay__frame {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.4);
  background: #ffffff;
}

#equipmentOverlayFrame {
  opacity: 0;
  transition: opacity 0.2s ease;
}

#equipmentOverlayFrame.ready {
  opacity: 1;
}

.equipment-overlay__loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 16px;
  z-index: 2;
  transition: opacity 0.2s ease;
}

.equipment-overlay__loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.equipment-overlay__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: eq-spin 0.7s linear infinite;
}

@keyframes eq-spin {
  to { transform: rotate(360deg); }
}

.equipment-overlay__close {
  align-self: flex-end;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 1;
}

.equipment-overlay__close:hover {
  transform: scale(1.05);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.3);
}

body.equipment-overlay-open {
  overflow: hidden;
}

body.equipment-overlay-open #clientModal {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Responsive - Mobile First */
@media (max-width: 1024px) {
  .page-header-compact {
    padding: 0.75rem 1rem;
  }

  .page-header-compact__actions > h2 {
    font-size: 1.5rem !important;
  }
}

@media (max-width: 768px) {
  .page-header-compact {
    padding: 0.75rem 1rem;
  }

  /* Passer en 2 lignes : titre, puis search+boutons */
  .page-header-compact__actions {
    flex-wrap: wrap !important;
    gap: 0.625rem !important;
  }

  .page-header-compact__actions > h2 {
    font-size: 1.25rem !important;
    width: 100%;
    flex-shrink: 0;
  }

  /* Cacher le spacer */
  .page-header-compact__actions > div[style*="flex: 1"] {
    display: none !important;
  }

  /* Search inline, pas absolute */
  #headerSearchContainer {
    position: static !important;
    left: auto !important;
    transform: none !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .page-header-compact__actions .search-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Boutons compacts */
  .header-buttons-group {
    flex-shrink: 0;
  }

  .header-buttons-group .nav-button-text {
    display: none;
  }

  .header-buttons-group > button {
    padding: 0.5rem !important;
    min-width: 40px !important;
    width: 40px !important;
    height: 38px !important;
  }
  
  /* Overlay équipement responsive */
  .equipment-overlay__panel {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    border-radius: 0;
  }
  
  .equipment-overlay__frame {
    border-radius: 0;
  }

  /* Améliorer l'apparence des onglets équipements sur iPad */
  #tabContainer {
    order: 3;
    flex: 1;
    min-width: 0;
    width: 100%;
    justify-content: center;
    padding: 0.375rem !important;
  }

  #tabContainer button {
    padding: 0.625rem 1rem !important;
    font-size: 0.8125rem !important;
    flex: 1;
    text-align: center;
    min-width: 0;
  }

  /* Réduire la taille des filtres de statut */
  #statusFilterContainer {
    order: 4;
    flex: 1;
    min-width: 0;
  }

  #statusFilterContainer button {
    padding: 0.375rem 0.625rem !important;
    font-size: 0.6875rem !important;
  }

  /* Réduire la largeur du filtre de date */
  #dateFilterWrapper {
    order: 5;
  }

  #dateFilterWrapper input {
    width: 100px !important;
  }

  /* Cacher le texte des boutons, garder seulement les icônes */
  .nav-button-text {
    display: none;
  }

  .nav-button-compact {
    padding: 0.5rem !important;
    min-width: 40px !important;
    order: 6;
  }

  .page-section {
    padding: 1rem;
  }

  /* Tableau avec scroll horizontal sur iPad - augmenter min-width pour voir Actions */
  main > div[style*="overflow-x: auto"] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  #ordersTable {
    min-width: 1100px !important;
  }

  .pagination-container {
    padding: 0.75rem !important;
  }
}

@media (max-width: 480px) {
  .page-header-compact {
    padding: 0.625rem 0.75rem;
  }

  .page-header-compact__actions > h2 {
    font-size: 1.125rem !important;
  }

  .page-header-compact__actions > h2 > span:first-child {
    width: 3px !important;
    height: 22px !important;
  }

  .header-buttons-group > button {
    min-width: 36px !important;
    width: 36px !important;
    height: 36px !important;
  }

  #headerSearchInput {
    padding-left: 2.75rem !important;
    padding-right: 2.25rem !important;
    font-size: 0.875rem !important;
  }
  
  #headerSearchContainer .search-icon {
    left: 2.25rem !important;
    width: 1rem !important;
    height: 1rem !important;
  }
  
  #advancedFiltersBtn {
    width: 24px !important;
    height: 24px !important;
    left: 0.375rem !important;
  }
  
  #advancedFiltersBtn .material-symbols-outlined {
    font-size: 16px !important;
  }
  
  #headerClearSearchBtn {
    width: 18px !important;
    height: 18px !important;
    right: 0.625rem !important;
  }
  
  #headerClearSearchBtn .material-symbols-outlined {
    font-size: 14px !important;
  }
  
  /* Wrapper pour les boutons - très petits écrans */
  .header-buttons-group {
    order: 3;
    display: flex !important;
    flex-direction: row !important;
    gap: 0.5rem;
    align-items: center;
  }
  
  /* Boutons compacts dans le groupe */
  .header-buttons-group > button {
    padding: 0.375rem !important;
    min-width: 32px !important;
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0;
  }
  
  .header-buttons-group .nav-button-icon {
    font-size: 1.125rem !important;
  }
  
  /* Overlay équipement - très petits écrans */
  .equipment-overlay__panel {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
  }
  
  .equipment-overlay__frame {
    border-radius: 0;
  }
}


