/* ============================================================
   CARTE PUB - STYLES DES PUBLICITES SPONSORISEES
   ============================================================

   Styles pour les cartes de publicites sponsorisees
   Utilise les variables de homepage-config.css

   ============================================================ */


/* --- PUB DE BASE --- */
.hp-pub {
    display: flex;
    position: relative;
    flex-direction: column;
    background-color: var(--hp-color-background);
    border: 1px solid var(--hp-color-border);
    border-radius: var(--hp-card-border-radius);
    overflow: hidden;
    text-decoration: none;

    /* Prend toute la largeur de la grille */
    grid-column: 1 / -1;

    /* Mobile */
    height: var(--hp-pub-mobile-height);
}

/* Desktop */
@media (min-width: 448px) {
    .hp-pub {
        height: var(--hp-pub-desktop-height);
    }
}


/* --- IMAGE PUB --- */
.hp-pub__img-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: var(--hp-pub-mobile-img-padding);
}

@media (min-width: 448px) {
    .hp-pub__img-container {
        padding: var(--hp-pub-desktop-img-padding);
    }
}

.hp-pub__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.hp-pub:hover .hp-pub__img {
    transform: scale(1.05);
}


/* --- CONTENU PUB (OVERLAY) --- */
.hp-pub__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--hp-pub-mobile-padding);
}

@media (min-width: 448px) {
    .hp-pub__content {
        padding: var(--hp-pub-desktop-padding);
    }
}


/* --- BADGE "SPONSORISE" --- */
.hp-pub__badge {
    display: inline-block;
    padding: 0.1rem 0.75rem;
    background-color: var(--hp-color-badge-sponsored);
    color: white;
    font-weight: 500;
    border-radius: 9999px;
    margin-bottom: 0.1rem;
    width: fit-content;

    /* Mobile */
    font-size: var(--hp-pub-mobile-badge-size);
}

@media (min-width: 448px) {
    .hp-pub__badge {
        font-size: var(--hp-pub-desktop-badge-size);
    }
}


/* --- TITRE PUB --- */
.hp-pub__title {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 0.25rem;
    padding: 0.5rem;
    font-weight: 600;
    color: white;

    /* Mobile */
    font-size: var(--hp-pub-mobile-title-size);
}

@media (min-width: 448px) {
    .hp-pub__title {
        font-size: var(--hp-pub-desktop-title-size);
    }
}
