/* MYLOCALEXPLORE — MyAssistant floating launcher */
#mle-myassistant { position:fixed; right:max(18px,env(safe-area-inset-right)); bottom:calc(22px + env(safe-area-inset-bottom)); z-index:9990; font-family:inherit; }
#mle-myassistant .mle-ma-trigger { width:56px; height:56px; border:0; border-radius:50%; padding:9px; display:flex; justify-content:center; align-items:center; background:#0d865c; box-shadow:0 5px 20px rgba(0,52,35,.24); cursor:pointer; transition:opacity .2s ease, transform .2s ease; }
#mle-myassistant .mle-ma-trigger img {width:100%;height:100%;object-fit:contain;}
#mle-myassistant.mle-ma-hidden .mle-ma-trigger {opacity:0;transform:translateY(18px) scale(.84);pointer-events:none;}
#mle-myassistant .mle-ma-panel {position:absolute;right:0;bottom:69px;width:min(300px,calc(100vw - 36px));border-radius:15px;padding:16px;background:white;color:#243e32;border:1px solid #dce9e0;box-shadow:0 8px 32px rgba(7,41,28,.18);}
#mle-myassistant .mle-ma-panel[hidden] {display:none!important;}
#mle-myassistant .mle-ma-title {font-size:16px;font-weight:700;margin:0 26px 7px 0;}
#mle-myassistant .mle-ma-description {margin:0;line-height:1.45;font-size:13px;}
#mle-myassistant .mle-ma-close {position:absolute;top:10px;right:10px;border:0;background:transparent;font-size:23px;color:#355c48;cursor:pointer;line-height:1;}
@media (max-width:500px) { #mle-myassistant {right:15px;bottom:calc(16px + env(safe-area-inset-bottom));} #mle-myassistant .mle-ma-trigger {width:50px;height:50px;} }
@media (prefers-reduced-motion:reduce) { #mle-myassistant .mle-ma-trigger {transition:none;} }
#mle-myassistant .mle-ma-panel{width:min(350px,calc(100vw - 30px));padding:0;overflow:hidden;display:flex;flex-direction:column;max-height:min(520px,75dvh)}
#mle-myassistant .mle-ma-top{background:#11694c;color:white;display:flex;gap:8px;align-items:center;padding:13px}
#mle-myassistant .mle-ma-title{flex:1;color:white;margin:0;font-size:16px}
#mle-myassistant .mle-ma-lang{font-size:12px;max-width:88px;background:white;color:#124b38;border:0;border-radius:6px;padding:4px}
#mle-myassistant .mle-ma-close{position:static;color:white;font-size:25px;padding:0 3px}
#mle-myassistant .mle-ma-messages{padding:12px;overflow:auto;min-height:180px;max-height:330px;flex:1;background:#f7faf8}
#mle-myassistant .mle-ma-msg{margin:0 0 10px;font-size:13px;line-height:1.5;padding:9px 11px;max-width:91%;white-space:pre-wrap;overflow-wrap:anywhere;border-radius:12px}
#mle-myassistant .mle-ma-bot{background:#e1f1e7;color:#1b4634}
#mle-myassistant .mle-ma-me{background:#16835e;color:white;margin-left:auto}
#mle-myassistant .mle-ma-form{display:flex;gap:6px;border-top:1px solid #e6eee8;padding:9px;background:white;margin:0}
#mle-myassistant .mle-ma-form input{min-width:0;flex:1;border:1px solid #d5e3da;border-radius:22px;padding:10px;color:#183d2b;background:white;font-size:14px}
#mle-myassistant .mle-ma-form button{border:0;border-radius:50%;background:#0d865c;color:white;width:39px;height:39px;cursor:pointer}
#mle-myassistant .mle-ma-form button:disabled{opacity:.5}

/* v2.4.26: simple bubble, stable panel and no disruptive animation */
#mle-myassistant .mle-ma-trigger{width:50px;height:50px;padding:0;background:#13845f;color:#fff;box-shadow:0 3px 12px rgba(0,50,32,.19);transition:opacity .15s ease;align-items:center;justify-content:center}
#mle-myassistant .mle-ma-chat-icon,#mle-myassistant .mle-ma-chat-icon svg{display:block;width:26px;height:26px}
#mle-myassistant.mle-ma-hidden:not(.mle-ma-open) .mle-ma-trigger{opacity:0;transform:none;pointer-events:none}
#mle-myassistant.mle-ma-open .mle-ma-trigger{opacity:1;pointer-events:auto;transform:none}
@media(max-width:500px){#mle-myassistant .mle-ma-trigger{width:48px;height:48px}}


/* v2.4.28 — Bulbe discrète au-dessus du menu fixe des téléphones.
   Le panneau reste ancré à la bulle et accessible sur écran court. */
@media (max-width: 639.98px) {
  #mle-myassistant {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  }
  #mle-myassistant .mle-ma-trigger {
    width: 42px;
    height: 42px;
    padding: 0;
  }
  #mle-myassistant .mle-ma-chat-icon,
  #mle-myassistant .mle-ma-chat-icon svg { width: 23px; height: 23px; }
  #mle-myassistant .mle-ma-panel {
    right: 0;
    bottom: 52px;
    width: min(340px, calc(100vw - 24px));
    max-height: min(490px, calc(100dvh - 175px - env(safe-area-inset-bottom, 0px)));
  }
  #mle-myassistant .mle-ma-top { padding: 11px; }
  #mle-myassistant .mle-ma-messages { min-height: 95px; }
}
@media (max-width: 359.98px) {
  #mle-myassistant { right: max(9px, env(safe-area-inset-right, 0px)); }
  #mle-myassistant .mle-ma-trigger { width: 40px; height: 40px; }
  #mle-myassistant .mle-ma-panel { width: min(310px, calc(100vw - 18px)); bottom: 49px; }
}
/* Tablettes en navigation mobile (l'onglet du bas est visible jusqu'à 1024 px). */
@media (min-width: 640px) and (max-width: 1023.98px) {
  #mle-myassistant { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  #mle-myassistant .mle-ma-panel { max-height: min(520px, calc(100dvh - 175px)); }
}

/* 2.4.31 — MyAssistant légèrement plus grand, sans recouvrir la navigation. */
#mle-myassistant .mle-ma-panel {width:min(390px,calc(100vw - 30px));max-height:min(590px,78dvh)}
#mle-myassistant .mle-ma-messages {max-height:395px;min-height:215px;font-size:14px}
#mle-myassistant .mle-ma-msg {font-size:14px}
@media (max-width:639.98px) {
  #mle-myassistant .mle-ma-trigger{width:50px;height:50px}
  #mle-myassistant .mle-ma-chat-icon,#mle-myassistant .mle-ma-chat-icon svg{width:27px;height:27px}
  #mle-myassistant .mle-ma-panel{bottom:60px;width:min(370px,calc(100vw - 24px));max-height:min(550px,calc(100dvh - 190px - env(safe-area-inset-bottom,0px)))}
  #mle-myassistant .mle-ma-messages{min-height:135px;max-height:380px}
}
@media (max-width:359.98px) {
  #mle-myassistant .mle-ma-trigger{width:46px;height:46px}
  #mle-myassistant .mle-ma-panel{bottom:55px;width:calc(100vw - 18px)}
}

/* 2.4.32 — La croix de fermeture est agrandie et remontée sur mobile.
   Surface tactile de 44×44px, sans déplacer le titre ou le sélecteur de langue. */
#mle-myassistant .mle-ma-close svg {display:block;width:24px;height:24px;pointer-events:none;}
@media (max-width: 639.98px) {
  #mle-myassistant .mle-ma-top {position:relative;padding-right:59px;}
  #mle-myassistant .mle-ma-close {
    position:absolute;top:1px;right:5px;
    width:44px;height:44px;padding:0;margin:0;
    display:flex;align-items:center;justify-content:center;
    border:0;background:transparent;color:#fff;
    cursor:pointer;touch-action:manipulation;
  }
  #mle-myassistant .mle-ma-close svg {width:32px;height:32px;}
  #mle-myassistant .mle-ma-close:focus-visible {outline:2px solid #fff;outline-offset:-3px;border-radius:8px;}
}
