/* ─────────────────────────────────────────────────────────────────────────
   FDL Popup — styles autonomes
   Toutes les classes sont préfixées .fdl-popup pour éviter les conflits.
   La couleur d'accent est injectée via la custom property --fdl-accent.
───────────────────────────────────────────────────────────────────────── */

/* Wrapper ---------------------------------------------------------------- */
.fdl-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.fdl-popup--hidden {
    display: none;
}

/* État d'attente : overlay et container invisibles avant l'animation */
.fdl-popup--waiting {
    pointer-events: none;
}

.fdl-popup--waiting .fdl-popup__overlay {
    opacity: 0;
}

.fdl-popup--waiting .fdl-popup__container {
    opacity: 0;
    transform: translateY(24px);
}

/* Overlay ---------------------------------------------------------------- */
.fdl-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Container -------------------------------------------------------------- */
.fdl-popup__container {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 8px;
    padding: 4rem 2rem 2rem;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.5s ease,
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Bouton fermeture ------------------------------------------------------- */
.fdl-popup__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid var(--fdl-accent, #1a1a1a);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    color: var(--fdl-accent, #1a1a1a);
    line-height: 0;
    transition:
        background 0.2s,
        color 0.2s;
}

.fdl-popup__close:hover {
    background: var(--fdl-accent, #1a1a1a);
    color: #ffffff;
}

/* Image ------------------------------------------------------------------ */
.fdl-popup__image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

/* Contenu ---------------------------------------------------------------- */
.fdl-popup__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

/* Titre ------------------------------------------------------------------ */
.fdl-popup__title {
    font-family: "Poppins Medium", sans-serif;
    font-weight: 600;
    font-size: 1.75rem;
    margin: 0;
    color: var(--fdl-accent, #1a1a1a);
    line-height: 1.3;
}

/* Texte ------------------------------------------------------------------ */
.fdl-popup__text {
    color: #444;
    line-height: 1.65;
    text-align: left;
    width: 100%;
}

.fdl-popup__text p {
    margin: 0 0 0.75em;
}

.fdl-popup__text p:last-child {
    margin-bottom: 0;
}

/* Bouton CTA ------------------------------------------------------------- */
.fdl-popup__btn {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--fdl-accent, #1a1a1a);
    color: #ffffff;
    border: 2px solid var(--fdl-accent, #1a1a1a);
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.2s,
        color 0.2s;
    text-decoration: none;
    font-family: inherit;
}

.fdl-popup__btn:hover {
    background: transparent;
    color: var(--fdl-accent, #1a1a1a);
}

/* Mobile ----------------------------------------------------------------- */
@media (max-width: 480px) {
    .fdl-popup__container {
        padding: 2rem 1.25rem 1.5rem;
    }

    .fdl-popup__title {
        font-size: 1.1rem;
    }

    .fdl-popup__btn {
        width: 100%;
        text-align: center;
    }
}
