/* Chat commercial GFC (module gfcchatcommercial) — 05/11/2026. Fenêtre bas à droite, plein écran sur mobile. */
#gfc-chat, #gfc-chat * { box-sizing: border-box; }
#gfc-chat [hidden] { display: none !important; }
#gfc-chat {
    position: fixed; right: 20px; bottom: 20px; z-index: 2147483000;
    width: 360px; height: 520px; max-height: calc(100vh - 40px);
    display: flex; flex-direction: column;
    background: #fff; color: #222; border-radius: 14px; overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .28), 0 2px 8px rgba(0, 0, 0, .12);
    font: 14px/1.4 "Open Sans", Arial, sans-serif;
}
#gfc-chat .gfc-chat-tete {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    background: #222; color: #fff;
}
#gfc-chat .gfc-chat-avatar {
    flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%;
    background: #f39200; color: #fff; font-weight: 700; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
}
#gfc-chat .gfc-chat-qui { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
#gfc-chat .gfc-chat-nom { font-size: 15px; }
#gfc-chat .gfc-chat-statut { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; color: #ddd; }
#gfc-chat .gfc-chat-pastille {
    flex: 0 0 9px; width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: #9a9a9a;
}
#gfc-chat .gfc-chat-pastille.gfc-chat-on { background: #2ecc40; box-shadow: 0 0 0 3px rgba(46, 204, 64, .25); }
#gfc-chat .gfc-chat-x {
    flex: 0 0 auto; border: 0; background: transparent; color: #fff; font-size: 26px; line-height: 1;
    cursor: pointer; padding: 0 4px;
}
#gfc-chat .gfc-chat-fil {
    flex: 1 1 auto; overflow-y: auto; padding: 12px; background: #f4f4f4;
    display: flex; flex-direction: column; gap: 8px; -webkit-overflow-scrolling: touch;
}
#gfc-chat .gfc-chat-vide { margin: auto 10px; text-align: center; color: #777; }
#gfc-chat .gfc-chat-msg { max-width: 82%; display: flex; flex-direction: column; }
#gfc-chat .gfc-chat-moi { align-self: flex-end; align-items: flex-end; }
#gfc-chat .gfc-chat-lui { align-self: flex-start; align-items: flex-start; }
#gfc-chat .gfc-chat-bulle {
    padding: 8px 11px; border-radius: 12px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere;
}
#gfc-chat .gfc-chat-moi .gfc-chat-bulle { background: #f39200; color: #fff; border-bottom-right-radius: 4px; }
#gfc-chat .gfc-chat-lui .gfc-chat-bulle { background: #fff; color: #222; border: 1px solid #e2e2e2; border-bottom-left-radius: 4px; }
#gfc-chat .gfc-chat-meta { font-size: 11px; color: #888; margin-top: 2px; }
#gfc-chat .gfc-chat-ident { padding: 10px 12px 0; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid #e5e5e5; }
#gfc-chat .gfc-chat-ident-titre { margin: 0; font-size: 12px; color: #555; }
#gfc-chat input, #gfc-chat textarea {
    width: 100%; border: 1px solid #ccc; border-radius: 8px; padding: 8px 10px;
    font: inherit; color: #222; background: #fff; margin: 0;
}
#gfc-chat input:focus, #gfc-chat textarea:focus { outline: 2px solid #f39200; outline-offset: -1px; border-color: #f39200; }
#gfc-chat .gfc-chat-form { display: flex; gap: 8px; padding: 10px 12px; align-items: flex-end; }
#gfc-chat .gfc-chat-saisie { resize: none; height: 54px; }
#gfc-chat .gfc-chat-envoyer {
    flex: 0 0 auto; height: 40px; padding: 0 14px; border: 0; border-radius: 8px;
    background: #f39200; color: #fff; font-weight: 700; cursor: pointer;
}
#gfc-chat .gfc-chat-envoyer:disabled { opacity: .6; cursor: wait; }
#gfc-chat .gfc-chat-compteur { display: block; padding: 0 12px; font-size: 11px; color: #888; text-align: right; }
#gfc-chat .gfc-chat-compteur:empty { display: none; }
#gfc-chat .gfc-chat-err { margin: 0 12px 10px; color: #c0392b; font-size: 12px; }

@media (max-width: 600px) {
    #gfc-chat { right: 0; bottom: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; }
    html.gfc-chat-ouvert, html.gfc-chat-ouvert body { overflow: hidden; }
    #gfc-chat input, #gfc-chat textarea { font-size: 16px; } /* évite le zoom auto d'iOS */
}
