/* ============================================================
   AFFICHES ANNONCEURS (inc/affiches.php, assets/js/affiches.js)
   ============================================================ */

/* [hidden] doit l'emporter sur les display des cartes et affiches. */
.afc-affiche[hidden],
.afc-opp-card[hidden],
[data-afc-direct][hidden],
.afc-ad-repli[hidden] { display: none !important; }

/* Zone de cartes candidates : jamais affichée telle quelle, le script
   en extrait la carte retenue. */
.afc-cartes-sponso { display: none; }

/* Emplacement occupé par une affiche : la hauteur réservée pour AdSense
   ne sert plus, l'image porte ses propres dimensions. */
.afc-ad-slot--direct.is-affiche { min-height: 0; }

/* ── Affiche ── */
.afc-affiche {
  position: relative;
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  line-height: 0;
  border-radius: var(--afc-r-md, 11px);
  overflow: hidden;
  box-shadow: var(--afc-shadow-sm, 0 4px 18px rgba(60,45,30,.05));
}
.afc-affiche picture { display: block; }
.afc-affiche img {
  display: block;
  max-width: 100%;
  height: auto;
}
.afc-affiche:focus-visible {
  outline: 3px solid var(--afc-accent);
  outline-offset: 3px;
}
.afc-affiche__label {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .05em;
  text-transform: uppercase;
  pointer-events: none;
}

/* ── Bandeau sous l'en-tête ── */
.afc-bandeau-annonce { margin-top: 16px; margin-bottom: 4px; }
.afc-bandeau-annonce .afc-ad-slot { margin: 0; min-height: 0; }

/* ── Carte sponsorisée ── */
.afc-carte-sponso {
  border-color: var(--afc-accent-soft);
  text-decoration: none;
  color: inherit;
}
.afc-carte-sponso:hover { border-color: var(--afc-accent); }
.afc-carte-sponso:focus-visible { outline: 3px solid var(--afc-accent); outline-offset: 2px; }
.afc-carte-sponso__img {
  display: block;
  margin: -16px -16px 12px;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  aspect-ratio: 1.91 / 1;
  background: var(--afc-bg-alt, #f3eee4);
}
.afc-carte-sponso__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.afc-carte-sponso__top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.afc-carte-sponso__badge {
  padding: 3px 8px;
  border-radius: 100px;
  background: var(--afc-accent-soft);
  color: var(--afc-accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.afc-carte-sponso__annonceur {
  font-size: 12px;
  color: var(--afc-text-muted, #6a6258);
}
.afc-carte-sponso .afc-opp-card__title,
.afc-carte-sponso .afc-opp-card__summary { display: block; }
.afc-carte-sponso__cta {
  margin-top: auto;
  padding-top: 12px;
  color: var(--afc-accent);
  font-size: 14px;
  font-weight: 700;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .afc-bandeau-annonce { margin-top: 12px; }
  .afc-affiche { border-radius: var(--afc-r-sm, 7px); }
}
