#rappel-immediat {
  --ri-banner-width: 46px;
  --ri-radius: 18px;
  --ri-shadow-closed: 0 14px 34px -22px rgba(15, 23, 42, 0.52);
  --ri-shadow-open: 0 28px 50px -24px rgba(15, 23, 42, 0.62);
  position: fixed;
  inset-inline-end: 14px;
  inset-block-start: 40vh;
  width: min(420px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  display: grid;
  grid-template-columns: var(--ri-banner-width) minmax(0, 1fr);
  align-items: stretch;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 56%),
    var(--bg-color, #ffffff);
  color: var(--text-color, #1f2937);
  border-radius: var(--ri-radius);
  overflow: hidden;
  box-shadow: var(--ri-shadow-closed);
  transform: translateX(calc(100% - var(--ri-banner-width)));
  transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
  z-index: 9999;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  isolation: isolate;
  pointer-events: none;
  backdrop-filter: saturate(115%) blur(2px);
}

#rappel-immediat,
#rappel-immediat * {
  box-sizing: border-box;
}

#rappel-immediat.shown,
#rappel-immediat.active {
  transform: translateX(0);
  box-shadow: var(--ri-shadow-open);
  pointer-events: auto;
}

.rappel-immediat__callback-banner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 12px 6px;
  gap: 10px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    var(--bg-color, #0f766e);
  color: var(--text-color, #ffffff);
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.18);
}

.rappel-immediat__callback-banner::after {
  content: "";
  width: 22px;
  height: 22px;
  display: inline-block;
  margin: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233A14 14 0 0 0 13.832 16.568z'/></svg>")
    center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233A14 14 0 0 0 13.832 16.568z'/></svg>")
    center / contain no-repeat;
}

.rappel-immediat__callback-banner > p {
  margin: 0;
  padding: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-orientation: mixed;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.08;
}

.rappel-immediat__container {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  min-height: 200px;
  padding: 18px 16px;
  color: var(--text-color, #1f2937);
  text-align: left;
  overflow: auto;
  max-height: min(78vh, 540px);
  overscroll-behavior: contain;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 45%);
}

.rappel-immediat__title {
  margin: 0;
  text-transform: none;
  text-align: left;
  line-height: 1.3;
  font-size: clamp(16px, 1.1vw + 11px, 20px);
  letter-spacing: -0.01em;
  font-weight: 700;
}

.rappel-immediat__content {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 14px;
}

.rappel-immediat__image {
  width: clamp(72px, 20vw, 112px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

#rappel-immediat__form {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

#rappel-immediat label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  opacity: 0.88;
}

#rappel-immediat input {
  width: 100%;
  flex: 1; min-width: 0;
  min-height: 40px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid currentColor;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.48);
  color: inherit;
  font-size: 15px;
  line-height: 1.2;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#rappel-immediat input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.14);
}

#rappel-immediat input::placeholder {
  color: inherit;
  opacity: 0.58;
}

.rappel-immediat__form-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

#rappel-immediat button {
  width: 42px;
  height: 40px;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  display: grid;
  place-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0)),
    var(--bg-color, #0f766e);
  color: var(--text-color, #ffffff);
  cursor: pointer;
  box-shadow: 0 10px 18px -16px rgba(15, 23, 42, 0.85);
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

#rappel-immediat button::after {
  content: "";
  width: 20px;
  height: 20px;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233A14 14 0 0 0 13.832 16.568z'/></svg>")
    center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233A14 14 0 0 0 13.832 16.568z'/></svg>")
    center / contain no-repeat;
}

#rappel-immediat button:hover,
#rappel-immediat button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px -16px rgba(15, 23, 42, 0.9);
}

#rappel-immediat button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

#rappel-immediat p.rappel-immediat__closed-text {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.rappel-immediat__form-message {
  position: absolute;
  inset-inline: 10px;
  top: 10px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 16px 30px -22px rgba(15, 23, 42, 0.68);
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
  z-index: 2;
}

.rappel-immediat__form-message.error {
  background: #b91c1c;
  color: #ffffff;
}

@media (max-width: 680px) {
  #rappel-immediat {
    --ri-banner-width: 44px;
    inset-inline-end: 8px;
    inset-block-start: 26vh;
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    border-radius: 14px;
  }

  .rappel-immediat__callback-banner > p {
    font-size: 13px;
  }

  .rappel-immediat__container {
    padding: 15px 12px;
    gap: 12px;
  }

  .rappel-immediat__content {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 420px) {
  #rappel-immediat {
    inset-inline-end: 5px;
    inset-block-start: 20vh;
    width: calc(100vw - 10px);
    max-width: calc(100vw - 10px);
  }

  .rappel-immediat__container {
    min-height: 160px;
    padding: 12px 10px;
  }

  #rappel-immediat button {
    transform: none;
  }
}

@media (max-height: 620px) {
  #rappel-immediat {
    inset-block-start: 14vh;
  }

  .rappel-immediat__container {
    max-height: calc(100vh - 18px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #rappel-immediat,
  #rappel-immediat button {
    transition: none;
  }
}
