Merge de main dans claude/laughing-feynman-wtq9jc

Reprise des changements de main (logo SVG, compte démo connecté par défaut,
suppression des onglets connexion/déconnexion). Conflit dans index.html
résolu : switchAuthTab supprimé comme sur main, contrôle d'âge minimum
(18 ans) conservé. legal.html passe aussi au logo SVG clair.

Claude-Session: https://claude.ai/code/session_01J2SY2d6QEBNLiUG77tZiiw
Cette révision appartient à :
Claude a révisé 2026-10-13 02:34:06 +00:00
révision 441dd721cc
4 fichiers modifiés
+18 -174

Aucun fichier ne correspond à votre recherche

+9 -170
Voir le fichier
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<title>Jobrunner - Services & Prestations Sécurisées</title>
<link rel="icon" type="image/jpeg" href="assets/img/logo.png">
<link rel="icon" type="image/svg+xml" href="assets/img/logo-light.svg">
<!-- Polices auto-hébergées (aucun appel externe) -->
<link rel="preload" href="assets/fonts/plus-jakarta-sans-latin-400-normal.woff2" as="font" type="font/woff2" crossorigin>
@@ -168,7 +168,7 @@
<div id="dev-lock-screen" class="fixed inset-0 z-[9999] bg-[#f4f5f7] flex flex-col items-center justify-center p-4 text-gray-800 transition-opacity duration-300 font-sans">
<div class="w-full max-w-xs bg-white p-6 border border-gray-300 rounded-2xl shadow-sm text-center">
<div class="flex items-center justify-center mb-3">
<img loading="lazy" decoding="async" src="assets/img/logo.png" alt="Logo Jobrunner" class="w-12 h-12 object-contain object-center" onerror="handleLogoError(this, 'sage')">
<img loading="lazy" decoding="async" src="assets/img/logo-light.svg" alt="Logo Jobrunner" class="w-12 h-12 object-contain object-center" onerror="handleLogoError(this, 'sage')">
</div>
<h1 class="text-sm font-semibold text-gray-900 mb-1">Authentification</h1>
<p class="text-xs text-gray-500 mb-4">Veuillez entrer le mot de passe pour continuer.</p>
@@ -296,7 +296,7 @@
<div class="max-w-7xl mx-auto w-full flex items-center justify-between gap-3 lg:gap-5">
<!-- 1. Logo Jobrunner avec 'J' -->
<button onclick="navigate('home')" class="flex items-center gap-2.5 group transition-transform active:scale-95 shrink-0" aria-label="Jobrunner Accueil">
<img loading="lazy" decoding="async" src="assets/img/logo.png" alt="Logo Jobrunner" class="w-10 h-10 object-contain object-center group-hover:scale-105 transition-transform select-none shrink-0" onerror="handleLogoError(this, 'sage')">
<img loading="lazy" decoding="async" src="assets/img/logo-light.svg" alt="Logo Jobrunner" class="w-10 h-10 object-contain object-center group-hover:scale-105 transition-transform select-none shrink-0" onerror="handleLogoError(this, 'sage')">
<span class="font-titre text-2xl font-black tracking-tight text-job-dark shrink-0">Job<span class="text-job-sage">runner</span></span>
</button>
@@ -349,17 +349,6 @@
<div id="header-auth-container" class="md:hidden"></div>
</header>
<!-- Bannière Invitation -->
<div id="home-guest-banner" class="mb-6 p-4 md:p-6 rounded-3xl bg-white border border-job-gray shadow-card flex items-center justify-between order-2">
<div class="pr-2">
<span class="text-xs font-bold text-job-sage uppercase tracking-wider block">Accès Visiteur</span>
<p class="text-xs text-gray-600 mt-0.5">Connectez-vous pour réserver ou publier des prestations.</p>
</div>
<button onclick="openAuthModal('Bienvenue ! Identifiez-vous pour débloquer toutes les fonctionnalités.')" class="bg-job-dark hover:bg-black text-white text-xs font-bold px-4 py-2.5 rounded-xl shrink-0 active:scale-95 shadow-sm">
Connexion
</button>
</div>
<!-- Barre de Recherche Rapide (visible uniquement sur mobile) -->
<div class="mb-6 md:hidden order-3">
<div class="bg-white rounded-2xl flex items-center px-4 py-3.5 shadow-card border border-job-gray/80 cursor-pointer hover:border-job-sage transition-all group" onclick="navigate('search')">
@@ -888,9 +877,6 @@
</button>
</div>
<button onclick="handleLogout()" class="w-full py-3.5 text-rose-500 font-bold text-sm bg-white rounded-2xl shadow-card border border-rose-100 hover:bg-rose-50 transition-colors mb-8">
Se déconnecter de ce compte
</button>
<!-- Footer Jobrunner (Profil) -->
<div class="jobrunner-footer-slot -mx-6 mt-8 md:mx-0"></div>
@@ -1079,7 +1065,7 @@
</span>
</div>
<div id="swipe-reserve-knob" class="w-10 h-10 bg-[#F1EDE1] rounded-xl flex items-center justify-center overflow-hidden shadow-md z-20 cursor-grab active:cursor-grabbing shrink-0 relative" style="touch-action: none;">
<img loading="lazy" decoding="async" src="assets/img/logo.png" class="w-full h-full object-contain object-center pointer-events-none select-none" alt="Jobrunner" onerror="handleLogoError(this, 'beige')">
<img loading="lazy" decoding="async" src="assets/img/logo-light.svg" class="w-full h-full object-contain object-center pointer-events-none select-none" alt="Jobrunner" onerror="handleLogoError(this, 'beige')">
</div>
</div>
@@ -1220,65 +1206,15 @@
<div class="bg-job-bg w-full max-w-[480px] md:max-w-lg md:rounded-3xl md:my-auto mx-auto max-h-[92vh] rounded-t-[2.5rem] flex flex-col shadow-2xl p-6 overflow-y-auto">
<div class="flex items-center justify-between mb-4">
<div class="flex items-center gap-2.5">
<img loading="lazy" decoding="async" src="assets/img/logo.png" alt="Logo Jobrunner" class="w-9 h-9 object-contain object-center shrink-0" onerror="handleLogoError(this, 'beige')">
<h2 class="text-2xl font-bold font-titre text-job-dark">Connexion</h2>
<img loading="lazy" decoding="async" src="assets/img/logo-light.svg" alt="Logo Jobrunner" class="w-9 h-9 object-contain object-center shrink-0" onerror="handleLogoError(this, 'beige')">
<h2 class="text-2xl font-bold font-titre text-job-dark">Créer un compte</h2>
</div>
<button onclick="closeAuthModal()" class="w-8 h-8 rounded-full bg-white flex items-center justify-center text-gray-500 hover:text-job-dark">
<i class="ph-bold ph-x"></i>
</button>
</div>
<div class="flex bg-white p-1 rounded-2xl border border-job-gray mb-5">
<button id="auth-tab-login" onclick="switchAuthTab('login')" class="flex-1 py-2.5 text-xs font-bold rounded-xl bg-job-sage text-white transition-all">
Connexion
</button>
<button id="auth-tab-register" onclick="switchAuthTab('register')" class="flex-1 py-2.5 text-xs font-bold rounded-xl text-gray-500 hover:text-job-dark transition-all">
Créer un compte
</button>
</div>
<div id="auth-form-login" class="space-y-4">
<!-- Profil enregistré -->
<div id="auth-saved-profile" class="bg-white p-4 rounded-2xl border border-job-gray shadow-card">
<span class="text-[10px] uppercase font-bold text-gray-400 block mb-2">Profil enregistré</span>
<div class="flex items-center justify-between">
<div class="flex items-center gap-3">
<img loading="lazy" decoding="async" id="auth-saved-avatar" src="https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=100&auto=format&fit=crop&q=80" class="w-11 h-11 rounded-full object-cover border border-job-gray" alt="Avatar">
<div>
<span id="auth-saved-name" class="text-sm font-bold text-job-dark block">Christophe Vigneron</span>
<span id="auth-saved-email" class="text-xs text-gray-500">christophe.vigneron@email.com</span>
</div>
</div>
<button type="button" onclick="loginAsChristophe()" class="bg-job-sage hover:bg-job-sage-dark text-white px-3.5 py-2 rounded-xl text-xs font-bold shadow-sm transition-all active:scale-95">
Se connecter
</button>
</div>
</div>
<!-- Séparateur -->
<div class="flex items-center gap-3 my-2">
<div class="h-px bg-job-gray flex-grow"></div>
<span class="text-[10px] font-bold text-gray-400 uppercase tracking-wider">Ou connexion sur un autre compte</span>
<div class="h-px bg-job-gray flex-grow"></div>
</div>
<!-- Formulaire autre compte -->
<form id="auth-login-custom-form" onsubmit="handleCustomLogin(event)" class="space-y-3 bg-white p-4 rounded-2xl border border-job-gray shadow-card">
<div>
<label class="block text-[10px] font-bold uppercase text-gray-600 mb-1">Email ou n° de téléphone</label>
<input type="text" id="login-identifier" required placeholder="Ex: alex.dupont@email.com ou 06..." class="w-full bg-job-bg/70 rounded-xl px-3 py-2.5 text-xs border border-job-gray outline-none focus:border-job-sage transition-all">
</div>
<div>
<label class="block text-[10px] font-bold uppercase text-gray-600 mb-1">Mot de passe</label>
<input type="password" id="login-password" required placeholder="••••••••" class="w-full bg-job-bg/70 rounded-xl px-3 py-2.5 text-xs border border-job-gray outline-none focus:border-job-sage transition-all">
</div>
<button type="submit" class="w-full bg-job-dark hover:bg-black text-white text-xs font-bold py-3 rounded-xl shadow-sm transition-all active:scale-95">
Se connecter
</button>
</form>
</div>
<form id="auth-form-register" class="hidden space-y-3" onsubmit="handleKycRegister(event)">
<form id="auth-form-register" class="space-y-3" onsubmit="handleKycRegister(event)">
<div class="grid grid-cols-2 gap-2">
<div>
<label class="block text-[10px] font-bold uppercase text-gray-600 mb-1">Prénom</label>
@@ -2154,7 +2090,7 @@
// État utilisateur et authentification
let currentUser = {
isLoggedIn: false,
isLoggedIn: true,
firstName: "Christophe",
lastName: "Vigneron",
email: "christophe.vigneron@email.com",
@@ -2620,23 +2556,6 @@
</button>
`;
}
} else {
if (greeting) greeting.innerHTML = `Bonjour, <span class="text-gray-400 whitespace-nowrap">Visiteur&nbsp;!</span>`;
if (guestBanner) guestBanner.classList.remove('hidden');
if (container) {
container.innerHTML = `
<button onclick="openAuthModal('Identifiez-vous pour publier ou réserver.')" class="bg-job-sage hover:bg-job-sage-dark text-white text-xs font-bold px-4 py-2.5 rounded-full shadow-floating active:scale-95 transition-all flex items-center gap-1.5">
<i class="ph-bold ph-user"></i> Connexion
</button>
`;
}
if (desktopContainer) {
desktopContainer.innerHTML = `
<button onclick="openAuthModal('Bienvenue ! Identifiez-vous pour accéder à toutes les fonctionnalités.')" class="bg-white hover:bg-job-bg border border-job-gray/80 text-job-dark text-xs font-bold px-3 py-1.5 rounded-full shadow-xs active:scale-95 transition-all flex items-center gap-1.5 shrink-0 whitespace-nowrap">
<i class="ph-bold ph-user text-job-sage"></i> <span>Connexion</span>
</button>
`;
}
}
}
@@ -5101,25 +5020,6 @@
modal.classList.remove('flex');
}
function switchAuthTab(tab) {
const loginTab = document.getElementById('auth-tab-login');
const regTab = document.getElementById('auth-tab-register');
const loginForm = document.getElementById('auth-form-login');
const regForm = document.getElementById('auth-form-register');
if (tab === 'login') {
loginTab.className = "flex-1 py-2.5 text-xs font-bold rounded-xl bg-job-sage text-white transition-all";
regTab.className = "flex-1 py-2.5 text-xs font-bold rounded-xl text-gray-500 hover:text-job-dark transition-all";
loginForm.classList.remove('hidden');
regForm.classList.add('hidden');
} else {
regTab.className = "flex-1 py-2.5 text-xs font-bold rounded-xl bg-job-sage text-white transition-all";
loginTab.className = "flex-1 py-2.5 text-xs font-bold rounded-xl text-gray-500 hover:text-job-dark transition-all";
regForm.classList.remove('hidden');
loginForm.classList.add('hidden');
}
}
// Âge minimum pour créer un compte (CGU, article 2.1)
const MIN_AGE = 18;
function checkAgeRequirement() {
@@ -5165,57 +5065,6 @@
}, 1800);
}
function loginAsChristophe() {
currentUser.isLoggedIn = true;
currentUser.firstName = "Christophe";
currentUser.lastName = "Vigneron";
currentUser.email = "christophe.vigneron@email.com";
currentUser.idVerified = true;
saveSession();
renderHeaderAuth();
updateProfilePassUI();
updateMessagesNotification();
closeAuthModal();
triggerCustomModal("Ravi de vous revoir, Christophe !", "check");
navigate('profile');
}
const loginAsNils = loginAsChristophe;
function handleCustomLogin(e) {
e.preventDefault();
const identifierInput = document.getElementById('login-identifier');
const identifier = identifierInput ? identifierInput.value.trim() : '';
if (!identifier) return;
let fName = "Alex";
let lName = "Dupont";
if (identifier.includes('@')) {
const parts = identifier.split('@')[0].split('.');
fName = parts[0].charAt(0).toUpperCase() + parts[0].slice(1);
if (parts.length > 1) {
lName = parts[1].charAt(0).toUpperCase() + parts[1].slice(1);
}
} else if (/^\d+$/.test(identifier.replace(/[\s\-\.]/g, ''))) {
fName = "Utilisateur";
lName = "Mobile";
}
currentUser.isLoggedIn = true;
currentUser.firstName = fName;
currentUser.lastName = lName;
currentUser.email = identifier.includes('@') ? identifier : `${identifier}@jobrunner.app`;
currentUser.idVerified = true;
currentUser.avatar = "https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=150&auto=format&fit=crop&q=80";
saveSession();
renderHeaderAuth();
updateProfilePassUI();
updateMessagesNotification();
closeAuthModal();
triggerCustomModal(`Connexion réussie ! Ravi de vous revoir, ${currentUser.firstName}.`, "check");
navigate('home');
}
function handleKycRegister(e) {
e.preventDefault();
@@ -5256,16 +5105,6 @@
navigate('profile');
}
function handleLogout() {
currentUser.isLoggedIn = false;
currentUser.idVerified = false;
clearSession();
renderHeaderAuth();
updateMessagesNotification();
triggerCustomModal("Déconnexion réussie. Vous naviguez en mode invité.", "info");
navigate('home');
}
// ====== SESSION PERSISTENCE (localStorage + token 24h) ======
function saveSession() {
try {
@@ -6348,7 +6187,7 @@
<!-- 1. Colonne : Présentation & Mission -->
<div class="space-y-2.5">
<div class="flex items-center gap-2">
<img loading="lazy" decoding="async" src="assets/img/logo.png" alt="Logo Jobrunner" class="w-8 h-8 object-contain object-center select-none shrink-0" onerror="handleLogoError(this, 'sage')">
<img loading="lazy" decoding="async" src="assets/img/logo-light.svg" alt="Logo Jobrunner" class="w-8 h-8 object-contain object-center select-none shrink-0" onerror="handleLogoError(this, 'sage')">
<span class="font-titre text-xl font-black tracking-tight text-white">Job<span class="text-job-sage">runner</span></span>
</div>
<p class="text-[11px] text-gray-400 leading-relaxed">