/* ============================================
   MAD Technologies - Boite de dialogue pop-up
   Utilisation :
     <div class="mad-popup-trigger" data-type="success"
          data-title="Titre" style="display:none">Message</div>
   API JS : madAlert(message, type) | madConfirm(message, onOk)
   Types : success | error | info | confirm
   ============================================ */
.mad-popup {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.mad-popup.show { display: flex; }
.mad-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(29, 35, 51, 0.65);
    backdrop-filter: blur(2px);
}
.mad-popup-box {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
    padding: 40px 35px 32px;
    text-align: center;
    overflow: hidden;
    transform: scale(0.92) translateY(12px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.mad-popup.show .mad-popup-box { transform: scale(1) translateY(0); opacity: 1; }
.mad-popup-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #282a65, #f1403a);
}
.mad-popup-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 32px;
}
.mad-popup.success .mad-popup-icon { background: #e8f8ee; color: #16a34a; }
.mad-popup.error .mad-popup-icon { background: #fdecec; color: #dc2626; }
.mad-popup.info .mad-popup-icon { background: #e8f0fe; color: #282a65; }
.mad-popup.confirm .mad-popup-icon { background: #fef3e2; color: #d97706; }
.mad-popup-title {
    font-size: 22px;
    font-weight: 700;
    color: #282a65;
    margin: 0 0 10px;
}
.mad-popup-message {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 26px;
    white-space: pre-line;
}
.mad-popup-actions { display: flex; gap: 12px; justify-content: center; }
.mad-popup-actions .theme-btn,
.mad-popup-btn {
    border: none;
    cursor: pointer;
    padding: 14px 38px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #282a65 0%, #1a1b4a 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    display: inline-block;
}
.mad-popup-actions .theme-btn:hover,
.mad-popup-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(40, 42, 101, 0.35); color: #fff; }
.mad-popup-btn-secondary {
    background: #eef0f6;
    color: #282a65;
}
.mad-popup-btn-secondary:hover { color: #282a65; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12); }
@media (max-width: 480px) {
    .mad-popup-box { padding: 32px 22px 26px; }
    .mad-popup-title { font-size: 19px; }
}
