/* ACTION EMPLOI – Chatbot (scénarisé, sans IA) */
.ae-chatbot {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* BOUTON FLOTTANT */
.ae-fab {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: #0B5FA5;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  display: grid;
  place-items: center;
}

.ae-fab svg {
  width: 34px;
  height: 34px;
}

/* PANNEAU */
.ae-panel {
  width: 360px;
  max-width: calc(100vw - 36px);
  height: 520px;
  max-height: calc(100vh - 110px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 55px rgba(0,0,0,.20);
  overflow: hidden;
  display: none;
  margin-bottom: 12px;
}

.ae-panel.is-open {
  display: block;
}

/* HEADER */
.ae-header {
  background: #0B5FA5;
  color: #fff;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ae-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ae-botmark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  display: grid;
  place-items: center;
}

.ae-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.1;
}

.ae-subtitle {
  font-size: 12px;
  opacity: .9;
}

.ae-header-actions button {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 10px;
  opacity: .95;
}

/* CORPS (MESSAGES) */
.ae-body {
  padding: 14px 14px 22px; /* + d’air en bas */
  height: calc(520px - 54px - 66px); /* header + footer */
  overflow-y: auto;
  background: #f6f7f9;
}

/* LIGNES */
.ae-row {
  margin: 10px 0;
  display: flex;
}

.ae-row.bot {
  justify-content: flex-start;
}

.ae-row.user {
  justify-content: flex-end;
}

/* BULLES */
.ae-bubble {
  max-width: 82%;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.35;
}

.ae-row.bot .ae-bubble {
  background: #ffffff;
  border: 1px solid #e6e8ee;
}

.ae-row.user .ae-bubble {
  background: #0B5FA5;
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
}

/* CHOIX / BOUTONS */
.ae-choices {
  display: grid;
  gap: 12px; /* + d’espace entre boutons */
  margin-top: 14px;
}

.ae-btn {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 13px 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  background: #0B5FA5;
  color: #fff;
  box-shadow: 0 8px 18px rgba(11,95,165,.18);
}

.ae-btn.secondary {
  background: #ffffff;
  color: #0B5FA5;
  border: 1px solid #d8e3f0;
  box-shadow: none;
}

/* FOOTER (INPUT) */
.ae-footer {
  background: #fff;
  border-top: 1px solid #e6e8ee;
  padding: 14px; /* + de confort */
  display: flex;
  align-items: center;
  gap: 10px;
}

.ae-input {
  flex: 1;
  border: 1px solid #e6e8ee;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  height: 44px;
  box-sizing: border-box;
}

.ae-send {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  background: #0B5FA5;
  display: grid;
  place-items: center;
}

.ae-send svg {
  width: 18px;
  height: 18px;
}

/* RESPONSIVE */
@media (max-width: 420px) {
  .ae-panel {
    width: calc(100vw - 36px);
  }
}

/* Animation de la bulle au hover */
.ae-fab{
  transition: transform .25s ease, box-shadow .25s ease;
  transform-origin: center;
}

/* Rotation plus marquée de la bulle */
.ae-fab:hover{
  transform: rotate(20deg) scale(1.05);
  box-shadow: 0 18px 42px rgba(0,0,0,.28);
}


/* PLUS D'AIR SOUS "Écrire votre message" + bouton envoyer */
.ae-footer{
  padding-bottom: 28px !important; /* augmente l'espace sous l'input */
}

/* IMPORTANT: on libère la place (sinon le footer est collé/coupé) */
.ae-body{
  height: calc(520px - 54px - 90px) !important; /* header 54 / footer ~90 */
}

/* Mobile: s'assurer que la bulle est visible */
.ae-chatbot{
  z-index: 2147483647 !important; /* au-dessus de tout */
}

/* Evite que le bas soit caché par barres / boutons */
@media (max-width: 768px){
  .ae-chatbot{
    right: 14px;
    bottom: 90px; /* remonte au-dessus des éléments sticky */
  }
}

@media (max-width: 768px){
  .ae-chatbot{
    position: fixed !important;
  }
}
