/* ============================================================
   Jonas Hangartner — Bannière de consentement
   Sobre, bottom-left, cohérent avec le design system.
   ============================================================ */

.jh-consent {
  position: fixed;
  left: clamp(12px, 2vw, 24px);
  bottom: clamp(12px, 2vw, 24px);
  z-index: 9999;
  max-width: min(380px, calc(100vw - 32px));
  background: var(--night, #0e1319);
  color: var(--fg-on-dark, #f2f5f4);
  border: 1px solid rgba(242, 245, 244, 0.10);
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  font-family: var(--font-sans, 'Space Grotesk', system-ui, sans-serif);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: auto;
}

.jh-consent--visible {
  opacity: 1;
  transform: translateY(0);
}

.jh-consent--leaving {
  opacity: 0;
  transform: translateY(6px);
}

.jh-consent--no-motion {
  transition: none;
}

.jh-consent__inner {
  padding: clamp(18px, 2vw, 22px) clamp(20px, 2.2vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.jh-consent__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(242, 245, 244, 0.65);
  font-weight: 400;
}

.jh-consent__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.jh-consent__btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-on-dark, #f2f5f4);
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.jh-consent__btn:focus-visible {
  outline: 1px solid rgba(242, 245, 244, 0.4);
  outline-offset: 2px;
}

.jh-consent__btn--ghost {
  border-color: rgba(242, 245, 244, 0.15);
  color: rgba(242, 245, 244, 0.45);
}

.jh-consent__btn--ghost:hover {
  color: var(--fg-on-dark, #f2f5f4);
  border-color: rgba(242, 245, 244, 0.30);
}

.jh-consent__btn--cta {
  background: var(--fg-on-dark, #f2f5f4);
  color: var(--night, #0e1319);
  border-color: var(--fg-on-dark, #f2f5f4);
}

.jh-consent__btn--cta:hover {
  background: rgba(242, 245, 244, 0.85);
  border-color: rgba(242, 245, 244, 0.85);
}

.jh-consent__btn:active {
  transform: translateY(1px);
}

@media (prefers-reduced-motion: reduce) {
  .jh-consent,
  .jh-consent__btn {
    transition: none;
  }
}

@media (max-width: 520px) {
  .jh-consent {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
  .jh-consent__inner {
    padding: 12px;
    gap: 10px;
  }
  .jh-consent__text {
    font-size: 12px;
    line-height: 1.4;
  }
  .jh-consent__actions {
    justify-content: stretch;
    gap: 8px;
  }
  .jh-consent__btn {
    flex: 1 1 auto;
    padding: 8px 12px;
    font-size: 11px;
    text-align: center;
  }
}
