/* ===================================================================
   No More Waste — systeme de design du front
   Inspire de la maquette admin (sidebar vert fonce, cartes blanches
   arrondies, accent orange sur les graphiques/alertes).
   Ce fichier reskine aussi les classes Bootstrap deja utilisees dans
   les pages (btn-success, badge bg-warning, etc.) pour eviter de
   reecrire chaque page a la main.
   =================================================================== */

:root{
  --nmw-bg: #f4f5f1;
  --nmw-sidebar: #162920;
  --nmw-sidebar-alt: #1c3327;
  --nmw-sidebar-active: #24402f;
  --nmw-sidebar-text: #a9bcae;
  --nmw-sidebar-text-active: #ffffff;

  --nmw-primary: #2f7a4d;
  --nmw-primary-dark: #235f3c;
  --nmw-primary-light: #e6f2ea;

  --nmw-orange: #d9822f;
  --nmw-orange-dark: #b8691f;
  --nmw-orange-light: #fbead8;

  --nmw-blue: #2f6fa8;
  --nmw-blue-light: #e8f1fa;

  --nmw-purple: #7c5cbf;
  --nmw-purple-light: #efe9f9;

  --nmw-red: #c1443a;
  --nmw-red-light: #fbeae8;

  --nmw-gray: #5c6b60;
  --nmw-gray-light: #eef0eb;

  --nmw-border: #e5e8e0;
  --nmw-text: #1c2620;
  --nmw-text-muted: #6b7568;

  --nmw-radius: 16px;
  --nmw-radius-sm: 10px;
  --nmw-shadow: 0 1px 2px rgba(20,30,20,.04), 0 8px 20px rgba(20,30,20,.05);

  --sidebar-width: 252px;
  --topbar-height: 72px;
}

*{ box-sizing: border-box; }

body{
  background: var(--nmw-bg);
  color: var(--nmw-text);
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a{ color: var(--nmw-primary); }
h1,h2,h3,h4,h5,h6{ color: var(--nmw-text); font-weight: 700; letter-spacing: -.01em; }

/* ---------- Layout general (sidebar + topbar) ---------- */

.app-shell{ display:flex; min-height:100vh; }

.app-main{
  flex: 1 1 auto;
  margin-left: var(--sidebar-width);
  display:flex;
  flex-direction:column;
  min-height:100vh;
}

.app-content{ padding: 28px 32px 48px; max-width: 1320px; width:100%; }

@media (max-width: 900px){
  :root{ --sidebar-width: 0px; }
  .sidebar{ transform: translateX(-100%); }
  .sidebar.is-open{ transform: translateX(0); }
  .app-content{ padding: 20px 16px 40px; }
}

/* ---------- Sidebar ---------- */

.sidebar{
  position: fixed; top:0; left:0; bottom:0;
  width: var(--sidebar-width);
  background: var(--nmw-sidebar);
  color: var(--nmw-sidebar-text);
  display:flex; flex-direction:column;
  z-index: 40;
  transition: transform .2s ease;
}

.sidebar-brand{
  display:flex; align-items:center; gap:10px;
  padding: 22px 20px 18px;
}
.brand-logo-img{
  width:36px; height:36px; object-fit:contain; flex:none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
}
.brand-logo-img--lg{ width:46px; height:46px; }
.sidebar-brand-text{ line-height:1.2; }
.sidebar-brand-title{ color:#fff; font-weight:700; font-size:.86rem; letter-spacing:.03em; }
.sidebar-brand-sub{ color: var(--nmw-sidebar-text); font-size:.72rem; }

.sidebar-section-label{
  padding: 14px 20px 6px;
  font-size: .68rem; text-transform:uppercase; letter-spacing:.08em;
  color: rgba(169,188,174,.6);
}

.sidebar-nav{ flex:1 1 auto; overflow-y:auto; padding: 0 12px; }
.sidebar-nav-item{
  display:flex; align-items:center; gap:11px;
  padding: 10px 12px; margin-bottom:2px;
  border-radius: var(--nmw-radius-sm);
  color: var(--nmw-sidebar-text);
  text-decoration:none;
  font-size:.88rem; font-weight:500;
  transition: background .12s ease, color .12s ease;
}
.sidebar-nav-item i{ font-size:1.05rem; width:18px; text-align:center; flex:none; }
.sidebar-nav-item:hover{ background: rgba(255,255,255,.05); color:#fff; }
.sidebar-nav-item.active{ background: var(--nmw-sidebar-active); color: var(--nmw-sidebar-text-active); }

.sidebar-user{
  display:flex; align-items:center; gap:10px;
  padding: 14px 16px; margin:10px 10px 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 16px;
}
.sidebar-avatar{
  width:34px; height:34px; border-radius:50%;
  background: var(--nmw-primary);
  color:#fff; font-size:.78rem; font-weight:700;
  display:flex; align-items:center; justify-content:center; flex:none;
}
.sidebar-user-info{ flex:1 1 auto; min-width:0; line-height:1.25; }
.sidebar-user-name{ color:#fff; font-size:.83rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-user-role{ color: var(--nmw-sidebar-text); font-size:.72rem; }
.sidebar-logout{
  color: var(--nmw-sidebar-text); background:none; border:none;
  font-size:1.05rem; padding:6px; border-radius:8px; flex:none;
  display:flex; align-items:center; justify-content:center;
  text-decoration:none;
}
.sidebar-logout:hover{ background: rgba(255,255,255,.08); color:#fff; }

.sidebar-toggle{
  display:none;
  position: fixed; top:14px; left:14px; z-index: 50;
  width:38px; height:38px; border-radius:10px;
  background: var(--nmw-sidebar); color:#fff; border:none;
  align-items:center; justify-content:center; font-size:1.1rem;
}
@media (max-width:900px){ .sidebar-toggle{ display:flex; } }

/* ---------- Topbar ---------- */

.topbar{
  position: sticky; top:0; z-index:30;
  height: var(--topbar-height);
  background:#fff; border-bottom:1px solid var(--nmw-border);
  display:flex; align-items:center; gap:18px;
  padding: 0 28px;
}
.topbar-breadcrumb{ font-size:.86rem; color: var(--nmw-text-muted); white-space:nowrap; }
.topbar-breadcrumb strong{ color: var(--nmw-text); font-weight:600; }
.topbar-search{
  flex:1 1 auto; max-width: 420px;
  display:flex; align-items:center; gap:8px;
  background: var(--nmw-bg); border:1px solid var(--nmw-border);
  border-radius: 10px; padding: 8px 12px; color: var(--nmw-text-muted);
  font-size:.86rem;
}
.topbar-search i{ font-size:.95rem; }
.topbar-search input{
  border:none; background:none; outline:none; flex:1 1 auto; font-size:.86rem; color: var(--nmw-text);
}
.topbar-spacer{ flex:1 1 auto; }
.topbar-actions{ display:flex; align-items:center; gap:14px; flex:none; }
.topbar-icon-btn{
  width:38px; height:38px; border-radius:10px;
  border:1px solid var(--nmw-border); background:#fff;
  display:flex; align-items:center; justify-content:center;
  color: var(--nmw-text-muted); position:relative; font-size:1rem; text-decoration:none;
}
.topbar-icon-btn:hover{ background: var(--nmw-bg); color: var(--nmw-text); }
.nmw-lang-btn{
  width:auto; padding:0 12px; gap:6px; font-size:.8rem; font-weight:700;
  letter-spacing:.02em;
}
.nmw-lang-btn i{ font-size:1rem; }

.nmw-notif-wrap{ position:relative; }
.topbar-notif-badge{
  position:absolute; top:-4px; right:-4px;
  background: var(--nmw-red); color:#fff;
  font-size:.65rem; font-weight:700; line-height:1;
  min-width:16px; height:16px; border-radius:999px;
  display:flex; align-items:center; justify-content:center;
  padding:0 3px; border:2px solid #fff;
}
.nmw-notif-panel{
  position:absolute; top:calc(100% + 10px); right:0;
  width:340px; max-height:420px; overflow-y:auto;
  background:#fff; border:1px solid var(--nmw-border);
  border-radius: var(--nmw-radius-sm); box-shadow: var(--nmw-shadow);
  z-index:50;
}
.nmw-notif-panel-header{
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px 14px; border-bottom:1px solid var(--nmw-border);
  font-size:.85rem; font-weight:700; position:sticky; top:0; background:#fff;
}
.nmw-notif-list{ padding: 6px; }
.nmw-notif-empty{ padding: 20px 14px; text-align:center; color: var(--nmw-text-muted); font-size:.85rem; }
.nmw-notif-item{
  padding: 10px 10px; border-radius: var(--nmw-radius-sm); cursor:pointer;
  position:relative;
}
.nmw-notif-item:hover{ background: var(--nmw-bg); }
.nmw-notif-item.is-unread{ background: var(--nmw-primary-light); }
.nmw-notif-item.is-unread:hover{ background: var(--nmw-primary-light); filter: brightness(.97); }
.nmw-notif-item.is-unread::before{
  content:''; position:absolute; left:2px; top:16px;
  width:6px; height:6px; border-radius:50%; background: var(--nmw-primary);
}
.nmw-notif-item.is-unread{ padding-left:18px; }
.nmw-notif-title{ font-size:.85rem; font-weight:600; color: var(--nmw-text); }
.nmw-notif-message{ font-size:.8rem; color: var(--nmw-text-muted); margin-top:2px; }
.nmw-notif-time{ font-size:.72rem; color: var(--nmw-text-muted); margin-top:4px; }

.topbar-user{ display:flex; align-items:center; gap:10px; }
.topbar-user-info{ line-height:1.2; text-align:right; }
.topbar-user-name{ font-size:.84rem; font-weight:600; color: var(--nmw-text); }
.topbar-user-role{ font-size:.72rem; color: var(--nmw-text-muted); }
.topbar-avatar{
  width:36px; height:36px; border-radius:50%;
  background: var(--nmw-primary); color:#fff;
  font-size:.78rem; font-weight:700;
  display:flex; align-items:center; justify-content:center; flex:none;
}

/* ---------- Cards & stat tiles ---------- */

.card{
  border:1px solid var(--nmw-border) !important;
  border-radius: var(--nmw-radius) !important;
  box-shadow: var(--nmw-card-shadow, var(--nmw-shadow));
}

.nmw-card{
  background:#fff; border:1px solid var(--nmw-border);
  border-radius: var(--nmw-radius);
  box-shadow: var(--nmw-shadow);
  padding: 20px 22px;
}

.stat-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
@media (max-width: 900px){ .stat-grid{ grid-template-columns:1fr; } }

.stat-card{
  background:#fff; border:1px solid var(--nmw-border);
  border-radius: var(--nmw-radius);
  box-shadow: var(--nmw-shadow);
  padding: 18px 20px;
}
.stat-card-head{ display:flex; align-items:flex-start; justify-content:space-between; }
.stat-card-label{ font-size:.82rem; color: var(--nmw-text-muted); }
.stat-card-icon{
  width:30px; height:30px; border-radius:8px; background: var(--nmw-primary-light);
  color: var(--nmw-primary); display:flex; align-items:center; justify-content:center; font-size:.85rem; flex:none;
}
.stat-card-icon.is-warn{ background: var(--nmw-orange-light); color: var(--nmw-orange-dark); }
.stat-card-value{ font-size:1.9rem; font-weight:700; margin: 10px 0 2px; color: var(--nmw-text); }
.stat-card-value small{ font-size:1rem; font-weight:500; color: var(--nmw-text-muted); }
.stat-card-trend{ font-size:.8rem; color: var(--nmw-text-muted); }
.stat-card-trend.is-up{ color: var(--nmw-primary); font-weight:600; }
.stat-card-trend.is-warn{ color: var(--nmw-orange-dark); font-weight:600; }

/* ---------- Activity list ---------- */

.activity-list{ display:flex; flex-direction:column; gap:14px; }
.activity-item{ display:flex; gap:12px; }
.activity-dot{
  width:26px; height:26px; border-radius:50%; flex:none;
  display:flex; align-items:center; justify-content:center; font-size:.8rem; margin-top:1px;
}
.activity-dot.ok{ background: var(--nmw-primary-light); color: var(--nmw-primary); }
.activity-dot.info{ background: var(--nmw-blue-light); color: var(--nmw-blue); }
.activity-dot.warn{ background: var(--nmw-orange-light); color: var(--nmw-orange-dark); }
.activity-text{ font-size:.86rem; color: var(--nmw-text); line-height:1.35; }
.activity-time{ font-size:.75rem; color: var(--nmw-text-muted); margin-top:2px; }

/* ---------- Simple bar chart (pas de dependance externe) ---------- */

.chart-bars{ display:flex; align-items:flex-end; gap:14px; height:200px; padding-top:10px; }
.chart-bar-col{ flex:1 1 0; display:flex; flex-direction:column; align-items:center; gap:8px; height:100%; justify-content:flex-end; }
.chart-bar{ width:60%; max-width:34px; background: var(--nmw-orange); border-radius:6px 6px 3px 3px; transition: height .3s ease; }
.chart-bar-label{ font-size:.72rem; color: var(--nmw-text-muted); }

/* ---------- Buttons (reskin des classes Bootstrap existantes) ---------- */

.btn{ border-radius: var(--nmw-radius-sm); font-weight:600; font-size:.86rem; }

.btn-success, .btn-primary{
  background: var(--nmw-primary); border-color: var(--nmw-primary);
}
.btn-success:hover, .btn-primary:hover,
.btn-success:focus, .btn-primary:focus{
  background: var(--nmw-primary-dark); border-color: var(--nmw-primary-dark);
}
.btn-outline-success, .btn-outline-primary{
  color: var(--nmw-primary); border-color: var(--nmw-primary);
}
.btn-outline-success:hover, .btn-outline-primary:hover{
  background: var(--nmw-primary); border-color: var(--nmw-primary); color:#fff;
}

.btn-warning{ background: var(--nmw-orange); border-color: var(--nmw-orange); color:#fff; }
.btn-warning:hover{ background: var(--nmw-orange-dark); border-color: var(--nmw-orange-dark); color:#fff; }
.btn-outline-warning{ color: var(--nmw-orange-dark); border-color: var(--nmw-orange); }
.btn-outline-warning:hover{ background: var(--nmw-orange); border-color: var(--nmw-orange); color:#fff; }

.btn-info{ background: var(--nmw-blue); border-color: var(--nmw-blue); color:#fff; }
.btn-info:hover{ background: #24587f; border-color:#24587f; color:#fff; }
.btn-outline-info{ color: var(--nmw-blue); border-color: var(--nmw-blue); }

.btn-danger{ background: var(--nmw-red); border-color: var(--nmw-red); }
.btn-outline-danger{ color: var(--nmw-red); border-color: var(--nmw-red); }

.btn-dark{ background: var(--nmw-text); border-color: var(--nmw-text); }
.btn-outline-dark{ color: var(--nmw-text); border-color: var(--nmw-border); }
.btn-outline-dark:hover{ background: var(--nmw-text); border-color: var(--nmw-text); }

.btn-secondary, .btn-outline-secondary{ --bs-btn-color: var(--nmw-gray); }
.btn-secondary{ background: var(--nmw-gray-light); border-color:var(--nmw-gray-light); color: var(--nmw-text); }

/* ---------- Badges / alerts ---------- */

.badge{ font-weight:600; font-size:.72rem; border-radius:999px; padding:.35em .7em; }
.badge.bg-success{ background: var(--nmw-primary-light) !important; color: var(--nmw-primary-dark) !important; }
.badge.bg-warning{ background: var(--nmw-orange-light) !important; color: var(--nmw-orange-dark) !important; }
.badge.bg-info{ background: var(--nmw-blue-light) !important; color: var(--nmw-blue) !important; }
.badge.bg-danger{ background: var(--nmw-red-light) !important; color: var(--nmw-red) !important; }
.badge.bg-dark{ background: var(--nmw-gray-light) !important; color: var(--nmw-text) !important; }
.badge.bg-secondary{ background: var(--nmw-gray-light) !important; color: var(--nmw-gray) !important; }
.badge.bg-primary{ background: var(--nmw-primary-light) !important; color: var(--nmw-primary-dark) !important; }

.alert{ border-radius: var(--nmw-radius-sm); border:1px solid transparent; font-size:.88rem; }
.alert-success{ background: var(--nmw-primary-light); color: var(--nmw-primary-dark); }
.alert-warning{ background: var(--nmw-orange-light); color: var(--nmw-orange-dark); }
.alert-danger{ background: var(--nmw-red-light); color: var(--nmw-red); }
.alert-info{ background: var(--nmw-blue-light); color: var(--nmw-blue); }
.alert-secondary{ background: var(--nmw-gray-light); color: var(--nmw-gray); }

/* ---------- Forms / tables ---------- */

.form-control, .form-select{
  border-color: var(--nmw-border); border-radius: var(--nmw-radius-sm);
  font-size:.9rem; padding: .55rem .75rem;
}
.form-control:focus, .form-select:focus{
  border-color: var(--nmw-primary); box-shadow: 0 0 0 3px var(--nmw-primary-light);
}
.form-label{ font-size:.82rem; font-weight:600; color: var(--nmw-text); }

.table{ font-size:.88rem; }
.table thead th{
  font-size:.72rem; text-transform:uppercase; letter-spacing:.04em;
  color: var(--nmw-text-muted); border-bottom-width:1px; font-weight:700;
  background:#fff !important;
}
.table td, .table th{ border-color: var(--nmw-border); vertical-align:middle; }

/* ---------- Planning (vue hebdomadaire, adherent/benevole/admin) ---------- */

.planning-nav{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: 20px; gap:12px; flex-wrap:wrap;
}
.planning-nav-label{ font-weight:700; font-size:1.05rem; }

.planning-legende{ display:flex; gap:18px; flex-wrap:wrap; margin-bottom:14px; font-size:.78rem; color: var(--nmw-text-muted); align-items:center; }
.planning-legende-puce{ display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:5px; vertical-align:middle; }

.planning-grid-scroll{ overflow-x:auto; border:1px solid var(--nmw-border); border-radius: var(--nmw-radius); background:#fff; box-shadow: var(--nmw-shadow); }

.planning-grid{ display:flex; min-width: 780px; }

.planning-grid-heures{ flex:none; width:52px; display:flex; flex-direction:column; }
.planning-grid-corner{ height:46px; flex:none; border-bottom:1px solid var(--nmw-border); background: var(--nmw-bg); }
.planning-grid-hour-label{
  flex:none; text-align:right; padding:2px 8px 0 0; font-size:.7rem; color: var(--nmw-text-muted);
  border-top:1px solid var(--nmw-border); box-sizing:border-box;
}

.planning-grid-jours{ flex:1 1 auto; display:flex; }
.planning-grid-col{ flex:1 1 0; min-width:100px; display:flex; flex-direction:column; border-left:1px solid var(--nmw-border); }

.planning-grid-day-header{
  height:46px; flex:none; box-sizing:border-box;
  text-align:center; padding:6px 4px; font-weight:700; font-size:.82rem;
  background: var(--nmw-bg); border-bottom:1px solid var(--nmw-border);
}
.planning-grid-day-header .date{ display:block; font-weight:500; font-size:.72rem; color: var(--nmw-text-muted); }
.planning-grid-day-header.is-today{ background: var(--nmw-primary-light); color: var(--nmw-primary); }
.planning-grid-day-header.is-today .date{ color: var(--nmw-primary); }

.planning-grid-col-body{ position:relative; }

.planning-grid-cell{ height:44px; box-sizing:border-box; border-top:1px solid var(--nmw-border); }
.planning-grid-cell.is-dispo{ background: var(--nmw-primary-light); }

.planning-grid-event{
  position:absolute; box-sizing:border-box;
  border-radius:6px; padding:3px 6px; overflow:hidden; color:#fff;
  font-size:.72rem; line-height:1.25; box-shadow: 0 1px 2px rgba(0,0,0,.15);
  margin: 1px 2px;
}
.planning-grid-event .pge-titre{ font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.planning-grid-event .pge-detail{ opacity:.9; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:.68rem; }
.planning-grid-event.type-demande{ background: var(--nmw-orange); }
.planning-grid-event.type-tournee{ background: var(--nmw-blue); }
.planning-grid-event.type-service{ background: var(--nmw-purple); }

.planning-services{
  background:#fff; border:1px solid var(--nmw-border); border-radius: var(--nmw-radius);
  box-shadow: var(--nmw-shadow); padding: 16px 18px; margin-bottom:20px;
}
.planning-service-item{ display:flex; justify-content:space-between; align-items:center; padding:6px 0; border-bottom:1px solid var(--nmw-border); font-size:.86rem; }
.planning-service-item:last-child{ border-bottom:none; }

/* ---------- Login (ecran plein page, deux colonnes) ---------- */

.login-shell{ display:flex; min-height:100vh; }
.login-aside{
  flex: 1 1 50%;
  background: linear-gradient(160deg, var(--nmw-sidebar), var(--nmw-sidebar-alt));
  color:#fff; display:flex; flex-direction:column; justify-content:space-between;
  padding: 40px 56px;
}
.login-brand{ display:flex; align-items:center; gap:10px; }
.login-pill{
  display:inline-flex; align-items:center; gap:8px;
  background: rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14);
  padding: 6px 14px; border-radius:999px; font-size:.78rem; width:fit-content;
}
.login-pill-dot{ width:7px; height:7px; border-radius:50%; background:#6fce8f; }
.login-aside h1{ color:#fff; font-size:2.1rem; line-height:1.25; max-width:480px; margin:22px 0 14px; }
.login-aside p{ color: rgba(255,255,255,.72); max-width:440px; font-size:.95rem; }
.login-stats{ display:flex; gap:14px; margin-top:26px; flex-wrap:wrap; }
.login-stat{
  background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12);
  border-radius: var(--nmw-radius-sm); padding: 14px 18px; min-width:120px;
}
.login-stat-value{ font-size:1.5rem; font-weight:700; color:#fff; }
.login-stat-label{ font-size:.76rem; color: rgba(255,255,255,.65); }
.login-footer{ font-size:.76rem; color: rgba(255,255,255,.5); }

.login-main{
  flex: 1 1 50%; display:flex; align-items:center; justify-content:center;
  padding: 40px; background: var(--nmw-bg);
}
.login-card{
  background:#fff; border:1px solid var(--nmw-border); border-radius: var(--nmw-radius);
  box-shadow: var(--nmw-shadow); padding: 36px 38px; width:100%; max-width:410px;
}
.login-card h2{ margin-bottom:4px; }
.login-card .text-muted{ margin-bottom:22px; }
.login-lang-btn{
  position: fixed; right:24px; top:24px;
  display:flex; align-items:center; gap:6px;
  background:#fff; border:1px solid var(--nmw-border); box-shadow: var(--nmw-shadow);
  border-radius: 999px; padding: 8px 14px;
  font-size:.8rem; font-weight:700; color: var(--nmw-text); z-index: 10;
}

.login-help-btn{
  position: fixed; right:24px; bottom:24px;
  width:42px; height:42px; border-radius:50%;
  background:#fff; border:1px solid var(--nmw-border); box-shadow: var(--nmw-shadow);
  display:flex; align-items:center; justify-content:center; color: var(--nmw-text-muted);
}

@media (max-width: 860px){
  .login-shell{ flex-direction:column; }
  .login-aside, .login-main{ flex: none; width:100%; }
  .login-aside{ padding: 30px; }
  .login-main{ padding: 30px; }
}

/* ===================================================================
   Variante "friendly" — espaces benevole / adherent.
   Meme structure que l'admin, mais plus ouverte : vert vif au lieu du
   vert fonce corporate, formes plus rondes, boutons pilule. L'admin
   (body.theme-admin) n'est pas touche par ce bloc.
   =================================================================== */

body.theme-friendly{
  --nmw-sidebar: #38a35f;
  --nmw-sidebar-alt: #2e8f4f;
  --nmw-sidebar-active: rgba(255,255,255,.22);
  --nmw-sidebar-text: rgba(255,255,255,.82);
  --nmw-sidebar-text-active: #ffffff;

  --nmw-primary: #2fa360;
  --nmw-primary-dark: #248a4e;
  --nmw-primary-light: #e6f7ec;

  --nmw-bg: #f5faf5;
  --nmw-radius: 20px;
  --nmw-radius-sm: 14px;
}

body.theme-friendly .sidebar{
  background: linear-gradient(165deg, var(--nmw-sidebar), var(--nmw-sidebar-alt));
}

body.theme-friendly .sidebar-nav-item{
  border-radius: 999px;
  font-weight: 600;
}
body.theme-friendly .sidebar-nav-item:hover{ background: rgba(255,255,255,.12); }
body.theme-friendly .sidebar-nav-item.active{
  background: #ffffff;
  color: var(--nmw-sidebar);
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
}
body.theme-friendly .sidebar-nav-item.active i{ color: var(--nmw-sidebar); }

body.theme-friendly .sidebar-section-label{ color: rgba(255,255,255,.6); }
body.theme-friendly .sidebar-user{ border-top-color: rgba(255,255,255,.18); }
body.theme-friendly .sidebar-avatar{ background: #ffffff; color: var(--nmw-sidebar); }
body.theme-friendly .sidebar-logout:hover{ background: rgba(255,255,255,.16); }

body.theme-friendly .topbar{ border-bottom-color: #e2f0e5; }
body.theme-friendly .topbar-avatar{ background: var(--nmw-primary); }
body.theme-friendly .topbar-icon-btn:hover{ background: var(--nmw-primary-light); color: var(--nmw-primary-dark); }

body.theme-friendly .card,
body.theme-friendly .nmw-card,
body.theme-friendly .stat-card{ border-radius: var(--nmw-radius); }

body.theme-friendly .stat-card-icon{ border-radius: 12px; }

body.theme-friendly .btn{ border-radius: 999px; padding-left: 1.1em; padding-right: 1.1em; }
body.theme-friendly .form-control, body.theme-friendly .form-select{ border-radius: var(--nmw-radius-sm); }

body.theme-friendly h1, body.theme-friendly h3{ letter-spacing: -.015em; }

/* ===================================================================
   Tableau de bord adherent — bandeau illustre + carte de membre.
   Police "Baloo 2" (arrondie) chargee uniquement par les pages qui
   utilisent ces classes (front/adherent/dashboard.html), pour ne pas
   payer son cout ailleurs.
   =================================================================== */

.ad-cream{ --nmw-cream: #fbf7ee; --nmw-cream-line: #efe6d2; }

.ad-hero{
  position:relative; overflow:hidden;
  background: linear-gradient(120deg, var(--nmw-primary-light), #fbf7ee);
  border:1px solid #efe6d2;
  border-radius: var(--nmw-radius); padding: 26px 30px; margin-bottom:20px;
  display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap;
}
.ad-hero-text{ flex: 1 1 260px; }
.ad-hero-text .ad-greet{
  font-family: 'Baloo 2', 'Inter', sans-serif; font-weight:700;
  font-size:1.5rem; color: var(--nmw-text); margin: 0 0 6px;
}
.ad-hero-text p{ margin:0; color: var(--nmw-text-muted); font-size:.9rem; max-width:44ch; line-height:1.5; }
.ad-hero-art{ width:150px; height:112px; flex:none; }

.ad-grid{ display:grid; grid-template-columns: 1.15fr .85fr; gap:20px; align-items:start; }
@media (max-width: 860px){ .ad-grid{ grid-template-columns:1fr; } }

.ad-card{ margin-bottom:16px; }
.ad-card h3{ margin:0 0 14px; font-size:1rem; font-weight:700; }

.ad-membercard{
  background: linear-gradient(135deg, var(--nmw-primary), var(--nmw-primary-dark));
  border-radius: var(--nmw-radius); padding: 22px 24px; color:#fff;
  position:relative; overflow:hidden; box-shadow: var(--nmw-shadow);
}
.ad-membercard::before{
  content:''; position:absolute; right:-30px; top:-30px; width:150px; height:150px;
  border-radius:50%; background: rgba(255,255,255,.09);
}
.ad-membercard::after{
  content:''; position:absolute; right:14px; bottom:-46px; width:100px; height:100px;
  border-radius:50%; background: rgba(255,255,255,.07);
}
.ad-mc-top{ display:flex; justify-content:space-between; align-items:flex-start; position:relative; gap:10px; }
.ad-mc-label{ font-size:.66rem; text-transform:uppercase; letter-spacing:.09em; opacity:.8; }
.ad-mc-type{ font-family:'Baloo 2', sans-serif; font-size:1.1rem; font-weight:700; margin-top:2px; }
.ad-mc-badge{
  background: rgba(255,255,255,.2); border-radius:999px; padding:5px 12px;
  font-size:.7rem; font-weight:700; white-space:nowrap; flex:none;
}
.ad-mc-badge.is-warn{ background: rgba(255,255,255,.92); color: var(--nmw-orange-dark); }
.ad-mc-name{ font-size:1.2rem; font-weight:700; margin-top:28px; position:relative; }
.ad-mc-row{ display:flex; justify-content:space-between; margin-top:16px; font-size:.72rem; position:relative; gap:14px; }
.ad-mc-row > div div:first-child{ opacity:.75; margin-bottom:2px; }
.ad-mc-row > div div:last-child{ font-weight:700; font-size:.84rem; }
.ad-mc-pay{
  display:inline-block; position:relative; margin-top:18px; width:100%; border:none; cursor:pointer;
  background:#fff; color: var(--nmw-primary-dark); font-weight:700; font-size:.84rem;
  padding:10px 16px; border-radius:999px; text-align:center; text-decoration:none;
  box-sizing:border-box;
}
.ad-mc-pay:hover{ color: var(--nmw-primary-dark); }
.ad-mc-links{ display:flex; flex-direction:column; gap:8px; margin-top:14px; }
.ad-mc-links a{ font-size:.82rem; font-weight:600; color: var(--nmw-text-muted); text-decoration:none; }
.ad-mc-links a:hover{ color: var(--nmw-primary-dark); }
.ad-mc-links a i{ margin-right:6px; }

.ad-actions{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width: 520px){ .ad-actions{ grid-template-columns:1fr; } }
.ad-action{
  display:flex; flex-direction:column; gap:10px;
  background:#fff; border:1px solid var(--nmw-border); border-radius: var(--nmw-radius-sm);
  padding:16px; text-decoration:none; color: var(--nmw-text); box-shadow: var(--nmw-shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.ad-action:hover{ transform: translateY(-2px); box-shadow: 0 4px 14px rgba(20,30,20,.1); }
.ad-action.is-locked{ opacity:.6; }
.ad-action .ad-icon{
  width:36px; height:36px; border-radius:11px; display:flex; align-items:center; justify-content:center; font-size:1rem;
}
.ad-action.i-orange .ad-icon{ background: var(--nmw-orange-light); color: var(--nmw-orange-dark); }
.ad-action.i-green .ad-icon{ background: var(--nmw-primary-light); color: var(--nmw-primary-dark); }
.ad-action.i-blue .ad-icon{ background: var(--nmw-blue-light); color: var(--nmw-blue); }
.ad-action .ad-name{ font-weight:700; font-size:.86rem; }
.ad-action .ad-sub{ font-size:.76rem; color: var(--nmw-text-muted); }
.ad-action .ad-sub.is-warn{ color: var(--nmw-orange-dark); font-weight:600; }

.ad-volunteer{
  display:flex; align-items:center; gap:16px; margin-top:18px; flex-wrap:wrap;
  background: #fbf7ee; border:1px dashed #efe6d2; border-radius: var(--nmw-radius-sm); padding:16px 18px;
}
.ad-volunteer svg{ width:40px; height:40px; flex:none; }
.ad-volunteer .ad-vol-text{ flex:1 1 220px; }
.ad-volunteer p{ margin:0 0 10px; font-size:.85rem; color: var(--nmw-text-muted); line-height:1.5; }
.ad-volunteer p:last-child{ margin-bottom:0; }

/* ---------- En-tete de page adherent (icone + titre + sous-titre) ----------
   Reutilise sur toutes les pages adherent hors dashboard (qui a son propre
   bandeau illustre) : un simple repere visuel coherent, sans illustration,
   pour remplacer le "<h3>" nu herite de l'admin. */

.ad-page-head{ display:flex; align-items:center; gap:14px; margin: 4px 0 22px; }
.ad-page-icon{
  width:44px; height:44px; border-radius:14px; flex:none;
  background: var(--nmw-primary-light); color: var(--nmw-primary-dark);
  display:flex; align-items:center; justify-content:center; font-size:1.2rem;
}
.ad-page-head h3{
  font-family: 'Baloo 2', 'Inter', sans-serif; font-weight:700;
  font-size:1.3rem; margin:0;
}
.ad-page-head p{ margin:2px 0 0; font-size:.85rem; color: var(--nmw-text-muted); }

.ad-eyebrow{
  font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; font-weight:700;
  color: var(--nmw-primary-dark); margin: 22px 0 12px;
}
.ad-eyebrow:first-child{ margin-top:0; }

.ad-empty{
  display:flex; flex-direction:column; align-items:center; text-align:center;
  gap:10px; padding: 40px 20px; color: var(--nmw-text-muted);
}
.ad-empty .ad-empty-icon{
  width:52px; height:52px; border-radius:16px; background: var(--nmw-primary-light);
  color: var(--nmw-primary-dark); display:flex; align-items:center; justify-content:center; font-size:1.4rem;
}
.ad-empty p{ margin:0; font-size:.9rem; }
