/* Fenêtre de discussion WhatsApp (toutes les pages). Le contenu est créé par chat.js. */
.chat-bouton, .chat-wa, .chat-wa * { box-sizing: border-box; }
.chat-bouton { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 22px 0 16px; border: 0; border-radius: 999px; background: #0f7a5f; color: #fff; font: 700 .95rem/1 Montserrat, "Segoe UI", system-ui, sans-serif; cursor: pointer; box-shadow: 0 14px 30px -8px rgba(7,94,84,.6); }
.chat-bouton:hover { background: #0b6650; }
.chat-bouton svg { width: 28px; height: 28px; fill: currentColor; flex: none; }
.chat-bouton:focus-visible, .chat-wa :focus-visible { outline: 3px solid #f28c18; outline-offset: 2px; }

.chat-wa { position: fixed; inset: auto 20px 92px auto; z-index: 65; width: 360px; max-width: calc(100vw - 24px); max-height: calc(100vh - 112px); margin: 0; padding: 0; border: 0; border-radius: 20px; overflow: auto; overscroll-behavior: contain; background: #fff; color: #111a30; font: 400 1rem/1.5 "DM Sans", "Segoe UI", system-ui, sans-serif; text-align: left; box-shadow: 0 24px 60px -12px rgba(17,26,48,.45); }
.chat-wa * { margin: 0; }
.chat-tete { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; background: #075e54; color: #fff; }
.chat-tete svg { width: 34px; height: 34px; fill: currentColor; flex: none; }
.chat-tete div { flex: 1; min-width: 0; }
.chat-wa h2 { font: 700 1.05rem/1.25 Montserrat, "Segoe UI", system-ui, sans-serif; letter-spacing: 0; color: #fff; }
.chat-etat { font-size: .82rem; line-height: 1.35; color: #e3f5f0; }
.chat-fermer { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; flex: none; }
.chat-fermer:hover { background: rgba(255,255,255,.16); }
.chat-fermer svg { width: 22px; height: 22px; fill: none; }
.chat-corps { padding: 16px; background: #efeae2; }
.chat-bulle { width: fit-content; max-width: 92%; padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: #fff; font-size: .95rem; }
.chat-choix { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px !important; }
.chat-choix a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border: 1.5px solid #0f7a5f; border-radius: 14px; background: #fff; color: #075e54; font-weight: 700; font-size: .92rem; line-height: 1.3; text-decoration: none; }
.chat-choix a:hover { background: #e3f5f0; }
.chat-saisie { padding: 14px 16px 16px; }
.chat-saisie label { display: block; margin-bottom: 6px; font-weight: 700; font-size: .88rem; }
.chat-saisie textarea { display: block; width: 100%; min-height: 68px; padding: 10px 12px; border: 1.5px solid #7c889d; border-radius: 12px; background: #fff; color: inherit; font: inherit; font-size: 16px; resize: vertical; }
.chat-envoyer { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; margin-top: 10px !important; padding: 10px 16px; border-radius: 999px; background: #0f7a5f; color: #fff; font: 700 .95rem/1.2 Montserrat, "Segoe UI", system-ui, sans-serif; text-decoration: none; }
.chat-envoyer:hover { background: #0b6650; }
.chat-note { margin-top: 8px !important; font-size: .8rem; line-height: 1.4; color: #56627a; text-align: center; }

/* Arrivée en douceur, sans mouvement pour les visiteurs qui l'ont désactivé */
@media (prefers-reduced-motion: no-preference) {
  .chat-wa[open] { transition: opacity .25s ease-out, transform .25s ease-out; }
  @starting-style { .chat-wa[open] { opacity: 0; transform: translateY(16px); } }
}

@media (max-width: 640px) {
  .chat-bouton { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); width: 56px; height: 56px; padding: 0; justify-content: center; }
  .chat-bouton span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .chat-bouton.chat-avec-barre { bottom: calc(86px + env(safe-area-inset-bottom)); }
  /* Le bandeau cookies et la fenêtre ouverte passent avant le bouton */
  .cookies:not([hidden]) ~ .chat-bouton, .chat-wa[open] ~ .chat-bouton { display: none; }
  .chat-wa { inset: auto 12px calc(12px + env(safe-area-inset-bottom)) 12px; width: auto; max-height: calc(100vh - 92px); max-height: calc(100dvh - 92px); }
}
@media print { .chat-bouton, .chat-wa { display: none; } }
