/* ==========================================================================
   ECOPHOT - UTILITAIRES DE TEXTE
   Classes pour alignement, taille et style de texte
   ========================================================================== */

/* ==========================================================================
   ALIGNEMENT DU TEXTE
   ========================================================================== */

.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-justify { text-align: justify !important; }

/* Alignement responsive */
@media (max-width: 768px) {
    .text-md-left { text-align: left !important; }
    .text-md-center { text-align: center !important; }
    .text-md-right { text-align: right !important; }
}

@media (max-width: 576px) {
    .text-sm-left { text-align: left !important; }
    .text-sm-center { text-align: center !important; }
    .text-sm-right { text-align: right !important; }
}

/* ==========================================================================
   POIDS DE LA POLICE
   ========================================================================== */

.font-weight-light { font-weight: 300 !important; }
.font-weight-normal { font-weight: 400 !important; }
.font-weight-medium { font-weight: 500 !important; }
.font-weight-semibold { font-weight: 600 !important; }
.font-weight-bold { font-weight: 700 !important; }
.font-weight-bolder { font-weight: 900 !important; }

/* Raccourcis */
.fw-light { font-weight: 300 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.fw-bolder { font-weight: 900 !important; }

/* ==========================================================================
   STYLE DE LA POLICE
   ========================================================================== */

.font-style-normal { font-style: normal !important; }
.font-style-italic { font-style: italic !important; }

/* Raccourcis */
.fs-normal { font-style: normal !important; }
.fs-italic { font-style: italic !important; }

/* ==========================================================================
   TAILLE DE LA POLICE
   ========================================================================== */

.font-size-xs { font-size: 0.75rem !important; }
.font-size-sm { font-size: 0.875rem !important; }
.font-size-base { font-size: 1rem !important; }
.font-size-lg { font-size: 1.125rem !important; }
.font-size-xl { font-size: 1.25rem !important; }
.font-size-2xl { font-size: 1.5rem !important; }
.font-size-3xl { font-size: 1.875rem !important; }
.font-size-4xl { font-size: 2.25rem !important; }
.font-size-5xl { font-size: 3rem !important; }

/* Raccourcis */
.fs-xs { font-size: 0.75rem !important; }
.fs-sm { font-size: 0.875rem !important; }
.fs-base { font-size: 1rem !important; }
.fs-lg { font-size: 1.125rem !important; }
.fs-xl { font-size: 1.25rem !important; }
.fs-2xl { font-size: 1.5rem !important; }
.fs-3xl { font-size: 1.875rem !important; }
.fs-4xl { font-size: 2.25rem !important; }
.fs-5xl { font-size: 3rem !important; }

/* ==========================================================================
   INTERLIGNE
   ========================================================================== */

.line-height-none { line-height: 1 !important; }
.line-height-tight { line-height: 1.25 !important; }
.line-height-snug { line-height: 1.375 !important; }
.line-height-normal { line-height: 1.5 !important; }
.line-height-relaxed { line-height: 1.625 !important; }
.line-height-loose { line-height: 2 !important; }

/* Raccourcis */
.lh-1 { line-height: 1 !important; }
.lh-sm { line-height: 1.25 !important; }
.lh-base { line-height: 1.5 !important; }
.lh-lg { line-height: 1.75 !important; }

/* ==========================================================================
   TRANSFORMATION DU TEXTE
   ========================================================================== */

.text-lowercase { text-transform: lowercase !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-capitalize { text-transform: capitalize !important; }
.text-normal-case { text-transform: none !important; }

/* ==========================================================================
   DÉCORATION DU TEXTE
   ========================================================================== */

.text-decoration-none { text-decoration: none !important; }
.text-decoration-underline { text-decoration: underline !important; }
.text-decoration-line-through { text-decoration: line-through !important; }

/* Raccourcis */
.text-no-underline { text-decoration: none !important; }
.text-underline { text-decoration: underline !important; }
.text-line-through { text-decoration: line-through !important; }

/* ==========================================================================
   ESPACEMENT DES LETTRES
   ========================================================================== */

.letter-spacing-tighter { letter-spacing: -0.05em !important; }
.letter-spacing-tight { letter-spacing: -0.025em !important; }
.letter-spacing-normal { letter-spacing: 0 !important; }
.letter-spacing-wide { letter-spacing: 0.025em !important; }
.letter-spacing-wider { letter-spacing: 0.05em !important; }
.letter-spacing-widest { letter-spacing: 0.1em !important; }

/* ==========================================================================
   CÉSURE ET RETOUR À LA LIGNE
   ========================================================================== */

.text-wrap { white-space: normal !important; }
.text-nowrap { white-space: nowrap !important; }
.text-pre { white-space: pre !important; }
.text-pre-line { white-space: pre-line !important; }
.text-pre-wrap { white-space: pre-wrap !important; }

.word-break-normal { word-break: normal !important; }
.word-break-words { word-break: break-word !important; }
.word-break-all { word-break: break-all !important; }

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

/* ==========================================================================
   SÉLECTION DU TEXTE
   ========================================================================== */

.select-none { 
    -webkit-user-select: none !important; 
    -moz-user-select: none !important; 
    -ms-user-select: none !important; 
    user-select: none !important; 
}

.select-text { 
    -webkit-user-select: text !important; 
    -moz-user-select: text !important; 
    -ms-user-select: text !important; 
    user-select: text !important; 
}

.select-all { 
    -webkit-user-select: all !important; 
    -moz-user-select: all !important; 
    -ms-user-select: all !important; 
    user-select: all !important; 
}

/* ==========================================================================
   DIRECTION DU TEXTE
   ========================================================================== */

.text-direction-ltr { direction: ltr !important; }
.text-direction-rtl { direction: rtl !important; }

/* ==========================================================================
   FAMILY FONT
   ========================================================================== */

.font-sans { 
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif !important; 
}

.font-serif { 
    font-family: Georgia, Cambria, "Times New Roman", Times, serif !important; 
}

.font-mono { 
    font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important; 
}

/* ==========================================================================
   COULEURS DE TEXTE (référence aux variables)
   ========================================================================== */

.text-primary { color: var(--primary, #1a73e8) !important; }
.text-secondary { color: var(--secondary, #34a853) !important; }
.text-accent { color: var(--accent, #fbbc05) !important; }
.text-warning { color: var(--warning, #ff3b30) !important; }
.text-success { color: #28a745 !important; }
.text-info { color: #17a2b8 !important; }
.text-danger { color: #dc3545 !important; }

.text-dark { color: var(--dark, #333) !important; }
.text-light { color: #f8f9fa !important; }
.text-white { color: #ffffff !important; }
.text-black { color: #000000 !important; }

.text-muted { color: #6c757d !important; }
.text-body { color: #212529 !important; }

/* Nuances de gris */
.text-gray-100 { color: #f8f9fa !important; }
.text-gray-200 { color: #e9ecef !important; }
.text-gray-300 { color: #dee2e6 !important; }
.text-gray-400 { color: #ced4da !important; }
.text-gray-500 { color: #adb5bd !important; }
.text-gray-600 { color: #6c757d !important; }
.text-gray-700 { color: #495057 !important; }
.text-gray-800 { color: #343a40 !important; }
.text-gray-900 { color: #212529 !important; }

/* ==========================================================================
   EFFETS DE TEXTE
   ========================================================================== */

.text-shadow { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important; }
.text-shadow-sm { text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1) !important; }
.text-shadow-lg { text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important; }
.text-shadow-none { text-shadow: none !important; }

/* ==========================================================================
   UTILITAIRES SPÉCIAUX
   ========================================================================== */

.text-balance { text-wrap: balance !important; }
.text-pretty { text-wrap: pretty !important; }

/* Contrôle de l'affichage des caractères */
.text-visible { visibility: visible !important; }
.text-invisible { visibility: hidden !important; }

/* Opacité du texte */
.text-opacity-0 { opacity: 0 !important; }
.text-opacity-25 { opacity: 0.25 !important; }
.text-opacity-50 { opacity: 0.5 !important; }
.text-opacity-75 { opacity: 0.75 !important; }
.text-opacity-100 { opacity: 1 !important; }

/* ==========================================================================
   RESPONSIVE TEXT
   ========================================================================== */

/* Mobile only */
@media (max-width: 576px) {
    .text-sm-xs { font-size: 0.75rem !important; }
    .text-sm-sm { font-size: 0.875rem !important; }
    .text-sm-base { font-size: 1rem !important; }
    .text-sm-lg { font-size: 1.125rem !important; }
}

/* Tablet and up */
@media (min-width: 768px) {
    .text-md-base { font-size: 1rem !important; }
    .text-md-lg { font-size: 1.125rem !important; }
    .text-md-xl { font-size: 1.25rem !important; }
    .text-md-2xl { font-size: 1.5rem !important; }
}

/* Desktop and up */
@media (min-width: 992px) {
    .text-lg-lg { font-size: 1.125rem !important; }
    .text-lg-xl { font-size: 1.25rem !important; }
    .text-lg-2xl { font-size: 1.5rem !important; }
    .text-lg-3xl { font-size: 1.875rem !important; }
    .text-lg-4xl { font-size: 2.25rem !important; }
    .text-lg-5xl { font-size: 3rem !important; }
}