/* HOP Bannières Web (2026-11-16) — bandeau publicitaire paysage de l'accueil.
   Images : Admin 990 › Advertisement Banners, case « Web » (16:5 + image téléphone 4:3 facultative).
   Jamais de déformation : object-fit cover sur un cadre au bon format (16:5, ou 4:3 sur téléphone). */

.adband { margin-top: clamp(20px, 3.5vw, 44px); }
.adband[hidden] { display: none !important; }

.adband__frame {
  position: relative; max-width: 1920px; margin-inline: auto;
  border-radius: var(--r-lg, 26px); overflow: hidden; isolation: isolate;
  background: var(--soft, #f5f1f0); box-shadow: var(--shadow-md);
}
.adband__track { position: relative; width: 100%; aspect-ratio: 16 / 5; }

.adband__slide {
  position: absolute; inset: 0; display: block; opacity: 0; visibility: hidden;
  transition: opacity .7s var(--ease, ease), visibility 0s linear .7s;
}
.adband__slide.is-on { opacity: 1; visibility: visible; transition: opacity .7s var(--ease, ease), visibility 0s; z-index: 1; }
.adband__slide picture, .adband__slide img.adband__img { display: block; width: 100%; height: 100%; }
.adband__img { object-fit: cover; object-position: center; }
.adband__bg { display: none; }
a.adband__slide { cursor: pointer; }
a.adband__slide:focus-visible { outline: 3px solid var(--brand, #9c0306); outline-offset: -3px; }

.adband__tag {
  position: absolute; top: 12px; left: 14px; z-index: 3; padding: 3px 9px; border-radius: 999px;
  font: 600 11px/1.4 var(--font, sans-serif); letter-spacing: .02em; color: #fff;
  background: rgb(0 0 0 / .38); backdrop-filter: blur(6px); pointer-events: none;
}

/* Fermer le bandeau (mémorisé 24 h, sauf nouvelle campagne) */
.adband__close {
  position: absolute; top: 12px; right: 14px; z-index: 4; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff; font: 400 26px/1 var(--font, sans-serif);
  background: rgb(0 0 0 / .42); backdrop-filter: blur(6px); transition: background .2s, transform .2s;
}
.adband__close:hover { background: rgb(0 0 0 / .66); transform: scale(1.06); }
.adband__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.adband__nav {
  position: absolute; top: 50%; z-index: 3; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: var(--ink, #161213);
  background: rgb(255 255 255 / .88); box-shadow: var(--shadow-sm); opacity: 0; transition: opacity .2s, transform .2s;
}
.adband__nav--prev { left: 14px; }
.adband__nav--next { right: 14px; }
.adband__frame:hover .adband__nav, .adband__nav:focus-visible { opacity: 1; }
.adband__nav:hover { transform: scale(1.06); }

.adband__dots {
  position: absolute; left: 0; right: 0; bottom: 12px; z-index: 3;
  display: flex; justify-content: center; gap: 8px; pointer-events: none;
}
.adband__dot {
  pointer-events: auto; width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: rgb(255 255 255 / .6); box-shadow: 0 0 0 1px rgb(0 0 0 / .12); transition: width .3s var(--ease, ease), background .3s;
}
.adband__dot.is-on { width: 26px; background: #fff; }
.adband--single .adband__nav, .adband--single .adband__dots { display: none; }
/* Écrans tactiles (pas de survol) : pas de flèches invisibles mais cliquables -> points + glissement */
@media (hover: none) { .adband__nav { display: none; } }

/* Grands écrans : aligné sur les autres sections de l'accueil (50 px du bord) */
@media (min-width: 1200px) {
  .adband { max-width: none; width: 100%; margin-inline: 0; padding-inline: 50px; box-sizing: border-box; }
}

/* Téléphones (< 640 px) */
@media (max-width: 639px) {
  .adband__frame { border-radius: var(--r-md, 18px); }
  .adband__nav { display: none; }
  .adband__tag { top: 8px; left: 10px; font-size: 10px; }
  .adband__close { top: 8px !important; right: 8px !important; width: 32px; height: 32px; font-size: 22px; }
  .adband__dots { bottom: 8px; }
  /* Au moins une image téléphone : cadre 4:3 ; les bannières sans image téléphone
     sont montrées EN ENTIER sur un fond flouté de la même image (pas de recadrage) */
  .adband--mob .adband__track { aspect-ratio: 4 / 3; }
  .adband--mob .adband__slide--fit .adband__img { object-fit: contain; position: relative; z-index: 1; }
  .adband--mob .adband__slide--fit .adband__bg {
    display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    filter: blur(18px) brightness(.8); transform: scale(1.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  .adband__slide, .adband__slide.is-on, .adband__dot { transition: none; }
}
