/* Le conseiller du site (tchat, 30/11/2026). Un bouton en bas à droite ; un panneau sur le côté à l'ordinateur, plein écran au téléphone.
   Icônes au trait, comme le reste du site. Couleurs du site : vert #2aaf52, vert sombre #3f4630, fond clair #f2f3ec. */
.ep-tchat, .ep-tchat * { box-sizing: border-box; }
.ep-tchat { --t-vert: #2aaf52; --t-sombre: #3f4630; --t-texte: #1c1f16; --t-clair: #f2f3ec; --t-trait: #dfe3d6; font-family: inherit; color: var(--t-texte); }
.ep-tchat svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.5px; stroke-linecap: round; stroke-linejoin: round; }
.ep-tchat svg * { vector-effect: non-scaling-stroke; } /* 1,5 px à l'écran quelle que soit la taille : la même épaisseur que le reste du site */
.ep-tchat button { font: inherit; cursor: pointer; }

/* --ep-tchat-bas : la distance au bas de l'écran. Le script la relève quand l'onglet « Gérer le consentement » (cookies) occupe le coin :
   le bouton et le panneau se posent alors juste au-dessus, au lieu de passer dessous (capture de Florent, 30/11/2026 au soir). */
.ep-tchat__bouton { position: fixed; z-index: 9990; right: 20px; bottom: var(--ep-tchat-bas, 20px); display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 28px; background: var(--t-sombre); color: #fff; font-size: 15px; font-weight: 700; box-shadow: 0 10px 28px rgba(28, 31, 22, .28); transition: transform .15s, background .15s; }
.ep-tchat__bouton:hover { background: #2f3524; transform: translateY(-2px); }
.ep-tchat__bouton svg { width: 26px; height: 26px; }
.ep-tchat.is-ouvert .ep-tchat__bouton { display: none; }
/* Le bouton « haut de page » du thème monte d'un cran pour ne pas se retrouver dessous. */
body.ep-a-conseiller #toTop, body.ep-a-conseiller .to-top-container, body.ep-a-conseiller .fusion-top-top-link { bottom: calc(var(--ep-tchat-bas, 20px) + 68px) !important; }

.ep-tchat__panneau { position: fixed; z-index: 99990; right: 20px; bottom: var(--ep-tchat-bas, 20px); display: flex; flex-direction: column; width: 392px; max-width: calc(100vw - 24px); height: min(640px, calc(100vh - 20px - var(--ep-tchat-bas, 20px))); border: 1px solid var(--t-trait); border-radius: 20px; background: #fff; box-shadow: 0 24px 60px rgba(28, 31, 22, .28); overflow: hidden; }
.ep-tchat__panneau[hidden] { display: none; }
.ep-tchat__tete { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 18px; background: var(--t-sombre); color: #fff; }
.ep-tchat__tete svg { width: 26px; height: 26px; flex: 0 0 26px; }
.ep-tchat__titre { flex: 1; min-width: 0; }
.ep-tchat__titre strong { display: block; font-size: 16px; line-height: 1.2; }
.ep-tchat__titre span { display: block; margin-top: 2px; font-size: 12.5px; opacity: .85; }
.ep-tchat__fermer { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: #fff; }
.ep-tchat__fermer:hover { background: rgba(255, 255, 255, .14); }
.ep-tchat__fermer svg { width: 22px; height: 22px; }

.ep-tchat__fil { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 14px 8px; background: #fafaf6; overscroll-behavior: contain; }
.ep-tchat__msg { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; max-width: 88%; }
.ep-tchat__msg.is-client { margin-left: auto; align-items: flex-end; }
.ep-tchat__bulle { padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: #fff; border: 1px solid var(--t-trait); font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.ep-tchat__msg.is-client .ep-tchat__bulle { border-radius: 16px 16px 4px 16px; background: var(--t-sombre); border-color: var(--t-sombre); color: #fff; }
.ep-tchat__attente { display: inline-flex; gap: 5px; padding: 14px; }
.ep-tchat__attente i { width: 7px; height: 7px; border-radius: 50%; background: #9aa28a; animation: ep-tchat-point 1s infinite ease-in-out; }
.ep-tchat__attente i:nth-child(2) { animation-delay: .15s; }
.ep-tchat__attente i:nth-child(3) { animation-delay: .3s; }
@keyframes ep-tchat-point { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* Les fiches proposées : image, nom, prix, comme sur le site. */
.ep-tchat__cartes { display: flex; flex-direction: column; gap: 8px; width: 100%; min-width: 250px; }
.ep-tchat__carte { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border: 1px solid var(--t-trait); border-radius: 14px; background: #fff; color: var(--t-texte) !important; text-decoration: none !important; transition: border-color .15s, box-shadow .15s; }
.ep-tchat__carte:hover { border-color: var(--t-vert); box-shadow: 0 6px 16px rgba(28, 31, 22, .08); }
.ep-tchat__carte-img { flex: 0 0 60px; width: 60px; height: 60px; overflow: hidden; border-radius: 10px; background: var(--t-clair); }
.ep-tchat__carte-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ep-tchat__carte-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ep-tchat__carte-txt strong { font-size: 14.5px; line-height: 1.25; }
.ep-tchat__carte-txt span { color: var(--t-vert); font-size: 13.5px; font-weight: 700; }
.ep-tchat__carte-txt em { color: #5b6150; font-size: 12.5px; font-style: normal; }
.ep-tchat__lien { display: inline-block; font-size: 13.5px; color: var(--t-sombre) !important; font-weight: 600; text-decoration: underline !important; }

/* Joindre une personne de l'atelier. */
.ep-tchat__humain { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 12px; border: 1px dashed #b9c2a6; border-radius: 14px; background: #fff; }
.ep-tchat__humain p { margin: 0 !important; font-size: 13.5px; line-height: 1.4; color: #3a3d33; }
.ep-tchat__action { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--t-sombre); background: #fff; color: var(--t-sombre) !important; font-size: 14.5px; font-weight: 700; text-decoration: none !important; }
.ep-tchat__action svg { width: 20px; height: 20px; }
.ep-tchat__action.is-fort { border-color: var(--t-vert); background: var(--t-vert); color: #fff !important; }

.ep-tchat__sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 14px 4px; background: #fafaf6; }
.ep-tchat__sugg:empty { display: none; }
.ep-tchat__puce { padding: 7px 12px; border: 1px solid #cfd6c0; border-radius: 99px; background: #fff; color: var(--t-sombre); font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.ep-tchat__puce:hover { border-color: var(--t-vert); }

.ep-tchat__saisie { display: flex; align-items: flex-end; gap: 8px; margin: 0 !important; padding: 10px 12px; border-top: 1px solid var(--t-trait); background: #fff; }
.ep-tchat__champ { flex: 1; min-width: 0; min-height: 44px; max-height: 110px; margin: 0 !important; padding: 11px 14px !important; border: 1px solid #cfd6c0 !important; border-radius: 14px !important; background: #fff !important; color: var(--t-texte) !important; font: inherit; font-size: 16px !important; line-height: 1.35; resize: none; box-shadow: none !important; }
.ep-tchat__champ:focus { outline: 2px solid var(--t-vert); outline-offset: 1px; }
.ep-tchat__rond { flex: 0 0 44px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid #cfd6c0; border-radius: 50%; background: #fff; color: var(--t-sombre); }
.ep-tchat__rond svg { width: 22px; height: 22px; }
.ep-tchat__rond.is-envoi { border-color: var(--t-vert); background: var(--t-vert); color: #fff; }
.ep-tchat__rond[disabled] { opacity: .45; cursor: default; }
.ep-tchat__rond.is-ecoute { border-color: #c0392b; background: #c0392b; color: #fff; animation: ep-tchat-ecoute 1.2s infinite; }
@keyframes ep-tchat-ecoute { 0% { box-shadow: 0 0 0 0 rgba(192, 57, 43, .45); } 100% { box-shadow: 0 0 0 12px rgba(192, 57, 43, 0); } }
.ep-tchat__note { margin: 0 !important; padding: 0 14px 10px; background: #fff; color: #6b7062; font-size: 11.5px; line-height: 1.35; }

/* Téléphone : plein écran, le micro bien en vue. */
@media (max-width: 640px) {
  .ep-tchat__bouton { right: 14px; bottom: var(--ep-tchat-bas, 14px); padding: 0; width: 56px; justify-content: center; }
  .ep-tchat__bouton span { display: none; }
  .ep-tchat__panneau { inset: 0; right: 0; bottom: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; border: 0; border-radius: 0; }
  .ep-tchat__msg { max-width: 94%; }
  html.ep-tchat-ouvert, html.ep-tchat-ouvert body { overflow: hidden; }
  body.admin-bar .ep-tchat__panneau { top: 46px; height: calc(100% - 46px); height: calc(100dvh - 46px); } /* aperçu d'un gestionnaire connecté : sous la barre de WordPress */
}
@media (prefers-reduced-motion: reduce) { .ep-tchat__attente i, .ep-tchat__rond.is-ecoute { animation: none; } }
