.patient-photo-add {
  display: grid;
  place-items: center;
  padding: 0;
  text-decoration: none;
}

/* Action compacte de référence pour tous les futurs blocs de la colonne gauche. */
.sidebar-add-action {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 0;
  border-radius: 6px;
  background: var(--nav);
  color: #fff;
  font: 700 1.35rem/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  appearance: none;
}

.sidebar-add-action > span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

.sidebar-add-action:hover,
.sidebar-add-action:focus-visible {
  background: var(--nav-dark);
}

.patient-page-header {
  justify-content: flex-start;
}

.patient-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.patient-title-row h1 {
  margin-right: 0;
}

.patient-edit-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: .3rem;
  padding: 9px 14px;
  border: 2px solid var(--nav);
  border-radius: 999px;
  background: var(--nav);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.patient-edit-action:hover,
.patient-edit-action:focus-visible {
  background: var(--nav-dark);
  border-color: var(--nav-dark);
}

@media (max-width: 600px) {
  .patient-title-row {
    align-items: flex-start;
    gap: 10px;
  }
}

.patient-photo-add:disabled {
  cursor: wait;
  opacity: .55;
}

.photo-upload-progress {
  display: grid;
  gap: 7px;
}

.photo-upload-progress[hidden] {
  display: none;
}

.photo-upload-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.photo-upload-progress progress {
  width: 100%;
  height: 18px;
}

.photo-upload-modal :disabled {
  cursor: wait;
}

.patient-photo-stage > img {
  cursor: zoom-in;
}

.patient-photo-controls {
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.patient-photo-controls form,
.patient-photo-controls p {
  margin: 0;
}

.photo-delete-restriction {
  max-width: 430px;
  color: var(--muted);
  font-size: .82rem;
}

.danger-button {
  border-color: #a52c27;
  background: #a52c27;
  color: #fff;
}

.photo-fullscreen-modal {
  width: 96vw;
  height: 94vh;
  padding: 0;
  border: 0;
  background: #10171c;
  cursor: zoom-out;
}

.photo-fullscreen-modal::backdrop {
  background: rgba(0, 0, 0, .88);
}

.photo-fullscreen-modal img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mobile-photo-transfer {
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
  background: #f5f8f9;
}

.mobile-photo-transfer h3 {
  margin: 0 0 6px;
}

.mobile-photo-transfer > p {
  margin: 0 0 12px;
}

.mobile-photo-qr {
  margin-top: 14px;
  text-align: center;
}

.mobile-photo-qr[hidden] {
  display: none;
}

.mobile-photo-qr img {
  width: min(260px, 72vw);
  height: auto;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mobile-upload-page {
  width: min(620px, 100%);
  margin: 0 auto;
  padding: 24px 16px;
}

.mobile-upload-page h1 {
  font-size: clamp(1.8rem, 8vw, 2.8rem);
}

.mobile-upload-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.mobile-upload-form input[type="file"] {
  min-height: 58px;
}

.mobile-upload-result {
  margin-top: 12vh;
  text-align: center;
}

.quote-item-disabled { opacity: .48; background: #f3f4f4; }

@keyframes hubdeno-status-alert {
  0%, 72%, 100% { transform: translateX(0); }
  78% { transform: translateX(-3px); }
  84% { transform: translateX(3px); }
  90% { transform: translateX(-2px); }
  96% { transform: translateX(2px); }
}

.status-overdue {
  animation: hubdeno-status-alert 2.6s ease-in-out infinite;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .status-overdue { animation: none; }
}
