← Retour galerie
Formulaires · html-css · intermediate
Wizard Steps
Formulaire multi-étapes avec barre de progression acid
Aperçu live
Code
:root {
--ink: #060708;
--acid: #b8ff2e;
--muted: rgba(255, 255, 255, 0.45);
--line: rgba(255, 255, 255, 0.1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
min-height: 100vh;
display: grid;
place-items: center;
background: var(--ink);
font-family: "Segoe UI", system-ui, sans-serif;
color: #fff;
padding: 1.5rem;
}
.wizard {
width: min(100%, 480px);
background: #0d0f14;
border: 1px solid var(--line);
border-radius: 24px;
padding: 1.75rem;
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.steps {
display: flex;
gap: 0.5rem;
margin-bottom: 1.75rem;
}
.step {
flex: 1;
height: 4px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.08);
overflow: hidden;
position: relative;
}
.step span {
display: block;
height: 100%;
width: 0;
background: linear-gradient(90deg, var(--acid), #7fd00a);
border-radius: inherit;
transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
box-shadow: 0 0 12px rgba(184, 255, 46, 0.5);
}
.step.done span,
.step.active span { width: 100%; }
.step.active span { width: 55%; }
h1 {
font-size: 1.35rem;
font-weight: 850;
margin-bottom: 0.35rem;
}
.sub {
color: var(--muted);
font-size: 0.9rem;
margin-bottom: 1.5rem;
}
.panel { display: none; animation: fade 0.35s ease; }
.panel.active { display: block; }
@keyframes fade {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: none; }
}
label {
display: block;
font-size: 0.75rem;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--muted);
margin-bottom: 0.4rem;
}
input, select, textarea {
width: 100%;
padding: 0.85rem 1rem;
margin-bottom: 1rem;
border-radius: 12px;
border: 1px solid var(--line);
background: rgba(0, 0, 0, 0.35);
color: #fff;
font-size: 0.95rem;
outline: none;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, select:focus, textarea:focus {
border-color: rgba(184, 255, 46, 0.5);
box-shadow: 0 0 0 3px rgba(184, 255, 46, 0.12);
}
.choices {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.75rem;
margin-bottom: 1rem;
}
.choice {
padding: 1rem;
border-radius: 14px;
border: 1px solid var(--line);
background: rgba(0, 0, 0, 0.25);
cursor: pointer;
transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
text-align: center;
}
.choice strong { display: block; margin-bottom: 0.25rem; }
.choice small { color: var(--muted); font-size: 0.78rem; }
.choice:hover,
.choice.selected {
border-color: rgba(184, 255, 46, 0.55);
background: rgba(184, 255, 46, 0.08);
box-shadow: 0 0 24px rgba(184, 255, 46, 0.12);
}
.actions {
display: flex;
gap: 0.75rem;
margin-top: 0.5rem;
}
button {
flex: 1;
padding: 0.85rem;
border-radius: 12px;
font-weight: 800;
font-size: 0.92rem;
cursor: pointer;
border: none;
transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.back {
background: transparent;
border: 1px solid var(--line) !important;
color: #fff;
}
.next {
background: var(--acid);
color: #06100a;
box-shadow: 0 0 28px rgba(184, 255, 46, 0.25);
}
.next:hover { box-shadow: 0 0 40px rgba(184, 255, 46, 0.4); }
button:active { transform: scale(0.98); }
.success {
text-align: center;
padding: 1.5rem 0;
}
.success .check {
width: 64px;
height: 64px;
margin: 0 auto 1rem;
border-radius: 50%;
background: rgba(184, 255, 46, 0.15);
border: 2px solid var(--acid);
display: grid;
place-items: center;
font-size: 1.6rem;
color: var(--acid);
box-shadow: 0 0 40px rgba(184, 255, 46, 0.3);
animation: pop 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pop {
from { transform: scale(0.5); opacity: 0; }
to { transform: scale(1); opacity: 1; }
}
Envie de tweak les tokens ? Code Studio
