/**
 * Styles pour les infobulles de description produit
 * Plugin: La Fée D'Lys - Bon de Commande
 */

/* ===================================================================== */
/* BOUTON D'INFORMATION */
/* ===================================================================== */

.btn-info-produit {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #2196F3;
    color: white;
    border: none;
    cursor: help;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0;
    position: relative;
}

/* Effet hover sur le bouton */
.btn-info-produit:hover {
    background-color: #1976D2;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.4);
}

/* Effet actif (clic) */
.btn-info-produit:active {
    transform: scale(1.05);
}

/* Icône SVG à l'intérieur du bouton */
.btn-info-produit svg {
    fill: none;
    stroke: white;
    pointer-events: none;
}

/* ===================================================================== */
/* INFOBULLE */
/* ===================================================================== */

.product-tooltip {
    position: absolute;
    background-color: #ffffff;
    border: 2px solid #2196F3;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-width: 400px;
    min-width: 250px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

/* État visible de l'infobulle */
.product-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Flèche de l'infobulle pointant vers le bouton (bordure extérieure) */
.product-tooltip::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 15px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid #2196F3;
}

/* Flèche intérieure (remplissage blanc) */
.product-tooltip::after {
    content: '';
    position: absolute;
    left: -7px;
    top: 16px;
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-right: 9px solid #ffffff;
}

/* ===================================================================== */
/* CONTENU DE L'INFOBULLE */
/* ===================================================================== */

.product-tooltip p {
    margin: 0 0 10px 0;
}

.product-tooltip p:last-child {
    margin-bottom: 0;
}

.product-tooltip strong {
    color: #1976D2;
}

/* ===================================================================== */
/* ANIMATIONS */
/* ===================================================================== */

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tooltipFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* ===================================================================== */
/* RESPONSIVE */
/* ===================================================================== */

@media screen and (max-width: 768px) {
    .product-tooltip {
        max-width: 300px;
        min-width: 200px;
        font-size: 13px;
        padding: 12px 15px;
    }
    
    /* Sur mobile, positionner l'infobulle au-dessus du bouton */
    .product-tooltip::before {
        left: 15px;
        top: auto;
        bottom: -10px;
        border-right: 10px solid transparent;
        border-left: 10px solid transparent;
        border-top: 10px solid #2196F3;
    }
    
    .product-tooltip::after {
        left: 16px;
        top: auto;
        bottom: -7px;
        border-right: 9px solid transparent;
        border-left: 9px solid transparent;
        border-top: 9px solid #ffffff;
    }
}

/* ===================================================================== */
/* ÉTATS SPÉCIAUX */
/* ===================================================================== */

/* Infobulle sans description (message par défaut) */
.product-tooltip.no-description {
    font-style: italic;
    color: #999;
}

/* Infobulle en cours de chargement */
.product-tooltip.loading::before {
    content: 'Chargement...';
    display: block;
    text-align: center;
    color: #999;
}