151 lines
5.3 KiB
HTML
151 lines
5.3 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="fr">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>WEVAL Technology Platform — Pleine largeur</title>
|
||
<style>
|
||
* { margin:0; padding:0; box-sizing:border-box }
|
||
html, body { width:100%; height:100vh; overflow:hidden; background:#0a0e1a; color:#e2e8f0; font-family:-apple-system,system-ui,sans-serif }
|
||
|
||
.wtp-container { width:100%; height:100vh; position:relative }
|
||
.wtp-iframe { width:100%; height:100%; border:0; display:block }
|
||
|
||
/* Floating action button for WEVIA chat */
|
||
.wevia-fab {
|
||
position:fixed; bottom:24px; right:24px;
|
||
width:64px; height:64px; border-radius:50%;
|
||
background:linear-gradient(135deg,#6366f1,#818cf8);
|
||
color:#fff; font-size:28px;
|
||
display:flex; align-items:center; justify-content:center;
|
||
cursor:pointer; box-shadow:0 8px 24px rgba(99,102,241,.4);
|
||
z-index:9999; transition:transform .2s, box-shadow .2s;
|
||
border:none;
|
||
}
|
||
.wevia-fab:hover { transform:scale(1.08); box-shadow:0 12px 32px rgba(99,102,241,.6) }
|
||
.wevia-fab .pulse {
|
||
position:absolute; inset:-4px; border-radius:50%; border:2px solid #818cf8;
|
||
animation:pulse 2s infinite; pointer-events:none;
|
||
}
|
||
@keyframes pulse { 0% { transform:scale(1); opacity:1 } 100% { transform:scale(1.3); opacity:0 } }
|
||
|
||
/* Chat panel slide from right */
|
||
.wevia-panel {
|
||
position:fixed; top:0; right:-100%; width:min(420px, 100vw);
|
||
height:100vh; background:#0f172a; border-left:1px solid rgba(99,102,241,.2);
|
||
transition:right .3s ease; z-index:9998; display:flex; flex-direction:column;
|
||
box-shadow:-12px 0 40px rgba(0,0,0,.5);
|
||
}
|
||
.wevia-panel.open { right:0 }
|
||
.wevia-head {
|
||
padding:14px 18px; background:#1e293b; border-bottom:1px solid rgba(99,102,241,.15);
|
||
display:flex; align-items:center; justify-content:space-between;
|
||
}
|
||
.wevia-head-title { display:flex; align-items:center; gap:10px; font-weight:600; font-size:14px }
|
||
.wevia-head-title .dot { width:8px; height:8px; border-radius:50%; background:#4ade80; box-shadow:0 0 8px #4ade80; animation:pulse-dot 2s infinite }
|
||
@keyframes pulse-dot { 50% { opacity:.5 } }
|
||
.wevia-close {
|
||
background:rgba(248,113,113,.1); border:1px solid rgba(248,113,113,.3);
|
||
color:#f87171; width:32px; height:32px; border-radius:8px; cursor:pointer; font-size:18px;
|
||
display:flex; align-items:center; justify-content:center;
|
||
}
|
||
.wevia-close:hover { background:rgba(248,113,113,.2) }
|
||
.wevia-iframe { flex:1; width:100%; border:0; background:#0a0e1a }
|
||
|
||
/* Overlay backdrop */
|
||
.wevia-backdrop {
|
||
position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:9997;
|
||
opacity:0; pointer-events:none; transition:opacity .3s;
|
||
}
|
||
.wevia-backdrop.show { opacity:1; pointer-events:auto }
|
||
|
||
/* Banner si pas connecté */
|
||
.auth-banner {
|
||
position:fixed; top:0; left:0; right:0; padding:12px 20px;
|
||
background:linear-gradient(90deg,#6366f1,#818cf8); color:#fff;
|
||
text-align:center; z-index:10000; display:none; font-size:14px; font-weight:500;
|
||
}
|
||
.auth-banner a { color:#fff; text-decoration:underline; margin-left:8px; font-weight:600 }
|
||
.auth-banner.show { display:block }
|
||
.auth-banner.show + .wtp-container { padding-top:44px }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
|
||
<div id="auth-banner" class="auth-banner">
|
||
🔐 Session non authentifiée · <a href="/wtp-login.html">Se connecter</a>
|
||
</div>
|
||
|
||
<div class="wtp-container">
|
||
<iframe class="wtp-iframe" src="/weval-technology-platform.html?embed=1" title="WEVAL Technology Platform"></iframe>
|
||
</div>
|
||
|
||
<!-- Floating WEVIA button -->
|
||
<button class="wevia-fab" id="weviaFab" title="Ouvrir chat WEVIA Master">
|
||
<span class="pulse"></span>
|
||
💬
|
||
</button>
|
||
|
||
<!-- WEVIA chat panel -->
|
||
<div class="wevia-backdrop" id="weviaBackdrop"></div>
|
||
<div class="wevia-panel" id="weviaPanel">
|
||
<div class="wevia-head">
|
||
<div class="wevia-head-title"><span class="dot"></span>WEVIA Master · multi-agents</div>
|
||
<button class="wevia-close" id="weviaClose">×</button>
|
||
</div>
|
||
<iframe class="wevia-iframe" id="weviaFrame" src="about:blank" title="WEVIA chat"></iframe>
|
||
</div>
|
||
|
||
<script>
|
||
// Check auth
|
||
(async function() {
|
||
try {
|
||
const r = await fetch('/api/weval-auth-session.php?action=status', { credentials:'include' });
|
||
const d = await r.json();
|
||
if (!d.authenticated) {
|
||
document.getElementById('auth-banner').classList.add('show');
|
||
}
|
||
} catch(e) {}
|
||
})();
|
||
|
||
// Toggle chat panel
|
||
const fab = document.getElementById('weviaFab');
|
||
const panel = document.getElementById('weviaPanel');
|
||
const backdrop = document.getElementById('weviaBackdrop');
|
||
const closeBtn = document.getElementById('weviaClose');
|
||
const frame = document.getElementById('weviaFrame');
|
||
|
||
let chatLoaded = false;
|
||
function openChat() {
|
||
if (!chatLoaded) {
|
||
frame.src = '/wevia-widget.html';
|
||
chatLoaded = true;
|
||
}
|
||
panel.classList.add('open');
|
||
backdrop.classList.add('show');
|
||
}
|
||
function closeChat() {
|
||
panel.classList.remove('open');
|
||
backdrop.classList.remove('show');
|
||
}
|
||
|
||
fab.addEventListener('click', openChat);
|
||
closeBtn.addEventListener('click', closeChat);
|
||
backdrop.addEventListener('click', closeChat);
|
||
|
||
// ESC to close
|
||
document.addEventListener('keydown', e => {
|
||
if (e.key === 'Escape') closeChat();
|
||
});
|
||
|
||
// Keyboard shortcut Ctrl+/ or Ctrl+K to open chat
|
||
document.addEventListener('keydown', e => {
|
||
if ((e.ctrlKey || e.metaKey) && (e.key === '/' || e.key === 'k')) {
|
||
e.preventDefault();
|
||
openChat();
|
||
}
|
||
});
|
||
</script>
|
||
</body>
|
||
</html>
|