Patch captcha

This commit is contained in:
Esteban
2026-07-02 15:58:39 +02:00
parent 6fb78e0bbb
commit 481fbc9498
2 changed files with 339 additions and 79 deletions
+202 -32
View File
@@ -1,7 +1,7 @@
body {
background:
radial-gradient(circle at top, rgba(108, 99, 255, 0.18), transparent 35%),
#0d0d0d;
radial-gradient(circle at top, rgba(255, 122, 26, 0.16), transparent 35%),
#0a0a10;
margin: 0;
font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
color: white;
@@ -21,10 +21,22 @@ body {
.captcha-card,
.success-screen {
background: linear-gradient(180deg, #111116 0%, #161622 100%);
border: 1px solid #2a2a3e;
border: 1px solid #262638;
border-radius: 24px;
box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
padding: 30px;
animation: cardEnter 0.5s ease;
}
@keyframes cardEnter {
from {
opacity: 0;
transform: translateY(16px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.captcha-badge {
@@ -33,9 +45,9 @@ body {
gap: 8px;
padding: 8px 14px;
border-radius: 999px;
background: rgba(108, 99, 255, 0.14);
border: 1px solid rgba(108, 99, 255, 0.28);
color: #9d97ff;
background: rgba(255, 122, 26, 0.14);
border: 1px solid rgba(255, 122, 26, 0.3);
color: #ffa155;
font-size: 13px;
font-weight: bold;
margin-bottom: 18px;
@@ -63,10 +75,14 @@ body {
max-width: 700px;
}
.captcha-subtitle strong {
color: #ffa155;
}
.captcha-target {
min-width: 240px;
background-color: #1a1a24;
border: 1px solid #2a2a3e;
border: 1px solid #262638;
border-radius: 18px;
padding: 18px;
}
@@ -82,7 +98,7 @@ body {
.captcha-target strong {
font-size: 22px;
color: #8f88ff;
color: #ffa155;
}
.captcha-stats {
@@ -95,6 +111,9 @@ body {
}
.captcha-attempts {
display: flex;
align-items: center;
gap: 14px;
background-color: #171b28;
border: 1px solid #283049;
border-radius: 14px;
@@ -115,6 +134,28 @@ body {
color: #ffffff;
}
/* Pastilles visuelles représentant les essais restants */
.attempts-dots {
display: flex;
gap: 6px;
}
.attempts-dots span {
width: 10px;
height: 10px;
border-radius: 50%;
transition: background-color 0.3s ease, transform 0.3s ease;
}
.attempts-dots .dot-filled {
background: linear-gradient(180deg, #ff7a1a 0%, #e8630a 100%);
box-shadow: 0 0 8px rgba(255, 122, 26, 0.5);
}
.attempts-dots .dot-empty {
background-color: #2a2f42;
}
.captcha-reset,
.captcha-secondary-button {
display: inline-flex;
@@ -124,14 +165,15 @@ body {
border-radius: 12px;
text-decoration: none;
color: white;
background-color: #2a314a;
border: 1px solid #3d4767;
transition: transform 0.2s ease, background-color 0.2s ease;
background-color: #2a2a3a;
border: 1px solid #3a3a4e;
transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.captcha-reset:hover,
.captcha-secondary-button:hover {
background-color: #394362;
background-color: #34344a;
border-color: rgba(255, 122, 26, 0.4);
transform: translateY(-1px);
}
@@ -143,6 +185,15 @@ body {
color: #ffb8bb;
padding: 14px 16px;
font-size: 14px;
animation: errorShake 0.4s ease;
}
@keyframes errorShake {
0%, 100% { transform: translateX(0); }
20% { transform: translateX(-6px); }
40% { transform: translateX(5px); }
60% { transform: translateX(-4px); }
80% { transform: translateX(3px); }
}
.mailbox {
@@ -199,10 +250,25 @@ body {
.mail-option {
position: relative;
opacity: 0;
animation: mailEnter 0.4s ease forwards;
animation-delay: calc(var(--mail-index, 0) * 0.04s);
}
@keyframes mailEnter {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.mail-option-disabled {
pointer-events: none;
opacity: 0.5;
}
.mail-option input {
@@ -211,9 +277,15 @@ body {
pointer-events: none;
}
/* Anneau de focus visible au clavier (accessibilité) sur la ligne associée à la checkbox */
.mail-option input:focus-visible + .mail-row {
outline: 2px solid #ff7a1a;
outline-offset: -2px;
}
.mail-row {
display: grid;
grid-template-columns: 48px minmax(120px, 220px) 1fr 70px;
grid-template-columns: 26px 48px minmax(120px, 220px) 1fr 70px;
gap: 14px;
align-items: center;
padding: 16px 18px;
@@ -232,16 +304,38 @@ body {
}
.mail-option input:checked + .mail-row {
background-color: rgba(108, 99, 255, 0.14);
box-shadow: inset 0 0 0 1px rgba(108, 99, 255, 0.35);
background-color: rgba(255, 122, 26, 0.12);
box-shadow: inset 0 0 0 1px rgba(255, 122, 26, 0.35);
}
/* Case à cocher personnalisée */
.mail-check {
width: 22px;
height: 22px;
border-radius: 6px;
background-color: #1a1a24;
border: 1px solid #3a3a4e;
display: flex;
align-items: center;
justify-content: center;
color: transparent;
font-size: 12px;
transition: background-color 0.2s ease, border-color 0.2s ease, color 0.15s ease, transform 0.15s ease;
}
.mail-option input:checked + .mail-row .mail-check {
background: linear-gradient(180deg, #ff7a1a 0%, #e8630a 100%);
border-color: #ff7a1a;
color: white;
transform: scale(1.08);
}
.mail-avatar {
width: 42px;
height: 42px;
border-radius: 50%;
background: linear-gradient(180deg, #2f3550 0%, #1f2334 100%);
border: 1px solid #303650;
background: linear-gradient(180deg, #2a2a3a 0%, #1a1a24 100%);
border: 1px solid #303040;
display: flex;
align-items: center;
justify-content: center;
@@ -287,6 +381,16 @@ body {
text-align: right;
}
/* Champ piège (honeypot) : invisible pour un humain, exclu du tabulateur,
mais toujours présent dans le HTML pour les robots qui remplissent tout */
.captcha-honeypot {
position: absolute;
left: -9999px;
width: 1px;
height: 1px;
overflow: hidden;
}
.captcha-footer {
display: flex;
justify-content: space-between;
@@ -308,7 +412,7 @@ body {
}
.captcha-submit {
background: linear-gradient(180deg, #7a72ff 0%, #5e56eb 100%);
background: linear-gradient(180deg, #ff8c3a 0%, #e8630a 100%);
color: white;
border: none;
border-radius: 12px;
@@ -317,12 +421,16 @@ body {
font-weight: bold;
cursor: pointer;
transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
box-shadow: 0 12px 24px rgba(94, 86, 235, 0.28);
box-shadow: 0 12px 24px rgba(232, 99, 10, 0.32);
}
.captcha-submit:hover {
transform: translateY(-1px) scale(1.01);
box-shadow: 0 16px 30px rgba(94, 86, 235, 0.34);
box-shadow: 0 16px 30px rgba(232, 99, 10, 0.4);
}
.captcha-submit:active {
transform: translateY(1px) scale(0.99);
}
.success-mode {
@@ -348,12 +456,60 @@ body {
}
.success-screen p {
margin: 0 auto 24px;
margin: 0 auto 12px;
max-width: 520px;
color: #ced2e6;
font-size: 18px;
}
/* Bloc pédagogique listant les indices de phishing repérés */
.success-reasons {
max-width: 460px;
margin: 18px auto 26px;
padding: 18px 22px;
text-align: left;
background: rgba(255, 122, 26, 0.08);
border: 1px solid rgba(255, 122, 26, 0.25);
border-radius: 16px;
animation: cardEnter 0.5s ease 0.3s both;
}
.success-reasons-title {
margin: 0 0 10px;
font-size: 13px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.06em;
color: #ffa155;
}
.success-reasons ul {
margin: 0;
padding: 0;
list-style: none;
display: flex;
flex-direction: column;
gap: 8px;
}
.success-reasons li {
display: flex;
align-items: flex-start;
gap: 10px;
color: #d8d9e6;
font-size: 14.5px;
line-height: 1.5;
}
.reason-dot {
flex-shrink: 0;
width: 7px;
height: 7px;
margin-top: 6px;
border-radius: 50%;
background: #ff8c3a;
}
.success-loader {
width: 240px;
height: 10px;
@@ -368,8 +524,8 @@ body {
display: block;
height: 100%;
width: 0;
background: linear-gradient(90deg, #62d26f 0%, #9cffaf 100%);
animation: loadingBar 1.8s linear forwards;
background: linear-gradient(90deg, #ffa155 0%, #ff7a1a 100%);
animation: loadingBar 2.4s linear forwards;
}
.success-burst {
@@ -377,10 +533,10 @@ body {
inset: 0;
pointer-events: none;
background:
radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.25), transparent 18%),
radial-gradient(circle at 80% 20%, rgba(98, 210, 111, 0.22), transparent 18%),
radial-gradient(circle at 30% 80%, rgba(122, 114, 255, 0.2), transparent 20%),
radial-gradient(circle at 75% 70%, rgba(255, 105, 180, 0.16), transparent 18%);
radial-gradient(circle at 20% 30%, rgba(255, 197, 92, 0.25), transparent 18%),
radial-gradient(circle at 80% 20%, rgba(98, 210, 111, 0.2), transparent 18%),
radial-gradient(circle at 30% 80%, rgba(255, 122, 26, 0.22), transparent 20%),
radial-gradient(circle at 75% 70%, rgba(255, 145, 77, 0.18), transparent 18%);
animation: burstPulse 1s ease-in-out infinite alternate;
}
@@ -429,6 +585,22 @@ body {
}
}
@media (prefers-reduced-motion: reduce) {
.captcha-card,
.success-screen,
.mail-option,
.success-reasons,
.success-icon,
.captcha-error {
animation: none;
opacity: 1;
}
.success-burst {
animation: none;
}
}
@media (max-width: 900px) {
.captcha-top {
flex-direction: column;
@@ -440,7 +612,7 @@ body {
}
.mail-row {
grid-template-columns: 42px 1fr 56px;
grid-template-columns: 22px 42px 1fr 56px;
}
.mail-sender {
@@ -482,15 +654,13 @@ body {
}
.mail-row {
grid-template-columns: 36px 1fr;
grid-template-columns: 20px 36px 1fr;
gap: 10px;
padding: 14px 14px;
}
.mail-time {
grid-column: 2;
text-align: left;
margin-top: 4px;
display: none;
}
.success-screen h1 {