/* ============================================
   STYLES POUR L'ONGLET COMPÉTENCES - BookConnect
   ============================================ */

/* Cartes de compétences */
.competence-card {
    border-left: 4px solid #6c757d;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.competence-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.competence-card .card-body {
    padding: 1.5rem;
}

.competence-card h6.competence-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Couleurs par catégorie */
.competence-card.category-1 { border-left-color: #FF6B6B; } /* Écriture & Rédaction */
.competence-card.category-2 { border-left-color: #4ECDC4; } /* Édition & Correction */
.competence-card.category-3 { border-left-color: #95E1D3; } /* Marketing & Communication */
.competence-card.category-4 { border-left-color: #F38181; } /* Design & Arts visuels */
.competence-card.category-5 { border-left-color: #AA96DA; } /* Traduction & Langues */
.competence-card.category-6 { border-left-color: #5DADE2; } /* Technique & Numérique */
.competence-card.category-7 { border-left-color: #F8B500; } /* Gestion & Organisation */
.competence-card.category-8 { border-left-color: #48C9B0; } /* Vente & Distribution */
.competence-card.category-9 { border-left-color: #85929E; } /* Juridique & Administratif */
.competence-card.category-10 { border-left-color: #EC7063; } /* Formation & Pédagogie */

/* Badge catégorie */
.competence-category-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.7rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: #495057 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Badges de niveau */
.niveau-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.875rem;
}

.niveau-1 { background-color: #E0E0E0; color: #5D6D7E; } /* Débutant - Gris */
.niveau-2 { background-color: #D6EAF8; color: #2874A6; } /* Intermédiaire - Bleu */
.niveau-3 { background-color: #D5F4E6; color: #117A65; } /* Confirmé - Vert */
.niveau-4 { background-color: #FCF3CF; color: #D68910; } /* Expert - Orange */
.niveau-5 { background-color: #FADBD8; color: #C0392B; } /* Maître - Rouge */

/* Barre de progression de niveau */
.niveau-progress {
    height: 6px;
    background-color: #E9ECEF;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.niveau-progress-bar {
    height: 100%;
    transition: width 0.6s ease;
    border-radius: 10px;
}

.niveau-progress-bar.niveau-1 { width: 20%; background-color: #5D6D7E; }
.niveau-progress-bar.niveau-2 { width: 40%; background-color: #2874A6; }
.niveau-progress-bar.niveau-3 { width: 60%; background-color: #117A65; }
.niveau-progress-bar.niveau-4 { width: 80%; background-color: #D68910; }
.niveau-progress-bar.niveau-5 { width: 100%; background-color: #C0392B; }

/* Statistiques */
.competence-stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.stat-box {
    text-align: center;
    padding: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-box:last-child {
    border-right: none;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    display: block;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 1;
    display: block;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Actions sur les cartes */
.competence-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.competence-actions .btn {
    flex: 1;
}

/* Filtres et recherche */
.competence-filters {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.competence-filters label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.competence-search-input {
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    border: 1px solid #dee2e6;
}

.competence-search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Étoiles de niveau (sélecteur visuel) */
.star-rating {
    display: flex;
    gap: 0.25rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.star-rating .star {
    color: #ddd;
    transition: color 0.2s ease;
}

.star-rating .star.filled,
.star-rating .star:hover,
.star-rating .star:hover ~ .star {
    color: #FFD700;
}

.star-rating .star:hover ~ .star {
    color: #ddd;
}

/* Description de compétence */
.competence-description {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Expérience */
.experience-badge {
    background-color: #E8F8F5;
    color: #117A65;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Validation */
.validation-badge {
    background-color: #FEF9E7;
    color: #D68910;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.validation-badge.validated {
    background-color: #D5F4E6;
    color: #117A65;
}

/* Badges de gamification */
.achievement-badge {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    margin: 0.5rem;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.achievement-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.achievement-badge.locked {
    background: #E0E0E0;
    color: #999;
    opacity: 0.6;
}

.achievement-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

/* Graphique radar */
.competence-chart-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 1rem;
}

/* Modal personnalisé */
.modal-competence .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-competence .modal-body {
    padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .competence-card h6.competence-name {
        font-size: 0.95rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .competence-actions {
        flex-direction: column;
    }
}

/* Animation d'ajout */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.competence-card.new-item {
    animation: slideInUp 0.5s ease;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

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

.empty-state p {
    color: #adb5bd;
}
