/**
 * Styles pour les états vides (Empty States)
 * XP Academy - XP Evolution
 * 
 * Design moderne et cohérent pour les messages de tables vides
 */

/* ============================================================
   CONTENEUR PRINCIPAL
   ============================================================ */
.empty-state {
    max-width: 600px;
    margin: 3rem auto;
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.1));
}

/* Variantes de couleur selon le type d'alerte */
.empty-state.alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #f5f5f5 100%);
    border-left: 4px solid #2196F3;
}

.empty-state.alert-warning {
    background: linear-gradient(135deg, #fff3e0 0%, #f5f5f5 100%);
    border-left: 4px solid #ff9800;
}

.empty-state.alert-success {
    background: linear-gradient(135deg, #e8f5e9 0%, #f5f5f5 100%);
    border-left: 4px solid #4caf50;
}

.empty-state.alert-danger {
    background: linear-gradient(135deg, #ffebee 0%, #f5f5f5 100%);
    border-left: 4px solid #f44336;
}

/* ============================================================
   ICÔNE/EMOJI
   ============================================================ */
.empty-state > div:first-child {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 1.5rem;
    opacity: 0.8;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ============================================================
   TITRE
   ============================================================ */
.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary, #212529);
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* ============================================================
   DESCRIPTION (optionnelle)
   ============================================================ */
.empty-state p {
    font-size: 1rem;
    color: var(--text-secondary, #6c757d);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ============================================================
   BOUTON D'ACTION
   ============================================================ */
.empty-state .btn {
    margin-top: 1rem;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.empty-state .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.empty-state {
    animation: fadeIn 0.5s ease-out;
}

/* Animation au survol pour rendre interactif */
.empty-state:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* ============================================================
   VARIANTES COMPACTES
   ============================================================ */
.empty-state-compact {
    max-width: 400px;
    padding: 2rem 1.5rem;
    margin: 2rem auto;
}

.empty-state-compact > div:first-child {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state-compact h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* ============================================================
   VARIANTES INLINE (pour widgets/cards)
   ============================================================ */
.empty-state-inline {
    max-width: 100%;
    padding: 2rem 1rem;
    margin: 1rem 0;
    background: transparent;
    box-shadow: none;
}

.empty-state-inline > div:first-child {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.empty-state-inline h3 {
    font-size: 1rem;
    font-weight: 500;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .empty-state {
        padding: 2rem 1rem;
        margin: 2rem 1rem;
    }
    
    .empty-state > div:first-child {
        font-size: 3rem;
    }
    
    .empty-state h3 {
        font-size: 1.25rem;
    }
    
    .empty-state p {
        font-size: 0.9375rem;
    }
}

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

/* État de chargement */
.empty-state-loading {
    position: relative;
}

.empty-state-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(33, 150, 243, 0.2);
    border-top-color: #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* État avec illustration */
.empty-state-illustration {
    background: white;
    border: 2px dashed var(--border-color, #dee2e6);
}

.empty-state-illustration > div:first-child {
    filter: grayscale(100%);
    opacity: 0.5;
}

/* ============================================================
   DARK MODE
   ============================================================ */
@media (prefers-color-scheme: dark) {
    .empty-state {
        background: var(--bg-dark, #1a1a1a);
        color: var(--text-dark, #e0e0e0);
    }
    
    .empty-state h3 {
        color: var(--text-dark, #e0e0e0);
    }
    
    .empty-state p {
        color: var(--text-secondary-dark, #a0a0a0);
    }
    
    .empty-state.alert-info {
        background: linear-gradient(135deg, #1e3a5f 0%, #1a1a1a 100%);
    }
    
    .empty-state.alert-warning {
        background: linear-gradient(135deg, #4a3520 0%, #1a1a1a 100%);
    }
    
    .empty-state.alert-success {
        background: linear-gradient(135deg, #1e3a2f 0%, #1a1a1a 100%);
    }
    
    .empty-state.alert-danger {
        background: linear-gradient(135deg, #4a2020 0%, #1a1a1a 100%);
    }
}

/* ============================================================
   ACCESSIBILITÉ
   ============================================================ */

/* Focus visible pour les boutons */
.empty-state .btn:focus {
    outline: 3px solid var(--primary, #2196F3);
    outline-offset: 2px;
}

/* Réduction du mouvement pour les utilisateurs sensibles */
@media (prefers-reduced-motion: reduce) {
    .empty-state,
    .empty-state > div:first-child {
        animation: none;
    }
    
    .empty-state:hover {
        transform: none;
    }
}

/* ============================================================
   UTILITIES SPÉCIFIQUES
   ============================================================ */

/* Liste d'actions multiples */
.empty-state-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Lien secondaire sous le bouton principal */
.empty-state-secondary-link {
    display: block;
    margin-top: 1rem;
    color: var(--text-secondary, #6c757d);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.empty-state-secondary-link:hover {
    color: var(--primary, #2196F3);
    text-decoration: underline;
}

/* Liste de suggestions/options */
.empty-state-suggestions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color, #dee2e6);
}

.empty-state-suggestions h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary, #6c757d);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.empty-state-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.empty-state-suggestions li {
    margin-bottom: 0.5rem;
}

.empty-state-suggestions a {
    color: var(--primary, #2196F3);
    text-decoration: none;
    transition: color 0.2s ease;
}

.empty-state-suggestions a:hover {
    color: var(--primary-dark, #1976d2);
    text-decoration: underline;
}

/* ============================================================
   ÉTATS POUR CONTEXTES SPÉCIFIQUES
   ============================================================ */

/* Dashboard widgets */
.dashboard-widget .empty-state {
    padding: 1.5rem 1rem;
    margin: 0;
    box-shadow: none;
    background: transparent;
}

.dashboard-widget .empty-state > div:first-child {
    font-size: 2rem;
}

/* Modals */
.modal .empty-state {
    margin: 1rem 0;
    box-shadow: none;
}

/* Tables */
.table-empty-state {
    padding: 3rem 2rem;
    text-align: center;
}

.table-empty-state > div:first-child {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.table-empty-state h3 {
    font-size: 1.125rem;
    color: var(--text-secondary, #6c757d);
    font-weight: 500;
    margin: 0;
}
