/* Tchat WhatsApp du cabinet */

.cwa { --cwa-vert: #25D366; --cwa-vert-f: #128C4A; --cwa-navy: #0F1E3C; --cwa-or: #C9A227; --cwa-fond: #EFE7DD; position: fixed; bottom: 20px; z-index: 9990; font-family: inherit; }
.cwa--droite { right: 20px; }
.cwa--gauche { left: 20px; }
.cwa *, .cwa *::before, .cwa *::after { box-sizing: border-box; }

.cwa-bouton { width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--cwa-vert); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 26px rgba(0,0,0,.22); position: relative; transition: transform .2s; }
.cwa-bouton:hover { transform: scale(1.06); }
.cwa-bouton:focus-visible { outline: 3px solid var(--cwa-or); outline-offset: 3px; }
.cwa-bouton .cwa-ico { width: 32px; height: 32px; }
.cwa.est-ouvert .cwa-bouton { transform: scale(.92); }
.cwa-pastille { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; border-radius: 10px; background: #E53935; color: #fff; font: 700 11px/20px system-ui, sans-serif; text-align: center; border: 2px solid #fff; }

.cwa-bulle-invite { position: absolute; bottom: 72px; width: 220px; background: #fff; color: #1f2a37; border-radius: 12px; padding: 12px 30px 12px 14px; font-size: 14px; line-height: 1.4; box-shadow: 0 8px 24px rgba(15,30,60,.18); cursor: pointer; animation: cwa-entree .3s ease-out; }
.cwa--droite .cwa-bulle-invite { right: 0; }
.cwa--gauche .cwa-bulle-invite { left: 0; }
.cwa-bulle-invite strong { display: block; color: var(--cwa-vert-f); }
.cwa-bulle-invite__x { position: absolute; top: 4px; right: 6px; border: 0; background: none; font-size: 18px; color: #8a94a3; cursor: pointer; line-height: 1; padding: 2px 4px; }

.cwa-panneau { position: absolute; bottom: 76px; width: 370px; max-height: min(620px, calc(100vh - 110px)); display: flex; flex-direction: column; background: var(--cwa-fond); border-radius: 16px; overflow: hidden; box-shadow: 0 18px 50px rgba(15,30,60,.32); animation: cwa-entree .22s ease-out; }
.cwa--droite .cwa-panneau { right: 0; }
.cwa--gauche .cwa-panneau { left: 0; }
.cwa-panneau[hidden] { display: none; }
@keyframes cwa-entree { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.cwa-tete { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 16px; background: var(--cwa-navy); color: #fff; }
.cwa-avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--cwa-or); color: var(--cwa-navy); display: grid; place-items: center; }
.cwa-avatar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cwa-tete__txt { flex: 1; min-width: 0; }
.cwa-tete__txt strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cwa-etat { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #C7CEDC; }
.cwa-etat i { width: 8px; height: 8px; border-radius: 50%; background: #8C97AD; }
.cwa-etat.est-ouvert i { background: var(--cwa-vert); box-shadow: 0 0 0 3px rgba(37,211,102,.25); }
.cwa-fermer { border: 0; background: rgba(255,255,255,.1); color: #fff; width: 32px; height: 32px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; }
.cwa-fermer:hover { background: rgba(255,255,255,.2); }

.cwa-fil { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 8px;
	background-image: radial-gradient(rgba(15,30,60,.05) 1px, transparent 1px); background-size: 16px 16px; }
.cwa-msg { max-width: 86%; padding: 8px 10px 18px; border-radius: 10px; font-size: 14px; line-height: 1.45; color: #1f2a37; position: relative; white-space: pre-line; box-shadow: 0 1px 1px rgba(0,0,0,.08); word-wrap: break-word; }
.cwa-msg time { position: absolute; right: 8px; bottom: 3px; font-size: 10.5px; color: #8a94a3; }
.cwa-msg--cab { align-self: flex-start; background: #fff; border-top-left-radius: 3px; }
.cwa-msg--moi { align-self: flex-end; background: #D9FDD3; border-top-right-radius: 3px; }
.cwa-msg--info { background: #FFF6DB; color: #6B4A00; padding-bottom: 8px; }
.cwa-lien { display: block; margin-top: 6px; color: var(--cwa-vert-f); font-weight: 600; font-size: 13px; }

.cwa-choix { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; margin-top: 2px; }
.cwa-puce { border: 1.5px solid var(--cwa-vert); background: #fff; color: var(--cwa-vert-f); border-radius: 18px; padding: 7px 14px; font-family: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.3; cursor: pointer; text-align: right; transition: background .15s; }
.cwa-puce:hover, .cwa-puce:focus-visible { background: var(--cwa-vert); color: #fff; outline: none; }
.cwa-puce--service { border-radius: 12px; padding: 9px 14px; display: flex; flex-direction: column; align-items: flex-end; min-width: 60%; }
.cwa-puce--service small { font-weight: 400; color: #5b6b84; font-size: 12px; }
.cwa-puce--service:hover small, .cwa-puce--service:focus-visible small { color: #e9fff0; }

.cwa-form { padding: 12px 14px 14px; background: #fff; border-top: 1px solid #e3e7ee; display: flex; flex-direction: column; gap: 8px; }
.cwa-form[hidden] { display: none; }
.cwa-champ { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; font-weight: 600; color: #3a4a66; margin: 0; }
.cwa-champ small { font-weight: 400; color: #8a94a3; }
.cwa-champ input, .cwa-champ textarea { width: 100%; border: 1.5px solid #d5dae2; border-radius: 10px; padding: 8px 10px; font-family: inherit; font-size: 14px; line-height: 1.4; color: #1f2a37; background: #fff; resize: vertical; }
.cwa-champ input:focus, .cwa-champ textarea:focus { outline: none; border-color: var(--cwa-vert); }
.cwa-champ input[aria-invalid="true"] { border-color: #E53935; }
.cwa-pot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.cwa-avert { margin: 0; font-size: 11.5px; line-height: 1.4; color: #6b7a90; }
.cwa-avert a { color: inherit; }
.cwa-envoyer { display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 24px; background: var(--cwa-vert); color: #fff; padding: 11px 16px; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.cwa-envoyer:hover { background: var(--cwa-vert-f); }
.cwa-envoyer .cwa-ico { width: 20px; height: 20px; }

@media (max-width: 520px) {
	.cwa { bottom: 14px; }
	.cwa--droite { right: 14px; }
	.cwa--gauche { left: 14px; }
	.cwa-panneau { position: fixed; left: 8px; right: 8px; bottom: 84px; width: auto; max-height: calc(100vh - 100px); }
	.cwa-champ--tel { display: none; }
}
@media print { .cwa { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .cwa-panneau, .cwa-bulle-invite { animation: none; } .cwa-bouton { transition: none; } }
