/* Styles complémentaires au design system (Tailwind gère le reste).
   En production, ce fichier sera fusionné avec la sortie compilée de Tailwind. */

:root {
  --primary: #0F766E;
  --ink: #1E293B;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #F8FAFC;
  color: #1E293B;
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Chiffres alignés dans les tableaux de montants */
.tabular { font-variant-numeric: tabular-nums; }

/* Zone sûre iOS (encoches) pour la barre de navigation basse */
.safe-bottom { padding-bottom: env(safe-area-inset-bottom); }
.pb-safe { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }

/* Transitions douces par défaut sur les éléments interactifs */
a, button { transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }

/* Squelettes de chargement */
.skeleton {
  background: linear-gradient(90deg, #EEF2F6 25%, #E2E8F0 37%, #EEF2F6 63%);
  background-size: 400% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: .5rem;
}
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Toasts */
#toast-zone { z-index: 60; }
.toast {
  animation: toast-in .25s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.toast.leaving { opacity: 0; transform: translateY(8px); transition: all .25s ease; }

/* Champ pré-rempli par OCR : liseré « à confirmer » */
.field-ocr {
  box-shadow: inset 0 0 0 2px #5EEAD4;
  background: #F0FDFA;
}

/* Focus visible homogène */
:focus-visible { outline: 2px solid #0F766E; outline-offset: 2px; }

/* Spinner */
.spinner {
  width: 1.25rem; height: 1.25rem;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
.spinner-ink { border-color: rgba(15,118,110,.25); border-top-color: #0F766E; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Réduction des animations si l'utilisateur le demande */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Masquer la barre de défilement horizontale des onglets sur mobile */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
