/* ========================================================================
   Reset + typographie de base
   ======================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: var(--weight-normal);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { color: var(--text-primary); }

a {
  color: inherit;
  text-decoration: none;
}
a:hover { color: var(--primary); }

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  background: transparent;
  border: none;
  color: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul, ol { list-style: none; }

img, svg { display: block; max-width: 100%; height: auto; }

table { border-collapse: collapse; width: 100%; }

hr { border: none; border-top: 1px solid var(--border); }

/* Sélection */
::selection {
  background: var(--indigo-100);
  color: var(--indigo-700);
}

/* Scrollbar (Chromium) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-app);
}
::-webkit-scrollbar-thumb:hover { background: var(--slate-400); }

/* Utilities globales */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.hidden { display: none !important; }

/* Feature flag Rental : masque tous les widgets .rental-only quand la feature est désactivée */
body[data-rental="off"] .rental-only { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary-color { color: var(--primary); }
.tabular-nums { font-variant-numeric: tabular-nums; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 1em; height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state générique */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--space-10) var(--space-4);
  color: var(--text-muted);
  text-align: center;
  gap: var(--space-3);
}
.empty-state svg { color: var(--slate-400); width: 40px; height: 40px; }
