:root {
    --wp--style--global--content-size: 66rem !important;
}

/* --- LAYOUT DU DASHBOARD --- */
.pimcore-dashboard-wrapper { 
    max-width: 1100px; 
    margin: 50px auto; 
    font-family: 'Inter', system-ui, -apple-system, sans-serif; 
    color: #2d3748; 
}

.dashboard-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 40px; 
    border-bottom: 2px solid #eee; 
    padding-bottom: 20px; 
}

.dashboard-header h1 { font-size: 32px; font-weight: 800; margin: 0; color: #1a202c; }
.user-badge { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    background: #2d3748; 
    color: #fff; 
    padding: 10px 20px; 
    border-radius: 50px; 
}

/* --- GRILLE ET SECTIONS --- */
.dashboard-grid { display: flex; flex-direction: column; gap: 40px; margin-bottom: 40px; }

.section-card { 
    background: #fff; 
    border-radius: 16px; 
    border: 1px solid #e2e8f0; 
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05); 
    overflow: hidden; 
}

.section-header { 
    background: #f8fafc; 
    padding: 20px; 
    border-bottom: 1px solid #e2e8f0; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.section-header h3 { margin: 0; font-size: 16px; font-weight: 700; color: #2d3748; }

.section-body { padding: 30px; }

/* --- FORMULAIRES --- */
.form-group { margin-bottom: 25px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; color: #4a5568; margin-bottom: 10px; text-transform: uppercase; }
.form-group input, .select-modern { 
    width: 95%; 
    padding: 12px 15px; 
    border: 1px solid #cbd5e0; 
    border-radius: 10px; 
    background: #fdfdfd; 
}

.parent-content-container {
    width: 100%;
}

/* --- MODES DE LAYOUT --- */
.parent-group-title { font-size: 22px; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.layout-flex .parent-content-container {
    display: flex !important;
    flex-direction: row !important; /* Force l'alignement horizontal */
    flex-wrap: wrap; /* Permet de passer à la ligne sur mobile */
    gap: 20px;
    align-items: stretch;
}
.layout-flex .parent-content-container .section-card {
    flex: 1; 
    min-width: 350px; /* Taille minimum pour éviter que ce soit trop étroit */
    margin-bottom: 0; /* On enlève la marge du bas car le gap gère l'espace */
}

.layout-block .parent-content-container { display: flex; flex-direction: column; gap: 20px; }

/* --- NOTIFICATIONS --- */
.notice-dashboard { padding: 15px 25px; border-radius: 10px; margin-bottom: 30px; display: flex; align-items: center; gap: 12px; font-weight: 600; }
.notice-dashboard.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.notice-dashboard.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* --- BOUTONS --- */
.btn-save-large { 
    background: #2d3748; 
    color: #fff; 
    border: none; 
    padding: 18px 45px; 
    border-radius: 12px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: 0.3s; 
}
.btn-save-large:hover { background: #000; transform: translateY(-2px); }

.btn-view-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #2d3748;
    border: 1px solid #cbd5e0;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-view-profile:hover {
    background: #f7fafc;
    border-color: #3182ce;
    color: #3182ce;
    transform: translateY(-1px);
}

.btn-view-profile .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}


/* Sécurité Mobile : on repasse tout en une colonne sur les petits écrans */
@media (max-width: 800px) {
    .layout-flex .parent-content-container .section-card {
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }
}

/* --- RESPONSIVE DASHBOARD --- */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important; /* Une seule colonne de cartes */
    }

    .btn-save-large {
        width: 100%; /* Le bouton de sauvegarde prend toute la largeur */
    }
}