/**
 * Bundle Competences/Hobbies — Onglets profil utilisateur
 * Sources : competences + hobbies
 * Sprint 4 — Consolidation CSS
 */

/* ============================================================
 * SOURCE: competences.css
 * ============================================================ */
/* ============================================
   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;
}

/* ============================================================
 * SOURCE: hobbies.css
 * ============================================================ */
/* ============================================
   STYLES POUR L'ONGLET LOISIRS - BookConnect
   ============================================ */

/* Cartes de loisirs */
.hobby-card {
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

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

.hobby-card h6.hobby-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.hobby-card.category-1 { border-left-color: #FF6B6B; } /* Lecture & Littérature */
.hobby-card.category-2 { border-left-color: #4ECDC4; } /* Écriture & Création */
.hobby-card.category-3 { border-left-color: #45B7D1; } /* Critique & Analyse */
.hobby-card.category-4 { border-left-color: #FFA07A; } /* Édition & Publication */
.hobby-card.category-5 { border-left-color: #98D8C8; } /* Bibliophilie & Collection */
.hobby-card.category-6 { border-left-color: #F7DC6F; } /* Événements Littéraires */
.hobby-card.category-7 { border-left-color: #BB8FCE; } /* Promotion & Marketing */
.hobby-card.category-8 { border-left-color: #85C1E2; } /* Traduction & Langues */
.hobby-card.category-9 { border-left-color: #F8B4D9; } /* Arts & Illustration */
.hobby-card.category-10 { border-left-color: #95D4D2; } /* Numérique & Innovation */

/* Badge catégorie */
.hobby-category-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.7rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    /* Les couleurs sont définies inline depuis PHP */
}

/* Niveau d'intérêt (étoiles) */
.hobby-rating {
    color: #FFD700;
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.hobby-rating .star {
    display: inline-block;
    transition: transform 0.2s;
}

.hobby-rating .star:hover {
    transform: scale(1.2);
}

.hobby-rating .star.filled {
    color: #FFD700;
}

.hobby-rating .star.empty {
    color: #E0E0E0;
}

/* Statistiques */
.hobby-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;
}

/* Utilisateurs avec loisirs communs */
.common-hobbies-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.common-hobbies-card:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.common-hobbies-count {
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
}

/* Filtres et recherche */
.hobby-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);
}

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

.hobby-filters .form-select,
.hobby-filters .form-control {
    border: 1px solid #ced4da;
    font-size: 0.95rem;
}

.hobby-filters .text-muted {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d !important;
}

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

.hobby-search-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Graphique */
.chart-container {
    position: relative;
    height: 300px;
    margin: 2rem 0;
}

/* Badges d'achievements */
.achievement-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 25px;
    font-weight: bold;
    margin: 0.25rem;
    transition: transform 0.2s;
}

.achievement-badge:hover {
    transform: scale(1.05);
}

.achievement-badge.locked {
    background: #dee2e6;
    color: #6c757d;
    opacity: 0.6;
}

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

/* Modal d'ajout de loisir */
.hobby-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0;
}

.category-select-option {
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    margin: 0.5rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-select-option:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.category-select-option.selected {
    border-color: #007bff;
    background-color: #e7f3ff;
}

/* Hobby item options dans le modal (étape 2) */
.hobby-item-option {
    padding: 0.6rem 0.9rem;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.hobby-item-option:hover {
    border-color: #007bff;
    background-color: #f0f6ff;
}

.hobby-item-option.selected {
    border-color: #007bff;
    background-color: #e7f3ff;
    font-weight: 600;
}

.hobby-item-option .hobby-item-check {
    color: transparent;
    transition: color 0.2s;
    font-size: 0.85rem;
}

.hobby-item-option.selected .hobby-item-check {
    color: #007bff;
}

.hobby-custom-option .category-select-option {
    border-style: dashed;
}

.hobby-custom-option .category-select-option.selected {
    border-style: solid;
    border-color: #007bff;
    background-color: #e7f3ff;
}

/* Rating interactif */
.rating-input {
    display: inline-flex;
    gap: 0.25rem;
}

.rating-input .star-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #E0E0E0;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.rating-input .star-btn:hover,
.rating-input .star-btn.active {
    color: #FFD700;
    transform: scale(1.2);
}

/* Temps estimé */
.time-estimate {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background-color: #e7f3ff;
    border-radius: 15px;
    font-size: 0.875rem;
    color: #0056b3;
}

/* Tags */
.hobby-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #f1f3f5;
    border-radius: 15px;
    font-size: 0.75rem;
    margin: 0.25rem;
    color: #495057;
}

.hobby-tag:hover {
    background-color: #007bff;
    color: white;
}

/* Actions sur les cartes */
.hobby-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.hobby-actions .btn {
    font-size: 0.875rem;
}

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

.hobby-card {
    animation: fadeInUp 0.4s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .stat-box {
        margin-bottom: 1rem;
    }
    
    .hobby-filters {
        padding: 0.75rem;
    }
    
    .hobby-actions {
        flex-direction: column;
    }
    
    .hobby-actions .btn {
        width: 100%;
    }
}

/* État vide */
.empty-hobbies {
    text-align: center;
    padding: 3rem 1rem;
}

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

.empty-hobbies-text {
    color: #6c757d;
    margin-bottom: 1.5rem;
}
