/* =========================================================
   POPUP PUBLICITAIRE
   ========================================================= */

.ad-popup[hidden] {
    display: none;
}

.ad-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

/* Fond derrière la publicité */
.ad-popup__overlay {
    position: absolute;
    inset: 0;

    background: rgba(5, 6, 12, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Fenêtre principale */
.ad-popup__box {
    position: relative;
    z-index: 1;

    width: min(440px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;

    background: #ffffff;
    color: #111111;

    border-radius: 24px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.45),
        0 0 35px rgba(220, 55, 255, 0.20);

    text-align: center;

    animation: adPopupEnter 0.28s ease-out;
}

/* =========================================================
   CROIX
   ========================================================= */

.ad-popup__close {
    position: absolute;
    top: 12px;
    right: 14px;

    z-index: 3;

    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.9);
    color: #555;

    font-size: 36px;
    line-height: 1;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        background 0.15s ease;
}

.ad-popup__close:hover {
    background: #eeeeee;
    transform: scale(1.08);
}

/* =========================================================
   IMAGE
   ========================================================= */

.ad-popup__image {
    display: block;

    width: 100%;
    max-height: 260px;

    object-fit: cover;

    border-radius: 24px 24px 0 0;
}

/* =========================================================
   CONTENU
   ========================================================= */

.ad-popup__content {
    padding: 25px 28px 30px;
}

.ad-popup__label {
    display: inline-block;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 5px;
    background: #868686;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    width: 100%;
}

.ad-popup__content h2 {
    margin: 5px 0 12px;

    color: #111;

    font-size: 28px;
    line-height: 1.15;
}

.ad-popup__content p {
    margin: 0 0 22px;

    color: #555;

    font-size: 16px;
    line-height: 1.5;
}

/* =========================================================
   BOUTON
   ========================================================= */

.ad-popup__cta {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 54px;

    padding: 12px 20px;

    border-radius: 14px;

   background: linear-gradient(135deg, #65ff22, #00ff4a);

    color: #ffffff;

    font-size: 17px;
    font-weight: 800;

    text-decoration: none;


    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.ad-popup__cta{
  color: var(--c-black) !important;
}

.ad-popup__cta:hover {
    transform: translateY(-2px);

    box-shadow: 0 12px 30px rgba(190, 40, 255, 0.40);
}

/* =========================================================
   ANIMATION
   ========================================================= */

@keyframes adPopupEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .ad-popup {
        padding: 14px;
    }

    .ad-popup__box {
        width: 100%;
        max-width: 390px;

        border-radius: 20px;
    }

    .ad-popup__image {
        max-height: 220px;

        border-radius: 20px 20px 0 0;
    }

    .ad-popup__content {
        padding: 20px;
    }

    .ad-popup__content h2 {
        font-size: 24px;
    }

    .ad-popup__content p {
        font-size: 15px;
    }

    .ad-popup__close {
        top: 8px;
        right: 8px;
    }
}