/* ===== CORRECTIONS CROSS-BROWSER ===== */
/* Ce fichier corrige les différences de rendu entre navigateurs */

/* ===== CORRECTION DES POLICES ===== */
/* Force l'utilisation de polices système cohérentes sur tous les navigateurs */

/* Police système universelle */
* {
    font-family: inherit;
}

/* Correction spécifique pour l'arborescence */
.folder-tree-content,
.folder-item,
.folder-item .folder-name,
.folder-item .folder-stats {
    font-family: var(--ark-font-family) !important;
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
    color: #374151 !important;
}

/* Correction pour Chrome/Opera - Force la taille de police */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .folder-item .folder-name {
        font-size: 0.875rem !important;
        font-weight: 500 !important;
        color: #374151 !important;
    }
    
    .folder-item .folder-stats {
        font-size: 0.75rem !important;
        color: #6b7280 !important;
    }
}

/* Correction pour Firefox */
@-moz-document url-prefix() {
    .folder-item .folder-name {
        font-size: 0.875rem !important;
        font-weight: 500 !important;
        color: #374151 !important;
    }
    
    .folder-item .folder-stats {
        font-size: 0.75rem !important;
        color: #6b7280 !important;
    }
}

/* Correction pour Edge */
@supports (-ms-ime-align: auto) {
    .folder-item .folder-name {
        font-size: 0.875rem !important;
        font-weight: 500 !important;
        color: #374151 !important;
    }
    
    .folder-item .folder-stats {
        font-size: 0.75rem !important;
        color: #6b7280 !important;
    }
}

/* ===== CORRECTION DES ESPACEMENTS ===== */
/* Assure des espacements cohérents entre navigateurs */

.folder-item {
    padding: 0.75rem !important;
    margin-bottom: 0.25rem !important;
    line-height: 1.4 !important;
}

.folder-item .folder-name {
    margin-bottom: 0.25rem !important;
    line-height: 1.4 !important;
}

/* ===== CORRECTION DES COULEURS ===== */
/* Force les couleurs pour éviter les variations entre navigateurs */

.folder-item .folder-name {
    color: #374151 !important;
}

.folder-item .folder-stats {
    color: #6b7280 !important;
}

.folder-item .folder-icon {
    color: #f59e0b !important;
}

/* ===== CORRECTION DES TAILLES D'ICÔNES ===== */
/* Assure des tailles d'icônes cohérentes */

.folder-item .folder-icon {
    font-size: 1.1rem !important;
    width: 1.1rem !important;
    height: 1.1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ===== CORRECTION POUR LES SOUS-DOSSIERS ===== */
.folder-item.subfolder .folder-name {
    font-size: 0.8rem !important;
    font-weight: 400 !important;
}

.folder-item.subfolder .folder-icon {
    font-size: 1rem !important;
    color: #d97706 !important;
}

/* ===== CORRECTION DES HOVER STATES ===== */
/* Assure des états de survol cohérents */

.folder-item:hover .folder-name {
    color: #1f2937 !important;
}

.folder-item:hover .folder-stats {
    color: #4b5563 !important;
}

/* ===== CORRECTION DES ÉTATS ACTIFS ===== */
.folder-item.active .folder-name {
    color: var(--ark-brand-green) !important;
    font-weight: 600 !important;
}

.folder-item.active .folder-stats {
    color: var(--ark-brand-green-dark) !important;
}

/* ===== CORRECTION POUR LES ÉLÉMENTS DE LISTE ===== */
/* Assure que les listes s'affichent correctement sur tous les navigateurs */

.folder-tree-content ul,
.folder-tree-content ol {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.folder-tree-content li {
    margin: 0 !important;
    padding: 0 !important;
}

/* ===== CORRECTION POUR LES ÉLÉMENTS FLEX ===== */
/* Assure que les éléments flex s'affichent correctement */

.folder-item {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

.folder-item .folder-info {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

/* ===== CORRECTION POUR LES TEXTES TRONQUÉS ===== */
/* Assure que l'ellipsis fonctionne sur tous les navigateurs */

.folder-item .folder-name {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
}

/* ===== CORRECTION POUR LES TRANSITIONS ===== */
/* Assure des transitions fluides sur tous les navigateurs */

.folder-item {
    transition: all 0.2s ease !important;
    -webkit-transition: all 0.2s ease !important;
    -moz-transition: all 0.2s ease !important;
    -o-transition: all 0.2s ease !important;
}

/* ===== CORRECTION POUR LES BORDURES ===== */
/* Assure des bordures cohérentes */

.folder-item {
    border-radius: 0.5rem !important;
    border: 1px solid transparent !important;
}

.folder-item:hover {
    border-color: #d1d5db !important;
}

.folder-item.active {
    border-left: 3px solid var(--ark-brand-green) !important;
}

/* ===== CORRECTION POUR LES OMBRES ===== */
/* Assure des ombres cohérentes */

.folder-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}
