WEBLEB
होम
संपादक
लॉग इन करें
Pro
हिंदी
English
Français
Español
Português
Deutsch
Italiano
हिंदी
HTML
CSS
JS
/* * Feuille de style personnalisée pour Pertinentia.fr * Contient les styles non-Tailwind et les helper classes */ /* Styles du Moteur Scroll-Story (Adapté) */ .morphing-shape { border: 1px solid #94A3B8; } /* Fond de grille pour SECTION 1 (Ajout de densité visuelle) */ #pinned-story::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px); background-size: 50px 50px; opacity: 0.5; z-index: 0; } /* Styles pour SECTION 3 (Pinning Séquencé) */ .rule-card { background-color: #F8FAFC; border: 1px solid rgba(0, 0, 0, 0.05); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); transition: box-shadow 0.3s; } .rule-card:nth-child(even) { background-color: #FAFAFC; /* Légère variation pour l'effet d'empilement */ } /* Styles des cartes Mythe/Témoignage */ .flip-card { height: 320px; } .flip-face { border: 1px solid rgba(0, 0, 0, 0.1); } .flip-back { background-color: #DBEAFE; /* Bleu clair pour la solution */ color: #1E293B; } /* Helper pour GSAP */ .gsap-active-border { border-color: #38BDF8 !important; box-shadow: 0 0 20px rgba(56, 189, 248, 0.5); }/* Replace with your CSS Code (Leave empty if not needed) */
// --- FICHIER D'APPLICATION JAVASCRIPT (app.js) --- gsap.registerPlugin(ScrollTrigger); // --- Logique GSAP SECTION 1 (Scroll Story) --- const initGsapScrollStory = () => { let tl = gsap.timeline({ scrollTrigger: { trigger: "#pinned-story", start: "top top", end: "+=4500", pin: true, scrub: 1, anticipatePin: 1 } }); const viz = document.getElementById('data-viz-area'); const vizContent = document.getElementById('viz-content'); // SÉQUENCE 1 : Question (Neutre) tl.to(viz, { rotation: 0, scale: 1, duration: 0.5 }) .to(vizContent, { innerHTML: "93%", duration: 0.5, color: "#1e293b" }, "<") .to("#txt-1", { opacity: 1, y: 0, duration: 0.5 }, "<") .to({}, { duration: 0.8 }) .to("#txt-1", { opacity: 0, y: -50, filter: "blur(5px)", duration: 0.5 }) .to(viz, { scale: 0.5, duration: 0.5 }, "<"); // SÉQUENCE 2 : Choc (Pas de site = pas sérieux) tl.to(viz, { rotation: 180, borderColor: "#B91C1C", backgroundColor: "rgba(185, 28, 28, 0.1)", boxShadow: "0 0 50px rgba(185, 28, 28, 0.3)", duration: 0.5 }) .to(vizContent, { innerHTML: "FAILURE", color: "#B91C1C", rotation: 360, duration: 0.5 }, "<") .to("#txt-2", { opacity: 1, y: 0, scale: 1, duration: 0.5 }, "<0.2") .to({}, { duration: 1.0 }) .to("#txt-2", { opacity: 0, scale: 1.2, duration: 0.5 }); // SÉQUENCE 3 : Solution 1 (Trouvable) tl.to(viz, { rotation: 0, scale: 1.5, borderColor: "#38BDF8", duration: 0.5 }) .to(vizContent, { innerHTML: "GROWTH", color: "#38BDF8", rotation: 0, duration: 0.5 }, "<") .to("#txt-3", { opacity: 1, y: 0, duration: 0.5 }, "<") .to({}, { duration: 0.8 }) .to("#txt-3", { opacity: 0, y: -50, duration: 0.5 }); // SÉQUENCE 4 : Solution 2 (Chiffre d'Affaire) tl.to(viz, { scale: 1, rotation: 720, duration: 0.5 }) .to(vizContent, { innerHTML: "+500%", color: "#38BDF8", duration: 0.5 }, "<") .to("#txt-4", { opacity: 1, y: 0, duration: 0.5 }, "<") .to({}, { duration: 0.8 }) .to("#txt-4", { opacity: 0, y: -50, duration: 0.5 }); // SÉQUENCE 5 : Le CTA Final (Résolution) tl.to(viz, { scale: 2.5, rotation: 0, borderColor: "#38BDF8", boxShadow: "0 0 20px #38BDF8", duration: 1 }) .to("#txt-5", { opacity: 1, y: 0, duration: 0.5 }, "<") .to({}, { duration: 0.8 }) .to("#txt-5", { opacity: 0, y: -50, duration: 0.5 }); // SÉQUENCE 6 : Le Résultat Final tl.to(viz, { scale: 0, duration: 0.5 }) .to("#txt-6", { opacity: 1, y: 0, duration: 1 }, "-=0.2") .to({}, { duration: 1.0 }); }; // --- Logique GSAP SECTION 2 (Data Reveal) --- const initGsapSection2 = () => { const cards = gsap.utils.toArray("#pourquoi-site-section .data-card"); gsap.timeline({ scrollTrigger: { trigger: "#pourquoi-site-section", start: "top 70%", toggleActions: "play none none none", } }) .from(cards, { opacity: 0, y: 50, scale: 0.95, duration: 1, stagger: 0.3, ease: "power3.out" }) .then(() => { gsap.to("#bar-247", { width: "100%", duration: 1.5, ease: "power2.out" }); gsap.to("#credibility-score", { innerHTML: "100%", duration: 1.5, snap: "innerHTML", ease: "none" }); gsap.to(".growth-bar", { scaleY: 1, stagger: 0.1, duration: 1, ease: "power1.out" }); gsap.to("#roi-value", { innerHTML: "500%", duration: 2, snap: "innerHTML", ease: "none" }); }); }; // --- Logique GSAP SECTION 3 (Vertical Pinning Séquencé) --- const initGsapSection3 = () => { const rulesContainer = document.getElementById('regles-changed-section'); const rulesCards = gsap.utils.toArray('#regles-changed-section .rule-card'); let tl = gsap.timeline({ scrollTrigger: { trigger: rulesContainer, pin: true, scrub: 1, start: "top top", end: `+=${rulesCards.length * 1500}px`, } }); rulesCards.forEach((card, index) => { // Entrée : Vient de la gauche, glisse vers le centre tl.fromTo(card, { opacity: 0, x: -100, scale: 0.95 }, { opacity: 1, x: 0, scale: 1, duration: 1.5, ease: "power2.out" } ); // Maintien tl.to(card, { duration: 1 }); // Sortie : Glisse vers la droite tl.to(card, { opacity: 0, x: 100, scale: 0.95, duration: 0.5, ease: "power1.in", }); }); }; // --- Logique GSAP SECTION 4 (Bénéfices) --- const initGsapSection4 = () => { const benefices = gsap.utils.toArray('.benefit-item'); gsap.from(benefices, { y: 30, opacity: 0, duration: 0.8, stagger: 0.3, ease: "power2.out", scrollTrigger: { trigger: "#benefices-concrets-section", start: "top 70%", toggleActions: "play none none none" } }); }; // --- Logique GSAP Section 5 (3D Flip) --- const initGsapSection5 = () => { const mythCards = gsap.utils.toArray('#mythes-section .flip-card'); mythCards.forEach((card) => { gsap.to(card, { rotationY: 180, duration: 2.5, ease: "power2.inOut", scrollTrigger: { trigger: card, start: "top 80%", end: "top 20%", scrub: 1, toggleActions: "play none none reverse", } }); }); }; // --- Logique GSAP SECTION 7 (Témoignages) --- const initGsapSection7 = () => { const cards = gsap.utils.toArray('.testimonial-card'); gsap.from(cards, { y: 50, opacity: 0, duration: 1, stagger: 0.3, ease: "power3.out", scrollTrigger: { trigger: "#testimonial-container", start: "top 70%", toggleActions: "play none none none" } }); }; // --- Logique GSAP SECTION 8 (Comment Ça Marche) --- const initGsapSection8 = () => { const etapes = gsap.utils.toArray('#etapes-wrapper > div'); gsap.from(etapes, { y: 50, opacity: 0, duration: 1, stagger: 0.3, ease: "power3.out", scrollTrigger: { trigger: "#comment-ca-marche-section", start: "top 70%", toggleActions: "play none none none" } }); }; // --- Logique GSAP SECTION 9 (FAQ) --- const initGsapSection9 = () => { const faqs = gsap.utils.toArray('.faq-item'); gsap.from(faqs, { x: -50, opacity: 0, duration: 0.8, stagger: 0.2, ease: "power2.out", scrollTrigger: { trigger: "#faq-section", start: "top 80%", toggleActions: "play none none none" } }); }; // --- LANCEMENT DE TOUTES LES ANIMATIONS --- window.addEventListener('load', () => { gsap.registerPlugin(ScrollTrigger); // Le Pinning doit se faire en premier (avant le reste du flow) initGsapScrollStory(); initGsapSection3(); // Les animations de révélation de contenu (Data Viz, Staggered Reveals) initGsapSection2(); initGsapSection4(); initGsapSection5(); initGsapSection7(); initGsapSection8(); initGsapSection9(); });/* Replace with your JS Code (Leave empty if not needed) */
Validating your code, please wait...
HTML
CSS
JS
/* * Feuille de style personnalisée pour Pertinentia.fr * Contient les styles non-Tailwind et les helper classes */ /* Styles du Moteur Scroll-Story (Adapté) */ .morphing-shape { border: 1px solid #94A3B8; } /* Fond de grille pour SECTION 1 (Ajout de densité visuelle) */ #pinned-story::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px); background-size: 50px 50px; opacity: 0.5; z-index: 0; } /* Styles pour SECTION 3 (Pinning Séquencé) */ .rule-card { background-color: #F8FAFC; border: 1px solid rgba(0, 0, 0, 0.05); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); transition: box-shadow 0.3s; } .rule-card:nth-child(even) { background-color: #FAFAFC; /* Légère variation pour l'effet d'empilement */ } /* Styles des cartes Mythe/Témoignage */ .flip-card { height: 320px; } .flip-face { border: 1px solid rgba(0, 0, 0, 0.1); } .flip-back { background-color: #DBEAFE; /* Bleu clair pour la solution */ color: #1E293B; } /* Helper pour GSAP */ .gsap-active-border { border-color: #38BDF8 !important; box-shadow: 0 0 20px rgba(56, 189, 248, 0.5); }/* Replace with your CSS Code (Leave empty if not needed) */
// --- FICHIER D'APPLICATION JAVASCRIPT (app.js) --- gsap.registerPlugin(ScrollTrigger); // --- Logique GSAP SECTION 1 (Scroll Story) --- const initGsapScrollStory = () => { let tl = gsap.timeline({ scrollTrigger: { trigger: "#pinned-story", start: "top top", end: "+=4500", pin: true, scrub: 1, anticipatePin: 1 } }); const viz = document.getElementById('data-viz-area'); const vizContent = document.getElementById('viz-content'); // SÉQUENCE 1 : Question (Neutre) tl.to(viz, { rotation: 0, scale: 1, duration: 0.5 }) .to(vizContent, { innerHTML: "93%", duration: 0.5, color: "#1e293b" }, "<") .to("#txt-1", { opacity: 1, y: 0, duration: 0.5 }, "<") .to({}, { duration: 0.8 }) .to("#txt-1", { opacity: 0, y: -50, filter: "blur(5px)", duration: 0.5 }) .to(viz, { scale: 0.5, duration: 0.5 }, "<"); // SÉQUENCE 2 : Choc (Pas de site = pas sérieux) tl.to(viz, { rotation: 180, borderColor: "#B91C1C", backgroundColor: "rgba(185, 28, 28, 0.1)", boxShadow: "0 0 50px rgba(185, 28, 28, 0.3)", duration: 0.5 }) .to(vizContent, { innerHTML: "FAILURE", color: "#B91C1C", rotation: 360, duration: 0.5 }, "<") .to("#txt-2", { opacity: 1, y: 0, scale: 1, duration: 0.5 }, "<0.2") .to({}, { duration: 1.0 }) .to("#txt-2", { opacity: 0, scale: 1.2, duration: 0.5 }); // SÉQUENCE 3 : Solution 1 (Trouvable) tl.to(viz, { rotation: 0, scale: 1.5, borderColor: "#38BDF8", duration: 0.5 }) .to(vizContent, { innerHTML: "GROWTH", color: "#38BDF8", rotation: 0, duration: 0.5 }, "<") .to("#txt-3", { opacity: 1, y: 0, duration: 0.5 }, "<") .to({}, { duration: 0.8 }) .to("#txt-3", { opacity: 0, y: -50, duration: 0.5 }); // SÉQUENCE 4 : Solution 2 (Chiffre d'Affaire) tl.to(viz, { scale: 1, rotation: 720, duration: 0.5 }) .to(vizContent, { innerHTML: "+500%", color: "#38BDF8", duration: 0.5 }, "<") .to("#txt-4", { opacity: 1, y: 0, duration: 0.5 }, "<") .to({}, { duration: 0.8 }) .to("#txt-4", { opacity: 0, y: -50, duration: 0.5 }); // SÉQUENCE 5 : Le CTA Final (Résolution) tl.to(viz, { scale: 2.5, rotation: 0, borderColor: "#38BDF8", boxShadow: "0 0 20px #38BDF8", duration: 1 }) .to("#txt-5", { opacity: 1, y: 0, duration: 0.5 }, "<") .to({}, { duration: 0.8 }) .to("#txt-5", { opacity: 0, y: -50, duration: 0.5 }); // SÉQUENCE 6 : Le Résultat Final tl.to(viz, { scale: 0, duration: 0.5 }) .to("#txt-6", { opacity: 1, y: 0, duration: 1 }, "-=0.2") .to({}, { duration: 1.0 }); }; // --- Logique GSAP SECTION 2 (Data Reveal) --- const initGsapSection2 = () => { const cards = gsap.utils.toArray("#pourquoi-site-section .data-card"); gsap.timeline({ scrollTrigger: { trigger: "#pourquoi-site-section", start: "top 70%", toggleActions: "play none none none", } }) .from(cards, { opacity: 0, y: 50, scale: 0.95, duration: 1, stagger: 0.3, ease: "power3.out" }) .then(() => { gsap.to("#bar-247", { width: "100%", duration: 1.5, ease: "power2.out" }); gsap.to("#credibility-score", { innerHTML: "100%", duration: 1.5, snap: "innerHTML", ease: "none" }); gsap.to(".growth-bar", { scaleY: 1, stagger: 0.1, duration: 1, ease: "power1.out" }); gsap.to("#roi-value", { innerHTML: "500%", duration: 2, snap: "innerHTML", ease: "none" }); }); }; // --- Logique GSAP SECTION 3 (Vertical Pinning Séquencé) --- const initGsapSection3 = () => { const rulesContainer = document.getElementById('regles-changed-section'); const rulesCards = gsap.utils.toArray('#regles-changed-section .rule-card'); let tl = gsap.timeline({ scrollTrigger: { trigger: rulesContainer, pin: true, scrub: 1, start: "top top", end: `+=${rulesCards.length * 1500}px`, } }); rulesCards.forEach((card, index) => { // Entrée : Vient de la gauche, glisse vers le centre tl.fromTo(card, { opacity: 0, x: -100, scale: 0.95 }, { opacity: 1, x: 0, scale: 1, duration: 1.5, ease: "power2.out" } ); // Maintien tl.to(card, { duration: 1 }); // Sortie : Glisse vers la droite tl.to(card, { opacity: 0, x: 100, scale: 0.95, duration: 0.5, ease: "power1.in", }); }); }; // --- Logique GSAP SECTION 4 (Bénéfices) --- const initGsapSection4 = () => { const benefices = gsap.utils.toArray('.benefit-item'); gsap.from(benefices, { y: 30, opacity: 0, duration: 0.8, stagger: 0.3, ease: "power2.out", scrollTrigger: { trigger: "#benefices-concrets-section", start: "top 70%", toggleActions: "play none none none" } }); }; // --- Logique GSAP Section 5 (3D Flip) --- const initGsapSection5 = () => { const mythCards = gsap.utils.toArray('#mythes-section .flip-card'); mythCards.forEach((card) => { gsap.to(card, { rotationY: 180, duration: 2.5, ease: "power2.inOut", scrollTrigger: { trigger: card, start: "top 80%", end: "top 20%", scrub: 1, toggleActions: "play none none reverse", } }); }); }; // --- Logique GSAP SECTION 7 (Témoignages) --- const initGsapSection7 = () => { const cards = gsap.utils.toArray('.testimonial-card'); gsap.from(cards, { y: 50, opacity: 0, duration: 1, stagger: 0.3, ease: "power3.out", scrollTrigger: { trigger: "#testimonial-container", start: "top 70%", toggleActions: "play none none none" } }); }; // --- Logique GSAP SECTION 8 (Comment Ça Marche) --- const initGsapSection8 = () => { const etapes = gsap.utils.toArray('#etapes-wrapper > div'); gsap.from(etapes, { y: 50, opacity: 0, duration: 1, stagger: 0.3, ease: "power3.out", scrollTrigger: { trigger: "#comment-ca-marche-section", start: "top 70%", toggleActions: "play none none none" } }); }; // --- Logique GSAP SECTION 9 (FAQ) --- const initGsapSection9 = () => { const faqs = gsap.utils.toArray('.faq-item'); gsap.from(faqs, { x: -50, opacity: 0, duration: 0.8, stagger: 0.2, ease: "power2.out", scrollTrigger: { trigger: "#faq-section", start: "top 80%", toggleActions: "play none none none" } }); }; // --- LANCEMENT DE TOUTES LES ANIMATIONS --- window.addEventListener('load', () => { gsap.registerPlugin(ScrollTrigger); // Le Pinning doit se faire en premier (avant le reste du flow) initGsapScrollStory(); initGsapSection3(); // Les animations de révélation de contenu (Data Viz, Staggered Reveals) initGsapSection2(); initGsapSection4(); initGsapSection5(); initGsapSection7(); initGsapSection8(); initGsapSection9(); });/* Replace with your JS Code (Leave empty if not needed) */