/* L'Empreinte Quotidienne - chat box */
.leq-chat { position: fixed; right: 20px; bottom: 20px; z-index: 9990; font-family: Inter, system-ui, sans-serif; color: #112136; }
.leq-chat *, .leq-chat *::before, .leq-chat *::after { box-sizing: border-box; }
.leq-chat [hidden] { display: none !important; }

/* Bulle */
.leq-chat__toggle { position: relative; display: grid; place-items: center; width: 60px; height: 60px; margin: 0 0 0 auto; padding: 0; border: 0; border-radius: 50%; background: linear-gradient(135deg, #0c8dfe, #11a5f0); box-shadow: 0 10px 26px rgba(12, 141, 254, .45); color: #fff; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.leq-chat__toggle:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 14px 30px rgba(12, 141, 254, .55); }
.leq-chat__toggle:focus-visible { outline: 3px solid #36d4f3; outline-offset: 3px; }
.leq-chat__ico { grid-area: 1 / 1; transition: opacity .2s ease, transform .25s ease; }
.leq-chat__ico--close { opacity: 0; transform: rotate(-60deg) scale(.6); }
.leq-chat__toggle[aria-expanded="true"] .leq-chat__ico--open { opacity: 0; transform: rotate(60deg) scale(.6); }
.leq-chat__toggle[aria-expanded="true"] .leq-chat__ico--close { opacity: 1; transform: none; }

/* Petit message d'accroche */
.leq-chat__nudge { position: absolute; right: 72px; bottom: 12px; padding: 10px 16px; border-radius: 14px 14px 4px 14px; background: #fff; box-shadow: 0 8px 24px rgba(16, 42, 80, .18); color: #112136; font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; animation: leqChatIn .4s ease both; }

/* Fenetre */
.leq-chat__panel { position: absolute; right: 0; bottom: 76px; display: flex; flex-direction: column; width: 372px; max-height: min(640px, calc(100vh - 120px)); overflow: hidden; border-radius: 20px; background: #fff; box-shadow: 0 24px 60px rgba(8, 17, 29, .35); transform-origin: bottom right; animation: leqChatIn .28s cubic-bezier(.2, .7, .2, 1) both; }
.leq-chat__head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; background: #112136; color: #fff; }
.leq-chat__avatar { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; background: #12263f; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .18); }
.leq-chat__who { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.leq-chat__who strong { font-size: 16px; font-weight: 700; line-height: 1.2; }
.leq-chat__who span { margin-top: 2px; color: rgba(255, 255, 255, .75); font-size: 12.5px; line-height: 1.3; }
.leq-chat__close { display: grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; transition: background-color .18s ease; }
.leq-chat__close:hover { background: rgba(255, 255, 255, .12); }
.leq-chat__close:focus-visible { outline: 2px solid #36d4f3; outline-offset: 1px; }

.leq-chat__body { flex: 1; overflow-y: auto; padding: 18px; background: #f6fbfe; overscroll-behavior: contain; }
.leq-chat__msg { max-width: 88%; margin: 0 0 12px; padding: 11px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; }
.leq-chat__msg--bot { border-bottom-left-radius: 4px; background: #fff; box-shadow: 0 2px 8px rgba(16, 42, 80, .08); color: #112136; }
.leq-chat__msg--me { margin-left: auto; border-bottom-right-radius: 4px; background: #0c8dfe; color: #fff; white-space: pre-wrap; overflow-wrap: anywhere; }

.leq-chat__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.leq-chat__chip { padding: 8px 14px; border: 1.5px solid #0c8dfe; border-radius: 999px; background: #fff; color: #0a7be0; font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background-color .18s ease, color .18s ease; }
.leq-chat__chip:hover, .leq-chat__chip.is-on { background: #0c8dfe; color: #fff; }
.leq-chat__chip:focus-visible { outline: 2px solid #36d4f3; outline-offset: 2px; }

.leq-chat__form { display: flex; flex-direction: column; gap: 12px; }
.leq-chat__row { display: flex; flex-direction: column; gap: 5px; }
.leq-chat__row label { color: #08143d; font-size: 12.5px; font-weight: 600; }
.leq-chat__row input, .leq-chat__row textarea { width: 100%; padding: 10px 13px; border: 1.5px solid #d6e3ef; border-radius: 12px; background: #fff; color: #112136; font-family: inherit; font-size: 14.5px; line-height: 1.4; transition: border-color .18s ease, box-shadow .18s ease; }
.leq-chat__row textarea { min-height: 96px; resize: vertical; }
.leq-chat__row input:focus, .leq-chat__row textarea:focus { outline: none; border-color: #0c8dfe; box-shadow: 0 0 0 4px rgba(12, 141, 254, .14); }
.leq-chat__row.is-bad input, .leq-chat__row.is-bad textarea { border-color: #0c8dfe; box-shadow: 0 0 0 4px rgba(12, 141, 254, .2); }
.leq-chat__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.leq-chat__error { margin: 0; color: #08143d; font-size: 13px; font-weight: 600; line-height: 1.4; }
.leq-chat__error::before { content: "! "; color: #0c8dfe; font-weight: 800; }
.leq-chat__send { height: 46px; border: 0; border-radius: 999px; background: #0c8dfe; color: #fff; font-family: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; transition: background-color .18s ease, transform .18s ease; }
.leq-chat__send:hover { background: #0a7be0; transform: translateY(-1px); }
.leq-chat__send:disabled { opacity: .65; cursor: progress; transform: none; }
.leq-chat__send:focus-visible { outline: 2px solid #36d4f3; outline-offset: 2px; }
.leq-chat__alt { margin: 0; color: #3f5476; font-size: 12.5px; line-height: 1.5; text-align: center; }
.leq-chat__alt a { color: #0a7be0; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.leq-chat__again { padding: 0; border: 0; background: none; color: #0a7be0; font-family: inherit; font-size: 13.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

@keyframes leqChatIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes leqChatPulse { 0% { box-shadow: 0 0 0 0 rgba(12, 141, 254, .55), 0 10px 26px rgba(12, 141, 254, .45); } 70%, 100% { box-shadow: 0 0 0 16px rgba(12, 141, 254, 0), 0 10px 26px rgba(12, 141, 254, .45); } }
@media (prefers-reduced-motion: no-preference) {
	.leq-chat:not(.is-used) .leq-chat__toggle[aria-expanded="false"] { animation: leqChatPulse 2.4s ease-out 3; animation-delay: 2s; }
}
@media (prefers-reduced-motion: reduce) {
	.leq-chat__panel, .leq-chat__nudge { animation: none; }
	.leq-chat__toggle, .leq-chat__ico, .leq-chat__send { transition: none; }
}

@media (max-width: 480px) {
	.leq-chat { right: 14px; bottom: 14px; }
	.leq-chat__toggle { width: 56px; height: 56px; }
	.leq-chat__panel { position: fixed; right: 10px; left: 10px; bottom: 82px; width: auto; max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px); }
	.leq-chat__nudge { right: 66px; bottom: 10px; font-size: 13px; }
}
