html {
  font-size: 14px;
  font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (max-width: 767.98px) {
  .table-responsive:has(> table.responsive-list) {
    overflow-x: visible;
  }

  table.responsive-list,
  table.responsive-list tbody,
  table.responsive-list tr,
  table.responsive-list td {
    display: block;
    width: 100%;
  }

  table.responsive-list thead {
    display: none;
  }

  table.responsive-list tbody tr {
    padding: .5rem .65rem;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
  }

  table.responsive-list tbody tr::after {
    content: "Afficher les d\00E9tails";
    display: block;
    margin-top: .2rem;
    color: #0d6efd;
    font-size: .8rem;
  }

  table.responsive-list tbody tr.mobile-expanded::after {
    content: "Masquer les d\00E9tails";
  }

  table.responsive-list td {
    border: 0;
    padding: .12rem 0;
    text-align: left !important;
    line-height: 1.25;
  }

  table.responsive-list td:not([data-mobile-primary]) {
    display: none;
  }

  table.responsive-list tr.mobile-expanded td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .6rem;
  }

  table.responsive-list tr.mobile-expanded td::before {
    content: attr(data-label);
    flex: 0 0 40%;
    color: #6c757d;
    font-weight: 600;
  }

  table.responsive-list tr.mobile-expanded td .action-buttons {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  table.responsive-list tr.mobile-expanded td.mobile-patient-summary {
    display: none;
  }

  table.responsive-list tr.mobile-expanded .mobile-detail-value {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: right;
  }

  .mobile-summary-title {
    line-height: 1.25;
  }

  .mobile-summary-sub {
    margin-top: .15rem;
    color: #6c757d;
    font-size: .9rem;
  }
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
  font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ===== Styles pour les listes (Patients, Prescriptions, etc.) ===== */

.patient-row {
  transition: background-color 0.2s ease;
}

.patient-row:hover {
  background-color: #f5f5f5;
}

.clickable-cell {
  user-select: none;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.action-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 3px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1;
  flex-shrink: 0;
  color: white;
}

.action-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.action-symbol {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.action-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.action-btn:active {
  transform: scale(0.95);
}

.action-btn:focus-visible {
  outline: 2px solid rgba(37, 140, 251, 0.45);
  outline-offset: 2px;
}

.action-success {
  background-color: #198754;
  color: white;
}

.action-success:hover {
  background-color: #157347;
  color: white;
}

.action-primary {
  background-color: #0d6efd;
  color: white;
}

.action-primary:hover {
  background-color: #0b5ed7;
  color: white;
}

.action-warning {
  background-color: #6f42c1;
  color: white;
}

.action-warning:hover {
  background-color: #5b35a3;
  color: white;
}

.action-danger {
  background-color: #dc3545;
  color: white;
}

.action-danger:hover {
  background-color: #bb2d3b;
  color: white;
}

.action-info {
  background-color: #0dcaf0;
  color: #212529;
}

.action-info:hover {
  background-color: #31d2f2;
  color: #212529;
}

.action-dark {
  background-color: #495057;
  color: white;
}

.action-dark:hover {
  background-color: #3d444a;
  color: white;
}

.action-indigo {
  background-color: #4f46e5;
  color: white;
}

.action-indigo:hover {
  background-color: #4338ca;
  color: white;
}

.action-orange {
  background-color: #f59e0b;
  color: #212529;
}

.action-orange:hover {
  background-color: #d97706;
  color: #212529;
}

.action-pink {
  background-color: #ec4899;
  color: white;
}

.action-pink:hover {
  background-color: #db2777;
  color: white;
}

@media (max-width: 767px) {
  .table-hover tbody tr {
    border-bottom: 1px solid #dee2e6;
  }

  .table:not(.responsive-list) tbody td {
    padding: 1rem 0.5rem;
  }

  .action-buttons {
    gap: 0.4rem;
  }

  table.responsive-list .action-buttons > * {
    flex: 0 1 28px;
    min-width: 0;
  }

  table.responsive-list .action-buttons > form {
    display: flex !important;
  }

  table.responsive-list .action-buttons .action-btn {
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 1;
    padding: 3px;
  }

  table.responsive-list .action-buttons .action-icon {
    max-width: 100%;
    max-height: 100%;
  }
}