:root {
    --primary-color: #f1cb00;
    --bg-light: #f4f7f6;
    --ai-bubble: #dfdfe2;
}
/*body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-light);
}*/
.open-chat-btn {
    position:fixed;
	top:70px;
	right:30px;
	padding: 5px;
    background: var(--primary-color);
    color: black;
    border: n2px solid #000;one;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transition: transform 0.2s, background 0.3s;
	z-index:99999999;
}
.open-chat-btn:hover {
    background: #f1cb00;
    transform: translateY(-2px);
}
#chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    display: none;
    z-index: 999;
    animation: fadeIn 0.3s ease;
}
#chat-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 80%;
    max-width: 1100px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    z-index: 99999999999;
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}
.chat-header {
    background: var(--primary-color);
    color: black;
    font-size: 18px;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px 10px 0 0;
}

.chat-categories {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}
.cat-btn {
    font-size: 12px;
    padding: 5px 10px;
    border: 1px solid #c8a800;
    background: white;
    color: #c8a800;
    border-radius: 15px;
    cursor: pointer;
    transition: 0.3s;
}
.cat-btn.active {
    background: #c8a800;
    color: white;
}
#chat-logs {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: #fff;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
}
.ai-msg-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 5px;
}
.avatar-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #ddd;
}
.avatar-circle img {
    width: 80%;
    height: auto;
}

.msg {
    margin-bottom: 20px;
    padding: 15px 20px;
    border-radius: 18px;
    max-width: 75%;
    font-size: 14px;
    line-height: 1.5;
}
.user {
    background: var(--primary-color);
    color: black;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.ai {
    background: var(--ai-bubble);
    color: #2c3e50;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.msg.ai {
    white-space: pre-wrap;
    max-width: 80%;
    word-wrap: break-word;
    margin-bottom: 10px !important;
}
.msg.ai strong {
    color: #000;
    font-weight: 800;
}
.feedback-container {
    display: flex;
    gap: 10px;
    margin: -10px 0 20px 10px;
    color: #cccaca;
}
.feedback-btn {
    cursor: pointer;
    border: none;
    background: none;
    font-size: 18px;
    transition: 0.2s;
    opacity: 1;
}
.feedback-btn:hover {
    opacity: 1;
    transform: scale(1.5);
}
.chat-input-area {
    border-top: 1px solid #eee;
    padding: 25px 35px;
    display: flex;
    align-items: center;
    gap: 15px;
}
#chat-input {
    flex: 1;
    border: 1px solid #ddd;
    padding: 12px 20px;
    border-radius: 8px;
    outline: none;
    font-size: 16px;
}
#chat-input:focus {
    border-color: var(--primary-color);
}
.send-btn {
    background: var(--primary-color);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}
.send-btn:hover {
    background: #c8a800;
    transform: scale(1.05);
}
.send-btn svg {
    width: 20px;
    height: 20px;
    color: white;
    transform: translateX(-1px) translateY(1px); 
}
.typing span {
    width: 8px;
    height: 8px;
    background: #bbb;
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.3s infinite;
    margin-right: 3px;
}

@media (max-width: 600px) {
    .chat-header {
		font-size: 14px;
	}
	.avatar-circle {
		width: 25px !important;
		height: 25px!important;
	}
	.chat-input-area {
        padding: 15px; /* On réduit le padding interne (35px -> 15px) */
        gap: 10px;      /* On réduit l'espace entre l'input et le bouton */
    }

    #chat-input {
        padding: 10px 15px; /* Input légèrement moins haut */
        font-size: 14px;    /* On évite le zoom automatique d'iOS sur les petits champs */
        min-width: 0;       /* Force l'input à respecter la largeur du flexbox */
    }

    .send-btn {
        width: 40px;  /* Bouton un poil plus petit */
        height: 40px;
    }
}
@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-7px); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translate(-50%, -40%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}