diff --git a/src/components/background.jsx b/src/components/background/background.jsx
similarity index 90%
rename from src/components/background.jsx
rename to src/components/background/background.jsx
index fb26f29..0a5838b 100644
--- a/src/components/background.jsx
+++ b/src/components/background/background.jsx
@@ -1,4 +1,4 @@
-import styles from './../pages/Login/LoginPage.module.css';
+import styles from "./background.module.css";
const Background = ({ children, className }) => {
return (
diff --git a/src/components/background/background.module.css b/src/components/background/background.module.css
new file mode 100644
index 0000000..41d0a05
--- /dev/null
+++ b/src/components/background/background.module.css
@@ -0,0 +1,60 @@
+/* BACKGROUND ////////////////////////////////////////////////////////*/
+.background-container {
+ margin: 0;
+ padding: 0;
+ min-height: 100vh;
+ background: linear-gradient(135deg, #ff9500, #ffb347);
+ overflow: hidden;
+ position: relative;
+ width: 100vw;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+.circle {
+ position: absolute;
+ border-radius: 50%;
+ opacity: 0.8;
+ z-index: 1;
+}
+
+.circle-1 {
+ width: 600px;
+ height: 600px;
+ background-color: rgba(255, 255, 204, 0.6);
+ top: -10%;
+ left: -10%;
+}
+
+.circle-2 {
+ width: 250px;
+ height: 250px;
+ background-color: rgba(255, 255, 153, 0.829);
+ top: 51%;
+ left: 10%;
+}
+
+.circle-3 {
+ width: 280px;
+ height: 280px;
+ background-color: rgba(255, 255, 204, 0.439);
+ top: 17%;
+ right: 9%;
+}
+
+.circle-4 {
+ width: 500px;
+ height: 500px;
+ background-color: rgb(244, 244, 172);
+ bottom: 0%;
+ right: 0%;
+}
+
+.circle-5 {
+ width: 240px;
+ height: 240px;
+ background-color: rgba(240, 240, 41, 0.827);
+ top: 2%;
+ right: 2%;
+}
\ No newline at end of file
diff --git a/src/components/form.jsx b/src/components/form.jsx
deleted file mode 100644
index 16e1d8a..0000000
--- a/src/components/form.jsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import { useState } from "react";
-import login from "../utils/login.js";
-import getUser from "../utils/getUser.js";
-
-function LoginForm({ className }) {
-
- const [email, setEmail] = useState('');
- const [password, setPassword] = useState('');
-
- async function handleSubmit(e) {
-
- e.preventDefault();
-
- await login(email, password);
- getUser();
-
- }
-
- return (
-
-
Connexion
-
-
-
-
- setEmail(e.target.value)} required/>
-
-
-
-
- setPassword(e.target.value)} required/>
-
-
-
-
-
- );
-}
-export default LoginForm;
-
diff --git a/src/components/form/form.jsx b/src/components/form/form.jsx
new file mode 100644
index 0000000..2771332
--- /dev/null
+++ b/src/components/form/form.jsx
@@ -0,0 +1,30 @@
+import { useState } from "react";
+import login from "../../utils/login.js";
+import getUser from "../../utils/getUser.js";
+import styles from "./form.module.css";
+function LoginForm({ className }) {
+ const [email, setEmail] = useState('');
+ const [password, setPassword] = useState('');
+ async function handleSubmit(e) {
+ e.preventDefault();
+ await login(email, password);
+ getUser();
+ }
+ return (
+
+
+ setEmail(e.target.value)} required/>
+
+
+
+ setPassword(e.target.value)} required/>
+
+
+
+
+
+
+ );
+}
+export default LoginForm;
+
diff --git a/src/components/form/form.module.css b/src/components/form/form.module.css
new file mode 100644
index 0000000..a58ec84
--- /dev/null
+++ b/src/components/form/form.module.css
@@ -0,0 +1,68 @@
+
+input {
+ width: 100%;
+ height: 60px;
+ padding: 0px 10px;
+ border: none;
+ border-radius: 10px;
+ font-size: 16px;
+ color: #111;
+ box-shadow: 0 2px 6px rgba(0,0,0,0.06) inset;
+}
+
+input::placeholder{
+ font-size: 20px;
+ color: rgba(0,0,0,0.45);
+}
+.logButton{
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ margin-top: 12px;
+}
+.formgroup{
+ margin-top:23px;
+}
+
+/* style scoped (module) */
+.loginButton {
+ display: inline-block;
+ padding: 0.55rem 1rem;
+ height: 55px;
+ border-radius: 6px;
+ background-color: #2b6cb0;
+ color: #fff;
+ font-weight: 600;
+ border: none;
+ box-shadow: 0 2px 6px rgba(43,108,176,0.15);
+ cursor: pointer;
+ transition: background-color 160ms ease, transform 120ms ease, box-shadow 160ms ease;
+ font-size: 15px;
+}
+
+.loginButton:hover {
+ background-color: #235a9a;
+ transform: translateY(-2px);
+ box-shadow: 0 6px 14px rgba(43,108,176,0.18);
+}
+
+.loginButton:active {
+ transform: translateY(0);
+ box-shadow: 0 3px 8px rgba(43,108,176,0.12);
+}
+
+.loginButton:focus {
+ outline: 2px solid rgba(43,108,176,0.24);
+ outline-offset: 2px;
+}
+
+
+.loginButton:active {
+ transform: translateY(0);
+ box-shadow: 0 3px 8px rgba(43,108,176,0.12);
+}
+
+.loginButton:focus {
+ outline: 2px solid rgba(43,108,176,0.24);
+ outline-offset: 2px;
+}
diff --git a/src/index.css b/src/index.css
index a347cb8..71e301c 100644
--- a/src/index.css
+++ b/src/index.css
@@ -1,3 +1,9 @@
+* {
+ margin: 0;
+ padding: 0;
+ width:100%;
+ box-sizing: border-box;
+}
:root {
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
@@ -36,17 +42,7 @@ h1 {
line-height: 1.1;
}
-button {
- border-radius: 8px;
- border: 1px solid transparent;
- padding: 0.6em 1.2em;
- font-size: 1em;
- font-weight: 500;
- font-family: inherit;
- background-color: #1a1a1a;
- cursor: pointer;
- transition: border-color 0.25s;
-}
+
button:hover {
border-color: #646cff;
}
diff --git a/src/pages/Login/LoginPage.jsx b/src/pages/Login/LoginPage.jsx
index 9fbf39f..dcf460b 100644
--- a/src/pages/Login/LoginPage.jsx
+++ b/src/pages/Login/LoginPage.jsx
@@ -1,6 +1,6 @@
import styles from "./LoginPage.module.css";
-import LoginForm from "../../components/form.jsx";
-import Background from "../../components/background.jsx";
+import LoginForm from "../../components/form/form.jsx";
+import Background from "../../components/background/background.jsx";
function LoginPage() {
return (
@@ -12,4 +12,6 @@ function LoginPage() {
);
}
-export default LoginPage;
\ No newline at end of file
+export default LoginPage;
+
+
diff --git a/src/pages/Login/LoginPage.module.css b/src/pages/Login/LoginPage.module.css
index 1a9d0a3..b913811 100644
--- a/src/pages/Login/LoginPage.module.css
+++ b/src/pages/Login/LoginPage.module.css
@@ -1,111 +1,15 @@
-* {
- margin: 0;
- padding: 0;
- width:100%;
- box-sizing: border-box;
-}
.container {
+ position: relative;
+ z-index: 2;
display: flex;
- width: 100%;
- height: 100vh;
+ width: 30%;
+ overflow: hidden;
+ max-height: 80%;
justify-content: center;
align-items: center;
padding: 20px;
- border: 1px solid #ccc;
-}
-.login-form {
- display: flex;
- flex-direction: column;
- padding: 40px 20px;
- width: 25%;
- max-width: 400px;
- background-color: rgb(232, 229, 229);
- opacity: 0.85;
- border-radius: 8px;
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
-}
-.form-group {
- margin-bottom: 30px;
-}
-label{
- color:red;
-}
-input {
- width: 100%;
- padding: 15px 10px 5px;
- border: 1px solid #ccc;
- border-radius: 4px;
- font-size: 16px;
-}
-h1 {
- text-align: center;
- color: orange;
- margin-bottom: 20px;
-}
-.login-button {
- padding: 10px;
- background-color: rgb(125, 117, 133);
- color: white;
- border: none;
- border-radius: 4px;
- cursor: pointer;
- font-size: 16px;
- margin-top: 100px;
-}
-/* BACKGROUND ////////////////////////////////////////////////////////*/
-.background-container {
- margin: 0;
- padding: 0;
- min-height: 100vh;
- background: linear-gradient(135deg, #ff9500, #ffb347);
- overflow: hidden;
- position: relative;
- width: 100vw;
+ border-radius:12px;
}
-.circle {
- position: absolute;
- border-radius: 50%;
- opacity: 0.8;
- z-index: 1; /* Place les cercles sous le contenu */
-}
-.circle-1 {
- width: 600px;
- height: 600px;
- background-color: rgba(255, 255, 204, 0.6);
- top: -10%;
- left: -10%;
-}
-.circle-2 {
- width: 250px;
- height: 250px;
- background-color: rgba(255, 255, 153, 0.829);
- top: 51%;
- left: 10%;
-}
-
-.circle-3 {
- width: 280px;
- height: 280px;
- background-color: rgba(255, 255, 204, 0.439);
- top: 17%;
- right: 9%;
-}
-
-.circle-4 {
- width: 500px;
- height: 500px;
- background-color: rgb(244, 244, 172);
- bottom: 0%;
- right: 0%;
-}
-
-.circle-5 {
- width: 240px;
- height: 240px;
- background-color: rgba(240, 240, 41, 0.827);
- top: 2%;
- right: 2%;
-}