/* login_student.
css - Version responsive optimisée */
:root {
--primary-color: #58CC02;
--primary-hover: #47B502;
--secondary-color: #1CB0F6;
--secondary-hover: #0095E0;
--tertiary-color: #FF9600;
--background-color: #F7F7F7;
--text-color: #4B4B4B;
--error-color: #FF4B4B;
--font-family: 'Nunito', 'Segoe UI', sans-serif;
}
/* Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
-webkit-text-size-adjust: 100%;
}
body {
font-family: var(--font-family);
background-color: var(--background-color);
color: var(--text-color);
line-height: 1.6;
overflow-x: hidden;
}
.login-page {
padding: 40px 20px;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-color: var(--background-color);
position: relative;
overflow-x: hidden;
}
/* Bulles décoratives */
.bubble {
position: absolute;
border-radius: 50%;
background-color: rgba(88, 204, 2, 0.1);
z-index: -1;
animation: float 4s ease-in-out infinite;
}
.bubble:nth-child(1) {
width: 100px;
height: 100px;
top: 20%;
left: 10%;
}
.bubble:nth-child(2) {
width: 60px;
height: 60px;
top: 30%;
right: 20%;
background-color: rgba(28, 176, 246, 0.1);
animation-delay: 1s;
}
.bubble:nth-child(3) {
width: 80px;
height: 80px;
bottom: 15%;
right: 10%;
background-color: rgba(255, 150, 0, 0.1);
animation-delay: 2s;
}
.login-container {
width: 100%;
max-width: 450px;
margin: 0 auto;
}
.form-login {
background-color: white;
padding: 40px;
border-radius: 20px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
position: relative;
overflow: hidden;
width: 100%;
}
.form-login::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 8px;
background: var(--primary-color);
}
.form-login h2 {
color: var(--text-color);
font-size: 28px;
font-weight: 800;
margin-bottom: 30px;
text-align: center;
}
.form-group {
margin-bottom: 24px;
position: relative;
transition: transform 0.3s ease;
}
.form-group input {
width: 100%;
padding: 16px;
border: 2px solid #E5E5E5;
border-radius: 12px;
font-size: 16px;
transition: all 0.3s ease;
}
.form-group input:focus {
border-color: var(--primary-color);
outline: none;
box-shadow: 0 0 0 4px rgba(88, 204, 2, 0.1);
}
.checkbox-wrapper {
margin-bottom: 24px;
display: flex;
align-items: center;
}
.checkbox-wrapper label {
display: flex;
align-items: center;
cursor: pointer;
font-weight: 600;
}
.checkbox-wrapper input[type="checkbox"] {
appearance: none;
width: 24px;
height: 24px;
border: 2px solid #E5E5E5;
border-radius: 6px;
margin-right: 10px;
position: relative;
cursor: pointer;
transition: all 0.3s ease;
}
.checkbox-wrapper input[type="checkbox"]:checked {
background-color: var(--primary-color);
border-color: var(--primary-color);
}
.checkbox-wrapper input[type="checkbox"]:checked::after {
content: '✓';
position: absolute;
color: white;
font-size: 16px;
font-weight: bold;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.btn-login {
background: var(--primary-color);
color: white;
border: none;
padding: 16px;
border-radius: 12px;
font-weight: 700;
cursor: pointer;
transition: all 0.3s ease;
font-size: 18px;
box-shadow: 0 4px 0 #45a700;
width: 100%;
text-transform: uppercase;
letter-spacing: 1px;
}
.btn-login:hover {
background: var(--primary-hover);
transform: translateY(-2px);
box-shadow: 0 6px 0 #45a700;
}
.btn-login:active {
top: 4px;
box-shadow: none;
}
.text-center {
text-align: center;
margin-top: 24px;
}
.text-center a {
color: var(--secondary-color);
text-decoration: none;
font-weight: 700;
font-size: 16px;
position: relative;
}
.text-center a::after {
content: '';
position: absolute;
width: 0;
height: 2px;
bottom: -2px;
left: 0;
background-color: var(--secondary-color);
transition: width 0.3s ease;
}
.text-center a:hover {
color: var(--secondary-hover);
}
.text-center a:hover::after {
width: 100%;
}
.error-message {
background-color: rgba(255, 75, 75, 0.1);
color: var(--error-color);
padding: 16px;
border-radius: 12px;
margin-bottom: 24px;
font-weight: 600;
border-left: 4px solid var(--error-color);
animation: shake 0.5s ease;
}
/* Barre de progression */
.progress-bar {
position: absolute;
bottom: 0;
left: 0;
height: 4px;
background: linear-gradient(to right, var(--primary-color), var(--secondary-
color));
width: 0;
animation: progress 2s ease-out forwards;
}
/* Animations */
@keyframes shake {
0%, 100% { transform: translateX(0); }
10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
20%, 40%, 60%, 80% { transform: translateX(5px); }
}
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}
@keyframes progress {
to { width: 100%; }
}
/* Responsive mobile */
@media (max-width: 768px) {
.login-page {
padding: 20px 10px;
margin-top: 20px;
margin-bottom: 20px;
min-height: auto;
}
.form-login {
padding: 20px 15px;
border-radius: 15px;
}
.form-login h2 {
font-size: 22px;
margin-bottom: 20px;
}
.form-group input {
padding: 12px;
font-size: 15px;
}
.checkbox-wrapper input[type="checkbox"] {
width: 20px;
height: 20px;
}
.checkbox-wrapper span {
font-size: 14px;
}
.btn-login {
padding: 12px;
font-size: 16px;
}
.text-center {
margin-top: 15px;
}
.text-center a {
font-size: 14px;
}
.error-message {
padding: 12px;
font-size: 14px;
margin-bottom: 15px;
}
.bubble {
display: none;
}
}
/* Écrans très petits */
@media (max-width: 480px) {
.form-login {
padding: 15px 12px;
}
.form-login h2 {
font-size: 20px;
}
.form-group input {
padding: 10px;
font-size: 14px;
}
.btn-login {
padding: 10px;
font-size: 14px;
}
}
@media (max-height: 600px) {
.login-page {
padding: 10px;
margin: 10px 0;
}
.form-login {
padding: 15px;
}
.btn-login {
padding: 8px;
}
}
/* iOS */
@supports (-webkit-touch-callout: none) {
.login-page {
min-height: -webkit-fill-available;
}
}
main {
margin-top: 100px; /* évite que le formulaire soit sous le header */
}
@media (max-width: 768px) {
main {
margin-top: 140px; /* plus d'espace sur mobile si header + haut */
}
}