/*!
 * Plugin Name: Alys Luna Witch - Interactive Assistant
 * File: assets/css/widget.css
 * Version: 1.2.1
 * Updated: 2026-10-17
 */
/* ==========================================================================
   ALYS LUNA WITCH WIDGET - STYLES ISOLÉS
   ========================================================================== */

#alys-witch-bubble,
#alys-witch-window,
#alys-witch-window * {
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    line-height: 1.4 !important;
}

/* --- Bulle flottante --- */
#alys-witch-bubble {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 999999 !important;
    cursor: pointer !important;
    background: linear-gradient(135deg, #7e22ce, #581c87) !important;
    width: 65px !important;
    height: 65px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 18px rgba(107, 33, 168, 0.5) !important;
    border: 2px solid #e9d5ff !important;
    overflow: hidden !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
    animation: witchFloat 3s ease-in-out infinite !important;
}

#alys-witch-bubble:hover {
    transform: scale(1.08) !important;
    box-shadow: 0 6px 22px rgba(107, 33, 168, 0.7) !important;
}

#alys-witch-bubble img.alys-witch-avatar-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50% !important;
    display: block !important;
}

/* --- Fenêtre --- */
#alys-witch-window {
    display: none;
    position: fixed !important;
    bottom: 95px !important;
    right: 20px !important;
    width: 380px !important;
    max-width: calc(100vw - 30px) !important;
    height: 540px !important;
    max-height: calc(100vh - 120px) !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25) !important;
    z-index: 999999 !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border: 1px solid #e9d5ff !important;
}

#alys-witch-window[data-open="true"] {
    display: flex !important;
}

/* --- Header --- */
.alys-witch-header {
    background: #6b21a8 !important;
    color: #ffffff !important;
    padding: 10px 14px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    min-height: 52px !important;
    flex-shrink: 0 !important;
}

.alys-witch-header-brand { display: flex !important; align-items: center !important; gap: 10px !important; }
.alys-witch-header-brand strong { color: #ffffff !important; font-size: 15px !important; }

img.alys-witch-header-avatar {
    width: 36px !important; height: 36px !important; border-radius: 50% !important;
    object-fit: cover !important; border: 1.5px solid #e9d5ff !important;
}

.alys-witch-close { background: transparent !important; border: none !important; color: #ffffff !important; cursor: pointer !important; font-size: 24px !important; }

/* --- Corps --- */
.alys-witch-body { padding: 14px !important; flex: 1 !important; overflow-y: auto !important; background: #ffffff !important; }
.alys-witch-body p { margin: 0 0 12px 0 !important; color: #374151 !important; font-size: 13.5px !important; }

/* --- Boutons --- */
.witch-btn, .witch-option-btn {
    display: block !important; width: 100% !important; text-align: left !important;
    background: #f3e8ff !important; color: #581c87 !important; border: 1px solid #d8b4fe !important;
    border-radius: 10px !important; padding: 10px 12px !important; margin-bottom: 8px !important;
    cursor: pointer !important; font-size: 13px !important; font-weight: 500 !important;
}
.witch-btn:hover, .witch-option-btn:hover { background: #6b21a8 !important; color: #ffffff !important; }

.witch-back { background: transparent !important; border: none !important; color: #6b21a8 !important; cursor: pointer !important; font-size: 12px !important; margin-bottom: 12px !important; text-decoration: underline !important; }

/* ==========================================================
   CARTES PRODUITS (Le correctif est ici)
   ========================================================== */
.witch-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #faf5ff !important;
    border: 1px solid #e9d5ff !important;
    border-radius: 10px !important;
    padding: 8px 10px !important;
    margin-bottom: 10px !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

/* L'image est forcée à rester petite */
.witch-card img {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
    border: 1px solid #d8b4fe !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Le texte prend tout l'espace restant */
.witch-card-info {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.witch-card-info strong {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    color: #581c87 !important;
    word-break: break-word !important;
    margin-bottom: 2px !important;
}

.witch-card-info .witch-price {
    font-size: 11px !important;
    color: #7e22ce !important;
    font-weight: 700 !important;
}

/* Le bouton Voir */
.witch-card-btn {
    background: #6b21a8 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}
.witch-card-btn:hover { background: #581c87 !important; color: #ffffff !important; }

/* --- Footer --- */
.alys-witch-footer { padding: 10px !important; background: #faf5ff !important; border-top: 1px solid #e9d5ff !important; text-align: center !important; }
.alys-witch-reset { background: transparent !important; border: none !important; color: #6b21a8 !important; cursor: pointer !important; font-size: 12px !important; text-decoration: underline !important; }

@keyframes witchFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}
/* Mention légale */
.alys-witch-disclaimer {
    font-size: 10px !important;
    color: #6b7280 !important;
    line-height: 1.2 !important;
    padding: 0 10px !important;
    text-align: center !important;
}
