/* ============================================================
   WIDGET SABINA - Bouton flottant + Fenêtre de chat
   ============================================================ */

#sabina-widget-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.5);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: transform 0.3s, box-shadow 0.3s;
}

#sabina-widget-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(233, 69, 96, 0.7);
}

#sabina-widget-button img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

#sabina-widget-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 400px;
    height: 600px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 999998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Segoe UI', sans-serif;
}

#sabina-widget-container.open {
    display: flex;
}

#sabina-widget-header {
    background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#sabina-widget-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
}

#sabina-widget-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

#sabina-widget-avatar {
    height: 200px;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#sabina-widget-avatar canvas {
    width: 100%;
    height: 100%;
}

#sabina-widget-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sabina-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.9em;
    line-height: 1.4;
    word-wrap: break-word;
}

.sabina-message.user {
    background: #e94560;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.sabina-message.bot {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0ff;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.sabina-message.system {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
    align-self: center;
    font-size: 0.85em;
    text-align: center;
}

#sabina-widget-input-area {
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 10px;
    align-items: center;
}

#sabina-widget-input {
    flex: 1;
    padding: 12px 15px;
    border-radius: 25px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.95em;
    outline: none;
}

#sabina-widget-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.sabina-widget-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: #e94560;
    color: white;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.sabina-widget-btn:hover {
    background: #ff6b6b;
}

.sabina-widget-btn.active {
    background: #00ff88;
    color: #000;
}

#sabina-widget-status {
    text-align: center;
    padding: 5px;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.2);
}

@media (max-width: 600px) {
    #sabina-widget-container {
        width: calc(100% - 20px);
        height: calc(100% - 120px);
        bottom: 80px;
        right: 10px;
    }
    #sabina-widget-button {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}
