.mb-account-hub{
    --mb-border:#e2e7ec;
    --mb-bg:#fff;
    --mb-soft:#f6f8fa;
    --mb-text:#17212b;
    --mb-muted:#5d6975;
    --mb-accent:#1f5f72;
    --mb-service-logo-size:150px;
    color:var(--mb-text);
    font:inherit;
}
.mb-account-heading{margin:0 0 22px}
.mb-account-heading h2,.mb-account-module-header h2,.mb-account-empty h2{margin:0 0 8px}
.mb-account-heading p,.mb-account-module-header p{margin:0;color:var(--mb-muted)}
.mb-account-hub .mb-account-module-grid{display:grid;grid-template-columns:minmax(0,1fr)!important;gap:18px}
.mb-account-module-card{
    display:flex;
    align-items:center;
    gap:26px;
    width:100%;
    min-height:190px;
    box-sizing:border-box;
    padding:20px 24px;
    background:var(--mb-bg);
    border:1px solid var(--mb-border);
    border-radius:16px;
    box-shadow:0 6px 22px rgba(23,33,43,.05);
}
.mb-account-module-icon{
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 48px;
    width:48px;
    height:48px;
    box-sizing:border-box;
    overflow:hidden;
    border-radius:50%;
    background:var(--mb-soft);
    border:1px solid var(--mb-border);
    font-weight:700;
    font-size:16px;
    line-height:1;
}
.mb-account-module-card .mb-account-module-icon{
    flex:0 0 var(--mb-service-logo-size);
    width:var(--mb-service-logo-size);
    height:var(--mb-service-logo-size);
    border-radius:50%;
    background:#fff;
    box-shadow:0 7px 20px rgba(23,33,43,.10);
    font-size:22px;
}
.mb-account-module-icon.has-image{padding:0;background:#fff}
.mb-account-module-icon img{
    display:block;
    width:100%;
    height:100%;
    max-width:none;
    max-height:none;
    border-radius:50%;
    object-fit:cover;
    object-position:center;
}
.mb-account-module-content{min-width:0;flex:1}
.mb-account-module-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.mb-account-module-card h3{margin:2px 0 7px;font-size:18px}
.mb-account-module-card p{margin:0 0 14px;color:var(--mb-muted);font-size:14px}
.mb-account-badge{display:inline-flex;min-width:24px;height:24px;align-items:center;justify-content:center;padding:0 8px;border-radius:999px;background:var(--mb-accent);color:#fff;font-size:12px;font-weight:700}
.mb-account-card-link,.mb-account-button{display:inline-flex;align-items:center;justify-content:center;padding:9px 14px;border-radius:9px;background:var(--mb-accent);color:#fff!important;text-decoration:none;font-weight:600}
.mb-account-back{display:inline-block;margin-bottom:18px;text-decoration:none}
.mb-account-module-header{padding:20px;margin-bottom:18px;border:1px solid var(--mb-border);border-radius:16px;background:var(--mb-bg)}
.mb-account-module-header-main{display:flex;align-items:center;gap:15px}
.mb-account-module-header .mb-account-module-icon{flex:0 0 84px;width:84px;height:84px;background:#fff}
.mb-account-module-body{min-width:0}
.mb-account-empty,.mb-account-login-required,.mb-account-error{padding:24px;border:1px solid var(--mb-border);border-radius:16px;background:var(--mb-bg)}
.mb-account-error{border-color:#d9a5a5;background:#fff7f7}
.mb-account-login-required p{margin:0 0 14px}
.mb-account-login-required p:last-child{margin-bottom:0}
.mb-account-module-card .mb-account-card-link,.mb-account-module-card .mb-account-badge{color:var(--mb-accent-text,#fff)!important}
@media(max-width:700px){
    .mb-account-module-card{flex-direction:column;align-items:center;gap:16px;padding:20px;text-align:center}
    .mb-account-module-content{width:100%}
    .mb-account-module-title-row{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}
    .mb-account-module-header{padding:16px}
    .mb-account-module-header-main{align-items:flex-start}
}
@media(max-width:420px){
    .mb-account-hub{--mb-service-logo-size:150px}
    .mb-account-module-header-main{flex-direction:column;align-items:center;text-align:center}
}

/* Catalogue public alimenté par le même registre que l'espace client. */
.mb-account-hub--public .mb-account-heading{
    max-width:900px;
    margin:0 auto 30px;
    text-align:center;
}
.mb-account-hub--public .mb-account-module-grid{
    grid-template-columns:repeat(var(--mb-public-columns,3),minmax(0,1fr))!important;
    align-items:stretch;
}
.mb-account-hub--public .mb-account-module-card{
    flex-direction:column;
    align-items:center;
    min-height:100%;
    padding:26px 22px;
    text-align:center;
}
.mb-account-hub--public .mb-account-module-card .mb-account-module-icon{
    flex-basis:120px;
    width:120px;
    height:120px;
}
.mb-account-hub--public .mb-account-module-content{
    display:flex;
    flex:1;
    flex-direction:column;
    align-items:center;
    width:100%;
}
.mb-account-hub--public .mb-account-module-title-row{
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
}
.mb-account-hub--public .mb-account-module-card h3{
    margin-top:4px;
    font-size:20px;
}
.mb-account-hub--public .mb-account-module-card p{
    margin-bottom:18px;
    line-height:1.55;
}
.mb-account-hub--public .mb-account-card-link{
    margin-top:auto;
}
@media(max-width:1100px){
    .mb-account-hub--public .mb-account-module-grid{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
}
@media(max-width:700px){
    .mb-account-hub--public .mb-account-module-grid{
        grid-template-columns:minmax(0,1fr)!important;
    }
}


/* v0.6.0 — Catégorisation et recherche du catalogue public */
.mb-public-service-tools{
    display:flex;
    align-items:center;
    gap:18px;
    max-width:1100px;
    margin:0 auto 18px;
}
.mb-public-service-search{
    display:block;
    flex:1;
    min-width:0;
}
.mb-public-service-search input{
    width:100%;
    min-height:52px;
    box-sizing:border-box;
    padding:12px 16px;
    border:1px solid var(--mb-border);
    border-radius:14px;
    background:#fff;
    color:var(--mb-text);
    font:inherit;
    font-size:16px;
    outline:none;
    box-shadow:0 4px 16px rgba(23,33,43,.04);
}
.mb-public-service-search input:focus{
    border-color:var(--mb-accent);
    box-shadow:0 0 0 3px rgba(31,95,114,.10);
}
.mb-public-service-result-count{
    flex:0 0 auto;
    color:var(--mb-muted);
    font-size:14px;
    white-space:nowrap;
}
.mb-public-category-nav{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:10px;
    max-width:1180px;
    margin:0 auto 28px;
}
.mb-public-category-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    min-height:44px;
    padding:9px 15px;
    border:1px solid var(--mb-border);
    border-radius:999px;
    background:rgba(255,255,255,.92);
    color:var(--mb-text);
    font:inherit;
    font-weight:600;
    line-height:1.2;
    cursor:pointer;
    box-shadow:0 3px 12px rgba(23,33,43,.035);
    transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease,background .18s ease;
}
.mb-public-category-button:hover{
    transform:translateY(-1px);
    border-color:#c9d1d8;
    box-shadow:0 5px 16px rgba(23,33,43,.07);
}
.mb-public-category-button.is-active{
    border-color:var(--mb-accent);
    background:#fff;
    box-shadow:0 0 0 2px rgba(31,95,114,.08);
}
.mb-public-category-button small{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:25px;
    height:25px;
    padding:0 7px;
    border-radius:999px;
    background:var(--mb-soft);
    color:var(--mb-muted);
    font-size:12px;
    font-weight:700;
}
.mb-public-category-button.is-active small{
    background:var(--mb-accent);
    color:var(--mb-accent-text,#fff);
}
.mb-public-service-category-label{
    margin:0 0 7px;
    color:var(--mb-accent);
    font-size:12px;
    font-weight:700;
    letter-spacing:.02em;
    text-transform:uppercase;
}
.mb-account-hub--public .mb-account-module-card[hidden]{
    display:none!important;
}
.mb-public-filter-empty{
    margin:20px auto 0;
    max-width:760px;
    padding:20px 22px;
    border:1px solid var(--mb-border);
    border-radius:14px;
    background:rgba(255,255,255,.9);
    color:var(--mb-muted);
    text-align:center;
}
@media(max-width:800px){
    .mb-public-service-tools{
        flex-direction:column;
        align-items:stretch;
    }
    .mb-public-service-result-count{
        text-align:center;
    }
}
@media(max-width:560px){
    .mb-public-category-nav{
        justify-content:stretch;
    }
    .mb-public-category-button{
        flex:1 1 calc(50% - 10px);
        min-width:0;
        border-radius:14px;
    }
}
@media(max-width:400px){
    .mb-public-category-button{
        flex-basis:100%;
    }
}

/* v0.6.1 — Respiration latérale du catalogue sur mobile */
@media(max-width:700px){
    .mb-account-hub--public{
        width:100%;
        max-width:100%;
        box-sizing:border-box;
        padding-left:16px!important;
        padding-right:16px!important;
        overflow-x:hidden;
    }
    .mb-account-hub--public .mb-account-heading,
    .mb-account-hub--public .mb-public-service-tools,
    .mb-account-hub--public .mb-public-category-nav,
    .mb-account-hub--public .mb-account-module-grid,
    .mb-account-hub--public .mb-public-filter-empty{
        width:100%;
        max-width:100%;
        box-sizing:border-box;
    }
    .mb-account-hub--public .mb-account-module-card{
        width:100%;
        max-width:100%;
        min-width:0;
        box-sizing:border-box;
    }
    .mb-account-hub--public .mb-public-service-search,
    .mb-account-hub--public .mb-public-service-search input{
        min-width:0;
        max-width:100%;
        box-sizing:border-box;
    }
    .mb-account-hub--public .mb-public-category-button{
        max-width:100%;
        box-sizing:border-box;
    }
}
@media(max-width:380px){
    .mb-account-hub--public{
        padding-left:12px!important;
        padding-right:12px!important;
    }
}
