/* Astuces et bulles d'aide de « Mon compte ». */

.tip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--warn-border);
  border-radius: var(--radius-md);
  background: var(--warn-bg);
  color: var(--warn-text);
}

.tip-icon {
  flex: none;
  font-size: calc(1.25rem * var(--text-scale, 1));
  line-height: 1;
}

.tip-text {
  flex: 1;
  margin: 0;
  line-height: 1.45;
}

.tip-text strong {
  color: var(--warn-strong);
}

.tip-action {
  flex: none;
  padding: 7px 14px;
  white-space: nowrap;
}

.tip-close {
  flex: none;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--warn-text);
  font-size: calc(1.4rem * var(--text-scale, 1));
  line-height: 1;
  cursor: pointer;
}

.tip-close:hover {
  background: rgba(146, 64, 14, 0.12);
}

.tip-close:focus-visible,
.help-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.tips-reset {
  margin: 18px 0 0;
  text-align: center;
  font-size: calc(0.85rem * var(--text-scale, 1));
}

@media (max-width: 640px) {
  .tip {
    flex-wrap: wrap;
  }

  .tip-text {
    flex-basis: calc(100% - 80px);
  }

  .tip-action {
    margin-left: 32px;
  }
}

/* Petit « ? » : la bulle s'ouvre au survol, au focus clavier ou au toucher. */
.help {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  margin-left: 6px;
  text-transform: none;
  letter-spacing: normal;
}

.help-btn {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--navy);
  font: 800 calc(11px * var(--text-scale, 1))/1 var(--font);
  cursor: help;
}

.help-btn:hover,
.help.is-open .help-btn {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.help-pop {
  position: absolute;
  z-index: 40;
  left: 50%;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: min(260px, 78vw);
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: #fff;
  font-size: calc(0.8rem * var(--text-scale, 1));
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 10px 24px -10px rgba(15, 23, 42, 0.5);
  transform: translateX(calc(-50% + var(--shift, 0px)));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity calc(0.18s * var(--slow, 1)) ease, visibility calc(0.18s * var(--slow, 1)) ease;
}

@media (hover: hover) {
  .help:hover .help-pop {
    opacity: 1;
    visibility: visible;
  }
}

.help-btn:focus-visible + .help-pop,
.help.is-open .help-pop {
  opacity: 1;
  visibility: visible;
}
