/* UniversCarte - Bannière Support Vidéo */
:root {
  /* Fallbacks if not defined on host site */
  --uc-color-primary-dark: var(--color-primary-dark, #295491);
  --uc-color-secondary: var(--color-secondary, #21bdd0);
  --uc-color-secondary-rgb: var(--color-secondary-rgb, 33, 189, 208);
  --uc-color-accent: var(--color-accent, #05ac72);
  --uc-surface: var(--color-surface, #ffffff);
  --uc-text: var(--color-text-primary, #212529);
  --uc-radius: var(--radius-lg, 12px);
  --uc-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05));
}

.uc-sv-banner {
  position: relative;
  margin: 0;
  padding: calc(0.5rem + 0.5cm) 0; /* +1cm total height (~0.5cm top + 0.5cm bottom) */
  background: linear-gradient(180deg, rgba(var(--uc-color-secondary-rgb), 0.08), transparent);
  overflow: hidden; /* allow media background clipping */
  /* Subtle entrance */
  animation: uc-sv-fade-in 0.35s ease-out 0.05s both;
}
.uc-sv-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: calc(0.75rem + 0.5cm) 1rem; /* add ~0.5cm inner vertical space */
  background: var(--uc-surface);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--uc-radius);
  box-shadow: var(--uc-shadow);
  position: relative; /* layer above bg */
  z-index: 1;
  overflow: hidden; /* clip background media */
}
.uc-sv-banner__icon {
  color: var(--uc-color-primary-dark);
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9999px;
  background: rgba(var(--uc-color-secondary-rgb), 0.18);
}
.uc-sv-banner__content { flex: 1 1 auto; min-width: 0; }
.uc-sv-banner__title {
  font-weight: 700; color: var(--uc-color-primary-dark); line-height: 1.2;
}
.uc-sv-banner__subtitle {
  font-size: 0.95rem; color: var(--uc-text); opacity: 0.85; margin-top: 2px;
}

.uc-sv-banner__cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  color: var(--uc-color-primary-dark);
  border: 2px solid var(--uc-color-primary-dark);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-weight: 700; text-decoration: none;
  transition: all 0.25s ease;
}
.uc-sv-banner__cta:hover,
.uc-sv-banner__cta:focus-visible {
  background: var(--uc-color-secondary);
  box-shadow: 0 10px 22px rgba(var(--uc-color-secondary-rgb), 0.35);
  outline: none;
}

.uc-sv-banner__close {
  background: transparent; border: none; cursor: pointer;
  color: var(--uc-color-primary-dark); font-size: 1.25rem;
  padding: 0.25rem 0.5rem; border-radius: 8px; margin-left: 0.25rem;
}
.uc-sv-banner__close:hover { background: rgba(var(--uc-color-secondary-rgb), 0.15); }

/* Hover glow for whole capsule on banner hover */
.uc-sv-banner__inner:hover { box-shadow: 0 10px 22px rgba(var(--uc-color-secondary-rgb), 0.25); }

/* Gradient theme (hover sweep and color flip) */
.uc-sv-banner.theme-gradient .uc-sv-banner__inner {
  background: linear-gradient(135deg, var(--uc-color-primary-dark), var(--uc-color-secondary));
  border: none;
  color: #fff;
  overflow: hidden;
  transition: all 0.6s ease;
}
.uc-sv-banner.theme-gradient .uc-sv-banner__inner::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.15);
  transform: skewY(-10deg);
  transition: all 0.6s ease;
  pointer-events: none; /* do not block clicks */
}
.uc-sv-banner.theme-gradient .uc-sv-banner__inner:hover::after { top: 100%; }
.uc-sv-banner.theme-gradient .uc-sv-banner__inner:hover {
  background: linear-gradient(135deg, var(--uc-color-secondary), var(--uc-color-accent));
}
.uc-sv-banner.theme-gradient .uc-sv-banner__title { color: #ffffff; }
.uc-sv-banner.theme-gradient .uc-sv-banner__subtitle { color: #f6f8fa; opacity: 0.95; }
.uc-sv-banner.theme-gradient .uc-sv-banner__icon { color: #fff; background: rgba(255,255,255,0.22); }
.uc-sv-banner.theme-gradient .uc-sv-banner__cta {
  color: #ffffff;
  border-color: #ffffff;
}
.uc-sv-banner.theme-gradient .uc-sv-banner__cta:hover,
.uc-sv-banner.theme-gradient .uc-sv-banner__cta:focus-visible {
  background: rgba(255,255,255,0.18);
  box-shadow: 0 10px 22px rgba(var(--uc-color-secondary-rgb), 0.35);
}

/* Media background (GIF/image/video) */
.uc-sv-banner__bg {
  position: absolute;
  inset: 0;
  z-index: -1; /* ensure it stays behind content */
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none; /* clicks go to content */
}
.uc-sv-banner__bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.uc-sv-banner__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.10), rgba(0,0,0,0.10)); /* subtle darken for readability */
}
.uc-sv-banner.has-bg .uc-sv-banner__inner {
  background: rgba(255, 255, 255, 0.88); /* translucency to let bg show through */
  border-color: rgba(0,0,0,0.08);
  backdrop-filter: saturate(1.1) blur(1px);
}

/* Ensure content sits above background */
.uc-sv-banner__inner > :not(.uc-sv-banner__bg) {
  position: relative;
  z-index: 1;
}

/* Ensure readable colors when both has-bg and theme-gradient are present */
.uc-sv-banner.has-bg.theme-gradient .uc-sv-banner__title { color: var(--uc-color-primary-dark); }
.uc-sv-banner.has-bg.theme-gradient .uc-sv-banner__subtitle { color: var(--uc-text); opacity: 0.85; }
.uc-sv-banner.has-bg.theme-gradient .uc-sv-banner__icon { color: var(--uc-color-primary-dark); background: rgba(var(--uc-color-secondary-rgb), 0.18); }
.uc-sv-banner.has-bg.theme-gradient .uc-sv-banner__cta { color: var(--uc-color-primary-dark); border-color: var(--uc-color-primary-dark); }
.uc-sv-banner.has-bg.theme-gradient .uc-sv-banner__cta:hover,
.uc-sv-banner.has-bg.theme-gradient .uc-sv-banner__cta:focus-visible { background: var(--uc-color-secondary); }

/* Hero theme: mimic support-video hero-section */
.uc-sv-banner.theme-hero .uc-sv-banner__inner {
  background: transparent;
  border: none;
  color: #ffffff;
  box-shadow: var(--uc-shadow);
}
.uc-sv-banner.theme-hero .uc-sv-banner__bg::after {
  background: linear-gradient(180deg, rgba(0,0,0,0.20), rgba(0,0,0,0.20));
}
.uc-sv-banner.theme-hero .uc-sv-banner__title { color: #ffffff; }
.uc-sv-banner.theme-hero .uc-sv-banner__subtitle { color: #f6f8fa; opacity: 0.95; }
.uc-sv-banner.theme-hero .uc-sv-banner__icon { color: #fff; background: rgba(255,255,255,0.22); }
.uc-sv-banner.theme-hero .uc-sv-banner__cta {
  color: #ffffff;
  border-color: #ffffff;
}
.uc-sv-banner.theme-hero .uc-sv-banner__cta:hover,
.uc-sv-banner.theme-hero .uc-sv-banner__cta:focus-visible {
  background: rgba(255,255,255,0.20);
  box-shadow: 0 10px 22px rgba(var(--uc-color-secondary-rgb), 0.35);
}
/* Ensure hero overrides translucent background when a bg is present */
.uc-sv-banner.theme-hero.has-bg .uc-sv-banner__inner {
  background: transparent;
  border: none;
  backdrop-filter: none;
}

@media (max-width: 640px) {
  .uc-sv-banner__subtitle { display: none; }
}

/* Fade-in keyframes */
@keyframes uc-sv-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .uc-sv-banner { animation: none; }
}
