/* =============================================================
   BASE.CSS — Reset, body, typographie, utilitaires globaux
   Dépend de variables.css
   ============================================================= */

/* ─────────────────────────────────────────────────────────────
   RESET
   ───────────────────────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ─────────────────────────────────────────────────────────────
   BODY
   ───────────────────────────────────────────────────────────── */
body {
  font-family: var(--font-family-base);
  background: var(--color-bg-page);
  min-height: 100vh;
  color: var(--color-black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─────────────────────────────────────────────────────────────
   TYPOGRAPHIE GLOBALE
   ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: inherit; /* Ne pas écraser la couleur du contexte parent (ex: login-branding blanc) */
}

/* Pas de règle globale sur 'a' — l'original n'en définit pas.
   Les couleurs de liens sont gérées au niveau des composants. */

/* ─────────────────────────────────────────────────────────────
   UTILITAIRES GLOBAUX
   ───────────────────────────────────────────────────────────── */

/* Séparateur horizontal */
.divider {
  height: 1px;
  background: var(--color-gray-200);
  margin: var(--space-5) 0;
}

/* État de chargement générique */
.loading {
  text-align: center;
  padding: var(--space-10);
  color: var(--color-gray-500);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-gray-200);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto var(--space-4);
}

/* Footer global */
.footer {
  text-align: center;
  padding: var(--space-6) var(--space-5);
  padding-bottom: calc(var(--nav-height-mobile) + var(--space-5));
  color: var(--color-gray-400);
  font-size: var(--font-size-xs);
}

/* ─────────────────────────────────────────────────────────────
   ANIMATIONS GLOBALES
   ───────────────────────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 30px) scale(1.1); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -20px) scale(1.05); }
}

@keyframes float3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.15); }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — Footer
   ───────────────────────────────────────────────────────────── */
@media (min-width: 1024px),
       (min-width: 768px) and (orientation: landscape) {
  .footer {
    padding-bottom: var(--space-6);
  }
}
