:root {
    /* Charte CMN - Centre des monuments nationaux */
    --primary-color: #003d5c;      /* Bleu marine CMN */
    --secondary-color: #0066a1;    /* Bleu clair CMN */
    --accent-color: #d4af37;       /* Or/doré patrimoine */
    --bg-color: #f5f5f0;           /* Beige très clair */
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border-color: #e0e0d8;
    --shadow: 0 2px 8px rgba(0, 61, 92, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 61, 92, 0.15);
}

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

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--primary-color);
    color: white;
    padding: 1.25rem 1rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--accent-color);
}

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

.header h1 {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.language-selector {
    padding: 0.5rem 1rem;
    border: 2px solid var(--accent-color);
    border-radius: 6px;
    background: rgba(212, 175, 55, 0.15);
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.language-selector:hover {
    background: rgba(212, 175, 55, 0.25);
    border-color: var(--accent-color);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
}

/* Screens */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Welcome Screen */
.welcome-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    margin-top: 2rem;
    border-top: 4px solid var(--accent-color);
}

.monument-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.welcome-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.welcome-card p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

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

/* Quick Actions */
.quick-actions {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-color);
}

.quick-actions h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.quick-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.quick-btn {
    padding: 0.75rem 1rem;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-weight: 500;
}

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

/* Chat Messages */
.chat-messages {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 400px;
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.message {
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s;
}

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

.message-user {
    display: flex;
    justify-content: flex-end;
}

.message-bot {
    display: flex;
    justify-content: flex-start;
}

.message-content {
    max-width: 80%;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    position: relative;
}

.message-user .message-content {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 2px;
}

.message-bot .message-content {
    background: var(--bg-color);
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
    border-left: 3px solid var(--accent-color);
}

.message-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.message-bot .message-content strong {
    color: var(--primary-color);
}

/* Chat Input */
.chat-input-container {
    display: flex;
    gap: 0.75rem;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.chat-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    font-family: inherit;
}

.chat-input:focus {
    border-color: var(--accent-color);
}

.btn-send {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 6px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-send:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.btn-send:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
}

/* Offline Indicator */
.offline-indicator {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    font-weight: 600;
    z-index: 1000;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.offline-indicator.hidden {
    display: none;
}

/* Audio Anecdotes */
.audio-anecdote {
    margin: 1.5rem 0;
    animation: fadeIn 0.3s;
}

.audio-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-color);
}

.audio-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.audio-btn.playing {
    background: linear-gradient(135deg, var(--accent-color) 0%, #b8942d 100%);
    animation: pulse 1.5s infinite;
}

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

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

.audio-text {
    flex: 1;
    text-align: left;
    line-height: 1.4;
}

.audio-text strong {
    font-size: 1rem;
    display: block;
    margin-bottom: 0.25rem;
}

.audio-text small {
    font-size: 0.85rem;
    opacity: 0.9;
}

.audio-play-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

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

.chat-messages::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Responsive */
@media (max-width: 640px) {
    .header h1 {
        font-size: 1.2rem;
    }
    
    .welcome-card {
        padding: 2rem 1.5rem;
        margin-top: 1rem;
    }
    
    .monument-icon {
        font-size: 4rem;
    }
    
    .welcome-card h2 {
        font-size: 1.5rem;
    }
    
    .quick-buttons {
        grid-template-columns: 1fr;
    }
    
    .message-content {
        max-width: 90%;
    }
}

/* Loading Animation */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 1rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}
