/* Reset et Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}

/* Header moderne avec gradient animé */
.header {
    background: var(--accent-gradient);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    animation: gradientShift 15s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-size: 2.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.btn-settings {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.3rem;
}

.btn-settings:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px) rotate(90deg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Container principal */
.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 100px);
}

/* Sidebar moderne */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--accent-gradient);
    transform: scaleY(0);
    transition: var(--transition);
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-item:hover::before {
    transform: scaleY(1);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    color: var(--accent-primary);
    font-weight: 600;
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-icon {
    font-size: 1.4rem;
    transition: var(--transition);
}

.nav-item:hover .nav-icon {
    transform: scale(1.1);
}

.nav-text {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Bouton de donation dans la sidebar */
.nav-donation {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1e293b !important;
    margin-top: 1rem;
    border: 2px solid rgba(251, 191, 36, 0.3);
    position: relative;
    overflow: hidden;
    animation: donationGlowSidebar 2s ease-in-out infinite;
}

@keyframes donationGlowSidebar {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(251, 191, 36, 0.6), 0 0 25px rgba(251, 191, 36, 0.2);
    }
}

.nav-donation:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.5);
}

.nav-donation::before {
    background: linear-gradient(to bottom, #fbbf24, #f59e0b);
}

.nav-donation .nav-icon {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.1); }
    20%, 40% { transform: scale(1); }
}

.donation-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 0.5px;
    animation: pulseBadge 2s ease-in-out infinite;
}

@keyframes pulseBadge {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(0.95); }
}

/* Contenu principal */
.main-content {
    flex: 1;
    padding: 2.5rem;
    background: var(--bg-primary);
}

.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

.page.active {
    display: block;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    letter-spacing: -1px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #374151;
    margin: 2rem 0 1rem;
}

/* Stats Cards - Glassmorphism */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

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

.stat-icon {
    font-size: 2.5rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modules Grid */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.module-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition);
}

.module-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.module-card:hover::before {
    opacity: 0.05;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    position: relative;
}

.module-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.3));
    transition: var(--transition);
}

.module-card:hover .module-icon {
    transform: scale(1.2) rotate(5deg);
}

.module-level {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.level-débutant {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.level-intermédiaire {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #b45309;
}

.level-avancé {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #b91c1c;
}

.module-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.module-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.progress-container {
    margin-top: 1.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Quiz Section */
.quiz-container {
    max-width: 1000px;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Sélecteur de modules avec cartes */
.module-selector-cards {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.selector-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1.5rem;
    text-align: center;
}

.modules-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}

.module-card-quiz {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.module-card-quiz:hover {
    transform: translateY(-8px);
    border-color: #4f46e5;
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.25);
}

.module-quiz-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.module-quiz-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
}

.module-quiz-level {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.module-quiz-progress {
    margin-top: 1rem;
}

.progress-bar-small {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.progress-fill-small {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%);
    transition: width 0.5s ease;
    border-radius: 3px;
}

.progress-text-small {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

/* Ancien sélecteur - conservé pour compatibilité */
.module-selector {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.module-selector label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
}

.module-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

.module-select:focus {
    outline: none;
    border-color: #4f46e5;
}

.btn-primary {
    width: 100%;
    padding: 1.2rem;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.quiz-content {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.quiz-progress {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: #4f46e5;
}

.question-card {
    margin-top: 1rem;
}

.question-text {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.choices-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.choice {
    padding: 1.25rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-secondary);
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.choice::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--accent-gradient);
    transform: scaleY(0);
    transition: var(--transition);
}

.choice:hover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
    transform: translateX(4px);
}

.choice:hover::before {
    transform: scaleY(1);
}

.choice.selected {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    font-weight: 600;
}

.choice.selected::before {
    transform: scaleY(1);
}

.choice.correct {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.choice.incorrect {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    animation: errorShake 0.5s ease;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.choice.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.quiz-actions {
    display: flex;
    gap: 1rem;
}

.btn-validate {
    flex: 1;
    padding: 0.875rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-validate:hover:not(:disabled) {
    background: #4338ca;
}

.btn-validate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-next {
    flex: 1;
    padding: 0.875rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-next:hover {
    background: #059669;
}

.feedback {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.feedback.correct {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.feedback.incorrect {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.quiz-results {
    text-align: center;
    padding: 2rem;
}

.quiz-results h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #111827;
}

.results-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 0.5rem;
}

.results-percentage {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Achievements */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.achievement-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
}

.achievement-card.locked {
    opacity: 0.4;
}

.achievement-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.achievement-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.achievement-description {
    font-size: 0.875rem;
    color: #6b7280;
}

.achievement-badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Modal Paramètres */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--accent-gradient);
    color: white;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.setting-info {
    display: flex;
    align-items: start;
    gap: 1rem;
    flex: 1;
}

.setting-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.setting-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.setting-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.setting-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color);
    transition: var(--transition);
    border-radius: 34px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent-gradient);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-switch:hover .toggle-slider {
    opacity: 0.9;
}

/* Bouton Réinitialiser dans paramètres */
.btn-reset-new {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
    flex-shrink: 0;
}

.btn-reset-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.4);
}

.btn-reset-new:active {
    transform: translateY(0);
}

/* Modal Donation */
.donation-modal {
    max-width: 600px;
}

.donation-header {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1e293b;
}

.donation-info {
    text-align: center;
}

.donation-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.donation-info h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.donation-info > p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.donation-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: left;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border-left: 4px solid #fbbf24;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-info strong {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.stat-info span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.donation-message {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.donation-message p {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.donation-message ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.donation-message li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-paypal {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #0070ba 0%, #003087 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 8px 16px rgba(0, 112, 186, 0.3);
    margin-bottom: 1.5rem;
    border: none;
    cursor: pointer;
}

.btn-paypal:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 112, 186, 0.4);
    background: linear-gradient(135deg, #003087 0%, #001f5b 100%);
}

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

.paypal-arrow {
    font-size: 1.2rem;
    transition: var(--transition);
}

.btn-paypal:hover .paypal-arrow {
    transform: translateX(4px);
}

.donation-footer {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.info-text {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 1rem 0;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .nav-item {
        flex-direction: column;
        padding: 1rem;
        min-width: 80px;
        text-align: center;
        gap: 0.5rem;
    }

    .nav-text {
        font-size: 0.75rem;
    }
    
    .btn-settings {
        padding: 0.6rem 0.8rem;
        font-size: 1.2rem;
    }
    
    /* Modal donation responsive */
    .donation-modal {
        max-width: 95%;
    }
    
    .donation-stats {
        gap: 0.75rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .btn-paypal {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Bouton donation sidebar responsive */
    .nav-donation .nav-text {
        font-size: 0.75rem;
    }
    
    .donation-badge {
        font-size: 0.55rem;
        padding: 0.1rem 0.3rem;
    }

    .sidebar-footer {
        padding: 1rem;
    }

    .main-content {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 1.5rem;
    }
}
/* ========================================
   SIMULATION DE TICKETS
======================================== */

.tickets-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Écran de démarrage */
.ticket-start {
    animation: fadeIn 0.5s ease;
}

.ticket-intro {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.ticket-intro-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.ticket-intro h3 {
    font-size: 2rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.ticket-intro p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.ticket-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--text-primary);
}

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

/* Sélecteur de difficulté */
.difficulty-selector h4 {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.difficulty-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.difficulty-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.difficulty-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.difficulty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.difficulty-card h5 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.difficulty-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Écran de chargement */
.ticket-loading {
    text-align: center;
    padding: 4rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.ticket-loading p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

/* Conversation */
.ticket-conversation {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    animation: fadeIn 0.5s ease;
}

.ticket-main-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 0;
    min-height: 700px;
}

.ticket-chat-panel {
    display: flex;
    flex-direction: column;
    border-right: 2px solid var(--border-color);
}

.itil-process-panel {
    background: var(--bg-tertiary);
    overflow-y: auto;
    max-height: 700px;
}

.itil-panel-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 10;
}

.itil-panel-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.itil-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 0.85rem;
}

.itil-steps-container {
    padding: 1rem;
}

.itil-step {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.itil-step.completed {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.05));
}

.itil-step-optional {
    border-style: dashed;
    opacity: 0.8;
}

.itil-step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.step-number {
    width: 28px;
    height: 28px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.itil-step.completed .step-number {
    background: linear-gradient(135deg, #10b981, #059669);
}

.itil-step-header h4 {
    flex: 1;
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.step-status {
    font-size: 1.2rem;
}

.step-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.itil-step textarea,
.itil-step select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    resize: vertical;
}

.itil-step textarea:focus,
.itil-step select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.priority-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.priority-result {
    background: var(--bg-secondary);
    padding: 0.6rem;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
}

.btn-validate-step {
    width: 100%;
    padding: 0.6rem;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-validate-step:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.btn-validate-step:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.itil-progress {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 2px solid var(--border-color);
    position: sticky;
    bottom: 0;
}

.progress-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.progress-bar-itil {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill-itil {
    height: 100%;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ticket-header {
    background: var(--accent-gradient);
    padding: 1.5rem;
    color: white;
}

.ticket-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.ticket-id {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    opacity: 0.9;
}

.ticket-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

/* Chat */
.chat-container {
    height: 400px;
    overflow-y: auto;
    padding: 2rem;
    background: var(--bg-primary);
}

.chat-message {
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease;
}

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

.message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.message-avatar.user {
    background: var(--accent-gradient);
}

.message-avatar.client {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.message-avatar.system {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.chat-message.system .message-content {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border-color: #6366f1;
    border-left: 4px solid #6366f1;
    font-weight: 600;
    white-space: pre-line;
}

.message-sender {
    font-weight: 700;
    color: var(--text-primary);
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.message-content {
    margin-left: 2.5rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    line-height: 1.6;
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-color: var(--accent-primary);
}

/* Input chat */
.chat-input-container {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.quick-actions {
    margin-bottom: 1rem;
}

.quick-actions-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
}

.quick-btn {
    padding: 0.6rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.quick-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2);
}

.chat-input-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

#chatInput {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    resize: none;
    transition: var(--transition);
}

#chatInput:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-send {
    padding: 1rem 2rem;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-resolve {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    flex: 1;
}

.btn-resolve:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-escalate {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    flex: 1;
}

.btn-escalate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.btn-escalate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-close-ticket {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
    flex: 1;
}

.btn-close-ticket:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(107, 114, 128, 0.4);
}

.btn-close-ticket:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ticket-actions {
    display: flex;
    gap: 1rem;
    width: 100%;
}

/* Résultat */
.ticket-result {
    text-align: center;
    padding: 3rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.5s ease;
}

.result-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounce 1s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.ticket-result h3 {
    font-size: 2rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-stat {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-stat .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.result-stat .stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-feedback {
    background: var(--bg-tertiary);
    padding: 2rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    text-align: left;
    line-height: 1.8;
    color: var(--text-secondary);
}

.result-feedback strong {
    color: var(--text-primary);
}

/* Alerte de résolution */
.resolution-alert {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.alert-icon {
    font-size: 2rem;
}

.alert-content {
    flex: 1;
}

.alert-content strong {
    display: block;
    color: #92400e;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.alert-content p {
    color: #78350f;
    margin: 0.5rem 0;
}

.alert-warn {
    background: #fef3c7;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    margin-top: 0.75rem;
    font-weight: 600;
}

/* Badges de statut */
.status-resolved {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.status-failed {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.status-closed {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.status-badge {
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

/* Évaluation ITIL dans les résultats */
.itil-evaluation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-md);
}

.itil-evaluation h4 {
    margin: 0 0 1rem 0;
    color: var(--accent-primary);
    font-size: 1.1rem;
}

.itil-score-badge {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--accent-gradient);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.itil-steps-summary {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    line-height: 2;
}

.step-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    margin: 0.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.step-badge.completed {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.step-badge.incomplete {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* ========================================
   TABS NAVIGATION
   ======================================== */
.tabs-navigation {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.tab-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.tab-content {
    display: none;
}

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

/* ========================================
   HISTORIQUE DES TICKETS
   ======================================== */
.history-container {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.history-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.history-actions {
    display: flex;
    gap: 1rem;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 70vh;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-subtitle {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.history-ticket-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.history-ticket-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.history-ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.history-ticket-id {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ticket-icon {
    font-size: 1.3rem;
}

.history-ticket-meta {
    display: flex;
    gap: 0.5rem;
}

.priority-badge, .score-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
}

.history-ticket-body {
    margin-bottom: 1rem;
}

.history-ticket-problem {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}

.history-ticket-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.info-row {
    display: flex;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.info-label {
    color: var(--text-muted);
    font-weight: 600;
}

.history-ticket-itil {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.itil-tag {
    padding: 0.3rem 0.7rem;
    background: var(--bg-secondary);
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.history-ticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.ticket-date {
    color: var(--text-muted);
}

.ticket-status {
    font-weight: 600;
}

/* ========================================
   MODAL DÉTAILS TICKET
   ======================================== */
.modal-large {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.ticket-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.priority-badge-large {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

.ticket-details-section {
    margin-bottom: 2rem;
}

.ticket-details-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-grid {
    display: grid;
    gap: 1rem;
}

.detail-item {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.detail-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.detail-value {
    font-size: 1rem;
    color: var(--text-primary);
}

.itil-matrix {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.matrix-item {
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.matrix-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.matrix-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.impact-fort, .urgency-forte, .priority-P1 {
    color: #e74c3c;
}

.impact-faible, .urgency-faible, .priority-P3 {
    color: #27ae60;
}

.priority-P2 {
    color: #f39c12;
}

.lifecycle-steps {
    display: grid;
    gap: 1rem;
}

.lifecycle-step {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    align-items: center;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.step-content strong {
    color: var(--text-primary);
    font-size: 1rem;
}

.step-content span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.kpi-icon {
    font-size: 2rem;
}

.kpi-content {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.kpi-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.kpi-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ========================================
   MÉMO TSSR
   ======================================== */
.memo-container {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-height: 80vh;
    overflow-y: auto;
}

.memo-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--accent-primary);
}

.memo-header h3 {
    font-size: 1.8rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.memo-section {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.memo-section h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.memo-highlight {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin: 1rem 0;
}

.memo-note {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.memo-warning {
    font-weight: 700;
    color: #f39c12;
    margin-top: 1rem;
}

.memo-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.memo-table th,
.memo-table td {
    padding: 1rem;
    text-align: left;
    border: 1px solid var(--border-color);
}

.memo-table th {
    background: var(--accent-primary);
    color: white;
    font-weight: 700;
}

.memo-table tr:nth-child(even) {
    background: var(--bg-secondary);
}

.tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
}

.tool-badge {
    padding: 0.6rem 1.2rem;
    background: var(--accent-gradient);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Ressources pédagogiques */
.resources-intro {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-primary);
}

.intro-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
}

.resources-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.resource-btn {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.resource-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.resource-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.resource-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.resource-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
}

.resource-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.cycle-step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--accent-primary);
}

.step-badge {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cycle-step h5 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.cycle-step p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.cycle-step ul {
    margin-left: 1.5rem;
    color: var(--text-secondary);
}

.priority-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.priority-table th,
.priority-table td {
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.priority-table th {
    background: var(--bg-secondary);
    font-weight: 700;
}

.priority-table .p1 {
    background: #e74c3c;
    color: white;
    font-weight: 700;
}

.priority-table .p2 {
    background: #f39c12;
    color: white;
    font-weight: 700;
}

.priority-table .p3 {
    background: #27ae60;
    color: white;
    font-weight: 700;
}

.sla-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

.sla-card {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
}

.sla-card h5 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.sla-card ul {
    margin-left: 1.5rem;
    color: var(--text-secondary);
}

.priority-p1,
.priority-p2,
.priority-p3 {
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-weight: 700;
    color: white;
}

.priority-p1 {
    background: #e74c3c;
}

.priority-p2 {
    background: #f39c12;
}

.priority-p3 {
    background: #27ae60;
}

.example-ticket {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 4px solid #27ae60;
}

.example-ticket p {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.example-ticket ul {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.mnemonic {
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-md);
    color: white;
    text-align: center;
}

.mnemonic h5 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.5rem;
}

.mnemonic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.mnemonic-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(10px);
}

.mnemonic-item .letter {
    font-size: 2rem;
    font-weight: 800;
}

.mnemonic-item span:last-child {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .tabs-navigation {
        flex-direction: column;
    }
    
    .history-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .history-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .history-ticket-info {
        grid-template-columns: 1fr;
    }
    
    .itil-matrix,
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .mnemonic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-large {
        max-width: 95%;
    }
}

/* ========================================
   ASSISTANT TSSR - CHATBOT
======================================== */

.assistant-intro {
    margin-bottom: 2rem;
}

.assistant-welcome {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-md);
    padding: 2rem;
    color: white;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    box-shadow: var(--shadow-lg);
}

.welcome-icon {
    font-size: 3rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.welcome-text h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.welcome-text p {
    margin-bottom: 1rem;
    opacity: 0.95;
}

.topics-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.topic-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.assistant-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    height: calc(100vh - 400px);
    min-height: 500px;
}

.assistant-chat {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.assistant-message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    animation: slideIn 0.3s ease;
}

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

.assistant-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.assistant-message.user .message-avatar {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.message-bubble {
    background: var(--bg-tertiary);
    padding: 1rem 1.25rem;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.6;
}

.assistant-message.user .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message-bubble p {
    margin: 0.5rem 0;
}

.message-bubble p:first-child {
    margin-top: 0;
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

.message-bubble strong {
    font-weight: 600;
}

.message-bubble code {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.assistant-message.user .message-bubble code {
    background: rgba(255, 255, 255, 0.2);
}

.chat-input-container {
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    background: var(--bg-primary);
}

.quick-questions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.quick-question-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    white-space: nowrap;
}

.quick-question-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.chat-input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.assistant-input {
    flex: 1;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    resize: none;
    max-height: 120px;
    transition: var(--transition);
}

.assistant-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-send-assistant {
    background: var(--accent-gradient);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-send-assistant:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.btn-send-assistant:active {
    transform: scale(0.95);
}

.assistant-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary-small {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary-small:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.example-questions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.example-q {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.example-q:last-child {
    border-bottom: none;
}

/* Message de chargement */
.message-loading {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: dotPulse 1.4s infinite ease-in-out;
}

.message-loading::before,
.message-loading::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    margin: 0 4px;
}

.message-loading::before {
    animation: dotPulse 1.4s infinite ease-in-out -0.32s;
}

.message-loading::after {
    animation: dotPulse 1.4s infinite ease-in-out -0.16s;
}

@keyframes dotPulse {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .assistant-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .assistant-sidebar {
        order: -1;
    }

    .chat-messages {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .assistant-welcome {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .topics-grid {
        justify-content: center;
    }

    .message-bubble {
        max-width: 90%;
    }

    .quick-questions {
        flex-direction: column;
    }

    .quick-question-btn {
        white-space: normal;
        text-align: left;
    }
}

/* ========================================
   FOOTER
======================================== */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    margin-top: 3rem;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.footer-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer {
        padding: 1rem;
    }
    
    .footer-content p {
        font-size: 0.85rem;
    }
}