/* ==========================================================================
   utilities.css
   --------------------------------------------------------------------------
   RÔLE :
   - Fournir des classes utilitaires légères et prévisibles
   - Compléter les composants sans les remplacer
   - Aider sur les cas ponctuels : espacement, alignement, display, texte
   --------------------------------------------------------------------------
   IMPORTANT :
   - Les utilitaires doivent rester l'exception, pas la base du design
   - Une classe utilitaire = une responsabilité simple
   - Les composants principaux restent dans app.css
   --------------------------------------------------------------------------
   NOMMAGE :
   - Préfixe unique : .u-
   - Exemple : .u-text-center, .u-mt-16, .u-hidden
   ========================================================================== */


/* ==========================================================================
   1. AFFICHAGE
   --------------------------------------------------------------------------
   Utilitaires de display simples.
   ========================================================================== */

.u-block {
    display: block !important;
}

.u-inline-block {
    display: inline-block !important;
}

.u-inline-flex {
    display: inline-flex !important;
}

.u-flex {
    display: flex !important;
}

.u-grid {
    display: grid !important;
}

.u-hidden {
    display: none !important;
}


/* ==========================================================================
   2. FLEX / ALIGNEMENT
   --------------------------------------------------------------------------
   Utilitaires rapides pour aligner les contenus.
   ========================================================================== */

.u-items-center {
    align-items: center !important;
}

.u-items-start {
    align-items: flex-start !important;
}

.u-items-end {
    align-items: flex-end !important;
}

.u-justify-center {
    justify-content: center !important;
}

.u-justify-between {
    justify-content: space-between !important;
}

.u-justify-end {
    justify-content: flex-end !important;
}

.u-flex-wrap {
    flex-wrap: wrap !important;
}

.u-flex-col {
    flex-direction: column !important;
}

.u-gap-4 {
    gap: 4px !important;
}

.u-gap-8 {
    gap: 8px !important;
}

.u-gap-12 {
    gap: 12px !important;
}

.u-gap-16 {
    gap: 16px !important;
}

.u-gap-24 {
    gap: 24px !important;
}


/* ==========================================================================
   3. TEXTE
   --------------------------------------------------------------------------
   Utilitaires de texte de base.
   ========================================================================== */

.u-text-left {
    text-align: left !important;
}

.u-text-center {
    text-align: center !important;
}

.u-text-right {
    text-align: right !important;
}

.u-text-uppercase {
    text-transform: uppercase !important;
}

.u-text-nowrap {
    white-space: nowrap !important;
}

.u-font-500 {
    font-weight: 500 !important;
}

.u-font-700 {
    font-weight: 700 !important;
}

.u-text-soft {
    color: var(--site-text-soft) !important;
}

.u-text-faint {
    color: var(--site-text-faint) !important;
}

.u-text-accent {
    color: var(--site-accent) !important;
}


/* ==========================================================================
   4. LARGEUR / TAILLE
   --------------------------------------------------------------------------
   Utilitaires fréquents mais non invasifs.
   ========================================================================== */

.u-w-full {
    width: 100% !important;
}

.u-h-full {
    height: 100% !important;
}

.u-max-w-none {
    max-width: none !important;
}

.u-max-w-100 {
    max-width: 100% !important;
}


/* ==========================================================================
   5. ESPACEMENTS
   --------------------------------------------------------------------------
   Quelques utilitaires margin/padding utiles.
   On reste volontairement compact pour éviter la prolifération.
   ========================================================================== */

/* Margins top */
.u-mt-0  { margin-top: 0 !important; }
.u-mt-4  { margin-top: 4px !important; }
.u-mt-8  { margin-top: 8px !important; }
.u-mt-12 { margin-top: 12px !important; }
.u-mt-16 { margin-top: 16px !important; }
.u-mt-24 { margin-top: 24px !important; }
.u-mt-32 { margin-top: 32px !important; }

/* Margins bottom */
.u-mb-0  { margin-bottom: 0 !important; }
.u-mb-4  { margin-bottom: 4px !important; }
.u-mb-8  { margin-bottom: 8px !important; }
.u-mb-12 { margin-bottom: 12px !important; }
.u-mb-16 { margin-bottom: 16px !important; }
.u-mb-24 { margin-bottom: 24px !important; }
.u-mb-32 { margin-bottom: 32px !important; }

/* Margins horizontal auto */
.u-mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Padding */
.u-p-0  { padding: 0 !important; }
.u-p-8  { padding: 8px !important; }
.u-p-12 { padding: 12px !important; }
.u-p-16 { padding: 16px !important; }
.u-p-24 { padding: 24px !important; }

/* Padding X */
.u-px-8  {
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.u-px-12 {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

.u-px-16 {
    padding-left: 16px !important;
    padding-right: 16px !important;
}

.u-px-24 {
    padding-left: 24px !important;
    padding-right: 24px !important;
}

/* Padding Y */
.u-py-8  {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.u-py-12 {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.u-py-16 {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
}

.u-py-24 {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
}


/* ==========================================================================
   6. POSITIONNEMENT
   --------------------------------------------------------------------------
   Quelques utilitaires simples de position.
   ========================================================================== */

.u-relative {
    position: relative !important;
}

.u-absolute {
    position: absolute !important;
}

.u-static {
    position: static !important;
}


/* ==========================================================================
   7. BORDS / RAYONS
   --------------------------------------------------------------------------
   Utilitaires visuels légers.
   ========================================================================== */

.u-rounded-sm {
    border-radius: 8px !important;
}

.u-rounded-md {
    border-radius: 14px !important;
}

.u-rounded-lg {
    border-radius: 20px !important;
}

.u-rounded-pill {
    border-radius: 999px !important;
}

.u-border-soft {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.u-border-accent {
    border: 1px solid rgba(212, 245, 74, 0.24) !important;
}


/* ==========================================================================
   8. VISIBILITÉ
   --------------------------------------------------------------------------
   Utilitaires utiles pour masquer sans casser l’accessibilité.
   ========================================================================== */

.u-overflow-hidden {
    overflow: hidden !important;
}

.u-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}


/* ==========================================================================
   9. RESPONSIVE
   --------------------------------------------------------------------------
   Quelques utilitaires mobiles simples.
   ========================================================================== */

@media (max-width: 991.98px) {
    .u-hidden-md-down {
        display: none !important;
    }

    .u-block-md-down {
        display: block !important;
    }
}

@media (max-width: 575.98px) {
    .u-hidden-sm-down {
        display: none !important;
    }

    .u-text-center-sm {
        text-align: center !important;
    }

    .u-w-full-sm {
        width: 100% !important;
    }
}