* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

html,
body {
    width: 100%;
    height: 100%;
    font-family: Arial, sans-serif;
}

body {
    background-color: #F7F7F7;
    overflow-y: auto;
}

.bg-pastel-header {
    background-color: #AECAD5 !important;
    color: #333 !important;
}

.bg-pastel-kpi-1 {
    background-color: #B4C6E7 !important;
    color: #333 !important;
}

.bg-pastel-kpi-2 {
    background-color: #A9D18E !important;
    color: #333 !important;
}

.bg-pastel-kpi-3 {
    background-color: #FFC0CB !important;
    color: #333 !important;
}

.bg-pastel-module-header {
    background-color: #F8F9FA !important;
    color: #333 !important;
    border-bottom: 1px solid #ddd;
}

.alert-pastel-warning {
    background-color: #FFF2CC !important;
    border-color: #FFD966 !important;
    color: #333 !important;
}

.alert-pastel-warning strong {
    color: #8F6600;
}

.card {
    border-radius: .5rem;
    border: 1px solid #E0E4E8;
}

.tile-kpi {
    cursor: pointer;
    transition: transform 0.2s;
}

.tile-kpi:hover {
    transform: translateY(-3px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}

.bg-primary {
    background-color: #1F4E5F !important;
}

.btn-primary {
    background-color: #1F4E5F !important;
    border-color: #2c728c !important;
}

.btn-primary:hover {
    background-color: #276C47 !important;
    border-color: #276C47 !important;
}

.btn-outline-primary {
    color: #1F4E5F;
    border-color: #1F4E5F;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: #2c728c;
    color: white;
}

.text-primary {
    color: #1F4E5F !important;
}

.border-primary {
    border-color: #1F4E5F !important; 
}

.navbar {
    background-color: #1F4E5F !important;
}

.badge-saving {
    background: #7EC4A7;
    color: #0F2A1F;
}

img {
    max-width: 100%;
    height: auto;
}

.list-header {
    background-color: #AECAD5;
    color: #333;
    font-weight: bold;
    border-radius: .5rem .5rem 0 0 !important;
    padding: .75rem 1.25rem;
    display: flex;
    align-items: center;
}

.list-header>div {
    white-space: nowrap;
}

.prodname,
.prod_desc {
    flex-basis: 35%;
}

.numeration {
    flex-basis: 5%;
}

.prod_cat {
    flex-basis: 15%;
}

.options {
    flex-basis: 10%;
    justify-content: flex-end;
}

.chat-window {
    display: none; 
    position: fixed; 
    bottom: 90px; 
    right: 20px; 
    width: 350px; 
    height: 500px; 
    background: white; 
    border-radius: 15px; 
    flex-direction: column; 
    box-shadow: 0 5px 25px rgba(0,0,0,0.3); 
    overflow: hidden; 
    z-index: 1000;
}

@media (max-width: 768px) {
    .chat-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
}

.chat-header { color: white; padding: 15px; font-weight: bold; display: flex; justify-content: space-between; align-items: center; }

.chat-messages { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background: #f9f9f9; }

.msg { 
    padding: 10px 14px; 
    border-radius: 15px; 
    max-width: 85%; 
    font-size: 14px; 
    line-height: 1.4;
    animation: fadeIn 0.3s ease forwards;
}

.msg {
    word-wrap: break-word;
    white-space: pre-wrap;
    display: inline-block;
}

.ai-msg {
    background: #eeeeee;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    min-width: 20px;
}


.user-msg { background: #007bff; color: white; align-self: flex-end; border-bottom-right-radius: 2px; }

.chat-input-area { padding: 10px; border-top: 1px solid #eee; display: flex; background: white; }
.chat-input-area input { flex: 1; border: none; outline: none; padding: 8px; }
.chat-input-area button { background: none; border: none; color: #007bff; cursor: pointer; font-weight: bold; }

.ai-msg a { color: #007bff; font-weight: bold; text-decoration: underline; }

.ai-msg b {
    color: #000;
    font-weight: 700;
}

@keyframes pulse-white {
    0% { opacity: 1; filter: drop-shadow(0 0 2px white); }
    50% { opacity: 0.4; filter: drop-shadow(0 0 8px white); }
    100% { opacity: 1; filter: drop-shadow(0 0 2px white); }
}

.logo-active {
    animation: pulse-white 1s infinite ease-in-out;
}
#chat-circle {
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    .chat-header span:last-child {
        padding: 10px;
        font-size: 24px;
    }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }