/**
 * SwissCarInfo - Main Stylesheet
 * Style inspiré d'AutoGérance
 */

/* Variables */
:root {
    --sci-primary: #2563eb;
    --sci-primary-dark: #1d4ed8;
    --sci-primary-light: #3b82f6;
    --sci-secondary: #64748b;
    --sci-success: #22c55e;
    --sci-danger: #ef4444;
    --sci-warning: #f59e0b;
    --sci-info: #06b6d4;
    --sci-dark: #1e293b;
    --sci-light: #f8fafc;
    --sci-border: #e2e8f0;
    --sci-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --sci-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --sci-radius: 0.5rem;
    --sci-radius-lg: 0.75rem;
    --sci-transition: all 0.2s ease-in-out;
}

/* Global */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--sci-light);
    color: var(--sci-dark);
    padding-top: 56px; /* Pour la navbar fixed */
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--sci-dark);
}

.text-gradient {
    background: linear-gradient(135deg, var(--sci-primary) 0%, var(--sci-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navbar customization */
.navbar {
    background: linear-gradient(135deg, var(--sci-primary) 0%, var(--sci-primary-dark) 100%) !important;
    box-shadow: var(--sci-shadow-lg);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.navbar .nav-link {
    font-weight: 500;
    transition: var(--sci-transition);
}

.navbar .nav-link:hover {
    opacity: 0.9;
}

.navbar .dropdown-menu {
    border: none;
    box-shadow: var(--sci-shadow-lg);
    border-radius: var(--sci-radius);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--sci-primary) 0%, var(--sci-primary-dark) 100%);
    color: white;
    padding: 5rem 0;
    margin-top: -1px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }
    .hero h1 {
        font-size: 1.75rem;
    }
    .hero p {
        font-size: 1rem;
    }
}

/* Search Box */
.search-box {
    background: white;
    border-radius: var(--sci-radius-lg);
    box-shadow: var(--sci-shadow-lg);
    padding: 1.5rem;
    margin-top: 2rem;
}

.search-box .form-control {
    border: 2px solid var(--sci-border);
    border-radius: var(--sci-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--sci-transition);
}

.search-box .form-control:focus {
    border-color: var(--sci-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box .btn-primary {
    background: var(--sci-primary);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: var(--sci-radius);
    transition: var(--sci-transition);
}

.search-box .btn-primary:hover {
    background: var(--sci-primary-dark);
    transform: translateY(-1px);
}

/* Stats Cards */
.stats-section {
    padding: 4rem 0;
}

.stat-card {
    background: white;
    border-radius: var(--sci-radius-lg);
    box-shadow: var(--sci-shadow);
    padding: 2rem;
    text-align: center;
    transition: var(--sci-transition);
    border: 1px solid var(--sci-border);
    min-height: 200px;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sci-shadow-lg);
}

.stat-card .stat-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--sci-primary) 0%, var(--sci-primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.stat-card .stat-icon i {
    font-size: 1.75rem;
    color: white;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--sci-primary);
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    color: var(--sci-secondary);
    font-weight: 500;
}

/* Cards */
.card {
    border: 1px solid var(--sci-border);
    border-radius: var(--sci-radius-lg);
    box-shadow: var(--sci-shadow);
    transition: var(--sci-transition);
}

.card:hover {
    box-shadow: var(--sci-shadow-lg);
}

.card-header {
    background: var(--sci-light);
    border-bottom: 1px solid var(--sci-border);
    font-weight: 600;
}

/* Pricing Cards */
.pricing-card {
    background: white;
    border-radius: var(--sci-radius-lg);
    box-shadow: var(--sci-shadow);
    padding: 2rem;
    text-align: center;
    transition: var(--sci-transition);
    border: 2px solid var(--sci-border);
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sci-shadow-lg);
}

.pricing-card.featured {
    border-color: var(--sci-primary);
}

.pricing-card.featured::before {
    content: 'Populaire';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--sci-primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.pricing-card .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--sci-primary);
}

.pricing-card .price-period {
    color: var(--sci-secondary);
    font-size: 0.875rem;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.pricing-card li {
    padding: 0.5rem 0;
    color: var(--sci-secondary);
}

.pricing-card li i {
    color: var(--sci-success);
    margin-right: 0.5rem;
}

/* Results Table */
.results-table {
    background: white;
    border-radius: var(--sci-radius-lg);
    overflow: hidden;
    box-shadow: var(--sci-shadow);
}

.results-table .table {
    margin-bottom: 0;
}

.results-table .table th {
    background: var(--sci-light);
    border-bottom: 2px solid var(--sci-border);
    font-weight: 600;
    color: var(--sci-dark);
    padding: 1rem;
}

.results-table .table td {
    padding: 1rem;
    vertical-align: middle;
}

.results-table .table tbody tr {
    transition: var(--sci-transition);
}

.results-table .table tbody tr:hover {
    background: var(--sci-light);
}

/* Vehicle Card */
.vehicle-card {
    background: white;
    border-radius: var(--sci-radius-lg);
    box-shadow: var(--sci-shadow);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--sci-transition);
    border: 1px solid var(--sci-border);
}

.vehicle-card:hover {
    box-shadow: var(--sci-shadow-lg);
    border-color: var(--sci-primary);
}

.vehicle-card .vehicle-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--sci-dark);
}

.vehicle-card .vehicle-model {
    color: var(--sci-secondary);
    font-size: 0.875rem;
}

.vehicle-card .vehicle-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.vehicle-card .spec-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--sci-secondary);
}

.vehicle-card .spec-item i {
    color: var(--sci-primary);
}

/* Forms */
.form-control, .form-select {
    border: 2px solid var(--sci-border);
    border-radius: var(--sci-radius);
    padding: 0.625rem 0.875rem;
    transition: var(--sci-transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--sci-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--sci-dark);
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: var(--sci-radius);
    padding: 0.625rem 1.25rem;
    transition: var(--sci-transition);
}

.btn-primary {
    background: var(--sci-primary);
    border-color: var(--sci-primary);
}

.btn-primary:hover {
    background: var(--sci-primary-dark);
    border-color: var(--sci-primary-dark);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border: 2px solid var(--sci-primary);
    color: var(--sci-primary);
}

.btn-outline-primary:hover {
    background: var(--sci-primary);
    border-color: var(--sci-primary);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: var(--sci-radius);
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--sci-radius);
    padding: 1rem 1.25rem;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Pagination */
.pagination {
    gap: 0.25rem;
}

.pagination .page-link {
    border: 1px solid var(--sci-border);
    border-radius: var(--sci-radius);
    color: var(--sci-dark);
    padding: 0.5rem 0.875rem;
    transition: var(--sci-transition);
}

.pagination .page-link:hover {
    background: var(--sci-light);
    border-color: var(--sci-primary);
    color: var(--sci-primary);
}

.pagination .page-item.active .page-link {
    background: var(--sci-primary);
    border-color: var(--sci-primary);
}

/* Footer */
footer {
    background: var(--sci-dark) !important;
}

footer a:hover {
    color: white !important;
}

.hover-light:hover {
    color: white !important;
}

/* Auth Pages */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: white;
    border-radius: var(--sci-radius-lg);
    box-shadow: var(--sci-shadow-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
}

.auth-card .auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
}

.auth-card .auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--sci-secondary);
    font-size: 0.875rem;
}

.auth-card .auth-divider::before,
.auth-card .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sci-border);
}

.auth-card .auth-divider span {
    padding: 0 1rem;
}

/* Responsive */
@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .stat-card .stat-value {
        font-size: 2rem;
    }

    .search-box {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--sci-radius);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

.toast {
    border: none;
    border-radius: var(--sci-radius);
    box-shadow: var(--sci-shadow-lg);
}
