/* Image Tooltip Styles */

.image-tooltip-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.image-tooltip-wrapper:hover {
    transform: scale(1.02);
}

.image-tooltip-wrapper img {
    display: block;
    max-width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
}

.image-tooltip-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(249, 246, 233, 0.95); /* #F9F6E9 avec transparence */
    border: 2px solid #D8C07A; /* Bordure dorée */
    border-radius: 8px;
    padding: 20px 25px;
    min-width: 280px;
    max-width: 450px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    word-break: keep-all;
    overflow-wrap: normal;
}

.image-tooltip-wrapper:hover .image-tooltip-popup {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) translateY(-5px);
}

.tooltip-price {
    font-size: 18px;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: 0.5px;
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;
}

.tooltip-note {
    font-size: 14px;
    line-height: 1.6;
    color: #4a4a4a;
    text-align: center;
    font-weight: 400;
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;
}

/* Animation douce pour l'apparition */
@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(-5px);
    }
}

.image-tooltip-wrapper:hover .image-tooltip-popup {
    animation: tooltipFadeIn 0.3s ease forwards;
}

/* Style pour les images au survol */
.image-tooltip-wrapper:hover img {
    opacity: 0.85;180px;
        max-width: 85vw;
        padding: 15px 18px;
        width: auto;
    }
    
    .tooltip-price {
        font-size: 15px;
        margin-bottom: 10px;
        letter-spacing: 0.3px;
    }
    
    .tooltip-note {
        font-size: 12px;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .image-tooltip-popup {
        position: fixed;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        min-width: 0;
        max-width: 85vw;
        width: auto;
        padding: 15px 20px;
        margin: 0 10px;
    }
    
    .image-tooltip-wrapper:hover .image-tooltip-popup {
        transform: translate(-50%, -50%) !important;
    }
    
    .tooltip-price {
        font-size: 14px;
        margin-bottom: 8px;
        letter-spacing: 0.2px;
        white-space: normal;
    }
    
    .tooltip-note {
        font-size: 11px;
        line-height: 1.4;
        white-space: normal;
    }
}

/* Support tactile pour mobile - tooltip plus visible */
@media (max-width: 768px) {
    .image-tooltip-wrapper.touch-active .image-tooltip-popup,
    .image-tooltip-popup.touch-active {
        opacity: 1 !important;
        visibility: visible !important;
        min-width: 280px;
        max-width: 90vw;
    }
    
    .image-tooltip-wrapper:hover .image-tooltip-popup {
        transform: translate(-50%, -50%) !important;
    }
}

/* Variante avec fond plus opaque si nécessaire */
.image-tooltip-popup.solid {
    background-color: #F9F6E9;
}

/* Style alternatif pour texte anthracite */
.tooltip-price.dark {
    color: #3d3d3d;
}

.tooltip-note.dark {
    color: #5a5a5a;
}
