/* ============================================================
   Popup Annonce — popupannouncement.css
   ============================================================ */

/* ----- Overlay ----- */
.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 999990;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    padding: 16px;
    animation: popupFadeIn 0.35s ease forwards;
}

/* Position verticale */
.popup-overlay--center {
    align-items: center;
}

.popup-overlay--top {
    align-items: flex-start;
    padding-top: 20vh;
}

.popup-overlay--bottom {
    align-items: flex-end;
    padding-bottom: 10vh;
}

/* Sans overlay de fond */
.popup-overlay--no-bg {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none;
}

.popup-overlay--no-bg .popup-box {
    pointer-events: auto;
}

/* ----- Boîte principale ----- */
.popup-box {
    position: relative;
    max-width: 480px;
    width: 100%;
    border-radius: 16px;
    padding: 40px 36px 32px;
    text-align: center;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    animation: popupSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    overflow: hidden;
}

/* Brillance subtile en haut */
.popup-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );
}

/* ----- Barre d'accent ----- */
.popup-accent-bar {
    height: 3px;
    border-radius: 99px;
    background: var(--popup-accent, #e94560);
    margin: 0 auto 20px;
    width: 48px;
    transition: width 0.3s ease;
}

.popup-box:hover .popup-accent-bar {
    width: 72px;
}

/* ----- Icône ----- */
.popup-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 12px;
    display: block;
    animation: popupBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

/* ----- Titre ----- */
.popup-title {
    color: var(--popup-text, #ffffff) !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    margin: 0 0 14px !important;
    letter-spacing: -0.02em;
}

/* ----- Message ----- */
.popup-message {
    color: var(--popup-text, #ffffff);
    opacity: 0.88;
    font-size: 0.97rem;
    line-height: 1.65;
    margin-bottom: 28px;
}

.popup-message a {
    color: var(--popup-accent, #e94560);
    text-decoration: underline;
}

/* ----- Boutons ----- */
.popup-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.popup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 24px;
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none !important;
    line-height: 1.4;
}

.popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.popup-btn:active {
    transform: translateY(0);
}

/* Bouton d'action (lien) */
.popup-btn--action {
    background: var(--popup-accent, #e94560);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* ----- Lien "Fermer" discret ----- */
.popup-close-link {
    display: block;
    width: 100%;
    margin-top: 16px;
    background: none;
    border: none;
    padding: 4px 0;
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--popup-text, #ffffff);
    opacity: 0.45;
    text-align: center;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: opacity 0.2s ease;
    text-decoration: none;
}

.popup-close-link:hover {
    opacity: 0.85;
}

/* ----- Croix (X) ----- */
.popup-close-x {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--popup-text, #ffffff);
    opacity: 0.7;
    transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.popup-close-x:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.18);
    transform: rotate(90deg);
}

/* ----- Animations ----- */
@keyframes popupFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes popupSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes popupBounce {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Animation de sortie */
.popup-overlay.popup-closing {
    animation: popupFadeOut 0.25s ease forwards;
}

.popup-overlay.popup-closing .popup-box {
    animation: popupSlideDown 0.25s ease forwards;
}

@keyframes popupFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes popupSlideDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
}

/* ----- Responsive ----- */
@media (max-width: 480px) {
    .popup-box {
        padding: 32px 22px 24px;
        border-radius: 14px;
    }

    .popup-title {
        font-size: 1.25rem !important;
    }

    .popup-icon {
        font-size: 2.4rem;
    }

    .popup-btn--action {
        width: 100%;
    }

    .popup-overlay--top {
        padding-top: 12vh;
    }

    .popup-overlay--bottom {
        padding-bottom: 5vh;
    }
}
