/* Tounes Stays — Fiche sponsorisée (E3) et encart contextuel (E4)
   Complément aux catalogues ; chargé uniquement par les pages catalogues. */

/* ------------------------------------------------------------------
   E3 — Fiche sponsorisée : halo doré + badge « Recommandé »
   ------------------------------------------------------------------ */
.card--sponsored {
  position: relative;
  border: 1px solid rgba(224, 165, 47, 0.55);
  box-shadow:
    var(--shadow-sm),
    0 0 0 3px rgba(224, 165, 47, 0.18);
}
.card--sponsored:hover {
  box-shadow:
    var(--shadow-lg),
    0 0 0 3px rgba(224, 165, 47, 0.28);
}
.card--sponsored::after {
  content: "Recommandé";
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 3;
  background: #e0a52f;
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
html[lang="en"] .card--sponsored::after { content: "Recommended"; }
html[lang^="en"] .card--sponsored::after { content: "Recommended"; }

/* ------------------------------------------------------------------
   E4 — Encart contextuel : bandeau premium charte Tounes Stays
   Fond bleu canard profond, liseré doré, arche tunisienne en filigrane
   (rappel du logo porte), titre Fraunces, bouton corail.
   ------------------------------------------------------------------ */
.encart-sponsor {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-8);
  background:
    radial-gradient(120% 160% at 88% -20%, rgba(224, 165, 47, 0.14) 0%, rgba(224, 165, 47, 0) 55%),
    linear-gradient(118deg, #0b5168 0%, #0e7a9c 52%, #0a6280 100%);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 34px rgba(10, 81, 104, 0.30);
  text-decoration: none;
  color: #fff;
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}
.encart-sponsor:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(10, 81, 104, 0.38);
}
/* Liseré doré en haut du bandeau */
.encart-sponsor::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 58%; height: 3px;
  background: linear-gradient(90deg, #e0a52f 0%, rgba(224, 165, 47, 0.35) 60%, rgba(224, 165, 47, 0) 100%);
}

/* Arche tunisienne en filigrane (rappel du logo) */
.encart-sponsor__arch {
  position: absolute;
  top: 50%;
  right: clamp(30px, 9vw, 130px);
  height: 165%;
  aspect-ratio: 5 / 7;
  transform: translateY(-50%);
  pointer-events: none;
  border: 1.5px solid rgba(250, 246, 238, 0.15);
  border-bottom: none;
  border-radius: 999px 999px 0 0;
}
.encart-sponsor__arch::before {
  content: "";
  position: absolute;
  top: 12%; bottom: 0; left: 13%; right: 13%;
  border: 1px solid rgba(250, 246, 238, 0.09);
  border-bottom: none;
  border-radius: 999px 999px 0 0;
}
.encart-sponsor__arch::after {
  content: "";
  position: absolute;
  top: 28%; bottom: 0; left: 30%; right: 30%;
  border: 1px solid rgba(250, 246, 238, 0.06);
  border-bottom: none;
  border-radius: 999px 999px 0 0;
}

/* Tag « Sponsorisé » discret en haut à droite */
.encart-sponsor__tag {
  position: absolute;
  top: var(--space-3);
  right: var(--space-4);
  z-index: 2;
  background: rgba(250, 246, 238, 0.12);
  border: 1px solid rgba(250, 246, 238, 0.28);
  color: rgba(250, 246, 238, 0.92);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px var(--space-3);
  border-radius: var(--radius-full);
  backdrop-filter: blur(2px);
}

/* Visuel annonceur éventuel */
.encart-sponsor__media {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}
.encart-sponsor__media img {
  display: block;
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid rgba(250, 246, 238, 0.3);
  box-shadow: 0 6px 18px rgba(7, 61, 79, 0.35);
}

/* Corps du bandeau */
.encart-sponsor__body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.encart-sponsor__eyebrow {
  color: #ecc27a;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.encart-sponsor__title {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
}
.encart-sponsor__text {
  font-size: var(--text-sm);
  color: rgba(250, 246, 238, 0.85);
  line-height: 1.55;
  max-width: 62ch;
}

/* Bouton d'action corail */
.encart-sponsor__cta {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  background: #e8654a;
  color: #fff;
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(232, 101, 74, 0.45);
  transition: background var(--transition-interactive), transform var(--transition-interactive);
}
.encart-sponsor:hover .encart-sponsor__cta {
  background: #f07b60;
  transform: translateY(-1px);
}

/* ------------------------------------------------------------------
   Responsive mobile
   ------------------------------------------------------------------ */
@media (max-width: 640px) {
  .encart-sponsor {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-5) var(--space-5);
  }
  /* Le badge « Sponsorisé » passe au-dessus du surtitre, en flux,
     pour éviter toute collision avec le texte doré. */
  .encart-sponsor__tag {
    position: static;
    align-self: flex-start;
  }
  .encart-sponsor__arch {
    right: -20px;
    height: 140%;
    opacity: 0.7;
  }
  .encart-sponsor__body {
    flex-basis: 100%;
  }
  .encart-sponsor__text {
    max-width: none;
  }
  .encart-sponsor__cta {
    align-self: stretch;
    text-align: center;
  }
  .encart-sponsor__media,
  .encart-sponsor__media img {
    width: 100%;
    height: 120px;
  }
}
