/* TimeLeas Chatbot — design system : or #8B7355, ink #1A1A1A, Playfair Display + Raleway */
#tlc-root, #tlc-root * { box-sizing: border-box; }

:root {
	--tlc-or: #8B7355;
	--tlc-or-d: #6f5b42;
	--tlc-ink: #1A1A1A;
	--tlc-sec: #555;
	--tlc-bg-img: #FAFAF8;
	--tlc-border: #F0F0F0;
	--tlc-radius: 14px;
	--tlc-shadow: 0 10px 40px rgba(26,26,26,.16);
}

/* Bulle flottante */
#tlc-bubble {
	position: fixed; right: 22px; bottom: 22px; z-index: 99998;
	width: 60px; height: 60px; border-radius: 50%;
	background: var(--tlc-ink); color: #fff; border: 1px solid var(--tlc-or);
	display: flex; align-items: center; justify-content: center; cursor: pointer;
	box-shadow: var(--tlc-shadow); transition: transform .18s ease, background .2s;
}
#tlc-bubble:hover { transform: translateY(-2px); background: var(--tlc-or); }
#tlc-bubble svg { width: 26px; height: 26px; }
#tlc-bubble .tlc-dot {
	position: absolute; top: -2px; right: -2px; width: 14px; height: 14px;
	background: var(--tlc-or); border: 2px solid #fff; border-radius: 50%;
}

/* Panneau */
#tlc-panel {
	position: fixed; right: 22px; bottom: 22px; z-index: 99999;
	width: 384px; max-width: calc(100vw - 32px); height: 600px; max-height: calc(100vh - 44px);
	background: #fff; border: 1px solid var(--tlc-border); border-radius: var(--tlc-radius);
	box-shadow: var(--tlc-shadow); display: none; flex-direction: column; overflow: hidden;
	font-family: "Raleway", -apple-system, "Segoe UI", sans-serif; color: var(--tlc-ink);
}
#tlc-panel.tlc-open { display: flex; animation: tlc-in .22s ease; }
@keyframes tlc-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* En-tête */
.tlc-head {
	background: var(--tlc-ink); color: #fff; padding: 16px 18px;
	display: flex; align-items: center; gap: 12px;
}
.tlc-head .tlc-avatar {
	width: 38px; height: 38px; border-radius: 50%; flex: 0 0 38px;
	background: var(--tlc-or); display: flex; align-items: center; justify-content: center;
	font-family: "Playfair Display", serif; font-weight: 700; font-size: 18px;
}
.tlc-head h4 { margin: 0; font-family: "Playfair Display", serif; font-weight: 400; font-size: 17px; line-height: 1.1; }
.tlc-head p { margin: 2px 0 0; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.tlc-head .tlc-close { margin-left: auto; background: none; border: 0; color: rgba(255,255,255,.7); cursor: pointer; font-size: 22px; line-height: 1; padding: 4px; }
.tlc-head .tlc-close:hover { color: #fff; }

/* Fil de messages */
.tlc-msgs { flex: 1; overflow-y: auto; padding: 18px 16px; background: var(--tlc-bg-img); display: flex; flex-direction: column; gap: 12px; }
.tlc-msg { max-width: 86%; font-size: 14px; line-height: 1.5; }
.tlc-msg.tlc-bot { align-self: flex-start; }
.tlc-msg.tlc-user { align-self: flex-end; }
.tlc-bubble-txt { padding: 10px 14px; border-radius: 14px; }
.tlc-bot .tlc-bubble-txt { background: #fff; border: 1px solid var(--tlc-border); border-bottom-left-radius: 4px; color: var(--tlc-ink); }
.tlc-user .tlc-bubble-txt { background: var(--tlc-ink); color: #fff; border-bottom-right-radius: 4px; }
.tlc-bubble-txt strong { font-weight: 700; }
.tlc-chf { color: var(--tlc-or); font-weight: 600; }

/* Cartes produit */
.tlc-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.tlc-card {
	display: flex; gap: 12px; background: #fff; border: 1px solid var(--tlc-border);
	border-radius: 12px; padding: 10px; text-decoration: none; color: inherit; transition: border-color .18s, transform .18s;
}
.tlc-card:hover { border-color: var(--tlc-or); transform: translateY(-1px); }
.tlc-card .tlc-thumb { width: 70px; height: 70px; flex: 0 0 70px; border-radius: 8px; background: var(--tlc-bg-img) center/contain no-repeat; border: 1px solid var(--tlc-border); }
.tlc-card .tlc-info { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.tlc-card .tlc-label { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--tlc-or); }
.tlc-card .tlc-name { font-family: "Playfair Display", serif; font-size: 14px; line-height: 1.2; margin: 2px 0 4px; color: var(--tlc-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tlc-card .tlc-price { font-size: 13px; color: var(--tlc-ink); }
.tlc-card .tlc-price b { color: var(--tlc-or); font-weight: 700; }
.tlc-card .tlc-total { font-size: 11px; color: var(--tlc-sec); }
.tlc-card .tlc-oos { font-size: 10px; color: #b00; text-transform: uppercase; letter-spacing: .05em; }

/* Saisie */
.tlc-input { border-top: 1px solid var(--tlc-border); padding: 10px; display: flex; gap: 8px; background: #fff; }
.tlc-input textarea {
	flex: 1; resize: none; border: 1px solid var(--tlc-border); border-radius: 10px;
	padding: 10px 12px; font-family: inherit; font-size: 14px; color: var(--tlc-ink); max-height: 96px; outline: none;
}
.tlc-input textarea:focus { border-color: var(--tlc-or); }
.tlc-input button {
	flex: 0 0 42px; width: 42px; height: 42px; border-radius: 10px; border: 0; cursor: pointer;
	background: var(--tlc-ink); color: #fff; display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.tlc-input button:hover:not(:disabled) { background: var(--tlc-or); }
.tlc-input button:disabled { opacity: .5; cursor: default; }
.tlc-input button svg { width: 18px; height: 18px; }

/* Indicateur de frappe */
.tlc-typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.tlc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--tlc-or); opacity: .4; animation: tlc-blink 1.2s infinite; }
.tlc-typing span:nth-child(2) { animation-delay: .2s; }
.tlc-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes tlc-blink { 0%,60%,100% { opacity: .3; } 30% { opacity: 1; } }

/* Puces de suggestion */
.tlc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tlc-chip { font-size: 12px; padding: 6px 11px; border: 1px solid var(--tlc-or); color: var(--tlc-or-d); background: #fff; border-radius: 20px; cursor: pointer; transition: background .18s, color .18s; }
.tlc-chip:hover { background: var(--tlc-or); color: #fff; }

.tlc-foot { text-align: center; font-size: 10px; color: var(--tlc-sec); padding: 6px; background: #fff; border-top: 1px solid var(--tlc-border); }

/* Mobile plein écran */
@media (max-width: 480px) {
	#tlc-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
}

/* ===== Contraste robuste : éviter texte blanc sur blanc (thème) ===== */
#tlc-panel, #tlc-panel * { box-sizing: border-box; }
#tlc-panel .tlc-bot .tlc-bubble-txt { color: #1A1A1A !important; background: #fff !important; }
#tlc-panel .tlc-user .tlc-bubble-txt, #tlc-panel .tlc-user .tlc-bubble-txt * { color: #fff !important; }
#tlc-panel .tlc-input textarea {
	color: #1A1A1A !important; -webkit-text-fill-color: #1A1A1A;
	background: #fff !important; opacity: 1;
}
#tlc-panel .tlc-input textarea::placeholder { color: #9a9a9a !important; -webkit-text-fill-color: #9a9a9a; opacity: 1; }
#tlc-panel .tlc-head h4, #tlc-panel .tlc-head p { color: #fff !important; }
#tlc-panel .tlc-card .tlc-name { color: #1A1A1A !important; }
#tlc-panel .tlc-card .tlc-label, #tlc-panel .tlc-card .tlc-price b, #tlc-panel .tlc-chf { color: #8B7355 !important; }
#tlc-panel .tlc-card .tlc-total { color: #555 !important; }
#tlc-panel .tlc-chip { color: #8B7355 !important; background: #fff !important; }
#tlc-panel .tlc-chip:hover { color: #fff !important; background: #8B7355 !important; }
#tlc-panel .tlc-foot { color: #888 !important; }
#tlc-bubble svg { color: #fff; }
