852 lines
46 KiB
JavaScript
852 lines
46 KiB
JavaScript
/* == GLOBAL CTA FUNCTIONS == */window.__wrOpenBooking WEVAL = function() { window.open("/booking.html/30min", "_blank"); };window.__wrOpenContactModal = function() { window.location.href = "/contact-us"; };
|
|
/**
|
|
* WEVAL-AUDIT-RECO.js — P0 Audit Recommendations Injection
|
|
* Global script loaded on ALL pages
|
|
*
|
|
* Injects:
|
|
* 1. GA4 + Microsoft Clarity analytics (P0-1)
|
|
* 2. Floating CTA bar "Demander un devis" (P0-2)
|
|
* 3. Contact form modal (P0-2)
|
|
* 4. Newsletter signup banner (P0-5)
|
|
* 5. Booking WEVAL popup trigger (P0-6)
|
|
* 6. Case Studies CTA section on homepage (P0-3)
|
|
*
|
|
* NOTE: GA4 ID and Clarity ID are placeholders (XXXXXXXXXX)
|
|
* Replace with real IDs when accounts are created
|
|
*/
|
|
(function(){var s=document.createElement("style");s.textContent="@media(min-width:769px){.main-navigation{display:flex!important;align-items:center!important;gap:.1rem!important;flex:1!important;justify-content:center!important}.mobile-toggle{display:none!important}.header-wrapper{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:0 1.5rem!important;max-width:1400px!important;margin:0 auto!important}.header-right{display:flex!important;align-items:center!important;gap:.5rem!important}.contact-button{display:inline-flex!important}.nav-link{font-size:.82rem!important;padding:.5rem .6rem!important;white-space:nowrap!important}}";document.head.appendChild(s);})();
|
|
(function(){var s=document.createElement("style");s.textContent="@keyframes weval-pulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.06);opacity:.85}}.weval-logo{animation:weval-pulse 3s ease-in-out infinite!important}";document.head.appendChild(s);})();
|
|
(function(){
|
|
'use strict';
|
|
|
|
// Prevent double injection
|
|
if(window.__wevalAuditRecoDone) return;
|
|
window.__wevalAuditRecoDone = true;
|
|
|
|
// ============================================================
|
|
// 0. CSS INJECTION — All styles in one block
|
|
// ============================================================
|
|
var css = document.createElement('style');
|
|
css.id = 'weval-audit-reco-css';
|
|
css.textContent = `
|
|
|
|
|
|
|
|
|
|
/* ===== FLOATING CTA BAR ===== */
|
|
.wr-floating-cta {
|
|
position:fixed; bottom:0; left:0; right:0; z-index:9990;
|
|
background:linear-gradient(135deg,#1e1b4b,#312e81);
|
|
padding:12px 20px; display:flex; align-items:center; justify-content:center; gap:16px;
|
|
transform:translateY(100%); transition:transform .5s cubic-bezier(.16,1,.3,1);
|
|
box-shadow:0 -4px 30px rgba(0,0,0,.3);
|
|
border-top:1px solid rgba(99,102,241,.3);
|
|
}
|
|
.wr-floating-cta.visible { transform:translateY(0); }
|
|
.wr-floating-cta-text {
|
|
color:#e2e8f0; font-family:'Outfit',Sora,sans-serif; font-size:.9rem; font-weight:400;
|
|
}
|
|
.wr-floating-cta-text strong { color:#a5b4fc; font-weight:600; }
|
|
.wr-cta-btn {
|
|
display:inline-flex; align-items:center; gap:8px;
|
|
padding:10px 24px; border-radius:10px; font-family:'Outfit',Sora,sans-serif;
|
|
font-size:.85rem; font-weight:600; cursor:pointer; border:none;
|
|
transition:all .3s cubic-bezier(.16,1,.3,1); text-decoration:none; white-space:nowrap;
|
|
}
|
|
.wr-cta-primary {
|
|
background:linear-gradient(135deg,#6366f1,#818cf8); color:#fff;
|
|
box-shadow:0 4px 15px rgba(99,102,241,.3);
|
|
}
|
|
.wr-cta-primary:hover { transform:translateY(-2px); box-shadow:0 8px 25px rgba(99,102,241,.4); }
|
|
.wr-cta-secondary {
|
|
background:rgba(255,255,255,.08); color:#c7d2fe; border:1px solid rgba(99,102,241,.2);
|
|
}
|
|
.wr-cta-secondary:hover { background:rgba(255,255,255,.12); border-color:#818cf8; }
|
|
.wr-cta-close {
|
|
position:absolute; right:16px; top:50%; transform:translateY(-50%);
|
|
background:none; border:none; color:#64748b; font-size:18px; cursor:pointer; padding:4px 8px;
|
|
}
|
|
.wr-cta-close:hover { color:#94a3b8; }
|
|
|
|
/* ===== CONTACT MODAL ===== */
|
|
.wr-modal-overlay {
|
|
position:fixed; top:0; left:0; right:0; bottom:0; z-index:9999;
|
|
background:rgba(0,0,0,.7); backdrop-filter:blur(4px);
|
|
display:none; align-items:center; justify-content:center;
|
|
opacity:0; transition:opacity .3s ease;
|
|
}
|
|
.wr-modal-overlay.active { display:flex; opacity:1; }
|
|
.wr-modal {
|
|
background:linear-gradient(180deg,#0f172a,#1e293b); border:1px solid #334155;
|
|
border-radius:20px; padding:40px; max-width:520px; width:90%; position:relative;
|
|
box-shadow:0 25px 80px rgba(0,0,0,.5); transform:scale(.95); transition:transform .3s ease;
|
|
}
|
|
.wr-modal-overlay.active .wr-modal { transform:scale(1); }
|
|
.wr-modal-close {
|
|
position:absolute; top:16px; right:16px; background:none; border:none;
|
|
color:#64748b; font-size:24px; cursor:pointer; width:32px; height:32px;
|
|
display:flex; align-items:center; justify-content:center; border-radius:8px;
|
|
}
|
|
.wr-modal-close:hover { background:rgba(255,255,255,.05); color:#94a3b8; }
|
|
.wr-modal h2 {
|
|
font-family:Sora,'Outfit',sans-serif; font-size:1.5rem; font-weight:800;
|
|
background:linear-gradient(135deg,#c7d2fe,#818cf8); -webkit-background-clip:text;
|
|
-webkit-text-fill-color:transparent; margin:0 0 8px;
|
|
}
|
|
.wr-modal p { color:#94a3b8; font-size:.9rem; margin:0 0 24px; line-height:1.5; }
|
|
.wr-form-group { margin-bottom:16px; }
|
|
.wr-form-group label {
|
|
display:block; font-size:.8rem; color:#94a3b8; margin-bottom:6px;
|
|
font-family:'Outfit',sans-serif; font-weight:500;
|
|
}
|
|
.wr-form-group input, .wr-form-group select, .wr-form-group textarea {
|
|
width:100%; padding:12px 16px; background:#0f172a; border:1px solid #334155;
|
|
border-radius:10px; color:#e2e8f0; font-size:.9rem; font-family:'Outfit',sans-serif;
|
|
transition:border-color .2s; outline:none; box-sizing:border-box;
|
|
}
|
|
.wr-form-group input:focus, .wr-form-group select:focus, .wr-form-group textarea:focus {
|
|
border-color:#6366f1; box-shadow:0 0 0 3px rgba(99,102,241,.1);
|
|
}
|
|
.wr-form-group textarea { resize:vertical; min-height:80px; }
|
|
.wr-form-group select { appearance:none; cursor:pointer; }
|
|
.wr-form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
|
|
.wr-form-submit {
|
|
width:100%; padding:14px; background:linear-gradient(135deg,#6366f1,#818cf8);
|
|
color:#fff; border:none; border-radius:12px; font-size:1rem; font-weight:600;
|
|
font-family:'Outfit',sans-serif; cursor:pointer; margin-top:8px;
|
|
transition:all .3s; display:flex; align-items:center; justify-content:center; gap:8px;
|
|
}
|
|
.wr-form-submit:hover { transform:translateY(-2px); box-shadow:0 8px 30px rgba(99,102,241,.35); }
|
|
.wr-form-submit:disabled { opacity:.6; cursor:not-allowed; transform:none; }
|
|
.wr-form-success {
|
|
text-align:center; padding:40px 20px;
|
|
}
|
|
.wr-form-success .wr-check { font-size:3rem; margin-bottom:16px; }
|
|
.wr-form-success h3 { color:#a5b4fc; font-family:Sora,sans-serif; font-size:1.3rem; margin:0 0 8px; }
|
|
.wr-form-success p { color:#94a3b8; font-size:.9rem; }
|
|
|
|
/* ===== NEWSLETTER BANNER ===== */
|
|
(function(){var s=document.createElement("style");s.textContent="@media(min-width:769px){.main-navigation{display:flex!important;align-items:center!important;gap:.1rem!important;flex:1!important;justify-content:center!important}.mobile-toggle{display:none!important}.header-wrapper{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:0 1.5rem!important;max-width:1400px!important;margin:0 auto!important}.header-right{display:flex!important;align-items:center!important;gap:.5rem!important}.contact-button{display:inline-flex!important}.nav-link{font-size:.82rem!important;padding:.5rem .6rem!important;white-space:nowrap!important}}";document.head.appendChild(s);})();
|
|
.wr-newsletter-banner {
|
|
background:linear-gradient(135deg,#0c1222 0%,#1a1040 50%,#1e1b4b 100%);
|
|
padding:48px 20px; border-top:1px solid rgba(99,102,241,.1);
|
|
display:none;
|
|
}
|
|
.wr-newsletter-banner.visible { display:block; }
|
|
.wr-newsletter-inner {
|
|
max-width:700px; margin:0 auto; text-align:center;
|
|
}
|
|
.wr-newsletter-badge {
|
|
display:inline-block; background:rgba(99,102,241,.1); border:1px solid rgba(99,102,241,.2);
|
|
padding:4px 14px; border-radius:100px; font-size:.75rem; color:#818cf8;
|
|
font-family:'Outfit',sans-serif; font-weight:500; margin-bottom:16px; letter-spacing:1px;
|
|
text-transform:uppercase;
|
|
}
|
|
.wr-newsletter-title {
|
|
font-family:Sora,'Outfit',sans-serif; font-size:1.6rem; font-weight:800;
|
|
color:#f1f5f9; margin:0 0 8px;
|
|
}
|
|
.wr-newsletter-sub {
|
|
color:#94a3b8; font-size:.9rem; margin:0 0 24px; line-height:1.5;
|
|
}
|
|
.wr-newsletter-form {
|
|
display:flex; gap:10px; max-width:480px; margin:0 auto;
|
|
}
|
|
.wr-newsletter-form input {
|
|
flex:1; padding:14px 18px; background:#0f172a; border:1px solid #334155;
|
|
border-radius:12px; color:#e2e8f0; font-size:.9rem; font-family:'Outfit',sans-serif;
|
|
outline:none;
|
|
}
|
|
.wr-newsletter-form input:focus { border-color:#6366f1; }
|
|
.wr-newsletter-form button {
|
|
padding:14px 28px; background:linear-gradient(135deg,#6366f1,#818cf8);
|
|
color:#fff; border:none; border-radius:12px; font-weight:600; cursor:pointer;
|
|
font-family:'Outfit',sans-serif; white-space:nowrap; transition:all .3s;
|
|
}
|
|
.wr-newsletter-form button:hover { transform:translateY(-2px); box-shadow:0 8px 25px rgba(99,102,241,.35); }
|
|
.wr-newsletter-tag { color:#64748b; font-size:.75rem; margin-top:10px; }
|
|
|
|
/* ===== CASE STUDIES CTA (homepage) ===== */
|
|
(function(){var s=document.createElement("style");s.textContent="@media(min-width:769px){.main-navigation{display:flex!important;align-items:center!important;gap:.1rem!important;flex:1!important;justify-content:center!important}.mobile-toggle{display:none!important}.header-wrapper{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:0 1.5rem!important;max-width:1400px!important;margin:0 auto!important}.header-right{display:flex!important;align-items:center!important;gap:.5rem!important}.contact-button{display:inline-flex!important}.nav-link{font-size:.82rem!important;padding:.5rem .6rem!important;white-space:nowrap!important}}";document.head.appendChild(s);})();
|
|
.wr-cases-section {
|
|
padding:60px 20px; background:linear-gradient(180deg,#0a0e1a,#0f172a);
|
|
border-top:1px solid rgba(99,102,241,.05);
|
|
}
|
|
.wr-cases-inner { max-width:1000px; margin:0 auto; text-align:center; }
|
|
.wr-cases-title {
|
|
font-family:Sora,sans-serif; font-size:1.8rem; font-weight:800; color:#f1f5f9; margin:0 0 12px;
|
|
}
|
|
.wr-cases-sub { color:#94a3b8; font-size:.95rem; margin:0 0 32px; line-height:1.5; }
|
|
.wr-cases-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; margin-bottom:32px; }
|
|
.wr-case-card {
|
|
background:#1e293b; border:1px solid #334155; border-radius:16px; padding:28px 24px;
|
|
text-align:left; transition:all .4s cubic-bezier(.16,1,.3,1);
|
|
}
|
|
.wr-case-card:hover { transform:translateY(-6px); border-color:#6366f1; box-shadow:0 16px 40px rgba(99,102,241,.12); }
|
|
.wr-case-icon { font-size:1.8rem; margin-bottom:12px; }
|
|
.wr-case-card h3 { font-family:Sora,sans-serif; font-size:1rem; font-weight:700; color:#f1f5f9; margin:0 0 8px; }
|
|
.wr-case-card p { font-size:.82rem; color:#94a3b8; line-height:1.5; margin:0 0 12px; }
|
|
.wr-case-result {
|
|
display:inline-block; background:rgba(34,197,94,.08); border:1px solid rgba(34,197,94,.15);
|
|
padding:4px 12px; border-radius:100px; font-size:.75rem; color:#22c55e; font-weight:600;
|
|
}
|
|
|
|
|
|
/* ===== RESPONSIVE ===== */
|
|
(function(){var s=document.createElement("style");s.textContent="@media(min-width:769px){.main-navigation{display:flex!important;align-items:center!important;gap:.1rem!important;flex:1!important;justify-content:center!important}.mobile-toggle{display:none!important}.header-wrapper{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:0 1.5rem!important;max-width:1400px!important;margin:0 auto!important}.header-right{display:flex!important;align-items:center!important;gap:.5rem!important}.contact-button{display:inline-flex!important}.nav-link{font-size:.82rem!important;padding:.5rem .6rem!important;white-space:nowrap!important}}";document.head.appendChild(s);})();
|
|
@media(max-width:768px) {
|
|
.wr-floating-cta { flex-wrap:wrap; gap:10px; padding:10px 16px; }
|
|
.wr-floating-cta-text { font-size:.8rem; text-align:center; width:100%; }
|
|
.wr-form-row { grid-template-columns:1fr; }
|
|
.wr-newsletter-form { flex-direction:column; }
|
|
.wr-cases-grid { grid-template-columns:1fr; }
|
|
.wr-modal { padding:24px; margin:16px; }
|
|
|
|
}
|
|
@media(max-width:480px) {
|
|
.wr-floating-cta .wr-cta-btn { width:100%; justify-content:center; font-size:.8rem; }
|
|
}
|
|
|
|
/* == DESKTOP: partners width == */
|
|
(function(){var s=document.createElement("style");s.textContent="@media(min-width:769px){.main-navigation{display:flex!important;align-items:center!important;gap:.1rem!important;flex:1!important;justify-content:center!important}.mobile-toggle{display:none!important}.header-wrapper{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:0 1.5rem!important;max-width:1400px!important;margin:0 auto!important}.header-right{display:flex!important;align-items:center!important;gap:.5rem!important}.contact-button{display:inline-flex!important}.nav-link{font-size:.82rem!important;padding:.5rem .6rem!important;white-space:nowrap!important}}";document.head.appendChild(s);})();
|
|
.partners-container{max-width:100%!important;margin:0 auto!important;overflow:hidden!important;padding:0 2rem!important;display:flex!important;justify-content:center!important;gap:1.5rem!important;flex-wrap:nowrap!important;align-items:center!important}.partner-item{flex:0 0 auto!important}.partner-logo,.vistex-logo{height:40px!important;max-width:130px!important;width:auto!important;object-fit:contain!important}.iqvia-logo{height:40px!important;width:auto!important;object-fit:contain!important}.sap-logo{height:45px!important;width:auto!important;object-fit:contain!important}.partner-logo-container{display:flex!important;align-items:center!important;justify-content:center!important;min-width:90px!important;padding:0 8px!important}
|
|
/* == MOBILE SLIDERS == */
|
|
(function(){var s=document.createElement("style");s.textContent="@media(min-width:769px){.main-navigation{display:flex!important;align-items:center!important;gap:.1rem!important;flex:1!important;justify-content:center!important}.mobile-toggle{display:none!important}.header-wrapper{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:0 1.5rem!important;max-width:1400px!important;margin:0 auto!important}.header-right{display:flex!important;align-items:center!important;gap:.5rem!important}.contact-button{display:inline-flex!important}.nav-link{font-size:.82rem!important;padding:.5rem .6rem!important;white-space:nowrap!important}}";document.head.appendChild(s);})();
|
|
@keyframes wPS{0%{transform:translateX(0)}100%{transform:translateX(-50%)}}
|
|
@media(max-width:768px){
|
|
.partners-section{overflow:hidden!important;width:100%!important}
|
|
.partners-container{flex-wrap:nowrap!important;overflow:hidden!important;max-width:100%!important;gap:1.5rem!important;animation:wPS 25s linear infinite!important;width:max-content!important;margin:0!important}
|
|
.partner-item{flex:0 0 auto!important;min-width:100px!important}
|
|
.partner-logo,.vistex-logo{height:45px!important}
|
|
.iqvia-logo{height:40px!important}
|
|
.logos-slider{animation:slide 25s linear infinite!important;gap:1.5rem!important}
|
|
.company-logo{height:45px!important;max-width:90px!important}
|
|
}
|
|
`;
|
|
document.head.appendChild(css);
|
|
|
|
// ============================================================
|
|
// 1. GA4 + MICROSOFT CLARITY (placeholder IDs)
|
|
// ============================================================
|
|
// GA4
|
|
(function(){
|
|
// PLACEHOLDER: Replace G-XXXXXXXXXX with your real GA4 Measurement ID
|
|
var GA_ID = 'G-XXXXXXXXXX';
|
|
if(GA_ID.indexOf('XXXX') > -1) {
|
|
console.log('[WEVAL-RECO] GA4: placeholder ID detected, skipping. Replace GA_ID in weval-audit-reco.js');
|
|
} else {
|
|
var gs = document.createElement('script');
|
|
gs.async = true; gs.src = 'https://www.googletagmanager.com/gtag/js?id=' + GA_ID;
|
|
document.head.appendChild(gs);
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag(){ dataLayer.push(arguments); }
|
|
gtag('js', new Date()); gtag('config', GA_ID);
|
|
}
|
|
})();
|
|
|
|
// Clarity
|
|
(function(){
|
|
// PLACEHOLDER: Replace with your real Clarity project ID
|
|
var CLARITY_ID = 'XXXXXXXXXX';
|
|
if(CLARITY_ID.indexOf('XXXX') > -1) {
|
|
console.log('[WEVAL-RECO] Clarity: placeholder ID detected, skipping. Replace CLARITY_ID in weval-audit-reco.js');
|
|
} else {
|
|
(function(c,l,a,r,i,t,y){ c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
|
|
t=l.createElement(r);t.async=1;t.src='https://www.clarity.ms/tag/'+CLARITY_ID;
|
|
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
|
|
})(window,document,'clarity','script');
|
|
}
|
|
})();
|
|
|
|
// ============================================================
|
|
// 1bis. WEVAL INTERNAL TRACKER v2 (privacy-first, SPA-aware)
|
|
// ============================================================
|
|
(function(){
|
|
var COLLECT = '/api/analytics/collect';
|
|
var startTime = Date.now();
|
|
var durationSent = false;
|
|
var initRef = document.referrer || 'direct';
|
|
|
|
function getRef() {
|
|
try {
|
|
var r = initRef;
|
|
if (!r || r.indexOf('weval-consulting.com') > -1) return 'direct';
|
|
return r;
|
|
} catch(e) { return 'direct'; }
|
|
}
|
|
|
|
function send(event, extra) {
|
|
try {
|
|
navigator.sendBeacon(COLLECT, JSON.stringify({
|
|
url: window.location.href,
|
|
ref: getRef(),
|
|
title: document.title || '',
|
|
screen: screen.width + 'x' + screen.height,
|
|
lang: navigator.language || '',
|
|
event: event,
|
|
seconds: extra || ''
|
|
}));
|
|
} catch(e) {
|
|
try {
|
|
var x = new XMLHttpRequest();
|
|
x.open('POST', COLLECT, true);
|
|
x.setRequestHeader('Content-Type', 'application/json');
|
|
x.send(JSON.stringify({ url: window.location.href, ref: getRef(), title: document.title||'', screen: screen.width+'x'+screen.height, lang: navigator.language||'', event: event, seconds: extra||'' }));
|
|
} catch(e2) {}
|
|
}
|
|
}
|
|
|
|
function onPageView() {
|
|
durationSent = false;
|
|
startTime = Date.now();
|
|
// Slight delay so React has rendered the new title
|
|
setTimeout(function() { send('pageview'); }, 300);
|
|
}
|
|
|
|
function sendDuration() {
|
|
if (durationSent) return;
|
|
durationSent = true;
|
|
var secs = Math.round((Date.now() - startTime) / 1000);
|
|
if (secs > 2) send('duration', secs);
|
|
}
|
|
|
|
// Initial pageview
|
|
if (document.readyState === 'loading') {
|
|
document.addEventListener('DOMContentLoaded', onPageView);
|
|
} else {
|
|
onPageView();
|
|
}
|
|
|
|
// Duration on leave (sendBeacon works in beforeunload)
|
|
window.addEventListener('beforeunload', sendDuration);
|
|
document.addEventListener('visibilitychange', function() {
|
|
if (document.visibilityState === 'hidden') sendDuration();
|
|
});
|
|
|
|
// SPA: intercept history.pushState + popstate (React Router)
|
|
var _push = history.pushState.bind(history);
|
|
history.pushState = function() {
|
|
sendDuration(); // close current page duration
|
|
initRef = window.location.href; // current page becomes referrer
|
|
_push.apply(history, arguments);
|
|
onPageView();
|
|
};
|
|
window.addEventListener('popstate', function() {
|
|
sendDuration();
|
|
onPageView();
|
|
});
|
|
})();
|
|
|
|
// ============================================================
|
|
// 2. FLOATING CTA BAR (appears after 3s scroll)
|
|
// ============================================================
|
|
var ctaBar = document.createElement('div');
|
|
ctaBar.className = 'wr-floating-cta';
|
|
ctaBar.innerHTML = '<span class="wr-floating-cta-text"><strong>💎 Projet de transformation digitale ?</strong> Nos experts vous accompagnent de A à Z</span>' +
|
|
'<button class="wr-cta-btn wr-cta-primary" onclick="window.__wrOpenContactModal()">📋 Demander un devis</button>' +
|
|
'<button class="wr-cta-btn wr-cta-secondary" onclick="window.__wrOpenBooking WEVAL()">📅 Prendre RDV</button>' +
|
|
'<button class="wr-cta-close" onclick="this.parentElement.remove()" aria-label="Fermer">×</button>';
|
|
document.body.appendChild(ctaBar);
|
|
|
|
// Show after 3 seconds + some scroll
|
|
var ctaShown = false;
|
|
function showCTA() {
|
|
if(!ctaShown && window.scrollY > 200) {
|
|
ctaShown = true;
|
|
ctaBar.classList.add('visible');
|
|
}
|
|
}
|
|
setTimeout(function(){ window.addEventListener('scroll', showCTA); showCTA(); }, 3000);
|
|
|
|
// ============================================================
|
|
// 3. CONTACT FORM MODAL
|
|
// ============================================================
|
|
var modalOverlay = document.createElement('div');
|
|
modalOverlay.className = 'wr-modal-overlay';
|
|
modalOverlay.id = 'wr-contact-modal';
|
|
modalOverlay.innerHTML = `
|
|
<div class="wr-modal">
|
|
<button class="wr-modal-close" onclick="window.__wrCloseContactModal()">×</button>
|
|
<div id="wr-form-content">
|
|
<h2>💎 Parlons de votre projet</h2>
|
|
<p>Décrivez votre besoin en 30 secondes. Un consultant vous recontacte sous 24h.</p>
|
|
<form id="wr-contact-form" onsubmit="return window.__wrSubmitForm(event)">
|
|
<div class="wr-form-row">
|
|
<div class="wr-form-group">
|
|
<label>Nom complet *</label>
|
|
<input type="text" name="name" required placeholder="Votre nom">
|
|
</div>
|
|
<div class="wr-form-group">
|
|
<label>Email professionnel *</label>
|
|
<input type="email" name="email" required placeholder="vous@entreprise.com">
|
|
</div>
|
|
</div>
|
|
<div class="wr-form-row">
|
|
<div class="wr-form-group">
|
|
<label>Entreprise</label>
|
|
<input type="text" name="company" placeholder="Nom de l'entreprise">
|
|
</div>
|
|
<div class="wr-form-group">
|
|
<label>Téléphone</label>
|
|
<input type="tel" name="phone" placeholder="+212 6XX XXX XXX">
|
|
</div>
|
|
</div>
|
|
<div class="wr-form-group">
|
|
<label>Domaine d'intérêt *</label>
|
|
<select name="service" required>
|
|
<option value="">— Sélectionnez —</option>
|
|
<option value="cloud">☁️ Cloud & Infrastructure</option>
|
|
<option value="ia">🧠 Intelligence Artificielle</option>
|
|
<option value="erp">🔷 ERP / SAP / Vistex</option>
|
|
<option value="cyber">🔒 Cybersécurité</option>
|
|
<option value="emarketing">📈 E-Marketing Digital</option>
|
|
<option value="talent">👥 Talent as a Service</option>
|
|
<option value="formation">📚 Formation & Certification</option>
|
|
<option value="autre">🎯 Autre / Multi-domaine</option>
|
|
</select>
|
|
</div>
|
|
<div class="wr-form-group">
|
|
<label>Décrivez votre besoin</label>
|
|
<textarea name="message" placeholder="Budget estimé, délais, contexte..."></textarea>
|
|
</div>
|
|
<button type="submit" class="wr-form-submit" id="wr-submit-btn">
|
|
<span>🚀</span> Envoyer ma demande
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>`;
|
|
document.body.appendChild(modalOverlay);
|
|
|
|
// Close on overlay click
|
|
modalOverlay.addEventListener('click', function(e) {
|
|
if(e.target === modalOverlay) window.__wrCloseContactModal();
|
|
});
|
|
|
|
window.__wrOpenContactModal = function() {
|
|
modalOverlay.style.display = 'flex';
|
|
requestAnimationFrame(function(){ modalOverlay.classList.add('active'); });
|
|
document.body.style.overflow = 'hidden';
|
|
// Track event
|
|
if(window.gtag) gtag('event', 'open_contact_form', { event_category: 'lead_generation' });
|
|
};
|
|
|
|
window.__wrCloseContactModal = function() {
|
|
modalOverlay.classList.remove('active');
|
|
setTimeout(function(){ modalOverlay.style.display = 'none'; }, 300);
|
|
document.body.style.overflow = '';
|
|
};
|
|
|
|
window.__wrSubmitForm = function(e) {
|
|
e.preventDefault();
|
|
var form = document.getElementById('wr-contact-form');
|
|
var btn = document.getElementById('wr-submit-btn');
|
|
var data = new FormData(form);
|
|
|
|
btn.disabled = true;
|
|
btn.innerHTML = '<span>⏳</span> Envoi en cours...';
|
|
|
|
// Send to backend API
|
|
fetch('/api/contact-form', {
|
|
method: 'POST',
|
|
headers: { 'Content-Type': 'application/json' },
|
|
body: JSON.stringify(Object.fromEntries(data))
|
|
})
|
|
.then(function(r){ return r.json(); })
|
|
.catch(function(){
|
|
// Fallback: mailto if API not available
|
|
var subject = encodeURIComponent('Demande de devis — ' + (data.get('company') || data.get('name')));
|
|
var body = encodeURIComponent(
|
|
'Nom: ' + data.get('name') + '\n' +
|
|
'Email: ' + data.get('email') + '\n' +
|
|
'Entreprise: ' + data.get('company') + '\n' +
|
|
'Téléphone: ' + data.get('phone') + '\n' +
|
|
'Service: ' + data.get('service') + '\n' +
|
|
'Message: ' + data.get('message')
|
|
);
|
|
window.open('mailto:contact@weval-consulting.com?subject=' + subject + '&body=' + body);
|
|
return { ok: true };
|
|
})
|
|
.then(function() {
|
|
// Show success
|
|
document.getElementById('wr-form-content').innerHTML = `
|
|
<div class="wr-form-success">
|
|
<div class="wr-check">✅</div>
|
|
<h3>Demande envoyée avec succès !</h3>
|
|
<p>Un consultant WEVAL vous recontactera sous 24h ouvrées.<br>En attendant, explorez nos solutions ou discutez avec WEVIA, notre IA.</p>
|
|
<div style="margin-top:20px;display:flex;gap:12px;justify-content:center;">
|
|
<a href="/solutions" class="wr-cta-btn wr-cta-primary">Nos solutions</a>
|
|
<a href="/wevia" class="wr-cta-btn wr-cta-secondary">🧠 Parler à WEVIA</a>
|
|
</div>
|
|
</div>`;
|
|
if(window.gtag) gtag('event', 'form_submission', { event_category: 'lead_generation', event_label: data.get('service') });
|
|
});
|
|
|
|
return false;
|
|
};
|
|
|
|
// ============================================================
|
|
// 4. NEWSLETTER BANNER (injected before footer on homepage)
|
|
// ============================================================
|
|
function injectNewsletter() {
|
|
if(document.querySelector('.wr-newsletter-banner')) return;
|
|
// REENGINEERING: Newsletter only on /contact-us (best practice: conversion funnel)
|
|
var p = window.location.pathname;
|
|
if(p !== '/contact-us' && p !== '/contact-us/') return;
|
|
|
|
var newsletter = document.createElement('div');
|
|
newsletter.className = 'wr-newsletter-banner';
|
|
newsletter.innerHTML = `
|
|
<div class="wr-newsletter-inner">
|
|
<div class="wr-newsletter-badge">📬 Newsletter</div>
|
|
<h3 class="wr-newsletter-title">Recevez nos insights IA & Cloud</h3>
|
|
<p class="wr-newsletter-sub">Analyses sectorielles, tendances tech, et études de cas — directement dans votre boîte mail. Rejoint par 500+ DSI au Maroc.</p>
|
|
<form class="wr-newsletter-form" onsubmit="return window.__wrNewsletterSubmit(event)">
|
|
<input type="email" placeholder="votre@email-pro.com" required>
|
|
<button type="submit">S'inscrire →</button>
|
|
</form>
|
|
<p class="wr-newsletter-tag">🔒 Pas de spam. 1 email/mois max. Désinscription en 1 clic.</p>
|
|
</div>`;
|
|
|
|
var footer = document.querySelector('footer.footer') || document.querySelector('footer');
|
|
if(footer) {
|
|
footer.parentNode.insertBefore(newsletter, footer);
|
|
setTimeout(function(){ newsletter.classList.add('visible'); }, 100);
|
|
}
|
|
}
|
|
|
|
window.__wrNewsletterSubmit = function(e) {
|
|
e.preventDefault();
|
|
var email = e.target.querySelector('input').value;
|
|
// Send to API
|
|
fetch('/api/newsletter-subscribe', {
|
|
method: 'POST',
|
|
headers: { 'Content-Type': 'application/json' },
|
|
body: JSON.stringify({ email: email })
|
|
}).catch(function(){});
|
|
|
|
e.target.innerHTML = '<p style="color:#a5b4fc;font-size:1rem;font-weight:600;">✅ Inscription confirmée ! Bienvenue.</p>';
|
|
if(window.gtag) gtag('event', 'newsletter_subscribe', { event_category: 'lead_generation' });
|
|
return false;
|
|
};
|
|
|
|
// ============================================================
|
|
// ============================================================
|
|
|
|
// ============================================================
|
|
// 6. CASE STUDIES CTA SECTION (homepage only)
|
|
// ============================================================
|
|
function injectCaseStudies() {
|
|
if(window.location.pathname !== "/" && window.location.pathname !== "") return; if(document.querySelector(".contact-page,.contact-form-section")) return;
|
|
if(document.querySelector('.wr-cases-section')) return;
|
|
|
|
var attempts = 0;
|
|
var timer = setInterval(function(){
|
|
attempts++;
|
|
if(attempts > 30) { clearInterval(timer); return; }
|
|
|
|
var ctaBanner = document.querySelector('.wv-cta-banner');
|
|
if(!ctaBanner) return;
|
|
clearInterval(timer);
|
|
|
|
var casesDiv = document.createElement('div');
|
|
casesDiv.className = 'wr-cases-section';
|
|
casesDiv.innerHTML = `
|
|
<div class="wr-cases-inner">
|
|
<h2 class="wr-cases-title">Résultats concrets, impact mesurable</h2>
|
|
<p class="wr-cases-sub">Découvrez comment nous transformons les défis digitaux de nos clients en avantages compétitifs.</p>
|
|
<div class="wr-cases-grid">
|
|
<div class="wr-case-card">
|
|
<div class="wr-case-icon">☁️</div>
|
|
<h3>Migration Cloud — Groupe Industriel</h3>
|
|
<p>Migration de 200+ serveurs on-premise vers une architecture hybride Huawei Cloud, avec zéro downtime et conformité RGPD.</p>
|
|
<span class="wr-case-result">↗ 45% réduction coûts infra</span>
|
|
</div>
|
|
<div class="wr-case-card">
|
|
<div class="wr-case-icon">🧠</div>
|
|
<h3>IA Prédictive — Secteur Pharma</h3>
|
|
<p>Déploiement d'un modèle ML de prédiction de la demande pour un laboratoire IQVIA, intégré au SI existant SAP.</p>
|
|
<span class="wr-case-result">↗ 30% précision forecast</span>
|
|
</div>
|
|
<div class="wr-case-card">
|
|
<div class="wr-case-icon">🔒</div>
|
|
<h3>Audit Cybersécurité — Banque</h3>
|
|
<p>Audit complet de la surface d'attaque, tests de pénétration et mise en conformité PCI-DSS pour un groupe bancaire.</p>
|
|
<span class="wr-case-result">↗ Score sécurité A+</span>
|
|
</div>
|
|
</div>
|
|
<button class="wr-cta-btn wr-cta-primary" onclick="window.__wrOpenContactModal()" style="font-size:1rem;padding:14px 32px;">
|
|
💬 Discutons de votre projet
|
|
</button>
|
|
</div>`;
|
|
|
|
// Insert before CTA banner
|
|
ctaBanner.parentNode.insertBefore(casesDiv, ctaBanner);
|
|
}, 300);
|
|
}
|
|
|
|
// ============================================================
|
|
// 7. INIT — Wait for DOM ready, then inject
|
|
// ============================================================
|
|
function initRecoInjections() {
|
|
injectNewsletter();
|
|
injectCaseStudies();
|
|
console.log('[WEVAL-RECO] ✅ P0 audit recommendations injected');
|
|
}
|
|
|
|
// Run on page load
|
|
if(document.readyState === 'loading') {
|
|
document.addEventListener('DOMContentLoaded', function(){ setTimeout(initRecoInjections, 1000); });
|
|
} else {
|
|
setTimeout(initRecoInjections, 1000);
|
|
}
|
|
|
|
// Re-run on SPA navigation + cleanup newsletter when leaving /contact-us
|
|
var _rrLastPath = location.pathname;
|
|
setInterval(function(){
|
|
if(location.pathname !== _rrLastPath) {
|
|
_rrLastPath = location.pathname;
|
|
// CLEANUP: remove newsletter if NOT on /contact-us
|
|
var p = location.pathname;
|
|
if(p !== '/contact-us' && p !== '/contact-us/') {
|
|
var nl = document.querySelector('.wr-newsletter-banner');
|
|
if(nl) nl.remove();
|
|
}
|
|
// CLEANUP: remove FAQ if NOT on homepage
|
|
if(p !== '/' && p !== '') {
|
|
document.querySelectorAll('.wr-faq-section').forEach(function(el){ el.remove(); });
|
|
}
|
|
setTimeout(initRecoInjections, 800);
|
|
}
|
|
}, 300);
|
|
|
|
// Keyboard shortcut: ESC closes modal
|
|
document.addEventListener('keydown', function(e){
|
|
if(e.key === 'Escape') window.__wrCloseContactModal();
|
|
});
|
|
|
|
})();
|
|
|
|
// ============================================================
|
|
// PATCH v2 — Additional P1/P2 features
|
|
// Append to existing weval-audit-reco.js
|
|
// ============================================================
|
|
|
|
// 8. FAQ SECTION (homepage only — feeds FAQPage schema)
|
|
(function(){
|
|
if(window.__wrFAQDone) return;
|
|
window.__wrFAQDone = true;
|
|
|
|
function injectFAQ() {
|
|
if(window.location.pathname !== "/" && window.location.pathname !== "") return; if(document.querySelector(".contact-page,.contact-form-section")) return;
|
|
if(document.querySelector('.wr-faq-section')) return;
|
|
|
|
var attempts = 0;
|
|
var t = setInterval(function(){
|
|
attempts++;
|
|
if(attempts > 40) { clearInterval(t); return; }
|
|
if(!document.querySelector('footer.footer')) return;
|
|
clearInterval(t);
|
|
// FAQ no longer depends on newsletter presence
|
|
|
|
var faq = document.createElement('div');
|
|
faq.className = 'wr-faq-section';
|
|
faq.innerHTML = '<div class="wr-faq-inner">' +
|
|
'<div class="wr-newsletter-badge">❓ FAQ</div>' +
|
|
'<h2 class="wr-faq-title">Questions fréquentes</h2>' +
|
|
'<div class="wr-faq-list">' +
|
|
'<div class="wr-faq-item"><button class="wr-faq-q" onclick="this.parentElement.classList.toggle(\'open\')"><span>Quels services propose WEVAL Consulting ?</span><span class="wr-faq-arrow">▸</span></button><div class="wr-faq-a"><p>WEVAL Consulting propose 6 pôles d\'expertise : Conseil Stratégique & IA, Cloud & Intégration (Huawei, SAP), E-Marketing Digital, Cybersécurité IA, Talent as a Service (5000+ profils IT), et Formations certifiantes. Nous intervenons dans 8 pays sur 3 continents.</p></div></div>' +
|
|
'<div class="wr-faq-item"><button class="wr-faq-q" onclick="this.parentElement.classList.toggle(\'open\')"><span>WEVAL intervient-il au Maroc et en Afrique ?</span><span class="wr-faq-arrow">▸</span></button><div class="wr-faq-a"><p>Oui. Basé à Casablanca, WEVAL intervient dans 8 pays incluant le Maroc, la France, et plusieurs pays africains. Plus de 200 projets livrés avec un taux de satisfaction de 97%.</p></div></div>' +
|
|
'<div class="wr-faq-item"><button class="wr-faq-q" onclick="this.parentElement.classList.toggle(\'open\')"><span>Qu\'est-ce que WEVIA, l\'IA de WEVAL ?</span><span class="wr-faq-arrow">▸</span></button><div class="wr-faq-a"><p>WEVIA est notre assistant IA propriétaire. Il génère des analyses, diagrammes, images et documents PDF couvrant plus de 50 domaines d\'expertise, en mode 100% souverain.</p></div></div>' +
|
|
'<div class="wr-faq-item"><button class="wr-faq-q" onclick="this.parentElement.classList.toggle(\'open\')"><span>Comment fonctionne la méthodologie WEVAL 4D ?</span><span class="wr-faq-arrow">▸</span></button><div class="wr-faq-a"><p>Notre framework 4D suit 4 phases : Diagnostic (audit 360°), Design (roadmap sur-mesure), Delivery (sprints agiles), Durabilité (formation + support). Chaque phase est accélérée par notre IA WEVIA. <a href="/methodologie" style="color:#818cf8;">En savoir plus →</a></p></div></div>' +
|
|
'<div class="wr-faq-item"><button class="wr-faq-q" onclick="this.parentElement.classList.toggle(\'open\')"><span>WEVAL est-il certifié et conforme RGPD ?</span><span class="wr-faq-arrow">▸</span></button><div class="wr-faq-a"><p>Oui. WEVAL est conforme RGPD et Loi marocaine 09-08, partenaire certifié Huawei Cloud, SAP, Vistex et IQVIA. Nos solutions respectent les normes de sécurité les plus strictes.</p></div></div>' +
|
|
'</div></div>';
|
|
|
|
var ft = document.querySelector('footer.footer'); if(ft) ft.parentNode.insertBefore(faq, ft);
|
|
}, 300);
|
|
}
|
|
|
|
// CSS for FAQ
|
|
var faqCSS = document.createElement('style');
|
|
faqCSS.textContent = '.wr-faq-section{padding:60px 20px;background:#0a0e1a;border-top:1px solid rgba(99,102,241,.05)}.wr-faq-inner{max-width:740px;margin:0 auto;text-align:center}.wr-faq-title{font-family:Sora,sans-serif;font-size:1.6rem;font-weight:800;color:#f1f5f9;margin:16px 0 32px}.wr-faq-list{text-align:left}.wr-faq-item{border:1px solid #1e293b;border-radius:12px;margin-bottom:10px;overflow:hidden;transition:border-color .3s}.wr-faq-item:hover{border-color:#334155}.wr-faq-item.open{border-color:#6366f1}.wr-faq-q{width:100%;padding:18px 20px;background:#0f172a;border:none;color:#f1f5f9;font-size:.95rem;font-weight:600;font-family:Outfit,Sora,sans-serif;cursor:pointer;display:flex;justify-content:space-between;align-items:center;text-align:left}.wr-faq-arrow{color:#6366f1;transition:transform .3s;font-size:1.2rem}.wr-faq-item.open .wr-faq-arrow{transform:rotate(90deg)}.wr-faq-a{max-height:0;overflow:hidden;transition:max-height .4s ease,padding .3s}.wr-faq-item.open .wr-faq-a{max-height:300px;padding:0 20px 18px}.wr-faq-a p{color:#94a3b8;font-size:.9rem;line-height:1.6;margin:0}';
|
|
document.head.appendChild(faqCSS);
|
|
|
|
// Init
|
|
if(document.readyState === 'loading') document.addEventListener('DOMContentLoaded', function(){ setTimeout(injectFAQ, 3000); });
|
|
else setTimeout(injectFAQ, 3000);
|
|
|
|
var _faqPath = location.pathname;
|
|
setInterval(function(){ if(location.pathname !== _faqPath) { _faqPath = location.pathname; setTimeout(injectFAQ, 2500); } }, 300);
|
|
})();
|
|
|
|
// 9. INTERNAL LINKS ENRICHMENT (add links to case-studies & methodologie in existing sections)
|
|
(function(){
|
|
if(window.__wrLinksEnriched) return;
|
|
window.__wrLinksEnriched = true;
|
|
|
|
function enrichLinks() {
|
|
// Add "Voir nos études de cas" link after case studies section
|
|
var casesSection = document.querySelector('.wr-cases-section');
|
|
if(casesSection && !casesSection.querySelector('.wr-see-all-link')) {
|
|
var link = document.createElement('div');
|
|
link.className = 'wr-see-all-link';
|
|
link.style.cssText = 'text-align:center;margin-top:16px;';
|
|
link.innerHTML = '<a href="/case-studies" style="color:#a5b4fc;font-size:.9rem;font-family:Outfit,sans-serif;text-decoration:none;border-bottom:1px dashed #6366f1;padding-bottom:2px;">Voir toutes nos études de cas →</a>';
|
|
casesSection.querySelector('.wr-cases-inner').appendChild(link);
|
|
}
|
|
}
|
|
|
|
setTimeout(enrichLinks, 3000);
|
|
setInterval(function(){ if(location.pathname === '/' || location.pathname === '') setTimeout(enrichLinks, 1500); }, 2000);
|
|
|
|
// 10. RICH FOOTER LINKS (inject service/page links before original footer)
|
|
(function(){
|
|
if(window.__wrFooterDone) return;
|
|
window.__wrFooterDone = true;
|
|
|
|
var footerCSS = document.createElement('style');
|
|
footerCSS.textContent = '.wr-rich-footer{background:#050816;border-top:1px solid #1e293b;padding:48px 24px 24px}.wr-rf-inner{max-width:1100px;margin:0 auto;display:grid;grid-template-columns:repeat(4,1fr);gap:32px}.wr-rf-col h4{color:#f1f5f9;font-family:Sora,Outfit,sans-serif;font-size:.9rem;font-weight:700;margin-bottom:14px}.wr-rf-col a{display:block;color:#64748b;font-size:.82rem;text-decoration:none;padding:4px 0;transition:color .2s;font-family:Outfit,sans-serif}.wr-rf-col a:hover{color:#818cf8}.wr-rf-bottom{max-width:1100px;margin:24px auto 0;padding-top:20px;border-top:1px solid #1e293b;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px}.wr-rf-bottom p{color:#475569;font-size:.75rem;font-family:Outfit,sans-serif}.wr-rf-bottom a{color:#6366f1;text-decoration:none;font-size:.75rem}@media(max-width:768px){.wr-rf-inner{grid-template-columns:1fr 1fr;gap:20px}}';
|
|
document.head.appendChild(footerCSS);
|
|
|
|
function injectFooter() {
|
|
// REENGINEERING: Disabled — links moved to real footer enrichment (weval-enrich.js)
|
|
return;
|
|
if(document.querySelector('.wr-rich-footer')) return;
|
|
var footer = document.querySelector('footer.footer') || document.querySelector('footer');
|
|
if(!footer) return;
|
|
|
|
var rf = document.createElement('div');
|
|
rf.className = 'wr-rich-footer';
|
|
rf.innerHTML = '<div class="wr-rf-inner">' +
|
|
'<div class="wr-rf-col"><h4>Services</h4>' +
|
|
'<a href="/service/intelligence-artificielle">Intelligence Artificielle</a>' +
|
|
'<a href="/service/cybersecurite">Cybersécurité & Audit</a>' +
|
|
'<a href="/service/cloud-sap">Cloud & SAP</a>' +
|
|
'<a href="/service/marketing">E-Marketing Digital</a>' +
|
|
'<a href="/service/conseil">Transformation Digitale</a>' +
|
|
'<a href="/service/recrutement">Recrutement IT</a>' +
|
|
'<a href="/service/nearshore-it">Nearshore IT Maroc</a></div>' +
|
|
'<div class="wr-rf-col"><h4>Ressources</h4>' +
|
|
'<a href="/blog">Blog & Insights</a>' +
|
|
'<a href="/case-studies">Études de Cas</a>' +
|
|
'<a href="/methodologie">Méthodologie WEVAL 4D</a>' +
|
|
'<a href="/actualites">Actualités</a>' +
|
|
'<a href="/marketplace">Marketplace</a>' +
|
|
'<a href="/wevia">WEVIA — Notre IA</a></div>' +
|
|
'<div class="wr-rf-col"><h4>Articles récents</h4>' +
|
|
'<a href="/blog/ia-agentique-entreprise-2026">IA Agentique en Entreprise</a>' +
|
|
'<a href="/blog/cybersecurite-pme-maroc-2026">Cybersécurité PME Maroc</a>' +
|
|
'<a href="/blog/cloud-souverain-afrique-2026">Cloud Souverain Afrique</a>' +
|
|
'<a href="/blog/migration-sap-s4hana-2027">Migration SAP S/4HANA</a>' +
|
|
'<a href="/blog/ia-generative-maroc-2026">IA Générative Maroc</a></div>' +
|
|
'<div class="wr-rf-col"><h4>Contact</h4>' +
|
|
'<a href="/contact-us">Demander un devis</a>' +
|
|
'<a href="/about">À propos de WEVAL</a>' +
|
|
'<a href="tel:+212657785292">+212 6 57 78 52 92</a>' +
|
|
'<a href="mailto:contact@weval-consulting.com">contact@weval-consulting.com</a>' +
|
|
'<a href="/booking.html/30min" target="_blank">📅 Prendre RDV</a></div>' +
|
|
'</div>' +
|
|
'<div class="wr-rf-bottom">' +
|
|
'<p>© 2026 WEVAL Consulting — Casablanca, Maroc | Paris, France | USA</p>' +
|
|
'<div><a href="/blog">Blog</a> · <a href="/case-studies">Cases</a> · <a href="/methodologie">Méthode</a> · <a href="/wevia">WEVIA</a></div>' +
|
|
'</div>';
|
|
|
|
footer.parentNode.insertBefore(rf, footer);
|
|
}
|
|
|
|
// Run after page loads
|
|
setTimeout(injectFooter, 2000);
|
|
// Re-run on SPA navigation
|
|
var _fp = location.pathname;
|
|
setInterval(function(){ if(location.pathname !== _fp) { _fp = location.pathname; setTimeout(injectFooter, 1500); } }, 300);
|
|
})();
|
|
|
|
})();
|
|
|
|
// === SERVICE LINKS INJECTION (v2 — by section ID) ===
|
|
(function injectServiceLinks() {
|
|
var mapping = [
|
|
{id:'conseil-detail', href:'/service/conseil', label:'Conseil Stratégique'},
|
|
{id:'solutions-detail', href:'/nos-solutions', label:'Nos Solutions SaaS'},
|
|
{id:'recrutement-detail',href:'/service/recrutement',label:'Talent As A Service'},
|
|
{id:'formation-detail', href:'/service/conseil', label:'Training Platform'},
|
|
{id:'marketing-detail', href:'/service/e-marketing', label:'Marketing Digital'},
|
|
{id:'cyber-detail', href:'/service/cybersecurite',label:'Cybersécurité IA'}
|
|
];
|
|
|
|
function inject() {
|
|
if(window.location.pathname !== '/' && window.location.pathname !== '') return;
|
|
mapping.forEach(function(m) {
|
|
var section = document.getElementById(m.id);
|
|
if(!section || section.querySelector('.wr-service-link')) return;
|
|
var a = document.createElement('a');
|
|
a.className = 'wr-service-link';
|
|
a.href = m.href;
|
|
a.textContent = 'Découvrir ' + m.label + ' →';
|
|
a.style.cssText = 'display:inline-block;margin-top:20px;padding:12px 28px;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;border-radius:10px;text-decoration:none;font-weight:600;font-size:0.88rem;transition:all 0.3s;box-shadow:0 4px 15px rgba(99,102,241,0.3);letter-spacing:0.3px;';
|
|
a.onmouseover = function(){ this.style.transform='translateY(-2px)'; this.style.boxShadow='0 8px 25px rgba(99,102,241,0.4)'; };
|
|
a.onmouseout = function(){ this.style.transform=''; this.style.boxShadow='0 4px 15px rgba(99,102,241,0.3)'; };
|
|
// Insert at end of service-detail-content
|
|
var content = section.querySelector('.service-detail-content');
|
|
if(content) { content.appendChild(a); }
|
|
else { section.appendChild(a); }
|
|
});
|
|
}
|
|
|
|
setTimeout(inject, 2500);
|
|
var _pushState = history.pushState;
|
|
history.pushState = function() { _pushState.apply(this, arguments); setTimeout(inject, 1500); };
|
|
window.addEventListener('popstate', function(){ setTimeout(inject, 1500); });
|
|
})();
|
|
|
|
/* === VISTEX_SWAP === */
|
|
(function(){var s=document.createElement("style");s.textContent="@media(min-width:769px){.main-navigation{display:flex!important;align-items:center!important;gap:.1rem!important;flex:1!important;justify-content:center!important}.mobile-toggle{display:none!important}.header-wrapper{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:0 1.5rem!important;max-width:1400px!important;margin:0 auto!important}.header-right{display:flex!important;align-items:center!important;gap:.5rem!important}.contact-button{display:inline-flex!important}.nav-link{font-size:.82rem!important;padding:.5rem .6rem!important;white-space:nowrap!important}}";document.head.appendChild(s);})();
|
|
(function(){
|
|
function swapVistex(){
|
|
document.querySelectorAll("img.partner-logo").forEach(function(img){
|
|
if(img.alt && img.alt.indexOf("Vistex")!==-1){
|
|
img.src="/assets/vistex-new.png?v="+Date.now();
|
|
}
|
|
});
|
|
}
|
|
//setTimeout(swapVistex,500);
|
|
//setTimeout(swapVistex,1500);
|
|
//setTimeout(swapVistex,3000);
|
|
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* == ADD SCALEWAY + ARROW TO PARTNERS == */
|
|
(function(){var s=document.createElement("style");s.textContent="@media(min-width:769px){.main-navigation{display:flex!important;align-items:center!important;gap:.1rem!important;flex:1!important;justify-content:center!important}.mobile-toggle{display:none!important}.header-wrapper{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:0 1.5rem!important;max-width:1400px!important;margin:0 auto!important}.header-right{display:flex!important;align-items:center!important;gap:.5rem!important}.contact-button{display:inline-flex!important}.nav-link{font-size:.82rem!important;padding:.5rem .6rem!important;white-space:nowrap!important}}";document.head.appendChild(s);})();
|
|
(function(){
|
|
function addPartners(){
|
|
var pc = document.querySelector(".partners-container");
|
|
if(!pc || pc.dataset.xp) return;
|
|
pc.dataset.xp = "1";
|
|
var tpl = function(src,alt,cls){
|
|
var d = document.createElement("div");
|
|
d.className = "partner-item";
|
|
d.innerHTML = '<div class="partner-logo-container"><img src="' + src + '" alt="' + alt + '" class="partner-logo ' + (cls || "") + '" /></div><span class="partner-label">' + alt + '</span>';
|
|
return d;
|
|
};
|
|
}
|
|
//pc.appendChild(tpl("/assets/arrow-partner.svg","Arrow Electronics",""));
|
|
if(document.readyState==="loading"){
|
|
document.addEventListener("DOMContentLoaded",function(){setTimeout(addPartners,800);});
|
|
} else {
|
|
setTimeout(addPartners,800);
|
|
}
|
|
})();
|
|
/* MOBILE PARTNER DUP */
|
|
(function(){var s=document.createElement("style");s.textContent="@media(min-width:769px){.main-navigation{display:flex!important;align-items:center!important;gap:.1rem!important;flex:1!important;justify-content:center!important}.mobile-toggle{display:none!important}.header-wrapper{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:0 1.5rem!important;max-width:1400px!important;margin:0 auto!important}.header-right{display:flex!important;align-items:center!important;gap:.5rem!important}.contact-button{display:inline-flex!important}.nav-link{font-size:.82rem!important;padding:.5rem .6rem!important;white-space:nowrap!important}}";document.head.appendChild(s);})();
|
|
(function(){
|
|
if(window.innerWidth>768)return;
|
|
function d(){var p=document.querySelector(".partners-container");if(!p||p.dataset.mdup)return;p.dataset.mdup="1";/* triplication disabled */}
|
|
if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",function(){setTimeout(d,1500);});}else{setTimeout(d,1500);}
|
|
})();
|