/* =============================================================================
   ARTISCODE ERP — UTILITAIRES
   Petit jeu volontairement restreint : les composants font le gros du travail.
   ========================================================================== */

/* Affichage */
.d-none        { display: none !important; }
.d-block       { display: block; }
.d-inline      { display: inline; }
.d-inline-flex { display: inline-flex; }
.d-flex        { display: flex; }
.d-grid        { display: grid; }

/* Flex */
.flex-col   { flex-direction: column; }
.flex-wrap  { flex-wrap: wrap; }
.flex-1     { flex: 1; min-width: 0; }
.flex-none  { flex: none; }

.items-start   { align-items: flex-start; }
.items-center  { align-items: center; }
.items-end     { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.justify-start   { justify-content: flex-start; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.justify-between { justify-content: space-between; }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-inline: auto; }

/* Espacements internes des conteneurs flex/grid */
.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-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Marges */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

/* Rembourrages */
.p-0 { padding: 0; }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }

/* Texte */
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

.text-2xs { font-size: var(--text-2xs); }
.text-xs  { font-size: var(--text-xs); }
.text-sm  { font-size: var(--text-sm); }
.text-md  { font-size: var(--text-md); }
.text-lg  { font-size: var(--text-lg); }
.text-xl  { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 550; }
.font-semi   { font-weight: 650; }
.font-bold   { font-weight: 700; }
.font-black  { font-weight: 800; }

.font-display { font-family: var(--font-display); }
.font-mono    { font-family: var(--font-mono); }

.uppercase { text-transform: uppercase; letter-spacing: var(--tracking-caps); }
.nowrap    { white-space: nowrap; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Couleurs de texte */
.text-strong  { color: var(--fg-strong); }
.text-base    { color: var(--fg); }
.text-muted   { color: var(--fg-muted); }
.text-subtle  { color: var(--fg-subtle); }
.text-brand   { color: var(--brand); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger  { color: var(--danger); }
.text-info    { color: var(--info); }

/* Fonds et bordures */
.bg-surface   { background: var(--bg-surface); }
.bg-surface-2 { background: var(--bg-surface-2); }
.bg-inset     { background: var(--bg-inset); }

.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); }

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

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Dimensions */
.w-full   { width: 100%; }
.max-w-sm { max-width: 480px; }
.max-w-md { max-width: 680px; }
.max-w-lg { max-width: 920px; }

/* Visibilité conditionnelle */
@media (max-width: 992px) {
  .hide-md { display: none !important; }
}

@media (max-width: 640px) {
  .hide-sm { display: none !important; }
}

@media (min-width: 993px) {
  .show-md-only { display: none !important; }
}
