/**
 * CAMFAITH ADMIN - Styles personnalisés
 * Complément à Tailwind CSS pour l'interface admin
 */

/* Variables CSS */
:root {
    --primary-color: #315ea5;
    --primary-dark: #1E40AF;
    --secondary-color: #6B7280;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    --bg-light: #F9FAFB;
    --bg-card: #FFFFFF;
    --border-color: #E5E7EB;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 0.5rem;
    --transition: all 0.2s ease-in-out;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
}

/* Layout principal */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Header */
.admin-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.admin-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Cards */
.admin-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.admin-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
    border-radius: var(--radius) var(--radius) 0 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
    border-radius: 0 0 var(--radius) var(--radius);
}

/* Boutons personnalisés */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

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

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

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

.btn-danger {
    background: var(--error-color);
    color: white;
}
.btn-info {
   background: var(--secondary-color);
    color: white;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}
.select-btn-style {
    @apply text-xs border px-2 py-1 rounded-md bg-white text-gray-700 hover:bg-gray-100;
}
/* Tables personnalisées */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.admin-table thead {
    background: var(--bg-light);
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table tbody tr:hover {
    background: var(--bg-light);
}

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

/* Formulaires */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-card);
    transition: var(--transition);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control.error {
    border-color: var(--error-color);
}

.form-text {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Checkboxes et radios personnalisés */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.form-check-input {
    margin-right: 0.5rem;
    accent-color: var(--primary-color);
}

/* Notifications et alertes */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success-color);
    color: #065F46;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning-color);
    color: #92400E;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error-color);
    color: #991B1B;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary-color);
    color: #1E40AF;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 400px;
}

.toast {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin-bottom: 0.5rem;
    padding: 1rem;
    border-left: 4px solid var(--primary-color);
    animation: slideInRight 0.3s ease-out;
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--error-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Badges et étiquettes */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    gap: 0.25rem;
}

.badge-primary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.badge-secondary {
    background: rgba(107, 114, 128, 0.1);
    color: var(--secondary-color);
}

/* Modales natives stylisées */
dialog {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--bg-card);
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

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

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

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

/* Sidebar navigation */
.nav-menu {
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section-title {
    padding: 0 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    gap: 0.75rem;
}

.nav-link:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.nav-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

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

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-change {
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.stat-change.positive {
    color: var(--success-color);
}

.stat-change.negative {
    color: var(--error-color);
}

/* Upload de fichiers */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-light);
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.upload-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

.upload-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    color: var(--text-secondary);
}

/* Progress bars */
.progress {
    background: var(--bg-light);
    border-radius: 9999px;
    height: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    background: var(--primary-color);
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 9999px;
}

.progress-bar.success {
    background: var(--success-color);
}

.progress-bar.warning {
    background: var(--warning-color);
}

.progress-bar.danger {
    background: var(--error-color);
}

/* Filtres et recherche */
.filters-bar {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.search-box {
    position: relative;
    max-width: 300px;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    width: 1rem;
    height: 1rem;
}

.search-input {
    padding-left: 2.5rem;
}

/* Actions en lot */
.bulk-actions {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: none;
}

.bulk-actions.active {
    display: flex;
    align-items: center;
    justify-content: between;
}

.bulk-count {
    font-weight: 500;
    color: var(--text-primary);
}

/* Pagination personnalisée */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    margin: 2rem 0;
}

.page-link {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    border-radius: var(--radius);
}

.page-link:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 90%;
        height: auto;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .admin-table {
        font-size: 0.875rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.5rem;
    }
    
    .modal-body {
        max-height: 50vh;
    }
}

@media (max-width: 480px) {
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    .form-control {
        padding: 0.5rem;
    }
}

/* Utilitaires */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Animation pour la modale d'expiration */
#expirationModal {
    animation: modalFadeIn 0.3s ease-out;
}

#expirationModal::backdrop {
    animation: backdropFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes backdropFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Style pour les boutons de la modale */
#expirationModal button:hover {
    transform: translateY(-1px);
}

#expirationModal .bg-yellow-50 {
    border-left: 4px solid #f59e0b;
}
/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #111827;
        --bg-card: #1F2937;
        --border-color: #374151;
        --text-primary: #F9FAFB;
        --text-secondary: #9CA3AF;
    }
}
/* Styles supplémentaires pour les modales de confirmation */
.modal-confirm .modal-body {
    padding: 1.5rem;
    text-align: center;
}

.modal-confirm .modal-footer {
    justify-content: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.modal-confirm .btn {
    min-width: 100px;
    margin: 0 0.5rem;
}

.modal-confirm .btn-danger {
    background-color: var(--error-color);
}

.modal-confirm .btn-secondary {
    background-color: var(--secondary-color);
}
/* Styles pour les modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 0;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.modal-header {
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #343a40;
}

.modal-close {
    font-size: 1.5rem;
    font-weight: bold;
    color: #6c757d;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0 0.5rem;
}

.modal-close:hover {
    color: #495057;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Animation pour l'ouverture de la modale */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal.show {
    display: block;
    animation: modalFadeIn 0.3s ease-out;
}
/* Styles pour le dashboard amélioré */
.quick-action-card {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Alertes améliorées */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left-color: #10b981;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left-color: #f59e0b;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left-color: #3b82f6;
}

/* Animation pour les éléments urgents */
@keyframes pulse-urgent {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.animate-pulse-urgent {
    animation: pulse-urgent 2s infinite;
}

/* Amélioration des cards statistiques */
.admin-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

/* Responsive amélioré */
@media (max-width: 768px) {
    .quick-action-card {
        padding: 0.75rem;
    }
    
    .quick-action-card .w-10 {
        width: 2rem;
        height: 2rem;
    }
    
    .grid.grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Indicateurs de tendance */
.trend-up {
    color: #10b981;
}

.trend-down {
    color: #ef4444;
}

.trend-neutral {
    color: #6b7280;
}
/* DASHBOARD COMPLET - STYLES AVANCÉS */

/* Variables CSS pour cohérence */
:root {
    --primary-color: #3b82f6;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #06b6d4;
    --purple-color: #8b5cf6;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-soft: 0 2px 15px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
}

/* Layout principal du dashboard */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Cartes de statistiques améliorées */
.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
    border-color: #e2e8f0;
}

/* Cartes d'actions rapides */
.quick-action-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    border: 1px solid #e5e7eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.quick-action-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.quick-action-card.urgent {
    border-color: #fca5a5;
    background: linear-gradient(135deg, #fff5f5 0%, #white 100%);
    animation: pulse-urgent 2s infinite;
}

/* Sections du dashboard */
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 1.5rem;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Métriques principales */
.stat-number {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

/* Indicateurs de tendance */
.trend-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    margin-top: 0.5rem;
}

.trend-up {
    background-color: #d1fae5;
    color: #065f46;
}

.trend-down {
    background-color: #fee2e2;
    color: #991b1b;
}

.trend-neutral {
    background-color: #f3f4f6;
    color: #4b5563;
}

/* Alertes améliorées */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left-color: var(--success-color);
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left-color: var(--warning-color);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left-color: var(--error-color);
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left-color: var(--info-color);
}

/* Boutons améliorés */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

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

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

.btn-outline {
    border-color: #d1d5db;
    color: #374151;
    background: white;
}

.btn-outline:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Barres de progression */
.progress-bar {
    width: 100%;
    height: 0.5rem;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.6s ease;
}

/* Top contenus */
.top-content-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.top-content-item:last-child {
    border-bottom: none;
}

.rank-badge {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    margin-right: 0.75rem;
}

.rank-1 { background: linear-gradient(135deg, #ffd700, #ffed4e); color: #92400e; }
.rank-2 { background: linear-gradient(135deg, #c0c0c0, #e5e7eb); color: #374151; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #d97706); color: white; }
.rank-other { background: #6b7280; }

/* Activité récente */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    background: var(--gradient-primary);
    flex-shrink: 0;
}

/* Responsive design */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .grid.grid-cols-6 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .grid.grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .stat-number {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.125rem;
    }
    
    .grid.grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .grid.grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .quick-action-card {
        padding: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
}

@media (max-width: 640px) {
    .dashboard-container {
        padding: 0 0.5rem;
    }
    
    .alert {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .grid.grid-cols-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Animations d'entrée */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse-urgent {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Classes utilitaires */
.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

.pulse-urgent {
    animation: pulse-urgent 2s infinite;
}

/* Scroll personnalisé */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Graphiques et visualisations */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

/* Header gradient */
.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--border-radius);
    padding: 2rem;
    color: white;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    opacity: 0.9;
    font-size: 1rem;
}

/* États de chargement */
.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; }
}

/* Dark mode support (optionnel) */
@media (prefers-color-scheme: dark) {
    .stat-card {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .quick-action-card {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
}
/* ===============================================
   SIDEBAR COLLAPSIBLE - Ajout au admin-styles.css
   =============================================== */

/* Variables CSS optimisées */
:root {
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --sidebar-transition: 0.3s ease-in-out;
    --touch-target-min: 44px;
    --mobile-padding: 0.75rem;
}

/* ===============================================
   LAYOUT PRINCIPAL ET ÉTATS DE SIDEBAR
   =============================================== */

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar States */
.sidebar {
    width: var(--sidebar-width);
    background: #1f2937;
    color: white;
    transition: all var(--sidebar-transition);
    position: relative;
    z-index: 60;
    flex-shrink: 0;
    overflow: hidden;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.hidden {
    width: 0;
    opacity: 0;
    pointer-events: none;
}

/* Adaptation du contenu principal */
.main-content {
    flex: 1;
    background: #f9fafb;
    transition: margin-left var(--sidebar-transition);
    margin-left: var(--sidebar-width);
    position: relative;
    min-height: 100vh;
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed);
}

.sidebar.hidden + .main-content {
    margin-left: 0;
}

/* ===============================================
   OVERLAY MOBILE
   =============================================== */

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 35;
    opacity: 0;
    visibility: hidden;
    transition: all var(--sidebar-transition);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===============================================
   PROFIL UTILISATEUR
   =============================================== */

.user-profile {
    padding: 1rem;
    border-bottom: 1px solid #374151;
    transition: all var(--sidebar-transition);
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    margin-right: 0.75rem;
    flex-shrink: 0;
    transition: margin-right var(--sidebar-transition);
}

.sidebar.collapsed .user-avatar {
    margin-right: 0;
}

.user-info {
    transition: all var(--sidebar-transition);
}

.sidebar.collapsed .user-info {
    opacity: 0;
    transform: translateX(-10px);
    pointer-events: none;
}

/* ===============================================
   NAVIGATION
   =============================================== */

.nav-menu {
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
    height: calc(100vh - 200px); /* Augmentez cette valeur */
    /* ou mieux : */
    max-height: calc(100vh - 200px);
    min-height: 0; /* Permet au flexbox de bien fonctionner */
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 1rem;
    margin-bottom: 0.5rem;
    transition: all var(--sidebar-transition);
}

.sidebar.collapsed .nav-section-title {
    opacity: 0;
    transform: translateX(-10px);
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-link:hover {
    background: #374151;
    color: white;
}

.nav-link.active {
    background: #3b82f6;
    color: white;
}

.nav-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
    transition: margin-right var(--sidebar-transition);
}

.sidebar.collapsed .nav-icon {
    margin-right: 0;
}

.nav-text {
    transition: all var(--sidebar-transition);
    white-space: nowrap;
    flex: 1;
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    transform: translateX(-10px);
    pointer-events: none;
}

.nav-badges {
    margin-left: auto;
    transition: all var(--sidebar-transition);
    display: flex;
    gap: 0.25rem;
}

.sidebar.collapsed .nav-badges {
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
}

/* ===============================================
   TOOLTIPS POUR MODE COLLAPSED
   =============================================== */

.nav-tooltip {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #1f2937;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    margin-left: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 60;
    border: 1px solid #374151;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.nav-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-right-color: #1f2937;
}

.sidebar.collapsed .nav-link:hover .nav-tooltip {
    opacity: 1;
    visibility: visible;
}

/* N'afficher les tooltips qu'en mode collapsed */
.sidebar:not(.collapsed) .nav-tooltip {
    display: none;
}

/* ===============================================
   BOUTON TOGGLE
   =============================================== */

.sidebar-toggle {
    position: fixed; /* Changé de fixed à absolute */
    top: 1rem;
    left: 1rem; /* Changé de left à right */
    z-index: 70;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: #f3f4f6;
    transform: scale(1.05);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.1);
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

.sidebar-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: #374151;
}
/* ===============================================
   RESPONSIVE MOBILE OPTIMISÉ
   =============================================== */

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        width: 250px !important; /* Largeur fixe au lieu de var(--sidebar-width) */
        max-width: 80vw; /* Maximum 80% de la largeur d'écran */
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: 60;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    }

    .sidebar.collapsed,
    .sidebar.hidden {
        width: var(--sidebar-width) !important;
        transform: translateX(-100%);
    }

    .sidebar.collapsed .nav-text,
    .sidebar.collapsed .nav-badges,
    .sidebar.collapsed .user-info,
    .sidebar.collapsed .nav-section-title {
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        height: auto !important;
        margin: inherit !important;
        padding: inherit !important;
        overflow: visible !important;
    }

    .sidebar.collapsed .nav-icon,
    .sidebar.collapsed .user-avatar {
        margin-right: 0.75rem !important;
    }

    .nav-tooltip {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: var(--mobile-padding);
    }

    .sidebar-toggle {
        left: 1rem !important;
        z-index: 70;
        width: var(--touch-target-min);
        height: var(--touch-target-min);
    }

    body.sidebar-mobile-open {
        overflow: hidden;
    }

    /* TABLEAUX - Scroll horizontal avec optimisations */
    .responsive-table,
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .responsive-table thead,
    .responsive-table tbody,
    .responsive-table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    .responsive-table th,
    .responsive-table td {
        padding: 0.5rem 0.375rem;
        font-size: 0.875rem;
        min-width: 80px; /* Largeur minimum par colonne */
    }

    /* Containers de tableaux */
    .table-container,
    .bg-white:has(table) {
        margin: 0 calc(-1 * var(--mobile-padding));
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    /* BOUTONS optimisés pour le tactile */
    .btn {
        min-height: var(--touch-target-min);
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        touch-action: manipulation;
    }

    .btn-sm {
        min-height: 40px;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    /* FORMULAIRES */
    input, select, textarea, .form-control {
        min-height: var(--touch-target-min);
        font-size: 16px; /* Évite le zoom iOS */
        padding: 0.75rem;
    }

    /* GRILLES adaptatives */
    .grid {
        gap: 0.75rem;
    }

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4,
    .grid-cols-5,
    .grid-cols-6,
    .grid-cols-7,
    .md\:grid-cols-2,
    .md\:grid-cols-3,
    .md\:grid-cols-4,
    .md\:grid-cols-5,
    .md\:grid-cols-6,
    .md\:grid-cols-7,
    .lg\:grid-cols-3,
    .lg\:grid-cols-4,
    .xl\:grid-cols-4 {
        grid-template-columns: 1fr;
    }

    /* HEADERS sticky */
    .admin-header {
        position: sticky;
        top: 0;
        z-index: 30;
        background: white;
        border-bottom: 1px solid #e5e7eb;
        padding: var(--mobile-padding);
        margin: calc(-1 * var(--mobile-padding)) calc(-1 * var(--mobile-padding)) var(--mobile-padding) calc(-1 * var(--mobile-padding));
    }

    .admin-title {
        font-size: 1.25rem;
    }

    /* CARTES avec moins de padding */
    .stat-card,
    .bg-white {
        padding: var(--mobile-padding);
    }

    /* FLEXBOX - Stack vertical sur mobile */
    .flex.space-x-4,
    .flex.space-x-3,
    .flex.space-x-2 {
        flex-direction: column;
        gap: 0.75rem;
    }

    .flex.space-x-4 > *,
    .flex.space-x-3 > *,
    .flex.space-x-2 > * {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* TABS navigation mobile */
    .tab-button {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
        min-height: var(--touch-target-min);
    }
}
/* ===============================================
   PETITS ÉCRANS (≤ 480px)
   =============================================== */

@media (max-width: 480px) {
    :root {
        --mobile-padding: 0.5rem;
    }

    .sidebar {
        width: 100vw !important;
    }

    .sidebar.collapsed,
    .sidebar.hidden {
        width: 100vw !important;
    }

    .responsive-table th,
    .responsive-table td {
        padding: 0.375rem 0.25rem;
        font-size: 0.75rem;
        min-width: 60px;
    }

    .btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }

    .admin-title {
        font-size: 1.125rem;
    }

    /* Grilles encore plus compactes */
    .grid {
        gap: 0.5rem;
    }

    /* Modals plein écran */
    .modal-content,
    .modal {
        margin: 0 !important;
        height: 100vh !important;
        max-height: none !important;
        border-radius: 0 !important;
        width: 100vw !important;
        max-width: none !important;
    }
}

/* ===============================================
   AMÉLIORATIONS UX
   =============================================== */

/* Animation d'entrée */
.sidebar {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Scroll personnalisé pour la navigation */
.nav-menu::-webkit-scrollbar {
    width: 4px;
}

.nav-menu::-webkit-scrollbar-track {
    background: transparent;
}

.nav-menu::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 2px;
}

.nav-menu::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Focus states pour l'accessibilité */
.nav-link:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

.sidebar-toggle:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* États de chargement */
.sidebar.loading {
    pointer-events: none;
}

.sidebar.loading .nav-link {
    opacity: 0.5;
}

/* ===============================================
   BADGES ET NOTIFICATIONS
   =============================================== */

.nav-badges .bg-yellow-500 {
    background-color: #eab308 !important;
    animation: pulse 2s infinite;
}

.nav-badges .bg-red-500 {
    background-color: #ef4444 !important;
    animation: pulse 2s infinite;
}

.nav-badges .bg-gray-500 {
    background-color: #6b7280 !important;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ===============================================
   ÉTATS SPÉCIAUX
   =============================================== */

/* Mode haute contraste */
@media (prefers-contrast: high) {
    .sidebar {
        border-right: 2px solid #374151;
    }
    
    .nav-link:hover {
        background: #000;
    }
    
    .nav-link.active {
        background: #1d4ed8;
    }
}

/* Mode mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .main-content,
    .nav-text,
    .nav-icon,
    .nav-badges,
    .user-info,
    .nav-section-title,
    .nav-tooltip,
    .sidebar-toggle {
        transition: none !important;
    }
    
    .sidebar {
        animation: none !important;
    }
}

/* ===============================================
   CLASSES UTILITAIRES
   =============================================== */

.sidebar-transition-fast {
    --sidebar-transition: 0.15s ease-out;
}

.sidebar-transition-slow {
    --sidebar-transition: 0.5s ease-in-out;
}

.sidebar-no-transition {
    transition: none !important;
}

.sidebar-no-transition * {
    transition: none !important;
}
/* ===============================================
   CLASSES UTILITAIRES TACTILES
   =============================================== */

/* Force touch-action pour de meilleures performances */
.btn,
button,
[role="button"],
.clickable {
    touch-action: manipulation;
}

/* Scroll horizontal amélioré */
.scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.scroll-x::-webkit-scrollbar {
    height: 8px;
}

.scroll-x::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.scroll-x::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.scroll-x::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* États focus améliorés pour mobile */
@media (max-width: 768px) {
    *:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
    }

    input:focus,
    select:focus,
    textarea:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 0;
        border-color: #3b82f6;
    }
}

/* Classes d'aide responsive */
.mobile-full-width {
    width: 100%;
}

@media (min-width: 769px) {
    .mobile-full-width {
        width: auto;
    }
}
.sidebar {
    display: flex;
    flex-direction: column;
}

.user-profile {
    flex-shrink: 0; /* Ne rétrécit pas */
}

.nav-menu {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 1rem 0;
}
.sidebar.collapsed .sidebar-logo-text {
    display: none;
}
/* ===============================================
   SYSTÈME DATA-LIST RESPONSIVE - ACTUALITÉS
   =============================================== */

/* Structure de base - Desktop (tableau) */
.data-list {
    width: 100%;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.data-list-header {
    display: grid;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: 0.05em;
}

.data-list-body {
    display: block;
}

.data-list-row {
    display: grid;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.15s ease;
}

.data-list-row:hover {
    background-color: #f9fafb;
}

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

.data-list-cell {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
}

/* Alignement des cellules */
.data-list-cell.cell-center {
    justify-content: center;
}

.data-list-cell.cell-right {
    justify-content: flex-end;
}

.data-list-cell.cell-left {
    justify-content: flex-start;
}

/* Configuration Grid pour actualites.php - Desktop */
.data-list.actualites-list .data-list-header,
.data-list.actualites-list .data-list-row {
    grid-template-columns: 40px 2.5fr 120px 120px 100px 150px 140px 180px;
    gap: 0.5rem;
}

/* Si colonne promotion absente */
.data-list.actualites-list.no-promote .data-list-header,
.data-list.actualites-list.no-promote .data-list-row {
    grid-template-columns: 40px 2.5fr 120px 120px 100px 150px 180px;
    gap: 0.5rem;
}

/* Taille photo desktop */
.photo-actu {
    width: 48px;
    height: 48px;
}

.titre-actu {
    font-size: 0.875rem;
    line-height: 1.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Desktop : Colonnes individuelles visibles, groupe masqué */
.data-list-cell[data-label="Type"],
.data-list-cell[data-label="Statut"], 
.data-list-cell[data-label="Vues"] {
    display: flex !important;
}

.data-list-cell-group {
    display: none !important;
}

.promotion-mobile {
    display: none !important;
}

/* ===============================================
   RESPONSIVE MOBILE - CARDS COMPACTES
   =============================================== */

@media (max-width: 768px) {
    /* Masquer header tableau */
    .data-list-header {
        display: none !important;
    }
    
    /* Masquer checkbox */
    .data-list-cell.cell-checkbox,
    #bulkActions {
        display: none !important;
    }
    
    /* Transformer rows en cards */
    .data-list-row {
        display: block !important;
        margin-bottom: 1rem;
        border: 1px solid #e5e7eb;
        border-top: 3px solid #3b82f6;
        border-radius: 0.5rem;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
        padding: 0.75rem;
        background: white;
    }
    
    /* Reset cellules */
    .data-list-cell {
        display: block;
        padding: 0;
        border: none;
    }
    
    /* MASQUER colonnes desktop séparées */
    .data-list-cell[data-label="Type"],
    .data-list-cell[data-label="Statut"],
    .data-list-cell[data-label="Vues"],
    .data-list-cell.cell-promotion-desktop {
        display: none !important;
    }
    
    /* AFFICHER groupes mobile */
    .data-list-cell-group {
        display: block !important;
    }
    
    .info-group-mobile {
        display: flex !important;
    }
    
    /* Photo + Titre compact */
    .photo-actu {
        width: 80px !important;
        height: 80px !important;
        min-width: 80px;
    }
    
    .data-list-cell.cell-chantre {
        order: -10;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .data-list-cell.cell-chantre > .flex {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
/* Container du titre + badges */
.data-list-cell.cell-chantre .flex-1 {
    flex: 1;
    min-width: 0;
    display: flex !important;
    flex-direction: column !important;
    max-height: 80px;
    height: 80px;
    overflow: hidden;
}

/* Titre limité en hauteur */
.titre-actu {
    font-size: 0.875rem !important;
    line-height: 1.25rem !important;
    font-weight: 600 !important;
    white-space: normal !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    word-wrap: break-word;
    max-height: 2.5rem;
    margin-bottom: 0.25rem;
}

/* Container des badges - UNE ligne horizontale FORCÉE */
.data-list-cell.cell-chantre .flex.items-center.mt-1 {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.25rem !important;
    margin-top: auto !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap !important;
    max-height: 1.5rem;
    align-items: center !important;
}

/* Chaque badge ne peut pas wrap */
.data-list-cell.cell-chantre .inline-flex.items-center {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
}

/* Scrollbar fine pour les badges */
.data-list-cell.cell-chantre .flex.items-center.mt-1::-webkit-scrollbar {
    height: 3px;
}

.data-list-cell.cell-chantre .flex.items-center.mt-1::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}
    
    .data-list-cell.cell-chantre .inline-flex.items-center {
        font-size: 0.625rem;
        padding: 0.125rem 0.375rem;
    }
    
    /* Type, Statut, Vues sur UNE ligne */
    .data-list-cell-group {
        padding: 0.375rem 0 !important;
        margin-bottom: 0;
    }
    
    .info-group-mobile {
        flex-wrap: wrap;
        align-items: center;
        gap: 0.375rem;
        font-size: 0.75rem;
    }
    
    .info-group-mobile .separator {
        color: #9ca3af;
    }
    
    /* Date/Programme */
    .data-list-cell[data-label="Date"] {
        display: block !important;
        padding: 0.25rem 0 0.5rem 0;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid #f3f4f6;
    }
    
    /* Afficher étoile promotion mobile */
    .promotion-mobile {
        display: inline-block !important;
    }
    
    /* Actions avec étoile en premier */
    .data-list-cell.cell-actions {
        order: 10;
        margin-top: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid #e5e7eb;
    }
    
    .data-list-cell.cell-actions .flex {
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 0.375rem;
        justify-content: flex-start;
    }
    
    .data-list-cell.cell-actions button,
    .data-list-cell.cell-actions a {
        min-height: 36px;
        min-width: 36px;
        padding: 0.375rem 0.5rem;
        font-size: 0.8125rem;
    }
}

/* Tablette (481px à 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .photo-actu {
        width: 100px !important;
        height: 100px !important;
    }
    
    .data-list-cell.cell-chantre .flex-1 {
        max-height: 100px;
    }
    
    .titre-actu {
        font-size: 0.9375rem !important;
        -webkit-line-clamp: 4;
        max-height: 5.2em;
    }
}

/* Petit mobile (≤ 480px) */
@media (max-width: 480px) {
    .data-list-row {
        padding: 0.625rem;
    }
    
    .photo-actu {
        width: 70px !important;
        height: 70px !important;
    }
    
    .data-list-cell.cell-chantre .flex-1 {
        max-height: 70px;
    }
}
/* ===============================================
   STATISTIQUES MOBILE OPTIMISÉES
   =============================================== */

@media (max-width: 768px) {
    /* Statistiques utilisateur : 3 par ligne */
    .grid.grid-cols-3.md\:grid-cols-4 {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
    }
    
    /* Statistiques admin : 3 par ligne */
    .grid.grid-cols-3.md\:grid-cols-6 {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
    }
    
    /* Cards statistiques compactes */
    .grid.grid-cols-3 > .bg-white {
        padding: 0.75rem 0.5rem !important;
    }
    
    /* Chiffres plus petits */
    .grid.grid-cols-3 .text-2xl {
        font-size: 1.5rem !important;
    }
    
    /* Icônes plus petites */
    .grid.grid-cols-3 .p-3 {
        padding: 0.5rem !important;
    }
    
    .grid.grid-cols-3 .w-6 {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
    
    /* Textes plus petits */
    .grid.grid-cols-3 .text-sm {
        font-size: 0.75rem !important;
        line-height: 1rem !important;
    }
}

@media (max-width: 480px) {
    /* Encore plus compact sur petits écrans */
    .grid.grid-cols-3 {
        gap: 0.375rem !important;
    }
    
    .grid.grid-cols-3 > .bg-white {
        padding: 0.5rem 0.375rem !important;
    }
    
    .grid.grid-cols-3 .text-2xl {
        font-size: 1.25rem !important;
    }
    
    .grid.grid-cols-3 .text-sm {
        font-size: 0.625rem !important;
    }
}
/* ===============================================
   FILTRES MOBILE - 3 COLONNES
   =============================================== */

@media (max-width: 768px) {
    /* Container formulaire */
    form .flex.flex-col.md\:flex-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    /* Groupe recherche : pleine largeur */
    form .flex-1.w-full.md\:max-w-xs {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    form .flex-1.w-full.md\:max-w-xs label {
        font-size: 0.75rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    form .flex-1.w-full.md\:max-w-xs input {
        font-size: 0.875rem !important;
        padding: 0.5rem !important;
    }
    
    form .flex-1.w-full.md\:max-w-xs button {
        padding: 0.5rem 0.75rem !important;
    }
    
    /* Ligne 2 : Statut | Type | Auteur (3 colonnes) */
    form .grid.grid-cols-2.md\:flex,
    form .grid.grid-cols-1.md\:grid-cols-3 {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.375rem !important;
        width: 100% !important;
        margin-top: 0 !important;
    }
    
    /* Premier select Auteur en 3ème position */
    form .grid.grid-cols-1.md\:grid-cols-3 > div:first-child {
        order: 0;
    }
    
    /* Les dates Du et Au en ligne 3 */
    form .grid.grid-cols-1.md\:grid-cols-3 > div:nth-child(2),
    form .grid.grid-cols-1.md\:grid-cols-3 > div:nth-child(3) {
        order: 1;
    }
    
    /* Labels compacts */
    form .grid.grid-cols-2.md\:flex label,
    form .grid.grid-cols-1.md\:grid-cols-3 label {
        font-size: 0.7rem !important;
        margin-bottom: 0.25rem !important;
        font-weight: 500;
    }
    
    /* Selects et inputs compacts */
    form .grid.grid-cols-2.md\:flex select,
    form .grid.grid-cols-1.md\:grid-cols-3 select,
    form .grid.grid-cols-1.md\:grid-cols-3 input[type="date"] {
        font-size: 0.75rem !important;
        padding: 0.5rem 0.25rem !important;
        width: 100% !important;
    }
    
    /* Ligne 3 : Du | Au | Réinitialiser */
    form .w-full.md\:w-auto {
        width: auto !important;
    }
    
    form .w-full.md\:w-auto a.btn-secondary {
        width: 100% !important;
        padding: 0.5rem 0.25rem !important;
        font-size: 0.75rem !important;
        display: block !important;
        text-align: center !important;
    }
    
    /* Cacher le label invisible */
    form .w-full.md\:w-auto label {
        display: none !important;
    }
    
    /* Badges compacts */
    form + * .flex.flex-wrap span {
        font-size: 0.6875rem !important;
        padding: 0.25rem 0.5rem !important;
    }
}

@media (max-width: 480px) {
    /* Plus petit sur très petits écrans */
    form .grid.grid-cols-2.md\:flex label,
    form .grid.grid-cols-1.md\:grid-cols-3 label {
        font-size: 0.625rem !important;
    }
    
    form .grid.grid-cols-2.md\:flex select,
    form .grid.grid-cols-1.md\:grid-cols-3 select,
    form .grid.grid-cols-1.md\:grid-cols-3 input {
        font-size: 0.6875rem !important;
        padding: 0.375rem 0.125rem !important;
    }
    
    form .w-full.md\:w-auto a.btn-secondary {
        font-size: 0.6875rem !important;
    }
}