Voici un code pour une page d'attente "Site en construction" avec les éléments que vous avez demandés :
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Site en construction</title>
<style>
:root {
--main-bg: #1a1a1a;
--neomorph-light: rgba(255, 255, 255, 0.05);
--neomorph-dark: rgba(0, 0, 0, 0.5);
--accent: #6e56cf;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: var(--main-bg);
color: #ffffff;
height: 100vh;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.container {
position: relative;
z-index: 1;
text-align: center;
padding: 2rem;
max-width: 90%;
}
.neomorph-card {
background: var(--main-bg);
border-radius: 20px;
box-shadow: 8px 8px 16px var(--neomorph-dark),
-8px -8px 16px var(--neomorph-light);
padding: 3rem;
transform-style: preserve-3d;
perspective: 1000px;
transition: transform 0.3s ease;
}
h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
transform: translateZ(30px);
}
p {
font-size: 1.2rem;
margin-bottom: 2rem;
color: #cccccc;
transform: translateZ(20px);
}
.progress-container {
width: 100%;
height: 20px;
background: var(--main-bg);
border-radius: 10px;
box-shadow: inset 2px 2px 5px var(--neomorph-dark),
inset -2px -2px 5px var(--neomorph-light);
margin-bottom: 2rem;
transform: translateZ(15px);
}
.progress-bar {
height: 100%;
width: 75%;
background: linear-gradient(90deg, var(--accent), #9f7aea);
border-radius: 10px;
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
position: relative;
overflow: hidden;
}
.progress-bar::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(
90deg,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 0.2) 50%,
rgba(255, 255, 255, 0) 100%
);
animation: shimmer 1.5s infinite;
}
.contact-btn {
background: var(--main-bg);
color: white;
border: none;
padding: 12px 24px;
border-radius: 10px;
font-size: 1rem;
font-weight: bold;
cursor: pointer;
box-shadow: 5px 5px 10px var(--neomorph-dark),
-5px -5px 10px var(--neomorph-light);
transition: all 0.3s ease;
transform: translateZ(25px);
}
.contact-btn:hover {
box-shadow: 3px 3px 6px var(--neomorph-dark),
-3px -3px 6px var(--neomorph-light);
}
.contact-btn:active {
box-shadow: inset 2px 2px 5px var(--neomorph-dark),
inset -2px -2px 5px var(--neomorph-light);
}
.light-follow {
position: absolute;
width: 300px;
height: 300px;
background: radial-gradient(circle, rgba(110, 86, 207, 0.15) 0%, rgba(110, 86, 207, 0) 70%);
border-radius: 50%;
pointer-events: none;
transform: translate(-50%, -50%);
z-index: 0;
}
.particles {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
}
.particle {
position: absolute;
background: rgba(255, 255, 255, 0.1);
border-radius: 50%;
pointer-events: none;
}
@keyframes shimmer {
0% { transform: translateX(-100%); }
100% { transform: translateX(100%); }
}
@media (max-width: 768px) {
.neomorph-card {
padding: 2rem;
}
h1 {
font-size: 1.8rem;
}
p {
font-size: 1rem;
}
}
/* Easter egg styles */
.konami-activated {
animation: rainbow-bg 5s linear infinite;
}
@keyframes rainbow-bg {
0% { background-color: #ff0000; }
16.6% { background-color: #ff8000; }
33.3% { background-color: #ffff00; }
50% { background-color: #00ff00; }
66.6% { background-color: #0000ff; }
83.3% { background-color: #8000ff; }
100% { background-color: #ff0000; }
}
</style>
</head>
<body>
<div class="light-follow"></div>
<div class="particles"></div>
<div class="container">
<div class="neomorph-card">
<h1>Site en construction</h1>
<p>Nous travaillons actuellement sur quelque chose d'extraordinaire. Revenez bientôt !</p>
<div class="progress-container">
<div class="progress-bar"></div>
</div>
<button class="contact-btn">Me contacter</button>
</div>
</div>
<script>
// Effet 3D et suivi de lumière
const container = document.querySelector('.container');
const card = document.querySelector('.neomorph-card');
const lightFollow = document.querySelector('.light-follow');
document.addEventListener('mousemove', (e) => {
// Effet de lumière qui suit le curseur
lightFollow.style.left = e.clientX + 'px';
lightFollow.style.top = e.clientY + 'px';
// Effet 3D sur la carte
if (window.innerWidth > 768) {
const xAxis = (window.innerWidth / 2 - e.clientX) / 25;
const yAxis = (window.innerHeight / 2 - e.clientY) / 25;
card.style.transform = `rotateY(${xAxis}deg) rotateX(${yAxis}deg)`;
}
});
// Réinitialiser la rotation quand la souris quitte la fenêtre
document.addEventListener('mouseleave', () => {
card.style.transform = 'rotateY(0deg) rotateX(0deg)';
});
// Particules d'arrière-plan
const particlesContainer = document.querySelector('.particles');
const particleCount = 50;
for (let i = 0; i < particleCount; i++) {
const particle = document.createElement('div');
particle.classList.add('particle');
const size = Math.random() * 5 + 1;
const posX = Math.random() * 100;
const posY = Math.random() * 100;
const duration = Math.random() * 20 + 10;
const delay = Math.random() * 10;
particle.style.width = `${size}px`;
particle.style.height = `${size}px`;
particle.style.left = `${posX}%`;
particle.style.top = `${posY}%`;
particle.style.opacity = Math.random() * 0.5 + 0.1;
particle.style.animation = `float ${duration}s linear ${delay}s infinite`;
particlesContainer.appendChild(particle);
}
// Easter egg: Code Konami
const konamiCode = ['ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowLeft', 'ArrowRight', 'b', 'a'];
let konamiIndex = 0;
document.addEventListener('keydown', (e) => {
if (e.key === konamiCode[konamiIndex]) {
konamiIndex++;
if (konamiIndex === konamiCode.length) {
// Activer l'easter egg
document.body.classList.add('konami-activated');
// Créer un élément pour afficher un message
const easterEgg = document.createElement('div');
easterEgg.textContent = "🎮 MODE ARCADE ACTIVÉ! 🎮";
easterEgg.style.position = 'fixed';
easterEgg.style.top = '20px';
easterEgg.style.left = '50%';
easterEgg.style.transform = 'translateX(-50%)';
easterEgg.style.padding = '10px 20px';
easterEgg.style.background = '#000';
easterEgg.style.color = '#fff';
easterEgg.style.borderRadius = '5px';
easterEgg.style.fontWeight = 'bold';
easterEgg.style.zIndex = '1000';
document.body.appendChild(easterEgg);
// Supprimer le message après quelques secondes
setTimeout(() => {
document.body.removeChild(easterEgg);
}, 3000);
// Réinitialiser l'index
konamiIndex = 0;
}
} else {
konamiIndex = 0;
}
});
// Animation pour les particules
const style = document.createElement('style');
style.textContent = `
@keyframes float {
0% {
transform: translateY(0) translateX(0);
}
25% {
transform: translateY(-20px) translateX(10px);
}
50% {
transform: translateY(-40px) translateX(0);
}
75% {
transform: translateY(-20px) translateX(-10px);
}
100% {
transform: translateY(0) translateX(0);
}
}
`;
document.head.appendChild(style);
</script>
</body>
</html>
Souhaitez-vous que j'explique ou détaille certaines parties du code ?