/* ================================================================
   QuadraForum Ads Manager — Frontend Styles
   ================================================================ */

/* Zone de publicités */
.qfa-ads-zone {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
    align-items: flex-start;
}

/* Publicité individuelle */
.qfa-ad {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.10);
    transition: transform .2s ease, box-shadow .2s ease;
    background: #fff;
    flex-shrink: 0;
}
.qfa-ad:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,.15);
}

/* Lien */
.qfa-ad-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Image */
.qfa-ad-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Contenu texte */
.qfa-ad-content {
    padding: 10px 12px;
}
.qfa-ad-title {
    display: block;
    font-weight: 700;
    font-size: .9rem;
    color: #1a1a2e;
    margin-bottom: 3px;
}
.qfa-ad-desc {
    display: block;
    font-size: .78rem;
    color: #666;
    line-height: 1.4;
}

/* Badge "Nos sites" */
.qfa-ad-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: .6rem;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ── Tailles ── */
.qfa-size-small      { width: 120px; }
.qfa-size-small .qfa-ad-image { height: 90px; }

.qfa-size-medium     { width: 250px; }
.qfa-size-medium .qfa-ad-image { height: 250px; }

.qfa-size-large      { width: 300px; }
.qfa-size-large .qfa-ad-image  { height: 250px; }

.qfa-size-banner     { width: 100%; max-width: 728px; }
.qfa-size-banner .qfa-ad-image { height: 90px; object-fit: cover; }

.qfa-size-leaderboard { width: 100%; }
.qfa-size-leaderboard .qfa-ad-image { height: 90px; object-fit: cover; }

.qfa-size-halfpage   { width: 300px; }
.qfa-size-halfpage .qfa-ad-image { height: 600px; }

.qfa-size-fullwidth  { width: 100%; }
.qfa-size-fullwidth .qfa-ad-image { max-height: 200px; object-fit: cover; }

/* ── Positions ── */
.qfa-position-before_forum,
.qfa-position-after_forum,
.qfa-position-before_post,
.qfa-position-after_post {
    justify-content: center;
    padding: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

/* ── Publicité flottante ── */
.qfa-floating-ad {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 220px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.20);
    z-index: 9999;
    overflow: hidden;
    animation: qfaSlideUp .4s ease;
}
@keyframes qfaSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
.qfa-floating-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: rgba(0,0,0,.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    z-index: 1;
    padding: 0;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .qfa-ads-zone {
        justify-content: center;
    }
    .qfa-size-banner,
    .qfa-size-leaderboard { max-width: 100%; }
    .qfa-floating-ad { width: 160px; bottom: 10px; right: 10px; }
}
