/* TOUBA ELECTRONIQUE v2.1 — styles des nouveautés (fichier séparé : jamais d'ancienne version en cache)
   Logo, cartes produit, discussion en direct (bulle empilée au-dessus du bouton WhatsApp). */
/* v2 — logo configurable */
.logo-img{height:38px;width:auto;max-width:150px;object-fit:contain;border-radius:8px}
/* v2 — cartes produit : « Commander » + petite icône WhatsApp côte à côte, jamais coupés (téléphone, tablette, ordinateur) */
.carte,.carte-corps{min-width:0}
.carte-actions{display:flex;flex-direction:row;align-items:stretch;gap:6px}
.carte-actions form{flex:1 1 auto;min-width:0;display:flex}
.carte-actions form .btn,.carte-actions>.btn-gris{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;justify-content:center}
.carte-actions .btn-wa{flex:0 0 40px;width:40px;min-width:40px;padding:0;display:grid;place-items:center;color:#fff}
.carte-actions .lbl-wa{display:none}
@media (max-width:1024px){
  .carte-actions .btn{min-height:40px;font-size:.84rem;padding:8px 6px}
  .carte-actions .btn-wa{padding:0}
}
@media (max-width:380px){.carte-actions form .btn svg{display:none}}
.badges .badge{max-width:calc(100% - 4px);white-space:nowrap}
@media (max-width:860px){.wa-flottant{width:50px;height:50px}.wa-flottant svg{width:26px;height:26px}}
@media (max-width:860px){.fiche-cmd .btn,.fiche .btn-grand{min-height:50px;width:100%}.fiche-contact,.contact-direct{gap:10px}}
/* v2 — discussion en direct (bulle + fenêtre) */
.chat{position:fixed;right:16px;bottom:154px;z-index:70;font-size:.92rem}
@media (min-width:861px){.chat{bottom:96px}}
.chat-bulle{position:relative;width:52px;height:52px;border-radius:50%;border:0;cursor:pointer;background:linear-gradient(135deg,var(--acc),#6366f1);color:#fff;display:grid;place-items:center;box-shadow:0 10px 24px -8px rgba(14,165,233,.8);padding:0}
.chat-bulle img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.chat-nb{position:absolute;top:-4px;right:-4px;background:#ef4444;color:#fff;border-radius:999px;font-size:.72rem;min-width:20px;height:20px;display:grid;place-items:center;padding:0 5px;border:2px solid #fff}
.chat-clignote{animation:chatClignote 1s ease-in-out infinite}
@keyframes chatClignote{0%,100%{transform:scale(1);box-shadow:0 0 0 0 rgba(239,68,68,.6)}50%{transform:scale(1.12);box-shadow:0 0 0 12px rgba(239,68,68,0)}}
.chat-conseiller .chat-bulle::after{content:"";position:absolute;bottom:2px;right:2px;width:12px;height:12px;border-radius:50%;background:#22c55e;border:2px solid #fff}
.chat-fen{position:absolute;right:0;bottom:62px;width:360px;max-width:calc(100vw - 32px);height:min(540px,calc(100vh - 220px));background:#fff;border-radius:18px;box-shadow:0 24px 60px -12px rgba(2,6,23,.45);display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--ligne,#e2e8f0)}
.chat-tete{display:flex;align-items:center;gap:10px;padding:10px 12px;background:linear-gradient(135deg,#0b1b33,#12284a);color:#fff}
.chat-logo{width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.15);display:grid;place-items:center;overflow:hidden;flex:none}.chat-logo img{width:100%;height:100%;object-fit:cover}
.chat-titre{flex:1;display:flex;flex-direction:column;line-height:1.2}.chat-titre small{opacity:.8;font-size:.74rem}
.chat-x{background:rgba(255,255,255,.12);border:0;color:#fff;border-radius:10px;width:36px;height:36px;cursor:pointer;display:grid;place-items:center}
.chat-corps{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:8px;background:#f8fafc}
.chat-m{max-width:85%;padding:8px 11px;border-radius:14px;background:#fff;border:1px solid #e2e8f0;align-self:flex-start;word-wrap:break-word}
.chat-m small{display:block;font-size:.7rem;color:#64748b;font-weight:700}.chat-m time{display:block;font-size:.66rem;color:#94a3b8;text-align:right}
.chat-visiteur{align-self:flex-end;background:var(--acc);color:#fff;border-color:transparent}.chat-visiteur time{color:rgba(255,255,255,.8)}
.chat-agent{background:#ecfdf5;border-color:#a7f3d0}
.chat-systeme{align-self:center;background:transparent;border:0;font-style:italic;color:#64748b;font-size:.78rem;text-align:center}
.chat-faq{display:flex;gap:6px;overflow-x:auto;padding:8px 10px;border-top:1px solid #e2e8f0;background:#fff;scrollbar-width:thin}
.chat-q{flex:none;border:1px solid #cbd5e1;background:#fff;border-radius:999px;padding:6px 10px;font-size:.78rem;cursor:pointer;white-space:nowrap;color:#0f172a}
.chat-q:hover{border-color:var(--acc);color:var(--acc)}
.chat-saisie{display:flex;gap:6px;padding:8px 10px;border-top:1px solid #e2e8f0;background:#fff}
.chat-saisie input{flex:1;border:1px solid #cbd5e1;border-radius:12px;padding:9px 11px;font:inherit;min-width:0}
.chat-pied{font-size:.72rem;text-align:center;padding:4px 8px 8px;background:#fff;color:#64748b}.chat-pied a{color:#0369a1}
@media (max-width:520px){
  .chat{right:12px;bottom:150px}
  .chat-bulle{width:46px;height:46px}
  .chat-ouvert{left:8px;right:8px}
  .chat-ouvert .chat-fen{position:fixed;left:8px;right:8px;bottom:74px;width:auto;max-width:none;height:min(62vh,500px);border-radius:16px}
  .chat-ouvert .chat-bulle{display:none}
}
body.miroir .chat{display:none!important}
@media print{.chat{display:none}}
/* v2 — correctifs téléphone : la galerie ne doit jamais élargir la page (les boutons Commander et WhatsApp restent visibles) */
.fiche>*,.cmd-grille>*,.fiche-details>*{min-width:0}
html,body{overflow-x:hidden}
.contact-direct .btn,.fiche-cmd .btn{white-space:normal;line-height:1.2}
@media (max-width:520px){.contact-direct{grid-template-columns:1fr!important}.fiche-cmd{grid-template-columns:1fr}.fiche-cmd .qte{justify-self:start}}
.chat-fen[hidden],.chat-nb[hidden],.chat[hidden]{display:none!important}
/* v2.1 — questions fréquentes : liste complète ou repliée (la réponse reste visible) */
.chat-faq{flex-wrap:wrap;overflow-x:visible}
.chat-faq .chat-q-liste{display:none;flex-wrap:wrap;gap:6px;width:100%}
.chat-faq-liste{max-height:46%;overflow-y:auto}
.chat-faq-liste .chat-q-liste{display:flex}
.chat-faq-liste .chat-q{white-space:normal;text-align:left;line-height:1.25}
.chat-faq-liste .chat-q-autres{display:none}
.chat-faq .chat-q-fermer{display:none;margin-left:auto;border:0;background:none;color:#64748b;font-size:.74rem;cursor:pointer;padding:2px 4px}
.chat-faq-liste .chat-q-fermer{display:block}
.chat-faq-reduit{padding:6px 10px}
.chat-q-autres{background:#f0f9ff;border-color:#bae6fd;color:#0369a1;font-weight:700}
.chat-bot div{white-space:normal}
.chat-faq-liste{max-height:36%}
.chat-faq-liste .chat-q{padding:5px 9px}
@media (max-width:860px){.chat-ouvert .chat-fen{height:min(72vh,580px)}.chat-faq-liste{max-height:34%}}
.chat.chat-ouvert{z-index:120}

/* Bulle de discussion empilée juste au-dessus du bouton WhatsApp, toujours visible */
.chat{position:fixed;right:20px;bottom:150px;z-index:75}
.wa-flottant{right:16px}
@media (max-width:860px){.chat{right:18px;bottom:150px}.wa-flottant{bottom:84px}}
@media (min-width:861px){.chat{right:20px;bottom:94px}.wa-flottant{bottom:24px}}
/* v2.3 — numéros cliquables dans la discussion : appeler / WhatsApp */
.chat-num { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; vertical-align: middle; margin: 2px 0; }
.chat-num a { display: inline-block; padding: 3px 9px; border-radius: 999px; font-weight: 700; font-size: .92em; text-decoration: none; line-height: 1.5; white-space: nowrap; }
.chat-num .chat-tel { background: #e8f0fe; color: #1a56c4; border: 1px solid #bcd0f5; }
.chat-num .chat-wa { background: #25d366; color: #fff; border: 1px solid #1fb457; }
.chat-num a:active { transform: scale(.97); }
.chat-m a { word-break: break-all; }
/* v2.3.1 — WhatsApp et Appeler bien visibles EN HAUT de la discussion */
.chat-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px; background: #fff; border-bottom: 1px solid #e5e9f0; }
.chat-contact a { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 10px; border-radius: 12px; font-weight: 800; font-size: 15.5px; text-decoration: none; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.chat-contact a:active { transform: scale(.97); }
.chat-contact .chat-contact-wa { background: #25d366; }
.chat-contact .chat-contact-tel { background: #1a56c4; }
.chat-contact a:only-child { grid-column: 1 / -1; }
.chat-contact svg { width: 20px; height: 20px; flex: none; }
