:root {
    --couleur-violet: #7b00ff;
    --couleur-violet-fonce: #5e00c2;
    --couleur-orange: #ff8a00;
    --couleur-orange-fonce: #e07600;
    --couleur-principale: var(--couleur-violet);
    --couleur-principale-fonce: var(--couleur-violet-fonce);
    --couleur-accent: var(--couleur-orange);
    --couleur-accent-fonce: var(--couleur-orange-fonce);
    --couleur-fond: #f7f3ee;
    --couleur-texte: #2b2b2b;
    --couleur-bulle-bot: #ffffff;
    --couleur-bulle-user: var(--couleur-violet);
    --rayon: 14px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--couleur-fond);
    color: var(--couleur-texte);
}

.entete-boutique {
    padding: 60px 24px;
    text-align: center;
}
.entete-boutique h1 { font-size: 2.2rem; margin-bottom: 4px; }
.entete-boutique p { color: #666; }

/* ---------- Widget de chat flottant ---------- */
#chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    font-size: 15px;
}

#bouton-ouvrir-chat {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--couleur-principale);
    border: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}
#bouton-ouvrir-chat:hover { background: var(--couleur-principale-fonce); }

#fenetre-chat {
    display: none;
    flex-direction: column;
    position: absolute;
    bottom: 74px;
    right: 0;
    width: 360px;
    max-width: 92vw;
    height: 520px;
    max-height: 80vh;
    background: var(--couleur-fond);
    border-radius: var(--rayon);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    overflow: hidden;
}

.chat-ouverte #fenetre-chat { display: flex; }

.chat-entete {
    background: var(--couleur-principale);
    color: white;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}
.chat-entete button {
    background: none; border: none; color: white; font-size: 18px; cursor: pointer;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bulle {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: var(--rayon);
    line-height: 1.4;
    white-space: pre-wrap;
}
.bulle-bot {
    background: var(--couleur-bulle-bot);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.bulle-user {
    background: var(--couleur-bulle-user);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

#zone-produits-container {
    padding: 0 14px;
    max-height: 160px;
    overflow-y: auto;
}

.carte-produit {
    background: white;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.carte-produit .infos { font-size: 13px; }
.carte-produit .nom { font-weight: 600; display: block; }
.carte-produit .source { color: #888; font-size: 12px; }
.carte-produit .prix { color: var(--couleur-principale-fonce); font-weight: 600; }
.carte-produit button {
    background: var(--couleur-accent);
    border: none;
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}
.carte-produit button:hover { background: var(--couleur-accent-fonce); }

.chat-saisie {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px;
    background: white;
    border-top: 1px solid #eee;
}
.chat-saisie input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 9px 14px;
    font-size: 14px;
}
.chat-saisie button {
    border: none;
    background: var(--couleur-accent);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
}
.chat-saisie button:hover { background: var(--couleur-accent-fonce); }
#bouton-micro.enregistrement { background: #d9363e; animation: pulse 1s infinite; }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(217,54,62,0.5); }
    70% { box-shadow: 0 0 0 10px rgba(217,54,62,0); }
    100% { box-shadow: 0 0 0 0 rgba(217,54,62,0); }
}

.statut-vocal {
    font-size: 11px;
    color: #999;
    text-align: center;
    height: 16px;
    padding-bottom: 4px;
}
