diff --git a/src/ActuViePrivee.tsx b/src/ActuViePrivee.tsx new file mode 100644 index 0000000..2cb2c2e --- /dev/null +++ b/src/ActuViePrivee.tsx @@ -0,0 +1,206 @@ +import React from 'react'; +import {AbsoluteFill, Easing, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig} from 'remotion'; +import {loadFont} from '@remotion/google-fonts/Inter'; +import {ICONES} from './icones'; + +const {fontFamily} = loadFont('normal', {weights: ['400', '600', '700', '800'], subsets: ['latin']}); + +export const FPS_AVP = 30; +const s = (sec: number) => Math.round(sec * FPS_AVP); + +// Charte relevée (voir DIRECTION-ARTISTIQUE.md) : fond clair réchauffé, encre #111, filets, aucun arrondi. +const C = { + bg: '#fffdf8', ink: '#111111', soft: '#6b6b6b', line: '#d9d9d9', + bleu: '#1e4d8b', vert: '#1a8a3c', orange: '#e8590c', jaune: '#f5b301', +}; + +const Icon: React.FC<{name: string; size: number; color?: string; draw?: number; stroke?: number}> = ({name, size, color = C.ink, draw = 1, stroke = 2}) => ( + + = 1 ? undefined : '1 1'} strokeDashoffset={draw >= 1 ? undefined : 1 - draw} /> + +); + +const useSpring = (delay: number, damping = 18) => { + const frame = useCurrentFrame(); + const {fps} = useVideoConfig(); + return spring({frame: frame - delay, fps, config: {damping, stiffness: 170, mass: 0.7}}); +}; + +/** Mots qui montent un par un derrière un masque. `hl` = indices de mots en couleur d'accent. */ +const Words: React.FC<{text: string; size: number; delay?: number; accent?: string; hl?: number[]; weight?: number; color?: string}> = ({ + text, size, delay = 0, accent = C.bleu, hl = [], weight = 800, color = C.ink, +}) => { + const frame = useCurrentFrame(); + const {fps} = useVideoConfig(); + return ( +
+ {text.split(' ').map((w, i) => { + const p = spring({frame: frame - delay - i * 3, fps, config: {damping: 16, stiffness: 190, mass: 0.6}}); + return ( + + {w} + + ); + })} +
+ ); +}; + +/** Bloc d'icône : carré à filet épais, trait qui se dessine. */ +const IconBlock: React.FC<{name: string; accent: string; size?: number; delay?: number; fill?: boolean}> = ({name, accent, size = 280, delay = 2, fill = true}) => { + const frame = useCurrentFrame(); + const p = useSpring(delay); + const draw = interpolate(frame, [delay + 2, delay + 20], [0, 1], {extrapolateLeft: 'clamp', extrapolateRight: 'clamp', easing: Easing.out(Easing.cubic)}); + return ( +
+ +
+ ); +}; + +/** Filet qui se trace de gauche à droite. */ +const Rule: React.FC<{delay?: number; color?: string; h?: number}> = ({delay = 0, color = C.ink, h = 3}) => { + const p = useSpring(delay, 22); + return
; +}; + +/** Cadre commun d'un plan : étiquette de chapitre, zoom lent, rideau de couleur en entrée. */ +const Shot: React.FC<{dur: number; accent: string; chap: string; source?: string; children: React.ReactNode}> = ({dur, accent, chap, source, children}) => { + const frame = useCurrentFrame(); + const wipe = interpolate(frame, [0, 9], [0, 1], {extrapolateRight: 'clamp', easing: Easing.bezier(0.7, 0, 0.2, 1)}); + const zoom = interpolate(frame, [0, dur], [1, 1.035]); + return ( + + {children} +
+ {chap} + 17.10.2026 +
+ {source &&
Source : {source}
} + {/* rideau : bloc franc qui traverse et sort à droite */} +
+ + ); +}; + +// ---------- Plans ---------- +const Kicker: React.FC<{icon: string; label: string; accent: string}> = ({icon, label, accent}) => { + const p = useSpring(8); + return ( +
+ + {label} +
+ ); +}; + +const Title: React.FC<{icon: string; kicker: string; title: string; hl: number[]; accent: string; size?: number}> = ({icon, kicker, title, hl, accent, size = 150}) => ( +
+ + + +
+); + +const Fact: React.FC<{icon: string; text: string; hl: number[]; accent: string; size?: number}> = ({icon, text, hl, accent, size = 84}) => ( +
+ + + +
+); + +const Count: React.FC<{to: number; unit: string; label: string; icon: string; accent: string}> = ({to, unit, label, icon, accent}) => { + const frame = useCurrentFrame(); + const ease = {extrapolateLeft: 'clamp', extrapolateRight: 'clamp', easing: Easing.out(Easing.exp)} as const; + const v = Math.round(interpolate(frame, [6, 36], [0, to], ease)); + const bar = interpolate(frame, [6, 36], [0, 1], ease); + return ( +
+
+ + {label} +
+
+ {v}{unit} +
+
+
+ ); +}; + +/** Carte d'alternative : nom en gros, promesse en dessous. */ +const Alt: React.FC<{icon: string; name: string; by: string; text: string; hl: number[]; accent: string}> = ({icon, name, by, text, hl, accent}) => ( +
+
+ +
+
{name}
+
{by}
+
+
+ + +
+); + +const Hook: React.FC = () => ( +
+ + +
+
+); + +const Outro: React.FC = () => ( +
+
+ {['chat', 'bouclier', 'serveur', 'cadenas'].map((n, i) => ( + + ))} +
+ + +
+); + +type Plan = {dur: number; accent: string; chap: string; source?: string; node: React.ReactNode}; +const SRC_A = 'Anthropic, 28 août 2025'; +const SRC_T = 'TechCrunch, 28 août 2025'; +const SRC_C = 'CNIL, 16 octobre 2025'; + +const plans: Plan[] = [ + {dur: s(2.4), accent: C.jaune, chap: 'RAPPEL', node: }, + {dur: s(3.4), accent: C.orange, chap: 'LE FAIT', source: SRC_A, node: }, + {dur: s(3.2), accent: C.orange, chap: 'LE FAIT', source: SRC_A, node: }, + {dur: s(3.2), accent: C.orange, chap: 'LE FAIT', source: SRC_A, node: }, + {dur: s(3.4), accent: C.bleu, chap: 'POURQUOI', source: SRC_T, node: }, + {dur: s(3.2), accent: C.bleu, chap: 'POURQUOI', node: }, + {dur: s(3.2), accent: C.bleu, chap: 'POURQUOI', source: `${SRC_A} · ${SRC_C}`, node: }, + {dur: s(1.6), accent: C.vert, chap: 'ALTERNATIVES', node: }, + {dur: s(3.0), accent: C.vert, chap: 'ALTERNATIVES', node: <Alt icon="montagne" name="Mind" by="par Théo" text="Hébergée dans le Vercors, en France." hl={[2, 3, 4]} accent={C.vert} />}, + {dur: s(3.4), accent: C.vert, chap: 'ALTERNATIVES', source: SRC_C, node: <Alt icon="chat" name="Le Chat" by="Mistral AI" text="IA française, avec un réglage pour refuser l'entraînement." hl={[1, 2]} accent={C.vert} />}, + {dur: s(3.6), accent: C.vert, chap: 'ALTERNATIVES', source: 'Infomaniak, 9 décembre 2025', node: <Alt icon="serveur" name="Euria" by="Infomaniak" text="Hébergée en Suisse. Selon Infomaniak : pas d'entraînement sur tes échanges." hl={[1, 2]} accent={C.vert} />}, + {dur: s(2.8), accent: C.jaune, chap: 'À TOI', node: <Outro />}, +]; + +export const TOTAL_AVP = plans.reduce((a, x) => a + x.dur, 0); + +export const ActuViePrivee: React.FC = () => { + const frame = useCurrentFrame(); + let from = 0; + return ( + <AbsoluteFill style={{background: C.bg, fontFamily, color: C.ink}}> + {plans.map((pl, i) => { + const el = ( + <Sequence key={i} from={from} durationInFrames={pl.dur}> + <Shot dur={pl.dur} accent={pl.accent} chap={pl.chap} source={pl.source}>{pl.node}</Shot> + </Sequence> + ); + from += pl.dur; + return el; + })} + <div style={{position: 'absolute', left: 0, bottom: 0, height: 6, width: `${(frame / TOTAL_AVP) * 100}%`, background: C.ink}} /> + </AbsoluteFill> + ); +}; diff --git a/src/Root.tsx b/src/Root.tsx index d94c292..16b6130 100644 --- a/src/Root.tsx +++ b/src/Root.tsx @@ -3,6 +3,7 @@ import {Composition} from 'remotion'; import {JourneeTheo, TOTAL_FRAMES, FPS} from './JourneeTheo'; import {JourneeTheoV2, TOTAL_V2, FPS_V2} from './JourneeTheoV2'; import {ActuViePrivee, TOTAL_AVP, FPS_AVP} from './ActuViePrivee'; +import {ActuViePrivee, TOTAL_AVP, FPS_AVP} from './ActuViePrivee'; import {NouveauteMind, TOTAL_NM, FPS_NM} from './NouveauteMind'; export const Root: React.FC = () => ( @@ -11,5 +12,6 @@ export const Root: React.FC = () => ( <Composition id="JourneeTheoV2" component={JourneeTheoV2} durationInFrames={TOTAL_V2} fps={FPS_V2} width={1080} height={1920} /> <Composition id="NouveauteMind" component={NouveauteMind} durationInFrames={TOTAL_NM} fps={FPS_NM} width={1080} height={1920} /> <Composition id="ActuViePrivee" component={ActuViePrivee} durationInFrames={TOTAL_AVP} fps={FPS_AVP} width={1080} height={1920} /> + <Composition id="ActuViePrivee" component={ActuViePrivee} durationInFrames={TOTAL_AVP} fps={FPS_AVP} width={1080} height={1920} /> </> );