e.stopPropagation()} style={{
background: "#111e2d", border: "2px solid #c8a94a", borderRadius: 14,
padding: "32px 28px", width: 300, textAlign: "center",
}}>
🔒
Accès administrateur
Saisissez le code PIN à 5 chiffres
{[0,1,2,3,4].map(i => (
i ? "#c8a94a" : "#1e3a5a"}`,
borderRadius: 8, display: "flex", alignItems: "center", justifyContent: "center",
fontSize: 22, fontWeight: 800, color: "#c8a94a",
}}>
{pinInput.length > i ? "●" : ""}
))}
{pinError &&
Code incorrect, réessayez.
}
{[1,2,3,4,5,6,7,8,9].map(n => (
{
if (pinInput.length < 5) {
const next = pinInput + n;
setPinInput(next);
setPinError(false);
if (next.length === 5) {
if (next === CORRECT_PIN) {
setIsAdmin(true); setShowPinModal(false); if (pendingTab) setTab(pendingTab); setPinInput("");
} else {
setPinError(true); setTimeout(() => setPinInput(""), 600);
}
}
}
}} style={{
background: "#1a2e45", border: "1px solid #1e3a5a", borderRadius: 8,
color: "#e8e0d0", fontSize: 18, fontWeight: 700, padding: "12px 0", cursor: "pointer",
}}>{n}
))}
{ setPinInput(""); setPinError(false); }} style={{
background: "#1a2e45", border: "1px solid #1e3a5a", borderRadius: 8,
color: "#8babc8", fontSize: 13, fontWeight: 600, padding: "12px 0", cursor: "pointer",
}}>C
{
if (pinInput.length < 5) {
const next = pinInput + "0";
setPinInput(next);
setPinError(false);
if (next.length === 5) {
if (next === CORRECT_PIN) {
setIsAdmin(true); setShowPinModal(false); if (pendingTab) setTab(pendingTab); setPinInput("");
} else {
setPinError(true); setTimeout(() => setPinInput(""), 600);
}
}
}
}} style={{
background: "#1a2e45", border: "1px solid #1e3a5a", borderRadius: 8,
color: "#e8e0d0", fontSize: 18, fontWeight: 700, padding: "12px 0", cursor: "pointer",
}}>0
{ setPinInput(p => p.slice(0,-1)); setPinError(false); }} style={{
background: "#1a2e45", border: "1px solid #1e3a5a", borderRadius: 8,
color: "#8babc8", fontSize: 16, fontWeight: 700, padding: "12px 0", cursor: "pointer",
}}>⌫
setShowPinModal(false)} style={{
background: "transparent", border: "1px solid #1e3a5a", borderRadius: 8,
color: "#4a6a8a", fontSize: 12, padding: "8px 20px", cursor: "pointer", marginTop: 4,
}}>Annuler