/**
 * CSNA-735 — Sticky d'assistance « Des questions ? » (tunnel + hub).
 *
 * Maquette Figma CSNA-2026, node 6758:42000 : bouton bordeaux 240 x 52,
 * panneau blanc 376 px au-dessus du bouton (gap 16 px), 48 px des bords
 * en desktop ; panneau bord à bord en mobile.
 */

.csna-help-sticky {
  position: fixed;
  right: 48px;
  bottom: 48px;
  z-index: 990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  font-family: Montserrat, sans-serif;
}

/* Des règles globales du thème forcent le display de certains éléments
   (ex. `.btn`) : l'état fermé / masqué doit toujours gagner. */
.csna-help-sticky[hidden],
.csna-help-sticky [hidden] {
  display: none !important;
}

.csna-help-sticky svg {
  display: block;
  flex: none;
}

.csna-help-sticky__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box;
  width: 240px;
  height: 52px;
  margin: 0;
  padding: 10px 20px 10px 18px;
  border: 0;
  border-radius: 100px;
  background: var(--color-light-red, #b00025);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #fff;
  font: 700 14px/1.2 Montserrat, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.csna-help-sticky__trigger:hover {
  background: var(--color-red, #a61833);
}

.csna-help-sticky__trigger:focus-visible,
.csna-help-sticky__close:focus-visible,
.csna-help-sticky__link:focus-visible {
  outline: 2px solid var(--color-black, #202020);
  outline-offset: 2px;
}

.csna-help-sticky__panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
  width: 376px;
  max-width: calc(100vw - 96px);
  padding: 22px 24px 24px;
  border: 1px solid var(--color-dark-gray, #e4dfdf);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
  color: var(--color-black, #202020);
  text-align: left;
}

.csna-help-sticky__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-dark-gray, #e4dfdf);
}

.csna-help-sticky__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--color-black, #202020);
  font: 700 18px/1.2 Montserrat, sans-serif;
}

.csna-help-sticky__badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-light-red, #b00025);
  color: #fff;
}

.csna-help-sticky__close {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f5f3f3;
  color: var(--color-black, #202020);
  cursor: pointer;
}

.csna-help-sticky__contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.csna-help-sticky__name {
  margin: 0;
  color: var(--color-black, #202020);
  font: 700 15px/1.25 Montserrat, sans-serif;
}

.csna-help-sticky__role {
  margin: 0;
  color: #666;
  font: 400 12px/1.45 Montserrat, sans-serif;
}

.csna-help-sticky__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-red, #a61833);
  font: 600 12px/1.2 Montserrat, sans-serif;
  text-decoration: none;
}

.csna-help-sticky__link:hover span {
  text-decoration: underline;
}

@media (max-width: 767px) {
  .csna-help-sticky {
    right: 16px;
    bottom: 16px;
  }

  /* Panneau bord à bord, posé au-dessus du bouton qui reste visible. */
  .csna-help-sticky__panel {
    position: fixed;
    right: 0;
    bottom: 84px;
    left: 0;
    width: auto;
    max-width: none;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
}
