/* ===== RESET & ROOT ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --g900: #0a1f12;
  --g800: #1B4332;
  --g700: #2D6A4F;
  --g600: #40916C;
  --g400: #74C69D;
  --g100: #d8f3dc;
  --g50:  #f0faf3;
  --white: #ffffff;
  --off:  #f6fbf7;
  --gray: #64748b;
  --gray2:#94a3b8;
  --red:  #e53e3e;
  --gold: #c9a227;
  --gold-bg: #fef9ec;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow:    0 2px 12px rgba(27,67,50,.10);
  --shadow-md: 0 4px 24px rgba(27,67,50,.13);
  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 22px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { height: 100%; overflow-x: hidden; }
body {
  font-family: var(--font); background: var(--off); color: var(--g900);
  min-height: 100%; min-height: 100dvh;
  width: 100%; max-width: 100vw; overflow-x: hidden;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--g400); border-radius: 99px; }

/* ===== TOPBAR ===== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--g800);
  display: flex; align-items: flex-end; gap: 10px;
  padding-bottom: 10px;
  padding-left: max(14px, env(safe-area-inset-left));
  padding-right: max(14px, env(safe-area-inset-right));
  padding-top: max(10px, env(safe-area-inset-top));
  min-height: calc(58px + env(safe-area-inset-top));
  width: 100%;
  box-shadow: 0 1px 0 rgba(255,255,255,.05), 0 4px 20px rgba(0,0,0,.2);
}
.logo-wrap {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%; display: grid; place-items: center;
  overflow: hidden; font-size: 19px; position: relative;
  background: white;
  box-shadow: 0 0 0 2px rgba(201,162,39,.5), 0 2px 8px rgba(0,0,0,.25);
}
.logo-wrap.admin-logo { cursor: pointer; }
.logo-wrap.admin-logo:hover::after {
  content: '✏️'; position: absolute; inset: 0;
  background: rgba(0,0,0,.45); display: grid; place-items: center;
  font-size: 13px; border-radius: 50%;
}
.topbar h1 {
  color: var(--white); font-size: 16px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: .2px;
}
.topbar .sub { color: rgba(255,255,255,.45); font-size: 10px; margin-top: 1px; }
.admin-badge {
  background: var(--gold); color: var(--g900);
  font-size: 9px; font-weight: 800; padding: 3px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .8px; white-space: nowrap;
}
.icon-btn {
  background: rgba(255,255,255,.07); border: none; color: rgba(255,255,255,.85);
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  cursor: pointer; display: grid; place-items: center; font-size: 16px;
  transition: background .18s;
}
.icon-btn:hover { background: rgba(255,255,255,.14); }

/* ===== BOTTOM NAV ===== */
.bottomnav {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom, 12px));
  left: 50%; transform: translateX(-50%);
  z-index: 100;
  width: calc(100vw - 28px);
  max-width: 430px;
  background: rgba(15, 35, 20, 0.84);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  display: flex; height: 62px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 8px 32px rgba(0,0,0,.28), 0 2px 8px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.08);
  padding: 0 4px;
}
.bottomnav button {
  flex: 1; background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: rgba(255,255,255,.38); font-size: 9px; font-weight: 700;
  transition: color .22s; position: relative; letter-spacing: .4px;
  border-radius: 18px; padding: 0 4px;
}
.bottomnav button .ico {
  font-size: 20px; line-height: 1;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1);
  display: block;
}
.bottomnav button.active { color: rgba(255,255,255,.95); }
.bottomnav button.active .ico { transform: scale(1.18); }
.bottomnav button.active::before {
  content: ''; position: absolute;
  top: 8px; left: 50%; transform: translateX(-50%);
  width: 32px; height: 32px;
  background: rgba(116,198,157,.18);
  border-radius: 12px; z-index: -1;
}

/* ===== DRAWER ===== */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0,0,0,.35); display: none; backdrop-filter: blur(2px);
}
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed; right: 0; top: 58px; bottom: 62px; z-index: 160;
  background: var(--g900); width: 245px; padding: 0; overflow-y: auto;
  transform: translateX(100%); transition: transform .25s cubic-bezier(.4,0,.2,1);
  border-left: 1px solid rgba(255,255,255,.05);
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 11px; cursor: pointer;
  color: rgba(255,255,255,.55); font-size: 13.5px; font-weight: 600;
  transition: all .18s; margin-bottom: 2px;
}
.drawer-item:hover, .drawer-item.active { background: rgba(255,255,255,.07); color: var(--white); }
.drawer-item .d-ico { font-size: 18px; }
.drawer-divider { height: 1px; background: rgba(255,255,255,.06); margin: 8px 4px; }
.drawer-section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: rgba(255,255,255,.3); padding: 6px 14px 4px; }

/* ===== SOCIAL CARDS ===== */
.social-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 10px; border-radius: 16px; text-decoration: none;
  background: var(--white); border: 1.5px solid var(--g100);
  transition: transform .18s, box-shadow .18s;
}
.social-card:active { transform: scale(.96); }
.social-ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--sc, #888); display: grid; place-items: center;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--sc, #888) 40%, transparent);
}
.social-name { font-size: 13px; font-weight: 700; color: var(--dark); }
.social-handle { font-size: 11px; color: var(--gray2); }

/* ===== CONTACT ROWS ===== */
.info-contact-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  text-decoration: none; color: inherit; transition: background .15s;
}
.info-contact-row:active { background: var(--off); }
.info-contact-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.info-contact-text { flex: 1; }
.info-contact-label { font-size: 12px; color: var(--gray2); margin-bottom: 1px; }
.info-contact-val { font-size: 14px; font-weight: 700; color: var(--dark); }
.info-contact-arrow { font-size: 20px; color: var(--g300); font-weight: 300; }

/* ===== CONFIDENTIALITE ===== */
.confidentialite-section {
  background: var(--white); border-radius: 14px; padding: 16px; margin-bottom: 10px;
  border: 1.5px solid var(--g100);
}
.conf-titre { font-size: 14px; font-weight: 800; color: var(--g800); margin-bottom: 8px; }
.conf-texte { font-size: 13px; color: var(--gray); line-height: 1.7; }

/* ===== CHATBOT ===== */
#chatbot-fab {
  position: fixed; bottom: calc(82px + env(safe-area-inset-bottom, 0px)); right: 16px;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--g800), var(--g600));
  border: none; font-size: 24px; cursor: pointer; z-index: 200;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); display: grid; place-items: center;
  transition: transform .2s; position: fixed;
}
#chatbot-fab:active { transform: scale(.92); }

#chatbot-window {
  position: fixed; bottom: calc(148px + env(safe-area-inset-bottom, 0px)); right: 12px;
  width: calc(100vw - 24px); max-width: 360px;
  background: #f4f6f3; border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0,0,0,.22); z-index: 199;
  display: flex; flex-direction: column; overflow: hidden;
  max-height: 60vh;
  border: 1px solid var(--g100);
}
#chatbot-header {
  background: linear-gradient(135deg, var(--g900), var(--g700));
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
  color: white; flex-shrink: 0;
}
#chatbot-messages {
  flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px;
  background: #f4f6f3;
}
.cb-msg-bot, .cb-msg-user {
  max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 13px; line-height: 1.6;
}
.cb-msg-bot {
  background: var(--white); color: var(--dark); border-radius: 4px 16px 16px 16px;
  align-self: flex-start; box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.cb-msg-user {
  background: var(--g800); color: white; border-radius: 16px 16px 4px 16px;
  align-self: flex-end;
}
#chatbot-chips {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 4px;
  border-top: 1px solid var(--g100); flex-shrink: 0;
}
.cb-chip {
  background: var(--g50); color: var(--g700); border: 1.5px solid var(--g100);
  border-radius: 20px; padding: 6px 12px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.cb-chip:active { background: var(--g100); }
#chatbot-input-wrap {
  display: flex; gap: 8px; align-items: center; padding: 10px 12px;
  border-top: 1px solid var(--g100); flex-shrink: 0;
}
#chatbot-input {
  flex: 1; border: 1.5px solid var(--g200); border-radius: 20px; padding: 9px 14px;
  font-size: 13px; font-family: inherit; background: var(--white); color: var(--dark); outline: none;
}

/* ===== MAIN ===== */
main {
  margin-top: calc(58px + env(safe-area-inset-top, 0px));
  margin-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  padding: 18px 14px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}
.page { display: none; }
.page.active { display: block; }

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
}
.page-header h2 { font-size: 21px; font-weight: 800; color: var(--g900); letter-spacing: -.3px; }

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--g800); color: var(--white);
  border: none; border-radius: var(--radius-sm); padding: 9px 16px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .18s, transform .12s; white-space: nowrap;
}
.btn-primary:hover  { background: var(--g700); }
.btn-primary:active { transform: scale(.96); }

.btn-danger  { background: #fff0f0; color: var(--red); border: none; border-radius: 8px; padding: 6px 11px; font-size: 12px; font-weight: 700; cursor: pointer; }
.btn-sm      { background: var(--g50); color: var(--g700); border: 1px solid var(--g100); border-radius: 8px; padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.btn-gold    { background: var(--gold); color: var(--g900); border: none; border-radius: var(--radius-sm); padding: 9px 16px; font-size: 13px; font-weight: 700; cursor: pointer; }

.btn-wave   { background: #00bcd4; color: #003B6F; border: none; border-radius: 11px; padding: 11px 10px; font-size: 13px; font-weight: 800; cursor: pointer; flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; transition: opacity .18s; }
.btn-wave:hover { opacity: .88; }
.btn-wave img   { height: 24px; width: 24px; object-fit: contain; border-radius: 5px; background: white; padding: 2px; }

.btn-orange { background: #ff6600; color: white; border: none; border-radius: 11px; padding: 11px 10px; font-size: 13px; font-weight: 800; cursor: pointer; flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; transition: opacity .18s; }
.btn-orange:hover { opacity: .88; }
.btn-orange img { height: 24px; width: 24px; object-fit: contain; border-radius: 5px; }

.btn-especes { background: var(--g50); color: var(--g700); border: 1px solid var(--g100); border-radius: 11px; padding: 11px 10px; font-size: 13px; font-weight: 800; cursor: pointer; flex: 1; }
.btn-cancel  { background: var(--off); color: var(--gray); border: none; border-radius: 11px; padding: 13px; font-size: 14px; font-weight: 700; cursor: pointer; flex: 1; }
.btn-save    { background: var(--g800); color: var(--white); border: none; border-radius: 11px; padding: 13px; font-size: 14px; font-weight: 700; cursor: pointer; flex: 1; transition: background .18s; }
.btn-save:hover { background: var(--g700); }

/* ===== CARDS ===== */
.card {
  background: var(--white); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); margin-bottom: 12px;
}

/* ===== STAT CARDS ===== */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.stat-card {
  background: var(--white); border-radius: var(--radius); padding: 16px 14px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px;
}
.stat-card .stat-top { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-card .stat-ico-wrap {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center; font-size: 20px; margin-bottom: 10px;
  background: var(--g50);
}
.stat-card.gold .stat-ico-wrap  { background: var(--gold-bg); }
.stat-card.teal .stat-ico-wrap  { background: var(--g50); }
.stat-card.red  .stat-ico-wrap  { background: #fff0f0; }
.stat-card .stat-val { font-size: 24px; font-weight: 900; color: var(--g900); line-height: 1.1; letter-spacing: -.5px; }
.stat-card .stat-lbl { font-size: 11px; font-weight: 600; color: var(--gray2); text-transform: uppercase; letter-spacing: .5px; }

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 11px; font-weight: 700; color: var(--gray); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 10px; margin-top: 4px;
}

/* ===== ACTIVITY BANNER ===== */
.activity-banner {
  background: linear-gradient(135deg, var(--g800) 0%, var(--g700) 100%);
  border-radius: var(--radius); padding: 18px; color: var(--white); margin-bottom: 12px;
}
.activity-banner .banner-label { font-size: 10px; color: var(--g400); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.activity-banner .banner-title { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.activity-banner .banner-sub   { font-size: 12px; color: rgba(255,255,255,.65); }

/* ===== BADGES ===== */
.badge       { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.badge-green { background: var(--g100); color: var(--g700); }
.badge-gold  { background: var(--gold-bg); color: #92400e; }
.badge-red   { background: #fff0f0; color: var(--red); }
.badge-gray  { background: #f1f5f9; color: var(--gray); }
.badge-blue  { background: #eff6ff; color: #1d4ed8; }

/* ===== MEMBRE ROW ===== */
.membre-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border-radius: var(--radius-sm); padding: 12px 14px;
  box-shadow: var(--shadow-sm); margin-bottom: 8px; border: 1px solid rgba(0,0,0,.04);
  transition: box-shadow .18s;
}
.membre-row:hover { box-shadow: var(--shadow); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; color: var(--white);
  display: grid; place-items: center; font-weight: 800; font-size: 14px; flex-shrink: 0;
}
.membre-info   { flex: 1; min-width: 0; }
.membre-name   { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--g900); }
.membre-role   { font-size: 11px; color: var(--gray2); margin-top: 1px; }

/* ===== COTISATION / PAIEMENT ROW ===== */
.cotis-summary {
  background: linear-gradient(135deg, var(--g800), var(--g700));
  border-radius: var(--radius); padding: 18px; margin-bottom: 16px;
  color: var(--white);
}
.cotis-summary .cs-title  { font-size: 10px; font-weight: 700; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.cotis-summary .cs-amount { font-size: 28px; font-weight: 900; color: var(--white); letter-spacing: -.5px; }
.cotis-summary .cs-sub    { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 2px; }

.paiement-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border-radius: var(--radius-sm); padding: 13px 14px;
  box-shadow: var(--shadow-sm); margin-bottom: 8px; border: 1px solid rgba(0,0,0,.04);
}
.paiement-row .pr-info    { flex: 1; min-width: 0; }
.paiement-row .pr-name    { font-weight: 700; font-size: 13.5px; color: var(--g900); }
.paiement-row .pr-sub     { font-size: 11px; color: var(--gray2); margin-top: 2px; }
.paiement-row .pr-amount  { font-weight: 800; font-size: 14px; color: var(--g800); white-space: nowrap; }

.statut-pill { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
.statut-pill.en_attente { background: var(--gold-bg); color: #92400e; }
.statut-pill.confirme   { background: var(--g100); color: var(--g700); }
.statut-pill.rejete     { background: #fff0f0; color: var(--red); }

/* ===== PAIEMENT TYPE CARDS ===== */
.paiement-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.paiement-type-card {
  background: var(--off); border-radius: var(--radius-sm); padding: 16px 12px;
  cursor: pointer; border: 2px solid transparent; transition: all .18s; text-align: center;
}
.paiement-type-card.selected { border-color: var(--g600); background: var(--g50); }
.paiement-type-card .ptc-ico     { font-size: 26px; margin-bottom: 6px; }
.paiement-type-card .ptc-montant { font-size: 18px; font-weight: 900; color: var(--g800); letter-spacing: -.3px; }
.paiement-type-card .ptc-label   { font-size: 11px; color: var(--gray2); margin-top: 3px; }

/* ===== PRESENCE ===== */
.dimanche-card {
  background: linear-gradient(135deg, var(--g800), var(--g900));
  border-radius: var(--radius); padding: 18px; color: var(--white); margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.dimanche-card .dc-left h3 { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.dimanche-card .dc-left p  { font-size: 12px; color: rgba(255,255,255,.45); }
.dimanche-card .dc-right   { text-align: center; }
.dimanche-card .dc-right .big { font-size: 34px; font-weight: 900; line-height: 1; }
.dimanche-card .dc-right .lbl { font-size: 10px; color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .5px; }

.presence-list { display: flex; flex-direction: column; gap: 7px; }
.presence-row  {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border-radius: var(--radius-sm); padding: 11px 14px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(0,0,0,.04);
}
.presence-row .pr-name { flex: 1; font-weight: 600; font-size: 13px; color: var(--g900); }
.toggle-btn {
  width: 48px; height: 26px; border-radius: 13px; border: none; cursor: pointer;
  position: relative; transition: background .22s; background: #e2e8f0; flex-shrink: 0;
}
.toggle-btn.on { background: var(--g600); }
.toggle-btn::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: white;
  transition: left .22s; box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.toggle-btn.on::after { left: 25px; }

/* ===== PROGRESS BAR ===== */
.progress-bar  { height: 5px; background: var(--g100); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; background: var(--g600); border-radius: 99px; transition: width .4s ease; }

/* ===== ACTIVITE CARD ===== */
.activite-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin-bottom: 12px; border: 1px solid rgba(0,0,0,.05);
}
.activite-card .act-top {
  background: var(--g800); padding: 14px 16px; display: flex; align-items: center; gap: 12px;
}
.activite-card .act-top .act-ico {
  font-size: 22px; width: 42px; height: 42px;
  background: rgba(255,255,255,.1); border-radius: 10px;
  display: grid; place-items: center; flex-shrink: 0;
}
.activite-card .act-top .act-title { color: var(--white); font-weight: 800; font-size: 14px; }
.activite-card .act-top .act-date  { color: rgba(255,255,255,.55); font-size: 11px; margin-top: 3px; }
.activite-card .act-body   { padding: 13px 16px; }
.activite-card .act-body p { font-size: 13px; color: var(--gray); line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.activite-card .act-footer { padding: 0 16px 13px; display: flex; gap: 8px; align-items: center; }

/* ===== ACTU CARD ===== */
.actu-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  margin-bottom: 12px; border: 1px solid rgba(0,0,0,.05);
}
.actu-card .actu-tag { display: inline-block; font-size: 9.5px; font-weight: 800; padding: 3px 10px; text-transform: uppercase; letter-spacing: .5px; }
.actu-card .actu-tag.annonce { background: var(--g100); color: var(--g700); }
.actu-card .actu-tag.urgent  { background: #fff0f0; color: var(--red); }
.actu-card .actu-tag.info    { background: var(--gold-bg); color: #92400e; }
.actu-card .actu-content  { padding: 10px 16px 16px; }
.actu-card .actu-title    { font-weight: 800; font-size: 15px; margin-bottom: 6px; color: var(--g900); }
.actu-card .actu-body     { font-size: 13px; color: var(--gray); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.actu-card .actu-meta     { font-size: 11px; color: var(--gray2); margin-top: 8px; }

/* ===== FEED SOCIAL (ACTUALITES) ===== */
#actualites { max-width: 680px; margin: 0 auto; }

/* Hero */
.feed-hero {
  position: relative; overflow: hidden; color: #fff;
  border-radius: 22px; padding: 18px 18px 14px; margin-bottom: 14px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(116,198,157,.34), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, rgba(201,162,39,.22), transparent 55%),
    linear-gradient(135deg, #0a1f12, #1B4332 55%, #2D6A4F);
  box-shadow: 0 12px 30px rgba(10,31,18,.26);
}
.feed-hero-glow {
  position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(116,198,157,.4), transparent 65%);
  top: -110px; right: -60px; animation: heroGlow 7s ease-in-out infinite alternate;
}
@keyframes heroGlow { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-18px,14px,0) scale(1.15); } }
.feed-hero-top { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.feed-avatar {
  width: 54px; height: 54px; border-radius: 50%; padding: 2px; flex-shrink: 0;
  background: linear-gradient(135deg, #f2d675, #c9a227);
  box-shadow: 0 4px 14px rgba(0,0,0,.32);
}
.feed-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: #fff; }
.feed-hero-title { flex: 1; min-width: 0; }
.feed-hero-name { font-size: 16px; font-weight: 800; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-hero-sub  { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 2px; }
.feed-live {
  display: flex; align-items: center; gap: 5px; flex-shrink: 0;
  font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  padding: 5px 9px; border-radius: 99px; backdrop-filter: blur(6px);
}
.feed-live span { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; animation: livePulse 1.8s infinite; }
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,.6); }
  70%  { box-shadow: 0 0 0 7px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
.feed-hero-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.feed-hero-stats > div {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; padding: 8px 10px; text-align: center; backdrop-filter: blur(4px);
}
.feed-hero-stats b    { display: block; font-size: 15px; font-weight: 800; letter-spacing: -.3px; }
.feed-hero-stats span { font-size: 9px; text-transform: uppercase; letter-spacing: .6px; color: rgba(255,255,255,.5); }

/* Composer (admin) */
.feed-composer {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  background: var(--white); border-radius: 16px; padding: 10px 12px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(0,0,0,.05);
  cursor: pointer; transition: transform .15s, box-shadow .2s;
}
.feed-composer:active { transform: scale(.985); }
.composer-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #fff; }
.composer-fake {
  flex: 1; font-size: 13px; color: var(--gray2); background: var(--off);
  border-radius: 99px; padding: 9px 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.composer-ico { font-size: 17px; }

/* Filtres */
.feed-filters {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.feed-filters::-webkit-scrollbar { display: none; }
.feed-chip {
  flex-shrink: 0; border: 1px solid rgba(27,67,50,.12); background: var(--white);
  color: var(--gray); font-size: 12px; font-weight: 700; padding: 7px 13px;
  border-radius: 99px; cursor: pointer; transition: all .18s;
}
.feed-chip.active { background: var(--g800); color: #fff; border-color: var(--g800); box-shadow: 0 4px 12px rgba(27,67,50,.25); }

/* Post */
.feed { display: flex; flex-direction: column; gap: 14px; }
.post {
  background: var(--white); border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(0,0,0,.055); box-shadow: 0 2px 14px rgba(27,67,50,.07);
  animation: postIn .45s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes postIn { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: none; } }
.post-head { display: flex; align-items: center; gap: 10px; padding: 13px 14px 0; }
.post-avatar { width: 40px; height: 40px; border-radius: 50%; padding: 2px; flex-shrink: 0; background: linear-gradient(135deg, #f2d675, #c9a227); }
.post-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: #fff; }
.post-who { flex: 1; min-width: 0; }
.post-author { font-size: 13px; font-weight: 800; color: var(--g900); display: flex; align-items: center; gap: 4px; }
.post-author .verified { color: var(--g600); font-size: 11px; }
.post-time { font-size: 11px; color: var(--gray2); margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.post-time .dotsep { width: 3px; height: 3px; border-radius: 50%; background: var(--gray2); }
.post-tag { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 4px 9px; border-radius: 99px; flex-shrink: 0; }
.post-tag.annonce { background: var(--g100); color: var(--g700); }
.post-tag.urgent  { background: #fff0f0; color: var(--red); }
.post-tag.info    { background: var(--gold-bg); color: #92400e; }
.post-title { font-size: 16px; font-weight: 800; color: var(--g900); line-height: 1.35; letter-spacing: -.2px; padding: 10px 14px 0; }
.post-body {
  font-size: 13.5px; color: var(--gray); line-height: 1.65; white-space: pre-wrap; word-break: break-word;
  padding: 6px 14px 0; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.post-body.open { display: block; -webkit-line-clamp: unset; }
.post-more { border: none; background: none; color: var(--g700); font-size: 12px; font-weight: 800; padding: 6px 14px 0; cursor: pointer; }
.post-media { margin-top: 11px; background: #0c1c14; cursor: zoom-in; overflow: hidden; }
.post-media img { display: block; width: 100%; max-height: 600px; object-fit: contain; transition: transform .5s ease; }
.post-media:active img { transform: scale(1.015); }
.post-actions { display: flex; align-items: center; gap: 6px; padding: 10px 12px; margin-top: 10px; border-top: 1px solid rgba(0,0,0,.05); }
.post-action {
  display: inline-flex; align-items: center; gap: 6px; border: none; background: transparent;
  color: var(--gray); font-size: 12.5px; font-weight: 700; padding: 8px 12px; border-radius: 10px;
  cursor: pointer; transition: background .15s, color .15s;
}
.post-action:hover { background: var(--off); }
.post-action .pa-ico { font-size: 15px; display: inline-block; }
.post-action.liked { color: #e0245e; }
.post-action.liked .pa-ico { animation: heartPop .4s ease; }
@keyframes heartPop { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }

/* Empty */
.feed-empty { background: var(--white); border-radius: 20px; padding: 46px 22px; text-align: center; border: 1px dashed rgba(27,67,50,.15); }
.feed-empty .fe-ico { font-size: 46px; margin-bottom: 10px; }
.feed-empty h4 { font-size: 15px; font-weight: 800; color: var(--g900); margin-bottom: 5px; }
.feed-empty p  { font-size: 12.5px; color: var(--gray2); }

/* Modale publication */
.modal-title { font-size: 17px; font-weight: 800; color: var(--g900); margin-bottom: 14px; letter-spacing: -.2px; }
.actu-author-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.actu-author-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: 0 0 0 2px var(--g100); }
.actu-author-name { font-size: 13px; font-weight: 800; color: var(--g900); }
.actu-type-select { border: none; background: var(--off); border-radius: 8px; padding: 3px 6px; font-size: 11px; color: var(--g700); font-weight: 700; margin-top: 2px; }
.actu-upload {
  border: 2px dashed rgba(27,67,50,.18); border-radius: 14px; background: var(--off);
  min-height: 110px; display: flex; align-items: center; justify-content: center;
  text-align: center; cursor: pointer; overflow: hidden; margin-bottom: 2px;
  transition: border-color .2s, background .2s;
}
.actu-upload:hover { border-color: var(--g400); background: var(--g50); }
.actu-upload img { width: 100%; max-height: 260px; object-fit: contain; display: block; background: #0c1c14; }
.actu-upload-ico { font-size: 26px; }
.actu-upload-txt { font-size: 12.5px; font-weight: 700; color: var(--g700); margin-top: 4px; }
.actu-upload-sub { font-size: 10.5px; color: var(--gray2); margin-top: 2px; }

/* Lightbox */
.lightbox { background: rgba(4,12,8,.94); backdrop-filter: blur(6px); z-index: 400; padding: 0; align-items: center; justify-content: center; }
.lightbox img { max-width: 96vw; max-height: 92vh; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox-close {
  position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px;
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.15); color: #fff; font-size: 17px; cursor: pointer;
  display: grid; place-items: center; backdrop-filter: blur(6px);
}

@media (max-width: 400px) {
  .feed-hero { padding: 16px 14px 12px; }
  .feed-hero-name { font-size: 15px; }
  .post-title { font-size: 15px; }
}

/* ===== KHATM ===== */
.khatm-session-header {
  background: linear-gradient(135deg, var(--g900), var(--g800));
  border-radius: var(--radius); padding: 18px; color: var(--white); margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.khatm-session-header h3 { font-size: 16px; font-weight: 800; margin-bottom: 3px; }
.khatm-session-header p  { font-size: 11px; color: rgba(255,255,255,.5); }
.khatm-progress-ring { position: relative; width: 60px; height: 60px; flex-shrink: 0; }
.khatm-progress-ring svg { transform: rotate(-90deg); }
.khatm-progress-ring .pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 900; color: var(--white); }

.juz-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-bottom: 20px; }
.juz-cell {
  aspect-ratio: 1; border-radius: 11px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; cursor: pointer;
  transition: transform .15s; position: relative;
}
.juz-cell:active { transform: scale(.92); }
.juz-cell .juz-num  { font-size: 17px; font-weight: 900; line-height: 1; }
.juz-cell .juz-name { font-size: 8px; font-weight: 600; text-align: center; opacity: .65; margin-top: 2px; }
.juz-cell.libre   { background: var(--white); box-shadow: var(--shadow-sm); color: var(--g800); border: 1px solid rgba(0,0,0,.06); }
.juz-cell.assigne { background: var(--g100); color: var(--g700); }
.juz-cell.complete{ background: var(--g700); color: var(--white); }
.juz-cell.complete::after { content: '✓'; position: absolute; top: 4px; right: 6px; font-size: 9px; font-weight: 900; color: var(--gold); }
.juz-cell .juz-avatar { font-size: 7.5px; background: rgba(0,0,0,.1); border-radius: 3px; padding: 1px 4px; margin-top: 3px; }

.juz-legend { display: flex; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.juz-legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--gray); font-weight: 600; }
.juz-legend-dot  { width: 12px; height: 12px; border-radius: 4px; }

/* ===== MON ESPACE ===== */
.membre-profile-card {
  background: linear-gradient(135deg, var(--g800), var(--g700));
  border-radius: var(--radius); padding: 20px 18px; color: var(--white); margin-bottom: 20px;
  display: flex; align-items: center; gap: 16px;
}
.membre-profile-card .mp-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255,255,255,.18); display: grid; place-items: center;
  font-size: 21px; font-weight: 900; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.25);
}
.membre-profile-card h3 { font-size: 18px; font-weight: 800; }
.membre-profile-card p  { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 3px; }
.membre-profile-card .mp-badge { display: inline-block; margin-top: 7px; background: rgba(255,255,255,.14); padding: 3px 10px; border-radius: 20px; font-size: 11px; }

.mon-juz-card { background: var(--white); border-radius: var(--radius-sm); padding: 14px; box-shadow: var(--shadow-sm); margin-bottom: 8px; border: 1px solid rgba(0,0,0,.05); }
.mon-juz-card .mj-header { display: flex; align-items: center; gap: 12px; }
.mon-juz-card .mj-num    { width: 44px; height: 44px; border-radius: 10px; background: var(--g800); color: var(--white); display: grid; place-items: center; font-size: 18px; font-weight: 900; flex-shrink: 0; }
.mon-juz-card .mj-info h4 { font-weight: 700; font-size: 14px; color: var(--g900); }
.mon-juz-card .mj-info p  { font-size: 12px; color: var(--gray2); margin-top: 2px; }

/* ===== MM INFO BOX ===== */
.mm-info { background: var(--g50); border-radius: 11px; padding: 13px 14px; margin-bottom: 14px; border: 1.5px solid var(--g100); }
.mm-info .mm-label { font-size: 10.5px; color: var(--gray2); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.mm-info .mm-val   { font-size: 18px; font-weight: 900; color: var(--g800); margin-top: 2px; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab-btn { flex-shrink: 0; padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; border: 1.5px solid var(--g100); background: var(--white); color: var(--gray); cursor: pointer; transition: all .18s; }
.tab-btn.active { background: var(--g800); color: var(--white); border-color: var(--g800); }

/* ===== SEARCH ===== */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border-radius: var(--radius-sm); padding: 10px 14px;
  box-shadow: var(--shadow-sm); margin-bottom: 14px; border: 1px solid rgba(0,0,0,.05);
}
.search-bar span  { font-size: 16px; color: var(--gray2); }
.search-bar input { flex: 1; border: none; outline: none; font-size: 14px; background: transparent; color: var(--g900); }

/* ===== PIN SCREEN ===== */
.pin-screen {
  position: fixed; inset: 0; z-index: 300; background: var(--g900);
  display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 32px;
}
.pin-screen.open { display: flex; }
.pin-screen h2   { color: var(--white); font-size: 21px; font-weight: 800; text-align: center; }
.pin-screen p    { color: rgba(255,255,255,.45); font-size: 13px; text-align: center; }
.pin-dots        { display: flex; gap: 12px; }
.pin-dot         { width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,.15); transition: background .15s; }
.pin-dot.filled  { background: var(--gold); }
.pin-keypad      { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 234px; }
.pin-key         { height: 60px; border-radius: 12px; border: none; background: rgba(255,255,255,.07); color: var(--white); font-size: 21px; font-weight: 700; cursor: pointer; transition: background .15s; }
.pin-key:active  { background: var(--g700); }
.pin-key.del     { font-size: 15px; }
.pin-error       { color: #fc8181; font-size: 13px; font-weight: 600; min-height: 18px; }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.45); backdrop-filter: blur(3px);
  display: none; align-items: flex-end;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white); width: 100%; border-radius: 24px 24px 0 0;
  padding: 22px 20px 36px; max-height: 92vh; overflow-y: auto;
  animation: slideUp .26s cubic-bezier(.4,0,.2,1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-handle { width: 36px; height: 4px; background: var(--g100); border-radius: 2px; margin: 0 auto 20px; }
.modal h3     { font-size: 18px; font-weight: 800; color: var(--g900); margin-bottom: 18px; letter-spacing: -.2px; }
.modal label  { display: block; font-size: 11px; font-weight: 700; color: var(--g700); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .6px; }
.modal input, .modal select, .modal textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--g100);
  border-radius: 11px; font-size: 14px; background: var(--off);
  color: var(--g900); outline: none; margin-bottom: 14px; font-family: var(--font);
  transition: border-color .18s, background .18s;
}
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--g600); background: var(--white); }
.modal textarea { resize: vertical; min-height: 80px; }
.modal-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ===== SETTINGS ===== */
.settings-section   { margin-bottom: 22px; }
.settings-section h3 { font-size: 11px; font-weight: 700; color: var(--gray2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.settings-row {
  background: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  padding: 13px 15px; display: flex; align-items: center; gap: 12px;
  margin-bottom: 7px; cursor: pointer; border: 1px solid rgba(0,0,0,.04);
  transition: box-shadow .18s;
}
.settings-row:hover { box-shadow: var(--shadow); }
.settings-row .sr-ico   { font-size: 21px; width: 36px; text-align: center; }
.settings-row .sr-info  { flex: 1; }
.settings-row .sr-label { font-weight: 700; font-size: 14px; color: var(--g900); }
.settings-row .sr-sub   { font-size: 12px; color: var(--gray2); margin-top: 2px; }
.settings-row .sr-arrow { color: var(--gray2); font-size: 14px; }

/* ===== CROP MODAL ===== */
.crop-modal-overlay {
  position: fixed; inset: 0; z-index: 250; background: rgba(0,0,0,.88);
  display: none; align-items: center; justify-content: center; flex-direction: column; gap: 16px;
}
.crop-modal-overlay.open { display: flex; }
.crop-container {
  width: 280px; height: 280px; overflow: hidden; border-radius: 50%;
  position: relative; cursor: grab; touch-action: none;
  border: 3px solid var(--gold); box-shadow: 0 0 0 9999px rgba(0,0,0,.6);
}
.crop-container.grabbing { cursor: grabbing; }
.crop-container img { position: absolute; user-select: none; pointer-events: none; }
.crop-controls { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 8px; }
.crop-controls span { color: rgba(255,255,255,.5); font-size: 11px; font-weight: 600; }
.crop-controls input[type=range] { width: 240px; accent-color: var(--gold); }
.crop-actions { display: flex; gap: 12px; }
.crop-actions button { padding: 11px 28px; border-radius: 11px; font-size: 14px; font-weight: 800; border: none; cursor: pointer; }
.crop-cancel { background: rgba(255,255,255,.1); color: white; }
.crop-save   { background: var(--gold); color: var(--g900); }

/* ===== EMPTY ===== */
.empty { text-align: center; padding: 44px 20px; color: var(--gray2); }
.empty .empty-ico { font-size: 44px; margin-bottom: 10px; }
.empty p { font-size: 13.5px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%) translateY(16px);
  background: var(--g900); color: var(--white);
  padding: 10px 20px; border-radius: 10px; font-size: 13px; font-weight: 600;
  z-index: 400; opacity: 0; transition: all .28s; white-space: nowrap;
  border-left: 3px solid var(--gold); box-shadow: var(--shadow-md);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== RESPONSIVE TABLET ===== */
@media (min-width: 600px) {
  .topbar { padding: 0 28px; }
  main { max-width: 700px; margin-left: auto; margin-right: auto; padding: 28px 24px; }
  .bottomnav { max-width: 500px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .modal { border-radius: 20px; max-width: 480px; margin: auto; }
  .modal-overlay { align-items: center; justify-content: center; }
  .juz-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 480px) {
  main { padding: 14px 12px 96px; }
  .page-header { flex-wrap: wrap; gap: 8px; align-items: flex-start; }
  .page-header h2 { font-size: 19px; }
  .stats-grid { grid-template-columns: 1fr; gap: 10px; }
  .search-bar { padding: 10px 12px; }
  .membre-row, .paiement-row, .presence-row {
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
  }
  .membre-row .membre-info, .paiement-row .pr-info, .presence-row .pr-name {
    flex: 1 1 100%;
  }
  .membre-row .badge { margin-left: auto; }
  .paiement-row > div:last-child {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }
  .paiement-options { grid-template-columns: 1fr; }
  .dimanche-card { flex-direction: column; align-items: flex-start; gap: 10px; }
  .membre-profile-card { flex-direction: column; align-items: flex-start; gap: 12px; }
  .modal { padding: 18px 16px 28px; }
  .modal-actions { flex-direction: column; }
  .pin-screen { padding: 24px 18px; }
  .pin-keypad { width: 100%; max-width: 234px; }
  .toast { left: 12px; right: 12px; transform: translateY(16px); width: auto; white-space: normal; text-align: center; }
  .toast.show { transform: translateY(0); }
}

/* ===== RESPONSIVE DESKTOP ===== */
@media (min-width: 1024px) {
  body { display: grid; grid-template-rows: 58px 1fr; grid-template-columns: 240px 1fr; }
  .topbar { grid-column: 1 / -1; }

  .bottomnav {
    position: fixed; top: 58px; left: 0; bottom: 0;
    width: 240px; height: auto; flex-direction: column;
    justify-content: flex-start; border-top: none; border-radius: 0;
    border-right: 1px solid rgba(255,255,255,.06);
    padding: 16px 10px; gap: 2px;
    transform: none; max-width: none;
    box-shadow: 1px 0 24px rgba(0,0,0,.18);
    background: rgba(10,31,18,.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
  .bottomnav button {
    flex-direction: row; justify-content: flex-start;
    gap: 12px; padding: 11px 14px; border-radius: 13px;
    font-size: 13.5px; text-align: left; flex: none; width: 100%;
    letter-spacing: 0; color: rgba(255,255,255,.38);
  }
  .bottomnav button .ico { font-size: 19px; }
  .bottomnav button.active { color: rgba(255,255,255,.95); }
  .bottomnav button.active::before {
    top: 0; left: 0; right: 0; bottom: 0; width: auto; height: auto;
    background: rgba(116,198,157,.15); border-radius: 13px;
  }

  .drawer-overlay { display: none !important; }
  .drawer {
    position: static; transform: none !important; background: transparent;
    width: 100%; padding: 0; height: auto; border: none;
  }
  .drawer.open, .drawer { display: block; }
  .drawer-divider { background: rgba(0,0,0,.07); }
  .drawer-item { color: var(--gray2); }
  .drawer-item:hover { background: var(--g50); color: var(--g700); }

  main { grid-column: 2; grid-row: 2; margin: 0; max-width: 100%; padding: 32px 40px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .juz-grid { grid-template-columns: repeat(10, 1fr); }
  .modal { border-radius: 20px; max-width: 520px; margin: auto; }
  .modal-overlay { align-items: center; justify-content: center; }
  .toast { bottom: 30px; }
  .activites-list-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}

@media (min-width: 1400px) {
  .bottomnav { width: 260px; }
  main { padding: 36px 56px; max-width: 1320px; }
  .stats-grid { gap: 18px; }
  .card, .stat-card, .membre-row, .paiement-row, .presence-row, .activite-card, .actu-card {
    box-shadow: 0 4px 20px rgba(27,67,50,.12);
  }
  .modal { max-width: 620px; padding: 26px 24px 36px; }
  .juz-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}

/* ===== CAISSE ===== */
.caisse-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.caisse-tab { flex: 1; padding: 10px; border: 2px solid var(--g100); border-radius: 10px; background: var(--white); font-weight: 700; font-size: 13px; color: var(--gray); cursor: pointer; transition: all .2s; }
.caisse-tab.active { border-color: var(--g500); background: var(--g50); color: var(--g700); }
.caisse-type-row { display: flex; gap: 8px; margin-bottom: 14px; }

/* ===== TOGGLE SWITCH ===== */
.toggle-switch { position:relative; display:inline-block; width:48px; height:26px; flex-shrink:0; }
.toggle-switch input { opacity:0; width:0; height:0; }
.toggle-slider { position:absolute; cursor:pointer; inset:0; background:#ccc; border-radius:99px; transition:.3s; }
.toggle-slider:before { content:""; position:absolute; width:20px; height:20px; left:3px; bottom:3px; background:white; border-radius:50%; transition:.3s; }
.toggle-switch input:checked + .toggle-slider { background:var(--g500); }
.toggle-switch input:checked + .toggle-slider:before { transform:translateX(22px); }

/* ===== JUZ PDF BTN ===== */
.juz-pdf-btn { display:block; font-size:13px; margin-top:4px; text-decoration:none; opacity:.7; line-height:1; }
.juz-pdf-btn:hover { opacity:1; }

/* ===== COTIS METHODE PILLS ===== */
.cotis-methode-pill {
  padding: 6px 12px; border-radius: 99px; font-size: 12px; font-weight: 700;
  border: 2px solid var(--g100); background: var(--white); color: var(--gray);
  cursor: pointer; transition: all .2s; display:flex; align-items:center; gap:4px;
}
.cotis-methode-pill.active {
  border-color: var(--g500); background: var(--g50); color: var(--g700);
}

/* ===== MAJALIS ===== */
.majalis-card {
  background: var(--white);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  border: 1.5px solid var(--g100);
  box-shadow: 0 2px 12px rgba(27,67,50,.06);
}
.majalis-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--g50);
  color: var(--g700);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.majalis-titre {
  font-size: 16px;
  font-weight: 900;
  color: var(--g900);
  margin-bottom: 4px;
  line-height: 1.3;
}
.majalis-auteur {
  font-size: 12px;
  color: var(--g600);
  font-weight: 600;
  margin-bottom: 6px;
}
.majalis-desc {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.5;
  margin-bottom: 12px;
}
.majalis-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
