/* public/assets/css/partials/site-alert-modal.css
   Modale d'alerte site-wide, réutilisable (home + pages de détail).
   Tokens autonomes (préfixe --pdam-*) : ne dépend pas de home.css ni
   de magazine_v3.css, donc fonctionne identiquement sur toutes les pages. */

.pd-alert-modal {
    --pdam-bg: #ffffff;
    --pdam-text: #15171a;
    --pdam-text-soft: #5b6066;
    --pdam-border: #ebe7e1;
    --pdam-accent: #ff6233;
    --pdam-accent-ink: #ffffff;
    --pdam-backdrop: rgba(17, 17, 17, 0.46);
    --pdam-shadow: 0 24px 60px rgba(17, 19, 22, 0.22);
}

html[data-theme="dark"] .pd-alert-modal,
html.theme-dark .pd-alert-modal {
    --pdam-bg: #181a1d;
    --pdam-text: #f3f1ee;
    --pdam-text-soft: #b3afa9;
    --pdam-border: #2c2e32;
    --pdam-accent: #ff7a52;
    --pdam-accent-ink: #15171a;
    --pdam-backdrop: rgba(0, 0, 0, 0.6);
    --pdam-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.pd-alert-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.pd-alert-modal[hidden] { display: none; }

.pd-alert-modal__backdrop {
    position: absolute;
    inset: 0;
    background: var(--pdam-backdrop);
    backdrop-filter: blur(2px);
}

.pd-alert-modal__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--pdam-bg);
    color: var(--pdam-text);
    border: 1px solid var(--pdam-border);
    border-radius: 14px;
    box-shadow: var(--pdam-shadow);
    padding: 28px 26px 24px;
    text-align: center;
    animation: pdam-pop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pdam-pop {
    from { opacity: 0; transform: scale(0.96) translateY(6px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.pd-alert-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--pdam-text-soft);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
}
.pd-alert-modal__close:hover { background: var(--pdam-border); color: var(--pdam-text); }

.pd-alert-modal__icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    border-radius: 50%;
    background: rgba(255, 98, 51, 0.12);
}

.pd-alert-modal__title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--pdam-text);
}

.pd-alert-modal__message {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--pdam-text-soft);
}
.pd-alert-modal__message p { margin: 0 0 8px; }
.pd-alert-modal__message p:last-child { margin-bottom: 0; }
.pd-alert-modal__message a { color: var(--pdam-accent); text-decoration: underline; }

.pd-alert-modal__actions {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pd-alert-modal__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    background: var(--pdam-accent);
    color: var(--pdam-accent-ink);
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    border-radius: 8px;
    transition: opacity 0.15s ease;
}
.pd-alert-modal__cta:hover { opacity: 0.88; }

.pd-alert-modal__dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    background: transparent;
    color: var(--pdam-text-soft);
    border: 1px solid var(--pdam-border);
    font-weight: 600;
    font-size: 0.82rem;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.pd-alert-modal__dismiss:hover { border-color: var(--pdam-text-soft); color: var(--pdam-text); }
