/* ===================================================
   main.css — Reset CSS et styles globaux
   =================================================== */

/* Import de la police Inter (Google Fonts) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- Reset CSS moderne --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-family);
  font-size: var(--font-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  line-height: 1.5;
  padding-top: 36px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  color: var(--color-text-primary);
}

h1 {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

p { line-height: 1.6; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--color-primary-dark); }

input, textarea, select, button {
  font-family: var(--font-family);
  font-size: var(--font-base);
}

button { cursor: pointer; border: none; background: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* --- Conteneur principal SPA --- */
#app {
  min-height: 100vh;
  position: relative;
}

/* --- Animations de transition entre écrans --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

/* Classe appliquée sur les écrans au moment du rendu */
.screen-enter {
  animation: fadeInUp 320ms ease forwards;
}

/* --- Scrollbar personnalisée --- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

/* --- Utilitaires globaux --- */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.text-muted  { color: var(--color-text-muted); font-size: var(--font-sm); }
.text-sm     { font-size: var(--font-sm); }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full      { width: 100%; }
