/* ── MARC WIDGET ── */
#marc-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .75rem;
  pointer-events: none;
}

/* ── BUBBLE ── */
.marc-bubble {
  background: #FFFFFF;
  border: 1px solid rgba(30,45,90,.1);
  border-radius: 16px 16px 4px 16px; /* pointe en bas à droite */
  box-shadow: 0 8px 40px rgba(30,45,90,.18), 0 2px 8px rgba(30,45,90,.08);
  padding: 1.125rem 1.25rem 1rem;
  max-width: 290px;
  min-width: 250px;
  pointer-events: auto;
  position: relative;
  transform: translateY(12px);
  opacity: 0;
  transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .35s cubic-bezier(.4,0,.2,1);
}
.marc-bubble.marc-visible {
  transform: translateY(0);
  opacity: 1;
}

/* Header de la bulle */
.marc-bubble-header {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding-bottom: .75rem;
  margin-bottom: .75rem;
  border-bottom: 1px solid rgba(30,45,90,.07);
}
.marc-bubble-avatar-mini {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid #C9A052;
  flex-shrink: 0;
  background: #131D3C;
}
.marc-bubble-avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.marc-bubble-id {
  flex: 1;
  min-width: 0;
}
.marc-bubble-name {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: .8125rem;
  font-weight: 700;
  color: #1E2D5A;
  line-height: 1.2;
}
.marc-bubble-role {
  font-size: .625rem;
  font-weight: 500;
  color: #8090B0;
  margin-top: 1px;
}
.marc-live-dot {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .6rem;
  font-weight: 600;
  color: #3BAA70;
  flex-shrink: 0;
}
.marc-live-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3BAA70;
  animation: marc-blink 2s ease-in-out infinite;
}
@keyframes marc-blink {
  0%,100% { opacity: 1; }
  50%      { opacity: .35; }
}

/* Message */
.marc-msg {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: .8125rem;
  color: #4A5878;
  line-height: 1.65;
  margin: 0 0 .875rem;
  font-weight: 400;
}

/* CTA */
.marc-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #C9A052;
  color: #131D3C;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: .75rem;
  font-weight: 800;
  padding: .625rem 1rem;
  border-radius: 100px;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
  width: 100%;
  cursor: pointer;
  border: none;
  box-shadow: 0 3px 12px rgba(201,160,82,.35);
  margin-bottom: .5rem;
}
.marc-cta-btn:hover {
  background: #B8902A;
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(201,160,82,.45);
}

/* Note rassurante "pas un bot" */
.marc-human-note {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: .625rem;
  color: #8090B0;
  justify-content: center;
}
.marc-human-note::before {
  content: '📞';
  font-size: .7rem;
}

/* Bouton fermer */
.marc-close {
  position: absolute;
  top: .625rem;
  right: .625rem;
  background: none;
  border: none;
  cursor: pointer;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8090B0;
  font-size: .9rem;
  border-radius: 50%;
  transition: background .15s, color .15s;
  padding: 0;
  font-family: system-ui, sans-serif;
  line-height: 1;
}
.marc-close:hover {
  background: rgba(30,45,90,.07);
  color: #1E2D5A;
}

/* ── AVATAR BUTTON ── */
.marc-avatar-btn {
  pointer-events: auto;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: 0;
  position: relative;
}
.marc-avatar-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid #C9A052;
  box-shadow: 0 4px 20px rgba(30,45,90,.25), 0 0 0 4px rgba(201,160,82,.15);
  transition: transform .25s ease, box-shadow .25s ease;
  background: #131D3C;
  position: relative;
}
.marc-avatar-btn:hover .marc-avatar-ring {
  transform: scale(1.06);
  box-shadow: 0 6px 28px rgba(30,45,90,.3), 0 0 0 5px rgba(201,160,82,.22);
}
.marc-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.marc-label {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: .5625rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #4A5878;
  background: #FFFFFF;
  border: 1px solid rgba(201,160,82,.35);
  border-radius: 100px;
  padding: 2px 8px;
  box-shadow: 0 1px 6px rgba(30,45,90,.1);
  white-space: nowrap;
}
.marc-notif {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #C9A052;
  color: #131D3C;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: .6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  animation: marc-pulse-notif 2s ease-in-out infinite;
}
.marc-notif.marc-hidden { display: none; }

/* ── ANIMATIONS ── */
@keyframes marc-pulse-ring {
  0%   { box-shadow: 0 4px 20px rgba(30,45,90,.25), 0 0 0 0   rgba(201,160,82,.5); }
  60%  { box-shadow: 0 4px 20px rgba(30,45,90,.25), 0 0 0 10px rgba(201,160,82,0); }
  100% { box-shadow: 0 4px 20px rgba(30,45,90,.25), 0 0 0 0   rgba(201,160,82,0); }
}
@keyframes marc-pulse-notif {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.2); }
}
.marc-avatar-ring.marc-pulsing {
  animation: marc-pulse-ring 2s ease-out 3;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  #marc-widget {
    bottom: 5rem; /* au-dessus de la sticky mobile bar */
    right: 1rem;
  }
  .marc-bubble {
    max-width: calc(100vw - 5rem);
    min-width: 200px;
  }
}
