/* ==============================================================================
   [ candy-e ] — POINT D'ENTRÉE CSS
   Fichier : styles/main.css
   Importe tous les modules CSS dans l'ordre correct.
   ============================================================================== */

/* 1. Tokens (variables — doit être en premier) */
@import './tokens.css';

/* 2. Thème actif (light par défaut, dark via data-theme="dark") */
@import './themes/light.css';
@import './themes/dark.css';

/* 3. Base */
@import './base/reset.css';
@import './base/typography.css';

/* 4. Layout */
@import './layout.css';

/* 5. Composants */
@import './components/button.css';
@import './components/card.css';
@import './components/form.css';
@import './components/table.css';
@import './components/badge.css';
@import './components/modal.css';
@import './components/toast.css';

/* ==============================================================================
   UTILITAIRES GLOBAUX
   ============================================================================== */

/* Flexbox */
.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }

/* Marges */
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

/* Affichage */
.hidden   { display: none !important; }
.visible  { display: block; }
.w-full   { width: 100%; }
.h-full   { height: 100%; }

/* Bordures et arrondis */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

/* Curseur */
.cursor-pointer { cursor: pointer; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }

/* Séparateur */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-4) 0;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-surface-raised) 25%,
    var(--color-surface-overlay) 50%,
    var(--color-surface-raised) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-pulse {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Indicateur de statut serveur */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

.status-dot--warning { background: var(--color-warning); }
.status-dot--danger  { background: var(--color-danger); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}
