/* ================================================================
   MUSLIM INVEST CLUB — Feuille de style principale
   Charte : #0b1f18 (fond) | #2ecc80 (vert) | #f0a500 (doré)
   Fonts  : Montserrat (UI) | Lora (titres)
   ================================================================ */

/* --- Variables CSS --- */
:root {
    --bg-dark:     #0b1f18;
    --bg-card:     #0f2920;
    --bg-sidebar:  #071510;
    --bg-input:    #0d2318;
    --green:       #2ecc80;
    --green-dark:  #27b872;
    --green-dim:   rgba(46,204,128,0.12);
    --gold:        #f0a500;
    --gold-dim:    rgba(240,165,0,0.12);
    --danger:      #e74c3c;
    --danger-dim:  rgba(231,76,60,0.12);
    --blue-dim:    rgba(52,152,219,0.15);
    --purple-dim:  rgba(155,89,182,0.15);
    --text:        #e8f5ee;
    --text-muted:  #7ab896;
    --text-dim:    #4a7a62;
    --border:      #1a3a28;
    --border-light:#234d36;
    --sidebar-w:   260px;
    --radius:      10px;
    --radius-lg:   16px;
    --shadow:      0 4px 20px rgba(0,0,0,0.4);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

img { max-width: 100%; }

h1, h2, h3, h4 { color: var(--text); font-weight: 600; }
.font-lora { font-family: 'Lora', serif; }

input, select, textarea, button {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
}

/* --- Layout sidebar --- */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    transition: transform 0.3s ease;
}

.main-wrapper {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    padding: 28px 32px;
    flex: 1;
    max-width: 1400px;
    width: 100%;
}

/* --- Sidebar logo --- */
.sidebar-logo {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}

.logo-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

.logo-sub {
    font-size: 0.7rem;
    color: var(--green);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* --- Sidebar navigation --- */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
    text-decoration: none;
    position: relative;
}

.nav-item:hover {
    background: var(--green-dim);
    color: var(--text);
}

.nav-item.active {
    background: var(--green-dim);
    color: var(--green);
}

.nav-item.active .nav-icon { stroke: var(--green); }

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
}

.nav-disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.nav-separator {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-dim);
    padding: 12px 12px 4px;
    font-weight: 600;
}

.badge-soon {
    margin-left: auto;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 99px;
    background: var(--gold-dim);
    color: var(--gold);
    font-weight: 600;
}

/* --- Sidebar user --- */
.sidebar-user {
    padding: 16px 12px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--green-dim);
    border: 2px solid var(--green);
    color: var(--green);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar.small {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-info strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.logout-btn {
    color: var(--text-dim);
    display: flex;
    align-items: center;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.logout-btn:hover {
    color: var(--danger);
    background: var(--danger-dim);
}

/* --- Topbar (mobile) --- */
.topbar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s;
}

.topbar-title {
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99;
}

/* --- Page header --- */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.65rem;
    color: var(--text);
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* --- Stats grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: border-color 0.2s;
}

.stat-card:hover { border-color: var(--border-light); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg { width: 22px; height: 22px; }

.stat-icon-green  { background: var(--green-dim); stroke: var(--green); color: var(--green); }
.stat-icon-green svg { stroke: var(--green); }
.stat-icon-gold   { background: var(--gold-dim);  }
.stat-icon-gold svg   { stroke: var(--gold); }
.stat-icon-blue   { background: var(--blue-dim);  }
.stat-icon-blue svg   { stroke: #3498db; }
.stat-icon-purple { background: var(--purple-dim);}
.stat-icon-purple svg { stroke: #9b59b6; }

.stat-body { flex: 1; min-width: 0; }

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.stat-value small {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.stat-value-sm { font-size: 1rem; }

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 0;
}

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title svg { stroke: var(--green); }

.card-link {
    font-size: 0.82rem;
    color: var(--green);
    font-weight: 500;
}

.card-body { padding: 22px; }
.card-body.p-0 { padding: 0; }

.mt-2 { margin-top: 10px; }
.mt-4 { margin-top: 24px; }
.mb-4 { margin-bottom: 24px; }

/* --- Dashboard grid --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* --- Live featured --- */
.live-featured { text-align: center; padding: 8px 0; }

.live-date-badge {
    display: inline-block;
    background: var(--green-dim);
    color: var(--green);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 99px;
    margin-bottom: 10px;
}

.live-heure {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: 8px;
}

.live-theme {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 10px;
}

.live-intervenant {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* --- Intervenant dots --- */
.intervenant-dot, .dot-green, .dot-gold, .dot-muted {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-green { background: var(--green); }
.dot-gold  { background: var(--gold); }
.dot-muted { background: var(--text-dim); }

/* --- Annonces --- */
.annonce-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }

.annonce-item {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.annonce-item:last-child { border-bottom: none; padding-bottom: 0; }

.annonce-titre { font-weight: 600; color: var(--text); margin-bottom: 4px; }
.annonce-contenu { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 6px; }
.annonce-date { font-size: 0.78rem; color: var(--text-dim); }

/* --- Quick actions --- */
.quick-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 24px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
    min-width: 120px;
    text-align: center;
}

.quick-action:hover { border-color: var(--green); color: var(--text); }
.quick-action.disabled { opacity: 0.4; pointer-events: none; }
.quick-action small { display: block; font-size: 0.72rem; color: var(--text-dim); }

.qa-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qa-icon svg { width: 22px; height: 22px; }
.qa-green { background: var(--green-dim); }
.qa-green svg { stroke: var(--green); }
.qa-gold  { background: var(--gold-dim); }
.qa-gold svg  { stroke: var(--gold); }
.qa-muted { background: rgba(255,255,255,0.05); }
.qa-muted svg { stroke: var(--text-dim); }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    border: none;
    transition: background 0.2s, opacity 0.2s, transform 0.1s;
    text-decoration: none;
    white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--green); color: var(--bg-dark); }
.btn-primary:hover { background: var(--green-dark); color: var(--bg-dark); }

.btn-outline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-light);
}
.btn-outline:hover { border-color: var(--green); color: var(--green); background: var(--green-dim); }

.btn-danger { background: var(--danger-dim); color: var(--danger); border: 1px solid rgba(231,76,60,0.3); }
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-green  { background: var(--green-dim);  color: var(--green);  }
.badge-gold   { background: var(--gold-dim);   color: var(--gold);   }
.badge-muted  { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.badge-danger { background: var(--danger-dim); color: var(--danger); }

/* --- Alerts / Flash messages --- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success { background: var(--green-dim);  color: var(--green);  border-color: rgba(46,204,128,0.3); }
.alert-error   { background: var(--danger-dim); color: var(--danger); border-color: rgba(231,76,60,0.3); }
.alert-warning { background: var(--gold-dim);   color: var(--gold);   border-color: rgba(240,165,0,0.3); }
.alert-info    { background: var(--blue-dim);   color: #3498db;       border-color: rgba(52,152,219,0.3); }

/* --- Forms --- */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.93rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--green);
}

.form-group select { cursor: pointer; }
.form-group textarea { resize: vertical; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* --- Tables --- */
.table-responsive { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }

.table tbody tr:hover td { background: rgba(255,255,255,0.02); }

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Modals --- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-family: 'Lora', serif;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.modal-close:hover { color: var(--text); background: var(--green-dim); }

.modal-body { padding: 24px; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
}

/* --- Prochains lives strip --- */
.prochains-lives-strip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.strip-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    font-weight: 600;
    margin-bottom: 12px;
}

.strip-items {
    display: flex;
    gap: 12px;
    min-width: max-content;
}

.strip-item {
    padding: 12px 16px;
    border-radius: var(--radius);
    border-left: 3px solid transparent;
    background: var(--bg-dark);
    min-width: 150px;
}

.strip-green { border-color: var(--green); }
.strip-gold  { border-color: var(--gold); }

.strip-date        { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 2px; }
.strip-heure       { font-size: 1.2rem; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 4px; }
.strip-theme       { font-size: 0.83rem; color: var(--text); font-weight: 500; margin-bottom: 4px; }
.strip-intervenant { font-size: 0.75rem; color: var(--text-muted); }

/* --- Calendrier --- */
.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.cal-month-title { font-size: 1.3rem; }

.cal-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 6px;
}

.cal-grid-header span {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-day {
    min-height: 80px;
    padding: 8px 6px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}

.cal-day:hover { border-color: var(--border-light); background: rgba(255,255,255,0.02); }

.cal-day.other-month .cal-day-num { color: var(--text-dim); }

.cal-day.today { border-color: var(--green); }
.cal-day.today .cal-day-num { color: var(--green); font-weight: 700; }

.cal-day.has-live { background: var(--green-dim); border-color: rgba(46,204,128,0.2); }
.cal-day.has-live:hover { border-color: var(--green); }

.cal-day-num {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.cal-day-event {
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 4px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.cal-day-event.ev-green { background: var(--green-dim); color: var(--green); }
.cal-day-event.ev-gold  { background: var(--gold-dim);  color: var(--gold);  }
.cal-day-event.ev-muted { background: rgba(255,255,255,0.06); color: var(--text-muted); }

.cal-legend {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    padding: 0 4px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Timeline (frise) --- */
.total-banner {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(46,204,128,0.08) 100%);
    border: 1px solid rgba(46,204,128,0.25);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 28px;
    text-align: center;
}

.total-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.total-montant {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--green);
    line-height: 1;
    margin-bottom: 6px;
}

.total-sub { font-size: 0.85rem; color: var(--text-muted); }

.timeline-container {
    position: relative;
    padding-left: 28px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
    padding-left: 20px;
}

.timeline-dot {
    position: absolute;
    left: -24px;
    top: 16px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--bg-dark);
    background: var(--text-dim);
}

.timeline-dot.dot-green { background: var(--green); }
.timeline-dot.dot-gold  { background: var(--gold); }
.timeline-dot.dot-muted { background: var(--text-dim); }

.timeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: border-color 0.2s;
}

.timeline-card:hover { border-color: var(--border-light); }
.timeline-futur .timeline-card { opacity: 0.75; border-style: dashed; }

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

.timeline-nom  { font-size: 1.05rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.timeline-date { font-size: 0.82rem; color: var(--text-muted); }
.timeline-right { text-align: right; flex-shrink: 0; }
.timeline-montant { font-size: 1.2rem; font-weight: 700; color: var(--green); }

.timeline-description {
    font-size: 0.87rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
}

.timeline-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.meta-item svg { flex-shrink: 0; }

.timeline-admin-actions {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

/* --- Admin quicklinks --- */
.admin-quicklinks {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.admin-quicklink {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: border-color 0.2s, color 0.2s;
}

.admin-quicklink svg { stroke: var(--green); }
.admin-quicklink:hover { border-color: var(--green); color: var(--text); }

/* --- Filters --- */
.filters-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-form input {
    padding: 9px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.88rem;
    min-width: 240px;
    transition: border-color 0.2s;
}

.search-form input:focus { outline: none; border-color: var(--green); }

.filter-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px;
}

.filter-tab {
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.filter-tab:hover { color: var(--text); }
.filter-tab.active { background: var(--green-dim); color: var(--green); }

/* --- Text helpers --- */
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.empty-state  { color: var(--text-dim); font-size: 0.9rem; padding: 24px 0; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-quicklinks { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .main-content { padding: 20px; }
}

@media (max-width: 768px) {
    /* Masque la sidebar, affiche la topbar */
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 4px 0 24px rgba(0,0,0,0.5);
    }

    .sidebar.open { transform: translateX(0); }

    .sidebar-overlay.visible { display: block; }

    .main-wrapper { margin-left: 0; }

    .topbar { display: flex; }

    .main-content { padding: 16px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .form-row { grid-template-columns: 1fr; }

    .page-header { flex-direction: column; }

    .quick-actions { justify-content: center; }

    .filters-bar { flex-direction: column; align-items: stretch; }
    .search-form { flex: 1; }
    .search-form input { min-width: unset; width: 100%; }

    .admin-quicklinks { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .admin-quicklinks { grid-template-columns: 1fr; }

    .total-montant { font-size: 2rem; }

    .cal-day { min-height: 52px; }
    .cal-day-event { display: none; }
    .cal-day.has-live::after {
        content: '';
        display: block;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--green);
        margin: 4px auto 0;
    }
}
