VoituresApi-API-Front/public/assets/css/style.css

928 lines
16 KiB
CSS

:root {
--primary: #2563eb;
--primary-hover: #1d4ed8;
--secondary: #475569;
--secondary-hover: #334155;
--danger: #ef4444;
--danger-hover: #dc2626;
--success: #10b981;
--warning: #f59e0b;
--bg-main: #f8fafc;
--bg-card: #ffffff;
--text-main: #0f172a;
--text-muted: #64748b;
--border-color: #e2e8f0;
--radius-sm: 6px;
--radius-md: 10px;
--radius-lg: 14px;
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
background-color: var(--bg-main);
color: var(--text-main);
line-height: 1.6;
min-height: 100vh;
display: flex;
flex-direction: column;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1.5rem;
width: 100%;
}
/* Navbar */
.navbar {
background: var(--bg-card);
border-bottom: 1px solid var(--border-color);
position: sticky;
top: 0;
z-index: 50;
}
.navbar-container {
display: flex;
align-items: center;
justify-content: space-between;
height: 72px;
gap: 1.5rem;
}
.brand-logo {
display: flex;
align-items: center;
gap: 0.6rem;
text-decoration: none;
font-weight: 800;
font-size: 1.3rem;
color: var(--text-main);
white-space: nowrap;
}
.logo-icon {
font-size: 1.6rem;
}
.navbar-search {
display: flex;
align-items: center;
position: relative;
max-width: 320px;
width: 100%;
}
.navbar-search-input {
width: 100%;
padding: 0.45rem 2.2rem 0.45rem 0.85rem;
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
font-size: 0.85rem;
font-family: inherit;
background: #f1f5f9;
text-transform: uppercase;
letter-spacing: 0.05em;
font-weight: 600;
}
.navbar-search-input:focus {
outline: none;
background: #fff;
border-color: var(--primary);
}
.navbar-search-btn {
position: absolute;
right: 0.5rem;
background: transparent;
border: none;
cursor: pointer;
font-size: 0.9rem;
opacity: 0.6;
}
.nav-links {
display: flex;
align-items: center;
gap: 1rem;
}
.nav-link {
color: var(--text-muted);
text-decoration: none;
font-weight: 600;
font-size: 0.95rem;
padding: 0.5rem 0.75rem;
border-radius: var(--radius-sm);
transition: color 0.2s, background-color 0.2s;
white-space: nowrap;
}
.nav-link:hover {
color: var(--primary);
background-color: #eff6ff;
}
.user-pill {
display: flex;
align-items: center;
gap: 0.5rem;
background: #f1f5f9;
padding: 0.3rem 0.75rem;
border-radius: 9999px;
font-size: 0.85rem;
font-weight: 600;
}
.user-role-badge {
padding: 0.15rem 0.45rem;
border-radius: 9999px;
font-size: 0.7rem;
text-transform: uppercase;
}
.badge-admin {
background-color: #fee2e2;
color: #991b1b;
}
.badge-user {
background-color: #e0e7ff;
color: #3730a3;
}
.nav-link-logout {
text-decoration: none;
opacity: 0.7;
margin-left: 0.25rem;
transition: opacity 0.2s;
}
.nav-link-logout:hover {
opacity: 1;
}
/* Plaque d'immatriculation style FR */
.license-plate {
display: inline-flex;
align-items: center;
background: #ffffff;
border: 2px solid #0f172a;
border-radius: 4px;
overflow: hidden;
font-family: 'Plus Jakarta Sans', monospace;
font-weight: 800;
box-shadow: var(--shadow-sm);
}
.plate-country {
background: #003399;
color: #ffd700;
padding: 0.2rem 0.5rem;
font-size: 0.75rem;
font-weight: 900;
display: flex;
align-items: center;
justify-content: center;
}
.plate-number {
padding: 0.2rem 0.65rem;
letter-spacing: 0.12em;
color: #0f172a;
font-size: 0.95rem;
}
.license-plate-lg .plate-country {
padding: 0.4rem 0.8rem;
font-size: 0.95rem;
}
.license-plate-lg .plate-number {
padding: 0.4rem 1.1rem;
font-size: 1.4rem;
}
/* Main Content */
.main-content {
flex: 1;
padding-top: 2rem;
padding-bottom: 3.5rem;
}
/* Page Header */
.page-header {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 1rem;
margin-bottom: 1.75rem;
}
.page-title {
font-size: 1.85rem;
font-weight: 800;
color: var(--text-main);
}
.page-subtitle {
color: var(--text-muted);
font-size: 0.95rem;
margin-top: 0.25rem;
}
.back-link {
display: inline-block;
color: var(--primary);
text-decoration: none;
font-weight: 600;
margin-bottom: 0.4rem;
font-size: 0.9rem;
}
.back-link:hover {
text-decoration: underline;
}
/* Buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.4rem;
font-family: inherit;
font-weight: 600;
font-size: 0.95rem;
padding: 0.65rem 1.25rem;
border-radius: var(--radius-md);
border: 1px solid transparent;
cursor: pointer;
text-decoration: none;
transition: all 0.15s ease-in-out;
}
.btn-sm {
padding: 0.4rem 0.85rem;
font-size: 0.85rem;
border-radius: var(--radius-sm);
}
.btn-block {
width: 100%;
}
.btn-primary {
background-color: var(--primary);
color: #fff;
}
.btn-primary:hover {
background-color: var(--primary-hover);
}
.btn-secondary {
background-color: var(--secondary);
color: #fff;
}
.btn-secondary:hover {
background-color: var(--secondary-hover);
}
.btn-danger {
background-color: var(--danger);
color: #fff;
}
.btn-danger:hover {
background-color: var(--danger-hover);
}
.btn-outline {
background-color: transparent;
border-color: var(--border-color);
color: var(--text-main);
}
.btn-outline:hover {
background-color: #f1f5f9;
}
/* Alerts */
.alert {
padding: 1rem 1.25rem;
border-radius: var(--radius-md);
margin-bottom: 1.5rem;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.95rem;
}
.alert-success {
background-color: #ecfdf5;
color: #065f46;
border: 1px solid #a7f3d0;
}
.alert-warning {
background-color: #fffbeb;
color: #92400e;
border: 1px solid #fde68a;
}
.alert-danger {
background-color: #fef2f2;
color: #991b1b;
border: 1px solid #fecaca;
}
.alert-info {
background-color: #eff6ff;
color: #1e40af;
border: 1px solid #bfdbfe;
}
.alert-close {
background: transparent;
border: none;
cursor: pointer;
font-size: 1.1rem;
color: inherit;
padding-left: 1rem;
}
/* Filter Bar */
.filter-bar {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 1.75rem;
gap: 1rem;
flex-wrap: wrap;
}
.search-box {
position: relative;
flex: 1;
max-width: 420px;
}
.search-icon {
position: absolute;
left: 1rem;
top: 50%;
transform: translateY(-50%);
opacity: 0.5;
}
.search-box input {
padding-left: 2.75rem;
width: 100%;
}
.filter-tabs {
display: flex;
background: #e2e8f0;
padding: 3px;
border-radius: var(--radius-md);
gap: 3px;
}
.filter-tab {
padding: 0.4rem 0.9rem;
border-radius: var(--radius-sm);
text-decoration: none;
font-size: 0.85rem;
font-weight: 600;
color: var(--text-muted);
transition: all 0.2s;
}
.filter-tab.active {
background: #fff;
color: var(--primary);
box-shadow: var(--shadow-sm);
}
.filter-count {
color: var(--text-muted);
font-size: 0.9rem;
font-weight: 600;
}
/* Cards Grid */
.cars-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 1.5rem;
}
.car-card {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 1.5rem;
display: flex;
flex-direction: column;
box-shadow: var(--shadow-sm);
transition: transform 0.2s, box-shadow 0.2s;
}
.car-card:hover {
transform: translateY(-3px);
box-shadow: var(--shadow-md);
}
.car-card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}
.car-year {
color: var(--text-muted);
font-size: 0.9rem;
font-weight: 700;
}
.car-title {
font-size: 1.35rem;
font-weight: 800;
color: var(--text-main);
margin-bottom: 0.75rem;
}
.car-stats-row {
display: flex;
gap: 0.5rem;
margin-bottom: 0.75rem;
flex-wrap: wrap;
}
.stat-badge {
display: inline-flex;
align-items: center;
gap: 0.4rem;
padding: 0.35rem 0.75rem;
border-radius: var(--radius-md);
font-size: 0.85rem;
font-weight: 700;
}
.stat-km {
background-color: #eff6ff;
color: var(--primary);
}
.stat-km-lg {
background-color: #eff6ff;
color: var(--primary);
font-size: 1.25rem;
padding: 0.5rem 1rem;
}
.stat-date {
background-color: #f1f5f9;
color: var(--secondary);
}
.car-attribute {
font-size: 0.85rem;
color: var(--text-muted);
margin-top: 0.25rem;
}
.car-owner {
font-size: 0.85rem;
color: var(--text-muted);
margin-top: 0.4rem;
padding-top: 0.5rem;
border-top: 1px dashed var(--border-color);
}
.car-card-footer {
display: flex;
align-items: center;
gap: 0.5rem;
margin-top: 1.25rem;
padding-top: 1rem;
border-top: 1px solid var(--border-color);
}
.inline-form {
display: inline;
}
/* Detail Card */
.detail-card {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 2rem;
box-shadow: var(--shadow-sm);
}
.detail-hero-info {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 1.5rem;
padding-bottom: 1.25rem;
border-bottom: 1px solid var(--border-color);
flex-wrap: wrap;
gap: 1rem;
}
.detail-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1.5rem;
}
@media (max-width: 768px) {
.detail-grid {
grid-template-columns: 1fr 1fr;
}
}
@media (max-width: 480px) {
.detail-grid {
grid-template-columns: 1fr;
}
}
.detail-item {
display: flex;
flex-direction: column;
}
.detail-label {
font-size: 0.8rem;
text-transform: uppercase;
color: var(--text-muted);
font-weight: 700;
letter-spacing: 0.04em;
margin-bottom: 0.2rem;
}
.detail-value {
font-size: 1.05rem;
font-weight: 700;
color: var(--text-main);
}
/* Tabs */
.tab-navigation {
display: flex;
gap: 0.5rem;
margin-bottom: 1.5rem;
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.tab-btn {
background: transparent;
border: none;
font-family: inherit;
font-weight: 700;
font-size: 0.95rem;
color: var(--text-muted);
padding: 0.5rem 1rem;
border-radius: var(--radius-md);
cursor: pointer;
transition: all 0.2s;
}
.tab-btn:hover {
background-color: #f1f5f9;
color: var(--text-main);
}
.tab-btn.active {
background-color: var(--primary);
color: #fff;
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
.section-card {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 1.75rem;
box-shadow: var(--shadow-sm);
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.25rem;
}
.section-header h3 {
font-size: 1.2rem;
font-weight: 800;
}
/* Data Tables */
.table-responsive {
overflow-x: auto;
}
.data-table {
width: 100%;
border-collapse: collapse;
font-size: 0.95rem;
}
.data-table th, .data-table td {
padding: 0.75rem 1rem;
text-align: left;
border-bottom: 1px solid var(--border-color);
}
.data-table th {
background-color: #f8fafc;
color: var(--text-muted);
font-weight: 700;
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.data-table tr:hover td {
background-color: #f8fafc;
}
.text-right {
text-align: right !important;
}
/* Notes Grid */
.notes-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1rem;
}
.note-card {
background: #fffbeb;
border: 1px solid #fde68a;
border-radius: var(--radius-md);
padding: 1rem 1.25rem;
display: flex;
flex-direction: column;
}
.note-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.5rem;
}
.note-header h4 {
font-size: 1rem;
color: #92400e;
font-weight: 700;
}
.note-date {
font-size: 0.75rem;
color: #b45309;
}
.note-content {
font-size: 0.9rem;
color: #78350f;
flex-grow: 1;
margin-bottom: 0.75rem;
}
.note-footer {
display: flex;
justify-content: flex-end;
}
/* Forms */
.form-card-container {
max-width: 720px;
margin: 0 auto;
}
.form-card {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 2rem;
box-shadow: var(--shadow-sm);
}
.form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
margin-bottom: 1rem;
}
@media (max-width: 600px) {
.form-row {
grid-template-columns: 1fr;
}
}
.form-group {
margin-bottom: 1.25rem;
}
.form-label {
display: block;
font-size: 0.9rem;
font-weight: 700;
margin-bottom: 0.4rem;
}
.required {
color: var(--danger);
}
.form-input {
width: 100%;
padding: 0.65rem 0.9rem;
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
font-family: inherit;
font-size: 0.95rem;
background: #fff;
transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.form-help {
font-size: 0.8rem;
color: var(--text-muted);
margin-top: 0.25rem;
display: block;
}
.form-actions {
display: flex;
justify-content: flex-end;
gap: 1rem;
margin-top: 1.5rem;
padding-top: 1rem;
border-top: 1px solid var(--border-color);
}
.collapsible-form {
background: #f8fafc;
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 1.25rem;
margin-bottom: 1.5rem;
}
.collapsible-form.hidden {
display: none;
}
.inline-add-form {
display: flex;
gap: 1rem;
align-items: flex-end;
flex-wrap: wrap;
}
/* Auth Cards */
.auth-wrapper {
display: flex;
justify-content: center;
padding-top: 2rem;
}
.auth-card {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 2.5rem;
max-width: 460px;
width: 100%;
box-shadow: var(--shadow-md);
}
.auth-header {
text-align: center;
margin-bottom: 2rem;
}
.auth-icon {
font-size: 2.5rem;
margin-bottom: 0.5rem;
display: inline-block;
}
.auth-title {
font-size: 1.6rem;
font-weight: 800;
}
.auth-subtitle {
font-size: 0.9rem;
color: var(--text-muted);
margin-top: 0.25rem;
}
.demo-accounts-box {
margin-top: 1.75rem;
padding-top: 1.25rem;
border-top: 1px dashed var(--border-color);
}
.demo-accounts-title {
font-size: 0.85rem;
font-weight: 700;
color: var(--secondary);
margin-bottom: 0.75rem;
}
.demo-buttons {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.auth-footer {
text-align: center;
margin-top: 1.5rem;
font-size: 0.9rem;
color: var(--text-muted);
}
.auth-footer a {
color: var(--primary);
font-weight: 700;
text-decoration: none;
}
.auth-footer a:hover {
text-decoration: underline;
}
/* Empty State / 404 */
.empty-state {
text-align: center;
padding: 4rem 2rem;
background: var(--bg-card);
border: 1px dashed var(--border-color);
border-radius: var(--radius-lg);
grid-column: 1 / -1;
}
.empty-state p {
color: var(--text-muted);
margin-bottom: 1.5rem;
}
/* Footer */
.footer {
background: var(--bg-card);
border-top: 1px solid var(--border-color);
padding: 2rem 0;
margin-top: auto;
text-align: center;
color: var(--text-muted);
font-size: 0.875rem;
}
.footer-meta {
margin-top: 0.5rem;
font-size: 0.8rem;
}
.footer-meta code {
background: #f1f5f9;
padding: 0.2rem 0.4rem;
border-radius: 4px;
color: #0f172a;
}