/* Conteneurs principaux */
.um-form-container, .um-account-container {
    max-width: 750px;
    margin: 2em auto;
    padding: 2em;
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.um-form-container h2, .um-account-container h2 {
    margin-top: 0;
    margin-bottom: 1em;
    text-align: center;
    font-weight: 600;
}

/* --- Style pour l'image de profil arrondie --- */
.um-profile-picture .avatar {
    border-radius: 50%; /* Crée un cercle parfait */
    object-fit: cover;    /* S'assure que l'image remplit bien le cercle sans être déformée */
}

/* Champs de formulaire */
.um-form-container label, .um-account-container label {
    display: block;
    margin-bottom: .5em;
    font-weight: 600;
}
.um-form-container input[type="text"],
.um-form-container input[type="email"],
.um-form-container input[type="password"],
.um-account-container input[type="text"],
.um-account-container input[type="email"],
.um-account-container input[type="password"],
.um-account-container textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 1em;
    border: 1px solid #ccd0d4;
    border-radius: 3px;
    box-sizing: border-box;
}
.um-account-container input:disabled {
    background: #f0f0f1;
    cursor: not-allowed;
}

/* Boutons */
.um-form-container input[type="submit"],
.um-account-container input[type="submit"] {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 3px;
    background-color: #2271b1;
    color: #fff;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}
.um-form-container input[type="submit"]:hover,
.um-account-container input[type="submit"]:hover {
    background-color: #1e639a;
}
.um-logout-link {
    display: block;
    margin-top: 1.5em;
    text-align: center;
    text-decoration: none;
    color: #a00;
}

/* Messages d'erreur et de succès */
.um-errors, .um-success {
    padding: 1em;
    margin-bottom: 1.5em;
    border-radius: 3px;
    border: 1px solid;
}
.um-errors {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}
.um-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}
.um-errors p, .um-success p {
    margin: 0;
}

/* Wrapper pour le champ mot de passe */
.um-password-wrapper {
    position: relative;
}

/* Icône de l'œil pour la visibilité du mot de passe */
.um-toggle-password {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #777;
    margin-top: 7px; /* ajustement vertical fin */
}

/* --- NOUVEAUX STYLES POUR LES ONGLETS --- */

/* Conteneur de la navigation */
.um-tabs-nav {
    display: flex;
    border-bottom: 2px solid #e2e4e7;
    margin-bottom: 2em;
}

/* Liens des onglets */
.um-tab-link {
    padding: 10px 20px;
    margin-bottom: -2px; /* Pour que la bordure inférieure se superpose */
    border: 2px solid transparent;
    border-bottom: none;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* Style de l'onglet actif (sélectionné) */
.um-tab-link.active {
    color: #2271b1;
    border-color: #e2e4e7;
    border-bottom: 2px solid #fff; /* Cache la bordure principale */
    border-radius: 4px 4px 0 0;
}

/* Panneaux de contenu des onglets */
.um-tab-content {
    display: none; /* Caché par défaut */
}

/* Le panneau actif est visible */
.um-tab-content.active {
    display: block;
}

/* Tableau pour les commandes */
.um-orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
}
.um-orders-table th, .um-orders-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #e2e4e7;
}
.um-orders-table th {
    background-color: #f5f5f5;
}

/* Lien pour télécharger un PDF */
.um-download-link {
    display: inline-block;
    padding: 5px 10px;
    background-color: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    margin-bottom: 5px;
}
.um-download-link:hover {
    background-color: #1e639a;
}

/* Style pour le message d'incitation à la connexion */
.um-login-prompt {
    text-align: center;
    font-size: 1.1em; /* Un peu plus grand pour être plus visible */
    font-weight: 600;
    margin-bottom: 2em;
}

/* --- STYLES POUR LE TABLEAU RESPONSIVE (MOBILE) --- */

@media screen and (max-width: 768px) {
    .um-orders-table {
        border: 0;
    }

    /* On cache les en-têtes du tableau sur mobile */
    .um-orders-table thead {
        display: none;
    }

    .um-orders-table tr {
        display: block; /* Chaque ligne devient un bloc */
        margin-bottom: 1em;
        border: 1px solid #e2e4e7;
        border-radius: 4px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    }

    .um-orders-table td {
        display: block; /* Chaque cellule devient un bloc */
        text-align: right; /* On aligne la donnée à droite */
        padding-left: 50%; /* On laisse de la place à gauche pour le libellé */
        position: relative;
        border-bottom: 1px dotted #e2e4e7;
    }
    
    .um-orders-table td:last-child {
        border-bottom: 0; /* Pas de bordure pour la dernière cellule de la carte */
    }

    /* On utilise le pseudo-élément ::before pour afficher le libellé (via data-label) */
    .um-orders-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 12px;
        padding-right: 10px;
        font-weight: 600;
        text-align: left;
        white-space: nowrap;
    }
}

/* --- STYLES AMÉLIORÉS ET SPÉCIFIQUES POUR LE TABLEAU DE BORD --- */

.um-dashboard-container {
    max-width: 1100px;
    margin: 2em auto;
    padding: 2em;
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
}

.um-dashboard-container h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 0.5em;
}

.um-dashboard-container p {
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 2em;
}

.um-dashboard-container .um-dashboard-tiles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.um-dashboard-container .um-tile {
    width: 150px;
    height: 150px;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    display: block;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.um-dashboard-container .um-tile:hover, 
.um-dashboard-container .um-tile:focus {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.um-dashboard-container .um-tile-image {
    width: 100%;
    height: 100%;
}

.um-dashboard-container .um-tile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.um-dashboard-container .um-tile-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px;
    text-align: center;
    transition: background 0.3s ease;
}

.um-dashboard-container .um-tile:hover .um-tile-title {
    background: rgba(0, 0, 0, 0.8);
}

.um-dashboard-container .um-tile-title h3 {
    margin: 0;
    font-size: 1em;
    color: #ffffff;
}