/* ---------- Écran de démarrage ---------- */
.boot-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #475569;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.boot-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #fecaca;
  border-top-color: #dc2626;
  border-radius: 9999px;
  animation: boot-spin 0.8s linear infinite;
}
@keyframes boot-spin {
  to {
    transform: rotate(360deg);
  }
}
.boot-error {
  max-width: 720px;
  margin: 10vh auto;
  padding: 24px;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 12px;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.boot-error h1 {
  color: #b91c1c;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.boot-error pre {
  white-space: pre-wrap;
  background: #fef2f2;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

/* ---------- Divers ---------- */
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type='number'] {
  -moz-appearance: textfield;
}

.scrollbar-thin::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.toast-enter {
  animation: toast-in 0.25s ease-out;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.body-zone {
  cursor: pointer;
  transition: fill 0.15s ease, stroke 0.15s ease;
}
.body-zone:hover {
  filter: brightness(0.95);
}

/* ---------- Impression ---------- */
#print-root {
  display: none;
}

@page {
  size: A4;
  margin: 10mm;
}

@media print {
  html,
  body {
    background: #fff !important;
  }
  #root {
    display: none !important;
  }
  #print-root {
    display: block !important;
  }
  .print-sheet {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    max-width: none !important;
  }
  .print-avoid-break {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
