/**
 * Styles Public - Protection des images
 * Version : 1.0.0
 * Polices système, zéro dépendance, accessibilité.
 */

:root {
    /* Police système pour performance et cohérence (Zéro octet téléchargé) */
    --abb-ip-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ==========================================================================
   1. IMAGE PROTÉGÉE
   ========================================================================== */

img.abb-protected {
    -webkit-user-select: none; /* Safari/Chrome */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE10+/Edge */
    user-select: none;         /* Standard */
    
    -webkit-user-drag: none;   /* Empêche le glisser-déposer */
    user-drag: none;
    
    pointer-events: auto;      /* Laisse passer les clics normaux (lien parent) mais bloque le contexte */
    touch-action: manipulation;
}

/* ==========================================================================
   2. MODE PANIQUE (Flou + Overlay)
   ========================================================================== */

body.abb-ip-blur-active {
    filter: blur(10px);
    pointer-events: none; /* Bloque toute interaction */
    overflow: hidden;     /* Empêche le scroll */
    height: 100vh;
    width: 100vw;
}

#abb-ip-blur-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999998; /* Juste en dessous du Toast */
    justify-content: center;
    align-items: center;
    color: #fff;
    font-family: var(--abb-ip-font-family);
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(5px); /* Flou supplémentaire sur l'overlay lui-même */
}

#abb-ip-blur-overlay.visible {
    display: flex;
}

/* ==========================================================================
   3. NOTIFICATION TOAST (Alerte Clic Droit)
   ========================================================================== */

#abb-ip-toast {
    visibility: hidden;
    min-width: 300px;
    max-width: 90%;
    background-color: #2c3338; /* Gris foncé WP Admin */
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 16px 20px;
    position: fixed;
    z-index: 999999; /* Au-dessus de tout */
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-family: var(--abb-ip-font-family);
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease, bottom 0.3s ease;
    border-left: 5px solid #d63638; /* Rouge d'alerte */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    line-height: 1.5;
}

#abb-ip-toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 40px;
}

/* ==========================================================================
   4. ACCESSIBILITÉ & CONTRASTE
   ========================================================================== */

/* S'assurer que le focus reste visible si nécessaire (navigation clavier) */
@media (prefers-contrast: more) {
    #abb-ip-toast {
        border: 2px solid #fff;
    }
}