/* Bannière « À la une » de la page d'accueil (css/banniere.css).
   Les variables du site sont reprises avec des valeurs de secours,
   pour que la feuille fonctionne aussi dans l'interface de gestion. */
.banniere { padding: 22px 0 0; }
.banniere[hidden] { display: none; }

.ban-frame {
  position: relative;
  overflow: hidden;
  height: clamp(230px, 32vw, 340px);
  border-radius: var(--radius, 24px);
  box-shadow: var(--shadow, 0 6px 24px rgba(91, 79, 196, .08));
  border: 1px solid var(--border, #ece7e0);
  background: linear-gradient(135deg, #ece7fd, #ffe9df);
  touch-action: pan-y;
}

.ban-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease, visibility .6s;
  font-family: var(--font, "Outfit", -apple-system, "Segoe UI", sans-serif);
}
.ban-slide.is-current { opacity: 1; visibility: visible; }

.ban-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.ban-pos-top .ban-bg { background-position: center top; }
.ban-pos-bottom .ban-bg { background-position: center bottom; }

/* Voile sombre sous le texte, seulement s'il y a une photo et un texte/lien */
.ban-hasimg.ban-hascap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(43, 41, 51, .82) 0%, rgba(43, 41, 51, .45) 38%, rgba(43, 41, 51, 0) 72%);
  pointer-events: none;
}

.ban-caption {
  position: relative;
  z-index: 2;
  max-width: 780px;
  padding: 22px 28px 40px 74px;
  color: #fff;
}
.ban-text {
  margin: 0 0 14px;
  font-size: clamp(1.05rem, 2.2vw, 1.65rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.01em;
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.ban-btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff9a7b 0%, #ffd166 100%);
  color: #4a2e12;
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(255, 154, 123, .45);
  transition: transform .2s ease, filter .2s ease;
}
.ban-btn:hover { color: #4a2e12; transform: translateY(-2px); filter: brightness(1.05); }

/* Diapositive sans photo : fond dégradé, contenu centré */
.ban-noimg {
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b7cf6 0%, #5b4fc4 60%, #453a8f 100%);
}
.ban-noimg .ban-caption { max-width: 820px; margin: 0 auto; padding: 30px 78px; text-align: center; }
.ban-noimg .ban-text { font-size: clamp(1.15rem, 2.6vw, 1.9rem); }

/* Commandes */
.ban-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .88);
  color: var(--blue-deep, #453a8f);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  transition: background .2s ease, transform .2s ease;
}
.ban-nav:hover { background: #fff; transform: translateY(-50%) scale(1.07); }
.ban-prev { left: 14px; }
.ban-next { right: 14px; }

.ban-bar {
  position: absolute;
  right: 18px;
  bottom: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(43, 41, 51, .45);
}
.ban-pause {
  border: none;
  background: none;
  color: #fff;
  font-size: .95rem;
  width: 28px;
  height: 28px;
  cursor: pointer;
  border-radius: 50%;
}
.ban-dot {
  position: relative;
  width: 22px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}
.ban-dot::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  transition: background .2s ease, transform .2s ease;
}
.ban-dot[aria-current="true"]::before { background: #fff; transform: scale(1.25); }
.ban-nav:focus-visible, .ban-pause:focus-visible, .ban-dot:focus-visible, .ban-btn:focus-visible {
  outline: 3px solid #ffd166;
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .banniere { padding-top: 16px; }
  .ban-caption { padding: 18px 18px 48px 54px; max-width: 100%; }
  .ban-noimg .ban-caption { padding: 24px 24px 50px; }
  .ban-nav { width: 36px; height: 36px; }
  .ban-prev { left: 8px; }
  .ban-next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .ban-slide { transition: none; }
  .ban-btn, .ban-nav { transition: none; }
}
