/**
 * Fix URGENT pour l'alignement horizontal dans Mon Compte
 * Force le header des adresses à rester sur une ligne
 */

/* OVERRIDE ABSOLU - Forcer l'alignement horizontal */
#mon-compte .address-card .address-header {
    display: flex !important;
    flex-direction: row !important; /* Force la direction horizontale */
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    flex-wrap: nowrap !important; /* Empêche le passage à la ligne */
    gap: 10px !important;
    margin-bottom: 15px !important;
    padding-bottom: 15px !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

/* Partie gauche : titre et badge ensemble */
#mon-compte .address-card .address-header > div:first-child {
    display: flex !important;
    flex-direction: row !important; /* Force horizontal */
    align-items: center !important;
    gap: 10px !important;
    flex: 1 !important;
    min-width: 0 !important;
}

/* Titre H4 */
#mon-compte .address-card .address-header h4 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1rem !important;
    display: inline-block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 150px !important;
}

/* Supprimer l'icône emoji du h4 qui prend de la place */
#mon-compte .address-card .address-header h4::before {
    display: none !important;
    content: none !important;
}

/* Badge par défaut */
#mon-compte .address-card .default-badge {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 3px 8px !important;
    font-size: 0.65rem !important;
    height: fit-content !important;
}

/* Actions FORCÉES sur la même ligne */
#mon-compte .address-card .address-header .address-actions {
    display: flex !important;
    flex-direction: row !important; /* Force horizontal */
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    border-top: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Boutons d'action */
#mon-compte .address-card .address-header .address-actions button {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

/* Actions dans le corps de la carte - à cacher ou déplacer */
#mon-compte .address-card > .address-actions {
    display: none !important; /* Cache les actions dupliquées dans le corps */
}

/* Mobile - garder sur une ligne jusqu'à très petit écran */
@media (max-width: 768px) {
    #mon-compte .address-card .address-header {
        flex-direction: row !important; /* Force horizontal même sur mobile */
        flex-wrap: nowrap !important;
    }
    
    #mon-compte .address-card .address-header h4 {
        font-size: 0.9rem !important;
        max-width: 120px !important;
    }
    
    #mon-compte .address-card .address-header .address-actions button {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
    }
    
    #mon-compte .address-card .address-header .address-actions {
        gap: 3px !important;
    }
}

/* Très petit écran - autoriser le wrap seulement si vraiment nécessaire */
@media (max-width: 350px) {
    #mon-compte .address-card .address-header {
        flex-wrap: wrap !important; /* Autorise le wrap seulement sur très petit écran */
    }
    
    #mon-compte .address-card .address-header > div:first-child {
        flex: 1 1 100% !important;
        margin-bottom: 8px !important;
    }
}

/* Suppression des styles conflictuels de addresses.css */
#mon-compte .address-header {
    flex-direction: row !important; /* Override le column de addresses.css */
}

#mon-compte .address-actions {
    flex-direction: row !important; /* Override le column de addresses.css */
    width: auto !important; /* Override le width: 100% */
}

#mon-compte .address-actions button {
    width: auto !important; /* Override le width: 100% */
}
