/* ============================================== */
/* CBC PWA - Styles                               */
/* ============================================== */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  /* === Identité officielle CBC === */
  --cbc-bordeaux: #520701;
  --cbc-bordeaux-clair: #6E1A0F;
  --cbc-bordeaux-fonce: #3A0500;
  --cbc-or: #EAC958;
  --cbc-or-clair: #F2D87A;
  --cbc-or-fonce: #AF812B;
  --cbc-noir: #1a1a1a;
  --cbc-noir-soft: #2a2a2a;
  --cbc-creme: #F9F4EC;
  --cbc-sable: #F1E8D6;
  
  /* === Couleurs de groupes === */
  --grp-castillet: #520701;     /* Bordeaux (la forteresse) */
  --grp-canigou: #1D5E48;       /* Vert montagne */
  --grp-mallorque: #1F5FAB;     /* Bleu méditerranée */
  
  /* === Surfaces === */
  --bg: #FAF6EE;
  --surface: #FFFFFF;
  --surface-2: #F5EDD9;
  --surface-dark: #1a1a1a;
  
  /* === Textes === */
  --text: #1a1a1a;
  --text-soft: #5C544A;
  --text-muted: #948A7B;
  
  /* === Bordures === */
  --border: rgba(82,7,1,0.10);
  --border-strong: rgba(82,7,1,0.20);
  --border-or: rgba(234,201,88,0.30);
  
  /* === Sémantique === */
  --success: #1D7A56;
  --warning: #BA7517;
  --danger: #520701;
  --info: #1F5FAB;
  
  /* === Typographie === */
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* === Safe areas === */
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overscroll-behavior: none;
  font-weight: 400;
}

body {
  max-width: 540px;
  margin: 0 auto;
  background: var(--bg);
  background-image: radial-gradient(ellipse at top, rgba(234,201,88,0.04) 0%, transparent 60%);
  min-height: 100vh;
  position: relative;
  box-shadow: 0 0 60px rgba(82,7,1,0.08);
}

img { max-width: 100%; display: block; }

/* ============================================== */
/* LOGIN SCREEN                                    */
/* ============================================== */
.login-screen {
  position: fixed;
  inset: 0;
  background: var(--cbc-noir);
  background-image:
    radial-gradient(ellipse at top, rgba(82,7,1,0.6) 0%, transparent 60%),
    radial-gradient(ellipse at bottom, rgba(234,201,88,0.08) 0%, transparent 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  overflow-y: auto;
}

.login-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
  padding: 30px 24px;
}

.login-logo {
  width: 130px;
  height: 130px;
  margin: 0 auto 24px;
  filter: drop-shadow(0 8px 24px rgba(234,201,88,0.25));
}

.login-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--cbc-or);
  margin-bottom: 6px;
}

.login-subtitle {
  font-family: var(--font-display);
  font-size: 26px;
  color: white;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}

.login-tagline {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 32px;
  font-weight: 400;
}

.login-form {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(234,201,88,0.2);
  border-radius: 18px;
  padding: 22px;
  text-align: left;
  backdrop-filter: blur(10px);
}

.login-form .field { margin-bottom: 14px; }
.login-form .field label {
  display: block;
  font-size: 10px;
  color: var(--cbc-or);
  margin-bottom: 7px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.login-form .field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(234,201,88,0.2);
  border-radius: 10px;
  background: rgba(0,0,0,0.3);
  color: white;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}
.login-form .field input::placeholder { color: rgba(255,255,255,0.3); }
.login-form .field input:focus {
  border-color: var(--cbc-or);
  background: rgba(0,0,0,0.4);
}

.login-error {
  background: rgba(82,7,1,0.5);
  border: 1px solid rgba(234,201,88,0.3);
  color: var(--cbc-or);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  margin-bottom: 14px;
  display: none;
  font-weight: 500;
}
.login-error.show { display: block; }

.login-button {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--cbc-or);
  background: linear-gradient(135deg, var(--cbc-or) 0%, var(--cbc-or-fonce) 100%);
  color: var(--cbc-bordeaux);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.login-button:active { transform: scale(0.98); }

.login-help {
  margin-top: 24px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}
.login-help strong { color: var(--cbc-or); font-weight: 600; }

/* ============================================== */
/* APP HEADER                                      */
/* ============================================== */
.app-shell { display: none; }
.app-shell.show { display: block; }

.header {
  background: var(--cbc-bordeaux);
  background-image: 
    radial-gradient(ellipse at top right, rgba(234,201,88,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(0,0,0,0.3) 0%, transparent 50%);
  color: white;
  padding: calc(var(--safe-top) + 14px) 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--cbc-or);
  box-shadow: 0 2px 0 rgba(234,201,88,0.4), 0 4px 20px rgba(82,7,1,0.3);
}

.logo { display: flex; align-items: center; gap: 12px; }

.logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--cbc-noir);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  border: 1px solid var(--cbc-or);
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; }

.logo-text .title {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--cbc-or);
}

.logo-text .subtitle {
  font-size: 10px;
  opacity: 0.85;
  margin-top: 3px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  gap: 6px;
}

.group-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(234,201,88,0.4);
  color: var(--cbc-or);
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.group-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cbc-or);
}
.group-pill.castillet::before { background: var(--cbc-or); }
.group-pill.canigou::before { background: #4ECDA0; }
.group-pill.mallorque::before { background: #6BA8E8; }

.header-right { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(234,201,88,0.25);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  position: relative;
  color: var(--cbc-or);
  transition: all 0.2s;
}
.icon-btn:active { transform: scale(0.92); background: rgba(0,0,0,0.4); }

.bell-dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cbc-or);
  border: 2px solid var(--cbc-bordeaux);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.92); }
}

.avatar-wrap { position: relative; cursor: pointer; }

.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cbc-or) 0%, var(--cbc-or-fonce) 100%);
  color: var(--cbc-bordeaux);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 12px;
  border: 1.5px solid var(--cbc-or-clair);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.avatar-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--cbc-or);
  box-shadow: 0 12px 32px rgba(82,7,1,0.25);
  min-width: 220px;
  overflow: hidden;
  display: none;
  z-index: 200;
}
.avatar-menu.show { display: block; }
.avatar-menu .menu-header {
  padding: 14px 16px;
  background: var(--cbc-bordeaux);
  color: var(--cbc-or);
  border-bottom: 1px solid var(--cbc-or);
}
.avatar-menu .menu-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--cbc-or);
}
.avatar-menu .menu-role {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
  font-weight: 600;
  color: rgba(234,201,88,0.7);
}
.avatar-menu .menu-item {
  padding: 12px 16px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 500;
  transition: background 0.15s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}
.avatar-menu .menu-item:hover { background: var(--surface-2); }
.avatar-menu .menu-divider { height: 1px; background: var(--border); }
.avatar-menu .menu-item.danger { color: var(--cbc-bordeaux); }

/* ============================================== */
/* TABS                                            */
/* ============================================== */
.tabs {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 74px;
  z-index: 90;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--text-soft);
  font-family: var(--font-body);
  font-weight: 600;
  transition: all 0.2s;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.tab:active { transform: scale(0.96); }
.tab.active {
  background: var(--cbc-bordeaux);
  color: var(--cbc-or);
  border: 1px solid var(--cbc-or);
}
.tab.admin-tab { color: var(--cbc-bordeaux); }
.tab.admin-tab.active {
  background: var(--cbc-noir);
  color: var(--cbc-or);
  border: 1px solid var(--cbc-or);
}

/* ============================================== */
/* CONTENT                                         */
/* ============================================== */
.content { padding: 22px 18px calc(80px + var(--safe-bottom)); }

.view { display: none; animation: slideUp 0.35s cubic-bezier(0.32, 0.72, 0, 1); }
.view.active { display: block; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================== */
/* TYPOGRAPHIE                                     */
/* ============================================== */
h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.05;
  color: var(--cbc-bordeaux);
}

h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1.1;
  color: var(--cbc-bordeaux);
}

.lead {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.55;
  margin-top: 6px;
  font-weight: 400;
}

.eyebrow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--cbc-or-fonce);
}

.ornament {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--cbc-or-fonce);
  vertical-align: middle;
  margin: 0 8px 4px;
}

.page-header { margin-bottom: 24px; }

/* ============================================== */
/* GROUP SWITCHER (admin only)                     */
/* ============================================== */
.group-switcher {
  background: var(--cbc-noir);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--cbc-or);
  flex-wrap: wrap;
}
.group-switcher .label {
  font-size: 10px;
  color: var(--cbc-or);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.group-switcher .options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.group-opt {
  padding: 6px 11px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(234,201,88,0.2);
  color: rgba(255,255,255,0.7);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}
.group-opt:hover { background: rgba(255,255,255,0.1); color: white; }
.group-opt.active {
  background: var(--cbc-or);
  color: var(--cbc-bordeaux);
  border-color: var(--cbc-or);
}

/* ============================================== */
/* STATS                                           */
/* ============================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.stat {
  background: var(--surface);
  border-radius: 14px;
  padding: 16px 14px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--cbc-or-fonce) 0%, var(--cbc-or) 50%, var(--cbc-or-fonce) 100%);
  opacity: 0.4;
}

.stat.featured {
  background: var(--cbc-bordeaux);
  background-image: radial-gradient(ellipse at top right, rgba(234,201,88,0.2) 0%, transparent 70%);
  color: white;
  border: 1px solid var(--cbc-or);
}
.stat.featured::before {
  background: linear-gradient(90deg, transparent 0%, var(--cbc-or) 50%, transparent 100%);
  opacity: 1;
}

.stat .label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
  margin-bottom: 8px;
}
.stat.featured .label { color: var(--cbc-or); }

.stat .value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--cbc-bordeaux);
}
.stat.featured .value { color: var(--cbc-or); }

.stat .delta {
  font-size: 11px;
  margin-top: 6px;
  color: var(--text-muted);
  font-weight: 500;
}
.stat .delta.up { color: var(--success); }
.stat.featured .delta { color: rgba(255,255,255,0.7); }

/* ============================================== */
/* CARDS                                           */
/* ============================================== */
.card-feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.card-feature::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--cbc-bordeaux) 0%, var(--cbc-or) 50%, var(--cbc-bordeaux) 100%);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 14px;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.3px;
  line-height: 1.2;
  color: var(--cbc-bordeaux);
}

/* ============================================== */
/* BADGES                                          */
/* ============================================== */
.badge {
  font-size: 10px;
  padding: 5px 11px;
  border-radius: 14px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge.gold { 
  background: linear-gradient(135deg, var(--cbc-or) 0%, var(--cbc-or-fonce) 100%); 
  color: var(--cbc-bordeaux); 
}
.badge.green { background: #DCF0E5; color: #0E5E40; }
.badge.amber { background: #FDF0D6; color: #6E3F08; }
.badge.blue { background: #DCEAFB; color: #0E3D6E; }
.badge.bordeaux { background: var(--cbc-bordeaux); color: var(--cbc-or); }
.badge.orange { background: #BA7517; color: white; }
.badge.outline { background: transparent; color: var(--text-soft); border: 1px solid var(--border-strong); }

.group-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid rgba(0,0,0,0.05);
}
.group-badge.castillet { background: rgba(82,7,1,0.1); color: var(--grp-castillet); }
.group-badge.canigou { background: rgba(29,94,72,0.1); color: var(--grp-canigou); }
.group-badge.mallorque { background: rgba(31,95,171,0.1); color: var(--grp-mallorque); }
.group-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
}
.group-badge.castillet::before { background: var(--grp-castillet); }
.group-badge.canigou::before { background: var(--grp-canigou); }
.group-badge.mallorque::before { background: var(--grp-mallorque); }

/* ============================================== */
/* META & BUTTONS                                  */
/* ============================================== */
.meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.meta span { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }

.btn {
  padding: 11px 18px;
  border-radius: 11px;
  border: none;
  font-size: 11px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.btn:active { transform: scale(0.96); }

.btn-primary { background: var(--cbc-bordeaux); color: var(--cbc-or); border: 1px solid var(--cbc-or); }
.btn-primary:hover { background: var(--cbc-bordeaux-clair); }

.btn-secondary { background: var(--surface); color: var(--cbc-bordeaux); border: 1px solid var(--border-strong); }
.btn-secondary:hover { border-color: var(--cbc-bordeaux); background: var(--surface-2); }

.btn-or {
  background: linear-gradient(135deg, var(--cbc-or) 0%, var(--cbc-or-fonce) 100%);
  color: var(--cbc-bordeaux);
  border: 1px solid var(--cbc-or-fonce);
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(234,201,88,0.3);
}

.btn-bordeaux {
  background: var(--cbc-bordeaux);
  color: var(--cbc-or);
  border: 1px solid var(--cbc-or);
  box-shadow: 0 2px 12px rgba(82,7,1,0.25);
}

.btn-block { width: 100%; padding: 14px; font-size: 12px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================== */
/* NEWS                                            */
/* ============================================== */
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.2px;
  color: var(--cbc-bordeaux);
}

.section-link {
  font-size: 11px;
  color: var(--cbc-or-fonce);
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.news-item {
  display: flex;
  gap: 13px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-item:first-child { padding-top: 0; }

.news-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.news-content { flex: 1; min-width: 0; }
.news-content .news-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.news-content .news-desc {
  font-size: 11.5px;
  color: var(--text-soft);
  margin-top: 4px;
  line-height: 1.45;
}

/* ============================================== */
/* GAME BANNER                                     */
/* ============================================== */
.game-banner {
  background: var(--cbc-noir);
  background-image:
    radial-gradient(ellipse at top right, rgba(82,7,1,0.6) 0%, transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(234,201,88,0.12) 0%, transparent 50%);
  border-radius: 18px;
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid var(--cbc-or);
}

.game-banner .pattern {
  position: absolute;
  top: -30px; right: -30px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(234,201,88,0.06);
  pointer-events: none;
}

.game-banner .eyebrow-game {
  font-size: 10px;
  color: var(--cbc-or);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 10px;
}

.game-banner .game-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  margin-bottom: 8px;
  line-height: 1.15;
  color: white;
}

.game-banner .game-desc {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ============================================== */
/* OFFERS                                          */
/* ============================================== */
.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.filters::-webkit-scrollbar { display: none; }

.chip {
  font-size: 10px;
  padding: 8px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.chip.active {
  background: var(--cbc-bordeaux);
  color: var(--cbc-or);
  border-color: var(--cbc-or);
}

.offer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 12px;
}

.author { display: flex; gap: 12px; align-items: center; flex: 1; min-width: 0; }

.author-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.a-purple { background: #E8E5F5; color: #3B2F8A; }
.a-coral  { background: #F8DDD0; color: #6E2210; }
.a-teal   { background: #D0EAE0; color: #0E5E40; }
.a-blue   { background: #D6E5F8; color: #0E3D6E; }
.a-pink   { background: #F5D2DF; color: #6E1F36; }
.a-amber  { background: #FAEAD0; color: #6E3F08; }
.a-or     { background: var(--cbc-or); color: var(--cbc-bordeaux); }
.a-bordeaux { background: var(--cbc-bordeaux); color: var(--cbc-or); }
.a-green  { background: #D4EBE2; color: var(--grp-canigou); }
.a-marine { background: #D6E5F8; color: var(--grp-mallorque); }

.author-info { flex: 1; min-width: 0; }
.author-info .name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--cbc-bordeaux);
  line-height: 1.2;
}
.author-info .company {
  font-size: 11.5px;
  color: var(--text-soft);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.offer-desc {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.6;
  margin-top: 14px;
}

/* ============================================== */
/* PARTNERS                                        */
/* ============================================== */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.partner-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.partner-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--cbc-or-fonce) 50%, transparent 100%);
  opacity: 0.5;
}

.partner-logo {
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  padding: 0 10px;
  line-height: 1.15;
}

.partner-card .title {
  font-weight: 700;
  font-size: 13px;
  color: var(--cbc-bordeaux);
  margin-bottom: 5px;
  line-height: 1.3;
}

.partner-card .desc {
  font-size: 11.5px;
  color: var(--text-soft);
  line-height: 1.5;
}

.partner-code {
  margin-top: 12px;
  padding: 8px 11px;
  background: linear-gradient(135deg, var(--cbc-or-clair) 0%, var(--cbc-or) 100%);
  border-radius: 10px;
  font-size: 10px;
  color: var(--cbc-bordeaux);
  font-weight: 800;
  text-align: center;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid var(--cbc-or-fonce);
}

.partner-suggest {
  background: var(--cbc-bordeaux);
  color: white;
  border: 1px solid var(--cbc-or);
}
.partner-suggest .partner-logo { background: rgba(234,201,88,0.1); color: var(--cbc-or); }
.partner-suggest .title { color: var(--cbc-or); }
.partner-suggest .desc { color: rgba(255,255,255,0.75); }
.partner-suggest .partner-code { background: var(--cbc-or); color: var(--cbc-bordeaux); }

/* ============================================== */
/* DIRECTORY                                       */
/* ============================================== */
.search-wrap {
  position: relative;
  margin-bottom: 18px;
}
.search-wrap input {
  width: 100%;
  padding: 14px 14px 14px 44px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  font-size: 14px;
  background: var(--surface);
  font-family: var(--font-body);
  outline: none;
  font-weight: 500;
}
.search-wrap input:focus {
  border-color: var(--cbc-bordeaux);
  box-shadow: 0 0 0 3px rgba(82,7,1,0.06);
}
.search-wrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cbc-or-fonce);
}

.members-list { display: flex; flex-direction: column; gap: 8px; }

.member-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.member-card:hover { border-color: var(--cbc-or); }

.member-card .info { flex: 1; min-width: 0; }
.member-card .name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--cbc-bordeaux);
  line-height: 1.15;
}
.member-card .activity {
  font-size: 11.5px;
  color: var(--text-soft);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.member-card .badges { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

/* ============================================== */
/* FORMS                                           */
/* ============================================== */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.form-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--cbc-bordeaux) 0%, var(--cbc-or) 50%, var(--cbc-bordeaux) 100%);
}

.form-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--cbc-bordeaux);
  margin-bottom: 18px;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 10px;
  color: var(--cbc-bordeaux);
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.field label .opt {
  color: var(--text-muted);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  font-size: 14px;
  background: var(--surface);
  font-family: var(--font-body);
  outline: none;
  color: var(--text);
  font-weight: 500;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--cbc-bordeaux);
  box-shadow: 0 0 0 3px rgba(82,7,1,0.06);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ============================================== */
/* INFO BANNER                                     */
/* ============================================== */
.info-banner {
  background: linear-gradient(135deg, var(--cbc-or-clair) 0%, var(--cbc-or) 100%);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--cbc-or-fonce);
}
.info-banner .icon { font-size: 20px; flex-shrink: 0; line-height: 1; }
.info-banner .text {
  font-size: 12px;
  color: var(--cbc-bordeaux);
  line-height: 1.5;
  font-weight: 500;
}
.info-banner strong { color: var(--cbc-bordeaux-fonce); font-weight: 700; }

/* ============================================== */
/* RANKINGS                                        */
/* ============================================== */
.ranking-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.ranking-tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-soft);
  border-radius: 8px;
  transition: all 0.2s;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ranking-tab.active {
  background: var(--cbc-bordeaux);
  color: var(--cbc-or);
}

.ranking-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.ranking-item:last-child { border-bottom: none; padding-bottom: 0; }
.ranking-item:first-child { padding-top: 0; }

.ranking-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.rank-badge {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.rank-1 { 
  background: linear-gradient(135deg, var(--cbc-or) 0%, var(--cbc-or-fonce) 100%); 
  color: var(--cbc-bordeaux); 
  box-shadow: 0 2px 10px rgba(234,201,88,0.4); 
}
.rank-2 { background: #D8D3C3; color: #4A4537; }
.rank-3 { background: #E8B79A; color: #5C2B0F; }
.rank-other { background: var(--surface-2); color: var(--text-soft); }

.rank-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--cbc-bordeaux);
}

.rank-info { flex: 1; min-width: 0; }
.rank-info .group-tag {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ranking-right {
  display: flex;
  gap: 14px;
  font-size: 11.5px;
  align-items: center;
}
.ranking-right .count { color: var(--text-soft); font-weight: 600; }
.ranking-right .amount {
  color: var(--cbc-bordeaux);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 15px;
}

/* ============================================== */
/* ADMIN                                           */
/* ============================================== */
.admin-banner {
  background: var(--cbc-noir);
  background-image: radial-gradient(ellipse at top right, rgba(82,7,1,0.5) 0%, transparent 60%);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 22px;
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--cbc-or);
}
.admin-banner .icon-flag { color: var(--cbc-or); font-size: 18px; flex-shrink: 0; }
.admin-banner .text { 
  font-size: 11px; 
  opacity: 0.9; 
  line-height: 1.4; 
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.admin-decl-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: 10px;
  margin-bottom: 7px;
  gap: 10px;
}
.admin-decl-item .info { flex: 1; min-width: 0; }
.admin-decl-item .from-to {
  font-size: 13px;
  font-weight: 600;
  color: var(--cbc-bordeaux);
}
.admin-decl-item .desc {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 2px;
  font-weight: 500;
}
.admin-decl-item .amount-tag {
  font-size: 10px;
  background: white;
  color: var(--cbc-bordeaux);
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid var(--border);
}

.reciprocity-item, .attendance-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.reciprocity-item:last-child, .attendance-item:last-child { border-bottom: none; padding-bottom: 0; }
.reciprocity-item:first-child { padding-top: 0; }

.attendance-item {
  padding: 11px 14px;
  border-radius: 11px;
  margin-bottom: 7px;
  border-bottom: none;
}
.attendance-item:last-child { margin-bottom: 0; }
.att-ok { background: #DCF0E5; }
.att-warn { background: #FDF0D6; }
.att-danger { background: rgba(82,7,1,0.08); }

.reciprocity-name, .attendance-item .name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--cbc-bordeaux);
}

.reciprocity-stats {
  display: flex;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
}
.receives { color: var(--success); }
.gives-zero { color: var(--cbc-bordeaux); }
.gives-low { color: var(--warning); }

/* ============================================== */
/* DECLARATIONS LIST (member side)                 */
/* ============================================== */
.section-label {
  font-size: 10px;
  color: var(--cbc-or-fonce);
  margin-bottom: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.decl-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.decl-item .target {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--cbc-bordeaux);
  font-weight: 600;
}
.decl-item .desc {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 4px;
  font-weight: 500;
}
.decl-item .amount {
  font-size: 10px;
  color: var(--cbc-bordeaux);
  flex-shrink: 0;
  text-align: right;
  font-weight: 700;
  background: var(--surface-2);
  padding: 5px 10px;
  border-radius: 8px;
  text-transform: uppercase;
  border: 1px solid var(--border);
}

/* ============================================== */
/* BOTTOM NAV                                      */
/* ============================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 540px;
  margin: 0 auto;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--cbc-or);
  display: flex;
  padding: 8px 0 calc(8px + var(--safe-bottom));
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}
.nav-item.active { color: var(--cbc-bordeaux); }
.nav-item.active .nav-icon-wrap {
  background: var(--cbc-bordeaux);
  color: var(--cbc-or);
  border: 1px solid var(--cbc-or);
}

.nav-icon-wrap {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent;
}

.nav-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ============================================== */
/* FAB & TOAST                                     */
/* ============================================== */
.fab {
  position: fixed;
  bottom: calc(86px + var(--safe-bottom));
  right: max(20px, calc(50% - 270px + 20px));
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--cbc-bordeaux);
  color: var(--cbc-or);
  border: 1px solid var(--cbc-or);
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(82,7,1,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99;
}
.fab.show { display: flex; }

.toast {
  position: fixed;
  bottom: calc(96px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--cbc-bordeaux);
  color: var(--cbc-or);
  padding: 13px 22px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 12px 32px rgba(82,7,1,0.35);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 200;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
  border: 1px solid var(--cbc-or);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ============================================== */
/* INSTALL BANNER                                  */
/* ============================================== */
.install-banner {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom) + 12px);
  left: 12px;
  right: 12px;
  max-width: 516px;
  margin: 0 auto;
  background: var(--cbc-bordeaux);
  background-image: radial-gradient(ellipse at top right, rgba(234,201,88,0.2) 0%, transparent 60%);
  color: white;
  padding: 16px 18px;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(82,7,1,0.35);
  display: none;
  align-items: center;
  gap: 14px;
  z-index: 95;
  border: 1px solid var(--cbc-or);
}
.install-banner.show { display: flex; }

.install-banner .icon-app {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--cbc-noir);
  padding: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--cbc-or);
}
.install-banner .icon-app img { width: 100%; height: 100%; object-fit: contain; }
.install-banner .text { flex: 1; }
.install-banner .install-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
  color: var(--cbc-or);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.install-banner .install-desc { font-size: 11px; opacity: 0.8; font-weight: 400; }
.install-banner .actions { display: flex; gap: 6px; align-items: center; }
.install-banner .btn-install {
  background: var(--cbc-or);
  color: var(--cbc-bordeaux);
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-body);
}
.install-banner .btn-close {
  background: transparent;
  color: rgba(255,255,255,0.6);
  border: none;
  padding: 8px;
  cursor: pointer;
  font-size: 18px;
}

/* ============================================== */
/* DRAWER                                          */
/* ============================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(82,7,1,0.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.drawer-backdrop.show { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 540px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 24px 22px calc(28px + var(--safe-bottom));
  z-index: 201;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 85vh;
  overflow-y: auto;
  border-top: 1px solid var(--cbc-or);
}
.drawer.show { transform: translateY(0); }

.drawer-handle {
  width: 40px;
  height: 4px;
  background: var(--cbc-or-fonce);
  border-radius: 2px;
  margin: -10px auto 18px;
  opacity: 0.4;
}

.drawer-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 22px;
  margin: 0 auto 14px;
  border: 2px solid var(--cbc-or);
}

.drawer-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.4px;
  color: var(--cbc-bordeaux);
}

.drawer-activity {
  font-size: 12px;
  color: var(--text-soft);
  text-align: center;
  margin-top: 4px;
  margin-bottom: 14px;
  font-weight: 500;
}

.drawer-group {
  text-align: center;
  margin-bottom: 22px;
}

.drawer-info {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.drawer-info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  align-items: center;
}
.drawer-info-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.drawer-info-row .label { 
  color: var(--text-soft); 
  font-weight: 600; 
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.drawer-info-row .value { color: var(--cbc-bordeaux); font-weight: 600; }

/* ============================================== */
/* RESPONSIVE                                      */
/* ============================================== */
@media (max-width: 540px) {
  body { box-shadow: none; max-width: 100%; }
}

@media (min-width: 768px) {
  body {
    max-width: 540px;
    margin: 32px auto;
    border-radius: 24px;
    overflow: hidden;
    min-height: calc(100vh - 64px);
    box-shadow: 0 20px 60px rgba(82,7,1,0.15);
  }
  .header { border-radius: 24px 24px 0 0; }
}

/* ============================================== */
/* AJOUTS V3 : Profil, Événements, Admin avancé   */
/* ============================================== */

/* Profil photo upload */
.photo-upload-wrap {
  text-align: center;
  margin-bottom: 24px;
}
.photo-upload-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  margin: 0 auto 12px;
  position: relative;
  cursor: pointer;
  border: 2px solid var(--cbc-or);
  overflow: hidden;
  background: var(--cbc-bordeaux);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cbc-or);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
}
.photo-upload-circle img { width: 100%; height: 100%; object-fit: cover; }
.photo-upload-circle::after {
  content: '📷';
  position: absolute;
  bottom: 4px; right: 4px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--cbc-or);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid white;
}
.photo-upload-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Événement carte */
.event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.event-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
}
.event-card.type-reunion::before   { background: var(--cbc-bordeaux); }
.event-card.type-afterwork::before { background: var(--cbc-or-fonce); }
.event-card.type-soiree::before    { background: #B0228C; }
.event-card.type-padel::before     { background: var(--success); }
.event-card.type-autre::before     { background: var(--text-muted); }

.event-type-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--cbc-or-fonce);
  margin-bottom: 6px;
}

.event-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--cbc-bordeaux);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.event-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 14px;
}
.event-meta div { display: flex; align-items: center; gap: 8px; }
.event-meta .icon { font-size: 14px; opacity: 0.7; }

.event-attendees {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.event-attendees strong {
  color: var(--cbc-bordeaux);
  font-family: var(--font-display);
  font-size: 16px;
}

.event-status-registered {
  background: var(--success);
  color: white;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: center;
}

/* Modale */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(82,7,1,0.5);
  backdrop-filter: blur(4px);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.show { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--surface);
  border-radius: 18px;
  padding: 24px;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid var(--cbc-or);
  transform: translateY(20px);
  transition: transform 0.3s;
}
.modal-backdrop.show .modal { transform: translateY(0); }

.modal-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--cbc-bordeaux);
  margin-bottom: 18px;
  letter-spacing: -0.3px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* Loader */
.loader {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(234,201,88,0.3);
  border-top-color: var(--cbc-or);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--cbc-noir);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  flex-direction: column;
  gap: 20px;
}
.loading-screen .loader {
  width: 40px;
  height: 40px;
  border-width: 3px;
}
.loading-screen .text {
  color: var(--cbc-or);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
}

/* Recipient checkbox group (admin invitations) */
.recipient-group {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}
.recipient-group .label {
  font-size: 11px;
  color: var(--cbc-bordeaux);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.recipient-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
}
.recipient-radio input[type="radio"] {
  accent-color: var(--cbc-bordeaux);
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.recipient-radio .text { font-size: 13px; }
.recipient-radio .count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Attendance row (admin) */
.attendance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 6px;
}
.attendance-row .name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}
.attendance-buttons { display: flex; gap: 4px; }
.attendance-btn {
  padding: 5px 10px;
  border: 1px solid var(--border-strong);
  background: white;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  font-family: var(--font-body);
}
.attendance-btn.active.present { background: var(--success); color: white; border-color: var(--success); }
.attendance-btn.active.absent  { background: var(--cbc-bordeaux); color: var(--cbc-or); border-color: var(--cbc-bordeaux); }
.attendance-btn.active.excused { background: var(--warning); color: white; border-color: var(--warning); }

