:root {
    --primary-color: #1a237e; /* Bleu institutionnel */
    --accent-color: #00c853;  /* Vert croissance */
    --bg-color: #f4f7f9;
    --white: #ffffff;
    --user-msg-bg: #1a237e;
    --bot-msg-bg: #e3f2fd;
    --shadow: 0 10px 25px rgba(0,0,0,0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* 1. AGGRANDISSEMENT DE LA ZONE GLOBALE */
.app-container {
    width: 95%;
    max-width: 900px; /* Passage à 800px pour plus de largeur */
    height: 95vh;
    background: var(--white);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    border-radius: 15px;
    overflow: hidden;
}

/* 2. DIMINUTION DE L'ENTÊTE BLEU */
.app-header {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px; /* Réduit de 20px à 10px pour gagner de la place */
    text-align: center;
}

.logo-img {
    max-width: 80px; /* Logo plus petit pour réduire la hauteur de l'en-tête */
    height: auto;
    margin-bottom: 5px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
}

.app-header h1 {
    margin: 0;
    font-size: 1.2rem; /* Taille de police réduite */
}

.app-header p {
    margin: 2px 0 0;
    font-size: 0.8rem;
    opacity: 0.9;
}

/* 3. OPTIMISATION DE LA ZONE DE RÉPONSE */
.chat-window {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #ffffff;
}

.message {
    padding: 12px 18px;
    border-radius: 18px;
    max-width: 90%; /* Utilise 90% de la largeur disponible */
    line-height: 1.5;
    font-size: 1rem;
    animation: fadeIn 0.3s ease;
}

.bot-message {
    background: var(--bot-msg-bg);
    align-self: flex-start;
    color: #333;
    border-bottom-left-radius: 4px;
}

.user-message {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Indicateur de frappe */
.typing {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing span {
    width: 8px;
    height: 8px;
    background-color: #90a4ae;
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.3s infinite ease-in-out;
}

.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }

/* Grille de suggestions */
.suggestions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 15px;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.suggest-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.suggest-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #f0f2ff;
}

/* Zone de saisie */
.input-area {
    padding: 15px;
    display: flex;
    gap: 10px;
    border-top: 1px solid #eee;
}

input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
}

button#send-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}