/* Styles pour la page network.php */

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

/* En-tête de la page */
.network-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.network-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
}

.network-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
}

/* Statistiques rapides */
.network-stats {
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Navigation par onglets */
.network-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 2rem;
}

.network-tabs .nav-link {
    border: none;
    color: #666;
    font-weight: 500;
    padding: 1rem 1.5rem;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
}

.network-tabs .nav-link:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.network-tabs .nav-link.active {
    background-color: #667eea;
    color: white;
    border-bottom: 2px solid #667eea;
}

.network-tabs .nav-link i {
    margin-right: 0.5rem;
}

/* Contenu des onglets */
.network-content {
    background: white;
    border-radius: 0 0 12px 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-header h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #666;
    margin: 0;
}

/* Grille des utilisateurs */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.user-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.user-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.user-card.pending {
    border-left: 4px solid #ffc107;
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}

.user-avatar {
    position: relative;
    margin-bottom: 1rem;
}

.avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.user-card:hover .avatar-img {
    border-color: #667eea;
}

.status-badge {
    position: absolute;
    top: -5px;
    right: 20px;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-pending {
    background-color: #ffc107;
    color: #212529;
}

.badge-sent {
    background-color: #17a2b8;
    color: white;
}

.user-info h5 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-weight: 600;
}

.user-role {
    color: #667eea;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
}

.user-date {
    color: #666;
    font-size: 0.85rem;
    margin: 0 0 1rem 0;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.user-actions .btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.user-actions .btn:hover {
    transform: translateY(-1px);
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

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

.empty-state h4 {
    margin-bottom: 1rem;
    color: #333;
}

.empty-state p {
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .network-container {
        padding: 160px 1rem 2rem 1rem;
    }

    .network-header {
        padding: 1.5rem;
        text-align: center;
    }

    .network-header .d-flex {
        flex-direction: column;
        gap: 1rem;
    }

    .network-header h1 {
        font-size: 1.5rem;
    }

    .network-stats .row {
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

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

    .users-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .user-card {
        padding: 1rem;
    }

    .user-actions {
        flex-direction: column;
    }

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

    .network-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .network-content {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .network-header h1 {
        font-size: 1.25rem;
    }

    .avatar-img {
        width: 60px;
        height: 60px;
    }

    .network-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }

    .network-tabs .nav-item {
        display: inline-block;
    }

    .network-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

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

.user-card {
    animation: fadeInUp 0.3s ease-out;
}

.user-card:nth-child(2) { animation-delay: 0.1s; }
.user-card:nth-child(3) { animation-delay: 0.2s; }
.user-card:nth-child(4) { animation-delay: 0.3s; }
.user-card:nth-child(5) { animation-delay: 0.4s; }
.user-card:nth-child(6) { animation-delay: 0.5s; }

/* Styles pour la vue globale admin */
.badge-top {
    background-color: #ffd700;
    color: #333;
    font-weight: bold;
}

.user-stats {
    margin-top: 0.5rem;
}

.user-stats .badge {
    margin-right: 0.25rem;
    font-size: 0.75rem;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.table td {
    vertical-align: middle;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* Vue admin - statistiques globales */
.network-header h1 {
    font-size: 1.8rem;
}

/* Styles pour uniformiser les boutons dans l'en-tête */
.btn-uniform {
    width: 160px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    font-size: 14px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.header-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.header-buttons .btn-group {
    display: flex !important;
    gap: 0 !important;
}

.header-buttons .btn-group .btn-uniform:first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.header-buttons .btn-group .btn-uniform:last-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-left: 0 !important;
}

/* Amélioration de l'en-tête et des boutons */
.network-header .d-flex {
    gap: 0.75rem;
}

.network-header .btn {
    white-space: nowrap;
    transition: all 0.3s ease;
}

.network-header .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    font-weight: 600;
}

.network-header .btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea080 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.network-header .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.network-header .btn-group .btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.network-header .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.network-header .btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
}

@media (max-width: 768px) {
    .network-header .d-flex {
        flex-direction: column;
        align-items: stretch !important;
        gap: 1rem;
    }
    
    .network-header .btn-group {
        display: flex;
        flex-direction: row;
        justify-content: center;
    }
    
    .network-header .btn-group .btn {
        flex: 1;
        border-radius: 6px !important;
    }
    
    .network-header .btn-lg {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        order: -1; /* Place le bouton retour en premier sur mobile */
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .btn-group .btn {
        border-radius: 6px !important;
        margin-bottom: 0.25rem;
    }
}

@media (max-width: 576px) {
    .network-header .btn-group {
        flex-direction: column;
    }
    
    .network-header .btn-group .btn {
        margin-bottom: 0.5rem;
    }
    
    .network-header .btn span {
        display: inline !important; /* Affiche le texte sur très petit écran */
    }
}

/* Boutons personnalisés */
.btn-outline-primary:hover {
    background-color: #667eea;
    border-color: #667eea;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-warning:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}
