From e06a8112272063111a663694332ad387e7ab6e92 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 10 Dec 2025 21:06:18 -0500 Subject: [PATCH] update frontend --- src/App.jsx | 4 +- src/styles/auth-modal.css | 104 +++++++++++++++++++++++++++++--------- 2 files changed, 82 insertions(+), 26 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 752fd29..1d3ec3f 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -20,7 +20,7 @@ export default function App() { } else { document.body.setAttribute("data-theme", "dark"); } - } catch { + } catch (e) { document.body.setAttribute("data-theme", "dark"); } }, []); @@ -31,7 +31,7 @@ export default function App() { try { document.body.setAttribute("data-theme", theme); localStorage.setItem(THEME_KEY, theme); - } catch { + } catch (e) { // ignore } }, [theme]); diff --git a/src/styles/auth-modal.css b/src/styles/auth-modal.css index 8b5b478..4114701 100644 --- a/src/styles/auth-modal.css +++ b/src/styles/auth-modal.css @@ -1,89 +1,145 @@ +/* src/styles/auth-modal.css */ + +/* BACKDROP sombre plein écran */ .auth-modal-backdrop { position: fixed; inset: 0; - background: rgba(15, 23, 42, 0.85); + z-index: 50; + background: rgba(15, 23, 42, 0.88); display: flex; align-items: center; justify-content: center; - z-index: 50; } +/* BOÎTE MODAL */ .auth-modal { width: 100%; - max-width: 360px; - background: #020617; + max-width: 420px; + background: rgba(15, 23, 42, 0.98); border-radius: 16px; border: 1px solid rgba(148, 163, 184, 0.9); box-shadow: - 0 18px 45px rgba(0, 0, 0, 0.9), - 0 0 24px rgba(56, 189, 248, 0.5); - padding: 0.9rem 1rem 1rem 1rem; + 0 18px 40px rgba(0, 0, 0, 0.9), + 0 0 24px rgba(56, 189, 248, 0.55); + padding: 0.75rem 0.9rem 0.9rem 0.9rem; color: #e5e7eb; } +/* HEADER TABS (Login / Sign up) */ .auth-modal-header { display: flex; align-items: center; gap: 0.4rem; - margin-bottom: 0.7rem; + margin-bottom: 0.6rem; } .auth-tab { - border-radius: 999px; - border: 1px solid #4b5563; - background: #020617; + flex: 1; + border: 1px solid rgba(75, 85, 99, 0.9); + background: rgba(15, 23, 42, 0.95); color: #e5e7eb; - font-size: 0.75rem; - padding: 0.25rem 0.7rem; + border-radius: 999px; + font-size: 0.8rem; + padding: 0.35rem 0.4rem; cursor: pointer; } .auth-tab-active { - background: #1e293b; - border-color: #60a5fa; + background: linear-gradient(135deg, #1d4ed8, #0ea5e9); + border-color: #93c5fd; + color: #f9fafb; + box-shadow: 0 0 14px rgba(59, 130, 246, 0.7); } +/* Bouton X */ .auth-close { - margin-left: auto; border: none; background: transparent; color: #9ca3af; - cursor: pointer; font-size: 0.9rem; + padding: 0.1rem 0.3rem; + cursor: pointer; } +/* FORMULAIRE */ .auth-form { display: flex; flex-direction: column; - gap: 0.45rem; } +/* Chaque label = colonne verticale */ .auth-form label { display: flex; flex-direction: column; - font-size: 0.75rem; - gap: 0.15rem; + gap: 0.2rem; + font-size: 0.78rem; + margin-bottom: 0.45rem; } +/* CHAMPS TEXTE */ .auth-form input { - font-size: 0.8rem; - padding: 0.25rem 0.55rem; border-radius: 999px; border: 1px solid #4b5563; + padding: 0.38rem 0.7rem; background: #020617; color: #e5e7eb; + font-size: 0.8rem; + outline: none; + width: 100%; } +.auth-form input:focus { + border-color: #60a5fa; + box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.7); +} + +/* LIGNE PRÉNOM / NOM */ .auth-row { display: flex; - gap: 0.4rem; + gap: 0.5rem; + margin-bottom: 0.3rem; } +/* Les deux labels prennent chacun 50% (moins le gap) */ .auth-row label { flex: 1; + min-width: 0; /* évite de dépasser le modal */ } +/* MESSAGE D’ERREUR */ .auth-error { - font-size: 0.7rem; + margin-top: 0.25rem; + font-size: 0.74rem; color: #fecaca; + background: rgba(127, 29, 29, 0.35); + border-radius: 0.5rem; + padding: 0.25rem 0.5rem; +} + +/* BOUTON FULL WIDTH */ +.btn-full { + width: 100%; + margin-top: 0.4rem; +} + +/* Petite variation visuelle pour Sign up si .btn-secondary non définie */ +.btn-secondary { + padding: 0.25rem 0.7rem; + font-size: 0.75rem; + border-radius: 999px; + border: 1px solid #60a5fa; + background: #0b1120; + color: #dbeafe; + cursor: pointer; +} + +/* Responsive: sur petits écrans, Prénom/Nom se mettent l’un sous l’autre */ +@media (max-width: 480px) { + .auth-modal { + margin: 0 0.7rem; + } + + .auth-row { + flex-direction: column; + } }