/* ============================================
   BLUEMARKET - STYLES PRINCIPAUX
   ============================================ */

/* ============================================
   1. VARIABLES & RESET
   ============================================ */

:root {
    --primary-blue: #1a3b8a;
    --primary-blue-hover: #0f2a66;
    --secondary-blue: #2c5bb0;
    --light-blue: #e8edf5;
    --lighter-blue: #f4f7fc;
    --dark-blue: #061248;
    --accent-teal: #17a2b8;
    --success-green: #28a745;
    --warning-yellow: #ffc107;
    --danger-red: #dc3545;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.16);
    --transition: all 0.3s ease;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    background-color: var(--lighter-blue);
    font-size: 0.95rem;
    color: #343a40;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
}

/* ============================================
   2. TYPOGRAPHIE
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark-blue);
}

.text-primary {
    color: var(--primary-blue) !important;
}

.text-secondary {
    color: var(--secondary-blue) !important;
}

/* ============================================
   3. BOUTONS
   ============================================ */

.btn {
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
    padding: 0.6rem 1.2rem;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: var(--primary-blue-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(26, 59, 138, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

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

.btn-outline-primary:hover {
    background-color: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

.btn-success {
    background-color: var(--success-green);
    border: none;
}

.btn-success:hover {
    background-color: #218838;
    color: white;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--danger-red);
    border: none;
}

.btn-danger:hover {
    background-color: #c82333;
    color: white;
    transform: translateY(-2px);
}

.btn-warning {
    background-color: var(--warning-yellow);
    border: none;
    color: var(--dark-blue);
}

.btn-warning:hover {
    background-color: #e0a800;
    color: var(--dark-blue);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

/* ============================================
   4. NAVBAR
   ============================================ */

.navbar-custom {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 0.5rem 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.brand-text {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary-blue);
}

.brand-text i {
    color: var(--secondary-blue);
}

.btn-blue {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    transition: var(--transition);
    font-weight: 600;
}

.btn-blue:hover {
    background-color: var(--primary-blue-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 59, 138, 0.3);
}

.btn-outline-blue {
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    background: transparent;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-blue:hover {
    background-color: var(--primary-blue);
    color: white;
}

.search-form {
    max-width: 500px;
    width: 100%;
}

.search-form .form-control {
    border-radius: 8px 0 0 8px;
    border: 2px solid #e9ecef;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.search-form .form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(26, 59, 138, 0.15);
}

.search-form .form-select {
    border-radius: 0;
    border: 2px solid #e9ecef;
    border-left: none;
    max-width: 130px;
    font-size: 0.85rem;
    background-color: #f8f9fa;
}

.search-form .btn {
    border-radius: 0 8px 8px 0;
    padding: 0.5rem 1.2rem;
}

.nav-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    color: #6c757d;
    transition: var(--transition);
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    position: relative;
    text-decoration: none;
}

.nav-icon-wrapper:hover {
    color: var(--primary-blue);
    background: var(--light-blue);
}

.nav-icon-wrapper i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.badge-notif {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(25%, -25%);
    font-size: 0.55rem;
    padding: 0.25rem 0.5rem;
    background: var(--danger-red);
    color: white;
    border-radius: 50%;
    border: 2px solid white;
    min-width: 18px;
    text-align: center;
}

/* ============================================
   5. HERO SECTION
   ============================================ */

.hero-section {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 60%, var(--secondary-blue) 100%);
    border-radius: 16px;
    padding: 4rem 2rem;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 200%;
    background: rgba(255,255,255,0.05);
    transform: rotate(-15deg);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 40%;
    height: 150%;
    background: rgba(255,255,255,0.03);
    transform: rotate(20deg);
    pointer-events: none;
}

.hero-title {
    font-weight: 800;
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.hero-title .highlight {
    color: #ffd700;
    position: relative;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(255, 215, 0, 0.3);
    border-radius: 4px;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.hero-actions .btn-primary {
    background: #ffd700;
    color: var(--dark-blue);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 700;
    border-radius: 10px;
}

.hero-actions .btn-primary:hover {
    background: #f5c900;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
}

.hero-actions .btn-outline-light {
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 10px;
}

.hero-actions .btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.hero-stats .stat-item {
    display: flex;
    flex-direction: column;
}

.hero-stats .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
}

.hero-stats .stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

.hero-image {
    text-align: center;
    font-size: 10rem;
    opacity: 0.15;
    position: relative;
    z-index: 1;
}

/* ============================================
   6. STATS CARDS
   ============================================ */

.stats-section {
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.2rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary-blue); }
.stat-icon.green { background: var(--success-green); }
.stat-icon.yellow { background: var(--warning-yellow); }
.stat-icon.red { background: var(--danger-red); }

.stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark-blue);
    line-height: 1.2;
}

.stat-label {
    color: #6c757d;
    font-size: 0.8rem;
}

.stat-change {
    font-size: 0.7rem;
    font-weight: 600;
}

.stat-change.up { color: var(--success-green); }
.stat-change.down { color: var(--danger-red); }

/* ============================================
   7. FILTERS
   ============================================ */

.filters-section {
    margin-bottom: 2rem;
}

.filter-box {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f0f0f0;
}

.filter-tag {
    display: inline-block;
    background: #f8f9fa;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    margin: 0.2rem;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: var(--transition);
}

.filter-tag:hover,
.filter-tag.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.sort-select {
    border-radius: 8px;
    padding: 0.4rem 1rem;
    border: 1px solid #dee2e6;
    font-size: 0.85rem;
    background: white;
    cursor: pointer;
}

.sort-select:focus {
    border-color: var(--primary-blue);
    outline: none;
}

.form-range::-webkit-slider-thumb {
    background: var(--primary-blue);
}

.form-range::-moz-range-thumb {
    background: var(--primary-blue);
}

/* ============================================
   8. CATEGORIES
   ============================================ */

.categories-section {
    margin-bottom: 2rem;
}

.category-item {
    background: white;
    border-radius: var(--border-radius);
    text-align: center;
    padding: 1.2rem 0.5rem;
    border: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
    display: block;
    height: 100%;
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
}

.category-item:hover {
    border-color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: inherit;
}

.category-item i {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    display: block;
}

.category-item span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
    display: block;
}

.category-item .sub-count {
    font-size: 0.65rem;
    color: #adb5bd;
    font-weight: 400;
}

/* ============================================
   9. PRODUCT CARDS
   ============================================ */

.products-section {
    margin-bottom: 2rem;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    transition: var(--transition);
    border: 1px solid #eee;
    position: relative;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: #c5d5ed;
}

.product-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    background: #f8f9fa;
}

.product-img {
    height: 160px;
    object-fit: cover;
    width: 100%;
    transition: var(--transition);
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-blue);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    z-index: 2;
}

.product-badge-info { background: var(--accent-teal); }
.product-badge-gold { background: #ffd700; color: #000; }

.product-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    z-index: 2;
}

.product-wishlist:hover {
    background: white;
    transform: scale(1.1);
}

.product-wishlist i { color: var(--danger-red); }

.product-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #343a40;
    text-decoration: none;
    display: block;
}

.product-title:hover { color: var(--primary-blue); }

.product-meta {
    font-size: 0.75rem;
    color: #6c757d;
}

.product-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-blue);
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.8rem;
    margin-left: 5px;
}

.product-rating { color: #ffc107; }
.product-seller {
    font-size: 0.7rem;
    color: #6c757d;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.product-actions .btn {
    flex: 1;
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
}

.btn-add-cart {
    background: var(--primary-blue);
    color: white;
    border: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-add-cart:hover {
    background: var(--primary-blue-hover);
    color: white;
}

.btn-quick-view {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.btn-quick-view:hover { background: #e9ecef; }

/* ============================================
   10. OPPORTUNITIES
   ============================================ */

.opportunities-section {
    margin-bottom: 2rem;
}

.opportunity-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    border: 1px solid #c5d5ed;
    transition: var(--transition);
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.opportunity-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-outline-blue {
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    background: transparent;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-blue:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* ============================================
   11. TESTIMONIALS
   ============================================ */

.testimonials-section {
    margin-bottom: 2rem;
}

.testimonial-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-blue);
    box-shadow: var(--shadow-sm);
    height: 100%;
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   12. BLOG
   ============================================ */

.blog-section {
    margin-bottom: 2rem;
}

.blog-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.blog-image {
    position: relative;
}

.blog-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.blog-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-blue);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.8rem;
    border-radius: 4px;
}

.blog-body {
    padding: 1.25rem;
}

.blog-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.blog-title a {
    color: #343a40;
    text-decoration: none;
    transition: var(--transition);
}

.blog-title a:hover {
    color: var(--primary-blue);
}

.blog-excerpt {
    margin-bottom: 0.75rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #6c757d;
}

/* ============================================
   13. FOOTER
   ============================================ */

.footer-custom {
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 3rem 0 2rem;
    margin-top: 3rem;
}

.footer-custom a {
    text-decoration: none;
    transition: var(--transition);
}

.footer-custom a:hover { color: var(--primary-blue) !important; }

.footer-custom .brand-text {
    color: var(--primary-blue);
    font-size: 1.2rem;
}

/* ============================================
   14. NEWSLETTER
   ============================================ */

.newsletter-section {
    background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
    padding: 3rem 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.newsletter-section h4 {
    color: white;
}

.newsletter-section .text-muted {
    color: rgba(255,255,255,0.7) !important;
}

.newsletter-section .form-control {
    border-radius: 8px 0 0 8px;
    border: none;
    padding: 0.6rem 1rem;
}

.newsletter-section .btn {
    border-radius: 0 8px 8px 0;
    background: #ffd700;
    color: var(--dark-blue);
    font-weight: 700;
}

.newsletter-section .btn:hover {
    background: #f5c900;
}

/* ============================================
   15. NOTIFICATIONS DROPDOWN
   ============================================ */

.notifications-dropdown {
    border-radius: 12px;
    border: 1px solid #e9ecef;
    margin-top: 0.5rem;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f8f9fa;
    transition: background 0.2s ease;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #f0f7ff;
}

.notification-item.unread:hover {
    background: #e8f0fe;
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.notification-icon.primary { background: var(--primary-blue); }
.notification-icon.success { background: var(--success-green); }
.notification-icon.warning { background: var(--warning-yellow); }
.notification-icon.danger { background: var(--danger-red); }
.notification-icon.info { background: var(--accent-teal); }

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.notification-message {
    font-size: 0.8rem;
}

.notification-time {
    font-size: 0.7rem;
}

/* ============================================
   16. CUSTOM TOAST
   ============================================ */

.custom-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    font-weight: 500;
    animation: slideInUp 0.3s ease;
    max-width: 90%;
}

.custom-toast.success {
    background: var(--success-green);
    color: white;
}

.custom-toast.error {
    background: var(--danger-red);
    color: white;
}

.custom-toast.warning {
    background: var(--warning-yellow);
    color: var(--dark-blue);
}

.custom-toast.info {
    background: var(--primary-blue);
    color: white;
}

/* ============================================
   17. PAGINATION
   ============================================ */

.pagination-custom .page-link {
    color: var(--primary-blue);
    border-radius: 8px;
    margin: 0 3px;
    border: 1px solid #dee2e6;
    transition: var(--transition);
}

.pagination-custom .page-link:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

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

.pagination-custom .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
}

/* ============================================
   18. ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* ============================================
   19. SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ============================================
   20. RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 1.5rem;
    }
}

@media (max-width: 991px) {
    .search-form .form-select {
        max-width: 100px;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1.5rem;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .hero-stats {
        gap: 1.5rem;
    }
    .hero-stats .stat-number {
        font-size: 1.5rem;
    }
    .stat-number {
        font-size: 1.2rem;
    }
    .stat-card {
        padding: 0.8rem 1rem;
    }
    .stat-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    .product-img {
        height: 120px;
    }
    .search-form .form-control {
        font-size: 0.8rem;
    }
    .blog-image img {
        height: 140px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.4rem;
    }
    .category-item {
        padding: 0.8rem 0.3rem;
    }
    .category-item i {
        font-size: 1.5rem;
    }
    .category-item span {
        font-size: 0.7rem;
    }
    .hero-actions .btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }
    .search-form .form-select {
        max-width: 80px;
        font-size: 0.7rem;
    }
    .navbar-custom {
        padding: 0.3rem 0;
    }
    .nav-icon-wrapper {
        padding: 0.2rem 0.3rem;
        font-size: 0.6rem;
    }
    .nav-icon-wrapper i {
        font-size: 1rem;
    }
}