/* v 20261126c (Raph 26/11) : meme CADRE que la fenetre conseiller (99-gfc-chat-commercial-20261126c.css) : 430 x 640 px au plus,
   bas 101 px, haut 20 px minimum ; seuil telephone 600 px (avant 767 : entre 601 et 767 px l'IA etait plein ecran et le
   conseiller en fenetre). Retour arriere : remettre 99-gfc-bulle-ia-20261126b.css. */
/* 26/11/2026 v 20261126b (Raph, varnish2) : fenetre de l'assistant IA de la bulle « Besoin d'aide ? »,
   meme mise en forme que la fenetre conseiller (#gfc-chat, css/autoload/99-gfc-chat-commercial-20261125b.css) :
   en-tete sombre #222, bouton rond « ← » a gauche, avatar rond, nom en gras + ligne d'etat, croix ; corps gris #f4f4f4 ;
   champ encadre orange + bouton « Envoyer » orange plein.
   JS : js/autoload/99-gfc-bulle-ia-20261126b.js. Remplace 99-gfc-bulle-ia-20261124a.css (renomme .desactive-20261126b).
   Selecteurs prefixes + !important la ou le theme force ses styles (span, boutons, textarea). */
#gfc-ia-fenetre, #gfc-ia-fenetre * { box-sizing: border-box; }
#gfc-ia-fenetre{position:fixed;right:20px;bottom:101px;z-index:10000;width:360px;max-width:calc(100vw - 20px);
  height:520px;max-height:calc(100vh - 121px);display:flex;flex-direction:column;background:#fff;color:#222;
  border-radius:14px;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;
  overflow:hidden;text-align:left}

/* ---- en-tete ---- */
#gfc-ia-fenetre .gfc-ia-tete{display:flex;align-items:center;gap:10px;background:#222;color:#fff;padding:12px 10px 12px 14px;flex:0 0 auto}
#gfc-ia-fenetre .gfc-ia-retour-tete{flex:0 0 40px;width:40px;height:40px;min-height:0;margin:-4px 0 -4px -6px;padding:0;border:0;border-radius:50%;
  background:rgba(255,255,255,.14)!important;color:#fff!important;cursor:pointer;box-shadow:none!important;
  display:flex;align-items:center;justify-content:center}
#gfc-ia-fenetre .gfc-ia-retour-tete:hover{background:rgba(255,255,255,.28)!important}
#gfc-ia-fenetre .gfc-ia-retour-tete svg{display:block}
#gfc-ia-fenetre .gfc-ia-avatar{flex:0 0 38px;width:38px;height:38px;border-radius:50%;overflow:hidden;position:relative;
  background:#ffeacb;display:flex;align-items:center;justify-content:center;font-size:24px;line-height:1}
#gfc-ia-fenetre .gfc-ia-avatar img{position:absolute;left:0;top:0;width:100%;height:100%;display:block;max-width:none;margin:0;padding:0;border:0;
  border-radius:50%;object-fit:cover}
#gfc-ia-fenetre .gfc-ia-avatar-detail img{transform:scale(1.35);transform-origin:50% 38%;border-radius:0}
#gfc-ia-fenetre .gfc-ia-titres{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}
#gfc-ia-fenetre .gfc-ia-titre{margin:0;font-size:15px;font-weight:700!important;color:#fff;line-height:1.25;text-transform:none}
#gfc-ia-fenetre .gfc-ia-titre-serv{font-weight:400!important;font-size:12px;color:#ddd}
#gfc-ia-fenetre .gfc-ia-sous{display:flex;align-items:flex-start;gap:6px;margin:0;font-size:12px;color:#ddd;line-height:1.35}
#gfc-ia-fenetre .gfc-ia-pastille{flex:0 0 9px;width:9px;height:9px;margin-top:4px;border-radius:50%;background:#9a9a9a}
#gfc-ia-fenetre .gfc-ia-pastille.gfc-ia-on{background:#2ecc40;box-shadow:0 0 0 3px rgba(46,204,64,.25)}
#gfc-ia-fenetre .gfc-ia-x,#gfc-ia-fenetre .gfc-ia-nouvelle{flex:0 0 auto;min-width:36px;width:36px;height:36px;min-height:0;margin:0;padding:0;border:0;
  border-radius:50%;background:transparent!important;color:#fff!important;cursor:pointer;box-shadow:none!important;
  font:400 26px/36px Arial,sans-serif;text-align:center}
/* « nouvelle conversation » : discret */
#gfc-ia-fenetre .gfc-ia-nouvelle{font-size:17px;opacity:.6;margin-right:-6px}
#gfc-ia-fenetre .gfc-ia-nouvelle:hover{opacity:1}
#gfc-ia-fenetre .gfc-ia-x:hover,#gfc-ia-fenetre .gfc-ia-nouvelle:hover{background:rgba(255,255,255,.2)!important}
#gfc-ia-fenetre .gfc-ia-retour-tete:focus-visible,#gfc-ia-fenetre .gfc-ia-x:focus-visible,#gfc-ia-fenetre .gfc-ia-nouvelle:focus-visible{outline:2px solid #f39200;outline-offset:2px}

/* ---- fil de messages ---- */
#gfc-ia-fenetre .gfc-ia-fil{flex:1 1 auto;min-height:0;overflow-y:auto;padding:12px;background:#f4f4f4;display:flex;flex-direction:column;gap:8px;
  -webkit-overflow-scrolling:touch}
#gfc-ia-fenetre .gfc-ia-msg{max-width:82%;margin:0;padding:8px 11px;border-radius:12px;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}
#gfc-ia-fenetre .gfc-ia-ia{align-self:flex-start;background:#fff;color:#222;border:1px solid #e2e2e2;border-bottom-left-radius:4px}
#gfc-ia-fenetre .gfc-ia-client{align-self:flex-end;background:#f39200;color:#fff;border-bottom-right-radius:4px}
#gfc-ia-fenetre .gfc-ia-msg a{color:#c46f00;text-decoration:underline;word-break:break-all}
#gfc-ia-fenetre .gfc-ia-panne{background:#fff8ec;border-color:#f7c98a}
#gfc-ia-fenetre .gfc-ia-btn-conseiller-inline{display:block;margin-top:8px;padding:8px 12px;border:0;border-radius:8px;background:#f39200!important;
  color:#fff!important;font:700 13px/1.2 "Open Sans",Arial,sans-serif;cursor:pointer;box-shadow:none}
#gfc-ia-fenetre .gfc-ia-ecrit{flex:0 0 auto;padding:4px 14px;font-size:12px;font-style:italic;color:#777;background:#f4f4f4}
#gfc-ia-fenetre .gfc-ia-ecrit[hidden]{display:none}
#gfc-ia-fenetre .gfc-ia-ecrit:after{content:"";display:inline-block;width:14px;text-align:left;animation:gfcIaPoints 1.2s steps(4) infinite}
@keyframes gfcIaPoints{0%{content:""}25%{content:"."}50%{content:".."}75%{content:"..."}}

/* ---- suggestions (bloc de 99-gfc-assistant-ia-suggestions) : fond blanc comme le bas de la fenetre conseiller ---- */
#gfc-ia-fenetre .gfc-ia-sugg{background:#fff!important;border-top:1px solid #e5e5e5!important}
#gfc-ia-fenetre .gfc-ia-sugg-btn{border-color:#f39200!important;color:#222!important;font-family:"Open Sans",Arial,sans-serif!important}
#gfc-ia-fenetre .gfc-ia-sugg-bascule{color:#555!important;font-family:"Open Sans",Arial,sans-serif!important}

/* ---- saisie ---- */
#gfc-ia-fenetre .gfc-ia-form{display:flex;gap:8px;align-items:flex-end;padding:10px 12px;border-top:1px solid #e5e5e5;background:#fff;flex:0 0 auto;margin:0}
#gfc-ia-fenetre textarea.gfc-ia-saisie{flex:1 1 auto;width:100%;height:54px!important;min-height:54px!important;max-height:110px;resize:none;margin:0;
  padding:8px 10px!important;border:1px solid #f39200!important;border-radius:8px!important;box-shadow:none!important;
  font:14px/1.4 "Open Sans",Arial,sans-serif!important;color:#222!important;background:#fff!important}
#gfc-ia-fenetre textarea.gfc-ia-saisie:focus{outline:2px solid #f39200;outline-offset:-1px;border-color:#f39200!important}
#gfc-ia-fenetre .gfc-ia-envoyer{flex:0 0 auto;width:auto;height:40px;min-height:0;margin:0;padding:0 14px;border:0;border-radius:8px;
  background:#f39200!important;color:#fff!important;font:700 14px/40px "Open Sans",Arial,sans-serif!important;cursor:pointer;box-shadow:none!important;
  text-transform:none;letter-spacing:0}
#gfc-ia-fenetre .gfc-ia-envoyer:hover{background:#e07f0a!important}
#gfc-ia-fenetre .gfc-ia-envoyer:disabled{opacity:.6;cursor:wait}
#gfc-ia-fenetre .gfc-ia-compteur{flex:0 0 auto;padding:0 12px;font-size:11px;color:#888;text-align:right;background:#fff}
#gfc-ia-fenetre .gfc-ia-compteur:empty{display:none}

html.gfc-chat-ouvert #gfc-ia-fenetre{display:none!important}

/* ordinateur / tablette : meme gabarit que la fenetre conseiller agrandie (430 px, textes 15 px) */
@media (min-width:601px){
  #gfc-ia-fenetre{width:430px;max-width:calc(100vw - 40px);height:640px;font-size:15px}
  #gfc-ia-fenetre .gfc-ia-titre{font-size:16px}
  #gfc-ia-fenetre .gfc-ia-titre-serv,#gfc-ia-fenetre .gfc-ia-sous{font-size:13px}
  #gfc-ia-fenetre .gfc-ia-avatar{flex-basis:44px;width:44px;height:44px}
  #gfc-ia-fenetre textarea.gfc-ia-saisie{height:62px!important;min-height:62px!important;font-size:15px!important}
  #gfc-ia-fenetre .gfc-ia-envoyer{height:44px;padding:0 18px;font-size:15px!important;line-height:44px!important}
}
/* telephone : plein ecran, en-tete sous l'encoche, cibles 44 px */
@media (max-width:600px){
  #gfc-ia-fenetre{right:0;left:auto;bottom:0;top:0;width:100%;max-width:none;height:auto;max-height:none;border-radius:0}
  #gfc-ia-fenetre .gfc-ia-tete{padding-top:calc(12px + env(safe-area-inset-top,0px))}
  #gfc-ia-fenetre .gfc-ia-retour-tete{flex-basis:44px;width:44px;height:44px}
  #gfc-ia-fenetre .gfc-ia-x{min-width:44px;width:44px;height:44px;line-height:44px}
  #gfc-ia-fenetre textarea.gfc-ia-saisie{font-size:16px!important} /* evite le zoom auto d'iOS */
  html.gfc-ia-ouvert #gfc-bulle-tchat{display:none!important}
  /* comme la fenetre conseiller : la page derriere ne defile plus (plus de barre de defilement a cote de la fenetre) */
  html.gfc-ia-ouvert,html.gfc-ia-ouvert body{overflow:hidden}
}
@media print{#gfc-ia-fenetre{display:none!important}}
