/* =================================================================
   OFP CONNECT — Gestion d'association
   Built on the OnlineManager Design System.
   Tokens + kit base + association-specific components.
   ================================================================= */

/* ---- Inter (variable + static fallbacks) ---- */
@font-face { font-family:'Inter'; src:url('../fonts/Inter-V.ttf') format('truetype-variations'); font-weight:100 900; font-style:normal; font-display:swap; }

:root {
  /* Brand / accent */
  --a:#E2006E; --a-rgb:226,0,110; --a1:#FFF0F6; --a2:#FDDAED; --a-hover:#C80062;
  /* Neutrals */
  --t1:#111827; --t2:#4B5563; --t3:#9CA3AF; --bd:#E5E7EB; --bg:#F3F4F6; --ps:#F7F8FA; --white:#FFFFFF;
  /* Dark sidebars */
  --sb-dark:#13041C; --sb-rep:#0A032D;
  /* Chart palette */
  --chart-green:#10B981; --chart-green-bg:#E0F8EF;
  --chart-violet:#7C3AED; --chart-violet-bg:#EDE9FE;
  --chart-rose:var(--a); --chart-rose-bg:#FFF0F6;
  --chart-blue:#3B82F6; --chart-blue-bg:#EFF6FF;
  --chart-cyan:#0EA5E9; --chart-cyan-bg:#E0F2FE;
  --chart-purple:#A855F7; --chart-purple-bg:#F3E8FF;
  /* Status */
  --ok:#059669; --ok-bg:#ECFDF5; --ok-bd:#A7F3D0; --danger:#DC2626; --danger-bg:#FEF2F2;
  --warn:#B45309; --warn-bg:#FFFBEB; --warn-bd:#FDE68A;
  /* Sizes */
  --sw:230px; --ch:36px; --tb:56px;
  /* Radii */
  --r:8px; --rl:12px; --rxl:14px;
  /* Type */
  --ff-sans:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --ff-display:'Inter',sans-serif;
  --ff-mono:ui-monospace,SFMono-Regular,Menlo,monospace;
  --fs-tiny:10px; --fs-micro:11px; --fs-sm:12.5px; --fs-body:13px; --fs-body-lg:14px;
  --fs-widget:15px; --fs-h3:17px; --fs-h2:22px; --fs-h1:32px;
  /* Shadows */
  --sh-card:0 1px 3px rgba(0,0,0,.04);
  --sh-button:0 1px 2px rgba(0,0,0,.04);
  --sh-modal:0 20px 25px -5px rgba(0,0,0,.10),0 10px 10px -5px rgba(0,0,0,.04);
  --sh-pop:0 4px 6px -1px rgba(0,0,0,.10),0 2px 4px -1px rgba(0,0,0,.06);
  /* Motion */
  --trans:all .2s cubic-bezier(.4,0,.2,1);
  --trans-fast:all .1s cubic-bezier(.4,0,.2,1);
  /* Density (tweakable) */
  --row-pad:11px;
  --ff-title:var(--ff-display);
}

*,*::before,*::after{ box-sizing:border-box; }
html,body{ margin:0; padding:0; height:100%; }
body{ font-family:var(--ff-sans); background:var(--bg); color:var(--t1); -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; font-size:var(--fs-body-lg); line-height:1.5; }

h1,.h1{ font-family:var(--ff-title); font-size:var(--fs-h1); font-weight:700; color:var(--t1); letter-spacing:-.01em; line-height:1.15; margin:0; }
h2,.h2{ font-family:var(--ff-title); font-size:var(--fs-h2); font-weight:600; color:var(--t1); letter-spacing:-.01em; line-height:1.2; margin:0; }
h3,.h3{ font-family:var(--ff-sans); font-size:var(--fs-h3); font-weight:700; color:var(--t1); margin:0; }
h4,.h4{ font-family:var(--ff-sans); font-size:var(--fs-widget); font-weight:600; color:var(--t1); margin:0; }
p{ margin:0; }
.text-secondary{ color:var(--t2); } .text-tertiary{ color:var(--t3); } .text-accent{ color:var(--a); }
.text-ok{ color:var(--ok); } .text-danger{ color:var(--danger); }
.caption{ font-size:var(--fs-micro); font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--t3); }
.help{ font-size:var(--fs-sm); color:var(--t3); }
.mono{ font-family:var(--ff-mono); }
a{ color:var(--a); text-decoration:none; transition:var(--trans-fast); } a:hover{ color:var(--a-hover); }
kbd{ background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.1); color:rgba(255,255,255,.7); font-size:10px; padding:1px 5px; border-radius:4px; font-family:inherit; }

/* =================== App shell =================== */
.app{ display:flex; flex-direction:column; height:100vh; overflow:hidden; }
.layout{ display:flex; flex:1; min-height:0; }
.main{ flex:1; display:flex; flex-direction:column; min-width:0; background:var(--bg); }
.page{ flex:1; overflow-y:auto; padding:24px 32px 48px; }
.page-head{ display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:22px; gap:16px; }
.page-title{ font-family:var(--ff-title); font-size:var(--fs-h1); font-weight:700; color:var(--t1); letter-spacing:-.01em; line-height:1.1; margin:0; }
.page-sub{ font-size:var(--fs-body-lg); color:var(--t2); margin:7px 0 0; }
.page-actions{ display:flex; gap:8px; align-items:center; }

/* =================== Topbar =================== */
.topbar{ height:56px; display:flex; align-items:stretch; background:rgba(255,255,255,.72); backdrop-filter:blur(7px); flex-shrink:0; z-index:50; position:relative; }
.tb-slot{ width:var(--sw); display:flex; align-items:center; gap:10px; padding:0 16px; background:var(--sb-dark); }
.tb-logo{ width:30px; height:30px; background:var(--a); border-radius:8px; display:flex; align-items:center; justify-content:center; }
.tb-logo img{ width:16px; height:16px; }
.tb-appn{ font-size:14px; font-weight:600; color:#fff; letter-spacing:.01em; }
.tb-body{ flex:1; display:flex; align-items:center; padding:0 24px; gap:12px; border-bottom:1px solid var(--bd); }
.tb-store{ font-size:13.5px; font-weight:600; color:var(--t1); }
.tb-cw{ display:flex; align-items:center; gap:6px; margin-left:24px; }
.tb-cl{ font-size:12px; color:var(--t3); }
.tb-sel{ height:36px; padding:0 28px 0 10px; font-size:13px; border:1px solid var(--bd); border-radius:var(--r); color:var(--t2); background:#fff; font-family:inherit; cursor:pointer; appearance:none; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat:no-repeat; background-position:right 10px center; }
.tb-sel:hover{ border-color:var(--t3); }
.tb-ics{ margin-left:auto; display:flex; align-items:center; gap:1px; }
.tbi{ width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center; border-radius:var(--r); border:none; background:transparent; color:var(--t2); cursor:pointer; transition:var(--trans-fast); position:relative; }
.tbi:hover{ background:var(--ps); color:var(--t1); }
.tbi.red{ color:var(--danger); } .tbi.red:hover{ background:var(--danger-bg); }
.tbi .dot{ position:absolute; top:7px; right:8px; width:7px; height:7px; border-radius:50%; background:var(--a); border:1.5px solid #fff; }
.tb-av{ width:30px; height:30px; border-radius:50%; background:var(--a1); color:var(--a); font-size:11px; font-weight:600; display:flex; align-items:center; justify-content:center; border:2px solid var(--a2); margin-left:6px; cursor:pointer; }

/* =================== Sidebar =================== */
.sidebar{ width:var(--sw); background-color:var(--sb-dark); background-image:url('../img/bg-menu.jpg'); background-size:cover; background-position:center; display:flex; flex-direction:column; flex-shrink:0; padding:14px 0 0; }
.sb-search{ margin:0 12px 12px; display:flex; align-items:center; gap:7px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.08); border-radius:var(--r); padding:7px 10px; color:rgba(255,255,255,.55); font-size:12.5px; cursor:pointer; transition:var(--trans-fast); }
.sb-search:hover{ background:rgba(255,255,255,.08); }
.sb-search svg{ width:13px; height:13px; }
.sb-search span{ flex:1; }
.sb-search kbd{ background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.08); color:rgba(255,255,255,.6); font-size:10px; padding:1px 5px; border-radius:4px; }
.sb-nav{ flex:1; overflow-y:auto; padding:4px 8px; }
.sb-sec{ font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:rgba(255,255,255,.35); padding:14px 12px 6px; }
.ni{ display:flex; align-items:center; gap:10px; padding:8px 12px; border-radius:var(--r); font-size:13px; color:rgba(255,255,255,.65); cursor:pointer; margin-bottom:1px; transition:var(--trans-fast); }
.ni:hover{ background:rgba(255,255,255,.08); color:#fff; }
.ni.act{ background:var(--a); color:#fff; font-weight:500; }
.ni svg{ width:15px; height:15px; flex-shrink:0; }
.ni .ni-badge{ margin-left:auto; background:rgba(255,255,255,.14); color:#fff; font-size:10.5px; font-weight:600; padding:1px 7px; border-radius:10px; }
.ni.act .ni-badge{ background:rgba(255,255,255,.25); }
.sb-foot{ padding:12px; border-top:1px solid rgba(255,255,255,.08); }
.sb-foot-user{ display:flex; align-items:center; gap:10px; }
.sb-av{ width:32px; height:32px; border-radius:50%; background:var(--a1); color:var(--a); font-size:11px; font-weight:600; display:flex; align-items:center; justify-content:center; border:2px solid var(--a); }
.sb-foot-name{ font-size:12.5px; font-weight:500; color:#fff; }
.sb-foot-role{ font-size:11px; color:rgba(255,255,255,.5); }

/* =================== Buttons =================== */
.btn{ display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 16px; font-size:13px; font-weight:500; font-family:inherit; border-radius:var(--r); cursor:pointer; border:1px solid var(--bd); background:#fff; color:var(--t2); box-shadow:var(--sh-button); transition:var(--trans-fast); white-space:nowrap; }
.btn:hover{ background:var(--ps); color:var(--t1); }
.btn:active{ transform:scale(.98); }
.btn svg{ width:14px; height:14px; }
.btn.primary{ background:var(--a); color:#fff; border-color:transparent; height:40px; padding:0 20px; }
.btn.primary:hover{ background:var(--a-hover); color:#fff; }
.btn.sm{ height:32px; padding:0 12px; font-size:12.5px; }
.btn.ghost{ border-color:transparent; box-shadow:none; background:transparent; }
.btn.ghost:hover{ background:var(--ps); }
.icon-btn{ width:30px; height:30px; border:none; background:transparent; border-radius:6px; color:var(--t3); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; transition:var(--trans-fast); }
.icon-btn:hover{ background:var(--bg); color:var(--t1); }

/* =================== Badges / status =================== */
.pbadge{ height:24px; padding:0 11px; border-radius:12px; font-size:11px; font-weight:700; display:inline-flex; align-items:center; gap:5px; text-transform:uppercase; letter-spacing:.02em; white-space:nowrap; }
.pbadge.green{ background:var(--ok-bg); color:var(--ok); border:1px solid var(--ok-bd); }
.pbadge.rose{ background:var(--a1); color:var(--a); }
.pbadge.gray{ background:var(--bg); color:var(--t2); border:1px solid var(--bd); }
.pbadge.filled{ background:var(--a); color:#fff; }
.pbadge.outline{ background:transparent; border:1.5px solid var(--a); color:var(--a); }
.pbadge.warn{ background:var(--warn-bg); color:var(--warn); border:1px solid var(--warn-bd); }
.pbadge.violet{ background:var(--chart-violet-bg); color:var(--chart-violet); }
.pbadge.blue{ background:var(--chart-blue-bg); color:var(--chart-blue); }
.pbadge.cyan{ background:var(--chart-cyan-bg); color:var(--chart-cyan); }
.stb{ display:inline-flex; align-items:center; gap:5px; font-size:12.5px; font-weight:500; }
.stdon{ width:7px; height:7px; border-radius:50%; background:#10B981; }
.stdoff{ width:7px; height:7px; border-radius:50%; background:var(--t3); }
.stdwarn{ width:7px; height:7px; border-radius:50%; background:#F59E0B; }
/* tiny role tag with leading dot */
.rtag{ display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:500; color:var(--t2); }
.rtag i{ width:8px; height:8px; border-radius:3px; display:inline-block; }

/* =================== Forms =================== */
.field{ display:flex; flex-direction:column; gap:6px; }
.field label{ font-size:12.5px; font-weight:700; color:var(--t2); }
.field .req{ color:var(--a); }
.input,select.input,textarea.input{ min-height:38px; height:38px; padding:0 12px; font-size:13.5px; border:1px solid var(--bd); border-radius:var(--r); outline:none; font-family:inherit; background:#fff; color:var(--t1); width:100%; transition:var(--trans-fast); }
textarea.input{ height:auto; padding:10px 12px; line-height:1.5; resize:vertical; }
select.input{ appearance:none; cursor:pointer; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat:no-repeat; background-position:right 12px center; padding-right:30px; }
.input:focus,textarea.input:focus,select.input:focus{ border-color:var(--a); box-shadow:0 0 0 3px var(--a1); }
.switch{ position:relative; width:44px; height:24px; display:inline-block; flex-shrink:0; }
.switch input{ opacity:0; width:0; height:0; }
.slider{ position:absolute; inset:0; background:var(--bd); border-radius:34px; cursor:pointer; transition:var(--trans-fast); }
.slider:before{ content:""; position:absolute; width:18px; height:18px; left:3px; bottom:3px; background:#fff; border-radius:50%; transition:var(--trans-fast); box-shadow:0 1px 3px rgba(0,0,0,.1); }
.switch input:checked + .slider{ background:var(--a); }
.switch input:checked + .slider:before{ transform:translateX(20px); }
.search-field{ position:relative; display:flex; align-items:center; }
.search-field svg{ position:absolute; left:12px; width:14px; height:14px; color:var(--t3); pointer-events:none; }
.search-field input{ height:36px; padding:0 12px 0 34px; font-size:13px; border:1px solid var(--bd); border-radius:var(--r); width:280px; background:#fff; font-family:inherit; outline:none; transition:var(--trans-fast); }
.search-field input:focus{ border-color:var(--a); box-shadow:0 0 0 3px var(--a1); }

/* segmented control */
.seg{ display:inline-flex; background:var(--ps); border:1px solid var(--bd); border-radius:var(--r); padding:3px; gap:2px; }
.seg button{ border:none; background:transparent; font-family:inherit; font-size:12.5px; font-weight:600; color:var(--t2); padding:6px 14px; border-radius:6px; cursor:pointer; transition:var(--trans-fast); }
.seg button.on{ background:#fff; color:var(--t1); box-shadow:var(--sh-button); }

/* card-check radios */
.card-check{ display:flex; align-items:center; gap:14px; padding:14px 18px; border:1px solid var(--bd); border-radius:10px; cursor:pointer; background:#fff; transition:var(--trans-fast); margin-top:8px; }
.card-check:hover{ border-color:var(--t3); }
.card-check.active{ border-color:var(--a); background:var(--a1); }
.card-check .circle{ width:22px; height:22px; border:1.5px solid var(--bd); border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; background:#fff; }
.card-check.active .circle{ border-color:var(--a); border-width:2px; }
.card-check.active .circle::after{ content:""; width:10px; height:10px; background:var(--a); border-radius:50%; }
.card-check .lbl{ font-size:14px; color:var(--t1); }

/* =================== Toolbar =================== */
.toolbar{ display:flex; align-items:center; gap:10px; padding:0 0 14px; }

/* =================== Cards =================== */
.card{ background:#fff; border:1px solid var(--bd); border-radius:var(--rl); box-shadow:var(--sh-card); padding:20px 24px; }

/* =================== Table =================== */
.tcard{ background:#fff; border:1px solid var(--bd); border-radius:var(--rl); overflow:hidden; box-shadow:var(--sh-card); }
.tcard table{ width:100%; border-collapse:collapse; }
.tcard thead tr{ background:var(--ps); }
.tcard thead th{ padding:10px 16px; font-size:11.5px; font-weight:600; color:var(--t2); text-align:left; letter-spacing:.01em; border-bottom:1px solid var(--bd); white-space:nowrap; }
.tcard thead th.num{ text-align:right; }
.tcard tbody tr{ border-bottom:1px solid var(--bg); transition:var(--trans-fast); }
.tcard tbody tr:hover{ background:var(--a1); box-shadow:inset 3px 0 0 var(--a); }
.tcard tbody tr.sel{ background:var(--a1); }
.tcard tbody tr:nth-child(2n):not(:hover):not(.sel){ background:#FAFBFD; }
.tcard td{ padding:var(--row-pad) 16px; font-size:13px; color:var(--t1); vertical-align:middle; }
.tcard td.num{ text-align:right; font-variant-numeric:tabular-nums; }
.tcard tfoot td{ padding:13px 16px; font-size:13px; font-weight:700; background:var(--ps); border-top:2px solid var(--bd); font-variant-numeric:tabular-nums; }
.tcard input[type=checkbox]{ accent-color:var(--a); cursor:pointer; }
.amt-in{ color:var(--ok); font-weight:600; }
.amt-out{ color:var(--danger); font-weight:600; }
.amt-zero{ color:var(--t3); }
.cn{ display:flex; align-items:center; gap:10px; }
.ava{ width:32px; height:32px; border-radius:50%; background:var(--a1); color:var(--a); font-weight:600; display:flex; align-items:center; justify-content:center; border:2px solid #fff; box-shadow:0 0 0 1.5px var(--bd); flex-shrink:0; font-size:11px; }
.nmain{ font-size:13px; font-weight:500; color:var(--t1); }
.nsub{ font-size:11.5px; color:var(--t3); }

/* =================== KPI =================== */
.kpis{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:22px; }
.kpi{ background:#fff; border:1px solid var(--bd); border-radius:var(--rl); padding:18px 20px; box-shadow:var(--sh-card); position:relative; overflow:hidden; }
.kpi-top{ display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.kpi-ico{ width:32px; height:32px; border-radius:9px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.kpi-ico svg{ width:17px; height:17px; }
.kpi-label{ font-size:12px; font-weight:600; color:var(--t2); }
.kpi-value{ font-family:var(--ff-title); font-size:30px; font-weight:700; color:var(--t1); line-height:1; margin-bottom:8px; font-variant-numeric:tabular-nums; }
.kpi-value .kpi-u{ font-size:17px; color:var(--t3); font-weight:500; }
.kpi-foot{ display:flex; align-items:center; gap:7px; font-size:12px; }
.kpi-delta{ font-weight:600; display:inline-flex; align-items:center; gap:3px; }
.kpi-delta.up{ color:var(--ok); } .kpi-delta.down{ color:var(--danger); }
.kpi-delta svg{ width:13px; height:13px; }
.kpi-note{ color:var(--t3); }

/* =================== Widgets =================== */
.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.dash-cols{ display:grid; grid-template-columns:1.55fr 1fr; gap:16px; align-items:start; }
.widget{ background:#fff; border:1px solid var(--bd); border-radius:var(--rxl); box-shadow:var(--sh-card); overflow:hidden; }
.w-head{ display:flex; align-items:center; gap:10px; padding:14px 18px; border-bottom:1px solid var(--bd); }
.w-ico{ width:28px; height:28px; border-radius:7px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.w-ico svg{ width:15px; height:15px; }
.w-title{ flex:1; font-size:13.5px; font-weight:600; color:var(--t1); }
.w-sub{ font-size:11.5px; color:var(--t3); font-weight:400; margin-left:2px; }
.w-info{ color:var(--t3); display:flex; }
.w-info svg{ width:15px; height:15px; }
.w-ctrl{ height:28px; padding:0 10px; border:1px solid var(--bd); border-radius:7px; background:#fff; color:var(--t2); font-size:12.5px; display:inline-flex; align-items:center; gap:5px; font-family:inherit; cursor:pointer; transition:var(--trans-fast); }
.w-ctrl:hover{ background:var(--ps); }
.w-ctrl svg{ width:11px; height:11px; }
.w-body{ padding:18px; }

/* legend */
.legend{ display:flex; flex-wrap:wrap; gap:14px; margin-top:4px; }
.legend .lg{ display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--t2); }
.legend .lg i{ width:10px; height:10px; border-radius:3px; }

/* =================== Charts =================== */
.barchart{ display:flex; align-items:flex-end; justify-content:space-around; height:190px; padding:0 4px; gap:8px; }
.bar-col{ flex:1; display:flex; flex-direction:column; align-items:center; height:100%; position:relative; justify-content:flex-end; }
.bar-stack{ width:100%; max-width:30px; display:flex; flex-direction:column-reverse; border-radius:4px 4px 0 0; overflow:hidden; }
.bar-seg{ width:100%; transition:var(--trans); }
.bar{ width:100%; max-width:30px; border-radius:4px 4px 0 0; transition:height .5s cubic-bezier(.4,0,.2,1); }
.bar-lbl{ font-size:10.5px; color:var(--t3); margin-top:8px; }
.line-wrap{ position:relative; width:100%; }
.donut-wrap{ display:flex; align-items:center; gap:20px; }
.donut-center{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.donut-c-val{ font-family:var(--ff-title); font-size:24px; font-weight:700; }
.donut-c-lbl{ font-size:11px; color:var(--t3); }
.hbars{ display:flex; flex-direction:column; gap:14px; }
.hbar-row{ display:grid; grid-template-columns:120px 1fr 56px; align-items:center; gap:12px; }
.hbar-lbl{ font-size:12.5px; color:var(--t2); }
.hbar-track{ height:10px; background:var(--bg); border-radius:6px; overflow:hidden; }
.hbar-fill{ height:100%; border-radius:6px; transition:width .6s cubic-bezier(.4,0,.2,1); }
.hbar-val{ font-size:12.5px; font-weight:600; text-align:right; font-variant-numeric:tabular-nums; }

/* =================== Activity feed =================== */
.feed{ display:flex; flex-direction:column; }
.feed-item{ display:flex; gap:12px; padding:13px 0; border-bottom:1px solid var(--bg); }
.feed-item:last-child{ border-bottom:none; }
.feed-ico{ width:32px; height:32px; border-radius:9px; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.feed-ico svg{ width:16px; height:16px; }
.feed-main{ flex:1; min-width:0; }
.feed-txt{ font-size:13px; color:var(--t1); line-height:1.45; }
.feed-txt b{ font-weight:600; }
.feed-time{ font-size:11.5px; color:var(--t3); margin-top:2px; }
.feed-amt{ font-size:13px; font-weight:600; white-space:nowrap; align-self:center; }

/* progress / goal */
.goal{ display:flex; flex-direction:column; gap:10px; }
.goal-bar{ height:12px; border-radius:8px; background:var(--bg); overflow:hidden; position:relative; }
.goal-fill{ height:100%; border-radius:8px; background:linear-gradient(90deg,var(--a),#FF4DA6); transition:width .6s; }
.goal-row{ display:flex; justify-content:space-between; align-items:baseline; }
.goal-big{ font-family:var(--ff-title); font-size:26px; font-weight:700; font-variant-numeric:tabular-nums; }

/* =================== Documents =================== */
.doc-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:16px; }
.doc-card{ background:#fff; border:1px solid var(--bd); border-radius:var(--rl); box-shadow:var(--sh-card); padding:18px; cursor:pointer; transition:var(--trans); display:flex; flex-direction:column; gap:12px; }
.doc-card:hover{ border-color:var(--a); box-shadow:var(--sh-pop); transform:translateY(-2px); }
.doc-ico{ width:42px; height:42px; border-radius:10px; display:flex; align-items:center; justify-content:center; }
.doc-ico svg{ width:22px; height:22px; }
.doc-name{ font-size:14px; font-weight:600; color:var(--t1); }
.doc-meta{ font-size:11.5px; color:var(--t3); }
.doc-foot{ display:flex; align-items:center; justify-content:space-between; margin-top:2px; }

/* =================== Modal / drawer =================== */
.overlay{ position:fixed; inset:0; background:rgba(17,4,28,.42); backdrop-filter:blur(2px); z-index:100; display:flex; align-items:flex-start; justify-content:center; padding:48px 20px; overflow-y:auto; animation:fade .15s ease; }
@keyframes fade{ from{ opacity:0; } to{ opacity:1; } }
.modal{ background:#fff; border-radius:16px; width:100%; max-width:560px; box-shadow:var(--sh-modal); animation:pop .18s cubic-bezier(.4,0,.2,1); }
@keyframes pop{ from{ opacity:0; transform:translateY(8px) scale(.99); } to{ opacity:1; transform:none; } }
.modal-head{ display:flex; align-items:center; justify-content:space-between; padding:20px 24px; border-bottom:1px solid var(--bd); }
.modal-body{ padding:22px 24px; }
.modal-foot{ display:flex; justify-content:flex-end; gap:10px; padding:16px 24px; border-top:1px solid var(--bd); background:var(--ps); border-radius:0 0 16px 16px; }
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.form-grid .span2{ grid-column:1 / -1; }

/* drawer */
.drawer{ position:fixed; top:0; right:0; bottom:0; width:440px; background:#fff; box-shadow:-8px 0 30px rgba(0,0,0,.12); z-index:101; display:flex; flex-direction:column; animation:slidein .22s cubic-bezier(.4,0,.2,1); }
@keyframes slidein{ from{ transform:translateX(100%); } to{ transform:none; } }
.drawer-head{ padding:22px 24px; border-bottom:1px solid var(--bd); }
.drawer-body{ flex:1; overflow-y:auto; padding:22px 24px; }
.dl{ display:flex; flex-direction:column; gap:0; }
.dl-row{ display:flex; justify-content:space-between; gap:16px; padding:11px 0; border-bottom:1px solid var(--bg); font-size:13px; }
.dl-row:last-child{ border-bottom:none; }
.dl-k{ color:var(--t3); } .dl-v{ color:var(--t1); font-weight:500; text-align:right; }

/* =================== Public membership page =================== */
.pub{ min-height:100vh; background:var(--bg); overflow-y:auto; }
.pub-hero{ background-color:var(--sb-dark); background-image:url('../img/bg-menu.jpg'); background-size:cover; background-position:center; color:#fff; padding:0; }
.pub-nav{ display:flex; align-items:center; justify-content:space-between; padding:18px 40px; max-width:1080px; margin:0 auto; }
.pub-brand{ display:flex; align-items:center; gap:12px; }
.pub-brand .tb-logo{ width:34px; height:34px; }
.pub-brand-name{ font-size:16px; font-weight:600; color:#fff; }
.pub-heroin{ max-width:1080px; margin:0 auto; padding:40px 40px 64px; display:grid; grid-template-columns:1fr; gap:0; }
.pub-eyebrow{ display:inline-flex; align-items:center; gap:7px; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.16); color:#fff; font-size:12px; font-weight:600; padding:6px 13px; border-radius:30px; margin-bottom:20px; }
.pub-eyebrow i{ width:7px; height:7px; border-radius:50%; background:#34D399; }
.pub-h1{ font-family:var(--ff-title); font-size:46px; font-weight:700; letter-spacing:-.02em; line-height:1.08; max-width:640px; color:#fff; }
.pub-lead{ font-size:17px; color:rgba(255,255,255,.78); max-width:560px; margin-top:18px; line-height:1.5; }
.pub-stats{ display:flex; gap:40px; margin-top:34px; }
.pub-stat .v{ font-family:var(--ff-title); font-size:28px; font-weight:700; }
.pub-stat .l{ font-size:12.5px; color:rgba(255,255,255,.6); margin-top:2px; }
.pub-body{ max-width:1080px; margin:-44px auto 0; padding:0 40px 64px; display:grid; grid-template-columns:1fr 400px; gap:28px; align-items:start; }
.pub-formcard{ background:#fff; border:1px solid var(--bd); border-radius:16px; box-shadow:var(--sh-modal); padding:28px; }
.pub-side{ display:flex; flex-direction:column; gap:16px; }
.tier{ background:#fff; border:1.5px solid var(--bd); border-radius:14px; padding:18px 20px; cursor:pointer; transition:var(--trans); }
.tier:hover{ border-color:var(--t3); }
.tier.sel{ border-color:var(--a); background:var(--a1); box-shadow:0 0 0 3px var(--a1); }
.tier-top{ display:flex; align-items:center; justify-content:space-between; }
.tier-name{ font-size:14.5px; font-weight:700; color:var(--t1); }
.tier-price{ font-family:var(--ff-title); font-size:20px; font-weight:700; color:var(--a); }
.tier-desc{ font-size:12.5px; color:var(--t2); margin-top:5px; line-height:1.45; }
.pub-feat{ display:flex; gap:11px; align-items:flex-start; padding:11px 0; border-bottom:1px solid var(--bg); }
.pub-feat:last-child{ border-bottom:none; }
.pub-feat .fi{ width:30px; height:30px; border-radius:9px; background:var(--a1); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.pub-feat .fi svg{ width:16px; height:16px; }
.pub-feat .ft{ font-size:13px; font-weight:600; color:var(--t1); }
.pub-feat .fd{ font-size:12px; color:var(--t3); margin-top:1px; }
.divider{ height:1px; background:var(--bd); margin:18px 0; }
.success-box{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:14px; padding:30px 10px; }
.success-ring{ width:64px; height:64px; border-radius:50%; background:var(--ok-bg); border:2px solid var(--ok-bd); display:flex; align-items:center; justify-content:center; }
.success-ring svg{ width:32px; height:32px; }

/* =================== Login =================== */
.login-wrap{ height:100vh; display:flex; align-items:center; justify-content:center; background-color:var(--sb-dark); background-image:url('../img/bg-menu.jpg'); background-size:cover; background-position:center; padding:20px; }
.login-card{ background:#fff; border-radius:16px; padding:36px 32px; width:100%; max-width:400px; box-shadow:0 25px 50px -12px rgba(0,0,0,.4); display:flex; flex-direction:column; gap:18px; }
.login-brand{ display:flex; align-items:center; gap:14px; margin-bottom:8px; }
.login-title{ font-family:var(--ff-title); font-size:22px; font-weight:700; color:var(--t1); }
.login-sub{ font-size:12.5px; color:var(--t3); }
.login-actions{ display:flex; align-items:center; gap:16px; margin-top:8px; }
.login-actions .btn{ flex:1; justify-content:center; }
.forgot{ font-size:12.5px; color:var(--a); }
.login-foot{ font-size:11.5px; color:var(--t3); text-align:center; margin-top:8px; line-height:1.5; }

/* misc */
.row{ display:flex; align-items:center; gap:10px; }
.spacer{ flex:1; }
.mt8{ margin-top:8px; } .mt16{ margin-top:16px; } .mt24{ margin-top:24px; }
.scrollx{ overflow-x:auto; }
.tabbar{ display:flex; gap:2px; border-bottom:1px solid var(--bd); margin-bottom:20px; }
.tabbar button{ border:none; background:transparent; font-family:inherit; font-size:13.5px; font-weight:600; color:var(--t2); padding:11px 16px; cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; transition:var(--trans-fast); }
.tabbar button:hover{ color:var(--t1); }
.tabbar button.on{ color:var(--a); border-bottom-color:var(--a); }
.empty-pad{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:50px 20px; color:var(--t3); text-align:center; }

/* =================== Compléments AssoManager (PHP) =================== */
/* Tri des tableaux */
th.sortable{ cursor:pointer; user-select:none; position:relative; padding-right:24px !important; }
th.sortable:hover{ color:var(--t1); }
th.sortable::after{ content:"▲"; position:absolute; right:10px; top:50%; transform:translateY(-50%); color:var(--t3); font-size:8px; opacity:.4; }
th.sortable.asc, th.sortable.desc{ color:var(--a); }
th.sortable.asc::after{ content:"▲"; color:var(--a); opacity:1; font-size:9px; }
th.sortable.desc::after{ content:"▼"; color:var(--a); opacity:1; font-size:9px; }

/* Redimensionnement des colonnes à la souris */
.col-resizer{ position:absolute; top:0; right:0; width:7px; height:100%; cursor:col-resize; user-select:none; }
.col-resizer:hover, .col-resizer.active{ background:var(--a2); }
.tcard.resizing, .tcard.resizing th{ cursor:col-resize !important; }
.tcard.resizing tbody{ pointer-events:none; }

/* Toast */
.toast{ position:fixed; bottom:24px; left:50%; transform:translate(-50%, 16px); background:var(--t1); color:#fff; font-size:13px; font-weight:500; padding:11px 20px; border-radius:10px; box-shadow:var(--sh-pop); opacity:0; pointer-events:none; transition:all .25s cubic-bezier(.4,0,.2,1); z-index:300; }
.toast.show{ opacity:1; transform:translate(-50%, 0); }
.toast.err{ background:var(--danger); }

/* Liens nav (ancres) */
.ni{ text-decoration:none; }
a.btn, a.tbi{ text-decoration:none; }
a.tbi{ display:inline-flex; align-items:center; justify-content:center; }
.tbi svg, .btn svg{ width:16px; height:16px; }
.ni svg{ width:15px; height:15px; flex-shrink:0; }

/* Erreur formulaire / login */
.form-err{ background:var(--danger-bg); color:var(--danger); border:1px solid #FECACA; font-size:13px; padding:10px 14px; border-radius:8px; }

/* Modales statiques (pas d'innerHTML → input[type=date] OK) */
.overlay.hidden{ display:none; }

/* Impression du cahier de comptabilité */
@media print {
  .topbar, .sidebar, .page-actions, .toolbar, .tabbar, .no-print { display:none !important; }
  .layout, .app{ display:block; height:auto; overflow:visible; }
  .main, .page{ overflow:visible; padding:0; background:#fff; }
  .tcard{ border:none; box-shadow:none; }
  body{ background:#fff; }
}

/* Responsive de base */
@media (max-width: 980px){
  .kpis{ grid-template-columns:1fr 1fr; }
  .dash-cols, .grid-3, .grid-2, .form-grid{ grid-template-columns:1fr; }
  .pub-body{ grid-template-columns:1fr; }
  .sidebar{ display:none; }
  .tb-slot{ width:auto; }
}

/* Icône notes avec infobulle au survol */
.note-tip{ position:relative; display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:6px; background:var(--a1); color:var(--a); font-size:12px; cursor:help; vertical-align:middle; margin-left:6px; }
.note-tip::after{ content:attr(data-tip); position:absolute; bottom:calc(100% + 8px); left:50%; transform:translateX(-50%); background:var(--t1); color:#fff; font-size:12px; font-weight:400; line-height:1.45; padding:9px 12px; border-radius:8px; width:max-content; max-width:280px; white-space:pre-wrap; text-align:left; box-shadow:var(--sh-pop); opacity:0; pointer-events:none; transition:opacity .12s ease; z-index:60; }
.note-tip::before{ content:""; position:absolute; bottom:calc(100% + 3px); left:50%; transform:translateX(-50%); border:5px solid transparent; border-top-color:var(--t1); opacity:0; transition:opacity .12s ease; z-index:60; }
.note-tip:hover::after, .note-tip:hover::before{ opacity:1; }

/* Administration en 2 colonnes */
.admin-cols{ display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:start; width:100%; }
.admin-col{ display:flex; flex-direction:column; gap:20px; min-width:0; }
@media (max-width: 980px){ .admin-cols{ grid-template-columns:1fr; } }

/* =================== Page d'adhésion publique v2 =================== */
/* Hero plein écran, titre à droite (visuel bg-menu à gauche) */
.pub-hero2 .pub-nav{ max-width:none; padding:18px 48px; }
.pub-heroin2{ display:flex; justify-content:flex-end; align-items:center; padding:56px 48px 88px; min-height:380px; }
.pub-heroin2-txt{ max-width:520px; }
.pub-heroin2-txt .pub-h1{ font-size:52px; }
.pub-heroin2-txt .pub-lead{ margin-top:14px; }
@media (max-width: 980px){
  .pub-heroin2{ justify-content:flex-start; padding:36px 24px 64px; min-height:0; }
  .pub-heroin2-txt .pub-h1{ font-size:36px; }
}

/* Corps : 2 colonnes égales pleine largeur */
.pub-body2{ max-width:1180px; margin:-48px auto 0; padding:0 48px 64px; position:relative; z-index:2; }
.pub-grid2{ display:grid; grid-template-columns:1fr 1fr; gap:24px; align-items:start; }
.pub-col{ display:flex; flex-direction:column; gap:20px; min-width:0; }
@media (max-width: 980px){
  .pub-body2{ padding:0 20px 48px; }
  .pub-grid2{ grid-template-columns:1fr; }
}

/* Hero image seule (page d'adhésion) */
.pub-hero3{ background:#13041C url('../img/hero-adhesion.jpg') center/cover no-repeat; min-height:460px; }
@media (max-width: 980px){ .pub-hero3{ min-height:240px; } }
