/* Chat en direct de la boutique (chat.js). Couleurs du thème : --carte, --surface, --bordure, --texte, --texte-2, --jaune (accent). */
.exo-chat { position: fixed; right: 20px; bottom: 20px; z-index: 95; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; font-family: var(--f-texte, system-ui, sans-serif); pointer-events: none; }
.exo-chat > * { pointer-events: auto; }
/* Au-dessus de la barre « Commander » fixe du téléphone et de la bulle « Ma demande ». */
body.exo-barre-achat-on .exo-chat { bottom: calc(80px + env(safe-area-inset-bottom)); }
body:has(.exo-bulle-demande:not([hidden])) .exo-chat { bottom: 96px; }
/* Téléphone : au-dessus de la bannière cookies (bande en bas, ~87 px) tant qu'elle est affichée. */
@media (max-width: 600px) { body:has(.cmplz-cookiebanner.cmplz-show) .exo-chat:not(.is-ouvert) { bottom: calc(100px + env(safe-area-inset-bottom)); } }

.exo-chat__bulle {
	position: relative; display: inline-flex; align-items: center; gap: 9px; height: 52px; padding: 0 20px 0 16px;
	border: 1px solid color-mix(in srgb, var(--jaune, #ffd23f) 55%, transparent); border-radius: 999px; cursor: pointer;
	background: var(--carte, #161a2e); color: var(--texte, #f5f6ff); font: 700 14px/1 var(--f-texte, system-ui, sans-serif);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 4px color-mix(in srgb, var(--jaune, #ffd23f) 10%, transparent);
	transition: transform .15s ease, border-color .15s ease;
}
.exo-chat__bulle svg { color: var(--jaune, #ffd23f); flex: none; }
.exo-chat__bulle:hover { transform: translateY(-2px); border-color: var(--jaune, #ffd23f); }
.exo-chat__bulle:focus-visible { outline: 2px solid var(--jaune, #ffd23f); outline-offset: 3px; }
.exo-chat__point { position: absolute; left: 33px; top: 11px; width: 11px; height: 11px; border-radius: 50%; background: #35e08a; border: 2px solid var(--carte, #161a2e); }
.exo-chat__nb { position: absolute; top: -6px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--rouge-tag, #e5232f); color: #fff; font-size: 12px; line-height: 22px; text-align: center; }
.exo-chat.is-ouvert .exo-chat__bulle-txt { display: none; }
.exo-chat.is-ouvert .exo-chat__bulle { padding: 0 15px; }

.exo-chat__apercu {
	max-width: 290px; display: grid; gap: 3px; text-align: left; padding: 12px 14px; cursor: pointer;
	background: var(--carte, #161a2e); color: var(--texte, #f5f6ff); border: 1px solid var(--bordure, #262c4a);
	border-left: 3px solid var(--jaune, #ffd23f); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
	font-size: 13.5px; line-height: 1.4; animation: exoChatEntree .25s ease-out;
}
.exo-chat__apercu strong { font-size: 12px; color: var(--jaune, #ffd23f); }
.exo-chat__apercu[hidden] { display: none; }

.exo-chat__panneau {
	width: min(370px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px)); display: flex; flex-direction: column;
	background: var(--fond, #0d0f1a); border: 1px solid var(--bordure, #262c4a); border-radius: 18px; overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .6); animation: exoChatEntree .2s ease-out;
}
.exo-chat__panneau[hidden] { display: none; }
@keyframes exoChatEntree { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .exo-chat__panneau, .exo-chat__apercu { animation: none; } }

.exo-chat__tete { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--bleu-roi, #1f2a6b); color: #fff; }
.exo-chat__avatar { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--jaune, #ffd23f); color: var(--sur-jaune, #171204); font: 800 17px/1 var(--f-titre, sans-serif); }
.exo-chat.is-enligne .exo-chat__avatar::after { content: ""; position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: #35e08a; border: 2px solid var(--bleu-roi, #1f2a6b); }
.exo-chat__tete-txt { flex: 1; min-width: 0; display: grid; gap: 3px; }
.exo-chat__tete-txt strong { font-size: 15.5px; }
.exo-chat__statut { font-size: 12px; color: rgba(255, 255, 255, .78); }
.exo-chat__statut.is-enligne { color: #8ff0bd; }
.exo-chat__fermer { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.exo-chat__fermer:hover { background: rgba(255, 255, 255, .2); }

.exo-chat__fil { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.exo-chat__intro p { margin: 0 0 6px; padding: 12px 14px; background: var(--carte, #161a2e); border: 1px solid var(--bordure, #262c4a); border-radius: 14px 14px 14px 4px; color: var(--texte, #f5f6ff); font-size: 14px; line-height: 1.5; }
.exo-chat__intro[hidden] { display: none; }
.exo-chat__jour { align-self: center; margin: 6px 0 2px; font-size: 11px; color: var(--texte-2, #a9aecb); letter-spacing: .04em; }
.exo-chat__msg { max-width: 82%; display: grid; gap: 4px; }
.exo-chat__msg-txt { margin: 0; padding: 10px 13px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.exo-chat__msg small { font-size: 10.5px; color: var(--texte-2, #a9aecb); }
.exo-chat__msg.is-admin { align-self: flex-start; }
.exo-chat__msg.is-admin .exo-chat__msg-txt { background: var(--carte, #161a2e); border: 1px solid var(--bordure, #262c4a); color: var(--texte, #f5f6ff); border-radius: 14px 14px 14px 4px; }
.exo-chat__msg.is-client { align-self: flex-end; text-align: right; }
.exo-chat__msg.is-client .exo-chat__msg-txt { background: var(--jaune, #ffd23f); color: var(--sur-jaune, #171204); border-radius: 14px 14px 4px 14px; text-align: left; }

.exo-chat__form { padding: 10px 12px 12px; border-top: 1px solid var(--bordure, #262c4a); background: var(--carte, #161a2e); display: grid; gap: 8px; }
.exo-chat__champs { display: grid; gap: 6px; }
.exo-chat__champs[hidden], .exo-chat__champs [hidden] { display: none; }
.exo-chat__form input, .exo-chat__form textarea {
	width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--bordure, #262c4a); border-radius: 10px;
	background: var(--fond, #0d0f1a); color: var(--texte, #f5f6ff); font: 16px/1.35 var(--f-texte, system-ui, sans-serif);
}
.exo-chat__form input:focus, .exo-chat__form textarea:focus { outline: none; border-color: var(--jaune, #ffd23f); }
.exo-chat__aide { font-size: 11.5px; color: var(--texte-2, #a9aecb); margin-top: -2px; }
.exo-chat__piege { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.exo-chat__ligne { display: flex; align-items: flex-end; gap: 8px; }
.exo-chat__ligne textarea { resize: none; min-height: 44px; max-height: 120px; }
.exo-chat__envoyer { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--jaune, #ffd23f); color: var(--sur-jaune, #171204); cursor: pointer; }
.exo-chat__envoyer:disabled { opacity: .5; cursor: wait; }
.exo-chat__erreur { margin: 0; font-size: 12.5px; color: #ff8a80; }
.exo-chat__erreur[hidden] { display: none; }
.exo-chat__mention { margin: 0; font-size: 11px; color: var(--texte-2, #a9aecb); }
.exo-chat__mention a { color: inherit; text-decoration: underline; }
.exo-chat__mention[hidden] { display: none; }

/* Téléphone : bulle ronde (icône seule), fenêtre presque plein écran. */
@media (max-width: 600px) {
	.exo-chat { right: 14px; bottom: 14px; }
	.exo-chat__bulle { width: 54px; height: 54px; padding: 0; justify-content: center; }
	.exo-chat__bulle-txt { display: none; }
	.exo-chat__point { left: auto; right: 4px; top: 4px; }
	.exo-chat.is-ouvert { left: 0; right: 0; top: 0; bottom: 0; align-items: stretch; gap: 0; z-index: 2147483000; } /* Devant la bannière cookies tant que le chat est ouvert. */
	.exo-chat.is-ouvert .exo-chat__bulle { display: none; }
	.exo-chat__panneau { width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
	.exo-chat__tete { padding-top: calc(14px + env(safe-area-inset-top)); }
	.exo-chat__form { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
