/* CEN V152.5 — navigation membre, tableau de bord léger et aide responsive. */
:root{--cen155-green:#176b38;--cen155-green-dark:#104d29;--cen155-yellow:#f0ca2d;--cen155-ink:#193d29;--cen155-line:#dce8dc}

/* Le menu devient la source unique des fonctions : plus de grand guide répété dans chaque page. */
body.admin-layout .member-side-group{border:1px solid rgba(255,255,255,.13)!important;background:rgba(255,255,255,.05)!important}
body.admin-layout .member-side-group>summary{min-height:50px!important;padding:12px 13px!important}
body.admin-layout .member-side-group[open]>summary{background:rgba(255,255,255,.13)!important}
body.admin-layout .member-side-group .side-submenu{padding:5px 5px 8px!important}
body.admin-layout .member-side-group .side-submenu a{min-height:44px!important;padding:10px 11px!important;border-radius:11px!important;font-size:14px!important}
body.admin-layout .member-side-group .side-submenu a.active{background:#fff!important;color:var(--cen155-green-dark)!important;box-shadow:inset 4px 0 var(--cen155-yellow)!important}
body.admin-layout .member-side-group .side-submenu a.active span{color:var(--cen155-green)!important}

/* Tableau de bord membre inspiré du tableau de bord administratif. */
body.page-endpoint-member-dashboard .member-dashboard-clean{width:100%;min-width:0;display:grid;gap:0}
body.page-endpoint-member-dashboard .member-dashboard-welcome{min-height:174px!important;margin-bottom:26px!important}
body.page-endpoint-member-dashboard .member-dashboard-welcome .welcome-copy{min-width:0;max-width:980px}
body.page-endpoint-member-dashboard .member-dashboard-photo{position:relative;z-index:1;flex:0 0 104px;width:104px;height:124px;border:5px solid #fff;border-radius:18px;overflow:hidden;display:grid;place-items:center;background:linear-gradient(145deg,var(--cen155-green),#319355);color:#fff;font-size:34px;font-weight:900;box-shadow:0 10px 28px rgba(23,107,56,.17)}
body.page-endpoint-member-dashboard .member-dashboard-photo img{width:100%;height:100%;object-fit:cover}
body.page-endpoint-member-dashboard .member-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;margin:16px 0 28px!important}
body.page-endpoint-member-dashboard .member-kpi-grid .kpi-card{min-width:0;min-height:122px!important;text-decoration:none!important;border-left:4px solid var(--cen155-green)!important;border-top:1px solid var(--cen155-line)!important}
body.page-endpoint-member-dashboard .member-kpi-grid .kpi-card:nth-child(even){border-left-color:var(--cen155-yellow)!important}
body.page-endpoint-member-dashboard .member-kpi-grid .kpi-card>div:last-child{min-width:0}
body.page-endpoint-member-dashboard .member-kpi-grid strong{font-size:clamp(21px,2vw,28px)!important;overflow-wrap:anywhere}
body.page-endpoint-member-dashboard .member-action-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;margin:16px 0 28px!important}
body.page-endpoint-member-dashboard .member-action-grid .admin-shortcut{min-width:0;min-height:140px!important}
body.page-endpoint-member-dashboard .member-action-grid .admin-shortcut.primary{background:linear-gradient(135deg,var(--cen155-green-dark),var(--cen155-green))!important;border-bottom:4px solid var(--cen155-yellow)!important}
body.page-endpoint-member-dashboard .member-dashboard-panels{grid-template-columns:repeat(2,minmax(0,1fr))!important;margin-top:16px!important}
body.page-endpoint-member-dashboard .member-dashboard-panels .panel-card{min-width:0!important}
body.page-endpoint-member-dashboard .member-dash-link{text-decoration:none!important;color:inherit!important}
body.page-endpoint-member-dashboard .empty-communication{padding:22px;border:1px dashed #cbdacb;border-radius:13px;background:#f8fbf7;color:#67796c;text-align:center}

/* Pages secondaires : le formulaire et les cotisations ne chargent plus le dashboard. */
.member-page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin:0 0 20px;padding:24px 26px;border:1px solid var(--cen155-line);border-left:5px solid var(--cen155-yellow);border-radius:20px;background:#fff;box-shadow:0 9px 24px rgba(25,74,42,.06)}
.member-page-heading h1{margin:5px 0 6px;font-size:clamp(27px,3vw,40px);color:var(--cen155-ink)}
.member-page-heading p{margin:0;color:#617366}
.member-profile-editor-page{max-width:1120px!important;margin-inline:auto!important;padding:28px!important}
.member-profile-editor-page .adhesion-inspired-form{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:19px 22px!important;padding:24px!important;border:1px solid var(--cen155-line)!important;border-radius:18px!important;background:#fafcf9!important}
.member-profile-editor-page .declaration{margin:0!important;padding:15px 17px!important;border-left:5px solid var(--cen155-yellow)!important;border-radius:12px!important;background:#fff8d9!important}
.member-profile-editor-page .section-line{margin-top:10px!important;padding:13px 16px!important;border-left:5px solid var(--cen155-green)!important;border-radius:11px!important;background:#edf6ed!important;color:var(--cen155-ink)!important}
.member-profile-submit{display:flex;justify-content:flex-end}.member-profile-submit .btn{min-width:250px}
.member-contribution-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:20px}
.member-contribution-summary article{min-width:0;padding:22px;border:1px solid var(--cen155-line);border-left:4px solid var(--cen155-green);border-radius:18px;background:#fff;box-shadow:0 8px 22px rgba(23,82,43,.06)}
.member-contribution-summary article:nth-child(2){border-left-color:var(--cen155-yellow)}
.member-contribution-summary small,.member-contribution-summary strong{display:block}.member-contribution-summary strong{margin-top:7px;color:var(--cen155-ink);font-size:27px;overflow-wrap:anywhere}
.member-contribution-history{padding:26px!important}.member-contribution-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(170px,.45fr) auto;gap:18px;align-items:center;padding:17px 4px;border-bottom:1px solid #e6ede6}.member-contribution-row>div{display:grid;gap:5px;min-width:0}.member-contribution-row small{overflow-wrap:anywhere}

/* Centre d’aide : vraie grille chargée et lisible, y compris sur téléphone. */
body.page-endpoint-intelligent-help .smart-help-shell{display:grid!important;grid-template-columns:minmax(0,1fr) 310px!important;gap:20px!important;align-items:start!important}
body.page-endpoint-intelligent-help .smart-help-main,body.page-endpoint-intelligent-help .help-context-card{min-width:0!important;padding:25px!important}
body.page-endpoint-intelligent-help .smart-help-heading{display:flex!important;gap:15px!important;align-items:flex-start!important}
body.page-endpoint-intelligent-help .smart-help-bot{display:grid;place-items:center;flex:0 0 54px;width:54px;height:54px;border-radius:16px;background:#eef7ed;font-size:27px}
body.page-endpoint-intelligent-help .smart-help-heading h1{margin:4px 0 8px;font-size:clamp(27px,3vw,40px)}
body.page-endpoint-intelligent-help .context-help-banner{display:grid;grid-template-columns:36px minmax(0,1fr);gap:10px;margin:18px 0;padding:14px;border:1px solid #d4e4d4;border-radius:14px;background:#f2f8f1}
body.page-endpoint-intelligent-help .context-help-banner small,body.page-endpoint-intelligent-help .context-help-banner strong{display:block}
body.page-endpoint-intelligent-help .context-help-banner p{margin:4px 0 0}
body.page-endpoint-intelligent-help .smart-help-form{margin-top:18px}
body.page-endpoint-intelligent-help .smart-help-field{position:relative}
body.page-endpoint-intelligent-help .smart-help-live-results{position:absolute;left:0;right:0;top:calc(100% + 5px);z-index:50;max-height:360px;overflow:auto;border:1px solid #cfddd0;border-radius:14px;background:#fff;box-shadow:0 14px 35px rgba(20,75,39,.14)}
body.page-endpoint-intelligent-help .smart-help-live-results[hidden]{display:none!important}
body.page-endpoint-intelligent-help .help-form-actions,body.page-endpoint-intelligent-help .help-topic-actions{display:flex;flex-wrap:wrap;gap:9px}
body.page-endpoint-intelligent-help .help-context-card{position:sticky;top:96px}
body.page-endpoint-intelligent-help .help-context-card ul{padding-left:20px}
body.page-endpoint-intelligent-help .help-topic-section{margin-top:20px!important;padding:25px!important}
body.page-endpoint-intelligent-help .help-topic-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:15px!important}
body.page-endpoint-intelligent-help .help-topic-card{min-width:0;display:grid;grid-template-columns:48px minmax(0,1fr);gap:13px;padding:17px;border:1px solid #dce7dc;border-radius:16px;background:#fff}
body.page-endpoint-intelligent-help .help-topic-card.is-contextual{border-color:#76ad7e;background:#f4faf3}
body.page-endpoint-intelligent-help .help-topic-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:#edf6ec;font-size:23px}
body.page-endpoint-intelligent-help .help-topic-card h3{margin:3px 0 6px;color:var(--cen155-ink)}
body.page-endpoint-intelligent-help .help-topic-card p{margin:0}.help-topic-card ol{padding-left:20px}
body.page-endpoint-intelligent-help .help-topic-actions a{color:var(--cen155-green);font-weight:850;text-decoration:none}

@media(max-width:1180px){body.page-endpoint-member-dashboard .member-kpi-grid,body.page-endpoint-member-dashboard .member-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:980px){
  body.page-endpoint-member-dashboard .member-dashboard-panels{grid-template-columns:1fr!important}
  body.page-endpoint-intelligent-help .smart-help-shell{grid-template-columns:1fr!important}
  body.page-endpoint-intelligent-help .help-context-card{position:static;order:-1}
  body.page-endpoint-intelligent-help .help-topic-grid{grid-template-columns:1fr!important}
}
@media(max-width:780px){
  body.admin-layout .workspace-topbar,body.admin-layout.topbar-hidden .workspace-topbar,body.admin-layout.topbar-compact .workspace-topbar{height:116px!important;min-height:116px!important;max-height:116px!important;padding:10px 9px 8px 72px!important;background:linear-gradient(110deg,var(--cen155-green-dark),var(--cen155-green),#25834a)!important}
  body.admin-layout .workspace-welcome{height:42px!important;max-width:calc(100% - 4px)!important}
  body.admin-layout .workspace-welcome strong{font-size:16px!important}
  body.admin-layout .workspace-welcome small{font-size:11px!important}
  body.admin-layout .history-controls{display:none!important}
  body.admin-layout .workspace-language-wrap{display:flex!important;position:absolute!important;left:72px!important;bottom:9px!important;width:116px!important;height:40px!important}
  body.admin-layout .workspace-language-wrap>span{display:none!important}
  body.admin-layout .workspace-language-wrap .language-select{width:116px!important;min-width:116px!important;max-width:116px!important;height:40px!important;padding:6px 25px 6px 9px!important;font-size:14px!important}
  body.admin-layout .top-actions{right:8px!important;bottom:8px!important;max-width:calc(100% - 202px)!important;height:42px!important}
  body.admin-layout .main-content.workspace-content,body.admin-layout.topbar-hidden .main-content.workspace-content,body.admin-layout.topbar-compact .main-content.workspace-content{padding:132px 10px 28px!important}
  body.admin-layout .workspace-topbar.mobile-search-open~.main-content.workspace-content{padding-top:190px!important}
  body.admin-layout .workspace-topbar .global-search-form{top:124px!important}
  body.page-endpoint-member-dashboard .member-dashboard-welcome{align-items:flex-start!important;min-height:0!important;padding:20px!important}
  body.page-endpoint-member-dashboard .member-dashboard-photo{width:82px;height:100px;flex-basis:82px}
  .member-page-heading{display:block;padding:20px}.member-page-heading .btn{width:100%;margin-top:15px}
  .member-profile-editor-page{padding:18px!important}.member-profile-editor-page .adhesion-inspired-form{grid-template-columns:1fr!important;padding:15px!important;gap:16px!important}.member-profile-submit .btn{width:100%;min-width:0}
  .member-contribution-summary{grid-template-columns:1fr}.member-contribution-row{grid-template-columns:1fr}.member-contribution-row .btn{width:100%}
  body.page-endpoint-intelligent-help .smart-help-main,body.page-endpoint-intelligent-help .help-context-card,body.page-endpoint-intelligent-help .help-topic-section{padding:18px!important}
}
@media(max-width:520px){
  body.page-endpoint-member-dashboard .member-dashboard-welcome{display:grid!important;grid-template-columns:1fr auto!important}
  body.page-endpoint-member-dashboard .member-dashboard-welcome .welcome-meta{grid-column:1/-1}
  body.page-endpoint-member-dashboard .member-kpi-grid,body.page-endpoint-member-dashboard .member-action-grid{grid-template-columns:1fr!important}
  body.page-endpoint-member-dashboard .member-action-grid .admin-shortcut{min-height:auto!important}
  body.page-endpoint-intelligent-help .smart-help-heading{display:grid!important;grid-template-columns:45px minmax(0,1fr)!important;gap:10px!important}
  body.page-endpoint-intelligent-help .smart-help-bot{width:45px;height:45px;flex-basis:45px}
  body.page-endpoint-intelligent-help .help-topic-card{grid-template-columns:40px minmax(0,1fr);padding:13px}.help-topic-icon{width:40px!important;height:40px!important}
}
