/*
 * Module Blocage : popup des actions bloquees (js/blocage-popup.js).
 * Verre depoli aux couleurs du theme par defaut (css/main.css) :
 * bleu nuit #394263, primaire #5e93ff, danger #e74c3c.
 */

.blk-popup-overlay {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 20000; /* au-dessus des modales Bootstrap (1050) et de HoldOn */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: "Segoe UI Variable", "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    /* Voile leger + halos aux couleurs du CRM places derriere la carte : le verre
       a ainsi du contenu et de la couleur a depolir. */
    background:
        radial-gradient(circle at 42% 38%, rgba(94, 147, 255, 0.40), transparent 22%),
        radial-gradient(circle at 58% 64%, rgba(231, 76, 60, 0.22), transparent 18%),
        rgba(57, 66, 99, 0.30);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.blk-popup-overlay.blk-popup-in { opacity: 1; }

.blk-popup-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 28px;
    border-radius: 24px;
    color: #394263;
    text-align: left;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.66) 0%, rgba(255, 255, 255, 0.40) 100%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    box-shadow:
        0 32px 80px -24px rgba(57, 66, 99, 0.50),
        0 8px 24px -12px rgba(57, 66, 99, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translateY(10px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}
.blk-popup-in .blk-popup-card { opacity: 1; transform: none; }

.blk-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #8a93a8;
    font-size: 22px;
    line-height: 32px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.blk-popup-close:hover { background: rgba(57, 66, 99, 0.08); color: #394263; }

.blk-popup-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #e74c3c;
    background: linear-gradient(145deg, rgba(231, 76, 60, 0.16), rgba(231, 76, 60, 0.06));
    border: 1px solid rgba(231, 76, 60, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.blk-popup-tag {
    display: inline-block;
    margin-bottom: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #c0392b;
    background: rgba(231, 76, 60, 0.10);
}

.blk-popup-title {
    margin: 0 0 10px;
    font-family: inherit;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: #394263;
}

.blk-popup-msg {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.6;
    color: #4a5373;
    white-space: pre-line;   /* respecte les retours a la ligne du message configure */
    word-wrap: break-word;
}

.blk-popup-note {
    margin: 0 0 24px;
    font-size: 12.5px;
    color: #6b7390;
}
.blk-popup-note .fa { margin-right: 4px; opacity: 0.8; }

.blk-popup-btn {
    display: block;
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    color: #ffffff;
    background: #394263;
    box-shadow: 0 8px 20px -8px rgba(57, 66, 99, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.blk-popup-btn:hover { background: #454f75; transform: translateY(-1px); }
.blk-popup-btn:active { transform: none; }
.blk-popup-btn:focus { outline: none; }
.blk-popup-btn:focus-visible { box-shadow: 0 0 0 3px rgba(94, 147, 255, 0.45); }

/* Navigateurs sans backdrop-filter : carte opaque pour rester lisible */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .blk-popup-overlay { background: rgba(57, 66, 99, 0.6); }
    .blk-popup-card { background: #ffffff; }
}

@media (prefers-reduced-motion: reduce) {
    .blk-popup-overlay, .blk-popup-card, .blk-popup-btn { transition: none; }
}
