/* Widget de chat BCAN — a ajouter apres style.css.
   Reprend les variables existantes (--or, etc.) avec des valeurs de repli. */

.chat-lanceur {
    position: fixed;
    right: 26px;
    /* Au-dessus de la pile WhatsApp / Facebook pour ne pas la recouvrir */
    bottom: 158px;
    z-index: 1040;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .85rem 1.4rem;
    border: none;
    border-radius: 999px;
    background: var(--or, #ffd400);
    color: #06182c;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
    cursor: pointer;
    transition: transform .18s ease;
}

.chat-lanceur:hover { transform: translateY(-2px); }

/* Halo pulse, accorde a la forme en pastille du bouton */
.chat-lanceur::before {
    content: ""; position: absolute; inset: 0; border-radius: 999px;
    box-shadow: 0 0 0 0 rgba(255, 212, 0, .5);
    animation: chat-pulse 2.4s infinite 1.6s;
    pointer-events: none;
}
@keyframes chat-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 212, 0, .45); }
    70%  { box-shadow: 0 0 0 16px rgba(255, 212, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 212, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .chat-lanceur::before { display: none; }
}

.chat-panneau {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1041;
    display: flex;
    flex-direction: column;
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: min(560px, calc(100vh - 48px));
    background: #0d2338;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
}

.chat-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1.1rem;
    background: rgba(255, 255, 255, .04);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.chat-entete strong { display: block; color: #fff; font-size: .98rem; }
.chat-entete small { color: rgba(255, 255, 255, .55); font-size: .78rem; }

.chat-fermer {
    background: none;
    border: none;
    color: rgba(255, 255, 255, .6);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}

.chat-fermer:hover { color: #fff; }

.chat-accueil { padding: 1.1rem; }
.chat-accueil p { color: rgba(255, 255, 255, .7); font-size: .88rem; margin-bottom: .9rem; }

.chat-erreur {
    margin: .7rem 0 0;
    color: #ff9c8f;
    font-size: .82rem;
}

.chat-fil {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.chat-bulle {
    max-width: 82%;
    padding: .6rem .85rem;
    border-radius: 14px;
    font-size: .88rem;
    line-height: 1.45;
    word-wrap: break-word;
}

.chat-bulle--visiteur {
    align-self: flex-end;
    background: var(--or, #ffd400);
    color: #06182c;
    border-bottom-right-radius: 4px;
}

.chat-bulle--club {
    align-self: flex-start;
    background: rgba(255, 255, 255, .09);
    color: #fff;
    border-bottom-left-radius: 4px;
}

.chat-bulle--systeme {
    align-self: center;
    background: transparent;
    color: rgba(255, 255, 255, .5);
    font-size: .8rem;
    text-align: center;
    max-width: 100%;
}

.chat-saisie {
    display: flex;
    align-items: flex-end;
    gap: .5rem;
    padding: .7rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.chat-saisie textarea {
    flex: 1 1 auto;
    resize: none;
    max-height: 120px;
    padding: .55rem .75rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .05);
    color: #fff;
    font-size: .88rem;
    font-family: inherit;
}

.chat-saisie textarea:focus {
    outline: 2px solid var(--or, #ffd400);
    outline-offset: 1px;
}

.chat-envoyer {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--or, #ffd400);
    color: #06182c;
    cursor: pointer;
}

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 480px) {
    .chat-lanceur span { display: none; }
    .chat-lanceur { padding: 1rem; bottom: 150px; }
    .chat-panneau { right: 12px; left: 12px; bottom: 12px; width: auto; }
}
