fullstack-form-app-sinclqir
Version:
Application de gestion des utilisateurs avec authentification JWT - Frontend React + Backend Python FastAPI
257 lines (219 loc) • 3.85 kB
CSS
.home {
min-height: 100vh;
background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.header {
position: sticky;
top: 0;
z-index: 50;
width: 100%;
border-bottom: 1px solid #e5e7eb;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
}
.header-content {
max-width: 1200px;
margin: 0 auto;
display: flex;
height: 4rem;
align-items: center;
justify-content: flex-end;
padding: 0 1rem;
}
.logo {
display: flex;
align-items: center;
gap: 0.5rem;
}
.logo h1 {
margin: 0;
font-size: 1.5rem;
font-weight: 700;
color: #1f2937;
}
.logo .green-text {
color: #16a34a;
}
.logo-icon {
width: 1.5rem;
height: 1.5rem;
color: #16a34a;
}
.user-info {
display: flex;
align-items: center;
gap: 1rem;
}
.user-details {
display: flex;
align-items: center;
gap: 0.5rem;
}
.user-icon {
width: 1rem;
height: 1rem;
color: #6b7280;
}
.user-email {
font-size: 0.875rem;
color: #6b7280;
}
.role-badge {
padding: 0.25rem 0.5rem;
border-radius: 0.375rem;
font-size: 0.75rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.role-badge.admin {
background: #1f2937;
color: white;
}
.role-badge.user {
background: #f3f4f6;
color: #374151;
border: 1px solid #d1d5db;
}
.logout-btn {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
background: #ef4444;
border: 1px solid #dc2626;
border-radius: 0.375rem;
color: white;
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
}
.logout-btn:hover {
background: #dc2626;
border-color: #b91c1c;
}
.logout-icon {
width: 1rem;
height: 1rem;
}
.main-content {
max-width: 1200px;
margin: 0 auto;
padding: 2rem 1rem;
}
.auth-container {
display: flex;
min-height: calc(100vh - 8rem);
align-items: center;
justify-content: center;
}
.auth-card {
width: 100%;
max-width: 32rem;
background: white;
border-radius: 0.75rem;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
border: 1px solid #e5e7eb;
}
.auth-header {
padding: 1.5rem 1.5rem 0;
text-align: center;
}
.auth-title {
margin: 0 0 0.5rem 0;
font-size: 1.5rem;
font-weight: 700;
color: #1f2937;
}
.auth-description {
margin: 0;
color: #6b7280;
font-size: 0.875rem;
}
.auth-content {
padding: 1.5rem;
}
.auth-footer {
padding: 0 1.5rem 1.5rem;
display: flex;
flex-direction: column;
gap: 1rem;
}
.separator {
height: 1px;
background: #e5e7eb;
margin: 0;
}
.switch-text {
text-align: center;
font-size: 0.875rem;
color: #6b7280;
margin: 0;
}
.switch-btn {
background: none;
border: none;
color: #16a34a;
font-weight: 500;
cursor: pointer;
text-decoration: underline;
padding: 0;
font-size: inherit;
}
.switch-btn:hover {
color: #15803d;
}
.admin-demo-card {
width: 100%;
background: #f0fdf4;
border: 1px solid #bbf7d0;
border-radius: 0.5rem;
padding: 1rem;
}
.admin-demo-title {
margin: 0 0 0.5rem 0;
font-size: 0.875rem;
font-weight: 600;
color: #166534;
}
.admin-demo-text {
margin: 0.25rem 0;
font-size: 0.75rem;
color: #15803d;
}
.alert {
padding: 1rem;
border-radius: 0.5rem;
margin-bottom: 1rem;
font-size: 0.875rem;
}
.alert.error {
background: #fef2f2;
color: #dc2626;
border-left: 4px solid #dc2626;
}
.alert.success {
background: #f0fdf4;
color: #16a34a;
border-left: 4px solid #16a34a;
}
/* Responsive */
@media (max-width: 768px) {
.header-content {
flex-direction: column;
height: auto;
padding: 1rem;
gap: 1rem;
}
.logo h1 {
font-size: 1.25rem;
}
.main-content {
padding: 1rem;
}
.auth-card {
margin: 1rem;
}
}