/* ============================================
   DoctrineMada - Styles CSS
   ============================================ */

:root {
    /* Charte graphique DoctrineMada */
    --navy: hsl(213, 68%, 11%);           /* #0E1A2B - Sidebar, fonds sombres */
    --navy-light: hsl(213, 40%, 18%);     /* #1E2F45 - Hover states sidebar */
    --ivory: hsl(40, 33%, 95%);           /* #F6F3EE - Fond principal */
    --ivory-dark: hsl(40, 20%, 90%);      /* #EDE9E2 - Fond secondaire */
    --indigo: hsl(241, 100%, 68%);        /* #5B5FFF - Accent principal, boutons */
    --indigo-hover: hsl(241, 90%, 60%);   /* #4A4EE8 - Hover sur indigo */
    --gold: hsl(43, 74%, 66%);            /* #E8B84B - Logo, accents dorés */
    --corpus-black: hsl(0, 0%, 7%);       /* #111111 - Texte principal */
    
    /* Tokens sémantiques */
    --background: var(--ivory);
    --foreground: var(--corpus-black);
    --primary: var(--indigo);
    --primary-dark: var(--indigo-hover);
    --primary-light: hsl(241, 100%, 75%);
    --secondary: var(--navy);
    --accent: var(--gold);
    --muted-foreground: hsl(213, 15%, 45%);
    --border-color: hsl(213, 15%, 88%);
    
    /* Couleurs fonctionnelles */
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Fonds */
    --bg-dark: var(--navy);
    --bg-card: #ffffff;
    --bg-input: var(--ivory-dark);
    --bg-hover: var(--ivory-dark);
    --bg-page: var(--ivory);
    
    /* Textes */
    --text-primary: var(--corpus-black);
    --text-secondary: var(--muted-foreground);
    --text-muted: hsl(213, 15%, 55%);
    --text-light: #ffffff;
    
    /* Bordures */
    --border: var(--border-color);
    --border-light: hsl(213, 15%, 92%);
    
    /* Ombres */
    --shadow: 0 1px 3px rgba(14, 26, 43, 0.08);
    --shadow-lg: 0 10px 25px -5px rgba(14, 26, 43, 0.12);
    
    /* Rayons */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* ============================================
   Landing Page
   ============================================ */

.landing-page {
    min-height: 100vh;
    background: var(--bg-page);
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 3rem;
    background: var(--secondary);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-light);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-light);
}

.nav-cta {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-cta:hover {
    background: var(--primary-dark);
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 4rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.hero .highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.secondary-button {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s;
}

.secondary-button:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* Demo Card */
.hero-visual {
    display: flex;
    justify-content: center;
}

.demo-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.demo-header {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border);
}

.demo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.demo-dot.red { background: #ef4444; }
.demo-dot.yellow { background: #f59e0b; }
.demo-dot.green { background: #10b981; }

.demo-content {
    padding: 1.25rem;
}

.demo-question, .demo-answer {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.demo-question {
    background: var(--bg-input);
}

.demo-answer {
    background: rgba(14, 124, 123, 0.1);
    border: 1px solid rgba(14, 124, 123, 0.3);
}

.demo-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.demo-question p, .demo-answer p {
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin: 0;
}

.demo-result {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.result-badge {
    background: var(--bg-input);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.result-badge.success {
    background: rgba(14, 124, 123, 0.3);
    color: #7dd3d2;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Features Section */
.features-section {
    padding: 4rem 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: left;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

/* Domains Section */
.domains-section {
    margin-bottom: 2.5rem;
}

.domains-section h2 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.domains-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.domain-tag {
    background: var(--bg-input);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.domain-tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(91, 95, 255, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 95, 255, 0.4);
    background: var(--primary-dark);
}

.cta-button.large {
    padding: 1.25rem 3rem;
    font-size: 1.25rem;
}

/* Feature Number */
.feature-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Agents Section */
.agents-section {
    padding: 4rem 3rem;
    background: var(--bg-card);
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.agent-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.agent-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.agent-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border-radius: 12px;
    flex-shrink: 0;
}

.agent-info {
    flex: 1;
}

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

.agent-info p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.agent-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
}

.agent-stats span:first-child {
    color: var(--primary);
    font-weight: 600;
}

.agent-badge {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.agent-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.agent-btn:hover {
    background: var(--primary-dark);
}

.agent-btn svg {
    transition: transform 0.2s;
}

.agent-btn:hover svg {
    transform: translateX(3px);
}

/* Examples Section */
.examples-section {
    padding: 4rem 3rem;
    background: var(--bg-card);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.example-card {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.example-question {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border);
}

.q-icon {
    font-size: 1.25rem;
}

.example-question p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-style: italic;
}

.example-response {
    padding: 1.25rem;
}

.response-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.response-icon {
    font-size: 1rem;
}

.response-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 0.75rem 0;
}

.response-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.source-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Database Section */
.database-section {
    padding: 4rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.database-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.db-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.db-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.db-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.db-stat {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.db-topics {
    list-style: none;
    padding: 0;
    margin: 0;
}

.db-topics li {
    font-size: 0.8125rem;
    color: var(--text-muted);
    padding: 0.25rem 0;
}

.data-fields {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.data-fields h4 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fields-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.field-tag {
    background: var(--bg-input);
    color: var(--text-secondary);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 5rem 3rem;
    background: var(--secondary);
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    padding: 2rem 3rem;
    border-top: 1px solid var(--border);
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.footer-sources {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-sources a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-sources a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .database-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-section {
        grid-template-columns: 1fr 1fr;
    }
    
    .database-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

.cta-button svg {
    transition: transform 0.3s ease;
}

.cta-button:hover svg {
    transform: translateX(4px);
}

.disclaimer {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   Chat Interface
   ============================================ */

.chat-interface {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.chat-interface.hidden {
    display: none;
}

.landing-page.hidden {
    display: none;
}

/* Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.back-button,
.clear-button {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.back-button:hover,
.clear-button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.header-title {
    text-align: center;
}

.header-title h1 {
    font-size: 1.25rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Chat Container */
.chat-container {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Chat Panel (Left) */
.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    min-width: 400px;
}

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

/* Messages */
.message {
    display: flex;
    gap: 0.75rem;
    max-width: 90%;
    animation: fadeIn 0.3s ease;
}

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

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

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

.message.assistant .message-avatar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

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

.message-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.message.user .message-content {
    background: var(--primary);
    border-color: var(--primary);
}

.message-content p {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

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

/* Titres dans les réponses */
.message-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin: 1.25rem 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.message-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1rem 0 0.5rem 0;
}

.message-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0.75rem 0 0.5rem 0;
}

/* Listes */
.message-content ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.message-content ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
    list-style-type: decimal;
}

.message-content li {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.message.user .message-content li {
    color: rgba(255, 255, 255, 0.9);
}

/* Texte en gras et italique */
.message-content strong {
    font-weight: 600;
    color: var(--text-primary);
}

.message-content em {
    font-style: italic;
}

/* Code inline */
.message-content code {
    background: var(--bg-hover);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.875em;
    color: var(--primary);
}

/* Liens */
.message-content a {
    color: var(--primary);
    text-decoration: underline;
}

.message-content a:hover {
    color: var(--primary-dark);
}

/* Séparateurs visuels pour les sections */
.message-content h2:first-child,
.message-content h3:first-child {
    margin-top: 0;
}

/* Loading indicator */
.message.loading .message-content {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

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

.input-wrapper {
    display: flex;
    gap: 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    transition: border-color 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
}

#user-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    resize: none;
    outline: none;
    max-height: 120px;
}

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

.send-button {
    background: var(--primary);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.send-button:disabled {
    background: var(--bg-hover);
    color: var(--text-muted);
    cursor: not-allowed;
}

.send-button:not(:disabled):hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: center;
}

/* ============================================
   Results Panel (Right)
   ============================================ */

.results-panel {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
    min-width: 450px;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.results-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.results-count {
    background: var(--bg-input);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.results-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-muted);
}

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

.empty-state p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.empty-state span {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Section Titles */
.results-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.75rem 0;
    margin-top: 1rem;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.results-section-title:first-child {
    margin-top: 0;
}

.results-section-title span {
    font-size: 1.1rem;
}

/* Decision Cards */
.decision-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    animation: slideIn 0.3s ease;
}

/* Conseil Cards */
.conseil-card {
    border-left: 3px solid #f59e0b;
}

.conseil-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
}

/* Nomination Cards */
.nomination-card {
    border-left: 3px solid #10b981;
}

.nomination-card:hover {
    border-color: #10b981;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}

/* Solution badges variants */
.decision-solution.conseil {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.decision-solution.nomination {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

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

.decision-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
}

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

.decision-number {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
}

.decision-solution {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.decision-solution.rejet {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.decision-solution.cassation {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.decision-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.decision-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.decision-principe {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.6;
    padding: 0.75rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.decision-keywords {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyword-tag {
    background: var(--bg-input);
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   Modal
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
}

.modal-content.modal-large {
    max-width: 600px;
}

.modal-content h2 {
    margin-bottom: 1rem;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.modal-content input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    margin-bottom: 0;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Webhook Config List */
.webhook-config-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.webhook-config-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.webhook-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.webhook-icon {
    font-size: 1.25rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
    .chat-container {
        flex-direction: column;
    }
    
    .chat-panel {
        min-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 50vh;
    }
    
    .results-panel {
        min-width: 100%;
    }
}

@media (max-width: 600px) {
    .title {
        font-size: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-button {
        width: 100%;
        justify-content: center;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
