/* ============================================================
 * Admin Dashboard — Styles spécifiques au tableau de bord admin
 * (extraits de app.css pour isolation par page)
 * ============================================================ */

.admin-dashboard {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* Hero Section */
.hero-gradient {
    background: linear-gradient(135deg, #045d98 0%, #0678cc 25%, #08a3ff 50%, #0ea5e9 75%, #0284c7 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
}

.hero-pattern::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
}

/* Statistics Cards */
.stats-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid;
}

.stats-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.stats-card-blue   { border-left-color: #045d98; }
.stats-card-green  { border-left-color: #10b981; }
.stats-card-purple { border-left-color: #8b5cf6; }
.stats-card-yellow { border-left-color: #f59e0b; }

/* Table */
.admin-table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.table-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 2px solid #e5e7eb;
}

.table-row {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.table-row:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transform: scale(1.01);
}

.table-row:last-child {
    border-bottom: none;
}

/* User Avatar */
.user-avatar {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.3);
}

/* Inputs */
.admin-input {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.admin-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

/* Buttons */
.admin-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.admin-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;
}

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

.admin-btn-primary {
    background: linear-gradient(135deg, #045d98 0%, #0678cc 100%);
    box-shadow: 0 4px 15px 0 rgba(4, 93, 152, 0.3);
}

.admin-btn-primary:hover {
    background: linear-gradient(135deg, #034a7a 0%, #056099 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(4, 93, 152, 0.4);
}

.admin-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px 0 rgba(16, 185, 129, 0.3);
}

.admin-btn-success:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(16, 185, 129, 0.4);
}

.admin-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 15px 0 rgba(239, 68, 68, 0.3);
}

.admin-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(239, 68, 68, 0.4);
}

/* Quick Actions */
.quick-action-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
    border-color: #d1d5db;
}

.quick-action-btn {
    background: linear-gradient(135deg, #045d98 0%, #08a3ff 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.quick-action-btn:hover::before { left: 100%; }

.quick-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px -8px rgba(4, 93, 152, 0.4);
}

/* System Info Cards */
.system-info-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #d1d5db;
    transition: all 0.3s ease;
}

.system-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Activity Chart */
.activity-chart {
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 50%, #faf5ff 100%);
    border: 2px dashed #cbd5e1;
    position: relative;
    overflow: hidden;
}

.activity-chart::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%233b82f6' fill-opacity='0.03'%3E%3Cpath d='M20 20c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10zm10 0c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10z'/%3E%3C/g%3E%3C/svg%3E");
}

.chart-placeholder {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    box-shadow: 0 10px 40px -10px rgba(59, 130, 246, 0.5);
}

/* Stats Overlay */
.stats-overlay {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Search Bar */
.search-input {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #ffffff;
}

/* Pagination */
.pagination-btn {
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.1);
}

.pagination-active {
    background: linear-gradient(135deg, #045d98 0%, #0678cc 100%);
    color: white;
    box-shadow: 0 4px 15px 0 rgba(4, 93, 152, 0.3);
}

/* Modal */
.admin-modal {
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Loading shimmer */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .stats-card      { margin-bottom: 1rem; }
    .quick-action-btn { padding: 1rem; font-size: 0.9rem; }
    .admin-table     { font-size: 0.875rem; }
}

/* Accessibility — reduced motion */
@media (prefers-reduced-motion: reduce) {
    .stats-card, .admin-btn, .quick-action-card,
    .quick-action-btn, .system-info-card, .pagination-btn, .table-row {
        transition: none;
        transform: none !important;
    }
    .loading-shimmer { animation: none; }
}

/* Focus states */
.admin-input:focus,
.admin-btn:focus,
.quick-action-btn:focus,
.search-input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print */
@media print {
    .admin-dashboard { background: white !important; }
    .stats-card, .quick-action-card, .system-info-card, .activity-chart {
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
    }
    .admin-btn, .quick-action-btn {
        background: #045d98 !important;
        color: white !important;
        transform: none !important;
    }
}
