/* =============================================
   Styles pour le lexique professionnel
   ============================================= */

/* Header du lexique */
.lexique-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    color: white;
    padding: 4rem 0 3rem;
    margin-bottom: 3rem;
}

.lexique-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.lexique-hero .lead {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
}

/* Barre de recherche */
.lexique-search {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: -40px;
    position: relative;
    z-index: 10;
}

.search-form {
    position: relative;
}

.search-form input {
    padding: 15px 50px 15px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.search-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-form button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-form button:hover {
    background: #5a67d8;
    transform: translateY(-50%) scale(1.05);
}

/* Index alphabétique */
.alphabet-index {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.alphabet-index a {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    margin: 3px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.alphabet-index a:hover,
.alphabet-index a.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.alphabet-index a.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Cartes de catégories */
.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.category-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card .icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.category-card p {
    color: var(--gray-text);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.category-card .count {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

/* Liste des termes */
.terms-list {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.term-item {
    padding: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.term-item:last-child {
    border-bottom: none;
}

.term-item:hover {
    background: #f8f9fa;
    padding-left: 1.75rem;
}

.term-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.term-title {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex: 1;
}

.term-acronym {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 80px;
}

.term-full {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.term-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-importance-essentiel {
    background: #fee2e2;
    color: #dc2626;
}

.badge-importance-important {
    background: #fef3c7;
    color: #d97706;
}

.badge-importance-complementaire {
    background: #dbeafe;
    color: #2563eb;
}

.badge-category {
    background: #f3f4f6;
    color: #4b5563;
}

.term-definition {
    color: var(--gray-text);
    line-height: 1.6;
    margin-top: 0.5rem;
}

.term-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 1rem;
}

.term-actions a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.term-actions a:hover {
    text-decoration: underline;
}

/* Page de détail d'un terme */
.term-detail {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.term-detail-header {
    margin-top: -2rem;
}

h1.term-detail-title,
.term-detail-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.term-detail-acronym {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.term-detail-full {
    font-size: 1.8rem;
    color: var(--text-dark);
    font-weight: 500;
}

.term-sections {
    display: grid;
    gap: 2rem;
}

.term-section {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
    margin-bottom: 20px;
}

.term-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.term-section h3 i {
    color: var(--primary);
    font-size: 1rem;
}

.term-section p,
.term-section ul {
    color: var(--gray-text);
    line-height: 1.7;
}

.term-section ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

/* Relations entre termes */
.term-relations {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
}

.relations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.relation-card {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.relation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.relation-type {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.relation-term {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
}

.relation-term:hover {
    color: var(--primary);
}

/* Sidebar */
.lexique-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
}

.sidebar-widget h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.popular-terms-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-terms-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.popular-terms-list li:last-child {
    border-bottom: none;
}

.popular-terms-list a {
    color: var(--gray-text);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.popular-terms-list a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.term-views {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Filtres */
.filters-bar {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.filter-label {
    font-size: 0.9rem;
    color: var(--gray-text);
    font-weight: 500;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .lexique-hero h1 {
        font-size: 2rem;
    }
    
    .alphabet-index a {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 0.9rem;
    }
    
    .term-detail-title {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .term-detail-acronym {
        font-size: 1.5rem;
    }
    
    .term-detail-full {
        font-size: 1.2rem;
    }
    
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
    }
    
    .filter-select {
        width: 100%;
    }
}