/*
 * PB Masking v4.2 — Styles Masquage Houzez
 * Architecture : 1 bannière globale fixe en bas + zones floutées sans overlay individuel
 */

/* ── Wrapper enlevé pour préserver le Layout CSS Grid/Flex de Houzez ───────────────────────────*/

/* ── Contenu original brouillé ────────────────────────────────────────*/
.pb-blurred-inner {
    filter: blur(8px) !important;
    opacity: 0.35 !important;
    /* pointer-events: none !important; REMOVED: l'élément doit capter les clics sur son overlay */
    user-select: none !important;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

/* Overlay Anti-Clic styles are now managed purely in JS directly on the inner elements */

/* ══════════════════════════════════════════════════════════════════════
   BANNIÈRE CTA UNIQUE — #pb-global-cta-bar
   ══════════════════════════════════════════════════════════════════════*/
#pb-global-cta-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 99999 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 12px !important;

    background: rgba(20, 20, 20, 0.93) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    color: #ffffff !important;

    padding: 14px 20px !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.30) !important;
    animation: pbSlideUp 0.4s ease forwards;
}

@keyframes pbSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

#pb-global-cta-bar .pb-bar-lock {
    font-size: 22px !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

#pb-global-cta-bar .pb-bar-text {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #f0f0f0 !important;
    line-height: 1.4 !important;
    flex: 1 !important;
    min-width: 180px !important;
}

#pb-global-cta-bar .pb-bar-btn {
    display: inline-block !important;
    background-color: var(--global-color-primary, #00AEEF) !important;
    color: #ffffff !important;
    padding: 10px 24px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 5px !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    transition: background-color 0.2s ease, transform 0.15s ease !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25) !important;
}

#pb-global-cta-bar .pb-bar-btn:hover {
    background-color: var(--global-color-primary-hover, #008cc0) !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    text-decoration: none !important;
}

#pb-global-cta-bar .pb-bar-close {
    background: transparent !important;
    border: none !important;
    color: rgba(255,255,255,0.6) !important;
    font-size: 22px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    padding: 0 4px !important;
    flex-shrink: 0 !important;
    transition: color 0.2s ease !important;
}
#pb-global-cta-bar .pb-bar-close:hover { color: #fff !important; }

/* ── Fallback sans backdrop-filter ───────────────────────────────────*/
@supports not (backdrop-filter: blur(6px)) {
    #pb-global-cta-bar { background: rgba(15,15,15,0.97) !important; }
}

/* ── Mobile ───────────────────────────────────────────────────────────*/
@media (max-width: 600px) {
    #pb-global-cta-bar { padding: 12px 14px !important; gap: 8px !important; }
    #pb-global-cta-bar .pb-bar-text { font-size: 13px !important; width: 100% !important; }
    #pb-global-cta-bar .pb-bar-btn  { width: 100% !important; text-align: center !important; }
}

/* ══════════════════════════════════════════════════════════════════════
   POPUP SUBSCRIBE — #pb-subscribe-popup
   Affiché quand le bouton "Call" ou le formulaire de contact est bloqué
   ══════════════════════════════════════════════════════════════════════*/
#pb-subscribe-popup {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    transition: opacity 0.25s ease;
}

#pb-subscribe-popup.pb-popup-visible {
    opacity: 1;
}

/* Fond semi-transparent */
#pb-subscribe-popup .pb-popup-overlay {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(10, 15, 30, 0.72) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
}

/* Boîte centrale */
#pb-subscribe-popup .pb-popup-box {
    position: relative !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    padding: 40px 36px 36px !important;
    max-width: 420px !important;
    width: calc(100% - 32px) !important;
    text-align: center !important;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1 !important;
}

#pb-subscribe-popup.pb-popup-visible .pb-popup-box {
    transform: translateY(0);
}

/* Icône téléphone */
#pb-subscribe-popup .pb-popup-icon {
    font-size: 48px !important;
    line-height: 1 !important;
    margin-bottom: 16px !important;
    display: block !important;
}

/* Titre */
#pb-subscribe-popup .pb-popup-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 10px !important;
    line-height: 1.4 !important;
}

/* Sous-titre */
#pb-subscribe-popup .pb-popup-sub {
    font-size: 14px !important;
    color: #64748b !important;
    line-height: 1.6 !important;
    margin: 0 0 24px !important;
}

/* Bouton CTA */
#pb-subscribe-popup .pb-popup-btn {
    display: inline-block !important;
    background: linear-gradient(135deg,
        var(--global-color-primary, #00AEEF),
        var(--global-color-secondary, #0077b6)
    ) !important;
    color: #ffffff !important;
    padding: 13px 32px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    letter-spacing: 0.3px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    box-shadow: 0 6px 24px rgba(0, 119, 182, 0.3) !important;
}

#pb-subscribe-popup .pb-popup-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 32px rgba(0, 119, 182, 0.4) !important;
    text-decoration: none !important;
    color: #fff !important;
}

/* Bouton fermeture × */
#pb-subscribe-popup .pb-popup-close {
    position: absolute !important;
    top: 14px !important;
    right: 16px !important;
    background: none !important;
    border: none !important;
    font-size: 24px !important;
    line-height: 1 !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    padding: 4px !important;
    transition: color 0.2s ease !important;
}

#pb-subscribe-popup .pb-popup-close:hover {
    color: #0f172a !important;
}

/* Mobile */
@media (max-width: 480px) {
    #pb-subscribe-popup .pb-popup-box {
        padding: 32px 20px 28px !important;
        border-radius: 16px !important;
    }
    #pb-subscribe-popup .pb-popup-title { font-size: 15px !important; }
    #pb-subscribe-popup .pb-popup-btn   { width: 100% !important; text-align: center !important; }
}

/* ── Fallback sans backdrop-filter (Firefox < 103) ──────────────────*/
@supports not (backdrop-filter: blur(4px)) {
    #pb-subscribe-popup .pb-popup-overlay  { background: rgba(10, 15, 30, 0.88) !important; }
}

/* ══════════════════════════════════════════════════════════════════════
   RÉPERTOIRES AGENTS/AGENCES — Masquage via body.pb-unsubscribed
   ══════════════════════════════════════════════════════════════════════
   ARCHITECTURE :
   - PHP (body_class filter) → injecte 'pb-unsubscribed' sur body
   - CSS (ici) → floute dl.agent-list-contact + nav.agent-social-media
   - JS (protectRealtorList) → ajoute les click-catchers pour le popup

   Avantage : le flou CSS est actif DÈS le chargement du HTML,
   même si le JS est lent, bloqué ou si la page est mise en cache.
   ════════════════════════════════════════════════════════════════════*/

/* Flouter les blocs de contact et réseaux sociaux dans les listes */
body.pb-unsubscribed dl.agent-list-contact,
body.pb-unsubscribed nav.agent-social-media {
    filter: blur(8px) !important;
    opacity: 0.35 !important;
    user-select: none !important;
    position: relative !important;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

/* S'assurer que le click-catcher (ajouté par JS) reste cliquable malgré le flou parent */
body.pb-unsubscribed dl.agent-list-contact .pb-click-catcher,
body.pb-unsubscribed nav.agent-social-media .pb-click-catcher {
    pointer-events: auto !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 2000 !important;
    cursor: pointer !important;
}

