/* ============================================
   CSS PARTAGÉ POUR TOUTES LES PAGES CLIENT/USER
   ============================================ */

/* Container principal standardisé */
.user-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* Header de page standardisé */
.user-page-header {
    margin-bottom: 1.5rem;
}

.user-page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.user-page-header p {
    color: #64748b;
    font-size: 0.9375rem;
    margin: 0;
}

/* Cartes standardisées */
.user-card {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    padding: 1.25rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    position: relative;
}

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

.user-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.user-card-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0.25rem 0 0 0;
}

/* Container pour listes de cartes */
.user-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.user-cards-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Stats compactes */
.user-stats-compact {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.user-stat-item {
    background: white;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.user-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

.user-stat-value.highlight {
    color: #667eea;
}

/* Boutons standardisés */
.user-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    box-sizing: border-box;
}

.user-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.user-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.user-btn-secondary {
    background: white;
    color: #475569;
    border: 1px solid #e5e7eb;
}

.user-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.user-btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* Badges */
.user-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.user-badge-primary {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.user-badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

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

.user-badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* États vides */
.user-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

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

.user-empty-state h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
}

.user-empty-state p {
    color: #64748b;
    font-size: 0.9375rem;
    margin: 0 0 1.5rem 0;
}

/* Loading */
.user-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #64748b;
}

.user-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Messages d'erreur/succès */
.user-message {
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.user-message-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.user-message-error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.user-message-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Layout en deux colonnes : contenu + actions rapides */
.user-page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}

.user-page-content {
    min-width: 0; /* Permet au contenu de se rétrécir */
}

/* Actions rapides sur le côté */
.quick-actions-sidebar {
    position: sticky;
    top: 1rem;
}

.sidebar-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quick-actions-compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.action-btn-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: white;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.action-btn-compact:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
    border-color: transparent;
}

.action-icon-small {
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .user-page-container {
        padding: 0.75rem;
    }

    .user-page-layout {
        grid-template-columns: 1fr;
    }

    .quick-actions-sidebar {
        position: static;
        order: -1; /* Actions rapides en haut sur mobile */
    }

    .quick-actions-compact {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .action-btn-compact {
        flex: 1;
        min-width: 150px;
    }

    .user-cards-grid {
        grid-template-columns: 1fr;
    }

    .user-stats-compact {
        flex-direction: column;
    }

    .user-stat-item {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .user-page-header h1 {
        font-size: 1.5rem;
    }

    .user-card {
        padding: 1rem;
    }
}

