/* Local Market - Style Principal 2026 */

:root {
    --color-primary: #1a472a;
    --color-secondary: #d4af37;
    --color-accent1: #f5f5dc;
    --color-accent2: #8B4513;
    --color-success: #28a745;
    --color-warning: #ffc107;
    --color-danger: #dc3545;
    --color-info: #17a2b8;
    
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, #2e593e 100%);
    --gradient-secondary: linear-gradient(135deg, var(--color-secondary) 0%, #e6c158 100%);
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
    
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Typographie moderne */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.display-1, .display-2, .display-3, .display-4 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.8rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(26, 71, 42, 0.1);
    transform: translateY(-2px);
}

.nav-link.active {
    background-color: var(--color-primary);
    color: white !important;
}

/* Cartes */
.card {
    border: none;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background-color: white;
    border-bottom: 2px solid var(--color-accent1);
    font-weight: 600;
}

/* Boutons */
.btn {
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

/* Produits */
.product-card {
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.product-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
}

.product-card img {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.product-old-price {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Badges */
.badge {
    padding: 0.5em 1em;
    border-radius: 20px;
    font-weight: 600;
}

.badge-primary {
    background: var(--gradient-primary);
}

.badge-secondary {
    background: var(--gradient-secondary);
    color: #000;
}

/* Formulaire */
.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.25rem rgba(26, 71, 42, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

/* Table */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background-color: var(--color-accent1);
    border-bottom: 2px solid var(--color-primary);
    font-weight: 600;
    color: var(--color-primary);
}

.table tbody tr:hover {
    background-color: rgba(26, 71, 42, 0.05);
}

/* Alertes */
.alert {
    border: none;
    border-radius: var(--border-radius-md);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-left: 4px solid var(--color-warning);
    color: #856404;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-left: 4px solid var(--color-danger);
    color: #721c24;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-left: 4px solid var(--color-success);
    color: #155724;
}

/* Pagination */
.pagination .page-link {
    color: var(--color-primary);
    border: 2px solid #e9ecef;
    margin: 0 2px;
    border-radius: var(--border-radius-sm);
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: var(--color-primary);
    color: white;
}

/* Footer */
footer {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
    text-decoration: underline;
}

footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    background: var(--color-secondary);
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.4rem;
    }
    
    .display-1 {
        font-size: 2.5rem;
    }
    
    .btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2e593e;
}

/* Loader */
.loader {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Checkbox et Radio */
.form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.form-switch .form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Progress bars */
.progress {
    height: 10px;
    border-radius: 5px;
    background-color: #e9ecef;
}

.progress-bar {
    background: var(--gradient-primary);
    border-radius: 5px;
}

/* Tooltips */
.tooltip-inner {
    background-color: var(--color-primary);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1rem;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: var(--color-primary);
}

/* Modal */
.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Accordion */
.accordion-button:not(.collapsed) {
    background-color: rgba(26, 71, 42, 0.1);
    color: var(--color-primary);
    font-weight: 600;
}

.accordion-button:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.25rem rgba(26, 71, 42, 0.25);
}

/* Carousel */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0.75rem 0;
}

.breadcrumb-item a {
    color: var(--color-primary);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--color-secondary);
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(26, 71, 42, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.hero-section > .container {
    position: relative;
    z-index: 2;
}

/* Category Cards */
.category-card {
    transition: all 0.4s ease;
    background: white;
    border: 2px solid transparent;
}

.category-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-10px) scale(1.02);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: rgba(26, 71, 42, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    background: var(--gradient-primary);
    transform: rotate(15deg);
}

.category-card:hover .category-icon i {
    color: white !important;
}

/* Stats Cards */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: rotate(45deg);
}

/* Dashboard Sidebar */
#sidebar {
    min-height: calc(100vh - 73px);
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

#sidebar .nav-link {
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.25rem;
    color: #495057;
    transition: all 0.3s ease;
}

#sidebar .nav-link:hover {
    background-color: rgba(26, 71, 42, 0.1);
    color: var(--color-primary);
    padding-left: 1.5rem !important;
}

#sidebar .nav-link.active {
    background: var(--gradient-primary);
    color: white;
}

/* Chart Containers */
canvas {
    max-height: 300px;
}

/* Status Badges */
.order-status {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending { 
    background: linear-gradient(135deg, #ffc107 0%, #ffca2c 100%);
    color: #000;
}

.status-processing { 
    background: linear-gradient(135deg, #17a2b8 0%, #31d2f2 100%);
    color: #fff;
}

.status-shipped { 
    background: linear-gradient(135deg, #007bff 0%, #3d8bfd 100%);
    color: #fff;
}

.status-delivered { 
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
}

.status-cancelled { 
    background: linear-gradient(135deg, #dc3545 0%, #e35d6a 100%);
    color: #fff;
}

/* Info Banner */
.info-banner {
    background: linear-gradient(90deg, var(--color-secondary) 0%, #ffda6a 100%);
    color: #000;
    font-weight: 600;
}

.info-banner marquee {
    padding: 0.5rem 0;
}

/* Product Image Zoom */
.product-image-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-md);
}

.zoom-image {
    transition: transform 0.5s ease;
    cursor: zoom-in;
}

.zoom-image:hover {
    transform: scale(1.5);
}

/* Cart Items */
.cart-item {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
    transition: background-color 0.3s ease;
}

.cart-item:hover {
    background-color: rgba(26, 71, 42, 0.05);
}

.cart-item:last-child {
    border-bottom: none;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 2px solid var(--color-primary);
    background: white;
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.quantity-btn:hover {
    background: var(--color-primary);
    color: white;
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius-sm);
    padding: 0.25rem;
}

/* Checkout Steps */
.checkout-steps {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    position: relative;
}

.checkout-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e9ecef;
    z-index: 1;
}

.checkout-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.checkout-step.active .step-number {
    background: var(--gradient-primary);
    color: white;
}

.checkout-step.completed .step-number {
    background: var(--color-success);
    color: white;
}

.step-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.checkout-step.active .step-label {
    color: var(--color-primary);
    font-weight: 600;
}

/* Invoice */
.invoice {
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}

.invoice-header {
    border-bottom: 3px solid var(--color-primary);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.invoice-table th {
    background-color: var(--color-accent1);
    color: var(--color-primary);
    font-weight: 600;
}

/* Rating Stars */
.rating-stars {
    color: var(--color-secondary);
    font-size: 1.2rem;
}

.rating-stars .far {
    color: #e9ecef;
}

/* Notification Bell */
.notification-bell {
    position: relative;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: var(--color-danger);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Search Bar */
.search-bar {
    position: relative;
}

.search-bar input {
    padding-right: 50px;
    border-radius: 25px;
}

.search-bar .btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 20px;
    padding: 0.25rem 1rem;
}

/* Filters */
.filter-section {
    background: white;
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.filter-section h6 {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-accent1);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Price Range Slider */
.price-range {
    padding: 1rem 0;
}

.price-range .form-range::-webkit-slider-thumb {
    background: var(--color-primary);
}

.price-range .form-range::-moz-range-thumb {
    background: var(--color-primary);
}

/* Product Grid View */
.grid-view .product-card {
    height: 100%;
}

.list-view .product-card {
    flex-direction: row;
}

.list-view .product-card img {
    width: 200px;
    height: auto;
}

/* Wishlist */
.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    border: none;
    color: #dc3545;
    transition: all 0.3s ease;
    z-index: 2;
}

.wishlist-btn:hover, .wishlist-btn.active {
    background: #dc3545;
    color: white;
}

/* Compare Products */
.compare-table {
    font-size: 0.9rem;
}

.compare-table th {
    background-color: var(--color-accent1);
    color: var(--color-primary);
    font-weight: 600;
    position: sticky;
    left: 0;
    z-index: 1;
}

.compare-table td:first-child {
    background-color: var(--color-accent1);
    font-weight: 600;
    position: sticky;
    left: 0;
    z-index: 1;
}

/* Social Share */
.social-share {
    display: flex;
    gap: 0.5rem;
}

.social-share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-share-btn:hover {
    transform: translateY(-3px);
}

.social-share-btn.facebook { background-color: #3b5998; }
.social-share-btn.twitter { background-color: #1da1f2; }
.social-share-btn.whatsapp { background-color: #25d366; }
.social-share-btn.instagram { 
    background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
}

/* Delivery Tracking */
.tracking-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 2rem 0;
}

.tracking-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--color-primary) 0%, var(--color-primary) 70%, #e9ecef 70%, #e9ecef 100%);
    z-index: 1;
}

.tracking-step {
    position: relative;
    z-index: 2;
    text-align: center;
}

.tracking-step.completed .step-icon {
    background: var(--color-success);
    color: white;
}

.tracking-step.current .step-icon {
    background: var(--color-primary);
    color: white;
    animation: pulse 2s infinite;
}

.tracking-step.pending .step-icon {
    background-color: #e9ecef;
    color: #6c757d;
}

.step-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-size: 1rem;
}

.step-label {
    font-size: 0.8rem;
    color: #6c757d;
}

.tracking-step.completed .step-label,
.tracking-step.current .step-label {
    color: var(--color-primary);
    font-weight: 600;
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-button:hover {
    transform: scale(1.1);
}

.chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 300px;
    height: 400px;
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-xl);
    display: none;
    flex-direction: column;
}

.chat-window.active {
    display: flex;
}

.chat-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
}

.chat-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.chat-footer {
    padding: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .invoice {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .card {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }
    
    .form-control, .form-select {
        background-color: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .table {
        color: #e0e0e0;
    }
    
    .table thead th {
        background-color: #2d2d2d;
        color: var(--color-secondary);
    }
}