/* ========================================
   MODALES PAGE PUBLISHER INDEX (Follow / Liste noire)
   Typologie : docs/typologie-couleurs-themes-contraste.md
   Standard : 80 % largeur, overlay + flou, Échap / clic dehors / bouton Fermer,
   header une ligne, dark mode / light mode (Dash light).
   ======================================== */

/* Backdrop masqué : overlay + flou portés par le modal */
body:has(#followModal.show) .modal-backdrop,
body:has(#blacklistModal.show) .modal-backdrop {
    display: none !important;
}

/* Overlay plein écran */
#followModal,
#blacklistModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    margin: 0 !important;
    padding: 1rem !important;
    border: none !important;
    border-radius: 0;
    box-shadow: none !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    overflow: hidden !important;
}

#followModal:not(.show),
#blacklistModal:not(.show) {
    display: none !important;
}

#followModal.show,
#followModal.fade.show,
#blacklistModal.show,
#blacklistModal.fade.show {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding-top: 20px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Boîte : max 80 % largeur, centrée */
#followModal .modal-dialog,
#blacklistModal .modal-dialog {
    margin: auto !important;
    max-width: 80vw !important;
    width: 100% !important;
    max-height: calc(100vh - 2rem) !important;
    z-index: 999999 !important;
}

#followModal .modal-content.commercify-modal-content,
#blacklistModal .modal-content.commercify-modal-content {
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4) !important;
    background: #0a0a0a !important;
    color: #f8f9fa !important;
    min-height: 120px !important;
    max-height: calc(100vh - 2rem) !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Header une ligne — typologie dark */
#followModal .modal-header.commercify-modal-header,
#blacklistModal .modal-header.commercify-modal-header {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    padding: clamp(12px, 1.5vw, 18px) clamp(14px, 1.8vw, 22px) !important;
    padding-right: 4rem !important;
    background: #101924 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    flex-shrink: 0 !important;
}

#followModal .modal-title.commercify-modal-title,
#blacklistModal .modal-title.commercify-modal-title {
    margin: 0 !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #ffcc00 !important;
    flex: 1 !important;
    min-width: 0 !important;
}

/* Bouton fermer */
#followModal .commercify-modal-close,
#blacklistModal .commercify-modal-close {
    position: absolute !important;
    top: 50% !important;
    right: 1rem !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #141c26 !important;
    border: 1px solid rgba(255, 204, 0, 0.45) !important;
    border-radius: 0;
    color: #f8f9fa !important;
    cursor: pointer !important;
    transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease !important;
    z-index: 10 !important;
}

#followModal .commercify-modal-close:hover,
#blacklistModal .commercify-modal-close:hover {
    background: #e6b800 !important;
    color: #000000 !important;
    transform: translateY(-50%) scale(1.05) !important;
}

#followModal .commercify-modal-close:focus-visible,
#blacklistModal .commercify-modal-close:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.25) !important;
}

#followModal .commercify-modal-close svg,
#blacklistModal .commercify-modal-close svg {
    width: 22px !important;
    height: 22px !important;
}

/* Body — typologie dark */
#followModal .modal-body.commercify-modal-body,
#blacklistModal .modal-body.commercify-modal-body {
    padding: 1.25rem 1.5rem !important;
    background: #0a0a0a !important;
    color: #f8f9fa !important;
    flex: 1 !important;
    overflow-y: auto !important;
}

#followModal .modal-body .text-warning,
#blacklistModal .modal-body .text-warning {
    color: #ffcc00 !important;
}

/* Bloc éditeur (avatar + slug + slogan) */
#followModal .modal-body .publisher-info,
#blacklistModal .modal-body .publisher-info {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    margin-bottom: 1rem !important;
}

#followModal .modal-body .publisher-info img,
#blacklistModal .modal-body .publisher-info img {
    max-width: 100px !important;
    max-height: 100px !important;
    border-radius: 0;
}

#followModal .modal-body .publisher-slug,
#blacklistModal .modal-body .publisher-slug {
    display: block !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #ffcc00 !important;
}

#followModal .modal-body .publisher-slogan,
#blacklistModal .modal-body .publisher-slogan {
    display: block !important;
    font-style: italic !important;
    color: #8094ae !important;
}

/* Boutons dans le body */
#followModal .modal-body .btn,
#blacklistModal .modal-body .btn {
    padding: 0.5rem 1.25rem !important;
    border-radius: 0;
    font-weight: 500 !important;
}

#followModal .modal-body .commercify-modal-btn-fermer,
#blacklistModal .modal-body .commercify-modal-btn-fermer {
    background: #ffcc00 !important;
    color: #000000 !important;
    border: 1px solid rgba(255, 204, 0, 0.6) !important;
}

#followModal .modal-body .commercify-modal-btn-fermer:hover,
#blacklistModal .modal-body .commercify-modal-btn-fermer:hover {
    background: #e6b800 !important;
    color: #000000 !important;
}

/* ═══ THÈME CLAIR (body.light-mode) — Dash light ═══ */
body.light-mode #followModal .modal-content.commercify-modal-content,
body.light-mode #blacklistModal .modal-content.commercify-modal-content {
    background: #f5f6f8 !important;
    color: #1a1d21 !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

body.light-mode #followModal .modal-header.commercify-modal-header,
body.light-mode #blacklistModal .modal-header.commercify-modal-header {
    background: #eef0f3 !important;
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

body.light-mode #followModal .modal-title.commercify-modal-title,
body.light-mode #blacklistModal .modal-title.commercify-modal-title {
    color: #1a1d21 !important;
}

body.light-mode #followModal .commercify-modal-close,
body.light-mode #blacklistModal .commercify-modal-close {
    background: #eef0f3 !important;
    border-color: rgba(184, 134, 11, 0.5) !important;
    color: #1a1d21 !important;
}

body.light-mode #followModal .commercify-modal-close:hover,
body.light-mode #blacklistModal .commercify-modal-close:hover {
    background: #ffcc00 !important;
    color: #000000 !important;
}

body.light-mode #followModal .modal-body.commercify-modal-body,
body.light-mode #blacklistModal .modal-body.commercify-modal-body {
    background: #f5f6f8 !important;
    color: #1a1d21 !important;
}

body.light-mode #followModal .modal-body .text-warning,
body.light-mode #blacklistModal .modal-body .text-warning {
    color: #b8860b !important;
}

body.light-mode #followModal .modal-body .publisher-slug,
body.light-mode #blacklistModal .modal-body .publisher-slug {
    color: #b8860b !important;
}

body.light-mode #followModal .modal-body .publisher-slogan,
body.light-mode #blacklistModal .modal-body .publisher-slogan {
    color: #4a5568 !important;
}

body.light-mode #followModal .modal-body .commercify-modal-btn-fermer,
body.light-mode #blacklistModal .modal-body .commercify-modal-btn-fermer {
    background: #b8860b !important;
    color: #ffffff !important;
    border-color: #b8860b !important;
}

body.light-mode #followModal .modal-body .commercify-modal-btn-fermer:hover,
body.light-mode #blacklistModal .modal-body .commercify-modal-btn-fermer:hover {
    background: #996f09 !important;
    color: #ffffff !important;
    border-color: #996f09 !important;
}
