/* ==========================================================================
   JULAKANFO — DESIGN SYSTEM PUBLIC (jlk-public.css)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Colors */
    --jlk-bg-primary: #0b0f19;
    --jlk-bg-secondary: #131a2c;
    --jlk-card-bg: rgba(30, 41, 59, 0.45);
    --jlk-card-border: rgba(255, 255, 255, 0.08);
    
    --jlk-brand: #e8620a;
    --jlk-brand-hover: #cf5405;
    --jlk-brand-glow: rgba(232, 98, 10, 0.25);
    
    --jlk-text: #f8fafc;
    --jlk-text-muted: #94a3b8;
    
    --jlk-success: #10b981;
    --jlk-success-bg: rgba(16, 185, 129, 0.15);
    --jlk-error: #f43f5e;
    
    --jlk-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --jlk-radius: 16px;
    --jlk-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.jlk-dictionary-wrapper {
    font-family: 'Outfit', sans-serif;
    background-color: var(--jlk-bg-primary);
    color: var(--jlk-text);
    padding: 30px;
    border-radius: var(--jlk-radius);
    box-shadow: var(--jlk-shadow);
    max-width: 1200px;
    margin: 40px auto;
    border: 1px solid var(--jlk-card-border);
}

/* Header */
.jlk-dict-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--jlk-card-border);
    padding-bottom: 24px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.jlk-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 6px 0;
    background: linear-gradient(135deg, #fff 0%, var(--jlk-text-muted) 50%, var(--jlk-brand) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.jlk-title span {
    font-weight: 400;
    font-size: 1.5rem;
    color: var(--jlk-text-muted);
    display: inline-block;
    margin-left: 10px;
}

.jlk-subtitle {
    color: var(--jlk-text-muted);
    margin: 0;
    font-size: 1rem;
}

/* Stats */
.jlk-stats-badge {
    display: flex;
    gap: 15px;
    background: var(--jlk-bg-secondary);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid var(--jlk-card-border);
}

.jlk-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jlk-stat-icon {
    font-size: 1.4rem;
}

.jlk-stat-details {
    display: flex;
    flex-direction: column;
}

.jlk-stat-val {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    line-height: 1;
}

.jlk-stat-lbl {
    font-size: 0.75rem;
    color: var(--jlk-text-muted);
    text-transform: uppercase;
}

.jlk-guest-badge {
    background: rgba(232, 98, 10, 0.1);
    border: 1px solid rgba(232, 98, 10, 0.2);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
}

.jlk-guest-badge a {
    color: var(--jlk-brand);
    font-weight: 700;
    text-decoration: none;
}

.jlk-guest-badge a:hover {
    text-decoration: underline;
}

/* Grid Layout */
.jlk-dict-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .jlk-dict-grid {
        grid-template-columns: 1fr;
    }
}

/* Navigation Tabs */
.jlk-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--jlk-card-border);
    padding-bottom: 10px;
}

.jlk-tab-btn {
    background: none;
    border: none;
    color: var(--jlk-text-muted);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--jlk-transition);
}

.jlk-tab-btn:hover, .jlk-tab-btn.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

.jlk-tab-btn.active {
    box-shadow: 0 2px 0 var(--jlk-brand);
    border-radius: 8px 8px 0 0;
}

.jlk-tab-content {
    display: none;
}

.jlk-tab-content.active {
    display: block;
}

/* Search Box */
.jlk-search-container {
    margin-bottom: 25px;
}

.jlk-search-box {
    display: flex;
    align-items: center;
    background-color: var(--jlk-bg-secondary);
    border: 1px solid var(--jlk-card-border);
    border-radius: 12px;
    padding: 6px 16px;
    transition: var(--jlk-transition);
}

.jlk-search-box:focus-within {
    border-color: var(--jlk-brand);
    box-shadow: 0 0 10px var(--jlk-brand-glow);
}

.jlk-search-icon {
    font-size: 1.2rem;
    margin-right: 12px;
    color: var(--jlk-text-muted);
}

#jlk-search-input {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    width: 100%;
    outline: none;
    padding: 10px 0;
}

#jlk-search-input::placeholder {
    color: var(--jlk-text-muted);
}

.jlk-search-clear-btn {
    background: none;
    border: none;
    color: var(--jlk-text-muted);
    font-size: 1.1rem;
    cursor: pointer;
}

/* Word Cards */
.jlk-word-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .jlk-word-cards-grid {
        grid-template-columns: 1fr;
    }
}

.jlk-word-card {
    background: var(--jlk-card-bg);
    border: 1px solid var(--jlk-card-border);
    border-radius: var(--jlk-radius);
    padding: 20px;
    cursor: pointer;
    transition: var(--jlk-transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.jlk-word-card:hover {
    transform: translateY(-4px);
    border-color: rgba(232, 98, 10, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.jlk-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--jlk-brand);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.jlk-card-badge.ai-badge {
    background: #8b5cf6; /* Violet pour l'IA */
}

.jlk-level-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.level-debutant { background-color: rgba(16, 185, 129, 0.2); color: #10b981; }
.level-intermediaire { background-color: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.level-avance { background-color: rgba(239, 68, 68, 0.2); color: #ef4444; }

.jlk-card-title {
    font-size: 1.4rem;
    margin: 10px 0 4px 0;
    font-weight: 700;
    color: #fff;
}

.jlk-card-phonetic {
    font-size: 0.9rem;
    color: var(--jlk-brand);
    font-style: italic;
    margin-bottom: 12px;
    display: block;
}

.jlk-card-translation {
    color: var(--jlk-text-muted);
    font-size: 0.95rem;
    margin: 0 0 15px 0;
}

.jlk-card-action-hint {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--jlk-brand);
}

/* Sidebar Details */
.jlk-dict-sidebar {
    background: var(--jlk-bg-secondary);
    border: 1px solid var(--jlk-card-border);
    border-radius: var(--jlk-radius);
    padding: 30px;
    min-height: 400px;
}

.jlk-empty-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--jlk-text-muted);
    padding-top: 50px;
}

.jlk-empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* Detail Content styling */
.jlk-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--jlk-card-border);
    padding-bottom: 15px;
}

.jlk-detail-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
}

.jlk-favorite-btn {
    background: none;
    border: 1px solid var(--jlk-card-border);
    color: var(--jlk-text-muted);
    font-size: 1.5rem;
    padding: 4px 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--jlk-transition);
}

.jlk-favorite-btn.active {
    color: #f59e0b;
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.jlk-detail-translation-box {
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid var(--jlk-brand);
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 25px;
}

.jlk-trans-lbl {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--jlk-text-muted);
    display: block;
    margin-bottom: 4px;
}

.jlk-trans-val {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.jlk-detail-section {
    margin-bottom: 25px;
}

.jlk-detail-section h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--jlk-text-muted);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jlk-detail-def {
    font-size: 1rem;
    line-height: 1.6;
}

.jlk-examples-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.jlk-examples-list li {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--jlk-card-border);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.jlk-ex-dioula {
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
}

.jlk-ex-french {
    color: var(--jlk-text-muted);
    margin: 0;
    font-size: 0.9rem;
}

/* Sugu and Culture links */
.jlk-sugu-list, .jlk-culture-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jlk-sugu-product-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--jlk-card-border);
    border-radius: 10px;
    padding: 10px;
    text-decoration: none;
    transition: var(--jlk-transition);
}

.jlk-sugu-product-card:hover {
    background: rgba(232, 98, 10, 0.05);
    border-color: rgba(232, 98, 10, 0.2);
}

.jlk-sugu-product-card img, .jlk-sugu-img-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
}

.jlk-sugu-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--jlk-bg-primary);
    font-size: 1.5rem;
}

.jlk-sugu-p-info h5 {
    margin: 0 0 2px 0;
    color: #fff;
    font-size: 0.95rem;
}

.jlk-sugu-p-info span {
    color: var(--jlk-brand);
    font-weight: 700;
    font-size: 0.85rem;
}

.jlk-culture-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--jlk-card-border);
    border-radius: 10px;
    padding: 14px;
}

.jlk-culture-item h5 {
    margin: 0 0 6px 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--jlk-brand);
}

.jlk-cult-title {
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
}

.jlk-cult-desc {
    color: var(--jlk-text-muted);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

/* AI Assistant interface */
.jlk-ai-panel {
    background: var(--jlk-bg-secondary);
    border: 1px solid var(--jlk-card-border);
    border-radius: var(--jlk-radius);
    padding: 24px;
}

.jlk-ai-intro h3 {
    font-size: 1.3rem;
    margin: 0 0 6px 0;
    color: #fff;
}

.jlk-ai-intro p {
    color: var(--jlk-text-muted);
    margin: 0 0 20px 0;
    font-size: 0.95rem;
}

.jlk-ai-form textarea {
    width: 100%;
    height: 100px;
    background: var(--jlk-bg-primary);
    border: 1px solid var(--jlk-card-border);
    border-radius: 10px;
    color: #fff;
    padding: 12px;
    outline: none;
    font-family: inherit;
    resize: none;
    margin-bottom: 15px;
    font-size: 1rem;
}

.jlk-ai-form textarea:focus {
    border-color: var(--jlk-brand);
}

.jlk-ai-result-box {
    margin-top: 25px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 20px;
    animation: fadeIn 0.4s ease;
}

.jlk-ai-result-header {
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.jlk-ai-result-header h4 {
    margin: 0 0 6px 0;
    font-size: 0.85rem;
    color: #a78bfa;
    text-transform: uppercase;
}

.jlk-ai-translation {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px 0;
}

.jlk-ai-result-details h5 {
    margin: 0 0 6px 0;
    color: #a78bfa;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.jlk-ai-result-details p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Buttons */
.jlk-btn-primary, .jlk-btn-success {
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--jlk-transition);
    font-family: inherit;
}

.jlk-btn-primary {
    background-color: var(--jlk-brand);
    color: #fff;
}

.jlk-btn-primary:hover {
    background-color: var(--jlk-brand-hover);
}

.jlk-btn-success {
    background-color: var(--jlk-success);
    color: #fff;
    width: 100%;
}

.jlk-btn-success:hover {
    opacity: 0.9;
}

.jlk-btn-success.disabled {
    background-color: var(--jlk-success-bg);
    color: var(--jlk-success);
    cursor: default;
    border: 1px dashed var(--jlk-success);
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-scale-up {
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.jlk-highlight {
    animation: highlightXp 1s ease;
}

@keyframes highlightXp {
    0% { transform: scale(1); color: #fff; }
    50% { transform: scale(1.3); color: #e8620a; }
    100% { transform: scale(1); color: #fff; }
}

/* Spinners */
.jlk-loader-spinner {
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top: 3px solid var(--jlk-brand);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.jlk-no-results, .jlk-error-alert {
    grid-column: span 2;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--jlk-card-border);
    padding: 30px;
    text-align: center;
    border-radius: 12px;
    color: var(--jlk-text-muted);
}

.jlk-error-alert {
    border-color: var(--jlk-error);
    background: rgba(244, 63, 94, 0.05);
    color: #fff;
}
