/* Wycan Draw Images - Frontend Styles */

.wycan-image-map-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 100%;
    line-height: 0;
}

.wycan-base-image {
    display: block;
    width: 100%;
    height: auto;
}

.wycan-overlay-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.wycan-zone {
    pointer-events: auto;
    cursor: pointer;
    transition: fill 0.3s ease, stroke 0.3s ease;
    vector-effect: non-scaling-stroke;
}

.wycan-zone.wycan-hover {
    stroke-width: 2px;
}

/* Tooltip */
.wycan-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    transform: translate(-50%, -100%);
    margin-top: -10px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wycan-tooltip.visible {
    opacity: 1;
}

.wycan-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 0, 0, 0.85);
}

/* Loading state */
.wycan-image-map-container.loading .wycan-zone {
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wycan-tooltip {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* Custom Modal (fallback) */
.wycan-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.wycan-modal {
    background: #fff;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.wycan-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    background: #333;
    color: #fff;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wycan-modal-close:hover {
    background: #000;
}

.wycan-modal-content {
    padding: 20px;
}

/* Animations au survol */
@keyframes wycan-pulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.02);
    }
}

@keyframes wycan-glow {
    0%, 100% {
        filter: drop-shadow(0 0 2px currentColor);
    }
    50% {
        filter: drop-shadow(0 0 8px currentColor) drop-shadow(0 0 15px currentColor);
    }
}

@keyframes wycan-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-2%);
    }
    75% {
        transform: translateY(2%);
    }
}

.wycan-zone.wycan-anim-fade {
    transition: fill 0.5s ease, stroke 0.5s ease, opacity 0.5s ease;
}

.wycan-zone.wycan-anim-pulse {
    animation: wycan-pulse 1s ease-in-out infinite;
}

.wycan-zone.wycan-anim-glow {
    animation: wycan-glow 1.5s ease-in-out infinite;
}

.wycan-zone.wycan-anim-bounce {
    animation: wycan-bounce 0.6s ease-in-out infinite;
    transform-origin: center center;
    transform-box: fill-box;
}

/* Animation Chenille - bordure qui tourne */
@keyframes wycan-border-run {
    0% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: -30;
    }
}

.wycan-zone.wycan-anim-border-run {
    stroke-dasharray: 8 4;
    animation: wycan-border-run 0.5s linear infinite;
}
