/* Chloé, la conseillère du site (inc/chloe.php, assets/js/chloe.js) */
.chloe { position: fixed; right: 18px; bottom: 18px; z-index: 90; font-family: var(--sans); transition: bottom .25s var(--ease); }
.chloe.au-dessus { bottom: 96px; }
body.bloque .chloe:not(.ouvert) { display: none; }

.chloe-bulle { position: relative; width: 60px; height: 60px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--bordeaux); color: #fff; box-shadow: var(--ombre-forte); cursor: pointer; transition: transform .2s var(--ease); }
.chloe-bulle:hover { transform: scale(1.05); }
.chloe-point { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); border: 2px solid var(--lait); }
.chloe.ouvert .chloe-bulle { display: none; }

.chloe-teaser { position: absolute; right: 0; bottom: 74px; width: 230px; padding: 14px 16px; background: var(--lait); color: var(--texte); border: 1px solid var(--trait); border-radius: 16px 16px 4px 16px; box-shadow: var(--ombre-forte); cursor: pointer; animation: chloe-in .35s var(--ease); }
.chloe-teaser p { margin: 0; font-size: .95rem; line-height: 1.4; padding-right: 14px; }
.chloe-teaser-x { position: absolute; top: 6px; right: 6px; padding: 4px; border: 0; background: none; color: var(--texte-doux); cursor: pointer; line-height: 0; }

.chloe-panneau { position: absolute; right: 0; bottom: 0; width: 370px; height: min(600px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--lait); border: 1px solid var(--trait); border-radius: 20px; box-shadow: var(--ombre-forte); overflow: hidden; animation: chloe-in .3s var(--ease); }
.chloe-panneau[hidden] { display: none; }
@keyframes chloe-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.chloe-tete { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--bordeaux); color: #fff; }
.chloe-avatar { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--beige, #D1B9A6); color: var(--bordeaux); font: 600 1.2rem/1 var(--serif); }
.chloe-tete div { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.chloe-tete strong { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; }
.chloe-tete span { font-size: .78rem; opacity: .8; }
.chloe-fermer { padding: 6px; border: 0; background: none; color: #fff; cursor: pointer; line-height: 0; }

.chloe-fil { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--creme); }
.chloe-msg { max-width: 84%; padding: 10px 14px; border-radius: 16px; font-size: .95rem; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.chloe-elle { align-self: flex-start; background: var(--lait); color: var(--texte); border: 1px solid var(--trait); border-bottom-left-radius: 4px; }
.chloe-moi { align-self: flex-end; background: var(--bordeaux); color: #fff; border-bottom-right-radius: 4px; }
.chloe-ecrit { display: flex; gap: 4px; padding: 14px; }
.chloe-ecrit i { width: 7px; height: 7px; border-radius: 50%; background: var(--texte-doux); animation: chloe-pt 1s infinite; }
.chloe-ecrit i:nth-child(2) { animation-delay: .15s; }
.chloe-ecrit i:nth-child(3) { animation-delay: .3s; }
@keyframes chloe-pt { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.chloe-actions { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 2px; }
.chloe-a { min-height: 38px; padding: 0 14px; border-radius: var(--r-btn); border: 1.5px solid var(--bordeaux); background: var(--lait); color: var(--bordeaux); font: 600 .88rem var(--sans); cursor: pointer; transition: background .2s, color .2s; }
.chloe-a:hover { background: var(--bordeaux); color: #fff; }
.chloe-a-ajouter, .chloe-a-paiement { background: var(--bordeaux); color: #fff; font-family: var(--serif); font-size: .95rem; min-height: 44px; }
.chloe-a-ajouter:hover, .chloe-a-paiement:hover { background: #2E1019; }
.chloe-a.charge { opacity: .6; pointer-events: none; }

.chloe-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--trait); background: var(--lait); }
.chloe-form input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border: 1px solid var(--trait); border-radius: var(--r-btn); background: #fff; color: var(--texte); font: 16px var(--sans); }
.chloe-form input:focus { outline: none; border-color: var(--bordeaux); }
.chloe-form button { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--bordeaux); color: #fff; cursor: pointer; }

@media (max-width: 699px) {
	.chloe { right: 14px; bottom: 14px; }
	.chloe.au-dessus { bottom: 90px; }
	.chloe-bulle { width: 56px; height: 56px; }
	.chloe.ouvert { inset: 0; }
	.chloe-panneau { position: fixed; inset: 0; width: auto; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
}
