/* Jack n' Jill - mise en avant d'un produit (module jnjmiseenavant). */
.jnj-mea-overlay {
  position: fixed; inset: 0; top: 0; right: 0; bottom: 0; left: 0;
  z-index: 10050; /* au-dessus de l'encart « Besoin d'aide ? » (9999) */
  background: rgba(0, 0, 0, .6);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: jnj-mea-fade .2s ease-out;
}
body.jnj-mea-open { overflow: hidden; }
/* L'encart « Besoin d'aide ? » reste caché tant que la fenêtre est ouverte. */
body.jnj-mea-open #jnj-lead, body.jnj-mea-open #jnj-lead-tab { display: none !important; }

.jnj-mea {
  position: relative;
  background: #fff; color: #232323;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  width: 100%; max-width: 720px;
  /* dvh = hauteur réellement visible (barres de Safari iPhone comprises) ; vh pour les anciens navigateurs. */
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  overflow-y: auto;
  display: flex;
  outline: none;
}
.jnj-mea-img { flex: 0 0 44%; background: #f6f6f6; }
.jnj-mea-img img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 10px 0 0 10px; }
.jnj-mea-body { flex: 1; padding: 28px 28px 24px; }
.jnj-mea-preview { margin: 0 0 8px; font-size: .75rem; font-weight: 700; color: #b45309; text-transform: uppercase; }
.jnj-mea-title { margin: 0 32px 10px 0; font-size: 1.6rem; line-height: 1.25; font-weight: 700; }
.jnj-mea-schedule { margin: 0 0 6px; color: #555; font-style: italic; }
.jnj-mea-price { margin: 0 0 12px; font-size: 1.35rem; font-weight: 700; color: #2fb5d2; }
.jnj-mea-text { margin: 0 0 18px; font-size: .95rem; }
.jnj-mea-text p { margin: 0 0 6px; }
.jnj-mea-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.jnj-mea-actions .btn { flex: 1 1 auto; padding: 12px 18px; font-size: 1rem; text-align: center; white-space: normal; }
.jnj-mea-buy { font-weight: 700; text-transform: none; }
.jnj-mea-x {
  position: absolute; top: 8px; right: 10px;
  border: 0; background: rgba(255, 255, 255, .9); border-radius: 50%;
  width: 36px; height: 36px; font-size: 26px; line-height: 34px; color: #555; cursor: pointer;
}
.jnj-mea-x:hover, .jnj-mea-x:focus { color: #000; }

@media (max-width: 767px) {
  .jnj-mea-overlay { padding: 10px; align-items: flex-end; }
  .jnj-mea { flex-direction: column; max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); }
  .jnj-mea-img { flex: none; max-height: 38vh; overflow: hidden; }
  .jnj-mea-img img { border-radius: 10px 10px 0 0; max-height: 38vh; }
  .jnj-mea-body { padding: 18px 18px 16px; }
  .jnj-mea-title { font-size: 1.3rem; }
  .jnj-mea-actions { flex-direction: column; }
  .jnj-mea-actions .btn { width: 100%; }
}

/* Fiche produit ouverte depuis la fenêtre : le bloc à remplir est souligné quelques secondes. */
.jnj-mea-highlight { animation: jnj-mea-pulse 2.4s ease-out 1; border-radius: 6px; }

@keyframes jnj-mea-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes jnj-mea-pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 181, 210, .7); }
  70% { box-shadow: 0 0 0 12px rgba(47, 181, 210, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 181, 210, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .jnj-mea-overlay, .jnj-mea-highlight { animation: none; }
}
