/* Container styles */
.who-blur-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Image styles */
.should-blur img {
    filter: blur(10px);
    transition: filter 0.3s ease-in-out;
    width: 100%;
}

.should-blur img.unblurred {
    filter: blur(0);
}

/* Overlay styles */
.who-blur-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1;
    text-align: center;
}

/* Global unblur button */
.who-blur-global-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2271b1;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 999;
    transition: all 0.3s ease;
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
}

.who-blur-global-button:hover {
    background: #135e96;
    transform: scale(1.05);
}

.who-blur-global-button.visible {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Ensure responsive behavior */
.wp-block-image.should-blur {
    margin: 0;
}

.wp-block-image.should-blur img {
    width: 100%;
    height: auto;
}

/* Media query for mobile devices */
@media screen and (max-width: 768px) {
    .who-blur-global-button {
        bottom: 10px;
        right: 10px;
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Accessibility focus styles */
.who-blur-overlay:focus,
.who-blur-global-button:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Style focus visible uniquement au clavier */
.who-blur-overlay:focus:not(:focus-visible),
.who-blur-global-button:focus:not(:focus-visible) {
    outline: none;
}

.who-blur-overlay:focus-visible,
.who-blur-global-button:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Amélioration du contraste pour l'overlay */
.who-blur-overlay {
    /* ... styles existants ... */
    background: rgba(0, 0, 0, 0.85); /* Meilleur contraste */
    font-size: 16px; /* Taille de police minimum recommandée */
}

/* Style pour le focus trap */
.who-blur-container:focus-within {
    outline: none;
    box-shadow: 0 0 0 2px #2271b1;
}
