/* ==========================================================================
   Emplacements publicitaires (js/ads.js, configuration : data/config.json)
   - Mobile : encart dans le flux, proportions proches d'une carte.
   - Desktop : bandeau sur toute la largeur, entre deux rangées de cartes.
   L'espace est réservé avant le chargement de l'annonce (pas de décalage).
   ========================================================================== */

.ad-slot {
  grid-column: 1 / -1;
  width: 100%;
  max-width: var(--card-width-mobile);
  justify-self: center;
}

.ad-slot__frame {
  position: relative;
  display: grid;
  place-items: center;
  /* Réservation : rectangle 336 × 280 sur mobile. */
  min-height: 280px;
  padding: var(--space-6) var(--space-4) var(--space-4);
  border: 1px solid var(--navy-700);
  border-radius: var(--radius-card);
  background: rgb(19 43 77 / 0.6);
  overflow: hidden;
}

/* Mention obligatoire, toujours visible. */
.ad-slot__label {
  position: absolute;
  top: var(--space-2);
  left: var(--space-3);
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--color-text-muted);
}

.ad-slot__unit {
  width: 100%;
  min-height: 250px;
}

/* Prévisualisation (mode "preview" uniquement, jamais en production). */
.ad-slot__placeholder {
  display: grid;
  place-items: center;
  gap: var(--space-1);
  width: 100%;
  min-height: 250px;
  border: 1px dashed var(--steel-600);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  text-align: center;
  color: var(--color-text-muted);
}

.ad-slot__placeholder small {
  display: block;
  color: var(--sky-200);
  opacity: 0.7;
}

@media (min-width: 40rem) {
  .ad-slot {
    max-width: none;
  }

  /* Bandeau : réservation 90 px (728 × 90) + marges. */
  .ad-slot__frame {
    min-height: 130px;
    padding-block: var(--space-5) var(--space-3);
  }

  .ad-slot__unit,
  .ad-slot__placeholder {
    min-height: 90px;
    max-width: 970px;
  }
}
