
/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light theme - tons professionnels */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-glass: rgba(248, 249, 250, 0.95);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --accent-primary: #3b82f6;
    --accent-secondary: #1d4ed8;
    --accent-hover: #2563eb;
    --accent-light: #dbeafe;
    
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --shadow-color: rgba(15, 23, 42, 0.08);
    --shadow-hover: rgba(15, 23, 42, 0.15);
    
    /* Status colors */
    --success: #10b981;
    --success-bg: #d1fae5;
    --danger: #ef4444;
    --danger-bg: #fecaca;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    
    /* Gradients subtils */
    --gradient-primary: linear-gradient(135deg, #3b82f6, #1d4ed8);
    --gradient-surface: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(29, 78, 216, 0.05));
}

[data-theme="dark"] {
    /* Dark theme - tons professionnels */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: rgba(30, 41, 59, 0.95);
    --bg-glass: rgba(15, 23, 42, 0.95);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --accent-primary: #60a5fa;
    --accent-secondary: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: #1e3a8a;
    
    --border-color: #334155;
    --border-hover: #475569;
    --shadow-color: rgba(0, 0, 0, 0.25);
    --shadow-hover: rgba(0, 0, 0, 0.35);
    
    /* Status colors - dark mode */
    --success: #34d399;
    --success-bg: #064e3b;
    --danger: #f87171;
    --danger-bg: #7f1d1d;
    --warning: #fbbf24;
    --warning-bg: #78350f;
    
    --gradient-surface: linear-gradient(135deg, rgba(96, 165, 250, 0.05), rgba(59, 130, 246, 0.05));
}

/* Base Body avec motif unique */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    transition: all 0.3s ease;
    position: relative;
}

/* Motif géométrique subtil en arrière-plan */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
        linear-gradient(45deg, transparent 49%, rgba(59, 130, 246, 0.01) 50%, transparent 51%);
    pointer-events: none;
    z-index: -1;
}

/* Scrollbar élégante */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* Header avec design géométrique */
header {
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

header:hover::after {
    opacity: 1;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Logo section avec effet géométrique */
.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    /* allow the left area to shrink on small screens so title doesn't push out the menu */
    flex: 1 1 auto;
    min-width: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.logo-section {
    position: relative;
    text-decoration: none;
    display: block;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.logo-section:hover {
    transform: scale(1.05);
}

.logo {
    height: 64px;
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.1));
}

.logo:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.2));
}

.title-section {
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    /* allow truncation when space is limited */
    min-width: 0;
}

.title-section:hover {
    transform: translateX(2px);
}

.title-section h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    position: relative;
    white-space: nowrap;
    line-height: 1.2;
    transition: color 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
}

.title-section h1::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.title-section:hover h1 {
    color: var(--accent-primary);
}

.title-section:hover h1::after {
    width: 100%;
}

.title-section h2 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.9;
    white-space: nowrap;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.title-section:hover h2 {
    color: var(--accent-primary);
}

/* Banner full width */
.banner {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Navigation avec style unique */
.nav-menu {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}


.nav-link {
    position: relative;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.9rem;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-surface);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary);
    transform: translateY(-1px);
}

.nav-link.active {
    font-weight: 600;
}

/* Theme toggle sophistiqué */
.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.theme-toggle-btn:hover {
    background: var(--bg-secondary);
    transform: scale(1.05);
}

.theme-toggle-track {
    position: relative;
    width: 52px;
    height: 28px;
    background: var(--bg-tertiary);
    border-radius: 14px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    overflow: hidden;
}

[data-theme="dark"] .theme-toggle-track {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.theme-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 3;
}

[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(24px);
    background: var(--bg-primary);
}

.theme-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    transition: all 0.3s ease;
    z-index: 2;
}

.sun-icon {
    left: 6px;
    color: #fbbf24;
    opacity: 1;
}

.moon-icon {
    right: 6px;
    color: #64748b;
    opacity: 0.4;
}

[data-theme="dark"] .sun-icon {
    opacity: 1;
    color: #fde047;
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    color: #60a5fa;
}

/* Main Content */
main {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
    position: relative;
}

/* Cards avec design unique et moderne */
.card, .status-card, .schedule-card, .info-card, .admin-card, .login-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(120%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 20px 40px var(--shadow-hover);
}

.card:hover::before {
    opacity: 1;
}

/* Status avec design unique et moderne */
.status-container {
    margin-bottom: 3rem;
    position: relative;
}

.status-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--gradient-surface);
    position: relative;
    overflow: hidden;
}

.status-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.03) 0%, transparent 70%);
    animation: rotateGradient 15s linear infinite;
}

@keyframes rotateGradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status-card h3 {
    position: relative;
    z-index: 2;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    margin-bottom: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    backdrop-filter: blur(10px);
}

.status-indicator::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 60px;
    padding: 3px;
    background: linear-gradient(45deg, currentColor, transparent, currentColor);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.5;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.status-indicator.open {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: var(--success);
    border: 3px solid var(--success);
    box-shadow:
        0 0 30px rgba(16, 185, 129, 0.3),
        0 10px 40px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.status-indicator.open:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 50px rgba(16, 185, 129, 0.5),
        0 15px 60px rgba(16, 185, 129, 0.3);
}

.status-indicator.closed {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: var(--danger);
    border: 3px solid var(--danger);
    box-shadow:
        0 0 30px rgba(239, 68, 68, 0.3),
        0 10px 40px rgba(239, 68, 68, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.status-indicator.closed:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 50px rgba(239, 68, 68, 0.5),
        0 15px 60px rgba(239, 68, 68, 0.3);
}

.status-indicator.unknown {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    color: var(--warning);
    border: 3px solid var(--warning);
    box-shadow:
        0 0 30px rgba(245, 158, 11, 0.3),
        0 10px 40px rgba(245, 158, 11, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.status-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: currentColor;
    position: relative;
    box-shadow:
        0 0 10px currentColor,
        0 0 20px currentColor,
        inset 0 0 8px rgba(255, 255, 255, 0.5);
}

.status-indicator.open .status-icon {
    animation: statusPulseOpen 2s infinite;
}

.status-indicator.closed .status-icon {
    animation: statusPulseClosed 3s infinite;
}

@keyframes statusPulseOpen {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 0 15px currentColor,
            0 0 30px currentColor,
            inset 0 0 10px rgba(255, 255, 255, 0.5);
    }
    50% {
        transform: scale(1.2);
        box-shadow:
            0 0 25px currentColor,
            0 0 50px currentColor,
            inset 0 0 15px rgba(255, 255, 255, 0.8);
    }
}

@keyframes statusPulseClosed {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.9);
    }
}

.status-message {
    position: relative;
    z-index: 2;
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 1rem 0;
    font-weight: 500;
}

.status-message strong {
    color: var(--accent-primary);
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.last-updated {
    position: relative;
    z-index: 2;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    display: inline-block;
    backdrop-filter: blur(5px);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Schedule avec style géométrique */
.schedule-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.schedule-day {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: #e7f0ff;
    border-radius: 12px;
    border-left: 4px solid var(--accent-primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .schedule-day {
    background: #0a1b37;
    border-left-color: var(--accent-secondary);
}

.schedule-day::after {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.05), transparent);
    transition: right 0.5s ease;
}

.schedule-day:hover::after {
    right: 0;
}

.schedule-day:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.day-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.day-hours {
    color: var(--text-secondary);
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

/* Info Card avec liste stylisée */
.info-card ul {
    list-style: none;
    margin: 1.5rem 0;
}

.info-card li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    transition: all 0.3s ease;
}

.info-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.info-card li:hover::before {
    transform: translateY(-50%) scale(1.5);
    box-shadow: 0 0 10px var(--accent-primary);
}

.info-card li:hover {
    color: var(--accent-primary);
    transform: translateX(5px);
}

/* Buttons avec style moderne */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: black !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary i,
.btn-primary span {
    color: black !important;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

/* Forms élégants */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background: var(--bg-primary);
}

/* Footer moderne */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 6rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-primary);
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    position: relative;
}

.footer-section a::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-primary);
    transform: translateX(4px);
}

.footer-section a:hover::before {
    width: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Mobile Navigation */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 3px;
}

.burger-line {
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active .burger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-nav {
    display: none;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
}

.mobile-nav.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--accent-primary);
    background: var(--gradient-surface);
    border-left: 4px solid var(--accent-primary);
}

.mobile-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--border-color);
}

.theme-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Responsive */
@media (min-width: 1400px) {
    .nav-link {
        padding: 0.75rem 1.25rem;
    }
}

@media (max-width: 1200px) {
    .nav-link {
        padding: 0.75rem 0.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 1150px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .header-container {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .card, .status-card, .schedule-card, .info-card, .admin-card {
        padding: 2rem;
    }
    
    .header-container {
        padding: 1.5rem 1rem;
    }
    
    .header-left {
        gap: 1.5rem;
    }
    
    .title-section h1 {
        font-size: 1.2rem;
    }
    
    .title-section h2 {
        font-size: 0.8rem;
    }
    
    .banner {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .header-container {
        padding: 1rem 0.75rem;
    }
    
    .header-left {
        gap: 1rem;
    }
    
    .title-section h1 {
        font-size: 1.1rem;
    }
    
    .title-section h2 {
        font-size: 0.75rem;
    }
    
    .banner {
        height: 120px;
    }
    
    .card, .status-card, .schedule-card, .info-card, .admin-card {
        padding: 1.5rem;
    }
    
    .status-indicator {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
}

/* Animations globales */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Classes utilitaires */
.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

.slide-in {
    animation: slideIn 0.6s ease forwards;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================================
   ADMIN INTERFACE - TABS & SIDEBAR
   ============================================================================ */

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    gap: 0;
}

/* Sidebar */
.admin-sidebar {
    width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    max-height: 100vh;
    min-height: fit-content;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar-toggle:hover {
    background: var(--bg-secondary);
}

.sidebar-user {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.admin {
    background: var(--gradient-primary);
    color: white;
}

.role-badge.adherent {
    background: var(--accent-light);
    color: var(--accent-primary);
}

.sidebar-menu {
    padding: 1rem 0;
    list-style: none;
}

.sidebar-menu li {
    margin: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.menu-item:active {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.menu-item.active {
    background: var(--accent-light);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    font-weight: 600;
}

.menu-item.active:hover {
    background: var(--accent-light);
    color: var(--accent-primary);
}

.menu-item.active:active {
    background: var(--accent-light);
    color: var(--accent-primary);
}

.menu-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Admin Wrapper - New horizontal tabs layout */
.admin-wrapper {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
    overflow: hidden;
}

/* Admin Header Bar */
.admin-header-bar {
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-name-small {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: var(--bg-primary);
    color: var(--accent-primary);
}

/* Admin Tabs Navigation */
.admin-tabs-nav {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.admin-tabs-nav::-webkit-scrollbar {
    height: 4px;
}

.admin-tabs-nav::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.admin-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
    background: transparent;
}

.admin-tab:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.admin-tab.active {
    color: white;
    background: var(--accent-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.admin-tab i {
    font-size: 1.1rem;
}

/* Admin Content */
.admin-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Tabs */
.tab-content {
    display: none;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.tab-content.active {
    display: block;
}

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

.tab-header {
    margin-bottom: 2rem;
}

.tab-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tab-header h3 i {
    color: var(--accent-primary);
}

.tab-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Stats Grid (Dashboard) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 8px 24px var(--shadow-color);
    transform: translateY(-2px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.stat-icon.green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-icon.red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Admin Cards */
.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    overflow: visible;
}

.admin-card h4 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-card h4 i {
    color: var(--accent-primary);
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Forms */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-help {
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent-primary);
    padding: 1rem;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.form-help i {
    color: var(--accent-primary);
    margin-top: 0.125rem;
}

/* Toggle Switch */
.switch-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.switch-label {
    font-weight: 600;
    color: var(--text-primary);
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    transition: 0.3s;
    border-radius: 999px;
}

.slider:before {
    position: absolute;
    content: '';
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background: var(--gradient-primary);
}

.switch input:checked + .slider:before {
    transform: translateX(24px);
}

/* Status Grid & Summary */
.status-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}

.status-summary {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 10px;
}

.summary-block {
    margin-bottom: 1.25rem;
}

.summary-block:last-child {
    margin-bottom: 0;
}

.summary-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.summary-value {
    font-weight: 700;
    font-size: 1.25rem;
    padding: 0.5rem 0;
}

.summary-value.open {
    color: var(--success);
}

.summary-value.closed {
    color: var(--danger);
}

.summary-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Horaires Multi-Créneaux */
.horaires-multi-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.jour-horaire-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
}

.jour-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.jour-header h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.btn-add-creneau {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-add-creneau:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.creneaux-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.empty-creneaux {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px dashed var(--border-color);
}

.creneau-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
}

.creneau-inputs {
    flex: 1;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.time-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.time-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.time-select {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.9rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

.time-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    color: var(--text-secondary);
    font-weight: 700;
    margin-top: 1.25rem;
}

.btn-remove-creneau {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.625rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.btn-remove-creneau:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Adherents Grid */
.adherents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.adherent-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.3s ease;
    overflow: visible;
}

.adherent-card:hover {
    box-shadow: 0 4px 12px var(--shadow-color);
    border-color: var(--accent-primary);
}

.adherent-top {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.adherent-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    font-weight: 700;
    font-size: 1rem;
}

.adherent-meta {
    flex: 1;
    min-width: 0;
}

.adherent-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.adherent-username {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.adherent-email {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.adherent-email.muted {
    color: var(--text-muted);
    font-style: italic;
}

.adherent-foot .created {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Adherent Role Badge */
.adherent-role-badge {
    margin-top: 0.25rem;
}

.role-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.role-superadmin {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.role-badge.role-admin {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.role-badge.role-tresorier {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.role-badge.role-secretaire {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.role-badge.role-adherent {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

/* Adherent Actions Menu */
.adherent-actions {
    position: relative;
}

.btn-action-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.btn-action-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.action-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-color);
    min-width: 220px;
    z-index: 1000;
    overflow: visible;
    white-space: nowrap;
}

/* Pour les cartes en dernière colonne, afficher le menu vers la gauche */
.adherent-card:nth-child(3n) .action-menu,
.adherent-card:last-child .action-menu {
    right: 0;
    left: auto;
}

@media (max-width: 900px) {
    .action-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .adherent-card:nth-child(3n) .action-menu,
    .adherent-card:last-child .action-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

.action-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.action-item:hover {
    background: var(--bg-secondary);
}

.action-item i {
    width: 16px;
    text-align: center;
}

.action-item.reset-password-btn:hover {
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
}

.action-item.delete-user-btn {
    color: var(--danger);
}

.action-item.delete-user-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Articles List */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.article-item.inactive {
    opacity: 0.6;
}

.article-item:hover {
    box-shadow: 0 4px 12px var(--shadow-color);
    border-color: var(--accent-primary);
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.article-header h5 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.status-badge.active {
    background: var(--success-bg);
    color: var(--success);
}

.status-badge.inactive {
    background: var(--danger-bg);
    color: var(--danger);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.article-author {
    font-weight: 600;
    color: var(--accent-primary);
}

.article-date,
.article-updated {
    color: var(--text-muted);
}

.article-preview {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Logs */
.logs-header {
    margin-bottom: 1.5rem;
}

.logs-filters {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 200px;
}

.logs-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.log-entry {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.log-entry:hover {
    border-color: var(--accent-primary);
    background: var(--bg-primary);
}

.log-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.log-action {
    font-weight: 600;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.log-action i {
    font-size: 1rem;
}

/* Couleurs des icônes selon le type d'action */
.log-entry.login_success .log-action i {
    color: var(--success);
}

.log-entry.login_failed .log-action i {
    color: var(--danger);
}

.log-entry.logout .log-action i {
    color: var(--text-secondary);
}

.log-entry.horaires_update .log-action i {
    color: #3b82f6;
}

.log-entry.statut_update .log-action i {
    color: #8b5cf6;
}

.log-entry.user_create .log-action i {
    color: var(--success);
}

.log-entry.user_update .log-action i {
    color: #f59e0b;
}

.log-entry.user_deactivate .log-action i {
    color: var(--danger);
}

.log-time {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.log-details {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.log-user {
    font-weight: 600;
    margin-right: 0.5rem;
}

.log-description {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
}

.log-meta {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.log-entry-compact {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.625rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.log-entry-compact:hover {
    background: var(--bg-primary);
    border-color: var(--accent-primary);
}

.log-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.log-icon i {
    font-size: 1.125rem;
}

/* Couleurs des icônes compactes */
.log-entry-compact .log-icon .fa-check-circle {
    color: var(--success);
}

.log-entry-compact .log-icon .fa-times-circle {
    color: var(--danger);
}

.log-entry-compact .log-icon .fa-sign-out-alt {
    color: var(--text-secondary);
}

.log-entry-compact .log-icon .fa-clock {
    color: #3b82f6;
}

.log-entry-compact .log-icon .fa-door-open {
    color: #8b5cf6;
}

.log-entry-compact .log-icon .fa-user-plus {
    color: var(--success);
}

.log-entry-compact .log-icon .fa-user-edit {
    color: #f59e0b;
}

.log-entry-compact .log-icon .fa-user-slash {
    color: var(--danger);
}

.log-entry-compact .log-icon .fa-cog {
    color: var(--accent-primary);
}

.log-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.log-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.log-action-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.log-separator {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.log-user-compact {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.log-ip {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.log-description-compact {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.log-time-compact {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.logs-pagination {
    margin-top: 1rem;
    text-align: center;
}

.recent-logs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.alert i {
    font-size: 1.25rem;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success);
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* No Content State */
.no-content {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.no-content p {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .status-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.5);
}

.mobile-menu-toggle:active {
    transform: translateY(0);
}

.mobile-menu-toggle i {
    font-size: 1.25rem;
}

/* Sidebar close button (inside sidebar) */
.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.sidebar-close:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.mobile-overlay.active {
    opacity: 1;
}

@media (max-width: 768px) {
    /* Admin Header Bar - Keep horizontal on mobile, just adjust */
    .admin-header-bar {
        padding: 1rem;
        gap: 0.75rem;
    }

    .admin-user-info {
        gap: 0.75rem;
    }

    .user-avatar-small {
        width: 36px;
        height: 36px;
        font-size: 0.8125rem;
    }

    .user-name-small {
        font-size: 0.875rem;
    }

    .user-details {
        gap: 0.125rem;
    }

    .btn-logout {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
    }

    .btn-logout span {
        display: none; /* Hide text on small screens */
    }

    /* Admin Tabs - Scroll horizontally on mobile */
    .admin-tabs-nav {
        padding: 0.5rem;
        gap: 0.375rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-tab {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        gap: 0.375rem;
    }

    .admin-tab i {
        font-size: 1rem;
    }

    /* Reduce padding on mobile */
    .admin-content {
        padding: 1rem;
    }

    /* Stack layout vertically */
    .admin-layout {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

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

    .article-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .adherents-grid {
        grid-template-columns: 1fr;
    }

    .creneau-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .creneau-inputs {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .time-group {
        width: 100%;
        flex: none; /* Override desktop flex: 1 */
        min-width: 100%;
    }

    .time-group label {
        font-size: 0.875rem;
        margin-bottom: 0.375rem;
    }

    .time-select {
        width: 100% !important;
        padding: 0.75rem;
        font-size: 1rem;
        min-height: 44px;
        box-sizing: border-box;
    }

    .time-separator {
        display: none;
    }

    .btn-remove-creneau {
        width: 100%;
        height: 44px;
        font-size: 1rem;
        padding: 0.75rem;
    }

    .btn-add-creneau {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        min-height: 44px;
    }

    .jour-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    /* Better spacing on mobile */
    .tab-header h3 {
        font-size: 1.5rem;
    }

    /* Tables scroll horizontally on mobile */
    .data-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Reduce card padding on mobile */
    .admin-card {
        padding: 1rem;
    }

    /* Stack form buttons vertically */
    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Adjust stats cards for mobile */
    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    /* Smaller headings */
    .tab-header h3 {
        font-size: 1.25rem;
    }

    /* Vertical stat cards */
    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    /* Vertical filters */
    .logs-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }

    /* Smaller mobile menu button */
    .mobile-menu-toggle {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        bottom: 15px;
        right: 15px;
    }

    .mobile-menu-toggle i {
        font-size: 1.1rem;
    }

    /* Narrower sidebar on very small screens */
    .admin-sidebar {
        max-width: 90vw;
    }

    /* Smaller padding */
    .admin-content {
        padding: 0.75rem;
    }

    .admin-card {
        padding: 0.75rem;
    }
}

/* ========================================================================
   BUDGET MANAGEMENT
   ======================================================================== */

/* Section actions */
.section-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Transactions table */
.transactions-list {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
}

.data-table thead {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.data-table tbody tr:hover {
    background: var(--bg-secondary);
}

/* Transaction amount colors */
.amount-recette {
    color: var(--success-color);
    font-weight: 600;
}

.amount-depense {
    color: var(--warning-color);
    font-weight: 600;
}

/* Category badge */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
}

/* Badge variants */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: var(--success-color);
    color: white;
}

.badge-warning {
    background: var(--warning-color);
    color: white;
}

/* Icon buttons */
.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-icon:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.btn-icon.btn-edit-transaction:hover {
    color: var(--info-color);
}

.btn-icon.btn-delete-transaction:hover,
.btn-icon.btn-delete-category:hover {
    color: var(--danger-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    /* Align to top so overflowing modal-content can scroll naturally on small screens */
    align-items: flex-start;
    justify-content: center;
    padding: 1.25rem 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 12px;
    /* Slightly narrower to fit better on small/medium screens */
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

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

.modal-header h3,
.modal-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-content form {
    padding: 1.5rem;
}

.modal-content form .form-group {
    margin-bottom: 1.5rem;
}

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

/* Form row */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Categories list in modal */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.category-item:hover {
    background: var(--bg-tertiary);
}

.category-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.category-name {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
}

/* Stat card icon colors */
.stat-icon.green {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
}

.stat-icon.purple {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
}

/* Card header for budget */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.card-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.card-actions {
    display: flex;
    gap: 0.75rem;
}

/* Text muted utility */
.text-muted {
    color: var(--text-muted);
}

/* Margin bottom utility */
.mb-3 {
    margin-bottom: 1.5rem;
}

/* Responsive budget styles */
@media (max-width: 768px) {
    .section-actions {
        flex-direction: column;
    }

    .section-actions .btn {
        width: 100%;
    }

    .data-table {
        font-size: 0.875rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-actions {
        width: 100%;
    }

    .card-actions .filter-select {
        flex: 1;
    }

    .modal-content {
        max-width: 100%;
        margin: 0;
        border-radius: 12px 12px 0 0;
        max-height: 95vh;
    }

    .form-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .transactions-list {
        overflow-x: scroll;
    }

    .data-table {
        min-width: 800px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}