/* Hoppi — "Rejoignez X médecins" CTA réutilisable (full-width)
 * Injecté automatiquement avant le footer par /js/join-cta.js
 * Opt-out sur une page : <body data-no-join-cta>
 */

.h-join {
  padding: 72px 48px;
  background: linear-gradient(190deg, #eeb1d5, #fff5e1);
  position: relative;
  overflow: hidden;
}

/* Mascot Hoppi (hippo doctor 3D pastel) — décoratif, image partagée par l'user
 * en /images/hoppi-mascot.png. onerror dans le markup masque l'img si manquante.
 */
.h-join-mascot {
  position: absolute;
  right: 2%;
  bottom: -10px;
  height: 320px !important;
  width: auto !important;
  max-width: none;
  z-index: 1;
  opacity: 0.72;
  pointer-events: none;
  filter: drop-shadow(0 14px 24px rgba(40, 83, 107, 0.14));
  transform: rotate(-4deg);
  transition: transform .6s cubic-bezier(.22, 1, .36, 1), opacity .35s ease;
  mix-blend-mode: multiply;
}
@media (min-width: 1280px) {
  .h-join-mascot { height: 360px !important; }
}
.h-join:hover .h-join-mascot {
  transform: rotate(-2deg) translateY(-4px) scale(1.02);
  opacity: 0.85;
}

.h-join::before,
.h-join::after {
  content: "";
  position: absolute;
  inset: -30%;
  pointer-events: none;
  filter: blur(60px);
  will-change: transform;
  animation: h-join-drift 18s ease-in-out infinite alternate;
}
.h-join::before {
  z-index: 0;
  background:
    radial-gradient(closest-side at 25% 30%, #ff8fc4 0%, transparent 65%),
    radial-gradient(closest-side at 80% 70%, #f7c97a 0%, transparent 65%),
    radial-gradient(closest-side at 60% 15%, #ffe0b0 0%, transparent 60%);
  opacity: 0.9;
}
.h-join::after {
  z-index: 1;
  background:
    radial-gradient(closest-side at 70% 30%, #ffb5dc 0%, transparent 65%),
    radial-gradient(closest-side at 20% 75%, #ff9ec9 0%, transparent 65%),
    radial-gradient(closest-side at 55% 55%, #fff2d0 0%, transparent 55%);
  mix-blend-mode: screen;
  opacity: 0.8;
  animation-duration: 26s;
  animation-delay: -7s;
  animation-direction: alternate-reverse;
}

@keyframes h-join-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(4%, 2%, 0) scale(1.08); }
}

.h-join-inner {
  position: relative;
  z-index: 3;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.h-join-title {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.05;
  font-weight: 700;
  color: #28536B;
  margin: 0 0 28px;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.h-join-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  background: #28536B;
  padding: 16px 36px;
  border-radius: 100px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(40, 83, 107, 0.28);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s ease,
              background 0.25s ease;
}
.h-join-btn:hover {
  transform: translateY(-2px);
  background: #1a3d52;
  box-shadow: 0 12px 32px rgba(40, 83, 107, 0.35);
}
.h-join-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(238, 177, 213, 0.5), 0 8px 24px rgba(40, 83, 107, 0.28);
}

.h-join-sub {
  margin: 22px auto 0;
  font-size: 14px;
  color: #4A6378;
  max-width: 520px;
  line-height: 1.55;
  font-family: "Inter", sans-serif;
}

/* Tablet : mascot encore plus discret */
@media (max-width: 1100px) {
  .h-join-mascot {
    right: -2%;
    height: 240px !important;
    opacity: 0.6;
  }
}

/* Mobile : mascot en arriere-plan bottom-right, content au-dessus.
 * Layout plus dense, plus identitaire que le mascot solo en haut. */
@media (max-width: 768px) {
  .h-join {
    padding: 56px 22px 64px;
    min-height: 320px;
  }
  .h-join-title { font-size: clamp(28px, 7.5vw, 38px); margin-bottom: 20px; line-height: 1.05; }
  .h-join-btn { padding: 14px 28px; font-size: 15px; }
  .h-join-sub { font-size: 13px; margin-top: 16px; padding: 0 6px; }

  .h-join-mascot {
    position: absolute;
    right: -22%;
    bottom: -20px;
    height: 280px !important;
    width: auto !important;
    margin: 0;
    display: block;
    transform: rotate(-6deg);
    opacity: 0.55;
    mix-blend-mode: multiply;
    filter: drop-shadow(0 12px 22px rgba(40, 83, 107, 0.14));
  }
  .h-join:hover .h-join-mascot {
    transform: rotate(-6deg);
    opacity: 0.55;
  }
}

/* Tres petits écrans : ajuster encore */
@media (max-width: 380px) {
  .h-join-title { font-size: clamp(24px, 8vw, 30px); }
  .h-join-mascot { right: -32%; height: 230px !important; opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
  .h-join::before, .h-join::after { animation: none !important; }
  .h-join-mascot { transition: none !important; }
  .h-join:hover .h-join-mascot { transform: rotate(-3deg) !important; }
}
