body {
            font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            background: linear-gradient(135deg, #82c59f, #3cb371);
            color: #fff;
        }

        #bot-title {
            position: relative;
            top: 20px;
            left: 0px;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 12px 12px 0 0;
            padding: 8px 20px;
            display: inline-block;
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
            z-index: 5;
            transform: translateY(-50%);
            text-align: center;
            animation: slideDown 0.5s ease-out forwards;
        }
        
        #bot-title h1 {
            font-size: 1.5rem;
            color: #2e8b57;
            margin: 0;
            padding: 0;
            letter-spacing: 1px;
            font-weight: 600;
        }

        .message-box{
            clear: both;
            opacity: 0;
            animation: fadeIn 0.5s ease-out forwards;
        }

        /* Animation de l'ensemble du conteneur de chat */
        #chat-container {
            position: relative;
            width: 80%;
            height: 70vh;
            max-width: 600px;
            background: rgba(255, 255, 255, 0.97);
            border: none;
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            padding-top: 10px;
            backdrop-filter: blur(10px);
            animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
            transform-origin: center center;
        }

        #chat-history {
            flex: 1;
            padding: 16px;
            overflow-y: auto;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
            background: #f8f9fa;
            scroll-behavior: smooth;
        }

        .message {
            margin-bottom: 12px;
            padding: 12px 16px;
            border-radius: 18px;
            max-width: 80%;
            display: inline-block;
            font-size: 15px;
            line-height: 1.5;
            font-weight: 400;
            letter-spacing: 0.2px;
        }

        .message.user {
            text-align: right;
            background: #2e8b57;
            color: white;
            align-self: flex-start;
            box-shadow: 0 2px 4px rgba(46, 139, 87, 0.2);
            float: right;
            border-bottom-left-radius: 4px;
            transform: translateX(-50px);
            animation: slideInRight 0.3s ease-out forwards;
        }

        .message.bot {
            text-align: left; /* Alignement du texte à gauche */
            background: #f0f2f5;
            color: #333;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            border-bottom-left-radius: 4px;
            margin-left: 0; /* Coller à la marge gauche */
            margin-right: auto; /* Laisser l'espace à droite */
            transform: translateX(-50px);
            animation: slideInLeft 0.3s ease-out forwards;
}

        /* Animation du conteneur de l'input */
        #chat-input-container {
            display: flex;
            padding: 16px;
            background: #ffffff;
            border-top: 1px solid rgba(0, 0, 0, 0.05);
            animation: slideUp 0.5s ease-out;
        }

        #chat-input {
            flex: 1;
            padding: 14px;
            border: 1px solid rgba(0, 0, 0, 0.08);
            border-radius: 24px;
            font-size: 15px;
            outline: none;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            transition: border 0.3s, box-shadow 0.3s, transform 0.2s;
            font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
        }

        #chat-input:focus {
            border-color: #2e8b57;
            box-shadow: 0 2px 12px rgba(46, 139, 87, 0.15);
            transform: scale(1.02);
        }

        #send-button {
            margin-left: 10px;
            padding: 12px 24px;
            background: #2e8b57;
            color: white;
            border: none;
            border-radius: 24px;
            cursor: pointer;
            font-size: 15px;
            font-weight: 500;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(46, 139, 87, 0.3);
        }

        #send-button:hover {
            background: #3cb371;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(46, 139, 87, 0.4);
        }

        /* Animation de clic du bouton */
        #send-button:active {
            transform: translateY(0) scale(0.95);
        }

        /* Ajout d'une scrollbar moderne */
        #chat-history::-webkit-scrollbar {
            width: 6px;
        }

        #chat-history::-webkit-scrollbar-track {
            background: #f1f1f1;
        }

        #chat-history::-webkit-scrollbar-thumb {
            background: #c7c7c7;
            border-radius: 10px;
        }

        #chat-history::-webkit-scrollbar-thumb:hover {
            background: #a0a0a0;
        }

        /* Indicateur de chargement pour l'attente de réponse */
        .typing-indicator {
            background-color: #f0f2f5;
            will-change: transform;
            width: auto;
            border-radius: 50px;
            padding: 12px 16px;
            display: table;
            margin: 0 0 15px;
            position: relative;
            float: left;
            animation: fadeIn 0.3s ease-out;
        }

        .typing-indicator span {
            height: 8px;
            width: 8px;
            float: left;
            margin: 0 1px;
            background-color: #9E9EA1;
            display: block;
            border-radius: 50%;
            opacity: 0.4;
        }

        .typing-indicator span:nth-of-type(1) {
            animation: bouncing 1s infinite 0.1s;
        }
        .typing-indicator span:nth-of-type(2) {
            animation: bouncing 1s infinite 0.2s;
        }
        .typing-indicator span:nth-of-type(3) {
            animation: bouncing 1s infinite 0.3s;
        }

        /* Définition des animations */
        @keyframes slideInLeft {
            from {
                transform: translateX(-50px);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

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

        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        @keyframes popIn {
            0% {
                transform: scale(0.9);
                opacity: 0;
            }
            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

        @keyframes slideDown {
            from {
                transform: translateY(-100%);
            }
            to {
                transform: translateY(-50%);
            }
        }

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

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

        /* Animation de transition pour les liens et éléments interactifs */
        a {
            color: #2e8b57;
            text-decoration: none;
            position: relative;
            transition: color 0.3s;
        }

        a:after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -2px;
            left: 0;
            background-color: #3cb371;
            transition: width 0.3s ease;
        }

        a:hover {
            color: #3cb371;
        }

        a:hover:after {
            width: 100%;
        }

        

    /* Petits écrans : téléphones (jusqu'à 480px) */
    @media (max-width: 480px) {
        #chat-container {
            width: 95% !important;
            height: 90vh !important;
            padding-top: 0 !important;
        }

        #chat-input-container {
            flex-direction: column;
            gap: 8px; 
            padding: 12px;
        }

        #chat-input {
            width: 95%;
            font-size: 14px;
            padding: 12px;
        }

        #send-button {
            width: 100%;
            padding: 12px;
            font-size: 14px;
        }

        .message {
            font-size: 14px;
            padding: 10px 14px;
        }

        #bot-title h1 {
            font-size: 1.2rem;
        }
    }

    /* Tablettes : entre 481px et 768px */
    @media (min-width: 481px) and (max-width: 768px) {
        #chat-container {
            width: 90% !important;
            height: 80vh !important;
        }

        #chat-input {
            font-size: 15px;
        }

        #send-button {
            font-size: 15px;
        }

        .message {
            font-size: 14.5px;
        }
    }

    /* Grands écrans (au-delà de 1200px) */
    @media (min-width: 1200px) {
        #chat-container {
            max-width: 700px;
            height: 75vh;
        }

        #chat-input {
            font-size: 16px;
        }

        #send-button {
            font-size: 16px;
        }
    }